using System;
using System.ComponentModel.DataAnnotations;

namespace Dfs.WayneChina.PosModelMini
{
    public class PosTrxMop
    {
        /// <summary>
        /// Unique id of the POS Transaction MOP.
        /// </summary>
        public Guid Id { get; set; }

        /// <summary>
        /// could have multiple MOP in one trx (split tender), this stands for the sequence of selected MOP.
        /// </summary>
        public int LineNum { get; set; }

        /// <summary>
        /// Pay amount.
        /// </summary>
        public decimal Paid { get; set; }

        /// <summary>
        /// Gets or sets 用户授权码, 当商户用扫码枪扫用户的条形码时得到的字符串
        /// </summary>
        public string AuthCode { get; set; }

        /// <summary>
        /// Result code.
        /// </summary>
        public string ResultCode { get; set; }

        /// <summary>
        /// Message of description of the result.
        /// </summary>
        public string ResultMessage { get; set; }

        /// <summary>
        /// Error detail of the POS transaction MOP.
        /// </summary>
        public string ErrorDetail { get; set; }

        /// <summary>
        /// Gets or sets the raw result (a string) from 3rd party payment server.
        /// </summary>
        public string RawResult { get; set; }

        /// <summary>
        /// Gets or sets the 商户订单号, 确保唯一
        /// </summary>
        [MaxLength(28)]
        public string BillNumber { get; set; }

        /// <summary>
        /// cashback?
        /// </summary>
        public decimal PayBack { get; set; }

        #region Car Plate related

        /// <summary>
        /// The license plate number of the car.
        /// </summary>
        public string CarPlateNumber { get; set; }

        /// <summary>
        /// Image the license plate.
        /// </summary>
        public byte[] CarPlatePicture { get; set; }

        #endregion

        #region IC related

        /// <summary>
        /// IC card number.
        /// </summary>
        public string ICCardNumber { get; set; }

        #endregion

        /// <summary>
        /// Associated POS Transaction id.
        /// </summary>
        public Guid PosTrxId { get; set; }

        /// <summary>
        /// Associated POS Transaction.
        /// </summary>
        public virtual PosTrx PosTrx { get; set; }

        /// <summary>
        /// Associated POS MOP id.
        /// </summary>
        public Guid PosMopId { get; set; }

        /// <summary>
        /// Associated POS MOP.
        /// </summary>
        public virtual PosMop Mop { get; set; }
    }
}