UNPKG

@universis/candidates

Version:

Universis api server plugin for study program candidates, internship selection etc

363 lines (361 loc) 10.2 kB
{ "$schema": "https://themost-framework.github.io/themost/models/2018/2/schema.json", "@id": "https://universis.io/schemas/StudyProgramRegisterAction", "name": "StudyProgramRegisterAction", "title": "StudyProgramRegisterAction", "hidden": false, "sealed": false, "abstract": false, "inherits": "RegisterAction", "version": "0.6", "classPath": "./models/StudyProgramRegisterAction", "fields": [ { "@id": "http://schema.org/additionalType", "name": "additionalType", "readonly": true, "nullable": false, "value": "javascript:return this.model.name;" }, { "@id": "http://schema.org/actionStatus", "name": "actionStatus", "title": "actionStatus", "description": "Indicates the current disposition of the Action.", "type": "ActionStatusType", "value": "javascript:return { alternateName:'PotentialActionStatus' };" }, { "@id": "https://universis.io/studyProgram", "name": "studyProgram", "title": "Study program", "description": "The study program that candidate applies for", "type": "StudyProgram", "nullable": false }, { "@id": "https://universis.io/studyProgram", "name": "specialization", "title": "Study program specialization", "description": "The study program specialization that candidate applies for", "type": "StudyProgramSpecialty" }, { "@id": "https://universis.io/inscriptionYear", "name": "inscriptionYear", "title": "Academic year", "description": "Academic year", "type": "AcademicYear", "nullable": false }, { "@id": "https://universis.io/inscriptionPeriod", "name": "inscriptionPeriod", "title": "Academic period", "description": "Academic period", "type": "AcademicPeriod", "nullable": false }, { "@id": "https://universis.io/studyProgramEnrollmentEvent", "name": "studyProgramEnrollmentEvent", "title": "Study program enrollment event", "description": "Study program enrollment event", "type": "StudyProgramEnrollmentEvent", "nullable": true }, { "@id": "http://schema.org/object", "name": "candidate", "title": "Candidate", "description": "The candidate of this study program registration", "type": "CandidateStudent", "nullable": false, "editable": false, "expandable": true }, { "@id": "https://universis.io/agree", "name": "agree", "title": "Agreement", "description": "Agree with terms and conditions", "type": "Boolean", "nullable": false, "value": "javascript:return 0;" }, { "@id": "http://schema.org/agent", "name": "agent", "title": "agent", "description": "The direct performer or driver of the action (animate or inanimate). e.g. <em>John</em> wrote a book.", "type": "User" }, { "@id": "https://themost.io/schemas/attachments", "name": "attachments", "type": "Attachment", "mapping": { "cascade": "delete", "associationType": "junction", "associationObjectField": "action", "associationValueField": "attachment", "associationAdapter": "StudyProgramRegisterActionAttachments", "privileges": [ { "mask": 15, "type": "global", "account": "Administrators" }, { "mask": 15, "type": "global", "account": "Registrar" }, { "mask": 1, "type": "self", "filter": "action/owner eq me()", "account": "Candidates" }, { "mask": 14, "type": "self", "account": "Candidates", "filter": "action/owner eq me() and action/actionStatus/alternateName eq 'PotentialActionStatus' and action/agree eq 1" }, { "mask": 1, "type": "self", "filter": "action/owner eq me()", "account": "Students" }, { "mask": 14, "type": "self", "account": "Students", "filter": "action/owner eq me() and action/actionStatus/alternateName eq 'PotentialActionStatus' and action/agree eq 1" }, { "mask": 1, "type": "global", "account": "CandidateViewers" } ] } }, { "name": "messages", "title": "Messages", "type": "Message", "many": true, "mapping": { "parentModel": "StudyProgramRegisterAction", "childModel": "StudyProgramRegisterActionMessage", "parentField": "id", "childField": "action", "cascade": "delete", "associationType": "association" } }, { "@id": "http://schema.org/review", "name": "review", "title": "A review for this item", "type": "Review", "multiplicity": "ZeroOrOne", "many": true, "mapping": { "associationType": "association", "parentModel": "StudyProgramRegisterAction", "parentField": "id", "childModel": "StudyProgramRegisterActionReview", "childField": "itemReviewed" } }, { "name": "reviews", "title": "Reviews for this item", "type": "Review", "many": true, "mapping": { "associationType": "association", "parentModel": "StudyProgramRegisterAction", "parentField": "id", "childModel": "StudyProgramRegisterActionReview", "childField": "itemReviewed" } }, { "name": "accepted", "type": "Number", "readonly": true, "editable": false }, { "name": "rejected", "type": "Number", "readonly": true, "editable": false } ], "views": [ { "name": "requests", "description": "This view contains the fields that is going to used for requests.", "fields": [ { "name": "id", "property": "id" }, { "name": "candidate/person/familyName", "property": "familyName" }, { "name": "candidate/person/givenName", "property": "givenName" }, { "name": "candidate/id", "property": "candidateIdentifier" }, { "name": "studyProgram/name", "property": "studyProgramName" }, { "name": "specialization", "property": "specialization" }, { "name": "candidate/inscriptionNumber", "property": "inscriptionNumber" }, { "name": "inscriptionYear/alternateName", "property": "inscriptionYear" }, { "name": "inscriptionPeriod/name", "property": "inscriptionPeriod" }, { "name": "dateCreated", "property": "dateCreated" }, { "name": "endTime", "property": "endTime" }, { "name": "dateModified", "property": "dateModified" }, { "name": "agent/name", "property": "agentName" }, { "name": "actionStatus/alternateName", "property": "actionStatus" }, { "name": "owner", "property": "owner" }, { "name": "candidate/person/email", "property": "email" }, { "name": "studyProgramEnrollmentEvent/inscriptionYear/id", "property": "inscriptionYearId" }, { "name": "candidate/department/currentYear/id", "property": "currentYear" }, { "name": "candidate/inscriptionMode/alternateName", "property": "inscriptionModeAlternateName" }, { "name": "studyProgramEnrollmentEvent", "property": "studyProgramEnrollmentEvent" } ], "privileges": [ { "mask": 1, "type": "global", "account": "CandidateViewers" } ] } ], "privileges": [ { "mask": 31, "type": "global" }, { "mask": 31, "type": "global", "account": "Administrators" }, { "mask": 1, "type": "self", "filter": "owner eq me()", "account": "Candidates" }, { "mask": 1, "type": "self", "filter": "owner eq me()", "account": "Students" }, { "mask": 15, "type": "self", "account": "Registrar", "filter": "studyProgram/department eq departments()" }, { "mask": 6, "type": "self", "when": "owner eq me() and agent eq null and actionStatus/alternateName eq 'PotentialActionStatus'", "filter": "owner eq me() and agent eq null and (actionStatus/alternateName eq 'PotentialActionStatus' or actionStatus/alternateName eq 'ActiveActionStatus')", "account": "Candidates" }, { "mask": 6, "type": "self", "when": "owner eq me() and agent eq null and actionStatus/alternateName eq 'PotentialActionStatus'", "filter": "owner eq me() and agent eq null and (actionStatus/alternateName eq 'PotentialActionStatus' or actionStatus/alternateName eq 'ActiveActionStatus')", "account": "Students" } ], "constraints": [ ], "eventListeners": [ { "type": "@themost/data/previous-state-listener" }, { "type": "./listeners/validate-enrollment-period-listener" }, { "type": "./listeners/validate-consent-listener" }, { "type": "./listeners/save-candidate-on-register-action-insertion" }, { "type": "./listeners/set-submission-time-listener" }, { "type": "./listeners/send-mail-after-status-change" } ] }