@universis/dining
Version:
Universis api for dining
184 lines (183 loc) • 4.59 kB
JSON
{
"$schema": "https://themost-framework.github.io/themost/models/2018/2/schema.json",
"@id": "https://universis.io/schemas/StudentDiningCard",
"name": "StudentDiningCard",
"title": "Κάρτα Σίτισης φοιτητή",
"hidden": false,
"sealed": false,
"version": "1.2",
"source": "StudentDiningCardBase",
"view": "StudentDiningCardData",
"classPath": "./models/StudentDiningCard",
"fields": [
{
"name": "id",
"title": "Κωδικός",
"description": "Ο κωδικός της εγγραφής",
"type": "Counter",
"primary": true
},
{
"name": "action",
"title": "Action",
"description": "The action associated with this card.",
"type": "DiningRequestAction",
"nullable": false
},
{
"name": "student",
"title": "Φοιτητής",
"description": "Ο φοιτητής",
"type": "Student",
"nullable": false,
"editable": false
},
{
"@id": "https://universis.io/properties/academicYear",
"name": "academicYear",
"title": "Academic year",
"type": "AcademicYear",
"expandable": true,
"nullable": false
},
{
"@id": "https://universis.io/properties/academicPeriod",
"name": "academicPeriod",
"title": "Academic period",
"type": "AcademicPeriod",
"expandable": true,
"nullable": true
},
{
"name": "serialNumber",
"title": "Number",
"type": "Integer",
"nullable": false,
"value": "javascript:return this.newid();"
},
{
"name": "dateCreated",
"title": "Date Created",
"description": "The date on which this item was created.",
"type": "DateTime",
"value": "javascript:return (new Date());",
"readonly": true
},
{
"@id": "http://schema.org/validFrom",
"name": "validFrom",
"title": "validFrom",
"description": "The date when the item becomes valid.",
"type": "DateTime",
"nullable": false
},
{
"@id": "http://schema.org/validThrough",
"name": "validThrough",
"title": "validThrough",
"description": "The date after when the item is not valid.",
"type": "DateTime",
"nullable": false
},
{
"@id": "https://universis.io/schemas/active",
"name": "active",
"type": "Boolean",
"value": "javascript:return false;",
"nullable": false
},
{
"name": "dateCancelled",
"title": "Date Cancelled",
"description": "The date on which this item was cancelled.",
"type": "DateTime",
"nullable": true
},
{
"name": "cancelReason",
"title": "Λόγοι ακύρωσης",
"description": "Λόγοι ακύρωσης",
"type": "Text",
"size": 255,
"many": false,
"nullable": true
},
{
"name": "notes",
"title": "Σημειώσεις",
"description": "Σημειώσεις",
"type": "Text",
"size": 255,
"many": false,
"nullable": true
},
{
"@id": "http://schema.org/location",
"name": "location",
"title": "location",
"description": "The location of for example where the event is happening, an organization is located, or where an action takes place.",
"type": "DiningPlace"
},
{
"name": "dateModified",
"title": "Ημερομηνία τροποποίησης",
"description": "Ημερομηνία τροποποίησης",
"type": "DateTime",
"nullable": false,
"value": "javascript:return new Date();",
"calculation": "javascript:return this.now();"
}
],
"constraints": [
{
"type": "unique",
"description": "Student and academicYear must be unique across different records",
"fields": [
"student",
"academicYear"
]
}
],
"eventListeners": [
{
"type": "@themost/data/previous-state-listener"
},
{
"type": "./listeners/StudentDiningCardSaveListener"
},
{
"type": "./listeners/OnCancelDiningCardListener"
},
{
"type": "./listeners/SendEmailAfterCardStatusChangeListener"
}
],
"privileges": [
{
"mask": 31,
"type": "global"
},
{
"mask": 15,
"type": "global",
"account": "Administrators"
},
{
"mask": 31,
"type": "global",
"account": "DiningAdministrators"
},
{
"mask": 15,
"type": "self",
"filter": "student/department eq departments()",
"account": "DiningUsers"
},
{
"mask": 1,
"type": "self",
"account": "Students",
"filter": "student/user eq me()"
}
]
}