Checkpoint: v2.0完整版本:新增社区排行榜、每日打卡、24种成就徽章、实时摄像头姿势分析、在线录制(稳定压缩流/断线重连/自动剪辑)、移动端全面适配。47个测试通过。包含完整开发文档。

这个提交包含在:
Manus
2026-03-14 08:04:00 -04:00
父节点 36907d1110
当前提交 2c418b482e
修改 22 个文件,包含 4370 行新增41 行删除

查看文件

@@ -20,6 +20,12 @@ export const users = mysqlTable("users", {
totalSessions: int("totalSessions").default(0),
/** Total training minutes */
totalMinutes: int("totalMinutes").default(0),
/** Current consecutive check-in streak */
currentStreak: int("currentStreak").default(0),
/** Longest ever streak */
longestStreak: int("longestStreak").default(0),
/** Total shots across all analyses */
totalShots: int("totalShots").default(0),
createdAt: timestamp("createdAt").defaultNow().notNull(),
updatedAt: timestamp("updatedAt").defaultNow().onUpdateNow().notNull(),
lastSignedIn: timestamp("lastSignedIn").defaultNow().notNull(),
@@ -181,3 +187,38 @@ export const ratingHistory = mysqlTable("rating_history", {
export type RatingHistory = typeof ratingHistory.$inferSelect;
export type InsertRatingHistory = typeof ratingHistory.$inferInsert;
/**
* Daily check-in records for streak tracking
*/
export const dailyCheckins = mysqlTable("daily_checkins", {
id: int("id").autoincrement().primaryKey(),
userId: int("userId").notNull(),
/** Check-in date (YYYY-MM-DD stored as string for easy comparison) */
checkinDate: varchar("checkinDate", { length: 10 }).notNull(),
/** Current streak at the time of check-in */
streakCount: int("streakCount").notNull().default(1),
/** Optional notes for the day */
notes: text("notes"),
/** Training minutes logged this day */
minutesTrained: int("minutesTrained").default(0),
createdAt: timestamp("createdAt").defaultNow().notNull(),
});
export type DailyCheckin = typeof dailyCheckins.$inferSelect;
export type InsertDailyCheckin = typeof dailyCheckins.$inferInsert;
/**
* Achievement badges earned by users
*/
export const userBadges = mysqlTable("user_badges", {
id: int("id").autoincrement().primaryKey(),
userId: int("userId").notNull(),
/** Badge identifier key */
badgeKey: varchar("badgeKey", { length: 64 }).notNull(),
/** When the badge was earned */
earnedAt: timestamp("earnedAt").defaultNow().notNull(),
});
export type UserBadge = typeof userBadges.$inferSelect;
export type InsertUserBadge = typeof userBadges.$inferInsert;