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

namespace skyscraper5.src.Skyscraper.Scraper.Storage.Utilities
{
	public class DatabaseKeyRmtTransportStream
	{
		public DatabaseKeyRmtTransportStream(ushort networkId, ushort transportStreamId, ushort originalNetworkId)
		{
			NetworkId = networkId;
			TransportStreamId = transportStreamId;
			OriginalNetworkId = originalNetworkId;
		}

		public ushort NetworkId { get; }
		public ushort TransportStreamId { get; }
		public ushort OriginalNetworkId { get; }

		public override bool Equals(object obj)
		{
			return obj is DatabaseKeyRmtTransportStream stream &&
				   NetworkId == stream.NetworkId &&
				   TransportStreamId == stream.TransportStreamId &&
				   OriginalNetworkId == stream.OriginalNetworkId;
		}

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

		public override string ToString()
		{
			return String.Format("{0} -> {1},{2}", NetworkId, OriginalNetworkId, TransportStreamId);
		}
	}
}
