2017-12-17 17:42:06 +09:00
|
|
|
const schema = {
|
|
|
|
createdAt: {
|
|
|
|
type: Date,
|
2018-01-04 11:56:50 +09:00
|
|
|
viewableBy: ['guests'],
|
2017-12-18 09:01:24 +09:00
|
|
|
optional: true,
|
|
|
|
onInsert: () => {
|
|
|
|
return new Date()
|
|
|
|
}
|
2017-12-17 17:42:06 +09:00
|
|
|
},
|
|
|
|
name: {
|
|
|
|
type: String,
|
2018-01-04 11:56:50 +09:00
|
|
|
viewableBy: ['guests'],
|
2017-12-18 09:01:24 +09:00
|
|
|
insertableBy: ['guests'],
|
|
|
|
},
|
|
|
|
userId: {
|
|
|
|
type: String,
|
|
|
|
optional: true,
|
2017-12-17 17:42:06 +09:00
|
|
|
},
|
|
|
|
description: {
|
|
|
|
type: String,
|
|
|
|
optional: true,
|
|
|
|
},
|
|
|
|
unique: {
|
|
|
|
type: Boolean,
|
|
|
|
optional: true,
|
|
|
|
},
|
|
|
|
important: {
|
|
|
|
// marking an event as important means it should never be erased
|
|
|
|
type: Boolean,
|
|
|
|
optional: true,
|
|
|
|
},
|
|
|
|
properties: {
|
|
|
|
type: Object,
|
|
|
|
optional: true,
|
|
|
|
blackbox: true,
|
2018-01-04 11:56:50 +09:00
|
|
|
viewableBy: ['guests'],
|
2017-12-18 09:01:24 +09:00
|
|
|
insertableBy: ['guests'],
|
2017-12-17 17:42:06 +09:00
|
|
|
},
|
|
|
|
};
|
|
|
|
|
|
|
|
export default schema;
|