mirror of
https://activitypub.software/TransFem-org/Sharkey.git
synced 2024-11-16 12:46:42 +01:00
14 lines
345 B
TypeScript
14 lines
345 B
TypeScript
|
import * as mongo from 'mongodb';
|
||
|
import db from '../db/mongodb';
|
||
|
|
||
|
const Hashtag = db.get<IHashtags>('hashtags');
|
||
|
Hashtag.createIndex('tag', { unique: true });
|
||
|
Hashtag.createIndex('mentionedUserIdsCount');
|
||
|
export default Hashtag;
|
||
|
|
||
|
export interface IHashtags {
|
||
|
tag: string;
|
||
|
mentionedUserIds: mongo.ObjectID[];
|
||
|
mentionedUserIdsCount: number;
|
||
|
}
|