feat: 支持新的关卡数据结构

This commit is contained in:
richarjiang
2026-04-19 13:27:10 +08:00
parent 1d6cd0cdc0
commit e6079e4345
33 changed files with 882 additions and 2843 deletions

View File

@@ -6,6 +6,7 @@ import {
UpdateDateColumn,
Index,
} from 'typeorm';
import { MAX_STAMINA } from '../../../common/constants/game.constants';
@Entity('wx_users')
export class User {
@@ -25,8 +26,8 @@ export class User {
@Column({ type: 'text', name: 'avatar_url', nullable: true })
avatarUrl!: string | null;
/** 体力值(默认 5上限 5 */
@Column({ type: 'int', default: 5 })
/** 体力值(默认 MAX_STAMINA上限 MAX_STAMINA */
@Column({ type: 'int', default: MAX_STAMINA })
stamina!: number;
/** 体力值最后更新时间(用于计算恢复) */