{ "name": "Disciplina", "plural": "disciplinas", "base": "PersistedModel", "properties": { "codigo": { "type": "String", "required": true, "length": 64, "precision": null, "scale": null }, "carga_horaria": { "type": "Number", "required": true, "precision": null, "scale": null, "default": 0 }, "duracao": { "type": "String", "required": true, "length": 64, "precision": null, "scale": null, "default": "semestral" }, "modalidade": { "type": "String", "required": true, "length": 64, "precision": null, "scale": null, "default": "presencial" } }, "validations": [], "relations": { "turmas": { "type": "hasMany", "model": "Turma", "foreignKey": "disciplinaId", "required": true }, "recursosnecessarios": { "type": "hasAndBelongsToMany", "model": "Recursodesala", "foreignKey": "" }, "tipo_sala_necessaria": { "type": "belongsTo", "model": "Tipodesala", "foreignKey": "tipodesalaId" } }, "acls": [ { "principalType": "ROLE", "principalId": "$everyone", "permission": "DENY", "property": "*" }, { "accessType": "READ", "principalType": "ROLE", "principalId": "$everyone", "permission": "ALLOW" }, { "principalType": "ROLE", "principalId": "admin", "permission": "ALLOW", "property": "*" } ], "methods": { "prototype.addEquivalencia": { "accepts": [ { "arg": "disciplina_eq_id", "type": "number" } ], "returns": { "arg": "data", "type": "string" }, "http": { "verb": "post", "path": "/addEquivalencia" } }, "prototype.getEquivalencias": { "accepts": [], "returns": { "arg": "data", "type": "string" }, "http": { "verb": "get", "path": "/getEquivalencias" } }, "prototype.deleteEquivalencia": { "accepts": [ { "arg": "disciplina_eq_id", "type": "number" } ], "returns": { "arg": "data", "type": "string" }, "http": { "verb": "post", "path": "/deleteEquivalencia" } } } }