{
    "$schema": "https://themost-framework.github.io/themost/models/2018/2/schema.json",
    "@id": "http://schema.org/ClassInstructorEvaluationEvent",
    "name": "ClassInstructorEvaluationEvent",
    "title": "ClassInstructorEvaluationEvents",
    "abstract": false,
    "sealed": false,
    "inherits": "EvaluationEvent",
    "classPath": "./models/class-instructor-evaluation-event-model",
    "version": "1.4",
    "fields": [
        {
            "@id": "http://schema.org/courseClassInstructor",
            "name": "courseClassInstructor",
            "title": "Course Class Instructor",
            "type": "CourseClassInstructor",
            "nullable": false,
            "expandable": true
        },
        {
            "@id": "http://schema.org/organizer",
            "name": "organizer",
            "title": "organizer",
            "description": "An organizer of an Event.",
            "type": "Department",
            "nullable": false
        },
        {
            "name": "additionalType",
            "title": "Additional Type",
            "description": "An additional type for the item, typically used for adding more specific types from external vocabularies in microdata syntax. This is a relationship between something and a class that the thing is in. In RDFa syntax, it is better to use the native RDFa syntax - the 'typeof' attribute - for multiple types. Schema.org tools may have only weaker understanding of extra types, in particular those defined externally.",
            "type": "Text",
            "readonly": true,
            "value": "javascript:return this.model.name;"
        },
        {
            "name": "tokens",
            "title": "Evaluation tokens",
            "type": "EvaluationAccessToken",
            "many": true,
            "mapping": {
                "parentModel": "ClassInstructorEvaluationEvent",
                "childModel": "EvaluationAccessToken",
                "parentField": "id",
                "childField": "evaluationEvent",
                "cascade": "delete",
                "associationType": "association"
            }
        },
        {
            "name": "actions",
            "title": "Generate token actions",
            "type": "GenerateTokenAction",
            "many": true,
            "mapping": {
                "parentModel": "ClassInstructorEvaluationEvent",
                "childModel": "GenerateInstructorTokenAction",
                "parentField": "id",
                "childField": "event",
                "cascade": "delete",
                "associationType": "association"
            }
        },
        {
            "name": "sendActions",
            "title": "Send token actions",
            "type": "SendTokenAction",
            "many": true,
            "mapping": {
                "parentModel": "ClassInstructorEvaluationEvent",
                "childModel": "SendInstructorTokenAction",
                "parentField": "id",
                "childField": "event",
                "cascade": "delete",
                "associationType": "association"
            }
        },
        {
            "name": "numberOfStudents",
            "title": "Μέγιστος αριθμός φοιτητών",
            "description": "Αριθμός φοιτητών που μπορούν να αξιολογήσουν",
            "type": "Integer",
            "nullable": true
        }
    ],
    "eventListeners": [
        {
            "type": "@themost/data/previous-state-listener"
        },
        {
            "type": "./listeners/class-instructor-event-listener"
        }
    ],
    "privileges": [
        {
            "mask": 15,
            "type": "global"
        },
        {
            "mask": 31,
            "type": "global",
            "account": "Administrators"
        },
        {
            "mask": 17,
            "type": "self",
            "account": "Registrar",
            "filter": "courseClassInstructor/courseClass/course/department eq departments()",
            "scope": [
                "qa"
            ]
        },
        {
            "mask": 31,
            "type": "global",
            "account": "QualityAssuranceUnit"
        },
        {
            "mask": 31,
            "type": "self",
            "account": "QualityAssuranceDepartment",
            "filter": "courseClassInstructor/courseClass/course/department eq departments()",
            "scope": [
                "qa"
            ]
        },
        {
            "mask": 17,
            "type": "self",
            "account": "Instructors",
            "filter": "courseClassInstructor/instructor eq instructor()",
            "scope": [
                "teachers"
            ]
        }
    ]
}
