using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; namespace MarketingDAL.DTO.Lead { public class LeadDTO { #region PrivateMembers #region Lead private int leadid; //LeadId private string leadcode; //LeadCode private string leadname; //Lead private string leaddescription; //Description private DateTime leaddate; //LeadDate private string leadreferencenumber; //ReferenceNumber private DateTime leadreferencedate; //ReferenceDate private string leadtags = "NONE"; //Tags private double leadturnover; //TurnOver private Int16 leadnoofemployees; //NoOfEmployees private double leadrating; //NoOfEmployees private int leadcampaignid; //CampaignId private DateTime leadgeneratedon; //GeneratedOn private Int16 leadorderconfidence; //OrderConfidence private DateTime leadexpecteddate; //ExpectedDate private double leadexpectedfcrevenue; //ExpectedRevenue private double leadcurrencyconversion; //CurrencyConversion private double leadexpectedrevenue; //ExpectedRevenue private double leadrevenueconfidence; //RevenueConfidence private byte leadleadinfolevel; //LeadInfoLevel private string leadremarks; //Remarks private byte leadsuccessstatus; //SuccessStatus private byte leadleadstatus; //LeadStatus private DateTime leadorderwonlostdate; //OrderWonLostDate private string leadlostremarks; //LostRemarks private string allottedtoids; //AllotedId private string allottedtoname; //AllotedName private string allottedtomailids = ""; #region OU private int ouid = -1; //Id private string oucode; //Code private string ouname; #endregion #region party private int partyid = -1; //Id private string partycode; //Code private string partyname; //Name #endregion #region partybranch private int partybranchid = -1; //Id private string partybranchcode; //Code private string partybranchname; //Name #endregion #region contact private int contactid = -1; //Id private string contactfirstname; //Code private string contactlastname; //Name #endregion #region leadcategory private int leadcategoryid = -1; //Id private string leadcategorycode; //Code private string leadcategoryname; //Name private string leadcategoryitemcategoryids; #endregion #region leadcycle private int leadcycleid = -1; //Id private string leadcyclecode; //Code private string leadcyclename; //Name #endregion #region leadcycledetail private int leadcycledetailid = -1; //Id private string leadcycledetailstagecode; //Code private string leadcycledetailstagename; //Name private Int16 leadcycledetailprestageslno; private byte leadcycledetailisopen; #endregion #region Employee private int inchargeid = -1; //Id private string inchargecode; //Code private string inchargename; //Name #endregion #region LeadSourceDetail private int leadsourcedetailid = -1; //Id private string leadsourcedetaildetail; //Code private string remarks; //Name #endregion #region SourceIncharge private int sourceinchargeid = -1; //Id private string sourceinchargecode; //Code private string sourceinchargename; //Name #endregion #region CurrentIncharge private int currentinchargeid = -1; //Id private string currentinchargecode; //Code private string currentinchargename; //Name #endregion #region Priority private int priorityid = -1; //Id private string prioritycode; //Code private string priorityname; #endregion #region Currency private int currencyid = -1; //Id private string currencycode; //Code private string currencyname; //Name #endregion #region LeadChart private int leadchartid = -1; //LeadChartId #endregion #region LeadSourceChannel private int sourcechannelidid = -1; //LeadChartId private string sourcechannelidcode; //Code private string sourcechannelidname; //Name #endregion #region LeadSourceChannelContact private int sourcechannelcontactidid = -1; //SourceChannelContactId private string sourcechannelcontactidname; //Name #endregion #region LeadcurrentChannel private int currentchannelidid = -1; //CurrentChannelId private string currentchannelidcode; //Code private string currentchannelidname; //Name #endregion #region LeadcurrentChannelContact private int currentchannelcontactidid = -1; //CurrentChannelId private string currentchannelcontactidname; //Name #endregion #region LeadLostReason private int lostreasonid = -1; //ReasonId private string lostreasoncode; //Code private string lostreasonname; //Name #endregion private string contactids; private string contactnames; private int combineleadid = -1; private string combineleadcode; private string combineleadname; //private IList leadaddon; //private IList leadproductarray; #region MarketMind // Added for MarketMind AI (see DB/Migrations/20260901_MarketMind_MasterData_SqlServer.sql): // simple 0-100 fit/engagement score plus nullable-in-spirit FKs to the new MSEGMENT/MICP // master data. TLEAD predates this repo's TENANTID convention (no ClientId column exists // on the table at all), so no tenant-filter change was made here — see this migration's // header comment for that separately-flagged gap. Not backfilled on existing rows. private int? leadscore; private int segmentid = -1; private int icpid = -1; #endregion #endregion #region Base private int leadcreatedbyid; //CreatedById private string leadcreatedbyname; //CreatedByName private string leadmodifiedname; //ModifiedByName private DateTime leadcreatedon; //CreatedOn private int leadmodifiedbyid; //ModifiedById private DateTime leadmodifiedon; //ModifiedOn private int leadbaseclinetid; //BaseClinetId #endregion #region Standard private Int16 leadsortorder; //SortOrder private byte status; //Status private Int16 leadversion; //Version private byte leadsourcetype; //SourceType #endregion #endregion #region PublicMembers #region Lead public int LeadId { get { return leadid; } //LeadId set { leadid = value; } //LeadId } public string LeadCode { get { return leadcode; } //LeadCode set { leadcode = value; } //LeadCode } public string LeadName { get { return leadname; } //Lead set { leadname = value; } //Lead } public string LeadDescription { get { return leaddescription; } //Description set { leaddescription = value; } //Description } public DateTime LeadDate { get { return leaddate; } //LeadDate set { leaddate = value; } } public string LeadReferenceNumber { get { return leadreferencenumber; } //ReferenceNumber set { leadreferencenumber = value; } //ReferenceNumber } public DateTime LeadReferenceDate { get { return leadreferencedate; } //ReferenceDate set { leadreferencedate = value; } //ReferenceDate } public string LeadTags { get { return leadtags; } //Tags set { leadtags = value; } //Tags } public double LeadTurnOver { get { return leadturnover; } //TurnOver set { leadturnover = value; } //TurnOver } public Int16 LeadNoOfEmployees { get { return leadnoofemployees; } //NoOfEmployees set { leadnoofemployees = value; } //NoOfEmployees } public double LeadRating { get { return leadrating; } //NoOfEmployees set { leadrating = value; } //NoOfEmployees } public int LeadCampaignId { get { return leadcampaignid; } //CampaignId set { leadcampaignid = value; } //CampaignId } public DateTime LeadGeneratedOn { get { return leadgeneratedon; } //GeneratedOn set { leadgeneratedon = value; } //GeneratedOn } public Int16 LeadOrderConfidence { get { return leadorderconfidence; } //OrderConfidence set { leadorderconfidence = value; } } public DateTime LeadExpectedDate { get { return leadexpecteddate; } //ExpectedDate set { leadexpecteddate = value; } //ExpectedDate } public double LeadExpectedFCRevenue { get { return leadexpectedfcrevenue; } //ExpectedRevenue set { leadexpectedfcrevenue = value; } //ExpectedRevenue } public double LeadCurrencyConversion { get { return leadcurrencyconversion; } //CurrencyConversion set { leadcurrencyconversion = value; } //CurrencyConversion } public double LeadExpectedRevenue { get { return leadexpectedrevenue; } //ExpectedRevenue set { leadexpectedrevenue = value; } //ExpectedRevenue } public double LeadRevenueConfidence { get { return leadrevenueconfidence; } //RevenueConfidence set { leadrevenueconfidence = value; } //RevenueConfidence } public byte LeadLeadInfoLevel { get { return leadleadinfolevel; } //LeadInfoLevel set { leadleadinfolevel = value; } //LeadInfoLevel } public string LeadRemarks { get { return leadremarks; } //Remarks set { leadremarks = value; } //Remarks } public byte LeadSuccessStatus { get { return leadsuccessstatus; } //SuccessStatus set { leadsuccessstatus = value; } //SuccessStatus } public byte LeadLeadStatus { get { return leadleadstatus; } //LeadStatus set { leadleadstatus = value; } //LeadStatus } public DateTime LeadOrderWonLostDate { get { return leadorderwonlostdate; } //OrderWonLostDate set { leadorderwonlostdate = value; } //OrderWonLostDate } public string LeadLostRemarks { get { return leadlostremarks; } //LostRemarks set { leadlostremarks = value; } //LostRemarks } //public virtual IList LeadAddon //{ // get { return leadaddon; } //Remarks // set { leadaddon = value; } //Remarks //} //public IList LeadProductArray //{ // get { return leadproductarray; } //Remarks // set { leadproductarray = value; } //Remarks //} public string AllottedToIds { get { return allottedtoids; } //LostRemarks set { allottedtoids = value; } //LostRemarks } public string AllottedToName { get { return allottedtoname; } //LostRemarks set { allottedtoname = value; } //LostRemarks } #endregion #region OU public int OUId { get { return ouid; } //LeadCode set { ouid = value; } //LeadCode } public string OUCode { get { return oucode; } //LeadCode set { oucode = value; } //LeadCode } public string OUName { get { return ouname; } //LeadCode set { ouname = value; } //LeadCode } #endregion #region party public int PartyId { get { return partyid; } //LeadCode set { partyid = value; } //LeadCode } public string PartyCode { get { return partycode; } //LeadCode set { partycode = value; } //LeadCode } public string PartyName { get { return partyname; } //Lead set { partyname = value; } //Lead } #endregion #region PartyBranch public int PartyBranchId { get { return partybranchid; } //LeadCode set { partybranchid = value; } //LeadCode } public string PartyBranchCode { get { return partybranchcode; } //LeadCode set { partybranchcode = value; } //LeadCode } public string PartyBranchName { get { return partybranchname; } //Lead set { partybranchname = value; } //Lead } #endregion #region Contact public int ContactId { get { return contactid; } //LeadCode set { contactid = value; } //LeadCode } public string ContactFirstName { get { return contactfirstname; } //LeadCode set { contactfirstname = value; } //LeadCode } public string ContactLastName { get { return contactlastname; } //Lead set { contactlastname = value; } //Lead } #endregion #region LeadCategory public int LeadCategoryId { get { return leadcategoryid; } //LeadCode set { leadcategoryid = value; } //LeadCode } public string LeadCategoryCode { get { return leadcategorycode; } //LeadCode set { leadcategorycode = value; } //LeadCode } public string LeadCategoryName { get { return leadcategoryname; } //Lead set { leadcategoryname = value; } //Lead } public string LeadCategoryItemCategoryIds { get { return leadcategoryitemcategoryids; } //Lead set { leadcategoryitemcategoryids = value; } //Lead } #endregion #region LeadCycle public int LeadCycleId { get { return leadcycleid; } //LeadCode set { leadcycleid = value; } //LeadCode } public string LeadCycleCode { get { return leadcyclecode; } //LeadCode set { leadcyclecode = value; } //LeadCode } public string LeadCycleName { get { return leadcyclename; } //Lead set { leadcyclename = value; } //Lead } #endregion #region LeadCycleDetail public int LeadCycleDetailId { get { return leadcycledetailid; } //LeadCode set { leadcycledetailid = value; } //LeadCode } public string LeadCycleDetailStageCode { get { return leadcycledetailstagecode; } //LeadCode set { leadcycledetailstagecode = value; } //LeadCode } public string LeadCycleDetailStageName { get { return leadcycledetailstagename; } //Lead set { leadcycledetailstagename = value; } //Lead } public Int16 LeadCycleDetailPreStageSlNo { get { return leadcycledetailprestageslno; } //Lead set { leadcycledetailprestageslno = value; } //Lead } public virtual byte LeadCycleDetailIsOpen { get { return leadcycledetailisopen; } //isopen set { leadcycledetailisopen = value; } //isopen } #endregion #region Employee public int InchargeId { get { return inchargeid; } //LeadCode set { inchargeid = value; } //LeadCode } public string InchargeCode { get { return inchargecode; } //LeadCode set { inchargecode = value; } //LeadCode } public string InchargeName { get { return inchargename; } //Lead set { inchargename = value; } //Lead } #endregion #region LeadSourceDetail private int leadsourcedetailleadsourceid; private string leadsourcedetailleadsourcename; public int LeadSourceDetailId { get { return leadsourcedetailid; } //LeadCode set { leadsourcedetailid = value; } //LeadCode } public string LeadSourceDetailDetail { get { return leadsourcedetaildetail; } //LeadCode set { leadsourcedetaildetail = value; } //LeadCode } public string Remarks { get { return remarks; } //Lead set { remarks = value; } //Lead } public int LeadSourceDetailLeadSourceId { get { return leadsourcedetailleadsourceid; } //LeadCode set { leadsourcedetailleadsourceid = value; } //LeadCode } public string LeadSourceDetailLeadSourceName { get { return leadsourcedetailleadsourcename; } //LeadCode set { leadsourcedetailleadsourcename = value; } //LeadCode } #endregion #region SourceIncharge public int SourceInchargeId { get { return sourceinchargeid; } //LeadCode set { sourceinchargeid = value; } //LeadCode } public string SourceInchargeCode { get { return sourceinchargecode; } //LeadCode set { sourceinchargecode = value; } //LeadCode } public string SourceInchargeName { get { return sourceinchargename; } //Lead set { sourceinchargename = value; } //Lead } #endregion #region CurrentIncharge public int CurrentInchargeId { get { return currentinchargeid; } //LeadCode set { currentinchargeid = value; } //LeadCode } public string CurrentInchargeCode { get { return currentinchargecode; } //LeadCode set { currentinchargecode = value; } //LeadCode } public string CurrentInchargeName { get { return currentinchargename; } //Lead set { currentinchargename = value; } //Lead } #endregion #region Priority public int PriorityId { get { return priorityid; } //LeadCode set { priorityid = value; } //LeadCode } public string PriorityCode { get { return prioritycode; } //LeadCode set { prioritycode = value; } //LeadCode } public string PriorityName { get { return priorityname; } //LeadCode set { priorityname = value; } //LeadCode } #endregion #region Currency public int CurrencyId { get { return currencyid; } //LeadCode set { currencyid = value; } //LeadCode } public string CurrencyCode { get { return currencycode; } //LeadCode set { currencycode = value; } //LeadCode } public string CurrencyName { get { return currencyname; } //LeadCode set { currencyname = value; } //LeadCode } #endregion #region LeadChart public int LeadChartId { get { return leadchartid; } //LeadCode set { leadchartid = value; } //LeadCode } #endregion #region LeadSourceChennel public int SourceChannelIdId { get { return sourcechannelidid; } //LeadCode set { sourcechannelidid = value; } //LeadCode } public string SourceChannelIdCode { get { return sourcechannelidcode; } //LeadCode set { sourcechannelidcode = value; } //LeadCode } public string SourceChannelIdName { get { return sourcechannelidname; } //Lead set { sourcechannelidname = value; } //Lead } private int sourcechannelidpartybranchpartyid; private string sourcechannelidpartybranchpartyname; public int SourceChannelIdPartyBranchPartyId { get { return sourcechannelidpartybranchpartyid; } //LeadCode set { sourcechannelidpartybranchpartyid = value; } //LeadCode } public string SourceChannelIdPartyBranchPartyName { get { return sourcechannelidpartybranchpartyname; } //LeadCode set { sourcechannelidpartybranchpartyname = value; } //LeadCode } #endregion #region LeadSourceChannelContact public int SourceChannelContactIdId { get { return sourcechannelcontactidid; } //LeadCode set { sourcechannelcontactidid = value; } //LeadCode } public string SourceChannelContactIdName { get { return sourcechannelcontactidname; } //Lead set { sourcechannelcontactidname = value; } //Lead } #endregion #region LeadCurrentChannel public int CurrentChannelIdId { get { return currentchannelidid; } //LeadCode set { currentchannelidid = value; } //LeadCode } public string CurrentChannelIdCode { get { return currentchannelidcode; } //LeadCode set { currentchannelidcode = value; } //LeadCode } public string CurrentChannelIdName { get { return currentchannelidname; } //Lead set { currentchannelidname = value; } //Lead } private int currentchannelidpartybranchpartyid; private string currentchannelidpartybranchpartyname; public int CurrentChannelIdPartyBranchPartyId { get { return currentchannelidpartybranchpartyid; } //LeadCode set { currentchannelidpartybranchpartyid = value; } //LeadCode } public string CurrentChannelIdPartyBranchPartyName { get { return currentchannelidpartybranchpartyname; } //LeadCode set { currentchannelidpartybranchpartyname = value; } //LeadCode } #endregion #region LeadCurrentChannelContact public int CurrentChannelContactIdId { get { return currentchannelcontactidid; } //LeadCode set { currentchannelcontactidid = value; } //LeadCode } public string CurrentChannelContactIdName { get { return currentchannelcontactidname; } //Lead set { currentchannelcontactidname = value; } //Lead } #endregion #region LeadLostReason public int LostReasonId { get { return lostreasonid; } //LeadCode set { lostreasonid = value; } //LeadCode } public string LostReasonCode { get { return lostreasoncode; } //LeadCode set { lostreasoncode = value; } //LeadCode } public string LostReasonName { get { return lostreasonname; } //Lead set { lostreasonname = value; } //Lead } #endregion #region Base public int LeadCreatedById { get { return leadcreatedbyid; } //CreatedById set { leadcreatedbyid = value; } //CreatedById } public DateTime LeadCreatedOn { get { return leadcreatedon; } //CreatedOn set { leadcreatedon = value; } //CreatedOn } public int LeadModifiedById { get { return leadmodifiedbyid; } //ModifiedById set { leadmodifiedbyid = value; } //ModifiedById } public DateTime LeadModifiedOn { get { return leadmodifiedon; } //ModifiedOn set { leadmodifiedon = value; } //ModifiedOn } public string LeadModifiedByName { get { return leadmodifiedname; } //ModifiedByName set { leadmodifiedname = value; } //ModifiedByName } public string LeadCreatedByName { get { return leadcreatedbyname; } //CreatedByName set { leadcreatedbyname = value; } //CreatedByName } public int LeadBaseClinetId { get { return leadbaseclinetid; } //BaseClinetId set { leadbaseclinetid = value; } //BaseClinetId } #endregion #region Standard public Int16 LeadSortOrder { get { return leadsortorder; } //SortOrder set { leadsortorder = value; } //SortOrder } public byte Status { get { return status; } //Status set { status = value; } //Status } public Int16 LeadVersion { get { return leadversion; } //Version set { leadversion = value; } //Version } public byte LeadSourceType { get { return leadsourcetype; } //SourceType set { leadsourcetype = value; } //SourceType } #endregion private string stringleaddate; private string stringleadreferencedate; private string stringleadgeneratedon; private string stringleadexpecteddate; private string stringleadorderwonlostdate; public string StringLeadDate { get { return stringleaddate; } set { stringleaddate = value; } } public string StringLeadReferenceDate { get { return stringleadreferencedate; } //referencedate set { stringleadreferencedate = value; } //ReferenceDate } public string StringLeadGeneratedOn { get { return stringleadgeneratedon; } //generatedon set { stringleadgeneratedon = value; } //GeneratedOn } public string StringLeadExpectedDate { get { return stringleadexpecteddate; } //expecteddate set { stringleadexpecteddate = value; } //expecteddate } public string StringLeadOrderWonLostDate { get { return stringleadorderwonlostdate; } //orderwonlostdate set { stringleadorderwonlostdate = value; } //orderwonlostdate } public string AllottedToMailIds { get { return allottedtomailids; } //allottedtomailids set { allottedtomailids = value; } //allottedtomailids } public string ContactIds { get { return contactids; } //LostRemarks set { contactids = value; } //LostRemarks } public string ContactNames { get { return contactnames; } //LostRemarks set { contactnames = value; } //LostRemarks } public int CombineLeadId { get { return combineleadid; } set { combineleadid = value; } } public string CombineLeadCode { get { return combineleadcode; } set { combineleadcode = value; } } public string CombineLeadName { get { return combineleadname; } set { combineleadname = value; } } #region MarketMind /// Simple 0-100 fit/engagement score. Nullable — unscored leads have no value yet. public int? LeadScore { get { return leadscore; } set { leadscore = value; } } /// Optional FK to MSEGMENT. -1 = not yet assigned (this repo's optional-FK sentinel). public int SegmentId { get { return segmentid; } set { segmentid = value; } } /// Optional FK to MICP. -1 = not yet assigned (this repo's optional-FK sentinel). public int ICPId { get { return icpid; } set { icpid = value; } } #endregion #endregion } }