using AI.Platform.Core.Entity;
using SqlSugar;
using System;
using System.Collections.Generic;
using System.Text;

namespace ZhonTai.Admin.Contracts.Domain.VehicleTerminal.Transaction
{
    /// <summary>
    /// 订单表
    /// </summary>
    [SugarTable(null, "订单表")]
    public class TransactionEntity : EntityBaseLite
    {
        /// <summary>
        /// 订单ID（主键）
        /// </summary>
        public long Id { get; set; }

        /// <summary>
        /// 订单编号
        /// </summary>
        [SugarColumn(IsNullable = true)]
        public string BillNumber { get; set; }

        /// <summary>
        /// 站点ID
        /// </summary>
        public long? SiteId { get; set; }

        /// <summary>
        /// 用户ID
        /// </summary>
        [SugarColumn(IsNullable = true)]
        public long UserId { get; set; }
        /// <summary>
        /// 用户手机号
        /// </summary>
        [SugarColumn(IsNullable = true)]
        public string Mobile { get; set; }

        /// <summary>
        /// 员工ID
        /// </summary>
        [SugarColumn(IsNullable = true)]
        public long? EmployeeId { get; set; }

        /// <summary>
        /// 加油卡号
        /// </summary>
        [SugarColumn(IsNullable = true)]
        public string CardNo { get; set; }

        /// <summary>
        /// 油枪号
        /// </summary>
        [SugarColumn(IsNullable = true)]
        public string OilGunNo { get; set; }

        /// <summary>
        /// 油品ID
        /// </summary>
        [SugarColumn(IsNullable = true)]
        public long OilProductId { get; set; }
        /// <summary>
        /// 油品
        /// </summary>
        [SugarColumn(IsNullable = true)]
        public string OilProduct { get; set; }

        /// <summary>
        /// 加油升数
        /// </summary>
        [SugarColumn(IsNullable = true)]
        public decimal OilVolume { get; set; }

        /// <summary>
        /// 单价
        /// </summary>
        [SugarColumn(IsNullable = true)]
        public decimal OilPrice { get; set; }

        /// <summary>
        /// 泵码
        /// </summary>
        [SugarColumn(IsNullable = true)]
        public long PumpMeter { get; set; }

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

        /// <summary>
        /// 应付金额
        /// </summary>
        [SugarColumn(IsNullable = true)]
        public decimal PayableAmount { get; set; }
        /// <summary>
        /// 车牌号
        /// </summary>
        [SugarColumn(IsNullable = true)]
        public string LicencePlate { get; set; }

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

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

        /// <summary>
        /// 支付平台交易流水号
        /// </summary>
        [SugarColumn(IsNullable = true)]
        public string PaymentTradeNo { get; set; }

        /// <summary>
        /// 支付结果：0-待支付，1-支付成功，2-支付失败
        /// </summary>
        [SugarColumn(IsNullable = true)]
        public int PaymentStatus { get; set; }

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

        /// <summary>
        /// 挂枪时间
        /// </summary>
        [SugarColumn(IsNullable = true)]
        public DateTime? HangGunTime { get; set; }

        /// <summary>
        /// 纬度
        /// </summary>
        [SugarColumn(IsNullable = true)]
        public decimal? Latitude { get; set; }

        /// <summary>
        /// 经度
        /// </summary>
        [SugarColumn(IsNullable = true)]
        public decimal? Longitude { get; set; }

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

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

        /// <summary>
        /// 订单状态 0：订单未支付，1：订单已支付，2：订单支付中，3：订单通过卡支付，4：订单已完成，5：已取消
        /// </summary>
        [SugarColumn(IsNullable = true)]
        public int OrderStatus { get; set; }

        /// <summary>
        /// 删除：0-未删除，1-已删除
        /// </summary>
        [SugarColumn(IsNullable = true)]
        public byte IsDeleted { get; set; }

        /// <summary>
        /// 创建时间
        /// </summary>

        [SugarColumn(IsNullable = true)] 
        public DateTime CreatedAt { get; set; }

        /// <summary>
        /// 最后更新时间
        /// </summary>
        [SugarColumn(IsNullable = true)]
        public DateTime UpdatedAt { get; set; }

        /// <summary>
        /// 设备编号
        /// </summary>
        [SugarColumn(IsNullable = true)]
        public string DeviceId { get; set; }

    }
}
