professor.json 1.42 KB
Newer Older
Bruno Meyer's avatar
Bruno Meyer committed
1 2 3 4 5 6 7 8 9 10 11
{
  "name": "Professor",
  "plural": "professores",
  "base": "PersistedModel",
  "idInjection": false,
  "options": {
    "validateUpsert": true
  },
  "properties": {
    "codigo": {
      "type": "string",
12 13
      "id": true,
      "required": true
Bruno Meyer's avatar
Bruno Meyer committed
14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35
    },
    "nome": {
      "type": "string",
      "required": true
    },
    "website": {
      "type": "string"
    },
    "email": {
      "type": "string"
    },
    "_id": {
      "type": "number",
      "generated": true
    }
  },
  "validations": [],
  "relations": {
    "departamento": {
      "type": "belongsTo",
      "model": "Departamento",
      "foreignKey": "departamentoCod"
36 37 38 39
    },
    "turmas": {
      "type": "hasAndBelongsToMany",
      "model": "Turma"
Bruno Meyer's avatar
Bruno Meyer committed
40 41 42 43 44 45 46 47 48
    }
  },
  "acls": [
    {
      "principalType": "ROLE",
      "principalId": "$everyone",
      "permission": "DENY",
      "property": "*"
    },
Odair M.'s avatar
Odair M. committed
49 50 51 52 53 54
    {
      "principalType": "ROLE",
      "principalId": "comissao",
      "permission": "ALLOW",
      "property": "*"
    },
Bruno Meyer's avatar
Bruno Meyer committed
55 56 57 58 59
    {
      "principalType": "ROLE",
      "principalId": "admin",
      "permission": "ALLOW",
      "property": "*"
Matheus Horstmann's avatar
Matheus Horstmann committed
60
    },
Odair M.'s avatar
Odair M. committed
61 62 63 64 65 66
    {
      "principalType": "ROLE",
      "principalId": "secretario_dpto",
      "permission": "ALLOW",
      "property": "*"
    },
Matheus Horstmann's avatar
Matheus Horstmann committed
67 68 69 70 71 72
    {
      "accessType": "EXECUTE",
      "principalType": "ROLE",
      "principalId": "$everyone",
      "permission": "ALLOW",
      "property": "search"
Bruno Meyer's avatar
Bruno Meyer committed
73 74 75 76
    }
  ],
  "methods": {}
}