2025-03-23 16:41:41 +08:00

96 lines
2.4 KiB
C#

using Seyounth.Hyosung.Data.Entities;
namespace Seyounth.Hyosung.Data.Models;
public class Tray
{
public int Id { get; set; }
public string 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 string? Barcode { get; set; }
public bool? IsPacking { get; set; }
public bool? Exported { 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,
Barcode = Barcode,
IsPacking = IsPacking,
Exported = Exported
};
}
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,
Barcode = entity.Barcode,
IsPacking = entity.IsPacking,
Exported = entity.Exported
};
}
}