loopback/test/fixtures/simple-integration-app/models.json

112 lines
2.0 KiB
JSON
Raw Normal View History

2013-12-20 22:58:29 +00:00
{
"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"
}
}
}
2013-12-20 22:58:29 +00:00
},
"store": {
"properties": {},
"public": true,
"dataSource": "db",
"options": {
"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"
}
}
}
2013-12-20 22:58:29 +00:00
}
}