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

namespace skyscraper8.Skyscraper.Scraper.Storage.Utilities
{
	public class DatabaseKeySgtService
	{
		public DatabaseKeySgtService(ushort serviceListId, ushort serviceId, ushort transportStreamId, ushort originalNetworkId)
		{
			ServiceListId = serviceListId;
			ServiceId = serviceId;
			TransportStreamId = transportStreamId;
			OriginalNetworkId = originalNetworkId;
		}

		public ushort ServiceListId { get; }
		public ushort ServiceId { get; }
		public ushort TransportStreamId { get; }
		public ushort OriginalNetworkId { get; }

		public override bool Equals(object? obj)
		{
			return obj is DatabaseKeySgtService service &&
				   ServiceListId == service.ServiceListId &&
				   ServiceId == service.ServiceId &&
				   TransportStreamId == service.TransportStreamId &&
				   OriginalNetworkId == service.OriginalNetworkId;
		}

		public override int GetHashCode()
		{
			return HashCode.Combine(ServiceListId, ServiceId, TransportStreamId, OriginalNetworkId);
		}
	}
}
