"""
Constants for the licensing module.

This module contains all constants used across the licensing app:
- Plan IDs
- Rule IDs
- Enums
"""

from enum import Enum


class BillingPeriod(str, Enum):
    """Billing period for subscriptions."""
    MONTHLY = "monthly"
    YEARLY = "yearly"


# License Application IDs
DEFAULT_APPLICATION = "DEFAULT"

# License Plan IDs
FREE_PLAN = "FREE"
STARTER_PLAN = "STARTER"
PRO_PLAN = "PRO"

# License Rule IDs
MAX_USERS = "MAX_USERS"
MAX_PROJECTS_PER_MONTH = "MAX_PROJECTS_PER_MONTH"

# Role IDs
LICENSE_ADMIN_ROLE = "LICENSE_ADMIN_ROLE"

# Error messages
AUTHENTICATION_REQUIRED_ERROR = "AUTHENTICATION_REQUIRED_ERROR"
NOT_CLIENT_ASSOCIATED_USER_ERROR = "NOT_CLIENT_ASSOCIATED_USER_ERROR"
NO_PAYMENT_CUSTOMER_ERROR = "NO_PAYMENT_CUSTOMER_ERROR"
CHECKOUT_SESSION_FAILED_ERROR = "CHECKOUT_SESSION_FAILED_ERROR"
NO_ACTIVE_SUBSCRIPTION_ERROR = "NO_ACTIVE_SUBSCRIPTION_ERROR"
SAME_PLAN_ERROR = "SAME_PLAN_ERROR"
PLAN_NOT_FOUND_ERROR = "PLAN_NOT_FOUND_ERROR"
CANCEL_SUBSCRIPTION_FAILED_ERROR = "CANCEL_SUBSCRIPTION_FAILED_ERROR"
NO_PROVIDER_SUBSCRIPTION_ERROR = "NO_PROVIDER_SUBSCRIPTION_ERROR"