using Edge.Core.Parser.BinaryParser.Attributes;
using HengshanPaymentTerminal.Support;
using System;
using System.Collections.Generic;
using System.Text;

namespace HengshanPaymentTerminal.MessageEntity.Outgoing
{
    public class AuthResult : CardMessageBase
    {
        public AuthResult() : base(Command.AuthResult)
        {

        }

        [Format(10, EncodingType.BcdString, -90)]
        public string Asn { get; set; }

        [Format(4, EncodingType.BIN, -87)]
        public int PosTtc { get; set; }

        [Format(2, EncodingType.BIN, -86)]
        public ushort SeqNo { get; set; }

        [Format(2, EncodingType.BIN, -85)]
        public ushort FuelCode { get; set; }

        [Format(1, EncodingType.BIN, -84)]
        public AuthResultCode ResultCode { get; set; }

        [Format(1, EncodingType.BIN, -83)]
        public byte AdditionalInfoLength { get; set; }

        [EnumerableFormat("AdditionalInfoLength", 1)]
        public List<byte> AdditionalInfo { get; set; }
    }
}
