[LINE] 通知の表示に対応

This commit is contained in:
syuilo 2017-11-11 00:27:02 +09:00
parent a702b27c3d
commit 3f0f307104
4 changed files with 104 additions and 1 deletions

View file

@ -1,8 +1,47 @@
import * as mongo from 'mongodb';
import db from '../../db/mongodb';
import { IUser } from './user';
export default db.get('notifications') as any; // fuck type definition
export interface INotification {
_id: mongo.ObjectID;
created_at: Date;
/**
*
*/
notifiee?: IUser;
/**
*
*/
notifiee_id: mongo.ObjectID;
/**
* (initiator)
*/
notifier?: IUser;
/**
* (initiator)
*/
notifier_id: mongo.ObjectID;
/**
*
* follow -
* mention - 稿
* reply - (Watchしている)稿
* repost - (Watchしている)稿Repostされた
* quote - (Watchしている)稿Repostされた
* reaction - (Watchしている)稿
* poll_vote - (Watchしている)稿
*/
type: 'follow' | 'mention' | 'reply' | 'repost' | 'quote' | 'reaction' | 'poll_vote';
/**
*
*/
is_read: Boolean;
}