Skip to content

API controller

Vu edited this page Mar 31, 2025 · 9 revisions

Here are the APIs that I have created (some of it is still empty, which means you will not receive any result(NULL)). If you guys need any more methods or suggestions, leave comments.

models (these are what I'm gonna return to front-end, because you use GUI so the return value is an Object not a JSON)

Employee { int empid String Fname String Lname String job_title Date pay_date double earnings double fed_tax double fed_med double fed_SS double state_tax double retire_401K double health_care

int getEmpid() { return empid }
String getFname() { return Fname }
...

} User { int empid int role; (0 for admin, 1 for employee) int getEmpid() {return empid} public int getRole() {return role}

API Controller(these are the methods you guys can use):

TO LOGIN:

UserLogin.login(String username, String password) return User{}

TO VIEW EMPLOYEE INFO:

EmployeeInfo.viewEmployeeInfoById(int empid) return Employee{}

(will add more view by name, ssn...)

TO UPDATE SALARY BY RANGE:

UpdateRangeSalary.updateRangeSalary(int min, int max, int increment)

TO UPDATE EMPLOYEE INFO: (to be provided)

TO VIEW REPORT: (to be provided)

Clone this wiki locally