parent
d2a5f4c5c1
commit
df20f5063d
7 changed files with 187 additions and 18 deletions
13
src/models/hashtag.ts
Normal file
13
src/models/hashtag.ts
Normal file
|
@ -0,0 +1,13 @@
|
|||
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;
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue