63 行
2.0 KiB
Python
63 行
2.0 KiB
Python
"""Winter camp (小蒙马冬季亲子营) data model."""
|
|
from __future__ import annotations
|
|
from sqlalchemy import Column, Integer, String, Text, DateTime, JSON
|
|
from sqlalchemy.sql import func
|
|
|
|
from app.database import Base
|
|
|
|
|
|
class WinterCampConfig(Base):
|
|
__tablename__ = "winter_camp_config"
|
|
|
|
id = Column(Integer, primary_key=True, autoincrement=True)
|
|
name = Column(String(200))
|
|
positioning = Column(Text)
|
|
days = Column(Integer)
|
|
nights = Column(Integer)
|
|
max_families = Column(Integer)
|
|
total_sessions = Column(Integer)
|
|
age_range = Column(String(50))
|
|
deposit = Column(Integer)
|
|
season = Column(String(100))
|
|
route = Column(String(200))
|
|
why_hulunbuir = Column(Text)
|
|
closing_note = Column(Text)
|
|
photographer = Column(JSON) # {name, description, specialDay2}
|
|
winter_clothing = Column(JSON) # {upper, lower, shoes, accessories}
|
|
camp_advantages = Column(JSON) # list of strings
|
|
service_config = Column(JSON) # list of strings
|
|
camp_essentials = Column(JSON) # list of strings
|
|
updated_at = Column(DateTime, server_default=func.now(), onupdate=func.now())
|
|
|
|
|
|
class WinterCampHotel(Base):
|
|
__tablename__ = "winter_camp_hotels"
|
|
|
|
id = Column(Integer, primary_key=True, autoincrement=True)
|
|
name = Column(String(200), nullable=False)
|
|
star = Column(String(50))
|
|
nights = Column(String(50))
|
|
description = Column(Text)
|
|
sort_order = Column(Integer, default=0)
|
|
|
|
|
|
class WinterCampItinerary(Base):
|
|
__tablename__ = "winter_camp_itinerary"
|
|
|
|
id = Column(Integer, primary_key=True, autoincrement=True)
|
|
day = Column(Integer, nullable=False)
|
|
title = Column(String(200))
|
|
summary = Column(Text)
|
|
highlights = Column(JSON) # list of strings
|
|
hotel = Column(String(200))
|
|
sort_order = Column(Integer, default=0)
|
|
|
|
|
|
class WinterCampFaq(Base):
|
|
__tablename__ = "winter_camp_faq"
|
|
|
|
id = Column(Integer, primary_key=True, autoincrement=True)
|
|
question = Column(Text, nullable=False)
|
|
answer = Column(Text, nullable=False)
|
|
sort_order = Column(Integer, default=0)
|