フォーマッター&コード
JSONからPrismaスキーマモデルへ
Generate a Prisma model block from a JSON sample.
編集者注
Understanding · A schema, not just a type.
この詳細な解説章は現在、英語版のみで提供されています。上の変換ツールはあなたの言語で動作しますが、長文の解説記事はまだ翻訳されていません。
よくある質問
Quick answers.
›How does it map JSON types to Prisma?
JSON strings are mapped to `String`, numbers to `Int` or `Float`, and booleans to `Boolean`. If a string matches an ISO date format, it will be mapped to `DateTime`.
›Can it handle nested JSON objects?
Yes. It will identify nested objects and arrays, though you may need to manually define the matching relation names within your main `schema.prisma` file.
›Is my JSON data secure?
Your data never leaves your computer. The conversion logic is executed entirely within your browser's JavaScript engine.
›Does it generate database-specific attributes?
It generates standard Prisma scalar types. You can manually add specific attributes like `@id`, `@default(autoincrement())`, or `@map()` after generating the base model.
他の人はこちらも検索しています
関連ツール
More in this room.
- JSONからReact Hook Form + ZodへJSONの形状から型付きフォームスキーマとuseFormフックを生成。
- JSONからNext.js Server ActionへZod解析とrevalidatePathを備えたServer Action。
- JSONからDrizzle ORMスキーマへ$inferSelect / $inferInsertを持つDrizzle pgTable定義。
- JSONからTypeORMエンティティへデコレーターと生成されたidを持つTypeORM @Entityクラス。
- JSONからMongooseスキーマ + モデルへタイムスタンプと型を持つMongooseスキーマ + モデル。
- JSONからtRPCルーターへZod入力を備えたtRPCルータースキャフォールド — リスト、Id別、作成。