implement entities solution
parent
82b70ce099
commit
91d39c6d47
|
|
@ -1,7 +1,19 @@
|
||||||
|
|
||||||
class User:
|
class User:
|
||||||
#TODO: implement in exercise 'entities'
|
def __init__(self, name: str, email: str, password: str, id: int):
|
||||||
#TODO: user should have: id (int) but what other attributes should a user have?
|
self.name = name
|
||||||
#TODO: user should have methods but what methods should a user have?
|
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
|
||||||
Loading…
Reference in New Issue