增强文章控制器的安全性,添加JWT身份验证守卫;优化训练计划服务,简化日志记录逻辑,确保使用计划创建训练会话时的准确性;更新训练会话模型,允许训练计划ID为可空字段。
This commit is contained in:
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user