mirror of
https://iceshrimp.dev/limepotato/jormungandr-bite.git
synced 2024-11-16 23:17:33 -07:00
20 lines
407 B
TypeScript
20 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;
|
|
};
|