Spaces:
Runtime error
Runtime error
| """Draft types for the Rules Engine (pure data, no DB ids yet).""" | |
| from dataclasses import dataclass | |
| from typing import Literal | |
| Clock = Literal["WALL", "WORKING"] | |
| ActivityKind = Literal["PROCUREMENT", "INSTALLATION", "COMMISSIONING", "INSPECTION", "CUSTOM"] | |
| DepType = Literal["FS", "SS", "FF", "SF"] | |
| ProcurementType = Literal["SUPPLY", "APPLY", "SUPPLY_AND_APPLY"] | |
| Responsibility = Literal["CONTRACTOR", "CUSTOMER", "ORG"] | |
| class BOQItemInput: | |
| id: int | |
| project_id: int | |
| category_id: int | |
| room_id: int | None | |
| name: str | |
| quantity: float | |
| uom: str | |
| cost: float | None | |
| price: float | None | |
| procurement_type: ProcurementType | |
| procurement_responsibility: Responsibility | |
| is_material: bool | |
| metadata: dict | |
| class ActivityDraft: | |
| boq_item_id: int | |
| template_id: int | |
| kind: ActivityKind | |
| name: str | |
| effort_days: float | None | |
| lead_time_days: float | None | |
| clock: Clock | |
| noisy: bool | |
| responsibility: Responsibility | |
| # tag used to wire up edges before activity ids exist | |
| _tag: str | |
| class DependencyDraft: | |
| predecessor_tag: str | |
| successor_tag: str | |
| dep_type: DepType | |
| lag_days: float | |
| origin: Literal["TEMPLATE"] | |
| class ExpandResult: | |
| activities: list[ActivityDraft] | |
| dependencies: list[DependencyDraft] | |