@universis/dining
Version:
Universis api for dining
160 lines (159 loc) • 3.84 kB
JSON
{
"$schema": "https://themost-framework.github.io/themost/models/2018/2/schema.json",
"@id": "http://schema.org/DiningPlace",
"name": "DiningPlace",
"title": "DiningPlace",
"abstract": false,
"sealed": false,
"implements": "Place",
"version": "1.4",
"fields": [
{
"name": "tags",
"title": "Place tags",
"description": "Contains a collection of tags for the Place",
"type": "Text",
"many": true,
"mapping": {
"associationType": "junction",
"associationObjectField": "place",
"associationValueField": "value",
"associationAdapter": "DiningPlaceTags",
"cascade": "delete",
"privileges": [
{
"mask": 1,
"type": "global",
"account": "*"
},
{
"mask": 15,
"type": "global"
},
{
"mask": 15,
"type": "global",
"account": "Administrators"
}
]
}
},
{
"name": "departments",
"title": "Departments",
"description": "A collection of related departments.",
"type": "Department",
"mapping": {
"associationAdapter": "DiningPlaceDepartments",
"parentModel": "Department",
"parentField": "id",
"childModel": "DiningPlace",
"childField": "id",
"associationType": "junction",
"privileges": [
{
"mask": 1,
"type": "global",
"account": "Students"
},
{
"mask": 15,
"type": "global",
"account": "Administrators"
},
{
"mask": 15,
"type": "global",
"account": "DiningAdministrators"
},
{
"mask": 1,
"type": "global",
"account": "DiningUsers"
}
]
}
},
{
"name": "ancestors",
"type": "PlaceHierarchy",
"mapping": {
"associationType": "association",
"parentModel": "DiningPlace",
"parentField": "id",
"childModel": "PlaceHierarchy",
"childField": "descendant"
}
},
{
"name": "descendants",
"type": "PlaceHierarchy",
"mapping": {
"associationType": "association",
"parentModel": "DiningPlace",
"parentField": "id",
"childModel": "PlaceHierarchy",
"childField": "ancestor"
}
},
{
"name": "locale",
"type": "DiningPlaceLocale",
"readonly": true,
"editable": false,
"many": true,
"expandable": true,
"multiplicity": "ZeroOrOne",
"mapping": {
"associationType": "association",
"cascade": "delete",
"parentModel": "DiningPlace",
"parentField": "id",
"childModel": "DiningPlaceLocale",
"childField": "object",
"options": {
"$filter": "inLanguage eq lang()",
"$first": true
}
}
},
{
"name": "locales",
"type": "DiningPlaceLocale",
"mapping": {
"associationType": "association",
"cascade": "delete",
"parentModel": "DiningPlace",
"parentField": "id",
"childModel": "DiningPlaceLocale",
"childField": "object"
}
}
],
"privileges": [
{
"mask": 15,
"type": "global"
},
{
"mask": 1,
"type": "global",
"account": "*"
},
{
"mask": 15,
"type": "global",
"account": "Administrators"
},
{
"mask": 15,
"type": "global",
"account": "DiningAdministrators"
}
],
"eventListeners": [
{
"type": "./listeners/data-localization"
}
]
}