first commit

This commit is contained in:
xuyong
2026-04-15 21:35:26 +08:00
commit 7097fa6b44
69 changed files with 5642 additions and 0 deletions

20
app/api/v1/example.py Normal file
View File

@@ -0,0 +1,20 @@
from fastapi import APIRouter
from app.services.example_service import ExampleService
router = APIRouter()
service = ExampleService()
@router.get("/examples")
async def list_examples():
return await service.list_all()
@router.get("/examples/{example_id}")
async def get_example(example_id: str):
return await service.get_by_id(example_id)
@router.post("/examples")
async def create_example(data: dict):
return await service.create(data)