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
25 changes: 25 additions & 0 deletions docs/data-model.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
# Modelagem de Dados

## Entidades

### Pedido (orders)

| Coluna | Tipo | Descrição |
|------------|-----------|----------------------------------------------|
| id | INTEGER | Identificador único, gerado automaticamente |
| customer | TEXT | Nome do cliente |
| status | TEXT | Estado do pedido (ex.: pending, completed) |
| created_at | TIMESTAMP | Data e hora de criação, automática |

### Item (items)

| Coluna | Tipo | Descrição |
|-------------|---------|--------------------------------------|
| id | INTEGER | Identificador único, gerado auto. |
| order_id | INTEGER | Chave estrangeira → orders(id) |
| sku | TEXT | Código do item |
| description | TEXT | Descrição do item |
| quantity | INTEGER | Quantidade |

## Relacionamento

7 changes: 7 additions & 0 deletions k8s/app.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,12 @@ spec:
image: container-registry.br-se1.magalu.cloud/${MGC_REGISTRY_NAME}/cloud-application:latest
ports:
- containerPort: 8000
env:
- name: DATABASE_URL
valueFrom:
secretKeyRef:
name: db-secret
key: url
livenessProbe:
httpGet:
path: /health
Expand All @@ -44,3 +50,4 @@ spec:
- port: 80
targetPort: 8000
protocol: TCP

3 changes: 2 additions & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -21,4 +21,5 @@ pythonpath = ["."]

[build-system]
requires = ["poetry-core"]
build-backend = "poetry.core.masonry.api"]
build-backend = "poetry.core.masonry.api"