using System;
using SqlSugar;

namespace MDL.Models
{
    [SugarTable("bag_tags")]
    public class BagTagEntity
    {
        [SugarColumn(IsPrimaryKey = true, IsIdentity = true)]
        public int Id { get; set; }

        [SugarColumn(Length = 100, IsNullable = false)]
        public string TagNumber { get; set; }

        [SugarColumn(Length = 50, IsNullable = false)]
        public string ChannelName { get; set; }

        [SugarColumn(Length = 20)]
        public string Status { get; set; } = "Generated";

        public DateTime CreatedAt { get; set; } = DateTime.UtcNow;

        [SugarColumn(IsNullable = true)]
        public DateTime? OpenedAt { get; set; }

        [SugarColumn(IsNullable = true)]
        public DateTime? ClosedAt { get; set; }

        [SugarColumn(Length = 50, IsNullable = false)]
        public string Creator { get; set; }

        [SugarColumn(Length = 200, IsNullable = true)]
        public string Remark { get; set; }

        [SugarColumn(IsIgnore = true)]
        public int WaybillCount { get; set; } = 0;
    }
}