diff --git a/docs/data-model.md b/docs/data-model.md new file mode 100644 index 0000000..b5693db --- /dev/null +++ b/docs/data-model.md @@ -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 + diff --git a/k8s/app.yaml b/k8s/app.yaml index f57a2bb..fba9513 100644 --- a/k8s/app.yaml +++ b/k8s/app.yaml @@ -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 @@ -44,3 +50,4 @@ spec: - port: 80 targetPort: 8000 protocol: TCP + diff --git a/pyproject.toml b/pyproject.toml index 7926667..659ebc7 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -21,4 +21,5 @@ pythonpath = ["."] [build-system] requires = ["poetry-core"] -build-backend = "poetry.core.masonry.api"] +build-backend = "poetry.core.masonry.api" +