loopback/common/models/role.json

32 lines
499 B
JSON

{
"name": "Role",
"properties": {
"id": {
"type": "string",
"id": true,
"generated": true
},
"name": {
"type": "string",
"required": true
},
"description": "string",
"created": {
"type":"date",
"defaultFn": "now"
},
"modified": {
"type":"date",
"defaultFn": "now"
}
},
"relations": {
"principals": {
"type": "hasMany",
"model": "RoleMapping",
"foreignKey": "roleId"
}
}
}