@statezero/core 0.2.51 → 0.2.53
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 +586 -559
- package/dist/adaptors/vue/composables.d.ts +1 -1
- package/dist/adaptors/vue/composables.js +8 -2
- package/dist/adaptors/vue/reactivity.d.ts +1 -0
- package/dist/adaptors/vue/reactivity.js +20 -8
- package/dist/cli/commands/syncActions.js +33 -1
- package/dist/cli/commands/syncModels.js +44 -3
- package/dist/filtering/localFiltering.js +3 -2
- 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/cache/cache.d.ts +1 -1
- package/dist/syncEngine/cache/cache.js +8 -1
- package/dist/syncEngine/registries/metricRegistry.d.ts +14 -3
- package/dist/syncEngine/registries/metricRegistry.js +20 -6
- package/dist/syncEngine/stores/operationEventHandlers.js +10 -8
- package/dist/syncEngine/stores/querysetStore.js +27 -6
- package/package.json +1 -1
|
@@ -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 './excludeditem.schema.json';
|
|
7
|
+
/**
|
|
8
|
+
* Model-specific QuerySet implementation
|
|
9
|
+
*/
|
|
10
|
+
export class ExcludedItemQuerySet extends QuerySet {
|
|
11
|
+
}
|
|
12
|
+
/**
|
|
13
|
+
* Model-specific Manager implementation
|
|
14
|
+
*/
|
|
15
|
+
export class ExcludedItemManager extends Manager {
|
|
16
|
+
constructor(ModelClass) {
|
|
17
|
+
super(ModelClass, ExcludedItemQuerySet);
|
|
18
|
+
}
|
|
19
|
+
newQuerySet() {
|
|
20
|
+
return new ExcludedItemQuerySet(this.ModelClass);
|
|
21
|
+
}
|
|
22
|
+
}
|
|
23
|
+
/**
|
|
24
|
+
* Implementation of the ExcludedItem model
|
|
25
|
+
*/
|
|
26
|
+
export class ExcludedItem extends Model {
|
|
27
|
+
constructor(data) {
|
|
28
|
+
ExcludedItem.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
|
+
ExcludedItem.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
|
+
ExcludedItem.configKey = 'backend1';
|
|
64
|
+
ExcludedItem.modelName = 'django_app.excludeditem';
|
|
65
|
+
ExcludedItem.primaryKeyField = 'id';
|
|
66
|
+
ExcludedItem.objects = new ExcludedItemManager(ExcludedItem);
|
|
67
|
+
ExcludedItem.fields = ['id', 'name', 'value', 'secret'];
|
|
68
|
+
ExcludedItem.schema = schemaData;
|
|
69
|
+
ExcludedItem.relationshipFields = new Map([]);
|
|
@@ -0,0 +1,105 @@
|
|
|
1
|
+
{
|
|
2
|
+
"model_name": "django_app.excludeditem",
|
|
3
|
+
"title": "Excluded Item",
|
|
4
|
+
"class_name": "ExcludedItem",
|
|
5
|
+
"plural_title": "Excluded Items",
|
|
6
|
+
"primary_key_field": "id",
|
|
7
|
+
"filterable_fields": [
|
|
8
|
+
"value",
|
|
9
|
+
"secret",
|
|
10
|
+
"id",
|
|
11
|
+
"name"
|
|
12
|
+
],
|
|
13
|
+
"searchable_fields": [
|
|
14
|
+
"name"
|
|
15
|
+
],
|
|
16
|
+
"ordering_fields": [
|
|
17
|
+
"value",
|
|
18
|
+
"name"
|
|
19
|
+
],
|
|
20
|
+
"properties": {
|
|
21
|
+
"id": {
|
|
22
|
+
"type": "integer",
|
|
23
|
+
"title": "Id",
|
|
24
|
+
"required": true,
|
|
25
|
+
"description": null,
|
|
26
|
+
"nullable": false,
|
|
27
|
+
"format": "id",
|
|
28
|
+
"max_length": null,
|
|
29
|
+
"choices": null,
|
|
30
|
+
"default": null,
|
|
31
|
+
"validators": [],
|
|
32
|
+
"max_digits": null,
|
|
33
|
+
"decimal_places": null,
|
|
34
|
+
"read_only": true,
|
|
35
|
+
"ref": null
|
|
36
|
+
},
|
|
37
|
+
"name": {
|
|
38
|
+
"type": "string",
|
|
39
|
+
"title": "Name",
|
|
40
|
+
"required": true,
|
|
41
|
+
"description": null,
|
|
42
|
+
"nullable": false,
|
|
43
|
+
"format": null,
|
|
44
|
+
"max_length": 100,
|
|
45
|
+
"choices": null,
|
|
46
|
+
"default": null,
|
|
47
|
+
"validators": [],
|
|
48
|
+
"max_digits": null,
|
|
49
|
+
"decimal_places": null,
|
|
50
|
+
"read_only": false,
|
|
51
|
+
"ref": null
|
|
52
|
+
},
|
|
53
|
+
"value": {
|
|
54
|
+
"type": "integer",
|
|
55
|
+
"title": "Value",
|
|
56
|
+
"required": false,
|
|
57
|
+
"description": null,
|
|
58
|
+
"nullable": false,
|
|
59
|
+
"format": null,
|
|
60
|
+
"max_length": null,
|
|
61
|
+
"choices": null,
|
|
62
|
+
"default": 0,
|
|
63
|
+
"validators": [],
|
|
64
|
+
"max_digits": null,
|
|
65
|
+
"decimal_places": null,
|
|
66
|
+
"read_only": false,
|
|
67
|
+
"ref": null
|
|
68
|
+
},
|
|
69
|
+
"secret": {
|
|
70
|
+
"type": "string",
|
|
71
|
+
"title": "Secret",
|
|
72
|
+
"required": false,
|
|
73
|
+
"description": null,
|
|
74
|
+
"nullable": false,
|
|
75
|
+
"format": null,
|
|
76
|
+
"max_length": 100,
|
|
77
|
+
"choices": null,
|
|
78
|
+
"default": "",
|
|
79
|
+
"validators": [],
|
|
80
|
+
"max_digits": null,
|
|
81
|
+
"decimal_places": null,
|
|
82
|
+
"read_only": false,
|
|
83
|
+
"ref": null
|
|
84
|
+
}
|
|
85
|
+
},
|
|
86
|
+
"relationships": {},
|
|
87
|
+
"default_ordering": null,
|
|
88
|
+
"definitions": {
|
|
89
|
+
"MoneyField": {
|
|
90
|
+
"type": "object",
|
|
91
|
+
"properties": {
|
|
92
|
+
"amount": {
|
|
93
|
+
"type": "number"
|
|
94
|
+
},
|
|
95
|
+
"currency": {
|
|
96
|
+
"type": "string"
|
|
97
|
+
}
|
|
98
|
+
}
|
|
99
|
+
}
|
|
100
|
+
},
|
|
101
|
+
"datetime_format": "iso-8601",
|
|
102
|
+
"date_format": "iso-8601",
|
|
103
|
+
"time_format": "iso-8601",
|
|
104
|
+
"display": null
|
|
105
|
+
}
|
|
@@ -0,0 +1,118 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Model-specific QuerySet implementation
|
|
3
|
+
*/
|
|
4
|
+
export class HFChildQuerySet {
|
|
5
|
+
}
|
|
6
|
+
/**
|
|
7
|
+
* Model-specific Manager implementation
|
|
8
|
+
*/
|
|
9
|
+
export class HFChildManager {
|
|
10
|
+
constructor(ModelClass: any);
|
|
11
|
+
newQuerySet(): HFChildQuerySet;
|
|
12
|
+
}
|
|
13
|
+
/**
|
|
14
|
+
* Implementation of the HFChild model
|
|
15
|
+
*/
|
|
16
|
+
export class HFChild {
|
|
17
|
+
static configKey: string;
|
|
18
|
+
static modelName: string;
|
|
19
|
+
static primaryKeyField: string;
|
|
20
|
+
static objects: HFChildManager;
|
|
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
|
+
parent: {
|
|
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: null;
|
|
74
|
+
validators: never[];
|
|
75
|
+
max_digits: null;
|
|
76
|
+
decimal_places: null;
|
|
77
|
+
read_only: boolean;
|
|
78
|
+
ref: null;
|
|
79
|
+
};
|
|
80
|
+
};
|
|
81
|
+
relationships: {
|
|
82
|
+
parent: {
|
|
83
|
+
type: string;
|
|
84
|
+
model: string;
|
|
85
|
+
class_name: string;
|
|
86
|
+
primary_key_field: string;
|
|
87
|
+
};
|
|
88
|
+
};
|
|
89
|
+
default_ordering: null;
|
|
90
|
+
definitions: {
|
|
91
|
+
MoneyField: {
|
|
92
|
+
type: string;
|
|
93
|
+
properties: {
|
|
94
|
+
amount: {
|
|
95
|
+
type: string;
|
|
96
|
+
};
|
|
97
|
+
currency: {
|
|
98
|
+
type: string;
|
|
99
|
+
};
|
|
100
|
+
};
|
|
101
|
+
};
|
|
102
|
+
};
|
|
103
|
+
datetime_format: string;
|
|
104
|
+
date_format: string;
|
|
105
|
+
time_format: string;
|
|
106
|
+
display: null;
|
|
107
|
+
};
|
|
108
|
+
static relationshipFields: Map<string, {
|
|
109
|
+
ModelClass: () => any;
|
|
110
|
+
relationshipType: string;
|
|
111
|
+
}>;
|
|
112
|
+
constructor(data: any);
|
|
113
|
+
/**
|
|
114
|
+
* Define property getters and setters for all model fields
|
|
115
|
+
* @private
|
|
116
|
+
*/
|
|
117
|
+
private _defineProperties;
|
|
118
|
+
}
|
|
@@ -0,0 +1,71 @@
|
|
|
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 './hfchild.schema.json';
|
|
7
|
+
/**
|
|
8
|
+
* Model-specific QuerySet implementation
|
|
9
|
+
*/
|
|
10
|
+
export class HFChildQuerySet extends QuerySet {
|
|
11
|
+
}
|
|
12
|
+
/**
|
|
13
|
+
* Model-specific Manager implementation
|
|
14
|
+
*/
|
|
15
|
+
export class HFChildManager extends Manager {
|
|
16
|
+
constructor(ModelClass) {
|
|
17
|
+
super(ModelClass, HFChildQuerySet);
|
|
18
|
+
}
|
|
19
|
+
newQuerySet() {
|
|
20
|
+
return new HFChildQuerySet(this.ModelClass);
|
|
21
|
+
}
|
|
22
|
+
}
|
|
23
|
+
/**
|
|
24
|
+
* Implementation of the HFChild model
|
|
25
|
+
*/
|
|
26
|
+
export class HFChild extends Model {
|
|
27
|
+
constructor(data) {
|
|
28
|
+
HFChild.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
|
+
HFChild.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
|
+
HFChild.configKey = 'backend1';
|
|
64
|
+
HFChild.modelName = 'django_app.hfchild';
|
|
65
|
+
HFChild.primaryKeyField = 'id';
|
|
66
|
+
HFChild.objects = new HFChildManager(HFChild);
|
|
67
|
+
HFChild.fields = ['id', 'name', 'parent'];
|
|
68
|
+
HFChild.schema = schemaData;
|
|
69
|
+
HFChild.relationshipFields = new Map([
|
|
70
|
+
['parent', { 'ModelClass': () => getModelClass('django_app.hfparent', 'backend1'), 'relationshipType': 'foreign-key' }]
|
|
71
|
+
]);
|
|
@@ -0,0 +1,94 @@
|
|
|
1
|
+
{
|
|
2
|
+
"model_name": "django_app.hfchild",
|
|
3
|
+
"title": "Hf Child",
|
|
4
|
+
"class_name": "HFChild",
|
|
5
|
+
"plural_title": "Hf Childs",
|
|
6
|
+
"primary_key_field": "id",
|
|
7
|
+
"filterable_fields": [
|
|
8
|
+
"id",
|
|
9
|
+
"name",
|
|
10
|
+
"parent"
|
|
11
|
+
],
|
|
12
|
+
"searchable_fields": [
|
|
13
|
+
"name"
|
|
14
|
+
],
|
|
15
|
+
"ordering_fields": [
|
|
16
|
+
"name"
|
|
17
|
+
],
|
|
18
|
+
"properties": {
|
|
19
|
+
"id": {
|
|
20
|
+
"type": "integer",
|
|
21
|
+
"title": "Id",
|
|
22
|
+
"required": true,
|
|
23
|
+
"description": null,
|
|
24
|
+
"nullable": false,
|
|
25
|
+
"format": "id",
|
|
26
|
+
"max_length": null,
|
|
27
|
+
"choices": null,
|
|
28
|
+
"default": null,
|
|
29
|
+
"validators": [],
|
|
30
|
+
"max_digits": null,
|
|
31
|
+
"decimal_places": null,
|
|
32
|
+
"read_only": true,
|
|
33
|
+
"ref": null
|
|
34
|
+
},
|
|
35
|
+
"name": {
|
|
36
|
+
"type": "string",
|
|
37
|
+
"title": "Name",
|
|
38
|
+
"required": true,
|
|
39
|
+
"description": null,
|
|
40
|
+
"nullable": false,
|
|
41
|
+
"format": null,
|
|
42
|
+
"max_length": 100,
|
|
43
|
+
"choices": null,
|
|
44
|
+
"default": null,
|
|
45
|
+
"validators": [],
|
|
46
|
+
"max_digits": null,
|
|
47
|
+
"decimal_places": null,
|
|
48
|
+
"read_only": false,
|
|
49
|
+
"ref": null
|
|
50
|
+
},
|
|
51
|
+
"parent": {
|
|
52
|
+
"type": "integer",
|
|
53
|
+
"title": "Parent",
|
|
54
|
+
"required": true,
|
|
55
|
+
"description": null,
|
|
56
|
+
"nullable": false,
|
|
57
|
+
"format": "foreign-key",
|
|
58
|
+
"max_length": null,
|
|
59
|
+
"choices": null,
|
|
60
|
+
"default": null,
|
|
61
|
+
"validators": [],
|
|
62
|
+
"max_digits": null,
|
|
63
|
+
"decimal_places": null,
|
|
64
|
+
"read_only": false,
|
|
65
|
+
"ref": null
|
|
66
|
+
}
|
|
67
|
+
},
|
|
68
|
+
"relationships": {
|
|
69
|
+
"parent": {
|
|
70
|
+
"type": "foreign-key",
|
|
71
|
+
"model": "django_app.hfparent",
|
|
72
|
+
"class_name": "HFParent",
|
|
73
|
+
"primary_key_field": "id"
|
|
74
|
+
}
|
|
75
|
+
},
|
|
76
|
+
"default_ordering": null,
|
|
77
|
+
"definitions": {
|
|
78
|
+
"MoneyField": {
|
|
79
|
+
"type": "object",
|
|
80
|
+
"properties": {
|
|
81
|
+
"amount": {
|
|
82
|
+
"type": "number"
|
|
83
|
+
},
|
|
84
|
+
"currency": {
|
|
85
|
+
"type": "string"
|
|
86
|
+
}
|
|
87
|
+
}
|
|
88
|
+
}
|
|
89
|
+
},
|
|
90
|
+
"datetime_format": "iso-8601",
|
|
91
|
+
"date_format": "iso-8601",
|
|
92
|
+
"time_format": "iso-8601",
|
|
93
|
+
"display": null
|
|
94
|
+
}
|
|
@@ -0,0 +1,124 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Model-specific QuerySet implementation
|
|
3
|
+
*/
|
|
4
|
+
export class HFParentQuerySet {
|
|
5
|
+
}
|
|
6
|
+
/**
|
|
7
|
+
* Model-specific Manager implementation
|
|
8
|
+
*/
|
|
9
|
+
export class HFParentManager {
|
|
10
|
+
constructor(ModelClass: any);
|
|
11
|
+
newQuerySet(): HFParentQuerySet;
|
|
12
|
+
}
|
|
13
|
+
/**
|
|
14
|
+
* Implementation of the HFParent model
|
|
15
|
+
*/
|
|
16
|
+
export class HFParent {
|
|
17
|
+
static configKey: string;
|
|
18
|
+
static modelName: string;
|
|
19
|
+
static primaryKeyField: string;
|
|
20
|
+
static objects: HFParentManager;
|
|
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
|
+
value: {
|
|
65
|
+
type: string;
|
|
66
|
+
title: string;
|
|
67
|
+
required: boolean;
|
|
68
|
+
description: null;
|
|
69
|
+
nullable: boolean;
|
|
70
|
+
format: null;
|
|
71
|
+
max_length: null;
|
|
72
|
+
choices: null;
|
|
73
|
+
default: number;
|
|
74
|
+
validators: never[];
|
|
75
|
+
max_digits: null;
|
|
76
|
+
decimal_places: null;
|
|
77
|
+
read_only: boolean;
|
|
78
|
+
ref: null;
|
|
79
|
+
};
|
|
80
|
+
secret: {
|
|
81
|
+
type: string;
|
|
82
|
+
title: string;
|
|
83
|
+
required: boolean;
|
|
84
|
+
description: null;
|
|
85
|
+
nullable: boolean;
|
|
86
|
+
format: null;
|
|
87
|
+
max_length: number;
|
|
88
|
+
choices: null;
|
|
89
|
+
default: string;
|
|
90
|
+
validators: never[];
|
|
91
|
+
max_digits: null;
|
|
92
|
+
decimal_places: null;
|
|
93
|
+
read_only: boolean;
|
|
94
|
+
ref: null;
|
|
95
|
+
};
|
|
96
|
+
};
|
|
97
|
+
relationships: {};
|
|
98
|
+
default_ordering: null;
|
|
99
|
+
definitions: {
|
|
100
|
+
MoneyField: {
|
|
101
|
+
type: string;
|
|
102
|
+
properties: {
|
|
103
|
+
amount: {
|
|
104
|
+
type: string;
|
|
105
|
+
};
|
|
106
|
+
currency: {
|
|
107
|
+
type: string;
|
|
108
|
+
};
|
|
109
|
+
};
|
|
110
|
+
};
|
|
111
|
+
};
|
|
112
|
+
datetime_format: string;
|
|
113
|
+
date_format: string;
|
|
114
|
+
time_format: string;
|
|
115
|
+
display: null;
|
|
116
|
+
};
|
|
117
|
+
static relationshipFields: Map<any, any>;
|
|
118
|
+
constructor(data: any);
|
|
119
|
+
/**
|
|
120
|
+
* Define property getters and setters for all model fields
|
|
121
|
+
* @private
|
|
122
|
+
*/
|
|
123
|
+
private _defineProperties;
|
|
124
|
+
}
|
|
@@ -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 './hfparent.schema.json';
|
|
7
|
+
/**
|
|
8
|
+
* Model-specific QuerySet implementation
|
|
9
|
+
*/
|
|
10
|
+
export class HFParentQuerySet extends QuerySet {
|
|
11
|
+
}
|
|
12
|
+
/**
|
|
13
|
+
* Model-specific Manager implementation
|
|
14
|
+
*/
|
|
15
|
+
export class HFParentManager extends Manager {
|
|
16
|
+
constructor(ModelClass) {
|
|
17
|
+
super(ModelClass, HFParentQuerySet);
|
|
18
|
+
}
|
|
19
|
+
newQuerySet() {
|
|
20
|
+
return new HFParentQuerySet(this.ModelClass);
|
|
21
|
+
}
|
|
22
|
+
}
|
|
23
|
+
/**
|
|
24
|
+
* Implementation of the HFParent model
|
|
25
|
+
*/
|
|
26
|
+
export class HFParent extends Model {
|
|
27
|
+
constructor(data) {
|
|
28
|
+
HFParent.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
|
+
HFParent.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
|
+
HFParent.configKey = 'backend1';
|
|
64
|
+
HFParent.modelName = 'django_app.hfparent';
|
|
65
|
+
HFParent.primaryKeyField = 'id';
|
|
66
|
+
HFParent.objects = new HFParentManager(HFParent);
|
|
67
|
+
HFParent.fields = ['id', 'name', 'value', 'secret'];
|
|
68
|
+
HFParent.schema = schemaData;
|
|
69
|
+
HFParent.relationshipFields = new Map([]);
|