in/models.py

18 lines
489 B
Python
Raw Normal View History

2024-01-14 18:56:43 +01:00
from sqlalchemy import Boolean, Column, ForeignKey, String, Text
2022-08-04 05:41:51 +02:00
from database import Base
2024-01-14 18:56:43 +01:00
2022-08-04 05:41:51 +02:00
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)