UNPKG

cloud-ide-model-schema

Version:

Pachage for schema management of Cloud IDEsys LMS

138 lines (137 loc) 4.5 kB
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.CFdskLeads = void 0; var mongoose_1 = require("mongoose"); /* SCHEMA START */ var fdsk_leads = new mongoose_1.Schema({ fdlds_doc_no: { type: String, minlength: 0, maxlength: 16, trim: true, unique: true, comment: "uniq 16 digit and characters note here we will generate entity specific, and we will make sure same no will not generate for same hierarchy example: <entity_code_by_entity>-0001" }, fdlds_created_date_time: { type: Date, default: Date.now, comment: "date and time of lead created on" }, fdlds_display_text: { type: String, minlength: 0, maxlength: 250, trim: true, comment: "we will do configuration of this, at lead config master like templating variable replacement" }, fdlds_template_id: { type: String, minlength: 0, maxlength: 50, trim: true, comment: "we will decide the which theme by page theme form note lead form is one ui but there is different reason read is capturing like cars, schools then they have selection dependent UI" }, fdlds_first_name: { type: String, required: true, minlength: 1, maxlength: 50, trim: true, comment: "name of lead maker, customer" }, fdlds_middle_name: { type: String, minlength: 0, maxlength: 50, trim: true }, fdlds_last_name: { type: String, minlength: 0, maxlength: 50, trim: true }, fdlds_mother_name: { type: String, minlength: 0, maxlength: 100, trim: true, comment: "Mother's name" }, fdlds_address: { type: String, minlength: 0, maxlength: 255, trim: true }, fdlds_phone: { type: Number, minlength: 10, maxlength: 15, trim: true }, fdlds_email: { type: String, minlength: 8, maxlength: 320, trim: true }, fdlds_entity_id_syen: { type: mongoose_1.default.Schema.Types.ObjectId, ref: "core_system_entity", required: true, comment: "entity id" }, fdlds_config_fdlcm: { type: mongoose_1.default.Schema.Types.ObjectId, ref: "fdsk_lead_config_master", comment: "lead captured for like, BMW, Volvo cars for this we will create different form(normally we give dropdown but to feel premium company may ask object specific lead form)" }, fdlds_counselor_id_user: { type: mongoose_1.default.Schema.Types.ObjectId, ref: "auth_user_mst", comment: "lead reviewed by which user, this is assigned by owner, or this can be set by config screen whom this leads can transfer default lead transfer screen" }, fdlds_owner_id_user: { type: mongoose_1.default.Schema.Types.ObjectId, ref: "auth_user_mst", comment: "owner user id for whom this lead is own by this sit check the whom as assigned the leads after generation, this to show at pending actions till completion" }, fdlds_active_status_id_sygms: { type: mongoose_1.default.Schema.Types.ObjectId, ref: "core_general_master", comment: "active, inactive, closed, completed, pending" }, fdlds_pin_sypin: { type: mongoose_1.default.Schema.Types.ObjectId, ref: "core_pin_code" }, fdlds_city_sypin: { type: String, minlength: 0, maxlength: 50, trim: true }, fdlds_state_sypin: { type: String, minlength: 0, maxlength: 50, trim: true }, fdlds_priority_id_sygms: { type: mongoose_1.default.Schema.Types.ObjectId, ref: "core_general_master", comment: "Low, Medium, High" }, fdlds_reference_by_id_user: { type: mongoose_1.default.Schema.Types.ObjectId, ref: "auth_user_mst", comment: "lead referred by user name, this is configurable to ask on lead form or we will update by ourself, because this should be field by us to prevent data breach of user" }, fdlds_schedule_date_time: { type: Date, comment: "schedule date time of the lead" } }, { collection: 'fdsk_leads' }); var CFdskLeads = mongoose_1.default.model("fdsk_leads", fdsk_leads); exports.CFdskLeads = CFdskLeads;