using System;
using Valg.EVA.Skanning.Contracts.CommonEnums;

namespace Valg.EVA.Skanning.Entity.ReadModel
{
    public class BoxCounting
    {
        public int Id { get; set; }
        public int CountingId { get; set; }
        public BoxCountingState State { get; set; }
        public DateTime Created { get; set; }
        public string BarcodeLong { get; set; }
        public string BarcodeShort { get; set; }
        public CountingType CountingType { get; set; }
        public int CountNumber { get; set; }
        public DateTime Modified { get; set; }
        public DateTime CountingModified { get; set; }
        public CountingState CountingState { get; set; }
        public string CountingEmlAreaContextId { get; set; }
        public string ElectionEventId { get; set; }
        public string ElectionIdentifier { get; set; }
        public string ElectionGroup { get; set; }
        public string ContestId { get; set; }

        public bool IsCurrentlyCountedByTopLevelCountingAuthority()
        {
            return TopLevelCountingHelper.DoesCountingEmlAreaContextIdIndicateTopLevelCountingAuthority(CountingEmlAreaContextId);
        }
    }
}
