新增普拉提训练系统的数据库结构和数据导入功能
- 创建普拉提分类和动作数据的SQL导入脚本,支持垫上普拉提和器械普拉提的分类管理 - 实现数据库结构迁移脚本,添加新字段以支持普拉提类型和器械名称 - 更新数据库升级总结文档,详细说明数据库结构变更和数据导入步骤 - 创建训练会话相关表,支持每日训练实例功能 - 引入训练会话管理模块,整合训练计划与实际训练会话的关系
This commit is contained in:
@@ -20,6 +20,20 @@ export class ExerciseCategory extends Model {
|
||||
})
|
||||
declare name: string;
|
||||
|
||||
@Column({
|
||||
type: DataType.ENUM('mat_pilates', 'equipment_pilates'),
|
||||
allowNull: false,
|
||||
comment: '普拉提类型:垫上普拉提或器械普拉提',
|
||||
})
|
||||
declare type: 'mat_pilates' | 'equipment_pilates';
|
||||
|
||||
@Column({
|
||||
type: DataType.STRING,
|
||||
allowNull: true,
|
||||
comment: '器械名称(仅器械普拉提需要)',
|
||||
})
|
||||
declare equipmentName: string;
|
||||
|
||||
@Column({
|
||||
type: DataType.INTEGER,
|
||||
allowNull: false,
|
||||
|
||||
@@ -13,15 +13,36 @@ export class Exercise extends Model {
|
||||
})
|
||||
declare key: string;
|
||||
|
||||
@Column({ type: DataType.STRING, allowNull: false, comment: '名称(含中英文)' })
|
||||
@Column({ type: DataType.STRING, allowNull: false, comment: '动作名称' })
|
||||
declare name: string;
|
||||
|
||||
@Column({ type: DataType.STRING, allowNull: false, comment: '中文分类名(冗余,便于展示)' })
|
||||
declare categoryName: string;
|
||||
|
||||
@Column({ type: DataType.TEXT, allowNull: false, comment: '描述' })
|
||||
@Column({ type: DataType.TEXT, allowNull: true, comment: '动作描述' })
|
||||
declare description: string;
|
||||
|
||||
@Column({ type: DataType.TEXT, allowNull: false, comment: '主要锻炼肌肉群' })
|
||||
declare targetMuscleGroups: string;
|
||||
|
||||
@Column({ type: DataType.STRING, allowNull: true, comment: '器械名称(器械普拉提专用)' })
|
||||
declare equipmentName: string;
|
||||
|
||||
@Column({ type: DataType.INTEGER, allowNull: true, comment: '入门级别建议练习次数' })
|
||||
declare beginnerReps: number;
|
||||
|
||||
@Column({ type: DataType.INTEGER, allowNull: true, comment: '入门级别建议组数' })
|
||||
declare beginnerSets: number;
|
||||
|
||||
@Column({ type: DataType.INTEGER, allowNull: true, comment: '呼吸循环次数(替代普通次数)' })
|
||||
declare breathingCycles: number;
|
||||
|
||||
@Column({ type: DataType.INTEGER, allowNull: true, comment: '保持时间(秒)' })
|
||||
declare holdDuration: number;
|
||||
|
||||
@Column({ type: DataType.STRING, allowNull: true, comment: '特殊说明(如每侧、前后各等)' })
|
||||
declare specialInstructions: string;
|
||||
|
||||
@ForeignKey(() => ExerciseCategory)
|
||||
@Column({ type: DataType.STRING, allowNull: false, comment: '分类键' })
|
||||
declare categoryKey: string;
|
||||
|
||||
Reference in New Issue
Block a user