"""Enumهای دامنه مدل‌های Core."""
from __future__ import annotations

import enum


class TenantStatus(str, enum.Enum):
    # چرخه عمر عملیاتی (فاز onboarding)
    DRAFT = "draft"
    PENDING_ACTIVATION = "pending_activation"
    ACTIVE = "active"
    SUSPENDED = "suspended"
    ARCHIVED = "archived"
    # مقادیر قدیمی (سازگاری با فاز‌های قبلی)
    INACTIVE = "inactive"
    DELETED = "deleted"


class TenantMembershipRole(str, enum.Enum):
    """نقش کاربر داخل یک tenant مشخص (متفاوت از نقش سراسری JWT)."""

    PLATFORM_ADMIN = "platform_admin"
    TENANT_OWNER = "tenant_owner"
    TENANT_ADMIN = "tenant_admin"
    TENANT_EDITOR = "tenant_editor"
    TENANT_VIEWER = "tenant_viewer"


class MembershipStatus(str, enum.Enum):
    ACTIVE = "active"
    INVITED = "invited"
    DISABLED = "disabled"


class DomainVerificationStatus(str, enum.Enum):
    PENDING = "pending"
    VERIFIED = "verified"
    FAILED = "failed"


class DomainType(str, enum.Enum):
    SUBDOMAIN = "subdomain"
    CUSTOM_DOMAIN = "custom_domain"


class ServiceStatus(str, enum.Enum):
    ACTIVE = "active"
    INACTIVE = "inactive"
    MAINTENANCE = "maintenance"


class UserRole(str, enum.Enum):
    USER = "user"
    PENDING_TENANT_ADMIN = "pending_tenant_admin"
    TENANT_ADMIN = "tenant_admin"
    PLATFORM_ADMIN = "platform_admin"


class UserStatus(str, enum.Enum):
    ACTIVE = "active"
    INACTIVE = "inactive"
    SUSPENDED = "suspended"
