mirror of
https://iceshrimp.dev/limepotato/jormungandr-bite.git
synced 2025-01-16 10:31:00 -07:00
13 lines
344 B
TypeScript
13 lines
344 B
TypeScript
import * as mongo from 'mongodb';
|
|
import db from '../db/mongodb';
|
|
|
|
const Following = db.get<IFollowing>('following');
|
|
Following.createIndex(['followerId', 'followeeId'], { unique: true });
|
|
export default Following;
|
|
|
|
export type IFollowing = {
|
|
_id: mongo.ObjectID;
|
|
createdAt: Date;
|
|
followeeId: mongo.ObjectID;
|
|
followerId: mongo.ObjectID;
|
|
};
|