misskey/src/models/emoji.ts
2018-12-19 21:19:43 +09:00

21 lines
407 B
TypeScript

import * as mongo from 'mongodb';
import db from '../db/mongodb';
const Emoji = db.get<IEmoji>('emoji');
Emoji.createIndex('name');
Emoji.createIndex('host');
Emoji.createIndex(['name', 'host'], { unique: true });
export default Emoji;
export type IEmoji = {
_id: mongo.ObjectID;
name: string;
host: string;
url: string;
aliases?: string[];
updatedAt?: Date;
/** AP object id */
uri?: string;
};