feat: add one-to-one box mode with duplicate bind check
Add box_mode field to BoxSaveRequest and DuplicateZongpaiBindError exception. In one-to-one mode, prevent the same zongpai from being packed into multiple boxes, returning 409 with existing box info. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -32,6 +32,7 @@ class BoxSaveRequest(BaseModel):
|
||||
zongpai_no: str
|
||||
box_no: int
|
||||
quantity: int
|
||||
box_mode: str | None = None # one-to-one | one-to-many | many-to-one
|
||||
|
||||
@field_validator("zongpai_no")
|
||||
@classmethod
|
||||
|
||||
Reference in New Issue
Block a user