mst-scm-server-core
Version:
MST backend project-ийн core project
1 lines • 1.06 kB
JavaScript
const{ObjectId:e}=require("mongodb"),t=require("mongoose"),{AddressInfo:r,CreatedInfo:n}=require("../base"),i=new t.Schema({branchName:{type:String,required:[!0,"Цэгийн нэр бөглөнө үү"]},code:{type:String},customerId:{type:String,required:[!0,"customerId is not null"]},customerUuid:{type:e,required:[!0,"customerUuid is null"]},activityType:{type:{id:{type:String},name:{type:String}}},phoneNumber:{type:String},frontImageTemplateUuid:{type:String},innerImageTemplateUuids:[{type:String}],organizationUuid:{type:e},parentOrganizationUuid:{type:e},merchantUuid:{type:e},merchantBranchUuid:{type:e},isDeleted:{type:Number,default:0},isActive:{type:Number,default:0},branchImage:{type:{_id:!1,frontImage:{type:{imageTemplateUuid:{type:String},path:{type:String},key:{type:String}}},innerImages:{type:[{imageTemplateUuid:{type:String},path:{type:String},key:{type:String}}]}}},reasonCount:{type:Array},externalSystemCode:{type:String},addressInfo:r,createdInfo:n,customerInfo:Object});module.exports=t.model("customerBranch",i,"customerBranch");