using FruitBank.Common.Interfaces; using LinqToDB.Mapping; using Mango.Nop.Core.Dtos; using Mango.Nop.Core.Entities; using Mango.Nop.Core.Interfaces; using Newtonsoft.Json; using Nop.Core.Domain.Catalog; using System; using System.Collections.Generic; using System.ComponentModel.DataAnnotations.Schema; using System.Linq; using System.Text; using System.Threading.Tasks; namespace FruitBank.Common.Dtos { public class StockQuantityHistoryDto : MgStockQuantityHistoryDto, IStockQuantityHistoryDto { [NotColumn, NotMapped, JsonIgnore, System.Text.Json.Serialization.JsonIgnore] public int? StockQuantityHistoryId { get => StockQuantityHistoryExt?.StockQuantityHistoryId; set => StockQuantityHistoryExt!.StockQuantityHistoryId = value!.Value; } [NotColumn, NotMapped, JsonIgnore, System.Text.Json.Serialization.JsonIgnore] public double? NetWeightAdjustment { get => StockQuantityHistoryExt?.NetWeightAdjustment; set => StockQuantityHistoryExt!.NetWeightAdjustment = value; } [NotColumn, NotMapped, JsonIgnore, System.Text.Json.Serialization.JsonIgnore] public double? NetWeight { get => StockQuantityHistoryExt?.NetWeight; set => StockQuantityHistoryExt!.NetWeight = value; } [NotColumn, NotMapped, JsonIgnore, System.Text.Json.Serialization.JsonIgnore] public bool IsInconsistent { get => StockQuantityHistoryExt?.IsInconsistent ?? false; set => StockQuantityHistoryExt!.IsInconsistent = value; } [Association(ThisKey = nameof(Id), OtherKey = nameof(StockQuantityHistoryExt.StockQuantityHistoryId), CanBeNull = true)] public StockQuantityHistoryExt? StockQuantityHistoryExt { get; set; } } }