using System;
using Valg.EVA.Skanning.Contracts.CommonEnums;
using Valg.EVA.Skanning.ServicesModel.ServiceContracts.Scan.Write;

namespace Valg.EVA.Skanning.Commands.SaveScannedBallotPaper
{
    public class SaveScannedBallotPaperCommand : ICommand
    {
        private readonly int? validBallotId;

        public SaveScannedBallotPaperCommand(BallotPaperType ballotPaperType, ScannedImages scannedImages, ScannedField[] scannedFields, string createdBy, string barcodeLong, string barcodeShort, 
            int countingIdBoxWasScannedFor, int boxCountingId, DateTime boxCountingConcurrencyToken, string countingEmlAreaContextId, int? validBallotId, int scannedOrder)
        {
            this.validBallotId = validBallotId;
            BoxCountingId = boxCountingId;
            BoxCountingConcurrencyToken = boxCountingConcurrencyToken;
            CountingEmlAreaContextId = countingEmlAreaContextId;
            BallotPaperType = ballotPaperType;
            ScannedImages = scannedImages;
            ScannedFields = scannedFields;
            CreatedBy = createdBy;
            BarcodeLong = barcodeLong;
            BarcodeShort = barcodeShort;
            CountingIdBoxWasScannedFor = countingIdBoxWasScannedFor;
            ScannedOrder = scannedOrder;
        }

        public BallotPaperType BallotPaperType { get; private set; }
        public ScannedImages ScannedImages { get; private set; }
        public ScannedField[] ScannedFields { get; private set; }
        public string CreatedBy { get; private set; }
        public string BarcodeLong { get; private set; }
        public string BarcodeShort { get; private set; }
        public int CountingIdBoxWasScannedFor { get; private set; }
        public string CountingEmlAreaContextId { get; private set; }

        public int BoxCountingId { get; private set; }
        public DateTime BoxCountingConcurrencyToken { get; private set; }
        public int? ValidBallotId
        {
            get { return validBallotId; }
        }
        public int ScannedOrder { get; private set; }
    }
}
