feat(challenges): 支持自定义挑战类型并优化必填字段验证
- 新增 CUSTOM 挑战类型枚举值 - requirementLabel 字段改为可选,允许为空并添加默认值处理 - minimumCheckInDays 最大值从 365 提升至 1000,支持更长周期挑战 - 推送通知模板支持自定义挑战的动态文案生成 - 新增 getCustomEncouragementTemplate 和 getCustomInvitationTemplate 函数
This commit is contained in:
@@ -164,7 +164,7 @@ export class ChallengesService {
|
||||
image: challenge.image,
|
||||
periodLabel: challenge.periodLabel,
|
||||
durationLabel: challenge.durationLabel,
|
||||
requirementLabel: challenge.requirementLabel,
|
||||
requirementLabel: challenge.requirementLabel || '',
|
||||
status,
|
||||
unit: challenge.progressUnit,
|
||||
startAt: new Date(challenge.startAt).getTime(),
|
||||
@@ -278,7 +278,7 @@ export class ChallengesService {
|
||||
image: challenge.image,
|
||||
periodLabel: challenge.periodLabel,
|
||||
durationLabel: challenge.durationLabel,
|
||||
requirementLabel: challenge.requirementLabel,
|
||||
requirementLabel: challenge.requirementLabel || '',
|
||||
summary: challenge.summary,
|
||||
rankingDescription: challenge.rankingDescription,
|
||||
highlightTitle: challenge.highlightTitle,
|
||||
@@ -1205,7 +1205,7 @@ export class ChallengesService {
|
||||
endAt: new Date(challenge.endAt).getTime(),
|
||||
periodLabel: challenge.periodLabel,
|
||||
durationLabel: challenge.durationLabel,
|
||||
requirementLabel: challenge.requirementLabel,
|
||||
requirementLabel: challenge.requirementLabel || '',
|
||||
summary: challenge.summary,
|
||||
targetValue: challenge.targetValue,
|
||||
progressUnit: challenge.progressUnit,
|
||||
|
||||
Reference in New Issue
Block a user