ai 기반 문지기 npc의 조언 및 전투 스킬 생성 기능 구현
This commit is contained in:
@@ -4,8 +4,8 @@ from pathlib import Path
|
||||
|
||||
Path("db").mkdir(parents=True, exist_ok=True)
|
||||
|
||||
# echo sql 구문 출력시키는
|
||||
engine = create_engine('sqlite:///db/ai.db', echo=True)
|
||||
engine = create_engine('sqlite:///db/roguelike.db', echo=True)
|
||||
|
||||
|
||||
# 세션 팩토리 생성
|
||||
SessionLocal = sessionmaker(bind=engine, autoflush=False, autocommit=False)
|
||||
|
||||
@@ -0,0 +1,17 @@
|
||||
from backend.repository.db_init import Base
|
||||
from sqlalchemy.orm import Mapped, mapped_column
|
||||
from sqlalchemy import String
|
||||
from datetime import datetime
|
||||
|
||||
# 선조 사망 기록 모델 (로그라이크)
|
||||
class AncestorDeath(Base):
|
||||
__tablename__ = 'ancestor_deaths'
|
||||
|
||||
id: Mapped[int] = mapped_column(primary_key=True, autoincrement=True)
|
||||
name: Mapped[str] = mapped_column(String(50), nullable=False)
|
||||
generation: Mapped[int] = mapped_column(nullable=False)
|
||||
cause_of_death: Mapped[str] = mapped_column(String(100), nullable=False)
|
||||
floor: Mapped[int] = mapped_column(nullable=False)
|
||||
created_at: Mapped[datetime] = mapped_column(default=datetime.now, nullable=False)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user