using System;
using System.ComponentModel;

namespace WCS.BLL.DbModels
{
    ///<summary>
    ///物料基础信息
    ///</summary>
    public partial class MatBaseInfoModel: INotifyPropertyChanged
    {

        public int Id { get; set; }

        public string MatCode { get; set; }

        public string MatName { get; set; }

        public string MatSpec { get; set; }

        public string MatUnit { get; set; }

        public string MatBatch { get; set; }

        /// <summary>
        /// 物料默认数量
        /// </summary>           
        public int MatDefaultQty { get; set; } = 100;

        public string MatSupplier { get; set; }

        public string MatCustomer { get; set; }

        public string ModifyUser { get; set; }

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

        public bool IsEnable { get; set; } = true;

        public string IsEnableStr
        {
            get
            {
                if (IsEnable)
                    return "启用";
                else
                    return "禁用";
            }
        }

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

        public int RowNumber { get; set; }

        public int SerialNumber { get; set; } 

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