mirror of
https://gitlab.aachen.ccc.de/inventory/in.git
synced 2024-12-01 19:14:01 +01:00
17 lines
488 B
Python
17 lines
488 B
Python
|
from sqlalchemy import Column, ForeignKey, String, Text, Boolean
|
||
|
|
||
|
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)
|