mirror of
https://github.com/Hestia-Homes/Model.git
synced 2026-06-08 11:17:27 +00:00
added is_override to storage of recommendation
This commit is contained in:
parent
485c01cbd6
commit
65f83930d5
3 changed files with 27 additions and 1 deletions
|
|
@ -85,7 +85,8 @@ def upload_recommendations(session: Session, recommendations_to_upload, property
|
|||
"co2_equivalent_savings": rec["co2_equivalent_savings"],
|
||||
"total_work_hours": rec["labour_hours"],
|
||||
"energy_cost_savings": rec["energy_cost_savings"],
|
||||
"labour_days": rec["labour_days"]
|
||||
"labour_days": rec["labour_days"],
|
||||
"is_override": rec["is_override"],
|
||||
}
|
||||
for rec in recommendations_to_upload
|
||||
]
|
||||
|
|
|
|||
24
backend/app/db/models/non_intrusive_surveys.py
Normal file
24
backend/app/db/models/non_intrusive_surveys.py
Normal file
|
|
@ -0,0 +1,24 @@
|
|||
from sqlalchemy import Column, BigInteger, String, Float, Boolean, TIMESTAMP, ForeignKey, Enum, Integer
|
||||
from sqlalchemy.orm import declarative_base
|
||||
from sqlalchemy.sql import func
|
||||
from backend.app.db.models.portfolio import Portfolio, PropertyModel
|
||||
from backend.app.db.models.materials import Material
|
||||
from datatypes.enums import QuantityUnits
|
||||
|
||||
Base = declarative_base()
|
||||
|
||||
|
||||
class NonIntrusiveSurvey(Base):
|
||||
__tablename__ = 'non_intrusive_survey'
|
||||
|
||||
id = Column(BigInteger, primary_key=True, autoincrement=True)
|
||||
uprn = Column(Integer, nullable=False)
|
||||
survey_date = Column(TIMESTAMP, nullable=False)
|
||||
surveyor = Column(String, nullable=False)
|
||||
|
||||
|
||||
class NonIntrusiveSurveyNotes(Base):
|
||||
id = Column(BigInteger, primary_key=True, autoincrement=True)
|
||||
survey_id = Column(BigInteger, ForeignKey('non_intrusive_survey.id'), nullable=False)
|
||||
title = Column(String, nullable=False)
|
||||
note = Column(String, nullable=False)
|
||||
|
|
@ -30,6 +30,7 @@ class Recommendation(Base):
|
|||
rental_yield_increase = Column(Float)
|
||||
total_work_hours = Column(Float)
|
||||
labour_days = Column(Float)
|
||||
is_override = Column(Boolean, nullable=False, default=False)
|
||||
|
||||
|
||||
class RecommendationMaterials(Base):
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue