Issue Type
Description
This is a template on the requirements to create new Database Principles / Tables / Objects
Expected behaviour
[What you expected to happen]
Actual behaviour
[What actually happened]
Screenshots
[If applicable, add screenshots to help explain your problem]
Additional context
How to create:
You must create a new DBObject, this means making a new class inside the database_objects.py module, this will automatically be grabbed by the database and will create a new table.
I would also suggest creating a Pydantic object as FastAPI works better with those, this means creating a class in pydantic_objects.py
Lastly, I do suggest making a new handler for this new object like I did with task_handler.py, this is because the database.py will not automatically convert the Database object to the Pydantic object.
Requirements:
- ID: There must be a PRIMARYKEY, preferably an ID, remeber that you can AUTOINCREMENT with SQL so it can be left in the background. get_object_by_id() will only work with an id tag not every primary key.
- Name: A name is not required however if you are wanting to use the inbuilt function get_object_by_name then it will require a name field as well as it being UNIQUE
Possible Solution
[Not obligatory, but suggest a fix/reason for the bug, or ideas how to implement the feature]
Issue Type
Description
This is a template on the requirements to create new Database Principles / Tables / Objects
Expected behaviour
[What you expected to happen]
Actual behaviour
[What actually happened]
Screenshots
[If applicable, add screenshots to help explain your problem]
Additional context
How to create:
You must create a new DBObject, this means making a new class inside the database_objects.py module, this will automatically be grabbed by the database and will create a new table.
I would also suggest creating a Pydantic object as FastAPI works better with those, this means creating a class in pydantic_objects.py
Lastly, I do suggest making a new handler for this new object like I did with task_handler.py, this is because the database.py will not automatically convert the Database object to the Pydantic object.
Requirements:
Possible Solution
[Not obligatory, but suggest a fix/reason for the bug, or ideas how to implement the feature]