namespace Fengling.Platform.Domain.AggregatesModel.TenantAggregate;

/// <summary>
/// 租户信息
/// </summary>
/// <param name="TenantId"></param>
/// <param name="TenantCode"></param>
/// <param name="TenantName"></param>
public record TenantInfo(long? TenantId, string? TenantCode, string? TenantName)
{
    /// <summary>
    /// 租户信息
    /// </summary>
    /// <param name="tenant"></param>
    public TenantInfo(Tenant? tenant)
        : this(tenant?.Id, tenant?.TenantCode, tenant?.Name)
    {
    }
    
    /// <summary>
    /// 无租户，系统级
    /// </summary>
    public static TenantInfo Admin => new TenantInfo(null, null, null);
}