using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace Domain
{	
	public class AlarmSetting
    {
        /// <summary>
        /// HotelID
        /// </summary>
        public virtual int HotelID
        {
            get;
            set;
        }
		/// <summary>
		/// 分类
		/// </summary>
		public virtual char Type
		{
			get;
			set;
		}

		/// <summary>
		/// Code
		/// </summary>
		public virtual string Code
		{
			get;
			set;
		}
		/// <summary>
		/// Name
		/// </summary>
		public virtual string Name
		{
			get;
			set;
		}
		/// <summary>
		/// EName
		/// </summary>
		public virtual string EName
		{
			get;
			set;
		}
		/// <summary>
		/// Value
		/// </summary>
		public virtual string Value
		{
			get;
			set;
		}
		/// <summary>
		/// Color
		/// </summary>
		public virtual string Color
		{
			get;
			set;
		}
		/// <summary>
		/// Sort
		/// </summary>
		public virtual int Sort
		{
			get;
			set;
		}

		/// <summary>
		/// 与下位机通信ID
		/// </summary>
		public virtual int ModalTypeID
		{
			get;
			set;
		}

		/// <summary>
		/// 是否启用声声音报警
		/// </summary>
		public virtual bool Beep
		{
			get;
			set;
		}

		/// <summary>
		/// AppApply
		/// </summary>
		public virtual bool AppApply
		{
			get;
			set;
		}

        public override bool Equals(object obj)
        {
            AlarmSetting o = obj as AlarmSetting;

            if (o == null)
            {
                return false;
            }

            return HotelID == o.HotelID && this.Type == o.Type && Code == o.Code;
        }

		public override int GetHashCode()
		{
			int hashCode = base.GetHashCode();

			hashCode ^= Type.GetHashCode();

			if (!String.IsNullOrEmpty(Code)) {
				hashCode ^= Code.GetHashCode();
			}

			return hashCode;
		}
	}
}
