using TakeoutSaaS.Domain.Distribution.Enums;
using TakeoutSaaS.Shared.Abstractions.Entities;

namespace TakeoutSaaS.Domain.Distribution.Entities;

/// <summary>
/// 分销订单记录。
/// </summary>
public sealed class AffiliateOrder : MultiTenantEntityBase
{
    /// <summary>
    /// 推广人标识。
    /// </summary>
    public long AffiliatePartnerId { get; set; }

    /// <summary>
    /// 关联订单。
    /// </summary>
    public long OrderId { get; set; }

    /// <summary>
    /// 用户 ID。
    /// </summary>
    public long BuyerUserId { get; set; }

    /// <summary>
    /// 订单金额。
    /// </summary>
    public decimal OrderAmount { get; set; }

    /// <summary>
    /// 预计佣金。
    /// </summary>
    public decimal EstimatedCommission { get; set; }

    /// <summary>
    /// 当前状态。
    /// </summary>
    public AffiliateOrderStatus Status { get; set; } = AffiliateOrderStatus.Pending;

    /// <summary>
    /// 结算完成时间。
    /// </summary>
    public DateTime? SettledAt { get; set; }
}
