in-c4/models.py

18 lines
533 B
Python

from sqlalchemy import Boolean, Column, ForeignKey, Integer, String, Text
from database import Base
class Item(Base):
__tablename__ = "items"
id = Column(String, primary_key=True, index=True)
is_in = Column(String, ForeignKey(id, onupdate="CASCADE", ondelete="SET NULL"))
coords_bl = Column(String)
coords_tr = Column(String)
type = Column(String)
name = Column(String)
content = Column(Text)
note = Column(Text)
hidden = Column(Boolean, nullable=False)
last_updated = Column(Integer)