文件
tennis-training-hub/drizzle/meta/0004_snapshot.json

1233 行
31 KiB
JSON

{
"version": "5",
"dialect": "mysql",
"id": "7ad15229-2bf8-4777-8cac-bd8fddf7cc6b",
"prevId": "0892fd57-f758-43a7-a72d-e372aca4d4e3",
"tables": {
"daily_checkins": {
"name": "daily_checkins",
"columns": {
"id": {
"name": "id",
"type": "int",
"primaryKey": false,
"notNull": true,
"autoincrement": true
},
"userId": {
"name": "userId",
"type": "int",
"primaryKey": false,
"notNull": true,
"autoincrement": false
},
"checkinDate": {
"name": "checkinDate",
"type": "varchar(10)",
"primaryKey": false,
"notNull": true,
"autoincrement": false
},
"streakCount": {
"name": "streakCount",
"type": "int",
"primaryKey": false,
"notNull": true,
"autoincrement": false,
"default": 1
},
"notes": {
"name": "notes",
"type": "text",
"primaryKey": false,
"notNull": false,
"autoincrement": false
},
"minutesTrained": {
"name": "minutesTrained",
"type": "int",
"primaryKey": false,
"notNull": false,
"autoincrement": false,
"default": 0
},
"createdAt": {
"name": "createdAt",
"type": "timestamp",
"primaryKey": false,
"notNull": true,
"autoincrement": false,
"default": "(now())"
}
},
"indexes": {},
"foreignKeys": {},
"compositePrimaryKeys": {
"daily_checkins_id": {
"name": "daily_checkins_id",
"columns": [
"id"
]
}
},
"uniqueConstraints": {},
"checkConstraint": {}
},
"notification_log": {
"name": "notification_log",
"columns": {
"id": {
"name": "id",
"type": "int",
"primaryKey": false,
"notNull": true,
"autoincrement": true
},
"userId": {
"name": "userId",
"type": "int",
"primaryKey": false,
"notNull": true,
"autoincrement": false
},
"reminderId": {
"name": "reminderId",
"type": "int",
"primaryKey": false,
"notNull": false,
"autoincrement": false
},
"notificationType": {
"name": "notificationType",
"type": "varchar(32)",
"primaryKey": false,
"notNull": true,
"autoincrement": false
},
"title": {
"name": "title",
"type": "varchar(256)",
"primaryKey": false,
"notNull": true,
"autoincrement": false
},
"message": {
"name": "message",
"type": "text",
"primaryKey": false,
"notNull": false,
"autoincrement": false
},
"isRead": {
"name": "isRead",
"type": "int",
"primaryKey": false,
"notNull": false,
"autoincrement": false,
"default": 0
},
"createdAt": {
"name": "createdAt",
"type": "timestamp",
"primaryKey": false,
"notNull": true,
"autoincrement": false,
"default": "(now())"
}
},
"indexes": {},
"foreignKeys": {},
"compositePrimaryKeys": {
"notification_log_id": {
"name": "notification_log_id",
"columns": [
"id"
]
}
},
"uniqueConstraints": {},
"checkConstraint": {}
},
"pose_analyses": {
"name": "pose_analyses",
"columns": {
"id": {
"name": "id",
"type": "int",
"primaryKey": false,
"notNull": true,
"autoincrement": true
},
"videoId": {
"name": "videoId",
"type": "int",
"primaryKey": false,
"notNull": true,
"autoincrement": false
},
"userId": {
"name": "userId",
"type": "int",
"primaryKey": false,
"notNull": true,
"autoincrement": false
},
"overallScore": {
"name": "overallScore",
"type": "float",
"primaryKey": false,
"notNull": false,
"autoincrement": false
},
"poseMetrics": {
"name": "poseMetrics",
"type": "json",
"primaryKey": false,
"notNull": false,
"autoincrement": false
},
"detectedIssues": {
"name": "detectedIssues",
"type": "json",
"primaryKey": false,
"notNull": false,
"autoincrement": false
},
"corrections": {
"name": "corrections",
"type": "json",
"primaryKey": false,
"notNull": false,
"autoincrement": false
},
"exerciseType": {
"name": "exerciseType",
"type": "varchar(64)",
"primaryKey": false,
"notNull": false,
"autoincrement": false
},
"framesAnalyzed": {
"name": "framesAnalyzed",
"type": "int",
"primaryKey": false,
"notNull": false,
"autoincrement": false
},
"shotCount": {
"name": "shotCount",
"type": "int",
"primaryKey": false,
"notNull": false,
"autoincrement": false,
"default": 0
},
"avgSwingSpeed": {
"name": "avgSwingSpeed",
"type": "float",
"primaryKey": false,
"notNull": false,
"autoincrement": false
},
"maxSwingSpeed": {
"name": "maxSwingSpeed",
"type": "float",
"primaryKey": false,
"notNull": false,
"autoincrement": false
},
"totalMovementDistance": {
"name": "totalMovementDistance",
"type": "float",
"primaryKey": false,
"notNull": false,
"autoincrement": false
},
"strokeConsistency": {
"name": "strokeConsistency",
"type": "float",
"primaryKey": false,
"notNull": false,
"autoincrement": false
},
"footworkScore": {
"name": "footworkScore",
"type": "float",
"primaryKey": false,
"notNull": false,
"autoincrement": false
},
"fluidityScore": {
"name": "fluidityScore",
"type": "float",
"primaryKey": false,
"notNull": false,
"autoincrement": false
},
"keyMoments": {
"name": "keyMoments",
"type": "json",
"primaryKey": false,
"notNull": false,
"autoincrement": false
},
"movementTrajectory": {
"name": "movementTrajectory",
"type": "json",
"primaryKey": false,
"notNull": false,
"autoincrement": false
},
"createdAt": {
"name": "createdAt",
"type": "timestamp",
"primaryKey": false,
"notNull": true,
"autoincrement": false,
"default": "(now())"
}
},
"indexes": {},
"foreignKeys": {},
"compositePrimaryKeys": {
"pose_analyses_id": {
"name": "pose_analyses_id",
"columns": [
"id"
]
}
},
"uniqueConstraints": {},
"checkConstraint": {}
},
"rating_history": {
"name": "rating_history",
"columns": {
"id": {
"name": "id",
"type": "int",
"primaryKey": false,
"notNull": true,
"autoincrement": true
},
"userId": {
"name": "userId",
"type": "int",
"primaryKey": false,
"notNull": true,
"autoincrement": false
},
"rating": {
"name": "rating",
"type": "float",
"primaryKey": false,
"notNull": true,
"autoincrement": false
},
"reason": {
"name": "reason",
"type": "varchar(256)",
"primaryKey": false,
"notNull": false,
"autoincrement": false
},
"dimensionScores": {
"name": "dimensionScores",
"type": "json",
"primaryKey": false,
"notNull": false,
"autoincrement": false
},
"analysisId": {
"name": "analysisId",
"type": "int",
"primaryKey": false,
"notNull": false,
"autoincrement": false
},
"createdAt": {
"name": "createdAt",
"type": "timestamp",
"primaryKey": false,
"notNull": true,
"autoincrement": false,
"default": "(now())"
}
},
"indexes": {},
"foreignKeys": {},
"compositePrimaryKeys": {
"rating_history_id": {
"name": "rating_history_id",
"columns": [
"id"
]
}
},
"uniqueConstraints": {},
"checkConstraint": {}
},
"training_plans": {
"name": "training_plans",
"columns": {
"id": {
"name": "id",
"type": "int",
"primaryKey": false,
"notNull": true,
"autoincrement": true
},
"userId": {
"name": "userId",
"type": "int",
"primaryKey": false,
"notNull": true,
"autoincrement": false
},
"title": {
"name": "title",
"type": "varchar(256)",
"primaryKey": false,
"notNull": true,
"autoincrement": false
},
"skillLevel": {
"name": "skillLevel",
"type": "enum('beginner','intermediate','advanced')",
"primaryKey": false,
"notNull": true,
"autoincrement": false
},
"durationDays": {
"name": "durationDays",
"type": "int",
"primaryKey": false,
"notNull": true,
"autoincrement": false,
"default": 7
},
"exercises": {
"name": "exercises",
"type": "json",
"primaryKey": false,
"notNull": true,
"autoincrement": false
},
"isActive": {
"name": "isActive",
"type": "int",
"primaryKey": false,
"notNull": true,
"autoincrement": false,
"default": 1
},
"adjustmentNotes": {
"name": "adjustmentNotes",
"type": "text",
"primaryKey": false,
"notNull": false,
"autoincrement": false
},
"version": {
"name": "version",
"type": "int",
"primaryKey": false,
"notNull": true,
"autoincrement": false,
"default": 1
},
"createdAt": {
"name": "createdAt",
"type": "timestamp",
"primaryKey": false,
"notNull": true,
"autoincrement": false,
"default": "(now())"
},
"updatedAt": {
"name": "updatedAt",
"type": "timestamp",
"primaryKey": false,
"notNull": true,
"autoincrement": false,
"onUpdate": true,
"default": "(now())"
}
},
"indexes": {},
"foreignKeys": {},
"compositePrimaryKeys": {
"training_plans_id": {
"name": "training_plans_id",
"columns": [
"id"
]
}
},
"uniqueConstraints": {},
"checkConstraint": {}
},
"training_records": {
"name": "training_records",
"columns": {
"id": {
"name": "id",
"type": "int",
"primaryKey": false,
"notNull": true,
"autoincrement": true
},
"userId": {
"name": "userId",
"type": "int",
"primaryKey": false,
"notNull": true,
"autoincrement": false
},
"planId": {
"name": "planId",
"type": "int",
"primaryKey": false,
"notNull": false,
"autoincrement": false
},
"exerciseName": {
"name": "exerciseName",
"type": "varchar(128)",
"primaryKey": false,
"notNull": true,
"autoincrement": false
},
"durationMinutes": {
"name": "durationMinutes",
"type": "int",
"primaryKey": false,
"notNull": false,
"autoincrement": false
},
"completed": {
"name": "completed",
"type": "int",
"primaryKey": false,
"notNull": true,
"autoincrement": false,
"default": 0
},
"notes": {
"name": "notes",
"type": "text",
"primaryKey": false,
"notNull": false,
"autoincrement": false
},
"poseScore": {
"name": "poseScore",
"type": "float",
"primaryKey": false,
"notNull": false,
"autoincrement": false
},
"trainingDate": {
"name": "trainingDate",
"type": "timestamp",
"primaryKey": false,
"notNull": true,
"autoincrement": false,
"default": "(now())"
},
"createdAt": {
"name": "createdAt",
"type": "timestamp",
"primaryKey": false,
"notNull": true,
"autoincrement": false,
"default": "(now())"
}
},
"indexes": {},
"foreignKeys": {},
"compositePrimaryKeys": {
"training_records_id": {
"name": "training_records_id",
"columns": [
"id"
]
}
},
"uniqueConstraints": {},
"checkConstraint": {}
},
"training_reminders": {
"name": "training_reminders",
"columns": {
"id": {
"name": "id",
"type": "int",
"primaryKey": false,
"notNull": true,
"autoincrement": true
},
"userId": {
"name": "userId",
"type": "int",
"primaryKey": false,
"notNull": true,
"autoincrement": false
},
"reminderType": {
"name": "reminderType",
"type": "varchar(32)",
"primaryKey": false,
"notNull": true,
"autoincrement": false
},
"title": {
"name": "title",
"type": "varchar(256)",
"primaryKey": false,
"notNull": true,
"autoincrement": false
},
"message": {
"name": "message",
"type": "text",
"primaryKey": false,
"notNull": false,
"autoincrement": false
},
"timeOfDay": {
"name": "timeOfDay",
"type": "varchar(5)",
"primaryKey": false,
"notNull": true,
"autoincrement": false
},
"daysOfWeek": {
"name": "daysOfWeek",
"type": "json",
"primaryKey": false,
"notNull": true,
"autoincrement": false
},
"isActive": {
"name": "isActive",
"type": "int",
"primaryKey": false,
"notNull": false,
"autoincrement": false,
"default": 1
},
"lastTriggered": {
"name": "lastTriggered",
"type": "timestamp",
"primaryKey": false,
"notNull": false,
"autoincrement": false
},
"createdAt": {
"name": "createdAt",
"type": "timestamp",
"primaryKey": false,
"notNull": true,
"autoincrement": false,
"default": "(now())"
},
"updatedAt": {
"name": "updatedAt",
"type": "timestamp",
"primaryKey": false,
"notNull": true,
"autoincrement": false,
"onUpdate": true,
"default": "(now())"
}
},
"indexes": {},
"foreignKeys": {},
"compositePrimaryKeys": {
"training_reminders_id": {
"name": "training_reminders_id",
"columns": [
"id"
]
}
},
"uniqueConstraints": {},
"checkConstraint": {}
},
"training_videos": {
"name": "training_videos",
"columns": {
"id": {
"name": "id",
"type": "int",
"primaryKey": false,
"notNull": true,
"autoincrement": true
},
"userId": {
"name": "userId",
"type": "int",
"primaryKey": false,
"notNull": true,
"autoincrement": false
},
"title": {
"name": "title",
"type": "varchar(256)",
"primaryKey": false,
"notNull": true,
"autoincrement": false
},
"fileKey": {
"name": "fileKey",
"type": "varchar(512)",
"primaryKey": false,
"notNull": true,
"autoincrement": false
},
"url": {
"name": "url",
"type": "text",
"primaryKey": false,
"notNull": true,
"autoincrement": false
},
"format": {
"name": "format",
"type": "varchar(16)",
"primaryKey": false,
"notNull": true,
"autoincrement": false
},
"fileSize": {
"name": "fileSize",
"type": "int",
"primaryKey": false,
"notNull": false,
"autoincrement": false
},
"duration": {
"name": "duration",
"type": "float",
"primaryKey": false,
"notNull": false,
"autoincrement": false
},
"exerciseType": {
"name": "exerciseType",
"type": "varchar(64)",
"primaryKey": false,
"notNull": false,
"autoincrement": false
},
"analysisStatus": {
"name": "analysisStatus",
"type": "enum('pending','analyzing','completed','failed')",
"primaryKey": false,
"notNull": false,
"autoincrement": false,
"default": "'pending'"
},
"createdAt": {
"name": "createdAt",
"type": "timestamp",
"primaryKey": false,
"notNull": true,
"autoincrement": false,
"default": "(now())"
},
"updatedAt": {
"name": "updatedAt",
"type": "timestamp",
"primaryKey": false,
"notNull": true,
"autoincrement": false,
"onUpdate": true,
"default": "(now())"
}
},
"indexes": {},
"foreignKeys": {},
"compositePrimaryKeys": {
"training_videos_id": {
"name": "training_videos_id",
"columns": [
"id"
]
}
},
"uniqueConstraints": {},
"checkConstraint": {}
},
"tutorial_progress": {
"name": "tutorial_progress",
"columns": {
"id": {
"name": "id",
"type": "int",
"primaryKey": false,
"notNull": true,
"autoincrement": true
},
"userId": {
"name": "userId",
"type": "int",
"primaryKey": false,
"notNull": true,
"autoincrement": false
},
"tutorialId": {
"name": "tutorialId",
"type": "int",
"primaryKey": false,
"notNull": true,
"autoincrement": false
},
"watched": {
"name": "watched",
"type": "int",
"primaryKey": false,
"notNull": false,
"autoincrement": false,
"default": 0
},
"comparisonVideoId": {
"name": "comparisonVideoId",
"type": "int",
"primaryKey": false,
"notNull": false,
"autoincrement": false
},
"selfScore": {
"name": "selfScore",
"type": "float",
"primaryKey": false,
"notNull": false,
"autoincrement": false
},
"notes": {
"name": "notes",
"type": "text",
"primaryKey": false,
"notNull": false,
"autoincrement": false
},
"createdAt": {
"name": "createdAt",
"type": "timestamp",
"primaryKey": false,
"notNull": true,
"autoincrement": false,
"default": "(now())"
},
"updatedAt": {
"name": "updatedAt",
"type": "timestamp",
"primaryKey": false,
"notNull": true,
"autoincrement": false,
"onUpdate": true,
"default": "(now())"
}
},
"indexes": {},
"foreignKeys": {},
"compositePrimaryKeys": {
"tutorial_progress_id": {
"name": "tutorial_progress_id",
"columns": [
"id"
]
}
},
"uniqueConstraints": {},
"checkConstraint": {}
},
"tutorial_videos": {
"name": "tutorial_videos",
"columns": {
"id": {
"name": "id",
"type": "int",
"primaryKey": false,
"notNull": true,
"autoincrement": true
},
"title": {
"name": "title",
"type": "varchar(256)",
"primaryKey": false,
"notNull": true,
"autoincrement": false
},
"category": {
"name": "category",
"type": "varchar(64)",
"primaryKey": false,
"notNull": true,
"autoincrement": false
},
"skillLevel": {
"name": "skillLevel",
"type": "enum('beginner','intermediate','advanced')",
"primaryKey": false,
"notNull": false,
"autoincrement": false,
"default": "'beginner'"
},
"description": {
"name": "description",
"type": "text",
"primaryKey": false,
"notNull": false,
"autoincrement": false
},
"keyPoints": {
"name": "keyPoints",
"type": "json",
"primaryKey": false,
"notNull": false,
"autoincrement": false
},
"commonMistakes": {
"name": "commonMistakes",
"type": "json",
"primaryKey": false,
"notNull": false,
"autoincrement": false
},
"videoUrl": {
"name": "videoUrl",
"type": "text",
"primaryKey": false,
"notNull": false,
"autoincrement": false
},
"thumbnailUrl": {
"name": "thumbnailUrl",
"type": "text",
"primaryKey": false,
"notNull": false,
"autoincrement": false
},
"duration": {
"name": "duration",
"type": "int",
"primaryKey": false,
"notNull": false,
"autoincrement": false
},
"sortOrder": {
"name": "sortOrder",
"type": "int",
"primaryKey": false,
"notNull": false,
"autoincrement": false,
"default": 0
},
"isPublished": {
"name": "isPublished",
"type": "int",
"primaryKey": false,
"notNull": false,
"autoincrement": false,
"default": 1
},
"createdAt": {
"name": "createdAt",
"type": "timestamp",
"primaryKey": false,
"notNull": true,
"autoincrement": false,
"default": "(now())"
},
"updatedAt": {
"name": "updatedAt",
"type": "timestamp",
"primaryKey": false,
"notNull": true,
"autoincrement": false,
"onUpdate": true,
"default": "(now())"
}
},
"indexes": {},
"foreignKeys": {},
"compositePrimaryKeys": {
"tutorial_videos_id": {
"name": "tutorial_videos_id",
"columns": [
"id"
]
}
},
"uniqueConstraints": {},
"checkConstraint": {}
},
"user_badges": {
"name": "user_badges",
"columns": {
"id": {
"name": "id",
"type": "int",
"primaryKey": false,
"notNull": true,
"autoincrement": true
},
"userId": {
"name": "userId",
"type": "int",
"primaryKey": false,
"notNull": true,
"autoincrement": false
},
"badgeKey": {
"name": "badgeKey",
"type": "varchar(64)",
"primaryKey": false,
"notNull": true,
"autoincrement": false
},
"earnedAt": {
"name": "earnedAt",
"type": "timestamp",
"primaryKey": false,
"notNull": true,
"autoincrement": false,
"default": "(now())"
}
},
"indexes": {},
"foreignKeys": {},
"compositePrimaryKeys": {
"user_badges_id": {
"name": "user_badges_id",
"columns": [
"id"
]
}
},
"uniqueConstraints": {},
"checkConstraint": {}
},
"username_accounts": {
"name": "username_accounts",
"columns": {
"id": {
"name": "id",
"type": "int",
"primaryKey": false,
"notNull": true,
"autoincrement": true
},
"username": {
"name": "username",
"type": "varchar(64)",
"primaryKey": false,
"notNull": true,
"autoincrement": false
},
"userId": {
"name": "userId",
"type": "int",
"primaryKey": false,
"notNull": true,
"autoincrement": false
},
"createdAt": {
"name": "createdAt",
"type": "timestamp",
"primaryKey": false,
"notNull": true,
"autoincrement": false,
"default": "(now())"
}
},
"indexes": {},
"foreignKeys": {},
"compositePrimaryKeys": {
"username_accounts_id": {
"name": "username_accounts_id",
"columns": [
"id"
]
}
},
"uniqueConstraints": {
"username_accounts_username_unique": {
"name": "username_accounts_username_unique",
"columns": [
"username"
]
}
},
"checkConstraint": {}
},
"users": {
"name": "users",
"columns": {
"id": {
"name": "id",
"type": "int",
"primaryKey": false,
"notNull": true,
"autoincrement": true
},
"openId": {
"name": "openId",
"type": "varchar(64)",
"primaryKey": false,
"notNull": true,
"autoincrement": false
},
"name": {
"name": "name",
"type": "text",
"primaryKey": false,
"notNull": false,
"autoincrement": false
},
"email": {
"name": "email",
"type": "varchar(320)",
"primaryKey": false,
"notNull": false,
"autoincrement": false
},
"loginMethod": {
"name": "loginMethod",
"type": "varchar(64)",
"primaryKey": false,
"notNull": false,
"autoincrement": false
},
"role": {
"name": "role",
"type": "enum('user','admin')",
"primaryKey": false,
"notNull": true,
"autoincrement": false,
"default": "'user'"
},
"skillLevel": {
"name": "skillLevel",
"type": "enum('beginner','intermediate','advanced')",
"primaryKey": false,
"notNull": false,
"autoincrement": false,
"default": "'beginner'"
},
"trainingGoals": {
"name": "trainingGoals",
"type": "text",
"primaryKey": false,
"notNull": false,
"autoincrement": false
},
"ntrpRating": {
"name": "ntrpRating",
"type": "float",
"primaryKey": false,
"notNull": false,
"autoincrement": false,
"default": 1.5
},
"totalSessions": {
"name": "totalSessions",
"type": "int",
"primaryKey": false,
"notNull": false,
"autoincrement": false,
"default": 0
},
"totalMinutes": {
"name": "totalMinutes",
"type": "int",
"primaryKey": false,
"notNull": false,
"autoincrement": false,
"default": 0
},
"currentStreak": {
"name": "currentStreak",
"type": "int",
"primaryKey": false,
"notNull": false,
"autoincrement": false,
"default": 0
},
"longestStreak": {
"name": "longestStreak",
"type": "int",
"primaryKey": false,
"notNull": false,
"autoincrement": false,
"default": 0
},
"totalShots": {
"name": "totalShots",
"type": "int",
"primaryKey": false,
"notNull": false,
"autoincrement": false,
"default": 0
},
"createdAt": {
"name": "createdAt",
"type": "timestamp",
"primaryKey": false,
"notNull": true,
"autoincrement": false,
"default": "(now())"
},
"updatedAt": {
"name": "updatedAt",
"type": "timestamp",
"primaryKey": false,
"notNull": true,
"autoincrement": false,
"onUpdate": true,
"default": "(now())"
},
"lastSignedIn": {
"name": "lastSignedIn",
"type": "timestamp",
"primaryKey": false,
"notNull": true,
"autoincrement": false,
"default": "(now())"
}
},
"indexes": {},
"foreignKeys": {},
"compositePrimaryKeys": {
"users_id": {
"name": "users_id",
"columns": [
"id"
]
}
},
"uniqueConstraints": {
"users_openId_unique": {
"name": "users_openId_unique",
"columns": [
"openId"
]
}
},
"checkConstraint": {}
}
},
"views": {},
"_meta": {
"schemas": {},
"tables": {},
"columns": {}
},
"internal": {
"tables": {},
"indexes": {}
}
}