Skip to content

Commit 8ff011e

Browse files
committed
feat: field type
1 parent 371d34a commit 8ff011e

38 files changed

Lines changed: 862 additions & 0 deletions
Lines changed: 111 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,111 @@
1+
package cn.vika.client.api.model.field;
2+
3+
/**
4+
* field types
5+
*
6+
* @author tao
7+
*/
8+
public enum FieldType {
9+
/**
10+
*
11+
*/
12+
SingleText("SingleText"),
13+
/**
14+
*
15+
*/
16+
Text("Text"),
17+
/**
18+
*
19+
*/
20+
SingleSelect("SingleSelect"),
21+
/**
22+
*
23+
*/
24+
MultiSelect("MultiSelect"),
25+
/**
26+
*
27+
*/
28+
Number("Number"),
29+
/**
30+
*
31+
*/
32+
Currency("Currency"),
33+
/**
34+
*
35+
*/
36+
Percent("Percent"),
37+
/**
38+
*
39+
*/
40+
DateTime("DateTime"),
41+
/**
42+
*
43+
*/
44+
Attachment("Attachment"),
45+
/**
46+
*
47+
*/
48+
Member("Member"),
49+
/**
50+
*
51+
*/
52+
Checkbox("Checkbox"),
53+
/**
54+
*
55+
*/
56+
Rating("Rating"),
57+
/**
58+
*
59+
*/
60+
URL("URL"),
61+
/**
62+
*
63+
*/
64+
Phone("Phone"),
65+
/**
66+
*
67+
*/
68+
Email("Email"),
69+
/**
70+
*
71+
*/
72+
MagicLink("MagicLink"),
73+
/**
74+
*
75+
*/
76+
MagicLookUp("MagicLookUp"),
77+
/**
78+
*
79+
*/
80+
Formula("Formula"),
81+
/**
82+
*
83+
*/
84+
AutoNumber("AutoNumber"),
85+
/**
86+
*
87+
*/
88+
CreatedTime("CreatedTime"),
89+
/**
90+
*
91+
*/
92+
LastModifiedTime("LastModifiedTime"),
93+
/**
94+
*
95+
*/
96+
CreatedBy("CreatedBy"),
97+
/**
98+
*
99+
*/
100+
LastModifiedBy("LastModifiedBy");
101+
102+
private final String fieldType;
103+
104+
FieldType(String fieldType) {
105+
this.fieldType = fieldType;
106+
}
107+
108+
public String getFieldType() {
109+
return fieldType;
110+
}
111+
}
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
package cn.vika.client.api.model.field.property;
2+
3+
/**
4+
* @author tao
5+
*/
6+
public class AttachmentFieldProperty extends BaseFieldProperty{
7+
}
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
package cn.vika.client.api.model.field.property;
2+
3+
/**
4+
* @author tao
5+
*/
6+
public class AutoNumberFieldProperty extends BaseFieldProperty{
7+
}
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
package cn.vika.client.api.model.field.property;
2+
3+
/**
4+
* @author tao
5+
*/
6+
public class BaseFieldProperty {
7+
8+
}
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
package cn.vika.client.api.model.field.property;
2+
3+
/**
4+
* @author wuyitao
5+
* @date 2022/5/4 10:50 AM
6+
*/
7+
public class CheckboxFieldProperty extends BaseFieldProperty {
8+
9+
private String icon;
10+
11+
}
Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
package cn.vika.client.api.model.field.property;
2+
3+
import java.util.List;
4+
5+
import cn.vika.client.api.model.field.property.option.UserOption;
6+
7+
/**
8+
* @author tao
9+
*/
10+
public class CreatedByFieldProperty extends BaseFieldProperty {
11+
12+
private List<UserOption> options;
13+
14+
public List<UserOption> getOptions() {
15+
return options;
16+
}
17+
18+
public void setOptions(List<UserOption> options) {
19+
this.options = options;
20+
}
21+
}
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
package cn.vika.client.api.model.field.property;
2+
3+
/**
4+
* @author tao
5+
*/
6+
public class CreatedTimeFieldProperty extends DateTimeFieldProperty{
7+
}
Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
package cn.vika.client.api.model.field.property;
2+
3+
/**
4+
* @author tao
5+
*/
6+
public class CurrencyFieldProperty extends NumberFieldProperty {
7+
8+
private String symbol;
9+
10+
public String getSymbol() {
11+
return symbol;
12+
}
13+
14+
public void setSymbol(String symbol) {
15+
this.symbol = symbol;
16+
}
17+
}
Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
package cn.vika.client.api.model.field.property;
2+
3+
/**
4+
* @author tao
5+
*/
6+
public class DateTimeFieldProperty extends BaseFieldProperty {
7+
8+
private String format;
9+
10+
private boolean autoFill = false;
11+
12+
private boolean bool = false;
13+
14+
public String getFormat() {
15+
return format;
16+
}
17+
18+
public void setFormat(String format) {
19+
this.format = format;
20+
}
21+
22+
public boolean isAutoFill() {
23+
return autoFill;
24+
}
25+
26+
public void setAutoFill(boolean autoFill) {
27+
this.autoFill = autoFill;
28+
}
29+
30+
public boolean isBool() {
31+
return bool;
32+
}
33+
34+
public void setBool(boolean bool) {
35+
this.bool = bool;
36+
}
37+
}
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
package cn.vika.client.api.model.field.property;
2+
3+
/**
4+
* @author tao
5+
*/
6+
public class EmailFieldProperty extends BaseFieldProperty{
7+
}

0 commit comments

Comments
 (0)