1
0
mirror of https://github.com/misskey-dev/misskey synced 2024-12-21 10:08:24 +09:00
misskey/src/api/models/notification.ts

48 lines
1.3 KiB
TypeScript
Raw Normal View History

import * as mongo from 'mongodb';
2017-01-17 09:17:52 +09:00
import db from '../../db/mongodb';
2017-11-11 00:27:02 +09:00
import { IUser } from './user';
2017-01-17 09:17:52 +09:00
2017-01-18 16:30:42 +09:00
export default db.get('notifications') as any; // fuck type definition
export interface INotification {
_id: mongo.ObjectID;
2017-11-11 00:27:02 +09:00
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;
}