mirror of
https://github.com/misskey-dev/misskey.git
synced 2025-01-06 00:09:20 +09:00
14 lines
348 B
TypeScript
14 lines
348 B
TypeScript
import * as mongo from 'mongodb';
|
|
import db from '../db/mongodb';
|
|
|
|
const PostWatching = db.get<IPostWatching>('postWatching');
|
|
PostWatching.createIndex(['userId', 'postId'], { unique: true });
|
|
export default PostWatching;
|
|
|
|
export interface IPostWatching {
|
|
_id: mongo.ObjectID;
|
|
createdAt: Date;
|
|
userId: mongo.ObjectID;
|
|
postId: mongo.ObjectID;
|
|
}
|