more, view and edit broken

This commit is contained in:
2025-06-11 05:23:52 -05:00
parent 38cf4d962d
commit e7a0f5b1be
38 changed files with 1008 additions and 141 deletions

15
plugins/utility/models.py Normal file
View File

@ -0,0 +1,15 @@
from datetime import datetime
from plugins.plant.models import db
class ImportBatch(db.Model):
__tablename__ = 'import_batches'
id = db.Column(db.Integer, primary_key=True)
export_id = db.Column(db.String(64), nullable=False)
user_id = db.Column(db.Integer, nullable=False, index=True)
imported_at = db.Column(db.DateTime, nullable=False, default=datetime.utcnow)
__table_args__ = (
# ensure a given user cant import the same export twice
db.UniqueConstraint('export_id', 'user_id', name='uix_export_user'),
)