Created a set of base models to begin fleshing out the data aspect of the application
This commit is contained in:
0
models/users/__init__.py
Normal file
0
models/users/__init__.py
Normal file
25
models/users/admin.py
Normal file
25
models/users/admin.py
Normal file
@ -0,0 +1,25 @@
|
||||
from user import User
|
||||
|
||||
class Admin(User):
|
||||
'''
|
||||
Class constructor to instatiate an Admin object
|
||||
'''
|
||||
def __init__(self):
|
||||
super().__init__()
|
||||
self.store = ""
|
||||
|
||||
def login():
|
||||
print("Logging in as Admin")
|
||||
|
||||
def signup():
|
||||
print("Signing up as Admin")
|
||||
|
||||
def createProduct():
|
||||
pass
|
||||
|
||||
def deleteProduct():
|
||||
pass
|
||||
|
||||
def updateProduct():
|
||||
pass
|
||||
|
17
models/users/customer.py
Normal file
17
models/users/customer.py
Normal file
@ -0,0 +1,17 @@
|
||||
from user import User
|
||||
|
||||
class Customer(User):
|
||||
'''
|
||||
Class constructor to instatiate a customer object
|
||||
|
||||
No additional properties are assigned to the customer
|
||||
'''
|
||||
def __init__(self):
|
||||
super().__init__()
|
||||
|
||||
def login():
|
||||
print("Logging in as Customer")
|
||||
|
||||
def signup():
|
||||
print("Signing up as Customer")
|
||||
|
25
models/users/seller.py
Normal file
25
models/users/seller.py
Normal file
@ -0,0 +1,25 @@
|
||||
from user import User
|
||||
|
||||
class Seller(User):
|
||||
'''
|
||||
Class constructor to instatiate a Seller object
|
||||
'''
|
||||
def __init__(self):
|
||||
super().__init__()
|
||||
self.store = ""
|
||||
|
||||
def login():
|
||||
print("Logging in as Seller")
|
||||
|
||||
def signup():
|
||||
print("Signing up as Seller")
|
||||
|
||||
def createProduct():
|
||||
pass
|
||||
|
||||
def deleteProduct():
|
||||
pass
|
||||
|
||||
def updateProduct():
|
||||
pass
|
||||
|
22
models/users/user.py
Normal file
22
models/users/user.py
Normal file
@ -0,0 +1,22 @@
|
||||
from abc import ABC, abstractmethod
|
||||
|
||||
class User(ABC):
|
||||
'''
|
||||
Class constructor to instatiate the base object
|
||||
'''
|
||||
def __init__(self):
|
||||
self.id = 0
|
||||
self.username = ""
|
||||
self.email = ""
|
||||
self.firstName = ""
|
||||
self.lastName = ""
|
||||
self.phone = ""
|
||||
|
||||
@abstractmethod
|
||||
def login():
|
||||
pass
|
||||
|
||||
@abstractmethod
|
||||
def signup():
|
||||
pass
|
||||
|
Reference in New Issue
Block a user