{ "email": { "dataSource": "mail", "public": false, "options": { "base": "Email" } }, "user": { "dataSource": "db", "public": true, "options": { "base": "User", "relations": { "accessTokens": { "model": "accessToken", "type": "hasMany", "foreignKey": "userId" } } } }, "accessToken": { "dataSource": "db", "public": true, "options": { "base": "AccessToken" } }, "widget": { "properties": {}, "public": true, "dataSource": "db", "options": { "relations": { "store": { "model": "store", "type": "belongsTo" } } } }, "store": { "properties": {}, "public": true, "dataSource": "db", "options": { "scopes": { "superStores": { "where": { "size": "super" } } }, "relations": { "widgets": { "model": "widget", "type": "hasMany" } } } }, "physician": { "dataSource": "db", "public": true, "properties": { "name": "string" }, "options": { "relations": { "patients": { "model": "patient", "type": "hasMany", "through": "appointment", "foreignKey": "patientId" } } } }, "patient": { "dataSource": "db", "public": true, "properties": { "name": "string" }, "options": { "relations": { "physicians": { "model": "physician", "type": "hasMany", "through": "appointment", "foreignKey": "physicianId" } } } }, "appointment": { "dataSource": "db", "public": true, "properties": { "date": "date" }, "options": { "relations": { "physician": { "model": "physician", "type": "belongsTo", "foreignKey": "physicianId" }, "patient": { "model": "patient", "type": "belongsTo", "foreignKey": "patientId" } } } }, "customer": { "base": "PersistedModel", "dataSource": "db", "public": true, "properties": { "name": { "type": "string", "required": true } }, "relations": { "profile": { "type": "hasOne", "model": "profile" } } }, "profile": { "base": "PersistedModel", "dataSource": "db", "public": true, "properties": { "points": { "type": "number" } } } }