salix/back/models/vn-user.json

149 lines
2.6 KiB
JSON
Raw Permalink Normal View History

2017-10-13 14:22:45 +00:00
{
"name": "VnUser",
"base": "User",
"validateUpsert": true,
"options": {
"mysql": {
"table": "account.user"
}
2020-09-21 11:24:43 +00:00
},
"resetPasswordTokenTTL": "604800",
"properties": {
"id": {
"type": "number",
"id": true
},
"name": {
2023-01-31 13:57:24 +00:00
"type": "string",
"required": true
},
"username": {
"type": "string"
2023-01-31 13:57:24 +00:00
},
"roleFk": {
"type": "number",
"mysql": {
"columnName": "role"
}
},
"nickname": {
"type": "string"
},
"lang": {
"type": "string"
},
"active": {
"type": "boolean"
},
"email": {
"type": "string"
},
2023-10-16 13:58:25 +00:00
"emailVerified": {
"type": "boolean"
},
"created": {
"type": "date"
},
"updated": {
"type": "date"
2020-11-11 09:52:35 +00:00
},
"image": {
2022-05-12 07:47:47 +00:00
"type": "string"
},
"hasGrant": {
"type": "boolean"
2023-04-06 12:59:25 +00:00
},
2023-04-27 13:18:27 +00:00
"passExpired": {
"type": "date"
},
2023-04-06 12:59:25 +00:00
"twoFactor": {
"type": "string"
}
},
2020-09-21 11:24:43 +00:00
"relations": {
"role": {
"type": "belongsTo",
"model": "Role",
"foreignKey": "roleFk"
},
"roles": {
"type": "hasMany",
"model": "RoleRole",
"foreignKey": "role",
"primaryKey": "roleFk"
2020-09-21 11:24:43 +00:00
},
"emailUser": {
"type": "hasOne",
"model": "EmailUser",
"foreignKey": "userFk"
},
"worker": {
"type": "hasOne",
"model": "Worker",
2023-09-21 10:50:07 +00:00
"foreignKey": "id"
},
"userConfig": {
"type": "hasOne",
"model": "UserConfig",
"foreignKey": "userFk"
2020-09-21 11:24:43 +00:00
}
},
"acls": [
{
"property": "signIn",
"accessType": "EXECUTE",
"principalType": "ROLE",
"principalId": "$everyone",
"permission": "ALLOW"
2022-09-21 13:15:19 +00:00
},
{
"property": "recoverPassword",
"accessType": "EXECUTE",
"principalType": "ROLE",
"principalId": "$everyone",
"permission": "ALLOW"
},
2021-06-29 13:31:58 +00:00
{
2022-09-21 13:15:19 +00:00
"property": "validateToken",
"accessType": "EXECUTE",
"principalType": "ROLE",
"principalId": "$authenticated",
"permission": "ALLOW"
},
2023-04-06 12:59:25 +00:00
{
"property": "validateAuth",
"accessType": "EXECUTE",
"principalType": "ROLE",
"principalId": "$everyone",
"permission": "ALLOW"
},
{
"property": "privileges",
"accessType": "*",
"principalType": "ROLE",
"principalId": "$authenticated",
"permission": "ALLOW"
}
2023-04-27 13:06:05 +00:00
],
"scopes": {
"preview": {
"fields": [
"id",
"name",
"username",
"roleFk",
"nickname",
"lang",
"active",
"created",
"updated",
"image",
"hasGrant",
"realm",
2023-10-16 13:58:25 +00:00
"email",
"emailVerified"
]
2023-04-27 13:06:05 +00:00
}
}
2017-10-13 14:22:45 +00:00
}