feat: Expedição profile, stamp sizes and the Montar folha screen (front 7a.1)
The new Expedição profile and the seller may assemble sheets (capability assemble). Gestão edits the size table (letter and width). The Montar tab reads Estampas/<code>-<size>.png or <code>.png from the orders folder, checks the resolution with the Site's 96/200 DPI ruler, merges repeated lines and estimates the metres. Montar itself is slice 2. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -444,3 +444,19 @@ class ArtworkSubmission(StrictModel):
|
||||
version: int = Field(ge=0, strict=True)
|
||||
files: list[FileReference] = Field(min_length=1, max_length=60)
|
||||
note: str = Field(min_length=1, max_length=1000)
|
||||
|
||||
class StampSize(StrictModel):
|
||||
"""One row of the montador's size table (Fase 2, front 7)."""
|
||||
letter: str = Field(pattern=r'^[A-Z]{1,2}$')
|
||||
width_cm: Decimal = Field(gt=0, le=56, decimal_places=2)
|
||||
|
||||
class StampSizeTable(StrictModel):
|
||||
"""The whole table, replaced in one go by Gestão."""
|
||||
sizes: list[StampSize] = Field(min_length=1, max_length=26)
|
||||
|
||||
@model_validator(mode='after')
|
||||
def letters_unique(self):
|
||||
letters = [row.letter for row in self.sizes]
|
||||
if len(letters) != len(set(letters)):
|
||||
raise ValueError('Cada tamanho tem uma letra própria.')
|
||||
return self
|
||||
|
||||
Reference in New Issue
Block a user