issues
search
oliveoil222
/
CS386-Project
Help Desk Ticketing Project for Spring CS 386
The Unlicense
5
stars
6
forks
source link
Create Database Class
#79
Closed
hannahpenado
closed
6 months ago
hannahpenado
commented
8 months ago
Client:Mongo Client
Database:Pymongo Database = client['ticket_tracker']
Tickets:Pymongo Collection = database['tickets']
Clients:Pymongo Collection = database['clients'] -Workers:Pymongo Collection = database['workers'] -Devices:Pymongo Collection = database['devices'] -Solutions:Pymongo Collection = database['solutions'] -Teams:Pymongo Collection = database['teams'] -Solutions:Pymongo Collection = database['solutions']
Users:Pymongo Collection = database['users']
current_ticket_id:string = 't000'
current_worker_id:string = 'w000'
current_device_id:string = 'd000'
current_solution_id = 's000'
current_client_id = 'c000'
current_team_id = 'g000'
add_ticket(Ticket):pymongo ticket id
add_worker(Worker):pymongo worker id
add_client(Client):pymongo client id
add_team(Team):pymongo team id
add_device(Device):pymongo device id
add_solution(Solution):pymongo sloution id
add_user(User):pymongo user id
get_ticket(ticket_id):ticket
find_user_tickets(email=None, device_id=None): list of ticket ids
get_worker(email): worker
get_client(email): client
get_team(team_name):team
get_device(device_id):device
find_solutions(solution_keywords):list of solutions
find_user(user_email):user
increase_ticket_id(): updated current ticket id
increase_worker_id(): updated current worker id
increase_device_id(): updated current device id
increase_solution_id(): updated current solution id
increase_client_id(): updated current client id
increase_team_id(): updated current team id