2023-12-31 16:27:39 +00:00
|
|
|
from abc import ABC, abstractmethod
|
|
|
|
|
|
|
|
class User(ABC):
|
2024-01-01 23:13:09 +00:00
|
|
|
""" Functional Class constructor to initialise all properties in the base object
|
|
|
|
with a value """
|
|
|
|
def __init__(self, id: int, username: str, email: str, firstname: str,
|
|
|
|
lastname: str, phone: str, password: str, role: str):
|
|
|
|
self.id = id
|
|
|
|
self.username = username
|
|
|
|
self.email = email
|
|
|
|
self.firstName = firstname
|
|
|
|
self.lastName = lastname
|
|
|
|
self.phone = phone
|
|
|
|
self.password = password
|
|
|
|
self.role= role
|
|
|
|
|
2023-12-31 16:27:39 +00:00
|
|
|
|
|
|
|
@abstractmethod
|
2023-12-31 19:03:29 +00:00
|
|
|
def login(self):
|
2023-12-31 16:27:39 +00:00
|
|
|
pass
|
|
|
|
|
|
|
|
@abstractmethod
|
2023-12-31 19:03:29 +00:00
|
|
|
def signup(self):
|
2023-12-31 16:27:39 +00:00
|
|
|
pass
|
|
|
|
|