"""Salon 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, ResourceStatus
from app.schemas.common import ORMBase

_FORBID = ConfigDict(extra="forbid")


class TreatmentRoomCreate(BaseModel):
    model_config = _FORBID

    organization_id: UUID
    branch_id: UUID
    code: str = Field(max_length=50)
    name: str = Field(max_length=255)
    description: str | None = None
    status: ResourceStatus = ResourceStatus.AVAILABLE
    capacity: int = 1
    metadata_json: dict | None = None


class TreatmentRoomRead(ORMBase):
    id: UUID
    tenant_id: UUID
    organization_id: UUID
    branch_id: UUID
    code: str
    name: str
    description: str | None
    status: ResourceStatus
    capacity: int
    metadata_json: dict | None
    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 ResourceStatus
from app.schemas.common import ORMBase

_FORBID = ConfigDict(extra="forbid")


class StationCreate(BaseModel):
    model_config = _FORBID

    organization_id: UUID
    branch_id: UUID
    room_id: UUID | None = None
    code: str = Field(max_length=50)
    name: str = Field(max_length=255)
    status: ResourceStatus = ResourceStatus.AVAILABLE
    metadata_json: dict | None = None


class StationRead(ORMBase):
    id: UUID
    tenant_id: UUID
    organization_id: UUID
    branch_id: UUID
    room_id: UUID | None
    code: str
    name: str
    status: ResourceStatus
    metadata_json: dict | None
    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 LifecycleStatus
from app.schemas.common import ORMBase

_FORBID = ConfigDict(extra="forbid")


class BranchPolicyCreate(BaseModel):
    model_config = _FORBID

    organization_id: UUID
    branch_id: UUID
    code: str = Field(max_length=50)
    name: str = Field(max_length=255)
    policy_type: str = Field(max_length=50)
    rules: dict | None = None
    status: LifecycleStatus = LifecycleStatus.ACTIVE


class BranchPolicyRead(ORMBase):
    id: UUID
    tenant_id: UUID
    organization_id: UUID
    branch_id: UUID
    code: str
    name: str
    policy_type: str
    rules: dict | None
    status: LifecycleStatus
    is_deleted: bool
    created_by: str | None
    updated_by: str | None
    created_at: datetime
    updated_at: datetime
