@statezero/core 0.2.16 → 0.2.18
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/LICENSE +116 -116
- package/dist/adaptors/vue/composables.js +4 -4
- package/dist/cli/commands/syncActions.js +189 -189
- package/dist/cli/commands/syncModels.js +391 -391
- package/dist/core/eventReceivers.d.ts +1 -2
- package/dist/core/eventReceivers.js +16 -16
- package/dist/filtering/localFiltering.js +2 -1
- package/dist/flavours/django/f.js +1 -1
- package/dist/flavours/django/model.js +1 -1
- package/dist/flavours/django/operationFactory.d.ts +1 -1
- package/dist/flavours/django/operationFactory.js +1 -1
- package/dist/syncEngine/metrics/metricOptCalcs.js +1 -1
- package/dist/syncEngine/registries/metricRegistry.d.ts +1 -1
- package/dist/syncEngine/registries/metricRegistry.js +3 -3
- package/dist/syncEngine/stores/metricStore.d.ts +1 -1
- package/dist/syncEngine/stores/metricStore.js +1 -1
- package/dist/syncEngine/stores/operation.d.ts +1 -1
- package/dist/syncEngine/stores/operation.js +1 -1
- package/dist/syncEngine/stores/reactivity.d.ts +3 -3
- package/dist/syncEngine/stores/utils.js +1 -1
- package/dist/syncEngine/sync.d.ts +2 -1
- package/dist/syncEngine/sync.js +10 -9
- package/package.json +128 -126
- package/readme.md +210 -210
- package/dist/actions/backend1/django_app/calculate-hash.d.ts +0 -57
- package/dist/actions/backend1/django_app/calculate-hash.js +0 -80
- package/dist/actions/backend1/django_app/get-current-username.d.ts +0 -29
- package/dist/actions/backend1/django_app/get-current-username.js +0 -65
- package/dist/actions/backend1/django_app/get-server-status.d.ts +0 -38
- package/dist/actions/backend1/django_app/get-server-status.js +0 -68
- package/dist/actions/backend1/django_app/get-user-info.d.ts +0 -44
- package/dist/actions/backend1/django_app/get-user-info.js +0 -70
- package/dist/actions/backend1/django_app/index.d.ts +0 -6
- package/dist/actions/backend1/django_app/index.js +0 -6
- package/dist/actions/backend1/django_app/process-data.d.ts +0 -51
- package/dist/actions/backend1/django_app/process-data.js +0 -78
- package/dist/actions/backend1/django_app/send-notification.d.ts +0 -55
- package/dist/actions/backend1/django_app/send-notification.js +0 -81
- package/dist/actions/backend1/index.d.ts +0 -1
- package/dist/actions/backend1/index.js +0 -1
- package/dist/actions/default/django_app/calculate-hash.d.ts +0 -57
- package/dist/actions/default/django_app/calculate-hash.js +0 -80
- package/dist/actions/default/django_app/get-current-username.d.ts +0 -29
- package/dist/actions/default/django_app/get-current-username.js +0 -65
- package/dist/actions/default/django_app/get-server-status.d.ts +0 -38
- package/dist/actions/default/django_app/get-server-status.js +0 -68
- package/dist/actions/default/django_app/get-user-info.d.ts +0 -44
- package/dist/actions/default/django_app/get-user-info.js +0 -70
- package/dist/actions/default/django_app/index.d.ts +0 -6
- package/dist/actions/default/django_app/index.js +0 -6
- package/dist/actions/default/django_app/process-data.d.ts +0 -51
- package/dist/actions/default/django_app/process-data.js +0 -78
- package/dist/actions/default/django_app/send-notification.d.ts +0 -55
- package/dist/actions/default/django_app/send-notification.js +0 -81
- package/dist/actions/default/index.d.ts +0 -1
- package/dist/actions/default/index.js +0 -1
- package/dist/actions/index.d.ts +0 -1
- package/dist/actions/index.js +0 -5
- package/dist/models/backend1/django_app/comprehensivemodel.d.ts +0 -47
- package/dist/models/backend1/django_app/comprehensivemodel.js +0 -71
- package/dist/models/backend1/django_app/custompkmodel.d.ts +0 -44
- package/dist/models/backend1/django_app/custompkmodel.js +0 -69
- package/dist/models/backend1/django_app/dailyrate.d.ts +0 -47
- package/dist/models/backend1/django_app/dailyrate.js +0 -71
- package/dist/models/backend1/django_app/deepmodellevel1.d.ts +0 -47
- package/dist/models/backend1/django_app/deepmodellevel1.js +0 -72
- package/dist/models/backend1/django_app/deepmodellevel2.d.ts +0 -47
- package/dist/models/backend1/django_app/deepmodellevel2.js +0 -71
- package/dist/models/backend1/django_app/deepmodellevel3.d.ts +0 -44
- package/dist/models/backend1/django_app/deepmodellevel3.js +0 -69
- package/dist/models/backend1/django_app/dummymodel.d.ts +0 -47
- package/dist/models/backend1/django_app/dummymodel.js +0 -71
- package/dist/models/backend1/django_app/dummyrelatedmodel.d.ts +0 -44
- package/dist/models/backend1/django_app/dummyrelatedmodel.js +0 -69
- package/dist/models/backend1/django_app/filetest.d.ts +0 -44
- package/dist/models/backend1/django_app/filetest.js +0 -69
- package/dist/models/backend1/django_app/index.d.ts +0 -16
- package/dist/models/backend1/django_app/index.js +0 -16
- package/dist/models/backend1/django_app/modelwithcustompkrelation.d.ts +0 -47
- package/dist/models/backend1/django_app/modelwithcustompkrelation.js +0 -71
- package/dist/models/backend1/django_app/namefiltercustompkmodel.d.ts +0 -44
- package/dist/models/backend1/django_app/namefiltercustompkmodel.js +0 -69
- package/dist/models/backend1/django_app/order.d.ts +0 -47
- package/dist/models/backend1/django_app/order.js +0 -71
- package/dist/models/backend1/django_app/orderitem.d.ts +0 -47
- package/dist/models/backend1/django_app/orderitem.js +0 -72
- package/dist/models/backend1/django_app/product.d.ts +0 -47
- package/dist/models/backend1/django_app/product.js +0 -71
- package/dist/models/backend1/django_app/productcategory.d.ts +0 -44
- package/dist/models/backend1/django_app/productcategory.js +0 -69
- package/dist/models/backend1/django_app/rateplan.d.ts +0 -44
- package/dist/models/backend1/django_app/rateplan.js +0 -69
- package/dist/models/backend1/fileobject.d.ts +0 -4
- package/dist/models/backend1/fileobject.js +0 -9
- package/dist/models/backend1/index.d.ts +0 -2
- package/dist/models/backend1/index.js +0 -2
- package/dist/models/default/django_app/comprehensivemodel.d.ts +0 -47
- package/dist/models/default/django_app/comprehensivemodel.js +0 -71
- package/dist/models/default/django_app/custompkmodel.d.ts +0 -44
- package/dist/models/default/django_app/custompkmodel.js +0 -69
- package/dist/models/default/django_app/dailyrate.d.ts +0 -47
- package/dist/models/default/django_app/dailyrate.js +0 -71
- package/dist/models/default/django_app/deepmodellevel1.d.ts +0 -47
- package/dist/models/default/django_app/deepmodellevel1.js +0 -72
- package/dist/models/default/django_app/deepmodellevel2.d.ts +0 -47
- package/dist/models/default/django_app/deepmodellevel2.js +0 -71
- package/dist/models/default/django_app/deepmodellevel3.d.ts +0 -44
- package/dist/models/default/django_app/deepmodellevel3.js +0 -69
- package/dist/models/default/django_app/dummymodel.d.ts +0 -47
- package/dist/models/default/django_app/dummymodel.js +0 -71
- package/dist/models/default/django_app/dummyrelatedmodel.d.ts +0 -44
- package/dist/models/default/django_app/dummyrelatedmodel.js +0 -69
- package/dist/models/default/django_app/filetest.d.ts +0 -44
- package/dist/models/default/django_app/filetest.js +0 -69
- package/dist/models/default/django_app/index.d.ts +0 -16
- package/dist/models/default/django_app/index.js +0 -16
- package/dist/models/default/django_app/modelwithcustompkrelation.d.ts +0 -47
- package/dist/models/default/django_app/modelwithcustompkrelation.js +0 -71
- package/dist/models/default/django_app/namefiltercustompkmodel.d.ts +0 -44
- package/dist/models/default/django_app/namefiltercustompkmodel.js +0 -69
- package/dist/models/default/django_app/order.d.ts +0 -47
- package/dist/models/default/django_app/order.js +0 -71
- package/dist/models/default/django_app/orderitem.d.ts +0 -47
- package/dist/models/default/django_app/orderitem.js +0 -72
- package/dist/models/default/django_app/product.d.ts +0 -47
- package/dist/models/default/django_app/product.js +0 -71
- package/dist/models/default/django_app/productcategory.d.ts +0 -44
- package/dist/models/default/django_app/productcategory.js +0 -69
- package/dist/models/default/django_app/rateplan.d.ts +0 -44
- package/dist/models/default/django_app/rateplan.js +0 -69
- package/dist/models/default/fileobject.d.ts +0 -4
- package/dist/models/default/fileobject.js +0 -9
- package/dist/models/default/index.d.ts +0 -2
- package/dist/models/default/index.js +0 -2
- package/dist/models/index.d.ts +0 -1
- package/dist/models/index.js +0 -5
|
@@ -1,71 +0,0 @@
|
|
|
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 './order.schema.json';
|
|
7
|
-
/**
|
|
8
|
-
* Model-specific QuerySet implementation
|
|
9
|
-
*/
|
|
10
|
-
export class OrderQuerySet extends QuerySet {
|
|
11
|
-
}
|
|
12
|
-
/**
|
|
13
|
-
* Model-specific Manager implementation
|
|
14
|
-
*/
|
|
15
|
-
export class OrderManager extends Manager {
|
|
16
|
-
constructor(ModelClass) {
|
|
17
|
-
super(ModelClass, OrderQuerySet);
|
|
18
|
-
}
|
|
19
|
-
newQuerySet() {
|
|
20
|
-
return new OrderQuerySet(this.ModelClass);
|
|
21
|
-
}
|
|
22
|
-
}
|
|
23
|
-
/**
|
|
24
|
-
* Implementation of the Order model
|
|
25
|
-
*/
|
|
26
|
-
export class Order extends Model {
|
|
27
|
-
constructor(data) {
|
|
28
|
-
Order.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
|
-
Order.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
|
-
Order.configKey = 'backend1';
|
|
64
|
-
Order.modelName = 'django_app.order';
|
|
65
|
-
Order.primaryKeyField = 'id';
|
|
66
|
-
Order.objects = new OrderManager(Order);
|
|
67
|
-
Order.fields = ['id', 'order_number', 'customer_name', 'customer_email', 'total', 'status', 'created_at', 'last_updated', 'items'];
|
|
68
|
-
Order.schema = schemaData;
|
|
69
|
-
Order.relationshipFields = new Map([
|
|
70
|
-
['items', { 'ModelClass': () => getModelClass('django_app.orderitem', 'backend1'), 'relationshipType': 'many-to-many' }]
|
|
71
|
-
]);
|
|
@@ -1,47 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Model-specific QuerySet implementation
|
|
3
|
-
*/
|
|
4
|
-
export class OrderItemQuerySet extends QuerySet<any> {
|
|
5
|
-
constructor(ModelClass: ModelConstructor, config?: {
|
|
6
|
-
nodes?: QueryNode[] | undefined;
|
|
7
|
-
orderBy?: {
|
|
8
|
-
field: string;
|
|
9
|
-
direction: "asc" | "desc";
|
|
10
|
-
}[] | undefined;
|
|
11
|
-
fields?: Set<string> | undefined;
|
|
12
|
-
aggregations?: Aggregation[] | undefined;
|
|
13
|
-
initialQueryset?: string | undefined;
|
|
14
|
-
serializerOptions?: SerializerOptions;
|
|
15
|
-
materialized?: boolean | undefined;
|
|
16
|
-
} | undefined, parent?: null);
|
|
17
|
-
}
|
|
18
|
-
/**
|
|
19
|
-
* Model-specific Manager implementation
|
|
20
|
-
*/
|
|
21
|
-
export class OrderItemManager extends Manager {
|
|
22
|
-
constructor(ModelClass: any);
|
|
23
|
-
}
|
|
24
|
-
/**
|
|
25
|
-
* Implementation of the OrderItem model
|
|
26
|
-
*/
|
|
27
|
-
export class OrderItem extends Model {
|
|
28
|
-
static configKey: string;
|
|
29
|
-
static modelName: string;
|
|
30
|
-
static primaryKeyField: string;
|
|
31
|
-
static objects: OrderItemManager;
|
|
32
|
-
static fields: string[];
|
|
33
|
-
static schema: any;
|
|
34
|
-
static relationshipFields: Map<string, {
|
|
35
|
-
ModelClass: () => Function | null;
|
|
36
|
-
relationshipType: string;
|
|
37
|
-
}>;
|
|
38
|
-
constructor(data: any);
|
|
39
|
-
/**
|
|
40
|
-
* Define property getters and setters for all model fields
|
|
41
|
-
* @private
|
|
42
|
-
*/
|
|
43
|
-
private _defineProperties;
|
|
44
|
-
}
|
|
45
|
-
import { QuerySet } from '../../../../src';
|
|
46
|
-
import { Manager } from '../../../../src';
|
|
47
|
-
import { Model } from '../../../../src';
|
|
@@ -1,72 +0,0 @@
|
|
|
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 './orderitem.schema.json';
|
|
7
|
-
/**
|
|
8
|
-
* Model-specific QuerySet implementation
|
|
9
|
-
*/
|
|
10
|
-
export class OrderItemQuerySet extends QuerySet {
|
|
11
|
-
}
|
|
12
|
-
/**
|
|
13
|
-
* Model-specific Manager implementation
|
|
14
|
-
*/
|
|
15
|
-
export class OrderItemManager extends Manager {
|
|
16
|
-
constructor(ModelClass) {
|
|
17
|
-
super(ModelClass, OrderItemQuerySet);
|
|
18
|
-
}
|
|
19
|
-
newQuerySet() {
|
|
20
|
-
return new OrderItemQuerySet(this.ModelClass);
|
|
21
|
-
}
|
|
22
|
-
}
|
|
23
|
-
/**
|
|
24
|
-
* Implementation of the OrderItem model
|
|
25
|
-
*/
|
|
26
|
-
export class OrderItem extends Model {
|
|
27
|
-
constructor(data) {
|
|
28
|
-
OrderItem.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
|
-
OrderItem.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
|
-
OrderItem.configKey = 'backend1';
|
|
64
|
-
OrderItem.modelName = 'django_app.orderitem';
|
|
65
|
-
OrderItem.primaryKeyField = 'id';
|
|
66
|
-
OrderItem.objects = new OrderItemManager(OrderItem);
|
|
67
|
-
OrderItem.fields = ['id', 'order', 'product', 'quantity', 'price', 'subtotal'];
|
|
68
|
-
OrderItem.schema = schemaData;
|
|
69
|
-
OrderItem.relationshipFields = new Map([
|
|
70
|
-
['order', { 'ModelClass': () => getModelClass('django_app.order', 'backend1'), 'relationshipType': 'foreign-key' }],
|
|
71
|
-
['product', { 'ModelClass': () => getModelClass('django_app.product', 'backend1'), 'relationshipType': 'foreign-key' }]
|
|
72
|
-
]);
|
|
@@ -1,47 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Model-specific QuerySet implementation
|
|
3
|
-
*/
|
|
4
|
-
export class ProductQuerySet extends QuerySet<any> {
|
|
5
|
-
constructor(ModelClass: ModelConstructor, config?: {
|
|
6
|
-
nodes?: QueryNode[] | undefined;
|
|
7
|
-
orderBy?: {
|
|
8
|
-
field: string;
|
|
9
|
-
direction: "asc" | "desc";
|
|
10
|
-
}[] | undefined;
|
|
11
|
-
fields?: Set<string> | undefined;
|
|
12
|
-
aggregations?: Aggregation[] | undefined;
|
|
13
|
-
initialQueryset?: string | undefined;
|
|
14
|
-
serializerOptions?: SerializerOptions;
|
|
15
|
-
materialized?: boolean | undefined;
|
|
16
|
-
} | undefined, parent?: null);
|
|
17
|
-
}
|
|
18
|
-
/**
|
|
19
|
-
* Model-specific Manager implementation
|
|
20
|
-
*/
|
|
21
|
-
export class ProductManager extends Manager {
|
|
22
|
-
constructor(ModelClass: any);
|
|
23
|
-
}
|
|
24
|
-
/**
|
|
25
|
-
* Implementation of the Product model
|
|
26
|
-
*/
|
|
27
|
-
export class Product extends Model {
|
|
28
|
-
static configKey: string;
|
|
29
|
-
static modelName: string;
|
|
30
|
-
static primaryKeyField: string;
|
|
31
|
-
static objects: ProductManager;
|
|
32
|
-
static fields: string[];
|
|
33
|
-
static schema: any;
|
|
34
|
-
static relationshipFields: Map<string, {
|
|
35
|
-
ModelClass: () => Function | null;
|
|
36
|
-
relationshipType: string;
|
|
37
|
-
}>;
|
|
38
|
-
constructor(data: any);
|
|
39
|
-
/**
|
|
40
|
-
* Define property getters and setters for all model fields
|
|
41
|
-
* @private
|
|
42
|
-
*/
|
|
43
|
-
private _defineProperties;
|
|
44
|
-
}
|
|
45
|
-
import { QuerySet } from '../../../../src';
|
|
46
|
-
import { Manager } from '../../../../src';
|
|
47
|
-
import { Model } from '../../../../src';
|
|
@@ -1,71 +0,0 @@
|
|
|
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 './product.schema.json';
|
|
7
|
-
/**
|
|
8
|
-
* Model-specific QuerySet implementation
|
|
9
|
-
*/
|
|
10
|
-
export class ProductQuerySet extends QuerySet {
|
|
11
|
-
}
|
|
12
|
-
/**
|
|
13
|
-
* Model-specific Manager implementation
|
|
14
|
-
*/
|
|
15
|
-
export class ProductManager extends Manager {
|
|
16
|
-
constructor(ModelClass) {
|
|
17
|
-
super(ModelClass, ProductQuerySet);
|
|
18
|
-
}
|
|
19
|
-
newQuerySet() {
|
|
20
|
-
return new ProductQuerySet(this.ModelClass);
|
|
21
|
-
}
|
|
22
|
-
}
|
|
23
|
-
/**
|
|
24
|
-
* Implementation of the Product model
|
|
25
|
-
*/
|
|
26
|
-
export class Product extends Model {
|
|
27
|
-
constructor(data) {
|
|
28
|
-
Product.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
|
-
Product.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
|
-
Product.configKey = 'backend1';
|
|
64
|
-
Product.modelName = 'django_app.product';
|
|
65
|
-
Product.primaryKeyField = 'id';
|
|
66
|
-
Product.objects = new ProductManager(Product);
|
|
67
|
-
Product.fields = ['id', 'name', 'description', 'price', 'category', 'in_stock', 'created_at', 'created_by', 'price_with_tax', 'display_name'];
|
|
68
|
-
Product.schema = schemaData;
|
|
69
|
-
Product.relationshipFields = new Map([
|
|
70
|
-
['category', { 'ModelClass': () => getModelClass('django_app.productcategory', 'backend1'), 'relationshipType': 'foreign-key' }]
|
|
71
|
-
]);
|
|
@@ -1,44 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Model-specific QuerySet implementation
|
|
3
|
-
*/
|
|
4
|
-
export class ProductCategoryQuerySet extends QuerySet<any> {
|
|
5
|
-
constructor(ModelClass: ModelConstructor, config?: {
|
|
6
|
-
nodes?: QueryNode[] | undefined;
|
|
7
|
-
orderBy?: {
|
|
8
|
-
field: string;
|
|
9
|
-
direction: "asc" | "desc";
|
|
10
|
-
}[] | undefined;
|
|
11
|
-
fields?: Set<string> | undefined;
|
|
12
|
-
aggregations?: Aggregation[] | undefined;
|
|
13
|
-
initialQueryset?: string | undefined;
|
|
14
|
-
serializerOptions?: SerializerOptions;
|
|
15
|
-
materialized?: boolean | undefined;
|
|
16
|
-
} | undefined, parent?: null);
|
|
17
|
-
}
|
|
18
|
-
/**
|
|
19
|
-
* Model-specific Manager implementation
|
|
20
|
-
*/
|
|
21
|
-
export class ProductCategoryManager extends Manager {
|
|
22
|
-
constructor(ModelClass: any);
|
|
23
|
-
}
|
|
24
|
-
/**
|
|
25
|
-
* Implementation of the ProductCategory model
|
|
26
|
-
*/
|
|
27
|
-
export class ProductCategory extends Model {
|
|
28
|
-
static configKey: string;
|
|
29
|
-
static modelName: string;
|
|
30
|
-
static primaryKeyField: string;
|
|
31
|
-
static objects: ProductCategoryManager;
|
|
32
|
-
static fields: string[];
|
|
33
|
-
static schema: any;
|
|
34
|
-
static relationshipFields: Map<any, any>;
|
|
35
|
-
constructor(data: any);
|
|
36
|
-
/**
|
|
37
|
-
* Define property getters and setters for all model fields
|
|
38
|
-
* @private
|
|
39
|
-
*/
|
|
40
|
-
private _defineProperties;
|
|
41
|
-
}
|
|
42
|
-
import { QuerySet } from '../../../../src';
|
|
43
|
-
import { Manager } from '../../../../src';
|
|
44
|
-
import { Model } from '../../../../src';
|
|
@@ -1,69 +0,0 @@
|
|
|
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 './productcategory.schema.json';
|
|
7
|
-
/**
|
|
8
|
-
* Model-specific QuerySet implementation
|
|
9
|
-
*/
|
|
10
|
-
export class ProductCategoryQuerySet extends QuerySet {
|
|
11
|
-
}
|
|
12
|
-
/**
|
|
13
|
-
* Model-specific Manager implementation
|
|
14
|
-
*/
|
|
15
|
-
export class ProductCategoryManager extends Manager {
|
|
16
|
-
constructor(ModelClass) {
|
|
17
|
-
super(ModelClass, ProductCategoryQuerySet);
|
|
18
|
-
}
|
|
19
|
-
newQuerySet() {
|
|
20
|
-
return new ProductCategoryQuerySet(this.ModelClass);
|
|
21
|
-
}
|
|
22
|
-
}
|
|
23
|
-
/**
|
|
24
|
-
* Implementation of the ProductCategory model
|
|
25
|
-
*/
|
|
26
|
-
export class ProductCategory extends Model {
|
|
27
|
-
constructor(data) {
|
|
28
|
-
ProductCategory.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
|
-
ProductCategory.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
|
-
ProductCategory.configKey = 'backend1';
|
|
64
|
-
ProductCategory.modelName = 'django_app.productcategory';
|
|
65
|
-
ProductCategory.primaryKeyField = 'id';
|
|
66
|
-
ProductCategory.objects = new ProductCategoryManager(ProductCategory);
|
|
67
|
-
ProductCategory.fields = ['id', 'name'];
|
|
68
|
-
ProductCategory.schema = schemaData;
|
|
69
|
-
ProductCategory.relationshipFields = new Map([]);
|
|
@@ -1,44 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Model-specific QuerySet implementation
|
|
3
|
-
*/
|
|
4
|
-
export class RatePlanQuerySet extends QuerySet<any> {
|
|
5
|
-
constructor(ModelClass: ModelConstructor, config?: {
|
|
6
|
-
nodes?: QueryNode[] | undefined;
|
|
7
|
-
orderBy?: {
|
|
8
|
-
field: string;
|
|
9
|
-
direction: "asc" | "desc";
|
|
10
|
-
}[] | undefined;
|
|
11
|
-
fields?: Set<string> | undefined;
|
|
12
|
-
aggregations?: Aggregation[] | undefined;
|
|
13
|
-
initialQueryset?: string | undefined;
|
|
14
|
-
serializerOptions?: SerializerOptions;
|
|
15
|
-
materialized?: boolean | undefined;
|
|
16
|
-
} | undefined, parent?: null);
|
|
17
|
-
}
|
|
18
|
-
/**
|
|
19
|
-
* Model-specific Manager implementation
|
|
20
|
-
*/
|
|
21
|
-
export class RatePlanManager extends Manager {
|
|
22
|
-
constructor(ModelClass: any);
|
|
23
|
-
}
|
|
24
|
-
/**
|
|
25
|
-
* Implementation of the RatePlan model
|
|
26
|
-
*/
|
|
27
|
-
export class RatePlan extends Model {
|
|
28
|
-
static configKey: string;
|
|
29
|
-
static modelName: string;
|
|
30
|
-
static primaryKeyField: string;
|
|
31
|
-
static objects: RatePlanManager;
|
|
32
|
-
static fields: string[];
|
|
33
|
-
static schema: any;
|
|
34
|
-
static relationshipFields: Map<any, any>;
|
|
35
|
-
constructor(data: any);
|
|
36
|
-
/**
|
|
37
|
-
* Define property getters and setters for all model fields
|
|
38
|
-
* @private
|
|
39
|
-
*/
|
|
40
|
-
private _defineProperties;
|
|
41
|
-
}
|
|
42
|
-
import { QuerySet } from '../../../../src';
|
|
43
|
-
import { Manager } from '../../../../src';
|
|
44
|
-
import { Model } from '../../../../src';
|
|
@@ -1,69 +0,0 @@
|
|
|
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 './rateplan.schema.json';
|
|
7
|
-
/**
|
|
8
|
-
* Model-specific QuerySet implementation
|
|
9
|
-
*/
|
|
10
|
-
export class RatePlanQuerySet extends QuerySet {
|
|
11
|
-
}
|
|
12
|
-
/**
|
|
13
|
-
* Model-specific Manager implementation
|
|
14
|
-
*/
|
|
15
|
-
export class RatePlanManager extends Manager {
|
|
16
|
-
constructor(ModelClass) {
|
|
17
|
-
super(ModelClass, RatePlanQuerySet);
|
|
18
|
-
}
|
|
19
|
-
newQuerySet() {
|
|
20
|
-
return new RatePlanQuerySet(this.ModelClass);
|
|
21
|
-
}
|
|
22
|
-
}
|
|
23
|
-
/**
|
|
24
|
-
* Implementation of the RatePlan model
|
|
25
|
-
*/
|
|
26
|
-
export class RatePlan extends Model {
|
|
27
|
-
constructor(data) {
|
|
28
|
-
RatePlan.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
|
-
RatePlan.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
|
-
RatePlan.configKey = 'backend1';
|
|
64
|
-
RatePlan.modelName = 'django_app.rateplan';
|
|
65
|
-
RatePlan.primaryKeyField = 'id';
|
|
66
|
-
RatePlan.objects = new RatePlanManager(RatePlan);
|
|
67
|
-
RatePlan.fields = ['id', 'name'];
|
|
68
|
-
RatePlan.schema = schemaData;
|
|
69
|
-
RatePlan.relationshipFields = new Map([]);
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* This file was auto-generated. Do not make direct changes to the file.
|
|
3
|
-
* Backend-specific FileObject class for backend1
|
|
4
|
-
*/
|
|
5
|
-
import { FileObject as BaseFileObject } from '../../../src';
|
|
6
|
-
export class backend1FileObject extends BaseFileObject {
|
|
7
|
-
}
|
|
8
|
-
backend1FileObject.configKey = 'backend1';
|
|
9
|
-
export const FileObject = backend1FileObject;
|
|
@@ -1,47 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Model-specific QuerySet implementation
|
|
3
|
-
*/
|
|
4
|
-
export class ComprehensiveModelQuerySet extends QuerySet<any> {
|
|
5
|
-
constructor(ModelClass: ModelConstructor, config?: {
|
|
6
|
-
nodes?: QueryNode[] | undefined;
|
|
7
|
-
orderBy?: {
|
|
8
|
-
field: string;
|
|
9
|
-
direction: "asc" | "desc";
|
|
10
|
-
}[] | undefined;
|
|
11
|
-
fields?: Set<string> | undefined;
|
|
12
|
-
aggregations?: Aggregation[] | undefined;
|
|
13
|
-
initialQueryset?: string | undefined;
|
|
14
|
-
serializerOptions?: SerializerOptions;
|
|
15
|
-
materialized?: boolean | undefined;
|
|
16
|
-
} | undefined, parent?: null);
|
|
17
|
-
}
|
|
18
|
-
/**
|
|
19
|
-
* Model-specific Manager implementation
|
|
20
|
-
*/
|
|
21
|
-
export class ComprehensiveModelManager extends Manager {
|
|
22
|
-
constructor(ModelClass: any);
|
|
23
|
-
}
|
|
24
|
-
/**
|
|
25
|
-
* Implementation of the ComprehensiveModel model
|
|
26
|
-
*/
|
|
27
|
-
export class ComprehensiveModel extends Model {
|
|
28
|
-
static configKey: string;
|
|
29
|
-
static modelName: string;
|
|
30
|
-
static primaryKeyField: string;
|
|
31
|
-
static objects: ComprehensiveModelManager;
|
|
32
|
-
static fields: string[];
|
|
33
|
-
static schema: any;
|
|
34
|
-
static relationshipFields: Map<string, {
|
|
35
|
-
ModelClass: () => Function | null;
|
|
36
|
-
relationshipType: string;
|
|
37
|
-
}>;
|
|
38
|
-
constructor(data: any);
|
|
39
|
-
/**
|
|
40
|
-
* Define property getters and setters for all model fields
|
|
41
|
-
* @private
|
|
42
|
-
*/
|
|
43
|
-
private _defineProperties;
|
|
44
|
-
}
|
|
45
|
-
import { QuerySet } from '../../../../src';
|
|
46
|
-
import { Manager } from '../../../../src';
|
|
47
|
-
import { Model } from '../../../../src';
|
|
@@ -1,71 +0,0 @@
|
|
|
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 './comprehensivemodel.schema.json';
|
|
7
|
-
/**
|
|
8
|
-
* Model-specific QuerySet implementation
|
|
9
|
-
*/
|
|
10
|
-
export class ComprehensiveModelQuerySet extends QuerySet {
|
|
11
|
-
}
|
|
12
|
-
/**
|
|
13
|
-
* Model-specific Manager implementation
|
|
14
|
-
*/
|
|
15
|
-
export class ComprehensiveModelManager extends Manager {
|
|
16
|
-
constructor(ModelClass) {
|
|
17
|
-
super(ModelClass, ComprehensiveModelQuerySet);
|
|
18
|
-
}
|
|
19
|
-
newQuerySet() {
|
|
20
|
-
return new ComprehensiveModelQuerySet(this.ModelClass);
|
|
21
|
-
}
|
|
22
|
-
}
|
|
23
|
-
/**
|
|
24
|
-
* Implementation of the ComprehensiveModel model
|
|
25
|
-
*/
|
|
26
|
-
export class ComprehensiveModel extends Model {
|
|
27
|
-
constructor(data) {
|
|
28
|
-
ComprehensiveModel.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
|
-
ComprehensiveModel.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
|
-
ComprehensiveModel.configKey = 'default';
|
|
64
|
-
ComprehensiveModel.modelName = 'django_app.comprehensivemodel';
|
|
65
|
-
ComprehensiveModel.primaryKeyField = 'id';
|
|
66
|
-
ComprehensiveModel.objects = new ComprehensiveModelManager(ComprehensiveModel);
|
|
67
|
-
ComprehensiveModel.fields = ['id', 'char_field', 'text_field', 'int_field', 'bool_field', 'datetime_field', 'decimal_field', 'json_field', 'money_field_currency', 'money_field', 'nullable_money_field_currency', 'nullable_money_field', 'related'];
|
|
68
|
-
ComprehensiveModel.schema = schemaData;
|
|
69
|
-
ComprehensiveModel.relationshipFields = new Map([
|
|
70
|
-
['related', { 'ModelClass': () => getModelClass('django_app.deepmodellevel1', 'default'), 'relationshipType': 'foreign-key' }]
|
|
71
|
-
]);
|