18 lines
689 B
Python
18 lines
689 B
Python
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)
|
|
|
|
|