2017-10-13 14:22:45 +00:00
|
|
|
{
|
2019-02-27 12:10:26 +00:00
|
|
|
"name": "Account",
|
|
|
|
"base": "VnModel",
|
|
|
|
"options": {
|
|
|
|
"mysql": {
|
|
|
|
"table": "account.user"
|
|
|
|
}
|
2020-09-21 11:24:43 +00:00
|
|
|
},
|
2019-02-27 12:10:26 +00:00
|
|
|
"properties": {
|
|
|
|
"id": {
|
|
|
|
"type": "number",
|
2020-10-30 23:02:27 +00:00
|
|
|
"id": true
|
2019-02-27 12:10:26 +00:00
|
|
|
},
|
|
|
|
"name": {
|
|
|
|
"type": "string",
|
|
|
|
"required": true
|
|
|
|
},
|
|
|
|
"roleFk": {
|
|
|
|
"type": "number",
|
|
|
|
"mysql": {
|
|
|
|
"columnName": "role"
|
|
|
|
}
|
|
|
|
},
|
|
|
|
"nickname": {
|
|
|
|
"type": "string"
|
|
|
|
},
|
2020-03-09 08:00:03 +00:00
|
|
|
"lang": {
|
|
|
|
"type": "string"
|
|
|
|
},
|
2019-02-27 12:10:26 +00:00
|
|
|
"password": {
|
|
|
|
"type": "string",
|
|
|
|
"required": true
|
|
|
|
},
|
2020-09-21 11:24:43 +00:00
|
|
|
"bcryptPassword": {
|
|
|
|
"type": "string"
|
|
|
|
},
|
2019-02-27 12:10:26 +00:00
|
|
|
"active": {
|
|
|
|
"type": "boolean"
|
|
|
|
},
|
|
|
|
"email": {
|
|
|
|
"type": "string"
|
|
|
|
},
|
|
|
|
"created": {
|
|
|
|
"type": "date"
|
|
|
|
},
|
|
|
|
"updated": {
|
|
|
|
"type": "date"
|
2020-11-11 09:52:35 +00:00
|
|
|
},
|
|
|
|
"image": {
|
|
|
|
"type": "String"
|
2019-02-27 12:10:26 +00:00
|
|
|
}
|
|
|
|
},
|
2020-09-21 11:24:43 +00:00
|
|
|
"relations": {
|
|
|
|
"role": {
|
|
|
|
"type": "belongsTo",
|
|
|
|
"model": "Role",
|
|
|
|
"foreignKey": "roleFk"
|
|
|
|
},
|
|
|
|
"roles": {
|
|
|
|
"type": "hasMany",
|
|
|
|
"model": "RoleRole",
|
2020-10-30 23:02:27 +00:00
|
|
|
"foreignKey": "role",
|
|
|
|
"primaryKey": "roleFk"
|
2020-09-21 11:24:43 +00:00
|
|
|
},
|
|
|
|
"emailUser": {
|
|
|
|
"type": "hasOne",
|
|
|
|
"model": "EmailUser",
|
|
|
|
"foreignKey": "userFk"
|
2019-07-03 09:08:44 +00:00
|
|
|
},
|
|
|
|
"worker": {
|
|
|
|
"type": "hasOne",
|
|
|
|
"model": "Worker",
|
|
|
|
"foreignKey": "userFk"
|
2020-09-21 11:24:43 +00:00
|
|
|
}
|
|
|
|
},
|
|
|
|
"acls": [
|
|
|
|
{
|
2019-02-27 12:10:26 +00:00
|
|
|
"property": "login",
|
|
|
|
"accessType": "EXECUTE",
|
|
|
|
"principalType": "ROLE",
|
|
|
|
"principalId": "$everyone",
|
|
|
|
"permission": "ALLOW"
|
2020-09-21 11:24:43 +00:00
|
|
|
}, {
|
2019-02-27 12:10:26 +00:00
|
|
|
"property": "logout",
|
|
|
|
"accessType": "EXECUTE",
|
|
|
|
"principalType": "ROLE",
|
|
|
|
"principalId": "$authenticated",
|
|
|
|
"permission": "ALLOW"
|
2020-09-21 11:24:43 +00:00
|
|
|
}, {
|
2019-02-27 12:10:26 +00:00
|
|
|
"property": "validateToken",
|
|
|
|
"accessType": "EXECUTE",
|
|
|
|
"principalType": "ROLE",
|
|
|
|
"principalId": "$authenticated",
|
|
|
|
"permission": "ALLOW"
|
2020-09-21 11:24:43 +00:00
|
|
|
}
|
|
|
|
]
|
2017-10-13 14:22:45 +00:00
|
|
|
}
|