using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Text;

namespace WCS.Model.ApiModel.MatDetailHistoryInfo
{
    public class MatDetailHistoryInfoModel : INotifyPropertyChanged
    {
        public int Id { get; set; }

        #region 货架属性
        public string ShelfType { get; set; }

        public int ShlefId { get; set; }

        public string ShelfCode { get; set; }
        #endregion

        #region 物料属性
        public string MatCode { get; set; }

        public string MatName { get; set; }

        public string MatBatch { get; set; }

        public string MatSpec { get; set; }

        public int BeforeQty { get; set; }

        public int AfterQty { get; set; }

        public string? MatSupplier { get; set; }

        public string? MatCustomer { get; set; }
        #endregion

        public DateTime? ModifyTime { get; set; } = DateTime.Now;

        public string? ModifyUser { get; set; }

        public RecordTypeEnum RecordType { get; set; } = RecordTypeEnum.修改;

        public FunctionTypeEnum FunctionType { get; set; } = FunctionTypeEnum.PDA物料绑定;

        public bool IsDelete { get; set; } = false;

        public int RowNumber { get; set; }

        public bool IsSelected
        {
            get { return isSelected; }
            set
            {
                isSelected = value;
                OnPropertyChanged(nameof(IsSelected));
            }
        }
        public bool isSelected;

        public event PropertyChangedEventHandler PropertyChanged;
        protected virtual void OnPropertyChanged(string propertyName)
        {
            PropertyChanged?.Invoke(this, new PropertyChangedEventArgs(propertyName));
        }
    }

    /// <summary>
    /// 数据更新类型
    /// </summary>
    public enum RecordTypeEnum
    {
        新增 = 0,
        修改 = 1,
        删除 = 2,
        清空 = 3,
    }

    //具体是哪个功能
    public enum FunctionTypeEnum
    {
        PDA物料绑定,
        PDA绑定查询,
        PDA货架送回,
        库存盘点,
        客户端货架存量,
        客户端物料绑定,
    }
}
