namespace TMSDAL.DTO.ExternalVendor { public class ExternalVendorDTO { public int ExternalVendorId { get; set; } public string VendorCode { get; set; } = string.Empty; public string VendorName { get; set; } = string.Empty; public byte VendorType { get; set; } public string? ContactEmail { get; set; } public string? ContactPhone { get; set; } public string? Address { get; set; } // Missing fields from table public string? Specialisations { get; set; } public string? AccreditedBy { get; set; } public DateTime? ContractExpiryDate { get; set; } public DateTime? StartDate { get; set; } public DateTime? EndDate { get; set; } public byte IsActive { get; set; } public string? ContactName { get; set; } // ev.CONTACTNAME — vendor's contact person public int? ContactId { get; set; } public string? ContactRefName { get; set; } // MCONTACT.NAME // Audit fields public short Version { get; set; } public byte Status { get; set; } public short SortOrder { get; set; } public byte SourceType { get; set; } public int TenantId { get; set; } public int CreatedById { get; set; } public DateTime CreatedOn { get; set; } public int ModifiedById { get; set; } public DateTime ModifiedOn { get; set; } } public class ExternalVendorPicklistDTO { public int VendorId { get; set; } public string VendorCode { get; set; } = string.Empty; public string VendorName { get; set; } = string.Empty; } public class SaveExternalVendorDTO { public int ExternalVendorId { get; set; } public string VendorCode { get; set; } = string.Empty; public string VendorName { get; set; } = string.Empty; public byte VendorType { get; set; } public string? ContactName { get; set; } // vendor's contact person (CONTACTNAME column) public string? ContactEmail { get; set; } public string? ContactPhone { get; set; } public int? ContactId { get; set; } // FK to MCONTACT public string? Address { get; set; } public string? Specialisations { get; set; } public string? AccreditedBy { get; set; } public DateTime? ContractExpiryDate { get; set; } public DateTime? StartDate { get; set; } public DateTime? EndDate { get; set; } public byte IsActive { get; set; } public short Version { get; set; } public byte Status { get; set; } = 1; public short SortOrder { get; set; } = 9999; public int TenantId { get; set; } public int CreatedById { get; set; } public DateTime CreatedOn { get; set; } public int ModifiedById { get; set; } public DateTime ModifiedOn { get; set; } } }