2026-03-07 23:47:13 +08:00

131 lines
2.9 KiB
C#
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

using SqlSugar;
using YD_Event.Core.Enum;
namespace YD_Event.Core.Entities;
/// <summary>
/// 订单表
/// </summary>
[SugarTable("Order")]
public class Order : Entity<long>, ISoftDelete, ICreatedUserId, ICreatedTime, IUpdatedUserId, IUpdatedTime, IAvailability
{
/// <summary>
/// 订单编号
/// </summary>
[SugarColumn(Length = 64)]
public string OrderNo { get; set; }
/// <summary>
/// 订单类型:1-收入,2-退款
/// </summary>
public int OrderType { get; set; }
/// <summary>
/// 支付方式:1-线上,2-线下
/// </summary>
public int PaymentMethod { get; set; }
/// <summary>
/// 报名方式:1-个人,2-团队
/// </summary>
public int RegistrationMode { get; set; }
/// <summary>
/// 商户ID(单位关联)
/// </summary>
[SugarColumn(IsNullable = true)]
public long? MerchantId { get; set; }
/// <summary>
/// 赛事ID
/// </summary>
public long EventId { get; set; }
/// <summary>
/// 报名ID
/// </summary>
public long RegistrationId { get; set; }
/// <summary>
/// 关联订单ID(退款时关联原订单)
/// </summary>
[SugarColumn(IsNullable = true)]
public long? RelatedOrderId { get; set; }
/// <summary>
/// 付款凭证URL
/// </summary>
[SugarColumn(Length = 512, IsNullable = true)]
public string? PaymentProofUrl { get; set; }
/// <summary>
/// 优惠券ID
/// </summary>
[SugarColumn(IsNullable = true)]
public long? CouponId { get; set; }
/// <summary>
/// 原金额
/// </summary>
public decimal OriginalAmount { get; set; }
/// <summary>
/// 优惠金额
/// </summary>
public decimal DiscountAmount { get; set; }
/// <summary>
/// 实付/退款金额
/// </summary>
public decimal ActualAmount { get; set; }
/// <summary>
/// 订单状态
/// </summary>
public OrderStatus OrderStatus { get; set; }
/// <summary>
/// 支付/退款时间
/// </summary>
[SugarColumn(IsNullable = true)]
public DateTime? PaymentTime { get; set; }
/// <summary>
/// 备注
/// </summary>
[SugarColumn(Length = 512, IsNullable = true)]
public string? Remark { get; set; }
/// <summary>
/// 可用状态
/// </summary>
public AvailabilityStatus Status { get; set; }
/// <summary>
/// 标记删除
/// </summary>
public bool DeleteMark { get; set; }
/// <summary>
/// 创建人
/// </summary>
public long CreatedUserId { get; set; }
/// <summary>
/// 创建时间
/// </summary>
public DateTime CreatedTime { get; set; }
/// <summary>
/// 更新人
/// </summary>
[SugarColumn(IsNullable = true)]
public long? UpdatedUserId { get; set; }
/// <summary>
/// 更新时间
/// </summary>
[SugarColumn(IsNullable = true)]
public DateTime? UpdatedTime { get; set; }
}