Files
AI-Health/CLAUDE.md
MingNian 16d1d3d305 feat: 用药打卡全面重构 - 按次追踪 + 独立打卡页 + 任务区汇总
- 后端用药提醒改为按次粒度(每个服药时间独立判断)
- 新增 per-dose 打卡/取消打卡 API
- 新增 MedicationCheckInPage 独立打卡页(每药每时间单独toggle)
- 用药列表删底部弹窗(编辑/停药),点药品直接进该药打卡页
- 任务区用药汇总为一行(过期待服已服)
- 支持隔天(EveryOtherDay)/每周频率判断
- 删历史对话功能(ConversationItem + conversationListProvider + UI)
2026-06-08 16:21:13 +08:00

28 lines
1016 B
Markdown
Raw Permalink Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

# AI APP — 编码规范
## 后端 C# (.NET 10)
- 主构造函数:`public class Service(DbContext db) { }`
- 静态方法必须标记 `static`
- 集合表达式:`[]` / `[..src]`
- `TryGetValue` 替代 `GetValueOrDefault`
- 空 catch 必须指定异常类型
- DTO 用 `record` 类型
- `private static readonly` 缓存可复用对象
- 本地函数优于 `Func<T>` 赋值
- file-scoped namespace、global using、target-typed `new()``Nullable=enable`
- Minimal API 扩展方法模式:`public static class XxxEndpoints { }`
- AI 请求用 `HttpClient` 直连,不引入第三方 AI SDK
- **文件命名 snake_case**`auth_service.cs``auth_endpoints.cs`
## 前端 Flutter (Dart)
-前端用sqlite存储信息不用shared_preferences
- 用 Riverpod 管理所有状态和页面跳转
- com.datalumina.YYA applicationId用这个这个是有要求的
## 运行与测试
- 测试时自行启动后端,通过浏览器 DevTools 发送请求验证
- Flutter 用 `flutter run` 连模拟器/真机