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