using Microsoft.AspNetCore.Http; using System; using System.Collections.Generic; using System.ComponentModel.DataAnnotations; using System.Linq; using System.Text; using System.Threading.Tasks; namespace rgbc_sds.services.Models { public class ShipmentModel { public int Id { get; set; } public int? UserId { get; set; } public int SupplierId { get; set; } public string IndentNumber { get; set; } = string.Empty; public string ShipshapeNumber { get; set; } = string.Empty; public string MotherVessel { get; set; } = string.Empty; public DateTime? ETA { get; set; } public string BillOfEntryNumber { get; set; } = string.Empty; public string ContainerNumber { get; set; } = string.Empty; public string OffloadingPort { get; set; } = string.Empty; public DateTime? ContainerReceived { get; set; } public string NoOfFlatcases { get; set; } = string.Empty; public string Voyage { get; set; } = string.Empty; public string MBLNumber { get; set; } = string.Empty; public DateTime? RedirectToSACD { get; set; } public string ClampingRequestFile { get; set; } = string.Empty; public string SupplierInvoiceFile { get; set; } = string.Empty; public string BillOfLadingFile { get; set; } = string.Empty; public string ArrivalInvoiceFile { get; set; } = string.Empty; public string ArrivalInvoiceFile2 { get; set; } = string.Empty; public string CertificateofOriginFile { get; set; } = string.Empty; public string PackingListFile { get; set; } = string.Empty; public string DROToTransportFile { get; set; } = string.Empty; public string CertificateofRemovalFile { get; set; } = string.Empty; public string ExtendedDetentionFile { get; set; } = string.Empty; public string VOCFile { get; set; } = string.Empty; public string DeptOfHealthInspectionFile { get; set; } = string.Empty; public string SARSDocumentsFile { get; set; } = string.Empty; public string GRVCompelteRGBCFile { get; set; } = string.Empty; public string GRVEdwardSnellFile { get; set; } = string.Empty; public string ACCPACReceiptsFile { get; set; } = string.Empty; public string CancelReason { get; set; } = string.Empty; public string ShipmentStatus { get; set; } = string.Empty; public string CreatedBy { get; set; } = string.Empty; public DateTime? CreatedAt { get; set; } public string UpdatedBy { get; set; } = string.Empty; public DateTime? UpdatedAt { get; set; } public List ShipmentListModel { get; set; } = new List(); public List ShipmentStatusList { get; set; } = new List(); public string SearchString { get; set; } = string.Empty; // status filter properties public bool SavedStatus { get; set; } = true; public bool CompleteStatus { get; set; } = false; public bool CancelledStatus { get; set; } = false; public bool CanSubmit { get; set; } public string LoggedInUserName { get; set; } = string.Empty; } public class ShipmentListItemModel { public int Id { get; set; } public string IndentNumber { get; set; } = string.Empty; public string SupplierName { get; set; } = string.Empty; public string ShipshapeNumber { get; set; } = string.Empty; public string MotherVessel { get; set; } = string.Empty; public string ETA { get; set; } = string.Empty; public string BillOfEntryNumber { get; set; } = string.Empty; public string ContainerNumber { get; set; } = string.Empty; public int? PortId { get; set; } public string ContainerReceived { get; set; } = string.Empty; public string NoOfFlatcases { get; set; } = string.Empty; public string Voyage { get; set; } = string.Empty; public string MBLNumber { get; set; } = string.Empty; public string RedirectToSACD { get; set; } = string.Empty; public string RequestedBy { get; set; } = string.Empty; public string Date { get; set; } = string.Empty; public string Status { get; set; } = string.Empty; public string CancelReason { get; set; } = string.Empty; public string EditedBy { get; set; } = string.Empty; public string LastEdit { get; set; } = string.Empty; } public class ShipmentViewModel { public int Id { get; set; } public int RoleId { get; set; } public int SupplierId { get; set; } public int PortId { get; set; } public string SupplierName { get; set; } = string.Empty; public string OffloadingPort { get; set; } = string.Empty; public string LoggedInUserRole { get; set;} = string.Empty; public string LoggedInUserName { get; set; } = string.Empty; public string Process { get; set;} = string.Empty; public string EditedBy { get; set; } = string.Empty; public string LastEdit { get; set; } = string.Empty; [Display(Name = "Supplier:")] [Required(ErrorMessage = "This field is required.")] public List Suppliers { get; set; } = new List(); [Required(ErrorMessage = "This field is required.")] [Display(Name = "Indent Number:")] public string IndentNumber { get; set; } = string.Empty; [Display(Name = "Shipshape Number:")] public string ShipshapeNumber { get; set; } = string.Empty; [Display(Name = "Mother Vessel:")] public string MotherVessel { get; set; } = string.Empty; [Display(Name = "E.T.A:"), DataType(DataType.Date)] //[DisplayFormat(DataFormatString = "{yyyy/MM/dd}", ApplyFormatInEditMode = true)] public DateTime ETA { get; set; } [Display(Name = "Bill of Entry Number:")] public string BillOfEntryNumber { get; set; } = string.Empty; [Display(Name = "Container Number:")] public string ContainerNumber { get; set; } = string.Empty; [Display(Name = "Offloading Port:")] public List Ports { get; set; } = new List(); [Display(Name = "Container Received:"), DataType(DataType.Date)] //[DisplayFormat(DataFormatString = "{yyyy/MM/dd}", ApplyFormatInEditMode = true)] public DateTime ContainerReceived { get; set; } [Display(Name = "No of Flatcases:")] public string NoOfFlatcases { get; set; } = string.Empty; [Display(Name = "Voyage:")] public string Voyage { get; set; } = string.Empty; [Display(Name = "M/BL Number:")] public string MBLNumber { get; set; } = string.Empty; [Display(Name = "Redirect to SACD:"), DataType(DataType.Date)] //[DisplayFormat(DataFormatString = "{yyyy/MM/dd}", ApplyFormatInEditMode = true)] public DateTime RedirectToSACD { get; set; } public string ClampingRequestFileName { get; set; } = string.Empty; public string ClampingRequestPreviewURL { get; set; } = string.Empty; public IFormFile? ClampingRequestFile { get; set; } public string SupplierInvoiceFileName { get; set; } = string.Empty; public string SupplierInvoicePreviewURL { get; set; } = string.Empty; public IFormFile? SupplierInvoiceFile { get; set; } public string BillOfLadingFileName { get; set; } = string.Empty; public string BillOfLadingPreviewURL { get; set; } = string.Empty; public IFormFile? BillOfLadingFile { get; set; } public string ArrivalInvoiceFileName { get; set; } = string.Empty; public string ArrivalInvoicePreviewURL { get; set; } = string.Empty; public IFormFile? ArrivalInvoiceFile { get; set; } public string ArrivalInvoiceFile2Name { get; set; } public string ArrivalInvoice2PreviewURL { get; set; } = string.Empty; public IFormFile? ArrivalInvoiceFile2 { get; set; } public string CertificateOfOriginFileName { get; set; } = string.Empty; public string CertificateOfOriginPreviewURL { get; set; } = string.Empty; public IFormFile? CertificateOfOriginFile { get; set; } public string PackingListFileName { get; set; } = string.Empty; public string PackingListPreviewURL { get; set; } = string.Empty; public IFormFile? PackingListFile { get; set; } public string DROToTransportFileName { get; set; } = string.Empty; public string DROToTransportPreviewURL { get; set; } = string.Empty; public IFormFile? DROToTransportFile { get; set; } public string CertificateOfRemovalFileName { get; set; } = string.Empty; public string CertificateOfRemovalPreviewURL { get; set; } = string.Empty; public IFormFile? CertificateOfRemovalFile { get; set; } public string ExtendedDetentionFileName { get; set; } = string.Empty; public string ExtendedDetentionPreviewURL { get; set; } = string.Empty; public IFormFile? ExtendedDetentionFile { get; set; } public string VOCFileName { get; set; } = string.Empty; public string VOCPreviewURL { get; set; } = string.Empty; public IFormFile? VOCFile { get; set; } public string DeptOfHealthFileName { get; set; } = string.Empty; public string DeptOfHealthPreviewURL { get; set; } = string.Empty; public IFormFile? DeptOfHealthFile { get; set; } public string SARSDocumentsFileName { get; set; } = string.Empty; public string SARSDocumentsPreviewURL { get; set; } = string.Empty; public IFormFile? SARSDocumentsFile { get; set; } public string GRVCompleteRGBCFileName { get; set; } = string.Empty; public string GRVCompleteRGBCPreviewURL { get; set; } = string.Empty; public IFormFile? GRVCompleteRGBCFile { get; set; } public string GRVEdwardSnellFileName { get; set; } = string.Empty; public string GRVEdwardSnellPreviewURL { get; set; } = string.Empty; public IFormFile? GRVEdwardSnellFile { get; set; } public string ACCPACReceiptsFileName { get; set; } = string.Empty; public string ACCPACReceiptsPreviewURL { get; set; } = string.Empty; public IFormFile? ACCPACReceiptsFile { get; set; } [Display(Name = "Cancel Reason:"), Required] public string CancelReason { get; set; } = string.Empty; public string ShipmentStatus { get; set; } = string.Empty; public bool CanSubmit { get; set; } public List files { get; set; } = new List(); public List SharepointFiles { get; set; } = new List(); } public class PortModel { public int Id { get; set; } public string Name { get; set;} = string.Empty; } public class ShipmentStatusModel { public int Id { get; set; } public string Status { get; set; } = string.Empty; } public class SharepointFileUploadModel { public string OldFileName { get; set;} = string.Empty; public string DocumentType { get; set; } = string.Empty; public IFormFile? File { get; set; } } }