Skip to content

aula-02 #4

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
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
15 changes: 7 additions & 8 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,23 +4,22 @@
"description": "**Vamos utilizar esse repositório para as práticas da aula!**",
"main": "index.js",
"scripts": {
"start-frota": "tsc && node ./build/tipando/index.js",
"start-ex-1": "tsc && node ./build/fixacao/exercicio1/index.js",
"start-ex-2": "tsc && node ./build/fixacao/exercicio2/index.js",
"start-ex-3": "tsc && node ./build/fixacao/exercicio3/index.js"
"start": "tsc && node ./build/index.js",
"test": "echo \"Error: no test specified\" && exit 1"
},
"repository": {
"type": "git",
"url": "git+https://github.com/labenuexercicios/typescript-I-template.git"
"url": "git+https://github.com/cesaralmeida002/typescript-I-template.git"
},
"keywords": [],
"author": "",
"license": "ISC",
"bugs": {
"url": "https://github.com/labenuexercicios/typescript-I-template/issues"
"url": "https://github.com/cesaralmeida002/typescript-I-template/issues"
},
"homepage": "https://github.com/labenuexercicios/typescript-I-template#readme",
"homepage": "https://github.com/cesaralmeida002/typescript-I-template#readme",
"devDependencies": {
"@types/node": "^18.11.18",
"typescript": "^4.9.4"
}
}
}
22 changes: 22 additions & 0 deletions src/dataBase.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
import {Tclientes, Tprodutos, TcompraPorClientes} from "./type";

// user
export const clientes: Tclientes[] = [{
id: "1",
email: "josé@gmail.com",
password: "abcd",
}]
// product
export const produtos: Tprodutos[] = [{
id:"2",
nomeDoProduto: "calça",
preco: 99,
categoria: "roupas",
}]
// purchase
export const compraPorCliente: TcompraPorClientes[] = [{
usuarioId: "3",
produtoId: "5",
quantidade: 2,
totalPreco: 100,
}]
21 changes: 0 additions & 21 deletions src/fixacao/exercicio1/index.ts

This file was deleted.

21 changes: 0 additions & 21 deletions src/fixacao/exercicio2/index.ts

This file was deleted.

17 changes: 0 additions & 17 deletions src/fixacao/exercicio3/index.ts

This file was deleted.

7 changes: 7 additions & 0 deletions src/index.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
import {clientes, produtos, compraPorCliente} from "./dataBase";

console.log(clientes)

console.log(produtos)

console.log(compraPorCliente)
7 changes: 0 additions & 7 deletions src/tipando/README.md

This file was deleted.

50 changes: 0 additions & 50 deletions src/tipando/frota.ts

This file was deleted.

11 changes: 0 additions & 11 deletions src/tipando/index.ts

This file was deleted.

20 changes: 20 additions & 0 deletions src/type.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
export type Tclientes = {
id: string
email: string
password: string

}
export type Tprodutos = {
id: string
nomeDoProduto: string
preco: number
categoria: string

}
export type TcompraPorClientes = {
usuarioId: string
produtoId: string
quantidade: number
totalPreco: number

}