summaryrefslogtreecommitdiff
path: root/src/models/emoji.ts
blob: 373d5f86020c7357f5810879ffeedcdc3e2a704d (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
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;
};