feat(challenges): 使用 minimumCheckInDays 统一进度目标计算

将挑战完成目标从 targetValue/progressUnit 改为 minimumCheckInDays 字段驱动,确保列表、详情、加入、打卡各场景使用一致的完成天数标准,并移除前端展示字段 badge/subtitle。
This commit is contained in:
richarjiang
2025-09-29 10:25:20 +08:00
parent 22fcf694a6
commit d87fc84575
5 changed files with 71 additions and 24 deletions

View File

@@ -90,6 +90,14 @@ export class Challenge extends Model {
})
declare progressUnit: string;
@Column({
type: DataType.INTEGER,
allowNull: false,
defaultValue: 0,
comment: '最低打卡天数,用于判断挑战成功',
})
declare minimumCheckInDays: number;
@Column({
type: DataType.STRING(255),
allowNull: true,