const schema = {
// default properties
_id: {
type: String,
optional: true,
canRead: ['guests'],
},
createdAt: {
type: Date,
optional: true,
canRead: ['guests'],
onCreate: ({ newDocument, currentUser}) => {
return new Date();
}
},
name: {
type: String,
canRead: ['guests'],
canCreate: ['admins'],
canUpdate: ['admins']
},
glyph: {
type: String,
canRead: ['guests'],
canCreate: ['admins'],
canUpdate: ['admins']
},
description: {
type: String,
canRead: ['guests'],
canCreate: ['admins'],
canUpdate: ['admins']
},
sheeeetUrl: {
type: String,
canRead: ['guests'],
canCreate: ['admins'],
canUpdate: ['admins']
},
};
export default schema;