API of Employees of a fake company.
An Array of employees, like the exemple below:
[
{
"id":1,
"name": "emp.name",
"email": "emp.email",
"birth_date": "1990-05-23",
"admission_date": "1990-05-23",
"sector": "ENGENHARIA",
"position": "ENGENHEIRO",
"level": "PLENO",
"insert_date": "1990-05-23",
"update_date": "1990-05-23"
},
{
"id":2
"name": "emp.name",
"email": "emp.email",
"birth_date": "1990-05-23",
"admission_date": "1990-05-23",
"sector": "ENGENHARIA",
"position": "ENGENHEIRO",
"level": "PLENO",
"insert_date": "1990-05-23",
"update_date": "1990-05-23"
}
]
Path params id integer.
An object employee, like the exemple below:
{
"id":2
"name": "emp.name",
"email": "emp.email",
"birth_date": "1990-05-23",
"admission_date": "1990-05-23",
"sector": "ENGENHARIA",
"position": "ENGENHEIRO",
"level": "PLENO",
"insert_date": "1990-05-23",
"update_date": "1990-05-23"
}
{
"name": "emp.name",
"email": "emp.email",
"birth_date": "1990-05-23",
"admission_date": "1990-05-23",
"sector": "ENGENHARIA",
"position": "ENGENHEIRO",
"level": "PLENO"
}
name, email, sector and position are strings. Sector only accepts values "engenharia", "compras", "vendas" and "financeiro" (lower ou upper case). Position only accepts values "auxilia", "tecnico", "técnico", "engenheiro" and "director" (lower ou upper case). Level only accepts values "júnior","junior", "pleno", "sênior", "senior", "estagiário" and "estagiário" (lower ou upper case). admission_date, birth_date are Date types "YYYY-MM-DD".
{message:"success"}
Path params id is a number.
{
"id":2,
"name": "emp.name",
"email": "emp.email",
"birth_date": "1990-05-23",
"admission_date": "1990-05-23",
"sector": "ENGENHARIA",
"position": "ENGENHEIRO",
"level": "PLENO",
"insert_date": "1990-05-23",
"update_date": "1990-05-23"
}
name, email, sector and position are strings. Sector only accepts values "engenharia", "compras", "vendas" and "financeiro" (lower ou upper case). Position only accepts values "auxilia", "tecnico", "técnico", "engenheiro" and "director" (lower ou upper case). Level only accepts values "júnior","junior", "pleno", "sênior", "senior", "estagiário" and "estagiário" (lower ou upper case). admission_date, birth_date are Date, insert_date, update_date types "YYYY-MM-DD".
{message:"success"}
Path params id is a number.
{message:"success"}
CREATE TABLE actionsys(
id INT NOT NULL AUTO_INCREMENT,
name VARCHAR(200) NOT NULL ,
email VARCHAR(100) UNIQUE NOT NULL ,
birth_date DATE NOT NULL ,
admission_date DATE NOT NULL,
sector ENUM('ENGENHARIA', 'COMPRAS', 'FINANCEIRO', 'VENDAS') NOT NULL ,
position ENUM('AUXILIAR', 'TÉCNICO', 'ENGENHEIRO', 'DIRETOR') NOT NULL ,
level ENUM ('JÚNIOR', 'PLENO', 'SÊNIOR', 'ESTAGIÁRIO') NOT NULL ,
insert_date DATE NOT NULL ,
update_date DATE default("none"),
PRIMARY KEY (id)
);