UNPKG

openframe-apiserver

Version:
84 lines (83 loc) 1.69 kB
{ "name": "Channel", "plural": "channels", "base": "PersistedModel", "idInjection": true, "options": { "validateUpsert": true }, "mixins": { "Timestamp": {}, "IsPublicOrOwner": {} }, "properties": { "name": { "type": "string", "required": true }, "description": { "type": "string", "required": false }, "is_public": { "type": "boolean", "required": true, "default": true }, "thumb_url": { "type": "string" } }, "validations": [], "relations": { "owner": { "type": "belongsTo", "model": "OpenframeUser", "foreignKey": "ownerId" }, "managers": { "type": "hasAndBelongsToMany", "model": "OpenframeUser", "foreignKey": "managersId", "through": "ChannelManager" }, "subscribers": { "type": "hasAndBelongsToMany", "model": "OpenframeUser", "foreignKey": "subscribersId", "through": "ChannelSubscriber" }, "current_artwork": { "type": "embedsOne", "model": "Artwork", "property": "current_artwork" } }, "acls": [ { "accessType": "*", "principalType": "ROLE", "principalId": "$everyone", "permission": "DENY" }, { "accessType": "READ", "principalType": "ROLE", "principalId": "$everyone", "permission": "ALLOW" }, { "accessType": "WRITE", "principalType": "ROLE", "principalId": "$owner", "permission": "ALLOW" }, { "accessType": "*", "principalType": "ROLE", "principalId": "admin", "permission": "ALLOW" } ], "methods": {} }