智能旅游数据库设计
表结构
_User (Parse内置表)
- objectId: String
- username: String
- email: String
- createdAt: Date
- updatedAt: Date
- phone: String
- profilePic: File
- emergencyContact: String
TouristResource (旅游资源)
- objectId: String
- createdAt: Date
- updatedAt: Date
- name: String
- type: String
景点/酒店/餐厅
- description: String
- location: GeoPoint
- openingHours: String
- priceRange: String
- images: File[]
- rating: Number
- capacity: Number
承载量
Itinerary (行程提醒)
- objectId: String
- createdAt: Date
- updatedAt: Date
- title: String
- startTime: Date
- endTime: Date
- reminderType: String
时间/位置
- location: GeoPoint
位置提醒
- notes: String
- alertLevel: String
高/中/低
- isCompleted: Bool
TravelJournal (旅行日志)
- objectId: String
- createdAt: Date
- updatedAt: Date
- title: String
- content: String
- photos: File[]
- location: GeoPoint
- weatherData: Object
温度/湿度
- moodRating: Number
RealTimeData (实时监测)
- objectId: String
- createdAt: Date
- updatedAt: Date
- dataType: String
客流/天气/交通
- value: Object
动态JSON
- location: GeoPoint
- source: String
官方/传感器
- validity: Date
有效期
SafetyWarning (安全预警)
- objectId: String
- createdAt: Date
- updatedAt: Date
- title: String
- description: String
- severity: String
紧急/高/中
- affectedArea: GeoPoint
- validUntil: Date
- relatedHazards: String[]
自然灾害/事故
表关系
- 用户 → 行程
- 用户 → 日志
- 行程 → 资源
- 日志 → 资源
- 监测 → 资源
- 预警 → 资源
- 监测 → 预警
- 行程 → 预警