using System;

namespace skyscraper5.Skyscraper.Scraper.Storage.Utilities
{
	public class DatabaseKeyUntGroup
	{
		public byte CommonActionType { get; }
		public byte CommonOuiHash { get; }
		public string CommonOui { get; }
		public byte CommonProcessingOrder { get; }

		public DatabaseKeyUntGroup(byte commonActionType, byte commonOuiHash, string commonOui, byte commonProcessingOrder)
		{
			CommonActionType = commonActionType;
			CommonOuiHash = commonOuiHash;
			CommonOui = commonOui;
			CommonProcessingOrder = commonProcessingOrder;
		}

		protected bool Equals(DatabaseKeyUntGroup other)
		{
			return CommonActionType == other.CommonActionType && CommonOuiHash == other.CommonOuiHash && CommonOui == other.CommonOui && CommonProcessingOrder == other.CommonProcessingOrder;
		}

		public override bool Equals(object obj)
		{
			if (ReferenceEquals(null, obj)) return false;
			if (ReferenceEquals(this, obj)) return true;
			if (obj.GetType() != this.GetType()) return false;
			return Equals((DatabaseKeyUntGroup)obj);
		}

		public override int GetHashCode()
		{
			return HashCode.Combine(CommonActionType, CommonOuiHash, CommonOui, CommonProcessingOrder);
		}
	}
}
