mirror of
https://github.com/paricafe/misskey.git
synced 2024-11-25 16:36:44 -06:00
15 lines
344 B
TypeScript
15 lines
344 B
TypeScript
import * as mongo from 'mongodb';
|
|
import db from '../db/mongodb';
|
|
|
|
const PollVote = db.get<IPollVote>('pollVotes');
|
|
PollVote.createIndex('userId');
|
|
PollVote.createIndex('noteId');
|
|
export default PollVote;
|
|
|
|
export interface IPollVote {
|
|
_id: mongo.ObjectID;
|
|
createdAt: Date;
|
|
userId: mongo.ObjectID;
|
|
noteId: mongo.ObjectID;
|
|
choice: number;
|
|
}
|