mirror of
https://github.com/kokonect-link/cherrypick
synced 2024-12-02 16:58:43 +09:00
18 lines
383 B
TypeScript
18 lines
383 B
TypeScript
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;
|
|
};
|
|
}
|