using IamService.Domain.SeedWork;

namespace IamService.Domain.AggregatesModel.OrganizationAggregate;

/// <summary>
/// EN: Organization status enumeration.
/// VI: Enumeration trạng thái tổ chức.
/// </summary>
public class OrganizationStatus : Enumeration
{
    /// <summary>
    /// EN: Organization is active and operational.
    /// VI: Tổ chức đang hoạt động.
    /// </summary>
    public static readonly OrganizationStatus Active = new(1, nameof(Active));

    /// <summary>
    /// EN: Organization is suspended (temporarily disabled).
    /// VI: Tổ chức bị tạm ngưng.
    /// </summary>
    public static readonly OrganizationStatus Suspended = new(2, nameof(Suspended));

    /// <summary>
    /// EN: Organization is pending approval.
    /// VI: Tổ chức đang chờ phê duyệt.
    /// </summary>
    public static readonly OrganizationStatus PendingApproval = new(3, nameof(PendingApproval));

    /// <summary>
    /// EN: Organization is archived (soft deleted).
    /// VI: Tổ chức đã được lưu trữ (xóa mềm).
    /// </summary>
    public static readonly OrganizationStatus Archived = new(4, nameof(Archived));

    public OrganizationStatus(int id, string name) : base(id, name)
    {
    }

    /// <summary>
    /// EN: Get all organization statuses.
    /// VI: Lấy tất cả trạng thái tổ chức.
    /// </summary>
    public static IEnumerable<OrganizationStatus> GetAll() =>
    [
        Active,
        Suspended,
        PendingApproval,
        Archived
    ];
}
