import { MongooseModule, } from "../../helpers"; import { CADStatusOptionSelectedSchemaType, ExtraType } from "../../types/cad"; export default function CADStatusOptionSelectedSchema(mongoose: MongooseModule) { const { Schema } = mongoose; const Extra = new Schema({ doorCode: { type: String, }, destinationStatus: { type: String, }, destinationNote: { type: String, }, latitude: { type: Number, }, longitude: { type: Number, }, }, { _id: false, id: false, }); const Item = new Schema({ name: { type: String, default: "", }, type: { type: String, default: "string", // integer, bool }, value: { type: String, default: "", }, key: { type: String, default: "", }, extra: { type: Extra, default: undefined, }, }, { _id: false, id: false, }); return Item; }