using System;
using System.Collections.Generic;

namespace HoneyBox.Model.Entities;

/// <summary>
/// 订单主表，存储用户订单信息
/// </summary>
public partial class Order
{
    /// <summary>
    /// 订单ID，主键自增
    /// </summary>
    public int Id { get; set; }

    /// <summary>
    /// 用户ID
    /// </summary>
    public int UserId { get; set; }

    /// <summary>
    /// 订单编号，唯一
    /// </summary>
    public string OrderNum { get; set; } = null!;

    /// <summary>
    /// 订单总金额
    /// </summary>
    public decimal OrderTotal { get; set; }

    /// <summary>
    /// 折后订单总金额
    /// </summary>
    public decimal OrderZheTotal { get; set; }

    /// <summary>
    /// 实际支付价格
    /// </summary>
    public decimal Price { get; set; }

    /// <summary>
    /// 使用余额金额
    /// </summary>
    public decimal UseMoney { get; set; }

    /// <summary>
    /// 使用积分金额
    /// </summary>
    public decimal UseIntegral { get; set; }

    /// <summary>
    /// 使用评分金额
    /// </summary>
    public decimal UseScore { get; set; }

    /// <summary>
    /// 使用抽奖次数
    /// </summary>
    public int? UseDraw { get; set; }

    /// <summary>
    /// 使用道具卡数量
    /// </summary>
    public int? UseItemCard { get; set; }

    /// <summary>
    /// 折扣比例
    /// </summary>
    public decimal Zhe { get; set; }

    /// <summary>
    /// 商品ID
    /// </summary>
    public int GoodsId { get; set; }

    /// <summary>
    /// 购买数量/抽奖次数
    /// </summary>
    public int Num { get; set; }

    /// <summary>
    /// 商品单价
    /// </summary>
    public decimal GoodsPrice { get; set; }

    /// <summary>
    /// 商品标题快照
    /// </summary>
    public string? GoodsTitle { get; set; }

    /// <summary>
    /// 商品图片快照
    /// </summary>
    public string? GoodsImgurl { get; set; }

    /// <summary>
    /// 中奖数量
    /// </summary>
    public int PrizeNum { get; set; }

    /// <summary>
    /// 中奖卡片集合JSON
    /// </summary>
    public string? PrizeCardSet { get; set; }

    /// <summary>
    /// 订单状态：0待支付，1已支付，2已取消
    /// </summary>
    public byte Status { get; set; }

    /// <summary>
    /// 创建时间戳
    /// </summary>
    public int Addtime { get; set; }

    /// <summary>
    /// 支付时间戳
    /// </summary>
    public int PayTime { get; set; }

    /// <summary>
    /// 支付方式：1微信，2支付宝
    /// </summary>
    public byte PayType { get; set; }

    /// <summary>
    /// 订单类型：0普通，1福利屋
    /// </summary>
    public byte OrderType { get; set; }

    /// <summary>
    /// 是否快递：0否，1是
    /// </summary>
    public byte KdIs { get; set; }

    /// <summary>
    /// 使用的优惠券ID
    /// </summary>
    public int? CouponId { get; set; }

    /// <summary>
    /// 优惠券抵扣金额
    /// </summary>
    public decimal? UseCoupon { get; set; }

    /// <summary>
    /// 是否秘宝：0否，1是
    /// </summary>
    public byte? IsMibao { get; set; }

    /// <summary>
    /// 是否首折：0否，1是
    /// </summary>
    public byte? IsShouZhe { get; set; }

    /// <summary>
    /// 是否自动发货：0否，1是
    /// </summary>
    public byte ZdfhIs { get; set; }

    /// <summary>
    /// 广告ID
    /// </summary>
    public int? AdId { get; set; }

    /// <summary>
    /// 点击ID
    /// </summary>
    public int? ClickId { get; set; }

    /// <summary>
    /// 是否福利屋订单：0否，1是
    /// </summary>
    public int IsFlw { get; set; }

    /// <summary>
    /// 自动发货时间戳
    /// </summary>
    public int? ZdfhTime { get; set; }

    /// <summary>
    /// 使用积分2金额
    /// </summary>
    public decimal UseMoney2 { get; set; }

    /// <summary>
    /// 记录创建时间
    /// </summary>
    public DateTime CreatedAt { get; set; }

    /// <summary>
    /// 记录更新时间
    /// </summary>
    public DateTime UpdatedAt { get; set; }
}
