修改训练计划模型中的id字段类型为UUID,并设置默认值为UUIDV4,以增强唯一性和安全性。
This commit is contained in:
@@ -9,7 +9,10 @@ export type PlanGoal = 'postpartum_recovery' | 'fat_loss' | 'posture_correction'
|
|||||||
})
|
})
|
||||||
export class TrainingPlan extends Model {
|
export class TrainingPlan extends Model {
|
||||||
@PrimaryKey
|
@PrimaryKey
|
||||||
@Column({ type: DataType.STRING })
|
@Column({
|
||||||
|
type: DataType.UUID,
|
||||||
|
defaultValue: DataType.UUIDV4,
|
||||||
|
})
|
||||||
declare id: string;
|
declare id: string;
|
||||||
|
|
||||||
@Column({ type: DataType.STRING, allowNull: false })
|
@Column({ type: DataType.STRING, allowNull: false })
|
||||||
|
|||||||
Reference in New Issue
Block a user