/* * @author gs * @date 2020/10/15 14:02 */ import { Prop, Schema, SchemaFactory } from '@nestjs/mongoose'; import { Document } from 'mongoose'; import { MongoDBCollection } from '../../../constant'; import { LocalizationContents } from '../../../type/database'; @Schema({ collection: MongoDBCollection.KitCategory }) export class KitCategory extends Document { @Prop() name!: LocalizationContents; @Prop({ default: true }) isEnabled!: boolean; @Prop() createdAt!: Date; @Prop() updatedAt!: Date; } export const kitCategorySchema = SchemaFactory.createForClass(KitCategory);