using FWindSoft.Data;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace Com.FirmLib.UI.BllCommon
{
    /// <summary>
    /// 上传交互类修改
    /// </summary>
    public class FileItem: BasePropertyChanged
    {
        public FileItem()
        {
            this.Name = string.Empty;
            this.Path = string.Empty;
            this.FileKey = string.Empty;
        }
        #region 属性
        private string m_Name;
        /// <summary>
        /// 文件名称
        /// </summary>
        public string Name
        {
            get { return this.m_Name; }
            set
            {
                this.m_Name = value;
                RaisePropertyChanged(nameof(this.Name));
            }
        }

        /// <summary>
        /// 文件key值
        /// </summary>
        public string FileKey { get; set; }

        /// <summary>
        /// 本地文件路径
        /// </summary>
        public string Path { get; set; } 
        #endregion


        /// <summary>
        /// 标识是否是可用的path
        /// </summary>
        public bool ValidatePath {
            get { return !string.IsNullOrEmpty(Path); }
        }
        /// <summary>
        /// 标识是否是有效的key值
        /// </summary>
        public bool ValidateKey
        {
            get { return !string.IsNullOrEmpty(FileKey); }
        }
    }
}
