implement entities solution

uebung_use_cases
michael 2025-02-03 00:09:39 +01:00
parent 82b70ce099
commit 91d39c6d47
1 changed files with 16 additions and 4 deletions

View File

@ -1,7 +1,19 @@
class User:
#TODO: implement in exercise 'entities'
#TODO: user should have: id (int) but what other attributes should a user have?
#TODO: user should have methods but what methods should a user have?
def __init__(self, name: str, email: str, password: str, id: int):
self.name = name
self.email = email
self.password = password
self.id = id
pass
def get_email(self) -> str:
return self.email
def get_name(self) -> str:
return self.name
def change_name(self, new_name: str):
self.name = new_name
def change_email(self, new_email: str):
self.email = new_email