@statezero/core 0.2.50 → 0.2.52
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/adaptors/vue/components/StateZeroDebugPanel.js +489 -471
- package/dist/adaptors/vue/reactivity.d.ts +1 -0
- package/dist/adaptors/vue/reactivity.js +17 -5
- package/dist/cli/commands/syncActions.js +33 -1
- package/dist/cli/commands/syncModels.js +44 -3
- package/dist/filtering/localFiltering.js +4 -4
- package/dist/flavours/django/errors.d.ts +12 -0
- package/dist/flavours/django/errors.js +20 -0
- package/dist/flavours/django/f.js +16 -15
- package/dist/index.d.ts +2 -1
- package/dist/index.js +2 -2
- package/dist/models/backend1/django_app/author.d.ts +284 -0
- package/dist/models/backend1/django_app/author.js +69 -0
- package/dist/models/backend1/django_app/author.schema.json +281 -0
- package/dist/models/backend1/django_app/book.d.ts +262 -0
- package/dist/models/backend1/django_app/book.js +71 -0
- package/dist/models/backend1/django_app/book.schema.json +254 -0
- package/dist/models/backend1/django_app/composeditem.d.ts +140 -0
- package/dist/models/backend1/django_app/composeditem.js +69 -0
- package/dist/models/backend1/django_app/composeditem.schema.json +122 -0
- package/dist/models/backend1/django_app/comprehensivemodel.schema.json +3 -3
- package/dist/models/backend1/django_app/dailyrate.schema.json +7 -7
- package/dist/models/backend1/django_app/deepmodellevel1.schema.json +1 -1
- package/dist/models/backend1/django_app/dummymodel.schema.json +3 -3
- package/dist/models/backend1/django_app/errortestcompoundunique.d.ts +124 -0
- package/dist/models/backend1/django_app/errortestcompoundunique.js +69 -0
- package/dist/models/backend1/django_app/errortestcompoundunique.schema.json +106 -0
- package/dist/models/backend1/django_app/errortestonetoonemodel.d.ts +118 -0
- package/dist/models/backend1/django_app/errortestonetoonemodel.js +71 -0
- package/dist/models/backend1/django_app/errortestonetoonemodel.schema.json +90 -0
- package/dist/models/backend1/django_app/errortestparent.d.ts +92 -0
- package/dist/models/backend1/django_app/errortestparent.js +69 -0
- package/dist/models/backend1/django_app/errortestparent.schema.json +70 -0
- package/dist/models/backend1/django_app/errortestprotectedchild.d.ts +118 -0
- package/dist/models/backend1/django_app/errortestprotectedchild.js +71 -0
- package/dist/models/backend1/django_app/errortestprotectedchild.schema.json +94 -0
- package/dist/models/backend1/django_app/errortestuniquemodel.d.ts +108 -0
- package/dist/models/backend1/django_app/errortestuniquemodel.js +69 -0
- package/dist/models/backend1/django_app/errortestuniquemodel.schema.json +88 -0
- package/dist/models/backend1/django_app/excludeditem.d.ts +124 -0
- package/dist/models/backend1/django_app/excludeditem.js +69 -0
- package/dist/models/backend1/django_app/excludeditem.schema.json +105 -0
- package/dist/models/backend1/django_app/hfchild.d.ts +118 -0
- package/dist/models/backend1/django_app/hfchild.js +71 -0
- package/dist/models/backend1/django_app/hfchild.schema.json +94 -0
- package/dist/models/backend1/django_app/hfparent.d.ts +124 -0
- package/dist/models/backend1/django_app/hfparent.js +69 -0
- package/dist/models/backend1/django_app/hfparent.schema.json +105 -0
- package/dist/models/backend1/django_app/index.js +19 -0
- package/dist/models/backend1/django_app/m2mdepthtestlevel1.schema.json +3 -3
- package/dist/models/backend1/django_app/m2mdepthtestlevel2.schema.json +3 -3
- package/dist/models/backend1/django_app/m2mdepthtestlevel3.schema.json +5 -5
- package/dist/models/backend1/django_app/modelwithrestrictedfields.schema.json +2 -2
- package/dist/models/backend1/django_app/nodeleteitem.d.ts +124 -0
- package/dist/models/backend1/django_app/nodeleteitem.js +69 -0
- package/dist/models/backend1/django_app/nodeleteitem.schema.json +105 -0
- package/dist/models/backend1/django_app/objectlevelitem.d.ts +124 -0
- package/dist/models/backend1/django_app/objectlevelitem.js +69 -0
- package/dist/models/backend1/django_app/objectlevelitem.schema.json +105 -0
- package/dist/models/backend1/django_app/order.schema.json +7 -7
- package/dist/models/backend1/django_app/orderitem.schema.json +5 -5
- package/dist/models/backend1/django_app/product.schema.json +11 -11
- package/dist/models/backend1/django_app/productcategory.schema.json +2 -2
- package/dist/models/backend1/django_app/rateplan.schema.json +2 -2
- package/dist/models/backend1/django_app/readonlyitem.d.ts +124 -0
- package/dist/models/backend1/django_app/readonlyitem.js +69 -0
- package/dist/models/backend1/django_app/readonlyitem.schema.json +105 -0
- package/dist/models/backend1/django_app/restrictedcreateitem.d.ts +124 -0
- package/dist/models/backend1/django_app/restrictedcreateitem.js +69 -0
- package/dist/models/backend1/django_app/restrictedcreateitem.schema.json +105 -0
- package/dist/models/backend1/django_app/restrictededititem.d.ts +124 -0
- package/dist/models/backend1/django_app/restrictededititem.js +69 -0
- package/dist/models/backend1/django_app/restrictededititem.schema.json +105 -0
- package/dist/models/backend1/django_app/restrictedfieldrelatedmodel.schema.json +1 -1
- package/dist/models/backend1/django_app/rowfiltereditem.d.ts +124 -0
- package/dist/models/backend1/django_app/rowfiltereditem.js +69 -0
- package/dist/models/backend1/django_app/rowfiltereditem.schema.json +105 -0
- package/dist/models/backend1/django_app/tag.d.ts +554 -0
- package/dist/models/backend1/django_app/tag.js +71 -0
- package/dist/models/backend1/django_app/tag.schema.json +541 -0
- package/dist/models/backend1/django_app/updateonlyitem.d.ts +108 -0
- package/dist/models/backend1/django_app/updateonlyitem.js +69 -0
- package/dist/models/backend1/django_app/updateonlyitem.schema.json +88 -0
- package/dist/models/default/django_app/author.d.ts +284 -0
- package/dist/models/default/django_app/author.js +69 -0
- package/dist/models/default/django_app/author.schema.json +281 -0
- package/dist/models/default/django_app/book.d.ts +262 -0
- package/dist/models/default/django_app/book.js +71 -0
- package/dist/models/default/django_app/book.schema.json +254 -0
- package/dist/models/default/django_app/composeditem.d.ts +140 -0
- package/dist/models/default/django_app/composeditem.js +69 -0
- package/dist/models/default/django_app/composeditem.schema.json +122 -0
- package/dist/models/default/django_app/comprehensivemodel.schema.json +3 -3
- package/dist/models/default/django_app/dailyrate.schema.json +7 -7
- package/dist/models/default/django_app/deepmodellevel1.d.ts +1 -13
- package/dist/models/default/django_app/deepmodellevel1.schema.json +2 -14
- package/dist/models/default/django_app/deepmodellevel2.d.ts +1 -13
- package/dist/models/default/django_app/deepmodellevel2.schema.json +1 -13
- package/dist/models/default/django_app/deepmodellevel3.d.ts +1 -13
- package/dist/models/default/django_app/deepmodellevel3.schema.json +1 -13
- package/dist/models/default/django_app/dummymodel.d.ts +1 -13
- package/dist/models/default/django_app/dummymodel.schema.json +4 -16
- package/dist/models/default/django_app/dummyrelatedmodel.d.ts +1 -13
- package/dist/models/default/django_app/dummyrelatedmodel.schema.json +1 -13
- package/dist/models/default/django_app/errortestcompoundunique.d.ts +124 -0
- package/dist/models/default/django_app/errortestcompoundunique.js +69 -0
- package/dist/models/default/django_app/errortestcompoundunique.schema.json +106 -0
- package/dist/models/default/django_app/errortestonetoonemodel.d.ts +118 -0
- package/dist/models/default/django_app/errortestonetoonemodel.js +71 -0
- package/dist/models/default/django_app/errortestonetoonemodel.schema.json +90 -0
- package/dist/models/default/django_app/errortestparent.d.ts +92 -0
- package/dist/models/default/django_app/errortestparent.js +69 -0
- package/dist/models/default/django_app/errortestparent.schema.json +70 -0
- package/dist/models/default/django_app/errortestprotectedchild.d.ts +118 -0
- package/dist/models/default/django_app/errortestprotectedchild.js +71 -0
- package/dist/models/default/django_app/errortestprotectedchild.schema.json +94 -0
- package/dist/models/default/django_app/errortestuniquemodel.d.ts +108 -0
- package/dist/models/default/django_app/errortestuniquemodel.js +69 -0
- package/dist/models/default/django_app/errortestuniquemodel.schema.json +88 -0
- package/dist/models/default/django_app/excludeditem.d.ts +124 -0
- package/dist/models/default/django_app/excludeditem.js +69 -0
- package/dist/models/default/django_app/excludeditem.schema.json +105 -0
- package/dist/models/default/django_app/filetest.d.ts +1 -13
- package/dist/models/default/django_app/filetest.schema.json +1 -13
- package/dist/models/default/django_app/hfchild.d.ts +118 -0
- package/dist/models/default/django_app/hfchild.js +71 -0
- package/dist/models/default/django_app/hfchild.schema.json +94 -0
- package/dist/models/default/django_app/hfparent.d.ts +124 -0
- package/dist/models/default/django_app/hfparent.js +69 -0
- package/dist/models/default/django_app/hfparent.schema.json +105 -0
- package/dist/models/default/django_app/index.js +19 -0
- package/dist/models/default/django_app/m2mdepthtestlevel1.schema.json +3 -3
- package/dist/models/default/django_app/m2mdepthtestlevel2.schema.json +3 -3
- package/dist/models/default/django_app/m2mdepthtestlevel3.schema.json +5 -5
- package/dist/models/default/django_app/modelwithrestrictedfields.schema.json +2 -2
- package/dist/models/default/django_app/nodeleteitem.d.ts +124 -0
- package/dist/models/default/django_app/nodeleteitem.js +69 -0
- package/dist/models/default/django_app/nodeleteitem.schema.json +105 -0
- package/dist/models/default/django_app/objectlevelitem.d.ts +124 -0
- package/dist/models/default/django_app/objectlevelitem.js +69 -0
- package/dist/models/default/django_app/objectlevelitem.schema.json +105 -0
- package/dist/models/default/django_app/order.schema.json +7 -7
- package/dist/models/default/django_app/orderitem.schema.json +5 -5
- package/dist/models/default/django_app/product.schema.json +11 -11
- package/dist/models/default/django_app/productcategory.schema.json +2 -2
- package/dist/models/default/django_app/rateplan.schema.json +2 -2
- package/dist/models/default/django_app/readonlyitem.d.ts +124 -0
- package/dist/models/default/django_app/readonlyitem.js +69 -0
- package/dist/models/default/django_app/readonlyitem.schema.json +105 -0
- package/dist/models/default/django_app/restrictedcreateitem.d.ts +124 -0
- package/dist/models/default/django_app/restrictedcreateitem.js +69 -0
- package/dist/models/default/django_app/restrictedcreateitem.schema.json +105 -0
- package/dist/models/default/django_app/restrictededititem.d.ts +124 -0
- package/dist/models/default/django_app/restrictededititem.js +69 -0
- package/dist/models/default/django_app/restrictededititem.schema.json +105 -0
- package/dist/models/default/django_app/restrictedfieldrelatedmodel.schema.json +1 -1
- package/dist/models/default/django_app/rowfiltereditem.d.ts +124 -0
- package/dist/models/default/django_app/rowfiltereditem.js +69 -0
- package/dist/models/default/django_app/rowfiltereditem.schema.json +105 -0
- package/dist/models/default/django_app/tag.d.ts +554 -0
- package/dist/models/default/django_app/tag.js +71 -0
- package/dist/models/default/django_app/tag.schema.json +541 -0
- package/dist/models/default/django_app/updateonlyitem.d.ts +108 -0
- package/dist/models/default/django_app/updateonlyitem.js +69 -0
- package/dist/models/default/django_app/updateonlyitem.schema.json +88 -0
- package/dist/schemaIntegrity.d.ts +14 -0
- package/dist/schemaIntegrity.js +29 -0
- package/dist/setup.js +6 -0
- package/dist/syncEngine/stores/operationEventHandlers.js +10 -8
- package/dist/syncEngine/stores/querysetStore.js +9 -0
- package/package.json +1 -1
|
@@ -0,0 +1,284 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Model-specific QuerySet implementation
|
|
3
|
+
*/
|
|
4
|
+
export class AuthorQuerySet {
|
|
5
|
+
}
|
|
6
|
+
/**
|
|
7
|
+
* Model-specific Manager implementation
|
|
8
|
+
*/
|
|
9
|
+
export class AuthorManager {
|
|
10
|
+
constructor(ModelClass: any);
|
|
11
|
+
newQuerySet(): AuthorQuerySet;
|
|
12
|
+
}
|
|
13
|
+
/**
|
|
14
|
+
* Implementation of the Author model
|
|
15
|
+
*/
|
|
16
|
+
export class Author {
|
|
17
|
+
static configKey: string;
|
|
18
|
+
static modelName: string;
|
|
19
|
+
static primaryKeyField: string;
|
|
20
|
+
static objects: AuthorManager;
|
|
21
|
+
static fields: string[];
|
|
22
|
+
static schema: {
|
|
23
|
+
model_name: string;
|
|
24
|
+
title: string;
|
|
25
|
+
class_name: string;
|
|
26
|
+
plural_title: string;
|
|
27
|
+
primary_key_field: string;
|
|
28
|
+
filterable_fields: string[];
|
|
29
|
+
searchable_fields: string[];
|
|
30
|
+
ordering_fields: string[];
|
|
31
|
+
properties: {
|
|
32
|
+
id: {
|
|
33
|
+
type: string;
|
|
34
|
+
title: string;
|
|
35
|
+
required: boolean;
|
|
36
|
+
description: null;
|
|
37
|
+
nullable: boolean;
|
|
38
|
+
format: string;
|
|
39
|
+
max_length: null;
|
|
40
|
+
choices: null;
|
|
41
|
+
default: null;
|
|
42
|
+
validators: never[];
|
|
43
|
+
max_digits: null;
|
|
44
|
+
decimal_places: null;
|
|
45
|
+
read_only: boolean;
|
|
46
|
+
ref: null;
|
|
47
|
+
};
|
|
48
|
+
name: {
|
|
49
|
+
type: string;
|
|
50
|
+
title: string;
|
|
51
|
+
required: boolean;
|
|
52
|
+
description: null;
|
|
53
|
+
nullable: boolean;
|
|
54
|
+
format: null;
|
|
55
|
+
max_length: number;
|
|
56
|
+
choices: null;
|
|
57
|
+
default: null;
|
|
58
|
+
validators: never[];
|
|
59
|
+
max_digits: null;
|
|
60
|
+
decimal_places: null;
|
|
61
|
+
read_only: boolean;
|
|
62
|
+
ref: null;
|
|
63
|
+
};
|
|
64
|
+
bio: {
|
|
65
|
+
type: string;
|
|
66
|
+
title: string;
|
|
67
|
+
required: boolean;
|
|
68
|
+
description: null;
|
|
69
|
+
nullable: boolean;
|
|
70
|
+
format: string;
|
|
71
|
+
max_length: null;
|
|
72
|
+
choices: null;
|
|
73
|
+
default: string;
|
|
74
|
+
validators: never[];
|
|
75
|
+
max_digits: null;
|
|
76
|
+
decimal_places: null;
|
|
77
|
+
read_only: boolean;
|
|
78
|
+
ref: null;
|
|
79
|
+
};
|
|
80
|
+
age: {
|
|
81
|
+
type: string;
|
|
82
|
+
title: string;
|
|
83
|
+
required: boolean;
|
|
84
|
+
description: null;
|
|
85
|
+
nullable: boolean;
|
|
86
|
+
format: null;
|
|
87
|
+
max_length: null;
|
|
88
|
+
choices: null;
|
|
89
|
+
default: null;
|
|
90
|
+
validators: never[];
|
|
91
|
+
max_digits: null;
|
|
92
|
+
decimal_places: null;
|
|
93
|
+
read_only: boolean;
|
|
94
|
+
ref: null;
|
|
95
|
+
};
|
|
96
|
+
rating: {
|
|
97
|
+
type: string;
|
|
98
|
+
title: string;
|
|
99
|
+
required: boolean;
|
|
100
|
+
description: null;
|
|
101
|
+
nullable: boolean;
|
|
102
|
+
format: null;
|
|
103
|
+
max_length: null;
|
|
104
|
+
choices: null;
|
|
105
|
+
default: number;
|
|
106
|
+
validators: never[];
|
|
107
|
+
max_digits: null;
|
|
108
|
+
decimal_places: null;
|
|
109
|
+
read_only: boolean;
|
|
110
|
+
ref: null;
|
|
111
|
+
};
|
|
112
|
+
salary: {
|
|
113
|
+
type: string;
|
|
114
|
+
title: string;
|
|
115
|
+
required: boolean;
|
|
116
|
+
description: null;
|
|
117
|
+
nullable: boolean;
|
|
118
|
+
format: string;
|
|
119
|
+
max_length: null;
|
|
120
|
+
choices: null;
|
|
121
|
+
default: null;
|
|
122
|
+
validators: never[];
|
|
123
|
+
max_digits: number;
|
|
124
|
+
decimal_places: number;
|
|
125
|
+
read_only: boolean;
|
|
126
|
+
ref: null;
|
|
127
|
+
};
|
|
128
|
+
is_active: {
|
|
129
|
+
type: string;
|
|
130
|
+
title: string;
|
|
131
|
+
required: boolean;
|
|
132
|
+
description: null;
|
|
133
|
+
nullable: boolean;
|
|
134
|
+
format: null;
|
|
135
|
+
max_length: null;
|
|
136
|
+
choices: null;
|
|
137
|
+
default: boolean;
|
|
138
|
+
validators: never[];
|
|
139
|
+
max_digits: null;
|
|
140
|
+
decimal_places: null;
|
|
141
|
+
read_only: boolean;
|
|
142
|
+
ref: null;
|
|
143
|
+
};
|
|
144
|
+
birth_date: {
|
|
145
|
+
type: string;
|
|
146
|
+
title: string;
|
|
147
|
+
required: boolean;
|
|
148
|
+
description: null;
|
|
149
|
+
nullable: boolean;
|
|
150
|
+
format: string;
|
|
151
|
+
max_length: null;
|
|
152
|
+
choices: null;
|
|
153
|
+
default: null;
|
|
154
|
+
validators: never[];
|
|
155
|
+
max_digits: null;
|
|
156
|
+
decimal_places: null;
|
|
157
|
+
read_only: boolean;
|
|
158
|
+
ref: null;
|
|
159
|
+
};
|
|
160
|
+
created_at: {
|
|
161
|
+
type: string;
|
|
162
|
+
title: string;
|
|
163
|
+
required: boolean;
|
|
164
|
+
description: null;
|
|
165
|
+
nullable: boolean;
|
|
166
|
+
format: string;
|
|
167
|
+
max_length: null;
|
|
168
|
+
choices: null;
|
|
169
|
+
default: null;
|
|
170
|
+
validators: never[];
|
|
171
|
+
max_digits: null;
|
|
172
|
+
decimal_places: null;
|
|
173
|
+
read_only: boolean;
|
|
174
|
+
ref: null;
|
|
175
|
+
};
|
|
176
|
+
email: {
|
|
177
|
+
type: string;
|
|
178
|
+
title: string;
|
|
179
|
+
required: boolean;
|
|
180
|
+
description: null;
|
|
181
|
+
nullable: boolean;
|
|
182
|
+
format: null;
|
|
183
|
+
max_length: number;
|
|
184
|
+
choices: null;
|
|
185
|
+
default: string;
|
|
186
|
+
validators: never[];
|
|
187
|
+
max_digits: null;
|
|
188
|
+
decimal_places: null;
|
|
189
|
+
read_only: boolean;
|
|
190
|
+
ref: null;
|
|
191
|
+
};
|
|
192
|
+
website: {
|
|
193
|
+
type: string;
|
|
194
|
+
title: string;
|
|
195
|
+
required: boolean;
|
|
196
|
+
description: null;
|
|
197
|
+
nullable: boolean;
|
|
198
|
+
format: null;
|
|
199
|
+
max_length: number;
|
|
200
|
+
choices: null;
|
|
201
|
+
default: string;
|
|
202
|
+
validators: never[];
|
|
203
|
+
max_digits: null;
|
|
204
|
+
decimal_places: null;
|
|
205
|
+
read_only: boolean;
|
|
206
|
+
ref: null;
|
|
207
|
+
};
|
|
208
|
+
slug: {
|
|
209
|
+
type: string;
|
|
210
|
+
title: string;
|
|
211
|
+
required: boolean;
|
|
212
|
+
description: null;
|
|
213
|
+
nullable: boolean;
|
|
214
|
+
format: null;
|
|
215
|
+
max_length: number;
|
|
216
|
+
choices: null;
|
|
217
|
+
default: string;
|
|
218
|
+
validators: never[];
|
|
219
|
+
max_digits: null;
|
|
220
|
+
decimal_places: null;
|
|
221
|
+
read_only: boolean;
|
|
222
|
+
ref: null;
|
|
223
|
+
};
|
|
224
|
+
uuid: {
|
|
225
|
+
type: string;
|
|
226
|
+
title: string;
|
|
227
|
+
required: boolean;
|
|
228
|
+
description: null;
|
|
229
|
+
nullable: boolean;
|
|
230
|
+
format: null;
|
|
231
|
+
max_length: number;
|
|
232
|
+
choices: null;
|
|
233
|
+
default: string;
|
|
234
|
+
validators: never[];
|
|
235
|
+
max_digits: null;
|
|
236
|
+
decimal_places: null;
|
|
237
|
+
read_only: boolean;
|
|
238
|
+
ref: null;
|
|
239
|
+
};
|
|
240
|
+
metadata: {
|
|
241
|
+
type: string;
|
|
242
|
+
title: string;
|
|
243
|
+
required: boolean;
|
|
244
|
+
description: null;
|
|
245
|
+
nullable: boolean;
|
|
246
|
+
format: string;
|
|
247
|
+
max_length: null;
|
|
248
|
+
choices: null;
|
|
249
|
+
default: {};
|
|
250
|
+
validators: never[];
|
|
251
|
+
max_digits: null;
|
|
252
|
+
decimal_places: null;
|
|
253
|
+
read_only: boolean;
|
|
254
|
+
ref: null;
|
|
255
|
+
};
|
|
256
|
+
};
|
|
257
|
+
relationships: {};
|
|
258
|
+
default_ordering: null;
|
|
259
|
+
definitions: {
|
|
260
|
+
MoneyField: {
|
|
261
|
+
type: string;
|
|
262
|
+
properties: {
|
|
263
|
+
amount: {
|
|
264
|
+
type: string;
|
|
265
|
+
};
|
|
266
|
+
currency: {
|
|
267
|
+
type: string;
|
|
268
|
+
};
|
|
269
|
+
};
|
|
270
|
+
};
|
|
271
|
+
};
|
|
272
|
+
datetime_format: string;
|
|
273
|
+
date_format: string;
|
|
274
|
+
time_format: string;
|
|
275
|
+
display: null;
|
|
276
|
+
};
|
|
277
|
+
static relationshipFields: Map<any, any>;
|
|
278
|
+
constructor(data: any);
|
|
279
|
+
/**
|
|
280
|
+
* Define property getters and setters for all model fields
|
|
281
|
+
* @private
|
|
282
|
+
*/
|
|
283
|
+
private _defineProperties;
|
|
284
|
+
}
|
|
@@ -0,0 +1,69 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* This file was auto-generated. Do not make direct changes to the file.
|
|
3
|
+
*/
|
|
4
|
+
import { Model, Manager, QuerySet, getModelClass } from '../../../../src';
|
|
5
|
+
import { wrapReactiveModel } from '../../../../src';
|
|
6
|
+
import schemaData from './author.schema.json';
|
|
7
|
+
/**
|
|
8
|
+
* Model-specific QuerySet implementation
|
|
9
|
+
*/
|
|
10
|
+
export class AuthorQuerySet extends QuerySet {
|
|
11
|
+
}
|
|
12
|
+
/**
|
|
13
|
+
* Model-specific Manager implementation
|
|
14
|
+
*/
|
|
15
|
+
export class AuthorManager extends Manager {
|
|
16
|
+
constructor(ModelClass) {
|
|
17
|
+
super(ModelClass, AuthorQuerySet);
|
|
18
|
+
}
|
|
19
|
+
newQuerySet() {
|
|
20
|
+
return new AuthorQuerySet(this.ModelClass);
|
|
21
|
+
}
|
|
22
|
+
}
|
|
23
|
+
/**
|
|
24
|
+
* Implementation of the Author model
|
|
25
|
+
*/
|
|
26
|
+
export class Author extends Model {
|
|
27
|
+
constructor(data) {
|
|
28
|
+
Author.validateFields(data);
|
|
29
|
+
super(data);
|
|
30
|
+
// Define getters and setters for all fields
|
|
31
|
+
this._defineProperties();
|
|
32
|
+
return wrapReactiveModel(this);
|
|
33
|
+
}
|
|
34
|
+
/**
|
|
35
|
+
* Define property getters and setters for all model fields
|
|
36
|
+
* @private
|
|
37
|
+
*/
|
|
38
|
+
_defineProperties() {
|
|
39
|
+
// For each field, define a property that gets/sets from internal storage
|
|
40
|
+
Author.fields.forEach(field => {
|
|
41
|
+
Object.defineProperty(this, field, {
|
|
42
|
+
get: function () {
|
|
43
|
+
return this.getField(field);
|
|
44
|
+
},
|
|
45
|
+
set: function (value) {
|
|
46
|
+
this.setField(field, value);
|
|
47
|
+
},
|
|
48
|
+
enumerable: true, // Make sure fields are enumerable for serialization
|
|
49
|
+
configurable: true
|
|
50
|
+
});
|
|
51
|
+
});
|
|
52
|
+
// Add a special read-only getter for the repr field
|
|
53
|
+
Object.defineProperty(this, 'repr', {
|
|
54
|
+
get: function () {
|
|
55
|
+
return this.getField('repr');
|
|
56
|
+
},
|
|
57
|
+
enumerable: true, // Make sure repr is enumerable
|
|
58
|
+
configurable: true
|
|
59
|
+
});
|
|
60
|
+
}
|
|
61
|
+
}
|
|
62
|
+
// Bind this model to its backend
|
|
63
|
+
Author.configKey = 'backend1';
|
|
64
|
+
Author.modelName = 'django_app.author';
|
|
65
|
+
Author.primaryKeyField = 'id';
|
|
66
|
+
Author.objects = new AuthorManager(Author);
|
|
67
|
+
Author.fields = ['id', 'name', 'bio', 'age', 'rating', 'salary', 'is_active', 'birth_date', 'created_at', 'email', 'website', 'slug', 'uuid', 'metadata'];
|
|
68
|
+
Author.schema = schemaData;
|
|
69
|
+
Author.relationshipFields = new Map([]);
|
|
@@ -0,0 +1,281 @@
|
|
|
1
|
+
{
|
|
2
|
+
"model_name": "django_app.author",
|
|
3
|
+
"title": "Author",
|
|
4
|
+
"class_name": "Author",
|
|
5
|
+
"plural_title": "Authors",
|
|
6
|
+
"primary_key_field": "id",
|
|
7
|
+
"filterable_fields": [
|
|
8
|
+
"metadata",
|
|
9
|
+
"rating",
|
|
10
|
+
"name",
|
|
11
|
+
"created_at",
|
|
12
|
+
"salary",
|
|
13
|
+
"email",
|
|
14
|
+
"slug",
|
|
15
|
+
"bio",
|
|
16
|
+
"website",
|
|
17
|
+
"uuid",
|
|
18
|
+
"age",
|
|
19
|
+
"id",
|
|
20
|
+
"is_active",
|
|
21
|
+
"birth_date"
|
|
22
|
+
],
|
|
23
|
+
"searchable_fields": [
|
|
24
|
+
"bio",
|
|
25
|
+
"name",
|
|
26
|
+
"email"
|
|
27
|
+
],
|
|
28
|
+
"ordering_fields": [
|
|
29
|
+
"rating",
|
|
30
|
+
"name",
|
|
31
|
+
"created_at",
|
|
32
|
+
"salary",
|
|
33
|
+
"age",
|
|
34
|
+
"birth_date"
|
|
35
|
+
],
|
|
36
|
+
"properties": {
|
|
37
|
+
"id": {
|
|
38
|
+
"type": "integer",
|
|
39
|
+
"title": "Id",
|
|
40
|
+
"required": true,
|
|
41
|
+
"description": null,
|
|
42
|
+
"nullable": false,
|
|
43
|
+
"format": "id",
|
|
44
|
+
"max_length": null,
|
|
45
|
+
"choices": null,
|
|
46
|
+
"default": null,
|
|
47
|
+
"validators": [],
|
|
48
|
+
"max_digits": null,
|
|
49
|
+
"decimal_places": null,
|
|
50
|
+
"read_only": true,
|
|
51
|
+
"ref": null
|
|
52
|
+
},
|
|
53
|
+
"name": {
|
|
54
|
+
"type": "string",
|
|
55
|
+
"title": "Name",
|
|
56
|
+
"required": true,
|
|
57
|
+
"description": null,
|
|
58
|
+
"nullable": false,
|
|
59
|
+
"format": null,
|
|
60
|
+
"max_length": 100,
|
|
61
|
+
"choices": null,
|
|
62
|
+
"default": null,
|
|
63
|
+
"validators": [],
|
|
64
|
+
"max_digits": null,
|
|
65
|
+
"decimal_places": null,
|
|
66
|
+
"read_only": false,
|
|
67
|
+
"ref": null
|
|
68
|
+
},
|
|
69
|
+
"bio": {
|
|
70
|
+
"type": "string",
|
|
71
|
+
"title": "Bio",
|
|
72
|
+
"required": false,
|
|
73
|
+
"description": null,
|
|
74
|
+
"nullable": false,
|
|
75
|
+
"format": "text",
|
|
76
|
+
"max_length": null,
|
|
77
|
+
"choices": null,
|
|
78
|
+
"default": "",
|
|
79
|
+
"validators": [],
|
|
80
|
+
"max_digits": null,
|
|
81
|
+
"decimal_places": null,
|
|
82
|
+
"read_only": false,
|
|
83
|
+
"ref": null
|
|
84
|
+
},
|
|
85
|
+
"age": {
|
|
86
|
+
"type": "integer",
|
|
87
|
+
"title": "Age",
|
|
88
|
+
"required": false,
|
|
89
|
+
"description": null,
|
|
90
|
+
"nullable": true,
|
|
91
|
+
"format": null,
|
|
92
|
+
"max_length": null,
|
|
93
|
+
"choices": null,
|
|
94
|
+
"default": null,
|
|
95
|
+
"validators": [],
|
|
96
|
+
"max_digits": null,
|
|
97
|
+
"decimal_places": null,
|
|
98
|
+
"read_only": false,
|
|
99
|
+
"ref": null
|
|
100
|
+
},
|
|
101
|
+
"rating": {
|
|
102
|
+
"type": "object",
|
|
103
|
+
"title": "Rating",
|
|
104
|
+
"required": false,
|
|
105
|
+
"description": null,
|
|
106
|
+
"nullable": false,
|
|
107
|
+
"format": null,
|
|
108
|
+
"max_length": null,
|
|
109
|
+
"choices": null,
|
|
110
|
+
"default": 0,
|
|
111
|
+
"validators": [],
|
|
112
|
+
"max_digits": null,
|
|
113
|
+
"decimal_places": null,
|
|
114
|
+
"read_only": false,
|
|
115
|
+
"ref": null
|
|
116
|
+
},
|
|
117
|
+
"salary": {
|
|
118
|
+
"type": "number",
|
|
119
|
+
"title": "Salary",
|
|
120
|
+
"required": false,
|
|
121
|
+
"description": null,
|
|
122
|
+
"nullable": true,
|
|
123
|
+
"format": "decimal",
|
|
124
|
+
"max_length": null,
|
|
125
|
+
"choices": null,
|
|
126
|
+
"default": null,
|
|
127
|
+
"validators": [],
|
|
128
|
+
"max_digits": 10,
|
|
129
|
+
"decimal_places": 2,
|
|
130
|
+
"read_only": false,
|
|
131
|
+
"ref": null
|
|
132
|
+
},
|
|
133
|
+
"is_active": {
|
|
134
|
+
"type": "boolean",
|
|
135
|
+
"title": "Is active",
|
|
136
|
+
"required": false,
|
|
137
|
+
"description": null,
|
|
138
|
+
"nullable": false,
|
|
139
|
+
"format": null,
|
|
140
|
+
"max_length": null,
|
|
141
|
+
"choices": null,
|
|
142
|
+
"default": true,
|
|
143
|
+
"validators": [],
|
|
144
|
+
"max_digits": null,
|
|
145
|
+
"decimal_places": null,
|
|
146
|
+
"read_only": false,
|
|
147
|
+
"ref": null
|
|
148
|
+
},
|
|
149
|
+
"birth_date": {
|
|
150
|
+
"type": "string",
|
|
151
|
+
"title": "Birth date",
|
|
152
|
+
"required": false,
|
|
153
|
+
"description": null,
|
|
154
|
+
"nullable": true,
|
|
155
|
+
"format": "date",
|
|
156
|
+
"max_length": null,
|
|
157
|
+
"choices": null,
|
|
158
|
+
"default": null,
|
|
159
|
+
"validators": [],
|
|
160
|
+
"max_digits": null,
|
|
161
|
+
"decimal_places": null,
|
|
162
|
+
"read_only": false,
|
|
163
|
+
"ref": null
|
|
164
|
+
},
|
|
165
|
+
"created_at": {
|
|
166
|
+
"type": "string",
|
|
167
|
+
"title": "Created at",
|
|
168
|
+
"required": false,
|
|
169
|
+
"description": null,
|
|
170
|
+
"nullable": true,
|
|
171
|
+
"format": "date-time",
|
|
172
|
+
"max_length": null,
|
|
173
|
+
"choices": null,
|
|
174
|
+
"default": null,
|
|
175
|
+
"validators": [],
|
|
176
|
+
"max_digits": null,
|
|
177
|
+
"decimal_places": null,
|
|
178
|
+
"read_only": false,
|
|
179
|
+
"ref": null
|
|
180
|
+
},
|
|
181
|
+
"email": {
|
|
182
|
+
"type": "string",
|
|
183
|
+
"title": "Email",
|
|
184
|
+
"required": false,
|
|
185
|
+
"description": null,
|
|
186
|
+
"nullable": false,
|
|
187
|
+
"format": null,
|
|
188
|
+
"max_length": 254,
|
|
189
|
+
"choices": null,
|
|
190
|
+
"default": "",
|
|
191
|
+
"validators": [],
|
|
192
|
+
"max_digits": null,
|
|
193
|
+
"decimal_places": null,
|
|
194
|
+
"read_only": false,
|
|
195
|
+
"ref": null
|
|
196
|
+
},
|
|
197
|
+
"website": {
|
|
198
|
+
"type": "string",
|
|
199
|
+
"title": "Website",
|
|
200
|
+
"required": false,
|
|
201
|
+
"description": null,
|
|
202
|
+
"nullable": false,
|
|
203
|
+
"format": null,
|
|
204
|
+
"max_length": 200,
|
|
205
|
+
"choices": null,
|
|
206
|
+
"default": "",
|
|
207
|
+
"validators": [],
|
|
208
|
+
"max_digits": null,
|
|
209
|
+
"decimal_places": null,
|
|
210
|
+
"read_only": false,
|
|
211
|
+
"ref": null
|
|
212
|
+
},
|
|
213
|
+
"slug": {
|
|
214
|
+
"type": "string",
|
|
215
|
+
"title": "Slug",
|
|
216
|
+
"required": false,
|
|
217
|
+
"description": null,
|
|
218
|
+
"nullable": false,
|
|
219
|
+
"format": null,
|
|
220
|
+
"max_length": 50,
|
|
221
|
+
"choices": null,
|
|
222
|
+
"default": "",
|
|
223
|
+
"validators": [],
|
|
224
|
+
"max_digits": null,
|
|
225
|
+
"decimal_places": null,
|
|
226
|
+
"read_only": false,
|
|
227
|
+
"ref": null
|
|
228
|
+
},
|
|
229
|
+
"uuid": {
|
|
230
|
+
"type": "object",
|
|
231
|
+
"title": "Uuid",
|
|
232
|
+
"required": false,
|
|
233
|
+
"description": null,
|
|
234
|
+
"nullable": false,
|
|
235
|
+
"format": null,
|
|
236
|
+
"max_length": 32,
|
|
237
|
+
"choices": null,
|
|
238
|
+
"default": "5782fd03-d9b2-4d2c-9d50-e46a4beca539",
|
|
239
|
+
"validators": [],
|
|
240
|
+
"max_digits": null,
|
|
241
|
+
"decimal_places": null,
|
|
242
|
+
"read_only": false,
|
|
243
|
+
"ref": null
|
|
244
|
+
},
|
|
245
|
+
"metadata": {
|
|
246
|
+
"type": "object",
|
|
247
|
+
"title": "Metadata",
|
|
248
|
+
"required": false,
|
|
249
|
+
"description": null,
|
|
250
|
+
"nullable": false,
|
|
251
|
+
"format": "json",
|
|
252
|
+
"max_length": null,
|
|
253
|
+
"choices": null,
|
|
254
|
+
"default": {},
|
|
255
|
+
"validators": [],
|
|
256
|
+
"max_digits": null,
|
|
257
|
+
"decimal_places": null,
|
|
258
|
+
"read_only": false,
|
|
259
|
+
"ref": null
|
|
260
|
+
}
|
|
261
|
+
},
|
|
262
|
+
"relationships": {},
|
|
263
|
+
"default_ordering": null,
|
|
264
|
+
"definitions": {
|
|
265
|
+
"MoneyField": {
|
|
266
|
+
"type": "object",
|
|
267
|
+
"properties": {
|
|
268
|
+
"amount": {
|
|
269
|
+
"type": "number"
|
|
270
|
+
},
|
|
271
|
+
"currency": {
|
|
272
|
+
"type": "string"
|
|
273
|
+
}
|
|
274
|
+
}
|
|
275
|
+
}
|
|
276
|
+
},
|
|
277
|
+
"datetime_format": "iso-8601",
|
|
278
|
+
"date_format": "iso-8601",
|
|
279
|
+
"time_format": "iso-8601",
|
|
280
|
+
"display": null
|
|
281
|
+
}
|