"""Location model.""" from shopdb.extensions import db from .base import BaseModel class Location(BaseModel): """Physical location model.""" __tablename__ = 'locations' locationid = db.Column(db.Integer, primary_key=True) locationname = db.Column(db.String(100), unique=True, nullable=False) building = db.Column(db.String(100)) floor = db.Column(db.String(50)) room = db.Column(db.String(50)) description = db.Column(db.Text) # Map configuration mapimage = db.Column(db.String(500), comment='Path to floor map image') mapwidth = db.Column(db.Integer) mapheight = db.Column(db.Integer) def __repr__(self): return f""