using System;

namespace skyscraper5.Skyscraper.Scraper.Storage.InMemory.Model
{
    internal struct  TeletextCoordinate
    {
        public bool Equals(TeletextCoordinate other)
        {
            return NetworkId == other.NetworkId && TransportStreamId == other.TransportStreamId && ProgramNumber == other.ProgramNumber;
        }

        public override bool Equals(object obj)
        {
            return obj is TeletextCoordinate other && Equals(other);
        }

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

        public int NetworkId { get; }
        public int TransportStreamId { get; }
        public ushort ProgramNumber { get; }

        public TeletextCoordinate(int networkId, int transportStreamId, ushort programNumber)
        {
            NetworkId = networkId;
            TransportStreamId = transportStreamId;
            ProgramNumber = programNumber;
        }
    }
}
