using System;
using System.Collections.Generic;
using System.Data.SqlTypes;
using System.Linq;
using System.Runtime.Serialization;
using System.Text;
using System.Threading.Tasks;

namespace RDH.Data.Models
{
    [Serializable]
    [DataContract]
    public partial class OperationTakeItemBag : BaseSnapshotModel// IModel , INotifyPropertyChanged
    {
        private Guid? _key;
        private Guid _snapshotkey;
        private DateTime? _starttime;
        private DateTime? _endtime;
        private Guid? _operationkey;
        private string _name;
        private string _type;
        private string _status;
        private string _desc;
        private Guid? _createby;
        private Decimal? _itemcount;
        private Decimal? _checkedcount;
        private Decimal? _uploadedcount;
        private bool? _flag;
        private DateTime? _clienttime;
        private DateTime? _servertime;
        private string _ext01;
        private string _ext02;
        private string _ext03;
        private string _ext04;
        private string _ext05;
        private string _ext06;
        private string _ext07;
        private string _ext08;
        private string _ext09;
        private string _ext10;
        private Guid? _devicekey;
        private PatientOperationInfo _patientoperationinfo;
        private Section _sectionInfo;

        #region Public Properties

        [DataMember]
        public virtual Guid? Key
        {
            get { return _key; }
            set
            {
                _key = value;
                OnPropertyChanged("Key");
            }
        }
        [DataMember]
        public virtual Guid SnapshotKey
        {
            get { return _snapshotkey; }
            set
            {
                _snapshotkey = value;
                OnPropertyChanged("SnapshotKey");
            }
        }
        [DataMember]
        public virtual DateTime? StartTime
        {
            get { return _starttime; }
            set
            {
                _starttime = value;
                OnPropertyChanged("StartTime");
            }
        }
        [DataMember]
        public virtual DateTime? EndTime
        {
            get { return _endtime; }
            set
            {
                _endtime = value;
                OnPropertyChanged("EndTime");
                EndFlag = value == null ? 0 : 1;
            }
        }
        [DataMember]
        public virtual Guid? OperationKey
        {
            get { return _operationkey; }
            set
            {
                _operationkey = value;
                OnPropertyChanged("OperationKey");
            }
        }
        [DataMember]
        public virtual string Name
        {
            get { return _name; }
            set
            {
                _name = value;
                OnPropertyChanged("Name");
            }
        }
        [DataMember]
        public virtual string Type
        {
            get { return _type; }
            set
            {
                _type = value;
                OnPropertyChanged("Type");
            }
        }
        [DataMember]
        public virtual string Status
        {
            get { return _status; }
            set
            {
                _status = value;
                OnPropertyChanged("Status");
            }
        }
        [DataMember]
        public virtual string Desc
        {
            get { return _desc; }
            set
            {
                _desc = value;
                OnPropertyChanged("Desc");
            }
        }
        [DataMember]
        public virtual Guid? CreateBy
        {
            get { return _createby; }
            set
            {
                _createby = value;
                OnPropertyChanged("CreateBy");
            }
        }
        [DataMember]
        public virtual Decimal? ItemCount
        {
            get { return _itemcount; }
            set
            {
                _itemcount = value;
                OnPropertyChanged("ItemCount");
            }
        }
        [DataMember]
        public virtual Decimal? CheckedCount
        {
            get { return _checkedcount; }
            set
            {
                _checkedcount = value;
                OnPropertyChanged("CheckedCount");
            }
        }
        [DataMember]
        public virtual Decimal? UploadedCount
        {
            get { return _uploadedcount; }
            set
            {
                _uploadedcount = value;
                OnPropertyChanged("UploadedCount");
            }
        }
        [DataMember]
        public virtual bool? Flag
        {
            get { return _flag; }
            set
            {
                _flag = value;
                OnPropertyChanged("Flag");
            }
        }
        [DataMember]
        public virtual DateTime? ClientTime
        {
            get { return _clienttime; }
            set
            {
                _clienttime = value;
                OnPropertyChanged("ClientTime");
            }
        }
        [DataMember]
        public virtual DateTime? ServerTime
        {
            get { return _servertime; }
            set
            {
                _servertime = value;
                OnPropertyChanged("ServerTime");
            }
        }
        /// <summary>
        /// 获取或设置计费时间
        /// </summary>
        [DataMember]
        public virtual string Ext01
        {
            get { return _ext01; }
            set
            {
                _ext01 = value;
                OnPropertyChanged("Ext01");
            }
        }
        /// <summary>
        /// 获取或设置用药手术间
        /// </summary>
        [DataMember]
        public virtual string Ext02
        {
            get { return _ext02; }
            set
            {
                _ext02 = value;
                OnPropertyChanged("Ext02");
            }
        }
        /// <summary>
        /// 获取或设置药箱KEY
        /// </summary>
        [DataMember]
        public virtual string Ext03
        {
            get { return _ext03; }
            set
            {
                _ext03 = value;
                OnPropertyChanged("Ext03");
            }
        }
        /// <summary>
        /// 获取或设置补药单生成时间
        /// </summary>
        [DataMember]
        public virtual string Ext04
        {
            get { return _ext04; }
            set
            {
                _ext04 = value;
                OnPropertyChanged("Ext04");
            }
        }
        /// <summary>
        /// 获取或设置药箱号
        /// </summary>
        [DataMember]
        public virtual string Ext05
        {
            get { return _ext05; }
            set
            {
                _ext05 = value;
                OnPropertyChanged("Ext05");
            }
        }
        [DataMember]
        public virtual string Ext06
        {
            get { return _ext06; }
            set
            {
                _ext06 = value;
                OnPropertyChanged("Ext06");
            }
        }
        [DataMember]
        public virtual string Ext07
        {
            get { return _ext07; }
            set
            {
                _ext07 = value;
                OnPropertyChanged("Ext07");
            }
        }
        [DataMember]
        public virtual string Ext08
        {
            get { return _ext08; }
            set
            {
                _ext08 = value;
                OnPropertyChanged("Ext08");
            }
        }
        [DataMember]
        public virtual string Ext09
        {
            get { return _ext09; }
            set
            {
                _ext09 = value;
                OnPropertyChanged("Ext09");
            }
        }
        [DataMember]
        public virtual string Ext10
        {
            get { return _ext10; }
            set
            {
                _ext10 = value;
                OnPropertyChanged("Ext10");
            }
        }
        [DataMember]
        public virtual Guid? DeviceKey
        {
            get { return _devicekey; }
            set
            {
                _devicekey = value;
                OnPropertyChanged("DeviceKey");
            }
        }
        [DataMember]
        public PatientOperationInfo PatientOperationInfo
        {
            get { return _patientoperationinfo; }
            set
            {
                _patientoperationinfo = value;
                OnPropertyChanged("PatientOperationInfo");
            }
        }
        [DataMember]
        public Section SectionInfo
        {
            get { return _sectionInfo; }
            set
            {
                _sectionInfo = value;
                OnPropertyChanged("SectionInfo");
            }
        }
        #endregion
    }

}
