feat: add WonderQ admin backend

Add FastAPI admin/public API service, database setup, Docker deployment files, docs, and tests.
This commit is contained in:
duanshuwen
2026-06-30 13:56:45 +08:00
parent 90496fd300
commit 75f5a5a48b
34 changed files with 2208 additions and 25 deletions

13
tests/test_schemas.py Normal file
View File

@@ -0,0 +1,13 @@
import pytest
from pydantic import ValidationError
from app.schemas import LeadCreateIn, ProductCreateIn
def test_lead_phone_is_normalized():
lead = LeadCreateIn(phone=" 187 8617 4929 ")
assert lead.phone == "187 8617 4929"
def test_product_title_requires_two_chars():
with pytest.raises(ValidationError):
ProductCreateIn(title="A")