This commit is contained in:
syuilo 2018-09-19 14:18:34 +09:00
parent 195f676500
commit d9f0e158a3
No known key found for this signature in database
GPG key ID: BDC4C49D06AB9D69
25 changed files with 239 additions and 39 deletions

17
src/models/note-unread.ts Normal file
View file

@ -0,0 +1,17 @@
import * as mongo from 'mongodb';
import db from '../db/mongodb';
const NoteUnread = db.get<INoteUnread>('noteUnreads');
NoteUnread.createIndex(['userId', 'noteId'], { unique: true });
export default NoteUnread;
export interface INoteUnread {
_id: mongo.ObjectID;
noteId: mongo.ObjectID;
userId: mongo.ObjectID;
isSpecified: boolean;
_note: {
userId: mongo.ObjectID;
};
}