This commit is contained in:
2026-04-25 16:36:34 +08:00
commit db90e7579b
1876 changed files with 189777 additions and 0 deletions

View File

@@ -0,0 +1,36 @@
import {
getModelForClass,
prop,
DocumentType,
Ref,
} from '@typegoose/typegoose';
import type { Base } from '@typegoose/typegoose/lib/defaultClasses';
import type { Types } from 'mongoose';
import { User } from './user';
/**
* 好友请求
*/
export class FriendRequest implements Base {
_id: Types.ObjectId;
id: string;
@prop({
ref: () => User,
index: true,
})
from: Ref<User>;
@prop({
ref: () => User,
})
to: Ref<User>;
@prop()
message: string;
}
export type FriendRequestDocument = DocumentType<FriendRequest>;
export default getModelForClass(FriendRequest);