diff --git a/.doc/doc.md b/.doc/doc.md index cce2396..11a20ba 100644 --- a/.doc/doc.md +++ b/.doc/doc.md @@ -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 \ No newline at end of file +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 diff --git a/.vscode/settings.json b/.vscode/settings.json index 52cf4e0..dc11328 100644 --- a/.vscode/settings.json +++ b/.vscode/settings.json @@ -9,6 +9,7 @@ "appleboy", "bolditalics", "datetime", + "dbml", "eturino", "expirable", "flushall", diff --git a/readme.md b/readme.md index 96bbe4c..2e5d325 100644 --- a/readme.md +++ b/readme.md @@ -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 @@ -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 diff --git a/resources/dbml/.gitkeep b/resources/dbml/.gitkeep new file mode 100644 index 0000000..e69de29 diff --git a/resources/dbml/schema.dbml b/resources/dbml/schema.dbml new file mode 100644 index 0000000..75fc4cd --- /dev/null +++ b/resources/dbml/schema.dbml @@ -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)`] +} \ No newline at end of file