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

namespace TakeoutSaaS.Domain.Merchants.Entities;

/// <summary>
/// 商户主体信息，承载入驻和资质审核结果。
/// </summary>
public sealed class Merchant : MultiTenantEntityBase
{
    /// <summary>
    /// 品牌名称（对外展示）。
    /// </summary>
    public string BrandName { get; set; } = string.Empty;

    /// <summary>
    /// 品牌简称或别名。
    /// </summary>
    public string? BrandAlias { get; set; }

    /// <summary>
    /// 品牌 Logo。
    /// </summary>
    public string? LogoUrl { get; set; }

    /// <summary>
    /// 品牌所属品类，如火锅、咖啡等。
    /// </summary>
    public string? Category { get; set; }

    /// <summary>
    /// 营业执照号。
    /// </summary>
    public string? BusinessLicenseNumber { get; set; }

    /// <summary>
    /// 营业执照扫描件地址。
    /// </summary>
    public string? BusinessLicenseImageUrl { get; set; }

    /// <summary>
    /// 税号/统一社会信用代码。
    /// </summary>
    public string? TaxNumber { get; set; }

    /// <summary>
    /// 法人或负责人姓名。
    /// </summary>
    public string? LegalPerson { get; set; }

    /// <summary>
    /// 联系电话。
    /// </summary>
    public string ContactPhone { get; set; } = string.Empty;

    /// <summary>
    /// 联系邮箱。
    /// </summary>
    public string? ContactEmail { get; set; }

    /// <summary>
    /// 客服电话。
    /// </summary>
    public string? ServicePhone { get; set; }

    /// <summary>
    /// 客服邮箱。
    /// </summary>
    public string? SupportEmail { get; set; }

    /// <summary>
    /// 所在省份。
    /// </summary>
    public string? Province { get; set; }

    /// <summary>
    /// 所在城市。
    /// </summary>
    public string? City { get; set; }

    /// <summary>
    /// 所在区县。
    /// </summary>
    public string? District { get; set; }

    /// <summary>
    /// 详细地址。
    /// </summary>
    public string? Address { get; set; }

    /// <summary>
    /// 经度信息。
    /// </summary>
    public double? Longitude { get; set; }

    /// <summary>
    /// 纬度信息。
    /// </summary>
    public double? Latitude { get; set; }

    /// <summary>
    /// 入驻状态。
    /// </summary>
    public MerchantStatus Status { get; set; } = MerchantStatus.Pending;

    /// <summary>
    /// 审核备注或驳回原因。
    /// </summary>
    public string? ReviewRemarks { get; set; }

    /// <summary>
    /// 入驻时间。
    /// </summary>
    public DateTime? JoinedAt { get; set; }

    /// <summary>
    /// 最近一次审核时间。
    /// </summary>
    public DateTime? LastReviewedAt { get; set; }
}
