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

716 行
18 KiB
JSON

{
"version": "5",
"dialect": "mysql",
"id": "a9a3ce4f-a15b-4af1-b99f-d12a1644a83b",
"prevId": "1bbd761e-f39b-4623-87fc-18e38f82bc98",
"tables": {
"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_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": {}
},
"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
},
"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": {}
}
}