· 5 years ago · Feb 04, 2021, 03:36 PM
1interface BaseType<T> {
2 type: T; // generika - type je vzdy uvedeny
3 modifiable?: boolean; // mozme to dat prec ? ma to nejaku speci logiku ? nestaci to cez permissions osetrit ?
4 multiple?: boolean; // use list of current type = toto sa bude potom pouzivat ako Array<type> nie type.array = true
5 key: string; // attr name duplicita asi pre lepsi vykon ?
6}
7
8interface Date extends BaseType<"Date"> {} // string + format
9
10interface DateTime extends BaseType<"DateTime"> {} // string + format
11
12interface Dropdown extends BaseType<"Dropdown"> {
13 markdown?: boolean; // TODO: move to template
14 useCheckbox?: boolean; // TODO: move to template
15 values: string[];
16 data?: any; // TODO: remove - only in SpBuilding::type and Building::type
17 query?: string; // TODO: remove - only in GameMedium::type
18}
19
20interface Element extends BaseType<"Element"> {
21 copyDescendants?: boolean; // need more info
22 ignoredAttributes?: string[];
23 gisIdSearching?: boolean;
24 values?: any; // TODO: mozme ignorovat ? ElectricSupplyMeterR2V2::dispatch_location a ElectricSupplyMeterR2::dispatch_location
25 isCounting?: boolean; // need more info - pouzite raz
26 isAlwaysDisabled?: boolean; // pouzite raz MvdInspection::checklist
27 query: string; // mongo ? alebo to je ta api ?
28}
29
30interface Feedback extends BaseType<"Feedback"> {} // TODO: define attributes - string | Array<string> ???
31
32interface File extends BaseType<"File"> {
33 values?: string[]; // TODO: remove - unused
34 isDocxTemplate?: boolean; // TODO: move to template
35 isCsv?: boolean; // TODO: move to template
36}
37
38interface Geo extends BaseType<"Geo"> {} // TODO: define attributes - string | Array<string> ???
39
40interface Hidden extends BaseType<"Hidden"> {
41 values?: true | false;
42 useCheckbox?: boolean;
43} // TODO: define attributes - string | Array<string> ???
44
45interface Iframe extends BaseType<"Iframe"> {} // TODO: define attributes - string | Array<string> ???
46
47interface Listing extends BaseType<"Listing"> {}
48
49interface Number extends BaseType<"Number"> {
50 isNumberToDateFormat?: boolean; // TODO: nechceme to prerobit na Date ?
51 numberToDateFormat?: string; // HH:mm:ss - tiez jedine pouzitie je HH:mm:ss tak radsej Date nech ma custom format alebo majme Date Time DateTime
52}
53
54interface OnlineDevice extends BaseType<"OnlineDevice"> {} // TODO: potrebujeme ho ?
55
56interface Query extends BaseType<"Query"> {
57 // nasiel som aj pripad ze query bola len string
58 collection: string;
59 criteria: Record<"string", any>; // MongoDB query ??
60 projection: any; // Mongo query ??
61 markdown?: boolean; // TODO: template ??
62 values?: string[]; // TODO: bolo pouzite len raz Mailing::type a prazdne
63}
64
65interface SecurityGroup extends BaseType<"SecurityGroup"> {}
66
67interface Text extends BaseType<"Text"> {
68 isModel?: boolean; // TODO: ??? Io_IUI_FET::male_name a Io_IUI_FETMaster::male_name
69 isID?: boolean; // TODO: ??? FormSG::element_name a DamageEvent::number
70 useCheckbox?: boolean; // TODO
71 query?: string; // TODO: "[]" alebo ""
72 markdown?: boolean; // TODO: presun
73 values?: string[]; // TODO: nepatri to potom do Dropdownu ?
74}
75
76interface TextArea extends BaseType<"TextArea"> {
77 markdown?: boolean; // TODO: template ?
78 values?: string[]; // TODO: nepatri to potom do Dropdownu ?
79 isImgMap?: boolean; // TODO: template?
80 isCsv?: boolean; // TODO: template?
81 isTable?: boolean;
82 tableDefinition?: string;
83}
84
85interface User extends BaseType<"User"> {
86 markdown: boolean; // TODO: template ?
87 query: string; // TODO: preco to potrebujeme nestaci Element ?
88}
89