@webda/models 4.0.0-beta.6 → 4.0.0-beta.8
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/README.md +5 -4
- package/lib/index.d.ts +1 -0
- package/lib/index.d.ts.map +1 -1
- package/lib/model.model.d.ts +5 -0
- package/lib/model.model.d.ts.map +1 -1
- package/lib/repositories/hooks.d.ts +27 -5
- package/lib/repositories/hooks.d.ts.map +1 -1
- package/lib/repositories/hooks.js +16 -14
- package/lib/repositories/hooks.js.map +1 -1
- package/package.json +9 -8
- package/webda.module.json +120 -0
package/README.md
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
This module is part of Webda Application Framework that allows you to quickly develop applications with all modern prerequisites: Security, Extensibility, GraphQL, REST, CloudNative [https://webda.io](https://webda.io)
|
|
4
4
|
|
|
5
|
-
<img src="https://webda.io/
|
|
5
|
+
<img src="https://webda.io/img/webda.svg" width="128" />
|
|
6
6
|
|
|
7
7
|

|
|
8
8
|
|
|
@@ -128,6 +128,7 @@ Instance operations become `POST /models/:key/method`; static operations become
|
|
|
128
128
|
- [Permissions](../../docs/pages/Modules/models/Permissions.md)
|
|
129
129
|
|
|
130
130
|
<!-- README_FOOTER -->
|
|
131
|
+
|
|
131
132
|
## Sponsors
|
|
132
133
|
|
|
133
134
|
<!--
|
|
@@ -136,12 +137,12 @@ Support this project by becoming a sponsor. Your logo will show up here with a l
|
|
|
136
137
|
|
|
137
138
|
Arize AI is a machine learning observability and model monitoring platform. It helps you visualize, monitor, and explain your machine learning models. [Learn more](https://arize.com)
|
|
138
139
|
|
|
139
|
-
[<img src="https://
|
|
140
|
+
[<img src="https://webda.io/img/sponsors/arize.svg" width="200">](https://arize.com)
|
|
140
141
|
|
|
141
142
|
Loopingz is a software development company that provides consulting and development services. [Learn more](https://loopingz.com)
|
|
142
143
|
|
|
143
|
-
[<img src="https://
|
|
144
|
+
[<img src="https://webda.io/img/sponsors/loopingz.png" width="200">](https://loopingz.com)
|
|
144
145
|
|
|
145
146
|
Tellae is an innovative consulting firm specialized in cities transportation issues. We provide our clients, both public and private, with solutions to support your strategic and operational decisions. [Learn more](https://tellae.fr)
|
|
146
147
|
|
|
147
|
-
[<img src="https://tellae.
|
|
148
|
+
[<img src="https://webda.io/img/sponsors/tellae.svg" width="200">](https://tellae.fr)
|
package/lib/index.d.ts
CHANGED
package/lib/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,kBAAkB,CAAC;AACjC,cAAc,gBAAgB,CAAC;AAC/B,cAAc,YAAY,CAAC;AAC3B,cAAc,yBAAyB,CAAC;AACxC,cAAc,8BAA8B,CAAC;AAC7C,cAAc,4BAA4B,CAAC;AAC3C,cAAc,0BAA0B,CAAC;AACzC,cAAc,yBAAyB,CAAC;AACxC,cAAc,eAAe,CAAC;AAC9B,cAAc,WAAW,CAAC;AAC1B,cAAc,kBAAkB,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,kBAAkB,CAAC;AACjC,cAAc,gBAAgB,CAAC;AAC/B,cAAc,YAAY,CAAC;AAC3B,cAAc,yBAAyB,CAAC;AACxC,cAAc,8BAA8B,CAAC;AAC7C,cAAc,4BAA4B,CAAC;AAC3C,cAAc,0BAA0B,CAAC;AACzC,cAAc,yBAAyB,CAAC;AACxC,cAAc,eAAe,CAAC;AAC9B,cAAc,WAAW,CAAC;AAC1B,cAAc,kBAAkB,CAAC;AACjC,YAAY,EAAE,WAAW,EAAE,eAAe,EAAE,WAAW,EAAE,MAAM,WAAW,CAAC"}
|
package/lib/model.model.d.ts
CHANGED
|
@@ -128,7 +128,12 @@ declare const Model_base: {
|
|
|
128
128
|
results: InstanceType<T>[];
|
|
129
129
|
continuationToken?: string;
|
|
130
130
|
}>;
|
|
131
|
+
query<T extends ModelClass>(this: T, filter: import("@webda/ql").ModelFilter<InstanceType<T>>, options?: import("@webda/ql").FindOptions<InstanceType<T>> | undefined): Promise<{
|
|
132
|
+
results: InstanceType<T>[];
|
|
133
|
+
continuationToken?: string;
|
|
134
|
+
}>;
|
|
131
135
|
iterate<T extends ModelClass>(this: T, query: import("@webda/ql").WebdaQLString<InstanceType<T>>, params?: import("@webda/ql").QueryParameters): AsyncGenerator<InstanceType<T>, any, any>;
|
|
136
|
+
iterate<T extends ModelClass>(this: T, filter: import("@webda/ql").ModelFilter<InstanceType<T>>, options?: Pick<import("@webda/ql").FindOptions<InstanceType<T>>, "orderBy"> | undefined): AsyncGenerator<InstanceType<T>, any, any>;
|
|
132
137
|
aggregate<T extends ModelClass, const G extends readonly import("./types.js").PropertyPaths<InstanceType<T>>[] = [], const M extends Record<string, import("./aggregation.js").MetricSpec<InstanceType<T>>> = Record<string, import("./aggregation.js").MetricSpec<InstanceType<T>>>>(this: T, spec: import("./aggregation.js").AggregationSpec<InstanceType<T>, G, M>, params?: import("@webda/ql").QueryParameters): Promise<import("@webda/ql").AggregationResult<import("./aggregation.js").AggregatedRow<InstanceType<T>, G, M>>>;
|
|
133
138
|
ref<T extends ModelClass>(this: T, key: import("./storable.js").SettablePrimaryKey<InstanceType<T>>): import("./relations.js").ModelRefWithCreate<InstanceType<T>>;
|
|
134
139
|
} & ObjectConstructor;
|
package/lib/model.model.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"model.model.d.ts","sourceRoot":"","sources":["../src/model.model.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,YAAY,EACZ,iBAAiB,EACjB,KAAK,EAAE,EACP,KAAK,cAAc,EACnB,KAAK,QAAQ,EACb,2BAA2B,EAC3B,aAAa,EACb,UAAU,EACX,MAAM,eAAe,CAAC;AACvB,OAAO,EAAc,WAAW,EAAE,MAAM,cAAc,CAAC;AACvD,OAAO,KAAK,EAAW,OAAO,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IAAI,UAAU,MAAM,GAAG,MAAM,GAAG,IAAI,GAAG,SAAS;MAChD;IAEF;;;;;;OAMG;IACH,MAAM,CAAC,WAAW,CAAC,CAAC,SAAS,UAAU,EAAE,CAAC,SAAS,MAAM,GAAG,YAAY,CAAC,CAAC,CAAC,EAAE,IAAI,EAAE,CAAC,EAAE,IAAI,EAAE,GAAG,EAAE,QAAQ,CAAC,EAAE,CAAC,GAAG,CAAC,CA6BhH;IAED;;;;OAIG;IACH,IAAI,CAAC,MAAM,EAAE,cAAc,CAAC,IAAI,CAAC,GAAG,IAAI,CAIvC;IAED;;;OAGG;IACH,SAAS,QAER;IAED;;;OAGG;IACG,MAAM,IAAI,OAAO,CAAC,IAAI,CAAC,CAK5B;IAED;;;;OAIG;IACG,KAAK,CAAC,IAAI,EAAE,OAAO,CAAC,UAAU,CAAC,IAAI,CAAC,CAAC,GAAG,OAAO,CAAC,IAAI,CAAC,CAW1D;CACF;AAED;;GAEG;AACH,qBAAa,SAAU,SAAQ,KAAK;IAClC;;OAEG;IACI,CAAC,iBAAiB,CAAC,YAAI,MAAM,EAAW;IAC/C;;;OAGG;IACH,IAAI,EAAE,MAAM,CAAC;IAEb;;;OAGG;IACH,YAAY,IAAI,CAAC,EAAE,OAAO,CAAC,SAAS,CAAC,EAGpC;IAED;;;;;OAKG;IACH,YAAY,CAAC,IAAI,CAAC,EAAE,GAAG,GAAG,MAAM,CAE/B;CACF"}
|
|
@@ -2,7 +2,7 @@ import type { ModelRefWithCreate } from "../relations.js";
|
|
|
2
2
|
import { SettablePrimaryKey, type Storable, type ModelClass } from "../storable.js";
|
|
3
3
|
import { Helpers, PropertyPaths } from "../types.js";
|
|
4
4
|
import type { Repository } from "./repository.js";
|
|
5
|
-
import type { AggregationResult, QueryParameters, WebdaQLString } from "@webda/ql";
|
|
5
|
+
import type { AggregationResult, FindOptions, ModelFilter, QueryParameters, WebdaQLString } from "@webda/ql";
|
|
6
6
|
import type { AggregatedRow, AggregationSpec, MetricSpec } from "../aggregation.js";
|
|
7
7
|
/**
|
|
8
8
|
* Global registry mapping ModelClass constructors to their Repository instances.
|
|
@@ -60,24 +60,46 @@ export declare function RepositoryStorageClassMixIn<TBase extends new (...args:
|
|
|
60
60
|
* ```ts
|
|
61
61
|
* Task.query("owner = ? AND priority >= ?", [user, 2]);
|
|
62
62
|
* Task.query("owner = :owner", { owner: user });
|
|
63
|
+
* Task.query({ owner: user, priority: { $gte: 2 } }, { limit: 10 });
|
|
63
64
|
* ```
|
|
65
|
+
*
|
|
66
|
+
* A JSON filter is converted to WebdaQL here, so repositories only ever receive query strings.
|
|
64
67
|
* @param this - the model class constructor
|
|
65
|
-
* @param query - the query string, optionally with `?` or `:name` placeholders
|
|
66
|
-
* @param params - values for the placeholders: an array for `?`, an object for `:name
|
|
68
|
+
* @param query - the query string, optionally with `?` or `:name` placeholders, or a JSON filter
|
|
69
|
+
* @param params - values for the placeholders: an array for `?`, an object for `:name`; or the find options of a JSON filter
|
|
67
70
|
* @returns the query results
|
|
68
71
|
*/
|
|
69
72
|
query<T extends ModelClass>(this: T, query: WebdaQLString<InstanceType<T>>, params?: QueryParameters): Promise<{
|
|
70
73
|
results: InstanceType<T>[];
|
|
71
74
|
continuationToken?: string;
|
|
72
75
|
}>;
|
|
76
|
+
/**
|
|
77
|
+
* Query the object directly with a JSON filter, converted to WebdaQL
|
|
78
|
+
* @param this - the model class constructor
|
|
79
|
+
* @param filter - the JSON filter
|
|
80
|
+
* @param options - ordering, limit and continuation token
|
|
81
|
+
* @returns the query results
|
|
82
|
+
*/
|
|
83
|
+
query<T extends ModelClass>(this: T, filter: ModelFilter<InstanceType<T>>, options?: FindOptions<InstanceType<T>>): Promise<{
|
|
84
|
+
results: InstanceType<T>[];
|
|
85
|
+
continuationToken?: string;
|
|
86
|
+
}>;
|
|
73
87
|
/**
|
|
74
88
|
* Iterate through all objects
|
|
75
89
|
* @param this - the model class constructor
|
|
76
|
-
* @param query - the query string, optionally with `?` or `:name` placeholders
|
|
77
|
-
* @param params - values for the placeholders: an array for `?`, an object for `:name
|
|
90
|
+
* @param query - the query string, optionally with `?` or `:name` placeholders, or a JSON filter
|
|
91
|
+
* @param params - values for the placeholders: an array for `?`, an object for `:name`; or the ordering of a JSON filter
|
|
78
92
|
* @returns an async generator of model instances
|
|
79
93
|
*/
|
|
80
94
|
iterate<T extends ModelClass>(this: T, query: WebdaQLString<InstanceType<T>>, params?: QueryParameters): AsyncGenerator<InstanceType<T>, any, any>;
|
|
95
|
+
/**
|
|
96
|
+
* Iterate through the objects matching a JSON filter, converted to WebdaQL
|
|
97
|
+
* @param this - the model class constructor
|
|
98
|
+
* @param filter - the JSON filter
|
|
99
|
+
* @param options - the ordering
|
|
100
|
+
* @returns an async generator of model instances
|
|
101
|
+
*/
|
|
102
|
+
iterate<T extends ModelClass>(this: T, filter: ModelFilter<InstanceType<T>>, options?: Pick<FindOptions<InstanceType<T>>, "orderBy">): AsyncGenerator<InstanceType<T>, any, any>;
|
|
81
103
|
/**
|
|
82
104
|
* Aggregate the objects directly
|
|
83
105
|
*
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"hooks.d.ts","sourceRoot":"","sources":["../../src/repositories/hooks.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,iBAAiB,CAAC;AAC1D,OAAO,EAAkB,kBAAkB,EAAqB,KAAK,QAAQ,EAAE,KAAK,UAAU,EAAE,MAAM,gBAAgB,CAAC;AACvH,OAAO,EAAE,OAAO,EAAE,aAAa,EAAE,MAAM,aAAa,CAAC;AACrD,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,iBAAiB,CAAC;AAClD,OAAO,KAAK,EAAE,iBAAiB,EAAE,eAAe,EAAE,aAAa,EAAE,MAAM,WAAW,CAAC;
|
|
1
|
+
{"version":3,"file":"hooks.d.ts","sourceRoot":"","sources":["../../src/repositories/hooks.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,kBAAkB,EAAE,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AC,YAAY,CAAC,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC;IAInE;;;;;OAKG;QACQ,CAAC,SAAS,UAAU,QACvB,CAAC,OACF,kBAAkB,CAAC,YAAY,CAAC,CAAC,CAAC,CAAC,GACvC,kBAAkB,CAAC,YAAY,CAAC,CAAC,CAAC,CAAC;UAYzC"}
|
|
@@ -58,29 +58,31 @@ export function RepositoryStorageClassMixIn(Base) {
|
|
|
58
58
|
return useRepository(this).create(data, save);
|
|
59
59
|
}
|
|
60
60
|
/**
|
|
61
|
-
* Query the object directly
|
|
62
|
-
*
|
|
63
|
-
* ```ts
|
|
64
|
-
* Task.query("owner = ? AND priority >= ?", [user, 2]);
|
|
65
|
-
* Task.query("owner = :owner", { owner: user });
|
|
66
|
-
* ```
|
|
61
|
+
* Query the object directly with a query string or a JSON filter
|
|
67
62
|
* @param this - the model class constructor
|
|
68
|
-
* @param query - the query string
|
|
69
|
-
* @param
|
|
63
|
+
* @param query - the query string or the JSON filter
|
|
64
|
+
* @param paramsOrOptions - the placeholder values of a query string, or the find options of a JSON filter
|
|
70
65
|
* @returns the query results
|
|
71
66
|
*/
|
|
72
|
-
static query(query,
|
|
73
|
-
|
|
67
|
+
static async query(query, paramsOrOptions) {
|
|
68
|
+
if (typeof query === "string" || query === undefined || query === null) {
|
|
69
|
+
return useRepository(this).query(query, paramsOrOptions);
|
|
70
|
+
}
|
|
71
|
+
const WebdaQL = await import("@webda/ql");
|
|
72
|
+
return useRepository(this).query(WebdaQL.toWebdaQL(query, paramsOrOptions));
|
|
74
73
|
}
|
|
75
74
|
/**
|
|
76
|
-
* Iterate through
|
|
75
|
+
* Iterate through the objects matching a query string or a JSON filter
|
|
77
76
|
* @param this - the model class constructor
|
|
78
|
-
* @param query - the query string
|
|
79
|
-
* @param params - values
|
|
77
|
+
* @param query - the query string or the JSON filter
|
|
78
|
+
* @param params - the placeholder values of a query string, or the ordering of a JSON filter
|
|
80
79
|
* @returns an async generator of model instances
|
|
81
80
|
*/
|
|
82
81
|
static async *iterate(query, params) {
|
|
83
|
-
|
|
82
|
+
const iterator = typeof query === "string" || query === undefined || query === null
|
|
83
|
+
? useRepository(this).iterate(query, params)
|
|
84
|
+
: useRepository(this).iterate((await import("@webda/ql")).toWebdaQL(query, params));
|
|
85
|
+
for await (const item of iterator) {
|
|
84
86
|
yield item;
|
|
85
87
|
}
|
|
86
88
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"hooks.js","sourceRoot":"","sources":["../../src/repositories/hooks.ts"],"names":[],"mappings":"AAOA;;;;;;GAMG;AACH,MAAM,CAAC,MAAM,YAAY,GAAG,IAAI,OAAO,EAA+B,CAAC;AAEvE;;;;GAIG;AACH,MAAM,UAAU,aAAa,CAAuB,GAAM;IACxD,IAAI,KAAK,GAAQ,GAAG,CAAC;IACrB,OAAO,CAAC,YAAY,CAAC,GAAG,CAAC,KAAK,CAAC,EAAE,CAAC;QAChC,KAAK,GAAG,MAAM,CAAC,cAAc,CAAC,KAAK,CAAC,CAAC;QACrC,IAAI,KAAK,KAAK,IAAI,IAAI,KAAK,KAAK,MAAM,EAAE,CAAC;YACvC,MAAM,IAAI,KAAK,CAAC,2BAA2B,GAAG,CAAC,SAAS,CAAC,WAAW,CAAC,IAAI,EAAE,CAAC,CAAC;QAC/E,CAAC;IACH,CAAC;IACD,OAAO,YAAY,CAAC,GAAG,CAAC,KAAK,CAAkB,CAAC;AAClD,CAAC;AAED;;;;;;GAMG;AACH,MAAM,UAAU,kBAAkB,CAAuB,KAAQ,EAAE,UAAyB;IAC1F,YAAY,CAAC,GAAG,CAAC,KAAK,EAAE,UAAU,CAAC,CAAC;AACtC,CAAC;AAED;;;;;;GAMG;AACH,MAAM,UAAU,2BAA2B,CAA+C,IAAW;IACnG,OAAO,KAAM,SAAQ,IAAI;QACvB;;;WAGG;QACH,MAAM,CAAC,aAAa;YAClB,OAAO,aAAa,CAAC,IAAI,CAAC,CAAC;QAC7B,CAA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C,CAAC;QACrD,CAAC;QAED;;;;;WAKG;QACH,MAAM,CAAC,GAAG,CAER,GAAwC;YAExC,OAAO,aAAa,CAAC,IAAI,CAAE,CAAC,GAAG,CAAC,GAAU,CAAC,CAAC;QAC9C,CAAC;QAED;;;WAGG;QACH,OAAO;YACL,OAAO,IAAI,CAAC;QACd,CAAC;KACF,CAAC;AACJ,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@webda/models",
|
|
3
|
-
"version": "4.0.0-beta.
|
|
3
|
+
"version": "4.0.0-beta.8",
|
|
4
4
|
"description": "Webda Models implementation",
|
|
5
5
|
"main": "lib/index.js",
|
|
6
6
|
"repository": {
|
|
@@ -14,7 +14,8 @@
|
|
|
14
14
|
],
|
|
15
15
|
"files": [
|
|
16
16
|
"lib",
|
|
17
|
-
"package.json"
|
|
17
|
+
"package.json",
|
|
18
|
+
"webda.module.json"
|
|
18
19
|
],
|
|
19
20
|
"author": "loopingz",
|
|
20
21
|
"license": "LGPL-3.0-only",
|
|
@@ -24,11 +25,11 @@
|
|
|
24
25
|
"homepage": "https://github.com/loopingz/webda.io#readme",
|
|
25
26
|
"dependencies": {
|
|
26
27
|
"@types/mocha": "^10.0.10",
|
|
27
|
-
"@webda/serialize": "^4.0.0-beta.
|
|
28
|
+
"@webda/serialize": "^4.0.0-beta.7"
|
|
28
29
|
},
|
|
29
30
|
"peerDependencies": {
|
|
30
|
-
"@webda/ql": "4.0.0-beta.
|
|
31
|
-
"@webda/utils": "4.0.0-beta.
|
|
31
|
+
"@webda/ql": "4.0.0-beta.7",
|
|
32
|
+
"@webda/utils": "4.0.0-beta.8"
|
|
32
33
|
},
|
|
33
34
|
"publishConfig": {
|
|
34
35
|
"access": "public"
|
|
@@ -40,9 +41,9 @@
|
|
|
40
41
|
"type-fest": "^5.5.0",
|
|
41
42
|
"vitest": "^4.1.2",
|
|
42
43
|
"vite": "^6.0.0",
|
|
43
|
-
"@webda/compiler": "^4.0.0-beta.
|
|
44
|
-
"@webda/tsc-esm": "4.0.0-beta.
|
|
45
|
-
"@webda/test": "^4.0.0-beta.
|
|
44
|
+
"@webda/compiler": "^4.0.0-beta.8",
|
|
45
|
+
"@webda/tsc-esm": "4.0.0-beta.8",
|
|
46
|
+
"@webda/test": "^4.0.0-beta.7"
|
|
46
47
|
},
|
|
47
48
|
"type": "module",
|
|
48
49
|
"engines": {
|
|
@@ -0,0 +1,120 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://webda.io/schemas/webda.module.v4.json",
|
|
3
|
+
"beans": {},
|
|
4
|
+
"deployers": {},
|
|
5
|
+
"moddas": {},
|
|
6
|
+
"models": {
|
|
7
|
+
"Webda/Model": {
|
|
8
|
+
"Plural": "Models",
|
|
9
|
+
"Import": "lib/model.model:Model",
|
|
10
|
+
"Relations": {},
|
|
11
|
+
"Ancestors": [],
|
|
12
|
+
"Subclasses": [
|
|
13
|
+
"Webda/UuidModel"
|
|
14
|
+
],
|
|
15
|
+
"Reflection": {},
|
|
16
|
+
"Schemas": {
|
|
17
|
+
"Output": {
|
|
18
|
+
"$schema": "http://json-schema.org/draft-07/schema#",
|
|
19
|
+
"additionalProperties": false,
|
|
20
|
+
"description": "Model object definition\n\nThis is the core of many application",
|
|
21
|
+
"type": "object",
|
|
22
|
+
"$webda": "toDto$auto"
|
|
23
|
+
},
|
|
24
|
+
"Input": {
|
|
25
|
+
"$schema": "http://json-schema.org/draft-07/schema#",
|
|
26
|
+
"additionalProperties": false,
|
|
27
|
+
"description": "Model object definition\n\nThis is the core of many application",
|
|
28
|
+
"type": "object",
|
|
29
|
+
"$webda": "fromDto$auto"
|
|
30
|
+
},
|
|
31
|
+
"Stored": {
|
|
32
|
+
"$schema": "http://json-schema.org/draft-07/schema#",
|
|
33
|
+
"additionalProperties": false,
|
|
34
|
+
"description": "Model object definition\n\nThis is the core of many application",
|
|
35
|
+
"type": "object",
|
|
36
|
+
"$webda": "toJSON$return"
|
|
37
|
+
}
|
|
38
|
+
},
|
|
39
|
+
"Actions": {},
|
|
40
|
+
"Events": [],
|
|
41
|
+
"PrimaryKey": [],
|
|
42
|
+
"Identifier": "Webda/Model"
|
|
43
|
+
},
|
|
44
|
+
"Webda/UuidModel": {
|
|
45
|
+
"Plural": "UuidModels",
|
|
46
|
+
"Import": "lib/model.model:UuidModel",
|
|
47
|
+
"Relations": {},
|
|
48
|
+
"Ancestors": [
|
|
49
|
+
"Webda/Model"
|
|
50
|
+
],
|
|
51
|
+
"Subclasses": [],
|
|
52
|
+
"Reflection": {
|
|
53
|
+
"uuid": {
|
|
54
|
+
"type": "string"
|
|
55
|
+
}
|
|
56
|
+
},
|
|
57
|
+
"Schemas": {
|
|
58
|
+
"Output": {
|
|
59
|
+
"$schema": "http://json-schema.org/draft-07/schema#",
|
|
60
|
+
"additionalProperties": false,
|
|
61
|
+
"description": "Simple model with a UUID",
|
|
62
|
+
"properties": {
|
|
63
|
+
"uuid": {
|
|
64
|
+
"description": "UUID of the model",
|
|
65
|
+
"format": "uuid",
|
|
66
|
+
"type": "string"
|
|
67
|
+
}
|
|
68
|
+
},
|
|
69
|
+
"required": [
|
|
70
|
+
"uuid"
|
|
71
|
+
],
|
|
72
|
+
"type": "object",
|
|
73
|
+
"$webda": "toDto$auto"
|
|
74
|
+
},
|
|
75
|
+
"Input": {
|
|
76
|
+
"$schema": "http://json-schema.org/draft-07/schema#",
|
|
77
|
+
"additionalProperties": false,
|
|
78
|
+
"description": "Simple model with a UUID",
|
|
79
|
+
"properties": {
|
|
80
|
+
"uuid": {
|
|
81
|
+
"description": "UUID of the model",
|
|
82
|
+
"format": "uuid",
|
|
83
|
+
"type": "string"
|
|
84
|
+
}
|
|
85
|
+
},
|
|
86
|
+
"required": [
|
|
87
|
+
"uuid"
|
|
88
|
+
],
|
|
89
|
+
"type": "object",
|
|
90
|
+
"$webda": "fromDto$auto"
|
|
91
|
+
},
|
|
92
|
+
"Stored": {
|
|
93
|
+
"$schema": "http://json-schema.org/draft-07/schema#",
|
|
94
|
+
"additionalProperties": false,
|
|
95
|
+
"description": "Simple model with a UUID",
|
|
96
|
+
"properties": {
|
|
97
|
+
"uuid": {
|
|
98
|
+
"description": "UUID of the model",
|
|
99
|
+
"format": "uuid",
|
|
100
|
+
"type": "string"
|
|
101
|
+
}
|
|
102
|
+
},
|
|
103
|
+
"required": [
|
|
104
|
+
"uuid"
|
|
105
|
+
],
|
|
106
|
+
"type": "object",
|
|
107
|
+
"$webda": "toJSON$return"
|
|
108
|
+
}
|
|
109
|
+
},
|
|
110
|
+
"Actions": {},
|
|
111
|
+
"Events": [],
|
|
112
|
+
"PrimaryKey": [
|
|
113
|
+
"uuid"
|
|
114
|
+
],
|
|
115
|
+
"Identifier": "Webda/UuidModel"
|
|
116
|
+
}
|
|
117
|
+
},
|
|
118
|
+
"schemas": {},
|
|
119
|
+
"behaviors": {}
|
|
120
|
+
}
|