40 lines
963 B
C#
Raw Permalink Normal View History

2025-03-17 22:17:28 +08:00
using Seyounth.Core.Extensions;
2025-03-16 03:17:36 +08:00
using Seyounth.Hyosung.Data.Entities;
namespace Seyounth.Hyosung.Data.Models;
2025-03-17 22:17:28 +08:00
public class Pallet : PalletEntity
{
2025-04-07 23:25:45 +08:00
public string Name
{
get
{
if (Type == PalletType.Honey)
{
return
$"{Type.GetDescription()}({Width}*{Length}*{Height})({HoleCount}|{(IsBigHole != null && IsBigHole.Value ? "" : "")})";
}
else if (Length != 0)
{
return $"{Type.GetDescription()}({Width}*{Length}*{Height})";
}
else return "无";
}
}
2025-03-17 22:17:28 +08:00
2025-03-16 23:38:23 +08:00
public static Pallet FromEntity(PalletEntity p)
{
return new Pallet()
{
Height = p.Height,
Width = p.Width,
Length = p.Length,
HoleCount = p.HoleCount,
Id = p.Id,
IsBigHole = p.IsBigHole,
Type = p.Type
};
}
2025-03-17 22:17:28 +08:00
}