-
Notifications
You must be signed in to change notification settings - Fork 0
/
Forms.proto
86 lines (77 loc) · 2.16 KB
/
Forms.proto
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
option java_package = "com.idamobile.instabank.dto.protobuf";
option java_outer_classname = "Forms";
message Form {
required string id = 1;
repeated FormField fields = 5;
optional bool hasNext = 7;
optional bool requiresCommission = 8;
required FormType type = 9;
enum FormType {
PAYMENT = 1;
TRANSFER = 2;
WITHDRAWAL = 3;
}
}
message FormField {
required string id = 1;
optional string name = 2;
required int32 formOrder = 3;
optional int64 minLimit = 4;
optional int64 maxLimit = 5;
optional string regExp = 6;
optional string defaultValue = 7;
/* Is required for all fields presented to user (i.e. is omitted for HIDDEN) */
optional bool mandatory = 8;
optional string errorMessage = 9;
optional string hint = 10;
optional bool readOnly = 11;
required FieldClass fieldClass = 12;
repeated ComboBoxValue comboBoxValues = 13;
optional string mask = 14;
enum FieldClass {
SINGLE_LINE_TEXT = 1;
MULTI_LINE_TEXT = 2;
CHECK_BOX = 3;
PASSWORD = 4;
/* Date with yyyy/MM precision in GMT0
min and max limits, defaultValue are in unix time format */
MONTH_YEAR = 5;
/* Date with yyyy/MM/hh precision in GMT0
min and max limits, defaultValue are in unix time format */
DATE = 6;
COMBO_BOX = 7;
MONEY = 8;
PHONE = 9;
USER_ACCOUNT = 10;
AMOUNT = 11;
SOURCE_ACCOUNT = 12;
HIDDEN = 13;
NUMERIC = 14;
DECIMAL = 15;
}
}
message FieldValue {
required string formFieldId = 1;
optional string value = 2;
}
message FilledForm {
required string formId = 1;
repeated FieldValue values = 2;
}
message ComboBoxValue {
required string name = 1;
required string value = 2;
optional int32 order = 3;
}
message Beneficiary {
required string id = 1;
required string name = 2;
required Form form = 3;
optional string logoResource = 4;
}
message BeneficiaryCategory {
required string id = 1;
required string name = 2;
optional string logoResource = 3;
repeated Beneficiary beneficiaries = 4;
}