using FuelServer.Core.Entity;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace Fuel.Core.Transactions.Dto
{
    public class TransactionsInput
    {
        /// <summary>
        /// 订单id
        /// </summary>
        public int? TransactionID { get; set; }
        /// <summary>
        /// 订单状态
        /// </summary>
        public int? type { get; set; }
        /// <summary>
        /// 小程序用户id
        /// </summary>
        public int? MiniProgramID { get; set; }
        /// <summary>
        /// 开始时间
        /// </summary>
        public DateTime? TransactionSTime { get; set; }
        /// <summary>
        /// 结束时间
        /// </summary>
        public DateTime? TransactionETime { get; set; }
        /// <summary>
        /// 油品
        /// </summary>
        public string Product { get; set; }
        /// <summary>
        /// 支付类型
        /// </summary>
        public string paytype { get; set; }

        public static transactionsORDERSTATUS ToTransactionsORDERSTATUS(int value)
        {
            if (Enum.IsDefined(typeof(transactionsORDERSTATUS), value))
            {
                return (transactionsORDERSTATUS)value;
            }
            else
            {
                throw new ArgumentException("Invalid order type value.", nameof(value));
            }
        }

    }
}
