@universis/candidates
Version:
Universis api server plugin for study program candidates, internship selection etc
151 lines (150 loc) • 4.53 kB
JSON
{
"$schema": "https://themost-framework.github.io/themost/models/2018/2/schema.json",
"name": "CandidateUser",
"title": "Candidates User Data",
"hidden": true,
"sealed": true,
"abstract": false,
"version": "1.0",
"source": "CandidateUserBase",
"view": "CandidateUserBase",
"fields": [
{
"name": "id",
"title": "Id",
"description": "The identifier of the item.",
"type": "Integer",
"nullable": false,
"primary": true,
"value": "javascript:return this.newid();"
},
{
"name": "name",
"title": "Name",
"description": "The name of the item.",
"type": "Text",
"nullable": false
},
{
"name": "password",
"title": "password",
"description": "The password of the item.",
"type": "Text",
"nullable": false,
"value": "javascript:return this.chars(32);"
},
{
"@id": "http://schema.org/description",
"name": "description",
"title": "description",
"description": "A description of the item.",
"type": "Text"
},
{
"name": "email",
"title": "Email Address",
"description": "The email address of the item",
"type": "Text",
"size": 50
},
{
"name": "externalAuthentication",
"title": "External Authentication",
"description": "External authentication flag.",
"type": "Integer",
"value": "javascript:return -1"
},
{
"name": "authenticationProvider",
"title": "Authentication Provider URL",
"description": "Authentication Provider URL",
"type": "Text",
"size": 160
},
{
"name": "activationCode",
"title": "Activation Code",
"description": "Activation Code",
"type": "Text",
"size": 120,
"value": "javascript:return require('@themost/common').Guid.newGuid().toString().substr(24);"
},
{
"name": "useActivationCode",
"title": "Use Activation Code",
"description": "Use Activation Code",
"type": "Integer",
"value": "javascript:return -1"
},
{
"name": "providerType",
"title": "Provider Type",
"description": "Provider Type",
"type": "Integer"
},
{
"name": "enabled",
"title": "Enabled",
"description": "Indicates whether a user is enabled or not.",
"type": "Boolean",
"nullable": false,
"value": "javascript:return -1;"
},
{
"name": "groups",
"title": "User Groups",
"description": "A collection of groups where user belongs.",
"type": "Group",
"mapping": {
"associationAdapter": "GroupMembers",
"parentModel": "Group",
"parentField": "id",
"childModel": "CandidateUser",
"childField": "id",
"associationType": "junction",
"cascade": "delete",
"select": [
"id",
"name",
"alternateName"
],
"privileges": [
{
"mask": 15,
"type": "global"
},
{
"mask": 15,
"type": "global",
"account": "Administrators"
},
{
"mask": 1,
"type": "self",
"filter": "valueId eq me()"
}
]
}
}
],
"constraints": [
{
"type": "unique",
"description": "User name must be unique for a specific user account.",
"fields": [
"name"
]
}
],
"privileges": [
{
"mask": 15,
"type": "global"
}
],
"eventListeners": [
{
"type": "./listeners/candidate-user-listener"
}
]
}