/** * @author songxiwen * @date 2020/08/25 11:30 */ import { Prop, Schema, SchemaFactory } from '@nestjs/mongoose'; import { Document } from 'mongoose'; import { MongoDBCollection } from '../../../constant'; @Schema({ collection: MongoDBCollection.ElementField }) export class ElementField extends Document { @Prop() key!: string; @Prop() value!: string; @Prop() elementFieldBaseTypeId!: string; @Prop() elementId!: string; @Prop() elementFieldFormItemType!: string; } export const elementFieldSchema = SchemaFactory.createForClass(ElementField);