mirror of
https://iceshrimp.dev/limepotato/jormungandr-bite.git
synced 2024-11-24 10:57:30 -07:00
14 lines
334 B
TypeScript
14 lines
334 B
TypeScript
|
import * as mongo from 'mongodb';
|
||
|
import db from '../db/mongodb';
|
||
|
|
||
|
const Blocking = db.get<IBlocking>('blocking');
|
||
|
Blocking.createIndex(['blockerId', 'blockeeId'], { unique: true });
|
||
|
export default Blocking;
|
||
|
|
||
|
export type IBlocking = {
|
||
|
_id: mongo.ObjectID;
|
||
|
createdAt: Date;
|
||
|
blockeeId: mongo.ObjectID;
|
||
|
blockerId: mongo.ObjectID;
|
||
|
};
|