diff --git a/src/educoder/core/__init__.py b/src/educoder/core/__init__.py new file mode 100644 index 0000000..e69de29 diff --git a/src/educoder/core/permission/__init__.py b/src/educoder/core/permission/__init__.py new file mode 100644 index 0000000..e69de29 diff --git a/src/educoder/core/permission/permission.py b/src/educoder/core/permission/permission.py new file mode 100644 index 0000000..3cc0510 --- /dev/null +++ b/src/educoder/core/permission/permission.py @@ -0,0 +1,8 @@ +from enum import Enum, unique + + +@unique +class Permission(Enum): + NONE = 0 + USER = 1 + ADMIN = 2 diff --git a/src/educoder/database/database.py b/src/educoder/database/database.py index 3318868..ee1aff6 100644 --- a/src/educoder/database/database.py +++ b/src/educoder/database/database.py @@ -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