using BS.Shared;

namespace BeWo.Data.Entities
{
    public class Contact : BeWoEntityBase
    {
        public static string PropertyName_Type = "Type";

        public static string PropertyName_Value = "Value";

        private ContactType _Type;

        private string _Value;

        public Contact()
        {
            this._Tid = TableID.Contact;
        }

        public virtual ContactType Type
        {
            get
            {
                return this._Type;
            }

            set
            {
                if (this._Type != value)
                {
                    this._Type = value;
                }
            }
        }

        public virtual string Value
        {
            get
            {
                return this._Value;
            }

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

        public virtual Contact CopyToNew()
        {
            return new Contact
            {
                Type = Type,
                Value = Value
            };
        }
    }
}