Update abstract class about database

master
Peng_Lx 2 years ago
parent 2f18a343d8
commit 7bef368a1a

@ -0,0 +1,8 @@
from enum import Enum, unique
@unique
class Permission(Enum):
NONE = 0
USER = 1
ADMIN = 2

@ -1,3 +1,39 @@
from src.educoder.core.permission.permission import Permission
class Database(object):
def connection(self):
def addBook(self, unique_id, isbn, state):
pass
def removeBook(self, unique_id):
pass
def addUser(self, user_id, userpass_word, permission: Permission, nick_name):
pass
def modifyUserPermission(self, user_id, permission: Permission):
pass
def removeUser(self, unique_id):
pass
def addBookInformation(self, isbn, author, description, price, made_time, image, category):
pass
def removeBookInformation(self, isbn):
pass
def brownBook(self, unique_id, brownuser):
pass
def stillBook(self, unique_id):
pass
def addCategory(self, category):
pass
def removeCategory(self, category):
pass
def login(self, user_id, password):
return True

Loading…
Cancel
Save