feat: Semaine 8
This commit is contained in:
@@ -0,0 +1,6 @@
|
||||
from typing import Protocol
|
||||
from domain.entities.customer import Customer
|
||||
|
||||
class CustomerRepositoryProtocol(Protocol):
|
||||
def find_by_id(self, customer_id: int) -> Customer: ...
|
||||
def save(self, customer): ...
|
||||
@@ -0,0 +1,8 @@
|
||||
from typing import Protocol
|
||||
from domain.entities.order import Order
|
||||
|
||||
class OrderRepositoryProtocol(Protocol):
|
||||
def find_by_customer_id(self, customer_id: int) -> list[Order]: ...
|
||||
def find_by_id(self, order_id: int) -> Order | None: ...
|
||||
def save(self, order: Order) -> None: ...
|
||||
def update(self, order: Order) -> None: ...
|
||||
Reference in New Issue
Block a user