Skip to content

Commit d2ccfb5

Browse files
committed
allocationrequired and batchcreated events [two_new_events]
1 parent b462ac5 commit d2ccfb5

File tree

1 file changed

+18
-0
lines changed

1 file changed

+18
-0
lines changed

src/allocation/domain/events.py

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,28 @@
1+
# pylint: disable=too-few-public-methods
12
from dataclasses import dataclass
3+
from datetime import date
4+
from typing import Optional
25

36

47
class Event:
58
pass
69

710

11+
@dataclass
12+
class BatchCreated(Event):
13+
ref: str
14+
sku: str
15+
qty: int
16+
eta: Optional[date] = None
17+
18+
19+
@dataclass
20+
class AllocationRequired(Event):
21+
orderid: str
22+
sku: str
23+
qty: int
24+
25+
826
@dataclass
927
class OutOfStock(Event):
1028
sku: str

0 commit comments

Comments
 (0)