/** * @author songxiwen * @date 2020/08/12 20:36 */ import { Prop, Schema, SchemaFactory } from '@nestjs/mongoose'; import { Document } from 'mongoose'; import { MongoDBCollection } from '../../../constant'; @Schema({ collection: MongoDBCollection.ProjectAuth }) export class ProjectAuth extends Document { @Prop() projectId?: string; @Prop() userId?: string; @Prop() role?: string; } export const projectAuthSchema = SchemaFactory.createForClass(ProjectAuth);