Initial import: shopdb-flask multi-site asset platform
Flask + Vue rewrite of the classic-ASP shopdb, built as a plugin framework so sister GE Aerospace sites can adopt it. Product version 0.7.0-pre-0.8.0, plugin contract 0.11.0, 966 backend tests. Key entry points: - docs/INSTALL-WINDOWS-IIS.md - tested Windows + IIS install runbook (own-site and subpath deployment methods) - docs/PILOT-DEPLOY.md - production pilot: stand up + import + verify - docs/IMPORT-API.md - schema-agnostic legacy data import contract - scripts/site_imports/wjf/ - West Jefferson reference import loader - docs/adr/ - twelve accepted architecture decision records
This commit is contained in:
28
shopdb/core/models/dashboarddefault.py
Normal file
28
shopdb/core/models/dashboarddefault.py
Normal file
@@ -0,0 +1,28 @@
|
||||
"""Dashboard default model: visitor-IP -> business-unit mapping.
|
||||
|
||||
A shopfloor / lobby kiosk display resolves which business unit to show by the
|
||||
display PC's IP address. Powers the visitor-location lookup the shopfloor and
|
||||
TV dashboards call when no explicit business unit is given.
|
||||
"""
|
||||
|
||||
from shopdb.extensions import db
|
||||
from .base import BaseModel
|
||||
|
||||
|
||||
class DashboardDefault(BaseModel):
|
||||
"""Maps a display PC IP address to the business unit it should show."""
|
||||
__tablename__ = 'dashboarddefaults'
|
||||
|
||||
dashboarddefaultid = db.Column(db.Integer, primary_key=True)
|
||||
ipaddress = db.Column(db.String(50), unique=True, nullable=False)
|
||||
businessunitid = db.Column(
|
||||
db.Integer,
|
||||
db.ForeignKey('businessunits.businessunitid'),
|
||||
nullable=False
|
||||
)
|
||||
description = db.Column(db.String(255))
|
||||
|
||||
businessunit = db.relationship('BusinessUnit')
|
||||
|
||||
def __repr__(self):
|
||||
return f"<DashboardDefault {self.ipaddress} -> {self.businessunitid}>"
|
||||
Reference in New Issue
Block a user