/* * @author wuweiru * @date 2020/10/21 16:08 */ import { Prop, Schema, SchemaFactory } from '@nestjs/mongoose'; import { Document } from 'mongoose'; import { MongoDBCollection } from '../../../constant'; @Schema({ collection: MongoDBCollection.Enterprise }) export class Enterprise extends Document { @Prop() name!: string; @Prop() creatorId!: string; @Prop() packageId?: string; @Prop() createdAt!: Date; @Prop() updatedAt!: Date; } export const enterpriseSchema = SchemaFactory.createForClass(Enterprise);