Created
November 6, 2021 23:51
-
-
Save cassioeskelsen/afe00a54a0ed94ca5e93468f8da8111e to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from abc import abstractmethod | |
from typing import List, Protocol, runtime_checkable | |
from dataclasses import dataclass | |
@dataclass | |
class Customer: | |
id: int | |
name: str | |
@runtime_checkable | |
class CustomerRepository(Protocol): | |
@abstractmethod | |
def get_customers(self) -> List[Customer]: | |
""" retorna uma lista de clientes""" | |
@abstractmethod | |
def get_special_customers(self) -> List[Customer]: | |
""" retorna uma lista de clientes especiais""" | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment