using EasyTemplate.Tool.Entity;
using Newtonsoft.Json;
using SqlSugar;
using System;
using System.Collections.Generic;
using System.Text;

namespace ZhonTai.Admin.Contracts.Domain.VehicleTerminal.Payment
{
    /// <summary>
    /// 充值记录表
    /// </summary>
    [SugarTable(null, "充值记录表")]
    public class RechargeRecordEntity : EntityBaseLite
    {

        /// <summary>
        /// 用户ID
        /// </summary>
        [SugarColumn(IsNullable = true)]
        public long? UserId { get; set; }

        /// <summary>
        /// 所属站点ID
        /// </summary>
        [SugarColumn(IsNullable = true)]
        public long? SiteId { get; set; }
        /// <summary>
        /// 支付方式：1-微信，2-支付宝，3-银联，4-现金，5-加油卡、6-融合支付等
        /// </summary>
        [SugarColumn(IsNullable = true)]
        public int PaymentMethod { get; set; }

        /// <summary>
        /// 原金额
        /// </summary>
        [SugarColumn(IsNullable = true)]
        public decimal OriginalAmount { get; set; }

        /// <summary>
        /// 实际支付金额
        /// </summary>
        [SugarColumn(IsNullable = true)]
        public decimal PaymentAmount { get; set; }

        /// <summary>
        /// 支付编号
        /// </summary>
        [SugarColumn(IsNullable = true)]
        public string PaymentNo { get; set; }

        /// <summary>
        /// 交易时间
        /// </summary>
        [SugarColumn(IsNullable = true)]
        public DateTime? TransactionTime { get; set; }

        /// <summary>
        /// 支付完成时间
        /// </summary>
        [SugarColumn(IsNullable = true)]
        public DateTime? PaymentTime { get; set; }

        /// <summary>
        /// 支付返回结果
        /// </summary>
        [SugarColumn(IsNullable = true)]
        public string ResultData { get; set; }

        /// <summary>
        /// 错误信息
        /// </summary>
        [SugarColumn(IsNullable = true)]
        public string ErrorMessage { get; set; }

        /// <summary>
        /// 支付结果代码
        /// </summary>
        [SugarColumn(IsNullable = true)]
        public string ResultCode { get; set; }

        /// <summary>
        /// 班次
        /// </summary>
        [SugarColumn(IsNullable = true)]
        public string ShiftBatch { get; set; }

        /// <summary>
        /// 是否开票：1-已开票，2-未开票
        /// </summary>
        [SugarColumn(IsNullable = true)]
        public byte? IsInvoiced { get; set; }

        /// <summary>
        /// 类型：1-充值，2-退款
        /// </summary>
        [SugarColumn(IsNullable = true)]
        public byte? Type { get; set; }
        /// <summary>
        /// 订单状态 0：订单未支付，1：订单已支付，2：订单支付中，3：订单通过卡支付，4：订单已完成，5：已取消
        /// </summary>
        [SugarColumn(IsNullable = true)]
        public int OrderStatus { get; set; }
        /// <summary>
        /// 支付结果：0-待支付，1-支付成功，2-支付失败
        /// </summary>
        [SugarColumn(IsNullable = true)]
        public int PaymentStatus { get; set; }
    }
}
