... | ... | @@ -24,9 +24,14 @@ O banco de dados foi projetado para suportar a plataforma de campanhas de arreca |
|
|
## Entidades e Estrutura
|
|
|
### `user_account`
|
|
|
- `id` (UUID, PK)
|
|
|
- `email` (único, obrigatório)
|
|
|
- `full_name`, `email` (único, obrigatório)
|
|
|
- `password_hash`
|
|
|
|
|
|
### `password_reset_token`
|
|
|
- `id` (UUID, PK)
|
|
|
- `token`, `created_at`, `expires_at`
|
|
|
- `user_id` (FK → user_account.id)
|
|
|
|
|
|
### `admin`
|
|
|
- `user_id` (PK, FK → user_account.id)
|
|
|
- `root` (boolean, indica superadmin)
|
... | ... | @@ -34,7 +39,7 @@ O banco de dados foi projetado para suportar a plataforma de campanhas de arreca |
|
|
### `donor`
|
|
|
- `user_id` (PK, FK → user_account.id)
|
|
|
- `tax_id` (CPF, único)
|
|
|
- `full_name`, `birth_date`, `gender`, `phone`
|
|
|
- `birth_date`, `gender`, `phone`
|
|
|
|
|
|
### `address`
|
|
|
- `id` (UUID, PK)
|
... | ... | @@ -50,7 +55,7 @@ O banco de dados foi projetado para suportar a plataforma de campanhas de arreca |
|
|
- `title`, `description`, `target_amount`, `current_amount`, `start_date`, `end_date`, `image_url`
|
|
|
- `status` (`campaign_status`)
|
|
|
- `admin_id` (FK → admin.user_id)
|
|
|
- `created_by` (FK → user_id)
|
|
|
- `created_by` (FK → user_account.id)
|
|
|
|
|
|
### `donation`
|
|
|
- `id` (UUID, PK)
|
... | ... | |