feat: add destination page configurable modules

This commit adds full support for two new destination page modules: a hero banner section and categorized destination regions.

Changes include:
- New SQLAlchemy models and alembic migration for DestinationHero and DestinationRegion tables
- Updated Pydantic SiteConfigPatchIn schema with new optional fields
- Integrated admin CRUD support for the new modules
- Added default seed data for Guizhou destination regions and hero content
- Exposed active modules via public site config API
- Added comprehensive test coverage for admin and public endpoints
This commit is contained in:
duanshuwen
2026-07-07 21:24:30 +08:00
parent 83906f481d
commit d11c361aa2
8 changed files with 262 additions and 13 deletions

View File

@@ -42,6 +42,24 @@ DESTINATIONS = [
("黔东南", "/assets/guizhou/xijiang-miao-village.jpg"),
]
DESTINATION_HERO = [
{
"title": "山水、苗寨、古城与野咖同程安排",
"kicker": "贵州小包团目的地",
"image": "/assets/guizhou/huangguoshu-waterfall.jpg",
},
]
DESTINATION_REGIONS = [
{"label": "贵阳/安顺", "keyword": "贵阳安顺", "spots": "甲秀楼、黄果树"},
{"label": "黔东南", "keyword": "黔东南", "spots": "西江、镇远、肇兴"},
{"label": "黔南", "keyword": "黔南荔波", "spots": "荔波小七孔、茂兰"},
{"label": "铜仁", "keyword": "铜仁梵净山", "spots": "梵净山、云舍"},
{"label": "黔西南", "keyword": "黔西南万峰林", "spots": "万峰林、马岭河"},
{"label": "遵义/黔北", "keyword": "遵义赤水", "spots": "娄山关、赤水丹霞"},
{"label": "毕节/六盘水", "keyword": "毕节六盘水", "spots": "织金洞、乌蒙草原"},
]
ALIASES = {
"贵阳": ["贵阳", "青岩", "花溪", "高坡", "天河潭"],
"黄果树": ["黄果树", "安顺", "坝陵河", "瀑布"],