刘涛 8c0a5f489d Initial commit: hulai admin API backend
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-22 22:01:23 +08:00

26 行
525 B
Python

from __future__ import annotations
from pydantic import BaseModel
class GalleryItemSchema(BaseModel):
title: str | None = None
image: str
photographer: str | None = None
location: str | None = None
description: str | None = None
tags: list = []
is_visible: bool = True
class GalleryItemResponse(GalleryItemSchema):
id: int
sort_order: int = 0
class Config:
from_attributes = True
class GalleryListResponse(BaseModel):
items: list[GalleryItemResponse]
total: int