{ "name": "Account", "base": "VnModel", "options": { "mysql": { "table": "account.user" } }, "properties": { "id": { "type": "number", "id": true }, "name": { "type": "string", "required": true }, "roleFk": { "type": "number", "mysql": { "columnName": "role" } }, "nickname": { "type": "string" }, "lang": { "type": "string" }, "password": { "type": "string", "required": true }, "bcryptPassword": { "type": "string" }, "active": { "type": "boolean" }, "email": { "type": "string" }, "created": { "type": "date" }, "updated": { "type": "date" }, "image": { "type": "string" }, "hasGrant": { "type": "boolean" } }, "relations": { "role": { "type": "belongsTo", "model": "Role", "foreignKey": "roleFk" }, "roles": { "type": "hasMany", "model": "RoleRole", "foreignKey": "role", "primaryKey": "roleFk" }, "emailUser": { "type": "hasOne", "model": "EmailUser", "foreignKey": "userFk" }, "worker": { "type": "hasOne", "model": "Worker", "foreignKey": "userFk" }, "userConfig": { "type": "hasOne", "model": "UserConfig", "foreignKey": "userFk" } }, "acls": [ { "property": "login", "accessType": "EXECUTE", "principalType": "ROLE", "principalId": "$everyone", "permission": "ALLOW" }, { "property": "logout", "accessType": "EXECUTE", "principalType": "ROLE", "principalId": "$authenticated", "permission": "ALLOW" }, { "property": "validateToken", "accessType": "EXECUTE", "principalType": "ROLE", "principalId": "$authenticated", "permission": "ALLOW" } ] }