using System; using System.ComponentModel.DataAnnotations; using System.ComponentModel.DataAnnotations.Schema; namespace CAPI.Custom.Entities { public class QuoteItemsFinal : SurfacePublishedChildEntity { protected string _masterPartNumber = string.Empty; public string MasterPartNumber { get { return _masterPartNumber.ToUpperNonEmpty(); } set { _masterPartNumber = value.ToUpperNonEmpty(); } } protected string _partNumber = string.Empty; public string PartNumber { get { return _partNumber.ToUpperNonEmpty(); } set { _partNumber = value.ToUpperNonEmpty(); } } protected string _uniqueNumber = string.Empty; public string UniqueNumber { get { return _uniqueNumber.ToUpperNonEmpty(); } set { _uniqueNumber = value.ToUpperNonEmpty(); } } public string Location { get; set; } = string.Empty; public int? InvoicedQty { get; set; } = 0; public string AdditionalDescription { get; set; } = string.Empty; public string Brand { get; set; } = string.Empty; public string Category { get; set; } = string.Empty; public string Condition { get; set; } = string.Empty; public string Description { get; set; } = string.Empty; public string DimensionalDescription { get; set; } = string.Empty; public string LeadTime { get; set; } = string.Empty; public string MinorCode { get; set; } = string.Empty; public int? QuantityAvailable { get; set; } = 0; public int? QuantityRequired { get; set; } = 0; public int? Sequence { get; set; } = 0; public string SubCategory { get; set; } = string.Empty; public decimal? TotalPriceZAR { get; set; } = 0; public decimal? UnitPriceZAR { get; set; } = 0; public decimal? WeightKG { get; set; } = 0; public int? QuoteItemsLink { get; set; } = 0; public bool Status { get; set; } = true; public string Supplier { get; set; } = string.Empty; public decimal? CostPriceZAR { get; set; } = 0; public decimal? CostPriceFOREX { get; set; } = 0; public string WarehouseLocation { get; set; } = string.Empty; public decimal? ExchangeRate { get; set; } = 0; public bool IsNew => itemID == 0; } }