feat: T03+T04 backend - FastAPI, DB models, Rentman integration, admin auth, APScheduler
This commit is contained in:
@@ -0,0 +1,42 @@
|
||||
"""Pydantic schemas for equipment endpoints."""
|
||||
from pydantic import BaseModel
|
||||
from decimal import Decimal
|
||||
from typing import Any
|
||||
|
||||
|
||||
class EquipmentItem(BaseModel):
|
||||
id: int
|
||||
rentman_id: str
|
||||
name: str
|
||||
number: str | None = None
|
||||
category: str | None = None
|
||||
description: str | None = None
|
||||
image_url: str | None = None
|
||||
rental_price: Decimal | None = None
|
||||
available: bool = True
|
||||
|
||||
model_config = {"from_attributes": True}
|
||||
|
||||
|
||||
class EquipmentDetail(BaseModel):
|
||||
id: int
|
||||
rentman_id: str
|
||||
name: str
|
||||
number: str | None = None
|
||||
category: str | None = None
|
||||
description: str | None = None
|
||||
specifications: dict[str, Any] | None = None
|
||||
images: list[str] | None = None
|
||||
rental_price: Decimal | None = None
|
||||
brand: str | None = None
|
||||
available: bool = True
|
||||
|
||||
model_config = {"from_attributes": True}
|
||||
|
||||
|
||||
class PaginatedResponse(BaseModel):
|
||||
items: list[EquipmentItem]
|
||||
total: int
|
||||
page: int
|
||||
page_size: int
|
||||
total_pages: int
|
||||
Reference in New Issue
Block a user