### 心情打卡功能测试 ### 1. 创建心情打卡 - 开心 POST http://localhost:3000/mood-checkins Authorization: Bearer YOUR_JWT_TOKEN Content-Type: application/json { "moodType": "happy", "intensity": 8, "description": "今天完成了重要的项目,心情很好!", "checkinDate": "2025-08-21", "metadata": { "tags": ["工作", "成就感"], "trigger": "完成项目里程碑" } } ### 2. 创建心情打卡 - 焦虑 POST http://localhost:3000/mood-checkins Authorization: Bearer YOUR_JWT_TOKEN Content-Type: application/json { "moodType": "anxious", "intensity": 6, "description": "明天有重要的会议,感到有些紧张", "checkinDate": "2025-08-21", "metadata": { "tags": ["工作", "压力"], "trigger": "重要会议前的紧张" } } ### 3. 创建心情打卡 - 心动 POST http://localhost:3000/mood-checkins Authorization: Bearer YOUR_JWT_TOKEN Content-Type: application/json { "moodType": "excited", "intensity": 9, "description": "看到喜欢的人发来消息,心跳加速", "checkinDate": "2025-08-21", "metadata": { "tags": ["感情", "甜蜜"], "trigger": "收到心仪对象的消息" } } ### 3. 获取今日心情打卡 GET http://localhost:3000/mood-checkins/daily Authorization: Bearer YOUR_JWT_TOKEN ### 4. 获取指定日期心情打卡 GET http://localhost:3000/mood-checkins/daily?date=2025-08-21 Authorization: Bearer YOUR_JWT_TOKEN ### 5. 获取心情打卡历史 GET http://localhost:3000/mood-checkins/history?startDate=2025-08-01&endDate=2025-08-31 Authorization: Bearer YOUR_JWT_TOKEN ### 6. 获取心情打卡历史(按类型过滤) GET http://localhost:3000/mood-checkins/history?startDate=2025-08-01&endDate=2025-08-31&moodType=happy Authorization: Bearer YOUR_JWT_TOKEN ### 7. 获取心情统计数据 GET http://localhost:3000/mood-checkins/statistics?startDate=2025-08-01&endDate=2025-08-31 Authorization: Bearer YOUR_JWT_TOKEN ### 8. 更新心情打卡 PUT http://localhost:3000/mood-checkins Authorization: Bearer YOUR_JWT_TOKEN Content-Type: application/json { "id": "MOOD_CHECKIN_ID", "moodType": "thrilled", "intensity": 9, "description": "更新后的心情描述 - 非常兴奋!", "metadata": { "tags": ["更新", "兴奋"], "trigger": "收到好消息" } } ### 9. 删除心情打卡 DELETE http://localhost:3000/mood-checkins Authorization: Bearer YOUR_JWT_TOKEN Content-Type: application/json { "id": "MOOD_CHECKIN_ID" }