using AyCode.Core.Serializers.Attributes; using AyCode.Core.Serializers.Toons; using AyCode.Interfaces.TimeStampInfo; using LinqToDB.Mapping; using Mango.Nop.Core.Entities; namespace FruitBank.Common.Entities; [AcBinarySerializable(false, true, false, true, false, false)] //[ToonDescription("Business partner with address and tax information", Purpose = "Represents an external legal entity, specifically a Supplier who provides goods or a business partner involved in the procurement chain")] [Table(Name = FruitBankConstClient.EkaerHistoryDbTableName)] [System.ComponentModel.DataAnnotations.Schema.Table(FruitBankConstClient.EkaerHistoryDbTableName)] public abstract class EkaerHistory: MgEntityBase, ITimeStampInfo { public int ForeignKey { get; set; } public bool IsOutgoing { get; set; } public DateTime Created { get; set; } public DateTime Modified { get; set; } } //public sealed class EkaerHistoryShipping : EkaerHistoryBase //{ // public int ShippingId // { // get => ForeignItemId; // set => ForeignItemId = value; // } // [Association(ThisKey = nameof(ShippingId), OtherKey = nameof(Shipping.Id), CanBeNull = true)] // public Shipping? Shipping { get; set; } //} //public sealed class EkaerHistoryOrder : EkaerHistoryBase //{ // public int ShippingId // { // get => ForeignItemId; // set => ForeignItemId = value; // } // [Association(ThisKey = nameof(ShippingId), OtherKey = nameof(Shipping.Id), CanBeNull = true)] // public Shipping? Shipping { get; set; } //} //public abstract class EkaerHistoryBase : MgEntityBase, ITimeStampInfo //{ // [NotColumn] // protected int ForeignItemId; // [NotColumn] // [ToonDescription(BusinessRule = "get => ForeignItemId", Constraints = "[#SmartTypeConstraints]")] // public int ForeignKey => ForeignItemId; // public DateTime Created { get; set; } // public DateTime Modified { get; set; } //}