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

namespace TakeoutSaaS.Domain.Distribution.Entities;

/// <summary>
/// 分销/推广合作伙伴。
/// </summary>
public sealed class AffiliatePartner : MultiTenantEntityBase
{
    /// <summary>
    /// 用户 ID（如绑定平台账号）。
    /// </summary>
    public long? UserId { get; set; }

    /// <summary>
    /// 昵称或渠道名称。
    /// </summary>
    public string DisplayName { get; set; } = string.Empty;

    /// <summary>
    /// 联系电话。
    /// </summary>
    public string? Phone { get; set; }

    /// <summary>
    /// 渠道类型。
    /// </summary>
    public AffiliateChannelType ChannelType { get; set; } = AffiliateChannelType.Personal;

    /// <summary>
    /// 分成比例（0-1）。
    /// </summary>
    public decimal CommissionRate { get; set; }

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

    /// <summary>
    /// 审核备注。
    /// </summary>
    public string? Remarks { get; set; }
}
