using AyCode.Core.Serializers.Attributes;
using AyCode.Core.Serializers.Toons;
using FruitBank.Common.Interfaces;
using LinqToDB;
using LinqToDB.Mapping;
using Mango.Nop.Core.Entities;

namespace FruitBank.Common.Entities;

[AcBinarySerializable(false, true, false, true, false, false)]
[ToonDescription("Pallet type definition with size and weight")]
[Table(Name = FruitBankConstClient.PalletDbTableName)]
[System.ComponentModel.DataAnnotations.Schema.Table(FruitBankConstClient.PalletDbTableName)]
public sealed class Pallet : MgEntityBase, IPallet
{
    public string Name { get; set; }
    public string Size { get; set; }

    [Column(DataType = DataType.DecFloat, CanBeNull = true)] 
    public double? Weight { get; set; }

    [SkipValuesOnUpdate]
    public DateTime Created { get; set; }
    public DateTime Modified { get; set; }
}