using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Linq;
using System.Runtime.Serialization;
using System.Text;

namespace RDH.Data.Models
{
    [Serializable]
    [DataContract]
    public abstract class BaseModel : IModel, INotifyPropertyChanged
    {
        protected DateTime? _createtime;
        public virtual event PropertyChangedEventHandler PropertyChanged;
        [DataMember]
        public virtual DateTime? CreateTime
        {
            get { return _createtime; }
            set
            {
                _createtime = value;
                OnPropertyChanged("CreateTime");
            }
        }
        protected virtual void OnPropertyChanged(string p)
        {
            if (PropertyChanged != null)
            {
                PropertyChanged(this, new PropertyChangedEventArgs(p));
            }
        }

    }
}
