增强文章控制器的安全性,添加JWT身份验证守卫;优化训练计划服务,简化日志记录逻辑,确保使用计划创建训练会话时的准确性;更新训练会话模型,允许训练计划ID为可空字段。

This commit is contained in:
2025-08-16 13:42:36 +08:00
parent fafb618c32
commit 477f5b4b79
4 changed files with 47 additions and 39 deletions

View File

@@ -20,7 +20,7 @@ export class WorkoutSession extends Model {
declare userId: string;
@ForeignKey(() => TrainingPlan)
@Column({ type: DataType.UUID, allowNull: false, comment: '关联的训练计划模板' })
@Column({ type: DataType.UUID, allowNull: true, comment: '关联的训练计划模板' })
declare trainingPlanId: string;
@BelongsTo(() => TrainingPlan)