feat: 支持新的关卡数据结构
This commit is contained in:
@@ -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;
|
||||
|
||||
/** 体力值最后更新时间(用于计算恢复) */
|
||||
|
||||
Reference in New Issue
Block a user