using System;

namespace Valg.EVA.Skanning.ServicesModel.ElectionConfig.Model
{
    public class Municipality
    {
        public string Code { get; set; }
        public string Name { get; set; }
        public string CountyCode { get; set; }
        public string CountyName { get; set; }

        public override int GetHashCode()
        {
            return Code.GetHashCode();
        }

        public override bool Equals(object obj)
        {
            var municipality = ((Municipality)obj);
            return string.Compare(municipality.Code, Code, StringComparison.Ordinal) == 0;
        }
    }
}

