using System;

using BS.Shared;

namespace BeWo.Data.Entities
{
    public abstract class BeWoEntityBase
    {
        public static string PropertyName_InsTs = "InsTs";

        public static string PropertyName_InsUser = "InsUser";

        public static string PropertyName_IsActive = "IsActive";

        public static string PropertyName_Notice = "Notice";

        public static string PropertyName_Notice2 = "Notice2";
        
        public static string PropertyName_Notice3 = "Notice3";
        
        public static string PropertyName_Notice4 = "Notice4";
        
        public static string PropertyName_Notice5 = "Notice5";

        public static string PropertyName_Oid = "Oid";

        public static string PropertyName_SystemEntryID = "SystemEntryID";

        public static string PropertyName_UdpUser = "UdpUser";

        public static string PropertyName_Version = "Version";

        protected DateTime? _InsTs;

        protected string _InsUser;

        protected string _Notice;

        protected string _Notice2;

        protected string _Notice3;
        
        protected string _Notice4;
        
        protected string _Notice5;
        
        protected long? _Oid;

        protected TableID _Tid;

        protected string _UdpUser;

        protected long? _Version;

        private ActivationTypeId _IsActive = ActivationTypeId.Active;

        private SystemEntryID? _SystemEntryID;

        public virtual DateTime? InsTs
        {
            get
            {
                return this._InsTs;
            }

            set
            {
                if (this.AreDifferent(this._InsTs, value))
                {
                    this._InsTs = value;
                }
            }
        }

        public virtual string InsUser
        {
            get
            {
                return this._InsUser;
            }

            set
            {
                if (this.AreDifferent(this._InsUser, value))
                {
                    this._InsUser = value;
                }
            }
        }

        public virtual ActivationTypeId IsActive
        {
            get
            {
                return this._IsActive;
            }

            set
            {
                if (this.AreDifferent(this._IsActive, value))
                {
                    this._IsActive = value;
                }
            }
        }

        public virtual string Notice
        {
            get
            {
                return this._Notice;
            }

            set
            {
                if (this.AreDifferent(this._Notice, value))
                {
                    this._Notice = value;
                }
            }
        }

        public virtual string Notice2
        {
            get
            {
                return this._Notice2;
            }

            set
            {
                if (this.AreDifferent(this._Notice2, value))
                {
                    this._Notice2 = value;
                }
            }
        }

        public virtual string Notice3
        {
            get
            {
                return this._Notice3;
            }

            set
            {
                if (this.AreDifferent(this._Notice3, value))
                {
                    this._Notice3 = value;
                }
            }
        }

        public virtual string Notice4
        {
            get
            {
                return this._Notice4;
            }

            set
            {
                if (this.AreDifferent(this._Notice4, value))
                {
                    this._Notice4 = value;
                }
            }
        }

        public virtual string Notice5
        {
            get
            {
                return this._Notice5;
            }

            set
            {
                if (this.AreDifferent(this._Notice5, value))
                {
                    this._Notice5 = value;
                }
            }
        }

        public virtual long? Oid
        {
            get
            {
                return this._Oid;
            }

            set
            {
                if (this.AreDifferent(this._Oid, value))
                {
                    this._Oid = value;
                }
            }
        }

        public virtual SystemEntryID? SystemEntryID
        {
            get
            {
                return this._SystemEntryID;
            }

            set
            {
                if (this.AreDifferent(this._SystemEntryID, value))
                {
                    this._SystemEntryID = value;
                }
            }
        }

        public virtual TableID Tid
        {
            get
            {
                return this._Tid;
            }
        }

        public virtual string UdpUser
        {
            get
            {
                return this._UdpUser;
            }

            set
            {
                if (this.AreDifferent(this._UdpUser, value))
                {
                    this._UdpUser = value;
                }
            }
        }

        public virtual long? Version
        {
            get
            {
                return this._Version;
            }

            set
            {
                if (this.AreDifferent(this._Version, value))
                {
                    this._Version = value;
                }
            }
        }

        protected bool AreDifferent(object pMember, object pNewValue)
        {
            return (pMember == null && pNewValue != null) || (pMember != null && !pMember.Equals(pNewValue));
        }
    }
}