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

namespace WCS.Model.ApiModel.StoreInfo
{
    public class LocationInfoModel : INotifyPropertyChanged
    {

        /// <summary>
        /// 主键 自增Id
        /// </summary>
        public int Id { get; set; }

        /// <summary>
        /// 位置编码
        /// </summary>       
        public string LocationCode { get; set; }

        /// <summary>
        /// 库位区域
        /// </summary>
        public int? LocationAreaId { get; set; }
        /// <summary>
        /// 库位区域
        /// </summary>       
        public string LocationArea { get; set; }
        /// <summary>
        /// RCS库位编码
        /// </summary>
        public string RcsStoreCode { get; set; } = string.Empty;
        /// <summary>
        /// 允许放置的货架类型
        /// </summary>
        public List<string> AllowShelfTypesName { get; set; } = new List<string>();
        public List<int?>? AllowShelfTypes { get; set; } =new List<int?>();

        /// <summary>
        /// 更新人
        /// </summary>
        public string ModifyUser { get; set; } = string.Empty;

        public List<int> AllowDestinationLocationArea { get; set; } = new List<int>();
        /// <summary>
        /// 更新时间
        /// </summary>
        public DateTime ModifyTime { get; set; } = DateTime.Now;
        /// <summary>
        /// 是否启用
        /// </summary>
        public bool IsEnable { get; set; } = true;
        /// <summary>
        /// 启用状态显示用字符串
        /// </summary>
        public string IsEnableStr
        {
            get
            {
                if (IsEnable)
                    return "启用";
                else
                    return "禁用";
            }
        }
        /// <summary>
        /// 序号
        /// </summary>
        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));
        }
    }

}
