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