Skip to content

Commit c439e58

Browse files
authored
Update to preview-5
Signed-off-by: Eric Sibly [chullybun] <[email protected]>
1 parent f3af2e5 commit c439e58

File tree

1 file changed

+82
-4
lines changed

1 file changed

+82
-4
lines changed

tools/Beef.CodeGen.Core/Schema/database.beef-5.json

Lines changed: 82 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -100,7 +100,7 @@
100100
"outboxSchemaCreate": {
101101
"type": "boolean",
102102
"title": "Indicates whether to create the 'OutboxSchema' within the database.",
103-
"description": "Defaults to 'false'."
103+
"description": "Defaults to 'true'."
104104
},
105105
"outboxTable": {
106106
"type": "string",
@@ -213,6 +213,14 @@
213213
"type": "string"
214214
}
215215
},
216+
"aliasColumns": {
217+
"type": "array",
218+
"title": "The list of 'Column' and 'Alias' pairs (split by a '^' lookup character) to enable column aliasing/renaming.",
219+
"description": "Each alias value should be formatted as 'Column' + '^' + 'Alias'; e.g. 'PCODE^ProductCode'.",
220+
"items": {
221+
"type": "string"
222+
}
223+
},
216224
"get": {
217225
"type": "boolean",
218226
"title": "Indicates whether a 'Get' stored procedure is to be automatically generated where not otherwise explicitly specified."
@@ -258,7 +266,7 @@
258266
"efModelName": {
259267
"type": "string",
260268
"title": "The .NET (C#) EntityFramework (EF) model name.",
261-
"description": "Defaults to 'Name'."
269+
"description": "Defaults to 'Name' applying the 'CodeGeneration.AutoDotNetRename'."
262270
},
263271
"udt": {
264272
"type": "boolean",
@@ -341,6 +349,13 @@
341349
"items": {
342350
"$ref": "#/definitions/StoredProcedure"
343351
}
352+
},
353+
"relationships": {
354+
"type": "array",
355+
"title": "The corresponding Entity Frameworrk (EF) 'Relationship' collection.",
356+
"items": {
357+
"$ref": "#/definitions/Relationship"
358+
}
344359
}
345360
},
346361
"required": [
@@ -571,6 +586,69 @@
571586
"statement"
572587
]
573588
},
589+
"Relationship": {
590+
"type": "object",
591+
"title": "'Relationship' object (database-driven)",
592+
"description": "The 'Relationship' object enables the definition of an entity framework (EF) model relationship.",
593+
"properties": {
594+
"name": {
595+
"type": "string",
596+
"title": "The name of the primary table of the query."
597+
},
598+
"schema": {
599+
"type": "string",
600+
"title": "The schema name of the primary table of the view.",
601+
"description": "Defaults to 'CodeGeneration.Schema'."
602+
},
603+
"type": {
604+
"type": "string",
605+
"title": "The relationship type between the parent and child (self).",
606+
"description": "Defaults to 'OneToMany'.",
607+
"enum": [
608+
"OneToMany"
609+
]
610+
},
611+
"foreignKeyColumns": {
612+
"type": "array",
613+
"title": "The list of 'Column' names to be included in the underlying generated output.",
614+
"items": {
615+
"type": "string"
616+
}
617+
},
618+
"onDelete": {
619+
"type": "string",
620+
"title": "The operation applied to dependent entities in the relationship when the principal is deleted or the relationship is severed.",
621+
"description": "Defaults to 'NoAction'. See https://learn.microsoft.com/en-us/dotnet/api/microsoft.entityframeworkcore.deletebehavior for more information.",
622+
"enum": [
623+
"NoAction",
624+
"Cascade",
625+
"ClientCascade",
626+
"ClientNoAction",
627+
"ClientSetNull",
628+
"Restrict",
629+
"SetNull"
630+
]
631+
},
632+
"autoInclude": {
633+
"type": "boolean",
634+
"title": "Indicates whether to automatically include navigation to the property.",
635+
"description": "Defaults to 'None'."
636+
},
637+
"propertyName": {
638+
"type": "string",
639+
"title": "The corresponding property name within the entity framework (EF) model.",
640+
"description": "Defaults to 'Name' using the 'CodeGeneration.AutoDotNetRename' option."
641+
},
642+
"efModelName": {
643+
"type": "string",
644+
"title": "The corresponding entity framework (EF) model name (.NET Type).",
645+
"description": "Defaults to 'Name' using the 'CodeGeneration.AutoDotNetRename' option."
646+
}
647+
},
648+
"required": [
649+
"name"
650+
]
651+
},
574652
"Query": {
575653
"type": "object",
576654
"title": "'Query' object (database-driven)",
@@ -583,7 +661,7 @@
583661
"schema": {
584662
"type": "string",
585663
"title": "The schema name of the primary table of the view.",
586-
"description": "Defaults to 'CodeGeneration.dbo'."
664+
"description": "Defaults to 'CodeGeneration.Schema'."
587665
},
588666
"alias": {
589667
"type": "string",
@@ -912,4 +990,4 @@
912990
"$ref": "#/definitions/CodeGeneration"
913991
}
914992
]
915-
}
993+
}

0 commit comments

Comments
 (0)