perf: 优化饮食记录代码

This commit is contained in:
richarjiang
2025-08-29 10:13:26 +08:00
parent 8a69f4f1af
commit c0bdb3bf0a
2 changed files with 17 additions and 9 deletions

View File

@@ -8,6 +8,7 @@ export enum ActivityEntityType {
CHECKIN = 'CHECKIN',
TRAINING_PLAN = 'TRAINING_PLAN',
WORKOUT = 'WORKOUT',
DIET_RECORD = 'DIET_RECORD',
}
@@ -38,7 +39,7 @@ export class ActivityLog extends Model {
declare user?: User;
@Column({
type: DataType.ENUM('USER', 'USER_PROFILE', 'USER_WEIGHT_HISTORY', 'CHECKIN', 'TRAINING_PLAN', 'WORKOUT'),
type: DataType.ENUM('USER', 'USER_PROFILE', 'USER_WEIGHT_HISTORY', 'CHECKIN', 'TRAINING_PLAN', 'WORKOUT', 'DIET_RECORD'),
allowNull: false,
comment: '实体类型',
})