using Seyounth.Hyosung.Data.Entities; namespace Seyounth.Hyosung.Data.Models; public class Tray { public int Id { get; set; } public long TrayCode { get; set; } public int VarietyId { get; set; } public int? ControlNo { get; set; } = null; public DateTime CreateTime { get; set; } public DateTime? FinishTime { get; set; } public bool IsEven { get; set; } public string? Grade { get; set; } public string? Type { get; set; } public string? DenFila { get; set; } public string? DtexFila { get; set; } public int? Unit { get; set; } public double NetWeight { get; set; } public double GrossWeight { get; set; } public int? StackHeight { get; set; } public int? AgvBinId { get; set; } public TrayEntity ToEntity() { return new TrayEntity() { Id = Id, TrayCode = TrayCode, VarietyId = VarietyId, ControlNo = ControlNo, FinishTime = FinishTime, StackHeight = StackHeight, IsEven = IsEven, GrossWeight = GrossWeight, NetWeight = NetWeight, CreateTime = CreateTime, DenFila = DenFila, DtexFila = DtexFila, Grade = Grade, Type = Type, Unit = Unit, AgvBinId = AgvBinId }; } public static Tray FromEntity(TrayEntity entity) { return new Tray() { Id = entity.Id, TrayCode = entity.TrayCode, VarietyId = entity.VarietyId, ControlNo = entity.ControlNo, StackHeight = entity.StackHeight, FinishTime = entity.FinishTime, IsEven = entity.IsEven, GrossWeight = entity.GrossWeight, NetWeight = entity.NetWeight, CreateTime = entity.CreateTime, DenFila = entity.DenFila, DtexFila = entity.DtexFila, Grade = entity.Grade, Type = entity.Type, Unit = entity.Unit, AgvBinId = entity.AgvBinId }; } }