from enum import Enum

class Module(str, Enum):
    """Application modules."""
    LMS = "LMS"
    CMS = "CMS"
    ECOMMERCE = "ECOMMERCE"
    CRM = "CRM"
    
    @property
    def display_name(self) -> str:
        """Get display name"""
        names = {
            self.LMS: "Learning Management System",
            self.CMS: "Content Management System",
            self.ECOMMERCE: "E-commerce Platform",
            self.CRM: "Customer Relationship Management",
        }
        return names.get(self, self.value)

class Environment(str, Enum):
    """Server environment types."""
    DEVELOPMENT = "development"
    DEMO = "demo"
    STAGING = "staging"
    PRODUCTION = "production"
    TESTING = "testing"
    
    @property
    def is_debug(self) -> bool:
        """Determine if debug mode should be enabled"""
        return self in [self.DEVELOPMENT, self.DEMO, self.TESTING]
    
    @property
    def is_production(self) -> bool:
        """Check if environment is production"""
        return self == self.PRODUCTION


class Runtime(str, Enum):
    """Runtime environment types."""
    LOCAL = "local"
    DOCKER = "docker"
    KUBERNETES = "kubernetes"
    CLOUD = "cloud"
    
    @property
    def is_containerized(self) -> bool:
        """Check if running in container"""
        return self in [self.DOCKER, self.KUBERNETES, self.CLOUD]

