edit .env file with your database details
db generated via sqlalchemy
use alembic to perform migrations from model.py after db creation
use instructions on the page for installation
Endpoints:
POST /add_employee/<fname>/<lname>/<bdate>/<gender>/<salary>/<dno>/<title>
response :
success/invalid dept_no
GET /employee_details?limit=lmt&offset=offset
limit and offset parameters deafult to 100 and 0 respectively if not provided.
response:
json with departments.dept_no, departments.dept_name, employees.emp_no, employees.first_name, employees.last_name,from_date,to_date
GET /department_details?limit=lmt&offset=offset
limit and offset parameters deafult to 100 and 0 respectively if not provided.
response:
json with employees.emp_no, first_name, last_name, dept_emp.dept_no, departments.dept_name, title, salary
PUT /employee_update/<empid>
available arguments:
fname,lname,bdate,gndr,sal,dno,ttl
response :
success/invalid dept_no/invalid employee id
DELETE /employee_delete/<empid>
response :
success/invalid employee id
GET /deptemps/<dname> response : emp_no of employees in that dept / invalid dept_no
for running tests, use empty db with the details stored in .env