build managment added
This commit is contained in:
@@ -513,16 +513,6 @@ class BuildLivingSpace(CrudCollection):
|
||||
marketing_process: Mapped[bool] = mapped_column(Boolean, server_default="False")
|
||||
marketing_layer: Mapped[int] = mapped_column(SmallInteger, server_default="0")
|
||||
|
||||
discounted_percentage: Mapped[float] = mapped_column(
|
||||
Numeric(6, 2), server_default="0.00"
|
||||
) # %22
|
||||
discounted_price: Mapped[float] = mapped_column(
|
||||
Numeric(20, 2), server_default="0.00"
|
||||
) # Normal: 78.00 TL
|
||||
calculated_price: Mapped[float] = mapped_column(
|
||||
Numeric(20, 2), server_default="0.00"
|
||||
) # sana düz 75.00 TL yapar
|
||||
|
||||
build_parts_id: Mapped[int] = mapped_column(
|
||||
ForeignKey("build_parts.id"),
|
||||
nullable=False,
|
||||
@@ -608,6 +598,58 @@ class BuildLivingSpace(CrudCollection):
|
||||
return living_spaces.data, living_spaces.count
|
||||
|
||||
|
||||
class BuildManagement(CrudCollection):
|
||||
|
||||
__tablename__ = "build_management"
|
||||
__exclude__fields__ = []
|
||||
|
||||
discounted_percentage: Mapped[float] = mapped_column(
|
||||
Numeric(6, 2), server_default="0.00"
|
||||
) # %22
|
||||
discounted_price: Mapped[float] = mapped_column(
|
||||
Numeric(20, 2), server_default="0.00"
|
||||
) # Normal: 78.00 TL
|
||||
calculated_price: Mapped[float] = mapped_column(
|
||||
Numeric(20, 2), server_default="0.00"
|
||||
) # sana düz 75.00 TL yapar
|
||||
|
||||
occupant_type: Mapped[int] = mapped_column(
|
||||
ForeignKey("occupant_types.id"),
|
||||
nullable=False,
|
||||
comment="Occupant Type",
|
||||
)
|
||||
occupant_type_uu_id: Mapped[str] = mapped_column(
|
||||
String, nullable=False, comment="Occupant Type UUID"
|
||||
)
|
||||
build_id: Mapped[int] = mapped_column(
|
||||
ForeignKey("build.id"), nullable=False, comment="Building ID"
|
||||
)
|
||||
build_uu_id: Mapped[str] = mapped_column(
|
||||
String, nullable=False, comment="Building UUID"
|
||||
)
|
||||
build_parts_id: Mapped[int] = mapped_column(
|
||||
ForeignKey("build_parts.id"),
|
||||
nullable=False,
|
||||
index=True,
|
||||
comment="Build Part ID",
|
||||
)
|
||||
build_parts_uu_id: Mapped[str] = mapped_column(
|
||||
String, nullable=False, comment="Build Part UUID"
|
||||
)
|
||||
|
||||
__table_args__ = (
|
||||
Index(
|
||||
"build_management_ndx_00",
|
||||
build_parts_id,
|
||||
occupant_type,
|
||||
"expiry_starts",
|
||||
unique=True,
|
||||
),
|
||||
{"comment": "Management of the building parts that are related to people"},
|
||||
)
|
||||
|
||||
|
||||
|
||||
class BuildArea(CrudCollection):
|
||||
"""
|
||||
Builds class based on declarative_base and BaseMixin via session
|
||||
|
||||
@@ -589,6 +589,9 @@ class BuildDecisionBookItems(CrudCollection):
|
||||
build_decision_book_uu_id: Mapped[str] = mapped_column(
|
||||
String, nullable=True, comment="Decision Book UUID"
|
||||
)
|
||||
item_short_comment: Mapped[str] = mapped_column(
|
||||
String(24), nullable=True, comment="This field is reserved for use in grouping data or in the pivot heading."
|
||||
)
|
||||
|
||||
decision_books: Mapped["BuildDecisionBook"] = relationship(
|
||||
"BuildDecisionBook",
|
||||
@@ -1228,6 +1231,9 @@ class BuildDecisionBookProjectItems(CrudCollection):
|
||||
item_estimated_cost: Mapped[float] = mapped_column(
|
||||
Numeric(16, 2), server_default="0", comment="Estimated Cost"
|
||||
)
|
||||
item_short_comment: Mapped[str] = mapped_column(
|
||||
String(24), nullable=True, comment="This field is reserved for use in grouping data or in the pivot heading."
|
||||
)
|
||||
|
||||
build_decision_book_project_id: Mapped[int] = mapped_column(
|
||||
ForeignKey("build_decision_book_projects.id"), nullable=False
|
||||
|
||||
Reference in New Issue
Block a user