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:
@@ -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,
|
||||
)
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user