feat(hotelGroups): add offer display fields and related logic

- Add new database columns (coverImage, priceAmount, priceUnit, tags, status) to HotelGroup model
- Create hotel_group_dict serializer to handle image/coverImage synchronization and tag formatting
- Update site config endpoints to use the new serializer and filter published hotel groups
- Add Alembic migration for the new database schema changes
- Update test fixtures and API contract tests for the new fields
- Revise public and admin API documentation to document the new hotel group fields and usage rules
This commit is contained in:
duanshuwen
2026-07-03 22:44:57 +08:00
parent 201e835eab
commit 1aac3c64b2
9 changed files with 188 additions and 28 deletions

View File

@@ -145,6 +145,12 @@ def reset_guizhou_content(db: Session) -> dict:
title=group["title"],
description=group.get("description"),
image=group.get("image"),
coverImage=group.get("coverImage") or group.get("image"),
priceAmount=group.get("priceAmount"),
priceUnit=group.get("priceUnit") or "起/晚",
tags=group.get("tags", []),
status=group.get("status", "published"),
isActive=group.get("isActive", True),
sortOrder=index,
)
)