# -*- coding: utf-8 -*-
"""字段枚举定义 — 从 ETL models/ 提取的通用枚举。

所有枚举继承 (str, Enum)，值为小写英文标识符，
便于与数据库字段、API 响应直接比较。
"""
from enum import Enum


class PaymentStatus(str, Enum):
    """支付状态"""
    PENDING = "pending"          # 待支付
    PAID = "paid"                # 已支付
    REFUNDED = "refunded"        # 已退款
    PARTIALLY_REFUNDED = "partially_refunded"  # 部分退款
    CANCELLED = "cancelled"      # 已取消


class OrderStatus(str, Enum):
    """订单状态"""
    PENDING = "pending"          # 待处理
    CONFIRMED = "confirmed"      # 已确认
    IN_PROGRESS = "in_progress"  # 进行中
    COMPLETED = "completed"      # 已完成
    CANCELLED = "cancelled"      # 已取消
    REFUNDED = "refunded"        # 已退款


class MemberStatus(str, Enum):
    """会员状态"""
    ACTIVE = "active"            # 活跃
    INACTIVE = "inactive"        # 不活跃
    SUSPENDED = "suspended"      # 已冻结
    EXPIRED = "expired"          # 已过期


class AssistantStatus(str, Enum):
    """助教状态"""
    ACTIVE = "active"            # 在职
    ON_LEAVE = "on_leave"        # 请假
    RESIGNED = "resigned"        # 已离职


class DataSource(str, Enum):
    """数据源模式（与 ETL orchestration 保持一致）"""
    ONLINE = "online"            # 在线抓取
    OFFLINE = "offline"          # 本地回放
    HYBRID = "hybrid"            # 抓取 + 入库


class TaskCategory(str, Enum):
    """ETL 任务分类"""
    ODS = "ODS"
    DWD = "DWD"
    DWS = "DWS"
    SCHEMA = "Schema"
    QUALITY = "Quality"
    OTHER = "Other"
