"""Catalog schemas."""
from __future__ import annotations


from datetime import datetime, date, time
from uuid import UUID

from pydantic import BaseModel, ConfigDict, Field

from app.models.types import LifecycleStatus, ServiceStatus
from app.schemas.common import ORMBase

_FORBID = ConfigDict(extra="forbid")


class ServiceCategoryCreate(BaseModel):
    model_config = _FORBID

    organization_id: UUID
    code: str = Field(max_length=50)
    name: str = Field(max_length=255)
    description: str | None = None
    status: LifecycleStatus = LifecycleStatus.ACTIVE
    sort_order: int = 0


class ServiceCategoryRead(ORMBase):
    id: UUID
    tenant_id: UUID
    organization_id: UUID
    code: str
    name: str
    description: str | None
    status: LifecycleStatus
    sort_order: int
    is_deleted: bool
    created_by: str | None
    updated_by: str | None
    created_at: datetime
    updated_at: datetime


from datetime import datetime, date, time
from uuid import UUID

from pydantic import BaseModel, ConfigDict, Field

from app.models.types import ServiceStatus
from app.schemas.common import ORMBase

_FORBID = ConfigDict(extra="forbid")


class BeautyServiceCreate(BaseModel):
    model_config = _FORBID

    organization_id: UUID
    category_id: UUID | None = None
    code: str = Field(max_length=50)
    name: str = Field(max_length=255)
    description: str | None = None
    status: ServiceStatus = ServiceStatus.DRAFT
    base_duration_minutes: int = 30
    base_price: float | None = None
    metadata_json: dict | None = None


class BeautyServiceRead(ORMBase):
    id: UUID
    tenant_id: UUID
    organization_id: UUID
    category_id: UUID | None
    code: str
    name: str
    description: str | None
    status: ServiceStatus
    base_duration_minutes: int
    base_price: float | None
    metadata_json: dict | None
    is_deleted: bool
    created_by: str | None
    updated_by: str | None
    created_at: datetime
    updated_at: datetime
