Skip to content

Instantly share code, notes, and snippets.

@cassioeskelsen
Last active June 12, 2021 15:43
Show Gist options
  • Select an option

  • Save cassioeskelsen/a328ec902eb66885a40d486305064841 to your computer and use it in GitHub Desktop.

Select an option

Save cassioeskelsen/a328ec902eb66885a40d486305064841 to your computer and use it in GitHub Desktop.
@dataclass(eq=True)
class Customer:
Name: str
Address: Address
Document: str
InsertDate: datetime = field(default_factory=datetime.datetime.now)
Id: str = None
def __hash__(self) -> int:
return hash(self.Id)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment