Created
October 22, 2020 02:54
-
-
Save J-Graham/2dbed1e14524a1b95b4a2faf1cc44901 to your computer and use it in GitHub Desktop.
Customer Backend Model JSON
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"Customer": { | |
"Customer": { | |
"name": "Customer", | |
"module": true, | |
"subEntity": false, | |
"extends": ["Entity", "Versionable"], | |
"properties": [ | |
{ | |
"name": "Name", | |
"type": "string", | |
"sqlType": "varchar", | |
"maxLength": "50" | |
}, | |
{ | |
"name": "StatusId", | |
"type": "int", | |
"sqlType": "int" | |
}, | |
{ | |
"name": "SourceId", | |
"type": "int", | |
"sqlType": "int" | |
} | |
], | |
"reverseNav": [ | |
{ | |
"name": "Contacts", | |
"type": "Contact" | |
}, | |
{ | |
"name": "CustomerAddresses", | |
"type": "CustomerAddress" | |
}, | |
{ | |
"name": "CustomerPhones", | |
"type": "CustomerPhone" | |
}, | |
{ | |
"name": "Documents", | |
"type": "Document" | |
}, | |
{ | |
"name": "Notes", | |
"type": "Note" | |
} | |
], | |
"foreignKeys": [ | |
{ | |
"name": "FK_Customers_CustomerSources", | |
"type": "CustomerSource" | |
}, | |
{ | |
"name": "FK_Customers_CustomerStatuses", | |
"type": "CustomerStatus" | |
} | |
] | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Hiya, thanks for checking it out and listening! We actually extended a tool we use to generate the Backend Models as well (for c#) call a reverse POCO generator. We took this and wrote our own T4 template to extend the queries they already wrote. I think your SQL-JSON link is pretty promising and worth checking out. Ours was kind of specific because we were already using that tool so it made sense to leverage it.
I have heard of Formly, back when we started it just didn't do what we needed, but it seems great now. We have a lot of custom components that we want to push in and having the flexibility to control the engine has been nice, but it is a lot of work to keep up with 😄 . Glad you're taking the plunge it has been a game changer for use, let us know how it works out!