M8-T12: scope energy contracts

This commit is contained in:
2026-08-23 21:22:06 +02:00
parent a9458394f2
commit b812d5ac46
13 changed files with 533 additions and 47 deletions
+3
View File
@@ -51,6 +51,7 @@ class ContractResponse(BaseModel):
id: int
name: str
kind: str
scope: str
active: bool
currency: str
created_at: datetime
@@ -69,6 +70,7 @@ class ContractDetailResponse(BaseModel):
id: int
name: str
kind: str
scope: str
active: bool
currency: str
created_at: datetime
@@ -101,6 +103,7 @@ class ContractCreate(BaseModel):
name: str = Field(..., min_length=1, max_length=255)
kind: str = Field(..., min_length=1, max_length=32)
scope: str | None = Field(default=None, min_length=1, max_length=32)
currency: str = Field(default="EUR", min_length=1, max_length=8)
values: dict[str, Any]
effective_from: datetime | None = Field(