prisma-markdown
Advanced tools
Comparing version 1.0.8-dev.20231115 to 1.0.8-dev.20231227
@@ -88,3 +88,3 @@ "use strict"; | ||
"", | ||
...[...dict.keys()].map((name) => `- [${name}](#${name})`), | ||
...[...dict.keys()].map((name) => `- [${name}](#${name.toLowerCase()})`), | ||
].join("\n"); | ||
@@ -91,0 +91,0 @@ return (preface + |
@@ -33,4 +33,4 @@ "use strict"; | ||
return [ | ||
field.type, | ||
(_a = field.dbName) !== null && _a !== void 0 ? _a : field.name, | ||
field.type, // type | ||
(_a = field.dbName) !== null && _a !== void 0 ? _a : field.name, // name | ||
field.isId | ||
@@ -46,3 +46,3 @@ ? "PK" | ||
? "UK" | ||
: "", | ||
: "", // constraint | ||
field.isRequired ? "" : `"nullable"`, // nullable | ||
@@ -49,0 +49,0 @@ ] |
{ | ||
"name": "prisma-markdown", | ||
"version": "1.0.8-dev.20231115", | ||
"version": "1.0.8-dev.20231227", | ||
"description": "Prisma Markdown documents generator including ERD diagrams and comment descriptions", | ||
@@ -35,6 +35,6 @@ "main": "lib/index.js", | ||
"devDependencies": { | ||
"@prisma/client": "^5.6.0", | ||
"@prisma/client": "^5.0.0", | ||
"@types/node": "^20.6.0", | ||
"prettier": "^3.0.3", | ||
"prisma": "^5.2.0", | ||
"prisma": "^5.0.0", | ||
"rimraf": "^5.0.1", | ||
@@ -45,4 +45,8 @@ "ts-node": "^10.9.1", | ||
"dependencies": { | ||
"@prisma/generator-helper": "^5.2.0" | ||
"@prisma/generator-helper": "^5.0.0" | ||
}, | ||
"peerDependencies": { | ||
"@prisma/client": ">= 5.0.0", | ||
"prisma": ">= 5.0.0" | ||
}, | ||
"files": [ | ||
@@ -49,0 +53,0 @@ "lib", |
@@ -95,1 +95,15 @@ # Prisma Markdown | ||
``` | ||
![Mandatory Relationship](https://github.com/samchon/prisma-markdown/assets/13158709/b382cf64-5047-4a00-b77f-7c3427010090) | ||
Additionally, when defining 1: N relationship, you can specify the N position to be whether optional or mandatory. If you want to configure the N position to be mandatory, just write the `@minItems 1` comment tag. Otherwise the N position is optional, you don't need to do anything. | ||
```prisma | ||
model shopping_sale_units { | ||
/// @minItems 1 | ||
stocks shopping_sale_snapshot_unit_stocks[]; | ||
options shopping_sale_snapshot_unit_options[]; // optional | ||
} | ||
model shopping_sale_snapshot_unit_stocks {} | ||
model shopping_sale_snapshot_unit_options {} | ||
``` |
@@ -100,3 +100,3 @@ import { DMMF } from "@prisma/generator-helper"; | ||
"", | ||
...[...dict.keys()].map((name) => `- [${name}](#${name})`), | ||
...[...dict.keys()].map((name) => `- [${name}](#${name.toLowerCase()})`), | ||
].join("\n"); | ||
@@ -103,0 +103,0 @@ return ( |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
65001
109
3
+ Added@prisma/client@6.3.1(transitive)
+ Added@prisma/debug@6.3.1(transitive)
+ Added@prisma/engines@6.3.1(transitive)
+ Added@prisma/engines-version@6.3.0-17.acc0b9dd43eb689cbd20c9470515d719db10d0b0(transitive)
+ Added@prisma/fetch-engine@6.3.1(transitive)
+ Added@prisma/get-platform@6.3.1(transitive)
+ Addedfsevents@2.3.3(transitive)
+ Addedprisma@6.3.1(transitive)