Files
tolelom cc8368dfba
Some checks failed
Server CI/CD / lint-and-build (push) Failing after 1m13s
Server CI/CD / deploy (push) Has been skipped
feat: 인프라 개선 — 헬스체크, 로깅, 보안, CI 검증
- /health + /ready 엔드포인트 추가 (DB/Redis 상태 확인)
- RequestID 미들웨어 + 구조화 JSON 로깅
- 체인 트랜잭션 per-user rate limit (20 req/min)
- DB 커넥션 풀 설정 (MaxOpen 25, MaxIdle 10, MaxLifetime 5m)
- Graceful Shutdown 시 Redis/MySQL 연결 정리
- Dockerfile HEALTHCHECK 추가
- CI에 go vet + 빌드 검증 단계 추가 (deploy 전 실행)
- 보스 레이드 클라이언트 입장 API (JWT 인증)
- Player 프로필 모듈 추가

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-15 03:41:34 +09:00

38 lines
1.2 KiB
Go

package player
import (
"time"
"gorm.io/gorm"
)
type PlayerProfile struct {
ID uint `json:"id" gorm:"primaryKey"`
CreatedAt time.Time `json:"createdAt"`
UpdatedAt time.Time `json:"updatedAt"`
DeletedAt gorm.DeletedAt `json:"-" gorm:"index"`
UserID uint `json:"userId" gorm:"uniqueIndex;not null"`
Nickname string `json:"nickname" gorm:"type:varchar(50);not null;default:''"`
// 레벨 & 경험치
Level int `json:"level" gorm:"default:1"`
Experience int `json:"experience" gorm:"default:0"`
// 전투 스탯
MaxHP float64 `json:"maxHp" gorm:"default:100"`
MaxMP float64 `json:"maxMp" gorm:"default:50"`
AttackPower float64 `json:"attackPower" gorm:"default:10"`
AttackRange float64 `json:"attackRange" gorm:"default:3"`
SprintMultiplier float64 `json:"sprintMultiplier" gorm:"default:1.8"`
// 마지막 위치
LastPosX float64 `json:"lastPosX" gorm:"default:0"`
LastPosY float64 `json:"lastPosY" gorm:"default:0"`
LastPosZ float64 `json:"lastPosZ" gorm:"default:0"`
LastRotY float64 `json:"lastRotY" gorm:"default:0"`
// 플레이 시간 (초 단위)
TotalPlayTime int64 `json:"totalPlayTime" gorm:"default:0"`
}