mirror of
https://github.com/vale981/Vulcan
synced 2025-03-10 12:36:39 -04:00
61 lines
No EOL
893 B
JavaScript
61 lines
No EOL
893 B
JavaScript
const schema = {
|
|
|
|
_id: {
|
|
type: String,
|
|
canRead: ['guests'],
|
|
},
|
|
|
|
/**
|
|
The id of the document that was voted on
|
|
*/
|
|
documentId: {
|
|
type: String,
|
|
canRead: ['guests'],
|
|
},
|
|
|
|
/**
|
|
The name of the collection the document belongs to
|
|
*/
|
|
collectionName: {
|
|
type: String,
|
|
canRead: ['guests'],
|
|
},
|
|
|
|
/**
|
|
The id of the user that voted
|
|
*/
|
|
userId: {
|
|
type: String,
|
|
canRead: ['guests'],
|
|
},
|
|
|
|
/**
|
|
An optional vote type (for Facebook-style reactions)
|
|
*/
|
|
voteType: {
|
|
type: String,
|
|
optional: true,
|
|
canRead: ['guests'],
|
|
},
|
|
|
|
/**
|
|
The vote power (e.g. 1 = upvote, -1 = downvote, or any other value)
|
|
*/
|
|
power: {
|
|
type: Number,
|
|
optional: true,
|
|
canRead: ['guests'],
|
|
},
|
|
|
|
/**
|
|
The vote timestamp
|
|
*/
|
|
votedAt: {
|
|
type: Date,
|
|
optional: true,
|
|
canRead: ['guests'],
|
|
}
|
|
|
|
};
|
|
|
|
export default schema; |