using System.Collections.ObjectModel; using FruitBank.Common.Interfaces; using LinqToDB.Mapping; using Mango.Nop.Core.Entities; namespace FruitBank.Common.Entities; [Table(Name = FruitBankConstClient.ShippingDocumentDbTableName)] [System.ComponentModel.DataAnnotations.Schema.Table(FruitBankConstClient.ShippingDocumentDbTableName)] public class ShippingDocument : MgEntityBase, IShippingDocument { public int PartnerId { get; set; } public int? ShippingId { get; set; } public string DocumentIdNumber { get; set; } public string PdfFileName { get; set; } public DateTime ShippingDate { get; set; } public string Country { get; set; } public int TotalPallets { get; set; } public bool IsAllMeasured { get; set; } public string Comment { get; set; } [Association(ThisKey = nameof(ShippingId), OtherKey = nameof(Shipping.Id), CanBeNull = true)] public Shipping? Shipping{ get; set; } [Association(ThisKey = nameof(PartnerId), OtherKey = nameof(Partner.Id), CanBeNull = true)] public Partner? Partner { get; set; } [Association(ThisKey = nameof(Id), OtherKey = nameof(ShippingItem.ShippingDocumentId), CanBeNull = true)] public List? ShippingItems { get; set; } [Association(ThisKey = nameof(Id), OtherKey = nameof(FruitBank.Common.Entities.ShippingDocumentToFiles.ShippingDocumentId), CanBeNull = true)] public List? ShippingDocumentToFiles { get; set; } [SkipValuesOnUpdate] public DateTime Created { get; set; } public DateTime Modified { get; set; } }