Skip to content

Commit

Permalink
dbml generate done
Browse files Browse the repository at this point in the history
  • Loading branch information
milon27 committed Dec 2, 2024
1 parent 36c73f1 commit b17e3f7
Show file tree
Hide file tree
Showing 5 changed files with 29 additions and 3 deletions.
2 changes: 1 addition & 1 deletion .doc/doc.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
# write postman link

https://m27lab.postman.co/workspace/M27LAB~849f4e55-931f-4f55-96d9-fad5e24d1590/collection/12238877-777ce19b-5ed0-4a9d-ada9-74506e32d70e?action=share&source=copy-link&creator=12238877&active-environment=fed60369-7ea2-443c-b309-5a013b681d7d
https://m27lab.postman.co/workspace/M27LAB~849f4e55-931f-4f55-96d9-fad5e24d1590/collection/12238877-777ce19b-5ed0-4a9d-ada9-74506e32d70e?action=share&creator=12238877&active-environment=12238877-fed60369-7ea2-443c-b309-5a013b681d7d
1 change: 1 addition & 0 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
"appleboy",
"bolditalics",
"datetime",
"dbml",
"eturino",
"expirable",
"flushall",
Expand Down
9 changes: 7 additions & 2 deletions readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ npx nestpress@latest module category blog
## Update npm dependencies

```bash
# Updates all dependencies in package.json
# Updates all dependencies in package.json (not important, it might break the project)
pnpm all:update
# run test to check the app is working fine or not
Expand All @@ -58,11 +58,16 @@ pnpm test
- run `npm run test` for integration test
- for testing we are using `vitest, supertest`
## Generate database diagram via dbml
- run `pnpm dbml:generate`
- copy content from `resources/dbml/schema.dbml` and put `https://dbdiagram.io/d` to visualize
## API endpoints and doc
- BASE url: http://localhost:4000/v1
- Swagger Doc url: [Not Implemented]
- in `.doc` folder a postman json file `postman-collection.json` is available import it on your postman
- in `.doc` folder a postman json file `postman-collection.json` is available import it on your postman, or maybe there is live link just open that login into your postman and export collection.
- you need add an environment in postman with variable `url=http://localhost:4000`
## Code Snippet on vscode
Expand Down
Empty file added resources/dbml/.gitkeep
Empty file.
20 changes: 20 additions & 0 deletions resources/dbml/schema.dbml
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
table user_table {
id varchar(50) [pk, not null]
full_name varchar(255) [not null]
phone varchar(20) [unique]
email varchar(255) [not null, unique]
password varchar(255) [not null]
gender enum('male','female') [not null, default: 'male']
avatar varchar(255)
is_email_verified boolean [not null, default: false]
is_super_admin boolean [not null, default: false]
country_code varchar(5) [not null, default: 'BD']
city varchar(50)
state varchar(50)
zip_code varchar(50)
address varchar(255)
time_zone varchar(50) [not null, default: 'Asia/Dhaka']
fcm_token varchar(255)
last_logged_in datetime [not null, default: `(CURRENT_TIMESTAMP)`]
created_at datetime [not null, default: `(CURRENT_TIMESTAMP)`]
}

0 comments on commit b17e3f7

Please sign in to comment.