/* * @author gs * @date 2020/07/31 17:09 */ import { Prop, Schema, SchemaFactory } from '@nestjs/mongoose'; import { BaseModel } from '../../../base/base.model'; import { MongoDBCollection } from '../../../constant'; @Schema({ collection: MongoDBCollection.UserRole }) export class UserRoleModel extends BaseModel { @Prop() readonly id?: string; @Prop() readonly userId?: string; @Prop() readonly roleId?: string; } export const userRoleSchema = SchemaFactory.createForClass(UserRoleModel);