Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2,527 changes: 2,527 additions & 0 deletions semana16/aula49/package-lock.json

Large diffs are not rendered by default.

3 changes: 3 additions & 0 deletions semana16/aula49/sql.sql
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
SELECT * FROM aula48_exercicio;

SELECT id, name, email, type FROM aula48_exercicio WHERE type LIKE "Teacher";
32 changes: 32 additions & 0 deletions semana16/aula49/sql1.sql
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
CREATE TABLE aula48_exercicio(
id INT PRIMARY KEY,
name VARCHAR(255) NOT NULL,
email VARCHAR(255) UNIQUE NOT NULL,
type VARCHAR(255) NOT NULL
);

INSERT INTO aula48_exercicio (`id`,`name`,`email`,`type`) VALUES (1,'Soter','soter@labenu','Teacher');
INSERT INTO aula48_exercicio (`id`,`name`,`email`,`type`) VALUES (2,'João','joao@labenu','Teacher');
INSERT INTO aula48_exercicio (`id`,`name`,`email`,`type`) VALUES (3,'Paula','paula@labenu','Teacher');
INSERT INTO aula48_exercicio (`id`,`name`,`email`,`type`) VALUES (4,'Amanda','amanda@labenu','Teacher');
INSERT INTO aula48_exercicio (`id`,`name`,`email`,`type`) VALUES (5,'Darvas','darvas@labenu','Teacher');
INSERT INTO aula48_exercicio (`id`,`name`,`email`,`type`) VALUES (6,'Severo','severo@labenu','Teacher');
INSERT INTO aula48_exercicio (`id`,`name`,`email`,`type`) VALUES (7,'Caio','caio@labenu','Teacher');
INSERT INTO aula48_exercicio (`id`,`name`,`email`,`type`) VALUES (8,'Chijo','chijo@labenu','Teacher');
INSERT INTO aula48_exercicio (`id`,`name`,`email`,`type`) VALUES (9,'Lais','lais@labenu','Teacher');
INSERT INTO aula48_exercicio (`id`,`name`,`email`,`type`) VALUES (10,'Bruno','bruno@labenu','Teacher');
INSERT INTO aula48_exercicio (`id`,`name`,`email`,`type`) VALUES (11,'Luciano','luciano@labenu','Operations');
INSERT INTO aula48_exercicio (`id`,`name`,`email`,`type`) VALUES (12,'Miau','miau@labenu','Operations');
INSERT INTO aula48_exercicio (`id`,`name`,`email`,`type`) VALUES (13,'Sekine','sekine@labenu','Operations');
INSERT INTO aula48_exercicio (`id`,`name`,`email`,`type`) VALUES (14,'Nathalia','nathalia@labenu','Operations');
INSERT INTO aula48_exercicio (`id`,`name`,`email`,`type`) VALUES (15,'Amanda','amandaop@labenu','Operations');
INSERT INTO aula48_exercicio (`id`,`name`,`email`,`type`) VALUES (16,'Rebeca','rebeca@labenu','Operations');
INSERT INTO aula48_exercicio (`id`,`name`,`email`,`type`) VALUES (17,'Jean','jean@labenu','Operations');
INSERT INTO aula48_exercicio (`id`,`name`,`email`,`type`) VALUES (18,'Vitória','vitoria@labenu','Operations');
INSERT INTO aula48_exercicio (`id`,`name`,`email`,`type`) VALUES (19,'Fernanda','fernanda@labenu','Operations');
INSERT INTO aula48_exercicio (`id`,`name`,`email`,`type`) VALUES (20,'Tainah','tainah@labenu','Operations');
INSERT INTO aula48_exercicio (`id`,`name`,`email`,`type`) VALUES (21,'Aline','aline@labenu','CX');
INSERT INTO aula48_exercicio (`id`,`name`,`email`,`type`) VALUES (22,'Nathalia','nathaliacx@labenu','CX');
INSERT INTO aula48_exercicio (`id`,`name`,`email`,`type`) VALUES (23,'Layla','layla@labenu','CX');
INSERT INTO aula48_exercicio (`id`,`name`,`email`,`type`) VALUES (24,'Jonathan','jonathan@labenu','CX');
INSERT INTO aula48_exercicio (`id`,`name`,`email`,`type`) VALUES (25,'Maju','maju@labenu','CX');
9 changes: 9 additions & 0 deletions semana16/projeto/aluno.sql
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
CREATE TABLE student(
id INT NOT NULL AUTO_INCREMENT PRIMARY KEY,
name VARCHAR(255) NOT NULL,
email VARCHAR(255) UNIQUE NOT NULL,
birthday DATE NOT NULL,
turmaId INT NOT NULL
);

INSERT INTO student (`name`, `email`, `birthday`, `turmaId`) VALUES ('Frank','frank@labenu','2000/03/01');
8 changes: 8 additions & 0 deletions semana16/projeto/prof.sql
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
CREATE TABLE teacher(
id INT NOT NULL AUTO_INCREMENT PRIMARY KEY,
name VARCHAR(255) NOT NULL,
email VARCHAR(255) UNIQUE NOT NULL,
birthday DATE NOT NULL,
specialties VARCHAR(255) UNIQUE NOT NULL,
turmaId INT NOT NULL
);
11 changes: 11 additions & 0 deletions semana16/projeto/turma.sql
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
CREATE TABLE class(
id INT NOT NULL AUTO_INCREMENT PRIMARY KEY,
name VARCHAR(255) NOT NULL,
begin DATE NOT NULL,
finish DATE NOT NULL,
module INT NOT NULL,
studentId VARCHAR(255) NOT NULL,
teacherId VARCHAR(255) NOT NULL,
FOREIGN KEY (studentId ) REFERENCES student(id),
FOREIGN KEY (teacherId ) REFERENCES teacher(id)
);
4 changes: 4 additions & 0 deletions semana18/tarefa55/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
node_modules
packege-lock.json
build
.env
100 changes: 100 additions & 0 deletions semana18/tarefa55/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,100 @@
# To Do List

## ESTRUTURA DE DADOS

* ## Usuários
* id
* name
* nickname
* email

* ## Tarefas
* id
* title
* description
* deadline
* status: `"to_do" || "doing" || "done"`
* author
* assignees

---

## CRIAÇÃO DE TABELAS - MySql

```sql
CREATE TABLE to_do_list_users (
id VARCHAR(64) PRIMARY KEY,
name VARCHAR(64) NOT NULL,
nickname VARCHAR(64) NOT NULL,
email VARCHAR(64) NOT NULL
);
```
```sql
CREATE TABLE to_do_list_tasks (
id VARCHAR(64) PRIMARY KEY,
title VARCHAR(64) NOT NULL,
description VARCHAR(1024) DEFAULT "No description provided",
deadline DATE,
status ENUM("TO_DO", "DOING", "DONE") DEFAULT "TO_DO",
author_id VARCHAR(64),
FOREIGN KEY (author_id) REFERENCES to_do_list_users(id)
);
```
```sql
CREATE TABLE to_do_list_assignees (
task_id VARCHAR(64),
assignee_id VARCHAR(64),
PRIMARY KEY (task_id, assignee_id),
FOREIGN KEY (task_id) REFERENCES to_do_list_tasks(id),
FOREIGN KEY (assignee_id) REFERENCES to_do_list_users(id)
);
```
---

## ENDPOINTS

* ## Criar usuário
* Método: PUT
* Path: `/user`
* Body:
* name (obrigatório)
* nickname (obrigatório)
* email (obrigatório)

* ## Pegar usuário pelo id
* Método: GET
* Path: `/user/:id`
* Body de Resposta: (retornar um erro se não encontrar)
* id
* nickname


* ## Editar usuário**
* Método: POST
* Path: `/user/edit/:id`
* Body:
* name (opcional; não pode ser vazio)
* nickname (opcional; não pode ser vazio)
* email (opcional; não pode ser vazio)


* ## Criar tarefa
* Método: PUT
* Path: `/task`
* Body:
* title (obrigatório)
* description (obrigatório)
* deadline (obrigatório; formato `YYYY-MM-DD`)
* authorId

* ## Pegar tarefa pelo id
* Método: GET
* Path: `/task/:id`
* Body de Resposta: (retornar um erro se não encontrar)
* id
* title
* description
* deadline (formato `YYYY-MM-DD`)
* status
* authorId
* authorNickname
Loading