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

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

        /// <summary>
        /// 货架类型ID
        /// </summary>
        public int? ShelfTypeId { get; set; } = 0;

        /// <summary>
        /// 货架类型名称
        /// </summary>
        public string ShelfTypeName { get; set; } = string.Empty;

        /// <summary>
        /// 货架编码 对应二维码
        /// </summary>       
        public string ShelfCode { get; set; } = string.Empty;

        /// <summary>
        /// 货架状态 货架当前的状态空货架/非空货架
        /// </summary>
        public ShelfStatusEnum ShelfStatus { get; set; } = ShelfStatusEnum.空货架;

        ///// <summary>
        ///// 货架区域
        ///// </summary>
        //public string ShelfArea { get; set; } = string.Empty;

        /// <summary>
        /// 货架尺寸
        /// </summary>
        public string ShelfSize { get; set; } = string.Empty;

        /// <summary>
        /// 备注
        /// </summary>
        public string Remark { get; set; } = string.Empty;

        #region 当前位置信息
        /// <summary>
        /// 当前位置ID
        /// </summary>
        public int CurrentLocationId { get; set; } = 0;

        /// <summary>
        /// 当前位置编码
        /// </summary>
        public string CurrentLocaiotnCode { get; set; } = string.Empty;
        #endregion

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

        /// <summary>
        /// 更新时间
        /// </summary>           
        public DateTime ModifyTime { get; set; } = DateTime.Now;

        /// <summary>
        /// 是否启用
        /// </summary>
        public bool IsEnable { get; set; } = true;

        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));
        }
    }

    public enum ShelfStatusEnum
    {
        空货架 = 0,
        非空货架 = 1,
    }
}
