/** * @author wuweiru * @date 2020/10/28 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.FontStyle }) export class FontStyle extends Document { @Prop() name!: LocalizationContents; @Prop() createdAt!: Date; @Prop() updatedAt!: Date; @Prop() weight!: number; @Prop({ default: true }) isEnabled!: boolean; } export const fontStyleSchema = SchemaFactory.createForClass(FontStyle);