using BPA.Helper;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Collections.ObjectModel;

namespace BPA.Model
{
    public class RecipeInfo : NotifyBase
    {
        /// <summary>
        /// 配方ID
        /// </summary>
        public string Id { get { return _mId; } set { _mId = value; OnPropertyChanged(); } }
        private string _mId;

        /// <summary>
        /// 配方名称
        /// </summary>
        public string Name { get { return _mName; } set { _mName = value; OnPropertyChanged(); } }
        private string _mName;

        /// <summary>
        /// 是否启用
        /// </summary>
        public bool IsEnable
        {
            get { return _mIsEnable; }
            set
            {
                _mIsEnable = value;
                OnPropertyChanged();
                EnableChange?.Invoke(Id);
            }
        }
        private bool _mIsEnable = true;

        /// <summary>
        /// 最后修改时间
        /// </summary>
        public string LastModified { get { return _mLastModified; } set { _mLastModified = value; OnPropertyChanged(); } }
        private string _mLastModified;

        public static Action<string> EnableChange { get; set; }

        ///// <summary>
        ///// 原料名称集合
        ///// </summary>
        //public ObservableCollection<string> RawMaters { get; set; } = new ObservableCollection<string>();

        ///// <summary>
        ///// 原料id列表
        ///// </summary>
        //public List<string> RawMaterIds { get; set; } = new List<string>();
    }
}
