parent
c7106d250c
commit
a1b490afa7
167 changed files with 4440 additions and 1762 deletions
13
src/models/note-watching.ts
Normal file
13
src/models/note-watching.ts
Normal file
|
|
@ -0,0 +1,13 @@
|
|||
import * as mongo from 'mongodb';
|
||||
import db from '../db/mongodb';
|
||||
|
||||
const NoteWatching = db.get<INoteWatching>('noteWatching');
|
||||
NoteWatching.createIndex(['userId', 'noteId'], { unique: true });
|
||||
export default NoteWatching;
|
||||
|
||||
export interface INoteWatching {
|
||||
_id: mongo.ObjectID;
|
||||
createdAt: Date;
|
||||
userId: mongo.ObjectID;
|
||||
noteId: mongo.ObjectID;
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue