-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
7d0790d
commit 99c0a04
Showing
8 changed files
with
1,059 additions
and
8 deletions.
There are no files selected for viewing
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,57 @@ | ||
# Doe Aqui | ||
> Generated by [`prisma-markdown`](https://github.com/samchon/prisma-markdown) | ||
- [default](#default) | ||
|
||
## default | ||
```mermaid | ||
erDiagram | ||
"User" { | ||
String id PK | ||
String name | ||
String email UK | ||
String password | ||
} | ||
"Image" { | ||
String id PK | ||
String campaign_id FK | ||
String url | ||
} | ||
"Campaign" { | ||
String id PK | ||
String user_id FK | ||
String title | ||
String description | ||
Decimal goal | ||
Decimal total_raised | ||
String pix_key | ||
} | ||
"Image" }|--|| "Campaign" : campaign | ||
"Campaign" }|--|| "User" : user | ||
``` | ||
|
||
### `User` | ||
|
||
**Properties** | ||
- `id`: | ||
- `name`: | ||
- `email`: | ||
- `password`: | ||
|
||
### `Image` | ||
|
||
**Properties** | ||
- `id`: | ||
- `campaign_id`: | ||
- `url`: | ||
|
||
### `Campaign` | ||
|
||
**Properties** | ||
- `id`: | ||
- `user_id`: | ||
- `title`: | ||
- `description`: | ||
- `goal`: | ||
- `total_raised`: | ||
- `pix_key`: |
Binary file not shown.
Binary file not shown.
30 changes: 30 additions & 0 deletions
30
prisma/migrations/20231024214006_schema_defined/migration.sql
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
/* | ||
Warnings: | ||
- You are about to drop the `Campaigns` table. If the table is not empty, all the data it contains will be lost. | ||
*/ | ||
-- DropTable | ||
PRAGMA foreign_keys=off; | ||
DROP TABLE "Campaigns"; | ||
PRAGMA foreign_keys=on; | ||
|
||
-- CreateTable | ||
CREATE TABLE "Image" ( | ||
"id" TEXT NOT NULL PRIMARY KEY, | ||
"campaign_id" TEXT NOT NULL, | ||
"url" TEXT NOT NULL, | ||
CONSTRAINT "Image_campaign_id_fkey" FOREIGN KEY ("campaign_id") REFERENCES "Campaign" ("id") ON DELETE RESTRICT ON UPDATE CASCADE | ||
); | ||
|
||
-- CreateTable | ||
CREATE TABLE "Campaign" ( | ||
"id" TEXT NOT NULL PRIMARY KEY, | ||
"user_id" TEXT NOT NULL, | ||
"title" TEXT NOT NULL, | ||
"description" TEXT NOT NULL, | ||
"goal" DECIMAL NOT NULL DEFAULT 0, | ||
"total_raised" DECIMAL NOT NULL DEFAULT 0, | ||
"pix_key" TEXT NOT NULL, | ||
CONSTRAINT "Campaign_user_id_fkey" FOREIGN KEY ("user_id") REFERENCES "User" ("id") ON DELETE RESTRICT ON UPDATE CASCADE | ||
); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters