salix/modules/worker/back/models/user-phone.json

35 lines
584 B
JSON

{
"name": "UserPhone",
"base": "Loggable",
"log": {
"model":"UserLog"
},
"options": {
"mysql": {
"table": "userPhone"
}
},
"properties": {
"id": {
"id": true,
"type": "String"
},
"phone": {
"type": "Number",
"required": true
}
},
"relations": {
"user": {
"type": "belongsTo",
"model": "Account",
"foreignKey": "userFk"
},
"type": {
"type": "belongsTo",
"model": "UserPhoneType",
"foreignKey": "typeFk"
}
}
}