/* * @author gs * @date 2020/07/31 15:26 */ import { Prop, Schema, SchemaFactory } from '@nestjs/mongoose'; import { BaseModel } from '../../../base/base.model'; import { MongoDBCollection } from '../../../constant'; @Schema({ collection: MongoDBCollection.Role }) export class RoleModel extends BaseModel { @Prop() readonly id?: string; @Prop() readonly name?: string; @Prop() readonly apiList?: string[]; } export const roleSchema = SchemaFactory.createForClass(RoleModel);