@ronin/compiler 0.14.14-leo-ron-1099-1-experimental-360 → 0.14.14-leo-ron-1099-1-experimental-361
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/index.d.ts +8 -1
- package/dist/index.js +10 -2
- package/package.json +1 -1
package/dist/index.d.ts
CHANGED
@@ -245,7 +245,7 @@ type ModelField = ModelFieldBasics & ({
|
|
245
245
|
/** The target model of the relationship that is being established. */
|
246
246
|
target: string;
|
247
247
|
/** Whether the field should be related to one record, or many records. */
|
248
|
-
kind?: 'one'
|
248
|
+
kind?: 'one';
|
249
249
|
/**
|
250
250
|
* If the target record is updated or deleted, the defined actions maybe executed.
|
251
251
|
*/
|
@@ -253,6 +253,13 @@ type ModelField = ModelFieldBasics & ({
|
|
253
253
|
onDelete?: ModelFieldLinkAction;
|
254
254
|
onUpdate?: ModelFieldLinkAction;
|
255
255
|
};
|
256
|
+
} | {
|
257
|
+
/** The kind of value that should be stored inside the field. */
|
258
|
+
type: 'link';
|
259
|
+
/** The target model of the relationship that is being established. */
|
260
|
+
target: string;
|
261
|
+
/** Whether the field should be related to one record, or many records. */
|
262
|
+
kind: 'many';
|
256
263
|
});
|
257
264
|
type ModelIndexField<T extends Array<ModelField> = Array<ModelField>> = {
|
258
265
|
/** The collating sequence used for text placed inside the field. */
|
package/dist/index.js
CHANGED
@@ -1528,12 +1528,20 @@ var getSystemModels = (models, model) => {
|
|
1528
1528
|
{
|
1529
1529
|
slug: "source",
|
1530
1530
|
type: "link",
|
1531
|
-
target: model.slug
|
1531
|
+
target: model.slug,
|
1532
|
+
actions: {
|
1533
|
+
onDelete: "CASCADE",
|
1534
|
+
onUpdate: "CASCADE"
|
1535
|
+
}
|
1532
1536
|
},
|
1533
1537
|
{
|
1534
1538
|
slug: "target",
|
1535
1539
|
type: "link",
|
1536
|
-
target: relatedModel.slug
|
1540
|
+
target: relatedModel.slug,
|
1541
|
+
actions: {
|
1542
|
+
onDelete: "CASCADE",
|
1543
|
+
onUpdate: "CASCADE"
|
1544
|
+
}
|
1537
1545
|
}
|
1538
1546
|
]
|
1539
1547
|
});
|
package/package.json
CHANGED