Closed atherdon closed 5 years ago
You'll convert Database table into pseudo-type code. Later it'll be converted in ReasonML language.
[This is a place where we defined our models for this API Server] (https://github.com/ChickenKyiv/recipe-api-only/tree/master/server/models) So for each of this models we should move the main logic into a separated place. Example - looking at Allergy Model(Allergy.json)
{ "name": "Allergy", "plural": "allergy", "base": "PersistedModel", "idInjection": true, "options": { "validateUpsert": true }, "properties": { "name": { "type": "string", "required": true }, "type": { "type": "string", "required": true } }, "validations": [], "relations": {}, "acls": [], "methods": {} }
from that spefication we'll grab only properties and name. The end result is below:
const allergy = { name: "String", type: "String" };
You'll convert Database table into pseudo-type code. Later it'll be converted in ReasonML language.
[This is a place where we defined our models for this API Server] (https://github.com/ChickenKyiv/recipe-api-only/tree/master/server/models) So for each of this models we should move the main logic into a separated place. Example - looking at Allergy Model(Allergy.json)
from that spefication we'll grab only properties and name. The end result is below: