05/06 Fix Issue's sla, and others

This commit is contained in:
2026-05-06 11:30:42 -04:00
parent a9678cf994
commit 830bb51f24
4 changed files with 72 additions and 7 deletions
+3 -2
View File
@@ -1,5 +1,5 @@
from app import db
from datetime import datetime
from app.utils.time_utils import now_eastern
class Facility(db.Model):
__tablename__ = 'facilities'
@@ -10,6 +10,7 @@ class Facility(db.Model):
contact_person = db.Column(db.String(100))
contact_phone = db.Column(db.String(20))
active = db.Column(db.Boolean, default=True)
created_at = db.Column(db.DateTime, default=now_eastern, nullable=True)
# Phase 1: link facility to a project (nullable for backward compatibility)
project_id = db.Column(db.Integer, db.ForeignKey('projects.id', ondelete='SET NULL'),
@@ -35,4 +36,4 @@ class Area(db.Model):
issues = db.relationship('Issue', backref='area', lazy='dynamic')
def __repr__(self):
return f'<Area {self.name}>'
return f'<Area {self.name}>'