AI智能食谱推荐助手数据库结构
用户模块
- User
- username: String
- password: String
- email: String
- avatar: Parse.File
- → 收藏(UserFavorite)
- → 浏览历史(UserHistory)
- → AI对话(AIConversation)
食谱分类
- DishCategory
- categoryName: String
- description: String
- coverImage: Parse.File
- → 包含食谱(Recipe 1:N)
食谱核心
- Recipe
- recipeName: String
- ingredients: [String]
- steps: [String]
- cookingTime: Number
- calorie: Number
- coverImage: Parse.File
- tags: [String]
- ← 所属分类(DishCategory)
- → 收藏记录(UserFavorite)
- → 浏览历史(UserHistory)
用户行为
UserFavorite
- user: → User
- recipe: → Recipe
UserHistory
- user: → User
- recipe: → Recipe
- viewTime: Date
推荐系统
- DailyRecommendation
- recommendDate: Date
- recipes: → Recipe
- recommendType: String (热门/个性化)
AI对话系统
NutritionExpert
- expertName: String
- specialty: String
- description: String
- avatar: Parse.File
AIConversation
- chatHistory: [Object]
- lastActive: Date
- user: → User
- expert: → NutritionExpert
系统字段
- 通用字段
- objectId: String (主键)
- createdAt: Date
- updatedAt: Date
关系说明