@autobe/agent 0.9.2 → 0.10.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (168) hide show
  1. package/lib/AutoBeAgent.js +11 -4
  2. package/lib/AutoBeAgent.js.map +1 -1
  3. package/lib/constants/AutoBeSystemPromptConstant.d.ts +7 -6
  4. package/lib/constants/AutoBeSystemPromptConstant.js.map +1 -1
  5. package/lib/context/AutoBeTokenUsage.d.ts +15 -1
  6. package/lib/context/AutoBeTokenUsage.js +56 -1
  7. package/lib/context/AutoBeTokenUsage.js.map +1 -1
  8. package/lib/factory/createAutoBeApplication.js +288 -653
  9. package/lib/factory/createAutoBeApplication.js.map +1 -1
  10. package/lib/index.mjs +4225 -6681
  11. package/lib/index.mjs.map +1 -1
  12. package/lib/orchestrate/analyze/AutoBeAnalyzeAgent.js +80 -321
  13. package/lib/orchestrate/analyze/AutoBeAnalyzeAgent.js.map +1 -1
  14. package/lib/orchestrate/analyze/AutoBeAnalyzeReviewer.js +0 -1
  15. package/lib/orchestrate/analyze/AutoBeAnalyzeReviewer.js.map +1 -1
  16. package/lib/orchestrate/analyze/orchestrateAnalyze.js +93 -266
  17. package/lib/orchestrate/analyze/orchestrateAnalyze.js.map +1 -1
  18. package/lib/orchestrate/facade/transformFacadeStateMessage.js +2 -2
  19. package/lib/orchestrate/facade/transformFacadeStateMessage.js.map +1 -1
  20. package/lib/orchestrate/index.d.ts +2 -2
  21. package/lib/orchestrate/index.js +4 -4
  22. package/lib/orchestrate/index.js.map +1 -1
  23. package/lib/orchestrate/interface/orchestrateInterfaceComplement.js +54 -142
  24. package/lib/orchestrate/interface/orchestrateInterfaceComplement.js.map +1 -1
  25. package/lib/orchestrate/interface/orchestrateInterfaceComponents.js +189 -201
  26. package/lib/orchestrate/interface/orchestrateInterfaceComponents.js.map +1 -1
  27. package/lib/orchestrate/interface/orchestrateInterfaceEndpoints.js +71 -174
  28. package/lib/orchestrate/interface/orchestrateInterfaceEndpoints.js.map +1 -1
  29. package/lib/orchestrate/interface/orchestrateInterfaceOperations.js +706 -1099
  30. package/lib/orchestrate/interface/orchestrateInterfaceOperations.js.map +1 -1
  31. package/lib/orchestrate/interface/transformInterfaceHistories.js +2 -0
  32. package/lib/orchestrate/interface/transformInterfaceHistories.js.map +1 -1
  33. package/lib/orchestrate/prisma/orchestratePrismaComponent.js +60 -177
  34. package/lib/orchestrate/prisma/orchestratePrismaComponent.js.map +1 -1
  35. package/lib/orchestrate/prisma/orchestratePrismaCorrect.js +502 -1073
  36. package/lib/orchestrate/prisma/orchestratePrismaCorrect.js.map +1 -1
  37. package/lib/orchestrate/prisma/orchestratePrismaSchema.js +519 -1125
  38. package/lib/orchestrate/prisma/orchestratePrismaSchema.js.map +1 -1
  39. package/lib/orchestrate/prisma/transformPrismaComponentsHistories.js +9 -0
  40. package/lib/orchestrate/prisma/transformPrismaComponentsHistories.js.map +1 -1
  41. package/lib/orchestrate/prisma/transformPrismaSchemaHistories.js +8 -0
  42. package/lib/orchestrate/prisma/transformPrismaSchemaHistories.js.map +1 -1
  43. package/lib/orchestrate/realize/orchestrateRealize.d.ts +11 -0
  44. package/lib/orchestrate/realize/orchestrateRealize.js +78 -0
  45. package/lib/orchestrate/realize/orchestrateRealize.js.map +1 -0
  46. package/lib/orchestrate/realize/orchestrateRealizeCoder.d.ts +25 -0
  47. package/lib/orchestrate/realize/orchestrateRealizeCoder.js +326 -0
  48. package/lib/orchestrate/realize/orchestrateRealizeCoder.js.map +1 -0
  49. package/lib/orchestrate/realize/orchestrateRealizePlanner.d.ts +80 -0
  50. package/lib/orchestrate/realize/orchestrateRealizePlanner.js +53 -0
  51. package/lib/orchestrate/realize/orchestrateRealizePlanner.js.map +1 -0
  52. package/lib/orchestrate/realize/structures/IAutoBeRealizeCoderApplication.d.ts +39 -0
  53. package/lib/orchestrate/realize/structures/IAutoBeRealizeCoderApplication.js +3 -0
  54. package/lib/orchestrate/realize/structures/IAutoBeRealizeCoderApplication.js.map +1 -0
  55. package/lib/orchestrate/realize/transformRealizeCoderHistories.d.ts +5 -0
  56. package/lib/orchestrate/realize/transformRealizeCoderHistories.js +127 -0
  57. package/lib/orchestrate/realize/transformRealizeCoderHistories.js.map +1 -0
  58. package/lib/orchestrate/test/compile/completeTestCode.d.ts +2 -0
  59. package/lib/orchestrate/test/compile/completeTestCode.js +21 -0
  60. package/lib/orchestrate/test/compile/completeTestCode.js.map +1 -0
  61. package/lib/orchestrate/test/{filterTestFileName.js → compile/filterTestFileName.js} +1 -1
  62. package/lib/orchestrate/test/compile/filterTestFileName.js.map +1 -0
  63. package/lib/orchestrate/test/compile/getTestExternalDeclarations.d.ts +3 -0
  64. package/lib/orchestrate/test/compile/getTestExternalDeclarations.js +27 -0
  65. package/lib/orchestrate/test/compile/getTestExternalDeclarations.js.map +1 -0
  66. package/lib/orchestrate/test/compile/getTestScenarioArtifacts.d.ts +5 -0
  67. package/lib/orchestrate/test/{compileTestScenario.js → compile/getTestScenarioArtifacts.js} +10 -5
  68. package/lib/orchestrate/test/compile/getTestScenarioArtifacts.js.map +1 -0
  69. package/lib/orchestrate/test/orchestrateTest.js +14 -9
  70. package/lib/orchestrate/test/orchestrateTest.js.map +1 -1
  71. package/lib/orchestrate/test/orchestrateTestCorrect.d.ts +3 -2
  72. package/lib/orchestrate/test/orchestrateTestCorrect.js +142 -448
  73. package/lib/orchestrate/test/orchestrateTestCorrect.js.map +1 -1
  74. package/lib/orchestrate/test/orchestrateTestScenario.js +258 -532
  75. package/lib/orchestrate/test/orchestrateTestScenario.js.map +1 -1
  76. package/lib/orchestrate/test/orchestrateTestWrite.d.ts +3 -2
  77. package/lib/orchestrate/test/orchestrateTestWrite.js +124 -90
  78. package/lib/orchestrate/test/orchestrateTestWrite.js.map +1 -1
  79. package/lib/orchestrate/test/structures/IAutoBeTestCorrectApplication.d.ts +121 -0
  80. package/lib/orchestrate/test/structures/IAutoBeTestCorrectApplication.js +3 -0
  81. package/lib/orchestrate/test/structures/IAutoBeTestCorrectApplication.js.map +1 -0
  82. package/lib/orchestrate/test/structures/IAutoBeTestFunction.d.ts +8 -0
  83. package/lib/{utils/types/BackoffOptions.js → orchestrate/test/structures/IAutoBeTestFunction.js} +1 -1
  84. package/lib/orchestrate/test/structures/IAutoBeTestFunction.js.map +1 -0
  85. package/lib/orchestrate/test/structures/IAutoBeTestScenarioApplication.d.ts +14 -2
  86. package/lib/orchestrate/test/structures/IAutoBeTestWriteApplication.d.ts +112 -0
  87. package/lib/orchestrate/test/structures/IAutoBeTestWriteApplication.js +3 -0
  88. package/lib/orchestrate/test/structures/IAutoBeTestWriteApplication.js.map +1 -0
  89. package/lib/orchestrate/test/structures/IAutoBeTestWriteResult.d.ts +7 -0
  90. package/lib/orchestrate/test/structures/IAutoBeTestWriteResult.js +3 -0
  91. package/lib/orchestrate/test/structures/IAutoBeTestWriteResult.js.map +1 -0
  92. package/lib/orchestrate/test/transformTestCorrectHistories.d.ts +3 -2
  93. package/lib/orchestrate/test/transformTestCorrectHistories.js +28 -67
  94. package/lib/orchestrate/test/transformTestCorrectHistories.js.map +1 -1
  95. package/lib/orchestrate/test/transformTestWriteHistories.d.ts +5 -4
  96. package/lib/orchestrate/test/transformTestWriteHistories.js +161 -43
  97. package/lib/orchestrate/test/transformTestWriteHistories.js.map +1 -1
  98. package/lib/structures/IAutoBeConfig.d.ts +11 -0
  99. package/lib/utils/backoffRetry.d.ts +4 -7
  100. package/lib/utils/backoffRetry.js +19 -37
  101. package/lib/utils/backoffRetry.js.map +1 -1
  102. package/lib/utils/forceRetry.d.ts +1 -0
  103. package/lib/{orchestrate/orchestrateRealize.js → utils/forceRetry.js} +15 -8
  104. package/lib/utils/forceRetry.js.map +1 -0
  105. package/package.json +9 -12
  106. package/src/AutoBeAgent.ts +17 -3
  107. package/src/constants/AutoBeSystemPromptConstant.ts +7 -6
  108. package/src/context/AutoBeTokenUsage.ts +85 -1
  109. package/src/factory/createAutoBeApplication.ts +2 -3
  110. package/src/orchestrate/analyze/AutoBeAnalyzeAgent.ts +8 -3
  111. package/src/orchestrate/analyze/AutoBeAnalyzeReviewer.ts +0 -1
  112. package/src/orchestrate/analyze/orchestrateAnalyze.ts +6 -5
  113. package/src/orchestrate/facade/transformFacadeStateMessage.ts +2 -1
  114. package/src/orchestrate/index.ts +2 -2
  115. package/src/orchestrate/interface/orchestrateInterfaceComplement.ts +4 -3
  116. package/src/orchestrate/interface/orchestrateInterfaceComponents.ts +26 -23
  117. package/src/orchestrate/interface/orchestrateInterfaceEndpoints.ts +6 -4
  118. package/src/orchestrate/interface/orchestrateInterfaceOperations.ts +14 -11
  119. package/src/orchestrate/interface/transformInterfaceHistories.ts +2 -0
  120. package/src/orchestrate/prisma/orchestratePrismaComponent.ts +10 -5
  121. package/src/orchestrate/prisma/orchestratePrismaCorrect.ts +11 -5
  122. package/src/orchestrate/prisma/orchestratePrismaSchema.ts +16 -8
  123. package/src/orchestrate/prisma/transformPrismaComponentsHistories.ts +9 -0
  124. package/src/orchestrate/prisma/transformPrismaSchemaHistories.ts +8 -0
  125. package/src/orchestrate/realize/orchestrateRealize.ts +129 -0
  126. package/src/orchestrate/realize/orchestrateRealizeCoder.ts +148 -0
  127. package/src/orchestrate/realize/orchestrateRealizePlanner.ts +115 -0
  128. package/src/orchestrate/realize/structures/IAutoBeRealizeCoderApplication.ts +46 -0
  129. package/src/orchestrate/realize/transformRealizeCoderHistories.ts +136 -0
  130. package/src/orchestrate/test/compile/completeTestCode.ts +35 -0
  131. package/src/orchestrate/test/{filterTestFileName.ts → compile/filterTestFileName.ts} +1 -1
  132. package/src/orchestrate/test/compile/getTestExternalDeclarations.ts +24 -0
  133. package/src/orchestrate/test/{compileTestScenario.ts → compile/getTestScenarioArtifacts.ts} +16 -8
  134. package/src/orchestrate/test/experimental/orchestrateTestCorrect.ast +240 -0
  135. package/src/orchestrate/test/experimental/orchestrateTestWrite.ast +316 -0
  136. package/src/orchestrate/test/experimental/transformTestCorrectHistories.ast +52 -0
  137. package/src/orchestrate/test/orchestrateTest.ts +33 -16
  138. package/src/orchestrate/test/orchestrateTestCorrect.ts +109 -497
  139. package/src/orchestrate/test/orchestrateTestScenario.ts +102 -71
  140. package/src/orchestrate/test/orchestrateTestWrite.ts +55 -181
  141. package/src/orchestrate/test/structures/IAutoBeTestCorrectApplication.ts +126 -0
  142. package/src/orchestrate/test/structures/IAutoBeTestFunction.ts +10 -0
  143. package/src/orchestrate/test/structures/IAutoBeTestScenarioApplication.ts +14 -2
  144. package/src/orchestrate/test/structures/IAutoBeTestWriteApplication.ts +117 -0
  145. package/src/orchestrate/test/structures/IAutoBeTestWriteResult.ts +9 -0
  146. package/src/orchestrate/test/transformTestCorrectHistories.ts +38 -71
  147. package/src/orchestrate/test/transformTestWriteHistories.ts +88 -46
  148. package/src/structures/IAutoBeConfig.ts +9 -0
  149. package/src/utils/backoffRetry.ts +25 -36
  150. package/src/utils/forceRetry.ts +13 -0
  151. package/lib/factory/invertOpenApiDocument.d.ts +0 -3
  152. package/lib/factory/invertOpenApiDocument.js +0 -51
  153. package/lib/factory/invertOpenApiDocument.js.map +0 -1
  154. package/lib/orchestrate/orchestrateRealize.d.ts +0 -5
  155. package/lib/orchestrate/orchestrateRealize.js.map +0 -1
  156. package/lib/orchestrate/test/compileTestScenario.d.ts +0 -5
  157. package/lib/orchestrate/test/compileTestScenario.js.map +0 -1
  158. package/lib/orchestrate/test/filterTestFileName.js.map +0 -1
  159. package/lib/utils/StringUtil.d.ts +0 -4
  160. package/lib/utils/StringUtil.js +0 -43
  161. package/lib/utils/StringUtil.js.map +0 -1
  162. package/lib/utils/types/BackoffOptions.d.ts +0 -12
  163. package/lib/utils/types/BackoffOptions.js.map +0 -1
  164. package/src/factory/invertOpenApiDocument.ts +0 -63
  165. package/src/orchestrate/orchestrateRealize.ts +0 -18
  166. package/src/utils/StringUtil.ts +0 -45
  167. package/src/utils/types/BackoffOptions.ts +0 -15
  168. /package/lib/orchestrate/test/{filterTestFileName.d.ts → compile/filterTestFileName.d.ts} +0 -0
@@ -52,6 +52,7 @@ const core_1 = require("@agentica/core");
52
52
  const typia_1 = __importDefault(require("typia"));
53
53
  const assertSchemaModel_1 = require("../../context/assertSchemaModel");
54
54
  const enforceToolCall_1 = require("../../utils/enforceToolCall");
55
+ const forceRetry_1 = require("../../utils/forceRetry");
55
56
  const transformPrismaSchemaHistories_1 = require("./transformPrismaSchemaHistories");
56
57
  function orchestratePrismaSchemas(ctx, components) {
57
58
  return __awaiter(this, void 0, void 0, function* () {
@@ -61,11 +62,11 @@ function orchestratePrismaSchemas(ctx, components) {
61
62
  let i = 0;
62
63
  return yield Promise.all(components.map((c) => __awaiter(this, void 0, void 0, function* () {
63
64
  var _a, _b;
64
- const result = yield process(ctx, {
65
+ const result = yield (0, forceRetry_1.forceRetry)(() => process(ctx, {
65
66
  filename: c.filename,
66
67
  tables: c.tables,
67
68
  entireTables,
68
- });
69
+ }));
69
70
  const event = {
70
71
  type: "prismaSchemas",
71
72
  created_at: start.toISOString(),
@@ -88,9 +89,10 @@ function process(ctx, component) {
88
89
  const agentica = new core_1.MicroAgentica({
89
90
  model: ctx.model,
90
91
  vendor: ctx.vendor,
91
- config: Object.assign({}, ((_a = ctx.config) !== null && _a !== void 0 ? _a : {})),
92
+ config: Object.assign(Object.assign({}, ((_a = ctx.config) !== null && _a !== void 0 ? _a : {})), { executor: {
93
+ describe: null,
94
+ } }),
92
95
  histories: (0, transformPrismaSchemaHistories_1.transformPrismaSchemaHistories)(ctx.state().analyze, component),
93
- tokenUsage: ctx.usage(),
94
96
  controllers: [
95
97
  createApplication({
96
98
  model: ctx.model,
@@ -109,7 +111,10 @@ function process(ctx, component) {
109
111
  ],
110
112
  });
111
113
  (0, enforceToolCall_1.enforceToolCall)(agentica);
112
- yield agentica.conversate("Make prisma schema file please");
114
+ yield agentica.conversate("Make prisma schema file please").finally(() => {
115
+ const tokenUsage = agentica.getTokenUsage();
116
+ ctx.usage().record(tokenUsage, ["prisma"]);
117
+ });
113
118
  if (pointer.value === null)
114
119
  throw new Error("Unreachable code: Prisma Schema not generated");
115
120
  return pointer.value;
@@ -143,280 +148,33 @@ const claude = {
143
148
  type: "object",
144
149
  properties: {
145
150
  file: {
146
- description: "Complete definition of a single Prisma schema file.\n\nRepresents one business domain containing related models, organized for\nmodular schema management and following domain-driven design principles.\n\n------------------------------\n\nDescription of the current {@link AutoBePrisma.IFile} type:\n\n> Interface representing a single Prisma schema file within the application.\n> \n> Each file focuses on a specific business domain and contains related\n> models. File organization follows domain-driven design principles as seen\n> in the uploaded schemas.",
151
+ description: "Complete definition of a single Prisma schema file.\n\nRepresents one business domain containing related models, organized for\nmodular schema management and following domain-driven design principles.",
152
+ $ref: "#/$defs/AutoBePrisma.IFile"
153
+ }
154
+ },
155
+ required: [
156
+ "file"
157
+ ],
158
+ additionalProperties: false,
159
+ $defs: {
160
+ "AutoBePrisma.IFile": {
161
+ description: "Interface representing a single Prisma schema file within the application.\n\nEach file focuses on a specific business domain and contains related\nmodels. File organization follows domain-driven design principles as seen\nin the uploaded schemas.",
147
162
  type: "object",
148
163
  properties: {
149
164
  filename: {
150
- title: "Name of the schema file to be generated",
151
165
  description: "Name of the schema file to be generated.\n\nShould follow the naming convention: \"schema-{number}-{domain}.prisma\"\nExamples: \"schema-02-systematic.prisma\", \"schema-03-actors.prisma\" The\nnumber indicates the dependency order for schema generation.",
152
166
  type: "string",
153
167
  pattern: "^[a-zA-Z0-9._-]+\\.prisma$"
154
168
  },
155
169
  namespace: {
156
- title: "Business domain namespace that groups related models",
157
170
  description: "Business domain namespace that groups related models.\n\nUsed in Prisma documentation comments as \"@\\namespace directive\".\nExamples from uploaded schemas: \"Systematic\", \"Actors\", \"Sales\", \"Carts\",\n\"Orders\", \"Coupons\", \"Coins\", \"Inquiries\", \"Favorites\", \"Articles\"",
158
171
  type: "string"
159
172
  },
160
173
  models: {
161
- title: "Array of Prisma models (database tables) within this domain",
162
174
  description: "Array of Prisma models (database tables) within this domain.\n\nEach model represents a business entity or concept within the namespace.\nModels can reference each other through foreign key relationships.",
163
175
  type: "array",
164
176
  items: {
165
- description: "Description of the current {@link AutoBePrisma.IModel} type:\n\n> Interface representing a single Prisma model (database table).\n> \n> Based on the uploaded schemas, models follow specific patterns:\n> \n> - Main business entities (e.g., shopping_sales, shopping_customers)\n> - Snapshot/versioning entities for audit trails (e.g.,\n> shopping_sale_snapshots)\n> - Junction tables for M:N relationships (e.g.,\n> shopping_cart_commodity_stocks)\n> - Materialized views for performance (prefixed with mv_)",
166
- type: "object",
167
- properties: {
168
- name: {
169
- title: "Name of the Prisma model (database table name)",
170
- description: "Name of the Prisma model (database table name).\n\nShould follow snake_case convention with domain prefix. Examples:\n\"shopping_customers\", \"shopping_sale_snapshots\", \"bbs_articles\"\nMaterialized views use \"mv_\" prefix: \"mv_shopping_sale_last_snapshots\"",
171
- type: "string",
172
- pattern: "^[a-z][a-z0-9_]*$"
173
- },
174
- description: {
175
- description: "Detailed description explaining the business purpose and usage of the\nmodel.\n\nShould include:\n\n- Business context and purpose\n- Key relationships with other models\n- Important behavioral notes or constraints\n- References to related entities using \"{@\\link ModelName}\" syntax Example:\n \"Customer information, but not a person but a **connection** basis...\"",
176
- type: "string"
177
- },
178
- material: {
179
- description: "Indicates whether this model represents a materialized view for\nperformance optimization.\n\nMaterialized views are read-only computed tables that cache complex query\nresults. They're marked as \"@\\hidden\" in documentation and prefixed with\n\"mv_\" in naming. Examples: mv_shopping_sale_last_snapshots,\nmv_shopping_cart_commodity_prices",
180
- type: "boolean"
181
- },
182
- primaryField: {
183
- description: "The primary key field of the model.\n\nIn all uploaded schemas, primary keys are always UUID type with \"@\\id\"\ndirective. Usually named \"id\" and marked with \"@\\db.Uuid\" for PostgreSQL\nmapping.\n\n------------------------------\n\nDescription of the current {@link AutoBePrisma.IPrimaryField} type:\n\n> Interface representing the primary key field of a Prisma model.\n> \n> All models in the uploaded schemas use UUID as primary key for better\n> distributed system compatibility and security (no sequential ID exposure).",
184
- type: "object",
185
- properties: {
186
- name: {
187
- title: "Name of the primary key field",
188
- description: "Name of the primary key field.\n\nConsistently named \"id\" across all models in the uploaded schemas.\nRepresents the unique identifier for each record in the table.",
189
- type: "string",
190
- pattern: "^[a-z][a-z0-9_]*$"
191
- },
192
- type: {
193
- title: "Data type of the primary key field",
194
- description: "Data type of the primary key field.\n\nAlways \"uuid\" in the uploaded schemas for better distributed system\nsupport and to avoid exposing sequential IDs that could reveal business\ninformation.",
195
- "const": "uuid"
196
- },
197
- description: {
198
- title: "Description of the primary key field's purpose",
199
- description: "Description of the primary key field's purpose.\n\nStandard description is \"Primary Key.\" across all models. Serves as the\nunique identifier for the model instance.",
200
- type: "string"
201
- }
202
- },
203
- required: [
204
- "name",
205
- "type",
206
- "description"
207
- ]
208
- },
209
- foreignFields: {
210
- title: "Array of foreign key fields that reference other models",
211
- description: "Array of foreign key fields that reference other models.\n\nThese establish relationships between models and include Prisma relation\ndirectives. Can be nullable (optional relationships) or required\n(mandatory relationships). May have unique constraints for 1:1\nrelationships.",
212
- type: "array",
213
- items: {
214
- description: "Description of the current {@link AutoBePrisma.IForeignField} type:\n\n> Interface representing a foreign key field that establishes relationships\n> between models.\n> \n> Foreign keys create associations between models, enabling relational data\n> modeling. They can represent 1:1, 1:N, or participate in M:N relationships\n> through junction tables.",
215
- type: "object",
216
- properties: {
217
- name: {
218
- title: "Name of the foreign key field",
219
- description: "Name of the foreign key field.\n\nFollows convention: \"{target_model_name_without_prefix}_id\" Examples:\n\"shopping_customer_id\", \"bbs_article_id\", \"attachment_file_id\" For\nself-references: \"parent_id\" (e.g., in hierarchical structures)",
220
- type: "string",
221
- pattern: "^[a-z][a-z0-9_]*$"
222
- },
223
- type: {
224
- title: "Data type of the foreign key field",
225
- description: "Data type of the foreign key field.\n\nAlways \"uuid\" to match the primary key type of referenced models. Ensures\nreferential integrity and consistency across the schema.",
226
- "const": "uuid"
227
- },
228
- description: {
229
- description: "Description explaining the purpose and target of this foreign key\nrelationship.\n\nShould reference the target model using format: \"Target model's {@\\link\nModelName.id}\" Examples: \"Belonged customer's {@\\link\nshopping_customers.id}\" May include additional context about the\nrelationship's business meaning.",
230
- type: "string"
231
- },
232
- relation: {
233
- title: "Prisma relation configuration defining the association details",
234
- description: "Prisma relation configuration defining the association details.\n\nSpecifies how this foreign key connects to the target model, including\nrelation name, target model, and target field.",
235
- type: "object",
236
- properties: {
237
- name: {
238
- title: "Name of the relation property in the Prisma model",
239
- description: "Name of the relation property in the Prisma model.\n\nUsed to access the related model instance. Usually a descriptive name\nof the relationship. Examples: \"customer\", \"channel\", \"parent\",\n\"snapshot\"",
240
- type: "string",
241
- pattern: "^[a-zA-Z_][a-zA-Z0-9_]*$"
242
- },
243
- targetModel: {
244
- title: "Name of the target model being referenced",
245
- description: "Name of the target model being referenced.\n\nMust match exactly with an existing model name in the schema. Examples:\n\"shopping_customers\", \"shopping_channels\", \"bbs_articles\"",
246
- type: "string"
247
- }
248
- },
249
- required: [
250
- "name",
251
- "targetModel"
252
- ]
253
- },
254
- unique: {
255
- title: "Whether this foreign key has a unique constraint",
256
- description: "Whether this foreign key has a unique constraint.\n\nTrue: Creates a 1:1 relationship (e.g., user profile, order publish\ndetails) false: Allows 1:N relationship (e.g., customer to multiple\norders) Used for enforcing business rules about relationship\ncardinality.",
257
- type: "boolean"
258
- },
259
- nullable: {
260
- title: "Whether this foreign key can be null (optional relationship)",
261
- description: "Whether this foreign key can be null (optional relationship).\n\nTrue: Relationship is optional, foreign key can be null false:\nRelationship is required, foreign key cannot be null Reflects business\nrules about mandatory vs optional associations.",
262
- type: "boolean"
263
- }
264
- },
265
- required: [
266
- "name",
267
- "type",
268
- "description",
269
- "relation",
270
- "unique",
271
- "nullable"
272
- ]
273
- }
274
- },
275
- plainFields: {
276
- title: "Array of regular data fields that don't reference other models",
277
- description: "Array of regular data fields that don't reference other models.\n\nInclude business data like names, descriptions, timestamps, flags,\namounts, etc. Common patterns: created_at, updated_at, deleted_at for\nsoft deletion and auditing.",
278
- type: "array",
279
- items: {
280
- description: "Description of the current {@link AutoBePrisma.IPlainField} type:\n\n> Interface representing a regular data field that stores business\n> information.\n> \n> These fields contain the actual business data like names, amounts,\n> timestamps, flags, descriptions, and other domain-specific information.",
281
- type: "object",
282
- properties: {
283
- name: {
284
- title: "Name of the field in the database table",
285
- description: "Name of the field in the database table.\n\nShould use snake_case convention. Common patterns from uploaded schemas:\n\n- Timestamps: created_at, updated_at, deleted_at, opened_at, closed_at\n- Identifiers: code, name, nickname, title\n- Business data: value, quantity, price, volume, balance\n- Flags: primary, required, exclusive, secret, multiplicative",
286
- type: "string",
287
- pattern: "^[a-z][a-z0-9_]*$"
288
- },
289
- type: {
290
- title: "Data type of the field for Prisma schema generation",
291
- description: "Data type of the field for Prisma schema generation.\n\nMaps to appropriate Prisma/PostgreSQL types:\n\n- Boolean: Boolean flags and yes/no values\n- Int: Integer numbers, quantities, sequences\n- Double: Decimal numbers, prices, monetary values, percentages\n- String: Text data, names, descriptions, codes\n- Uri: URL/URI fields for links and references\n- Uuid: UUID fields (for non-foreign-key UUIDs)\n- Date: Date-only values (rare, mostly for business dates)\n- Datetime: Timestamp fields with date and time",
292
- oneOf: [
293
- {
294
- "const": "string"
295
- },
296
- {
297
- "const": "boolean"
298
- },
299
- {
300
- "const": "uuid"
301
- },
302
- {
303
- "const": "uri"
304
- },
305
- {
306
- "const": "int"
307
- },
308
- {
309
- "const": "double"
310
- },
311
- {
312
- "const": "datetime"
313
- }
314
- ]
315
- },
316
- description: {
317
- title: "Description explaining the business purpose and usage of this field",
318
- description: "Description explaining the business purpose and usage of this field.\n\nShould clearly explain:\n\n- What business concept this field represents\n- Valid values or constraints if applicable\n- How it relates to business processes\n- Any special behavioral notes Example: \"Amount of cash payment.\" or\n \"Whether the unit is required or not.\"",
319
- type: "string"
320
- },
321
- nullable: {
322
- title: "Whether this field can contain null values",
323
- description: "Whether this field can contain null values.\n\nTrue: Field is optional and can be null (e.g., middle name, description)\nfalse: Field is required and cannot be null (e.g., creation timestamp,\nname) Reflects business rules about mandatory vs optional data.",
324
- type: "boolean"
325
- }
326
- },
327
- required: [
328
- "name",
329
- "type",
330
- "description",
331
- "nullable"
332
- ]
333
- }
334
- },
335
- uniqueIndexes: {
336
- title: "Array of unique indexes for enforcing data integrity constraints",
337
- description: "Array of unique indexes for enforcing data integrity constraints.\n\nEnsure uniqueness across single or multiple columns. Examples: unique\nemail addresses, unique codes within a channel, unique combinations like\n(channel_id, nickname).",
338
- type: "array",
339
- items: {
340
- description: "Description of the current {@link AutoBePrisma.IUniqueIndex} type:\n\n> Interface representing a unique index constraint on one or more fields.\n> \n> Unique indexes enforce data integrity by ensuring no duplicate values exist\n> for the specified field combination. Essential for business rules that\n> require uniqueness like email addresses, codes, or composite keys.",
341
- type: "object",
342
- properties: {
343
- fieldNames: {
344
- title: "Array of field names that together form the unique constraint",
345
- description: "Array of field names that together form the unique constraint.\n\nCan be single field (e.g., [\"email\"]) or composite (e.g., [\"channel_id\",\n\"code\"]). All field names must exist in the model. Order matters for\ncomposite indexes. Examples: [\"code\"], [\"shopping_channel_id\",\n\"nickname\"], [\"email\"]",
346
- type: "array",
347
- items: {
348
- type: "string"
349
- },
350
- minItems: 1,
351
- uniqueItems: true
352
- },
353
- unique: {
354
- title: "Explicit marker indicating this is a unique index",
355
- description: "Explicit marker indicating this is a unique index.\n\nAlways true to distinguish from regular indexes. Used by code generator\nto emit \"@@unique\" directive in Prisma schema instead of \"@@index\".",
356
- "const": true
357
- }
358
- },
359
- required: [
360
- "fieldNames",
361
- "unique"
362
- ]
363
- }
364
- },
365
- plainIndexes: {
366
- title: "Array of regular indexes for query performance optimization",
367
- description: "Array of regular indexes for query performance optimization.\n\nSpeed up common query patterns like filtering by foreign keys, date\nranges, or frequently searched fields. Examples: indexes on created_at,\nforeign key fields, search fields.",
368
- type: "array",
369
- items: {
370
- description: "Description of the current {@link AutoBePrisma.IPlainIndex} type:\n\n> Interface representing a regular (non-unique) index for query performance.\n> \n> Regular indexes speed up database queries by creating optimized data\n> structures for common search patterns. Essential for foreign keys, date\n> ranges, and frequently filtered fields.",
371
- type: "object",
372
- properties: {
373
- fieldNames: {
374
- title: "Array of field names to include in the performance index",
375
- description: "Array of field names to include in the performance index.\n\nCan be single field (e.g., [\"created_at\"]) or composite (e.g.,\n[\"customer_id\", \"created_at\"]). All field names must exist in the model.\nOrder matters for composite indexes and should match common query\npatterns. Examples: [\"created_at\"], [\"shopping_customer_id\",\n\"created_at\"], [\"ip\"]",
376
- type: "array",
377
- items: {
378
- type: "string"
379
- },
380
- minItems: 1,
381
- uniqueItems: true
382
- }
383
- },
384
- required: [
385
- "fieldNames"
386
- ]
387
- }
388
- },
389
- ginIndexes: {
390
- title: "Array of GIN (Generalized Inverted Index) indexes for full-text search",
391
- description: "Array of GIN (Generalized Inverted Index) indexes for full-text search.\n\nUsed specifically for PostgreSQL text search capabilities using trigram\noperations. Applied to text fields that need fuzzy matching or partial\ntext search. Examples: searching names, nicknames, titles, content\nbodies.",
392
- type: "array",
393
- items: {
394
- description: "Description of the current {@link AutoBePrisma.IGinIndex} type:\n\n> Interface representing a GIN (Generalized Inverted Index) for full-text\n> search.\n> \n> GIN indexes enable advanced PostgreSQL text search capabilities including\n> fuzzy matching and partial text search using trigram operations. Essential\n> for user-facing search features on text content.",
395
- type: "object",
396
- properties: {
397
- fieldName: {
398
- title: "Name of the text field to index for full-text search capabilities",
399
- description: "Name of the text field to index for full-text search capabilities.\n\nMust be a string field in the model that contains searchable text.\nExamples from uploaded schemas: \"nickname\", \"title\", \"body\", \"name\" Used\nwith PostgreSQL gin_trgm_ops for trigram-based fuzzy text search.",
400
- type: "string"
401
- }
402
- },
403
- required: [
404
- "fieldName"
405
- ]
406
- }
407
- }
408
- },
409
- required: [
410
- "name",
411
- "description",
412
- "material",
413
- "primaryField",
414
- "foreignFields",
415
- "plainFields",
416
- "uniqueIndexes",
417
- "plainIndexes",
418
- "ginIndexes"
419
- ]
177
+ $ref: "#/$defs/AutoBePrisma.IModel"
420
178
  }
421
179
  }
422
180
  },
@@ -425,13 +183,260 @@ const claude = {
425
183
  "namespace",
426
184
  "models"
427
185
  ]
186
+ },
187
+ "AutoBePrisma.IModel": {
188
+ description: "Interface representing a single Prisma model (database table).\n\nBased on the uploaded schemas, models follow specific patterns:\n\n- Main business entities (e.g., shopping_sales, shopping_customers)\n- Snapshot/versioning entities for audit trails (e.g.,\n shopping_sale_snapshots)\n- Junction tables for M:N relationships (e.g.,\n shopping_cart_commodity_stocks)\n- Materialized views for performance (prefixed with mv_)",
189
+ type: "object",
190
+ properties: {
191
+ name: {
192
+ description: "Name of the Prisma model (database table name).\n\nShould follow snake_case convention with domain prefix. Examples:\n\"shopping_customers\", \"shopping_sale_snapshots\", \"bbs_articles\"\nMaterialized views use \"mv_\" prefix: \"mv_shopping_sale_last_snapshots\"",
193
+ type: "string",
194
+ pattern: "^[a-z][a-z0-9_]*$"
195
+ },
196
+ description: {
197
+ description: "Detailed description explaining the business purpose and usage of the\nmodel.\n\nShould include:\n\n- Business context and purpose\n- Key relationships with other models\n- Important behavioral notes or constraints\n- References to related entities using \"{@\\link ModelName}\" syntax Example:\n \"Customer information, but not a person but a **connection** basis...\"",
198
+ type: "string"
199
+ },
200
+ material: {
201
+ description: "Indicates whether this model represents a materialized view for\nperformance optimization.\n\nMaterialized views are read-only computed tables that cache complex query\nresults. They're marked as \"@\\hidden\" in documentation and prefixed with\n\"mv_\" in naming. Examples: mv_shopping_sale_last_snapshots,\nmv_shopping_cart_commodity_prices",
202
+ type: "boolean"
203
+ },
204
+ primaryField: {
205
+ description: "The primary key field of the model.\n\nIn all uploaded schemas, primary keys are always UUID type with \"@\\id\"\ndirective. Usually named \"id\" and marked with \"@\\db.Uuid\" for PostgreSQL\nmapping.",
206
+ $ref: "#/$defs/AutoBePrisma.IPrimaryField"
207
+ },
208
+ foreignFields: {
209
+ description: "Array of foreign key fields that reference other models.\n\nThese establish relationships between models and include Prisma relation\ndirectives. Can be nullable (optional relationships) or required\n(mandatory relationships). May have unique constraints for 1:1\nrelationships.",
210
+ type: "array",
211
+ items: {
212
+ $ref: "#/$defs/AutoBePrisma.IForeignField"
213
+ }
214
+ },
215
+ plainFields: {
216
+ description: "Array of regular data fields that don't reference other models.\n\nInclude business data like names, descriptions, timestamps, flags,\namounts, etc. Common patterns: created_at, updated_at, deleted_at for\nsoft deletion and auditing.",
217
+ type: "array",
218
+ items: {
219
+ $ref: "#/$defs/AutoBePrisma.IPlainField"
220
+ }
221
+ },
222
+ uniqueIndexes: {
223
+ description: "Array of unique indexes for enforcing data integrity constraints.\n\nEnsure uniqueness across single or multiple columns. Examples: unique\nemail addresses, unique codes within a channel, unique combinations like\n(channel_id, nickname).",
224
+ type: "array",
225
+ items: {
226
+ $ref: "#/$defs/AutoBePrisma.IUniqueIndex"
227
+ }
228
+ },
229
+ plainIndexes: {
230
+ description: "Array of regular indexes for query performance optimization.\n\nSpeed up common query patterns like filtering by foreign keys, date\nranges, or frequently searched fields. Examples: indexes on created_at,\nforeign key fields, search fields.",
231
+ type: "array",
232
+ items: {
233
+ $ref: "#/$defs/AutoBePrisma.IPlainIndex"
234
+ }
235
+ },
236
+ ginIndexes: {
237
+ description: "Array of GIN (Generalized Inverted Index) indexes for full-text search.\n\nUsed specifically for PostgreSQL text search capabilities using trigram\noperations. Applied to text fields that need fuzzy matching or partial\ntext search. Examples: searching names, nicknames, titles, content\nbodies.",
238
+ type: "array",
239
+ items: {
240
+ $ref: "#/$defs/AutoBePrisma.IGinIndex"
241
+ }
242
+ }
243
+ },
244
+ required: [
245
+ "name",
246
+ "description",
247
+ "material",
248
+ "primaryField",
249
+ "foreignFields",
250
+ "plainFields",
251
+ "uniqueIndexes",
252
+ "plainIndexes",
253
+ "ginIndexes"
254
+ ]
255
+ },
256
+ "AutoBePrisma.IPrimaryField": {
257
+ description: "Interface representing the primary key field of a Prisma model.\n\nAll models in the uploaded schemas use UUID as primary key for better\ndistributed system compatibility and security (no sequential ID exposure).",
258
+ type: "object",
259
+ properties: {
260
+ name: {
261
+ description: "Name of the primary key field.\n\nConsistently named \"id\" across all models in the uploaded schemas.\nRepresents the unique identifier for each record in the table.",
262
+ type: "string",
263
+ pattern: "^[a-z][a-z0-9_]*$"
264
+ },
265
+ type: {
266
+ description: "Data type of the primary key field.\n\nAlways \"uuid\" in the uploaded schemas for better distributed system\nsupport and to avoid exposing sequential IDs that could reveal business\ninformation.",
267
+ "const": "uuid"
268
+ },
269
+ description: {
270
+ description: "Description of the primary key field's purpose.\n\nStandard description is \"Primary Key.\" across all models. Serves as the\nunique identifier for the model instance.",
271
+ type: "string"
272
+ }
273
+ },
274
+ required: [
275
+ "name",
276
+ "type",
277
+ "description"
278
+ ]
279
+ },
280
+ "AutoBePrisma.IForeignField": {
281
+ description: "Interface representing a foreign key field that establishes relationships\nbetween models.\n\nForeign keys create associations between models, enabling relational data\nmodeling. They can represent 1:1, 1:N, or participate in M:N relationships\nthrough junction tables.",
282
+ type: "object",
283
+ properties: {
284
+ name: {
285
+ description: "Name of the foreign key field.\n\nFollows convention: \"{target_model_name_without_prefix}_id\" Examples:\n\"shopping_customer_id\", \"bbs_article_id\", \"attachment_file_id\" For\nself-references: \"parent_id\" (e.g., in hierarchical structures)",
286
+ type: "string",
287
+ pattern: "^[a-z][a-z0-9_]*$"
288
+ },
289
+ type: {
290
+ description: "Data type of the foreign key field.\n\nAlways \"uuid\" to match the primary key type of referenced models. Ensures\nreferential integrity and consistency across the schema.",
291
+ "const": "uuid"
292
+ },
293
+ description: {
294
+ description: "Description explaining the purpose and target of this foreign key\nrelationship.\n\nShould reference the target model using format: \"Target model's {@\\link\nModelName.id}\" Examples: \"Belonged customer's {@\\link\nshopping_customers.id}\" May include additional context about the\nrelationship's business meaning.",
295
+ type: "string"
296
+ },
297
+ relation: {
298
+ description: "Prisma relation configuration defining the association details.\n\nSpecifies how this foreign key connects to the target model, including\nrelation name, target model, and target field.",
299
+ type: "object",
300
+ properties: {
301
+ name: {
302
+ description: "Name of the relation property in the Prisma model.\n\nUsed to access the related model instance. Usually a descriptive name\nof the relationship. Examples: \"customer\", \"channel\", \"parent\",\n\"snapshot\"",
303
+ type: "string",
304
+ pattern: "^[a-zA-Z_][a-zA-Z0-9_]*$"
305
+ },
306
+ targetModel: {
307
+ description: "Name of the target model being referenced.\n\nMust match exactly with an existing model name in the schema. Examples:\n\"shopping_customers\", \"shopping_channels\", \"bbs_articles\"",
308
+ type: "string"
309
+ }
310
+ },
311
+ required: [
312
+ "name",
313
+ "targetModel"
314
+ ]
315
+ },
316
+ unique: {
317
+ description: "Whether this foreign key has a unique constraint.\n\nTrue: Creates a 1:1 relationship (e.g., user profile, order publish\ndetails) false: Allows 1:N relationship (e.g., customer to multiple\norders) Used for enforcing business rules about relationship\ncardinality.",
318
+ type: "boolean"
319
+ },
320
+ nullable: {
321
+ description: "Whether this foreign key can be null (optional relationship).\n\nTrue: Relationship is optional, foreign key can be null false:\nRelationship is required, foreign key cannot be null Reflects business\nrules about mandatory vs optional associations.",
322
+ type: "boolean"
323
+ }
324
+ },
325
+ required: [
326
+ "name",
327
+ "type",
328
+ "description",
329
+ "relation",
330
+ "unique",
331
+ "nullable"
332
+ ]
333
+ },
334
+ "AutoBePrisma.IPlainField": {
335
+ description: "Interface representing a regular data field that stores business\ninformation.\n\nThese fields contain the actual business data like names, amounts,\ntimestamps, flags, descriptions, and other domain-specific information.",
336
+ type: "object",
337
+ properties: {
338
+ name: {
339
+ description: "Name of the field in the database table.\n\nShould use snake_case convention. Common patterns from uploaded schemas:\n\n- Timestamps: created_at, updated_at, deleted_at, opened_at, closed_at\n- Identifiers: code, name, nickname, title\n- Business data: value, quantity, price, volume, balance\n- Flags: primary, required, exclusive, secret, multiplicative",
340
+ type: "string",
341
+ pattern: "^[a-z][a-z0-9_]*$"
342
+ },
343
+ type: {
344
+ description: "Data type of the field for Prisma schema generation.\n\nMaps to appropriate Prisma/PostgreSQL types:\n\n- Boolean: Boolean flags and yes/no values\n- Int: Integer numbers, quantities, sequences\n- Double: Decimal numbers, prices, monetary values, percentages\n- String: Text data, names, descriptions, codes\n- Uri: URL/URI fields for links and references\n- Uuid: UUID fields (for non-foreign-key UUIDs)\n- Date: Date-only values (rare, mostly for business dates)\n- Datetime: Timestamp fields with date and time",
345
+ oneOf: [
346
+ {
347
+ "const": "string"
348
+ },
349
+ {
350
+ "const": "boolean"
351
+ },
352
+ {
353
+ "const": "uuid"
354
+ },
355
+ {
356
+ "const": "uri"
357
+ },
358
+ {
359
+ "const": "int"
360
+ },
361
+ {
362
+ "const": "double"
363
+ },
364
+ {
365
+ "const": "datetime"
366
+ }
367
+ ]
368
+ },
369
+ description: {
370
+ description: "Description explaining the business purpose and usage of this field.\n\nShould clearly explain:\n\n- What business concept this field represents\n- Valid values or constraints if applicable\n- How it relates to business processes\n- Any special behavioral notes Example: \"Amount of cash payment.\" or\n \"Whether the unit is required or not.\"",
371
+ type: "string"
372
+ },
373
+ nullable: {
374
+ description: "Whether this field can contain null values.\n\nTrue: Field is optional and can be null (e.g., middle name, description)\nfalse: Field is required and cannot be null (e.g., creation timestamp,\nname) Reflects business rules about mandatory vs optional data.",
375
+ type: "boolean"
376
+ }
377
+ },
378
+ required: [
379
+ "name",
380
+ "type",
381
+ "description",
382
+ "nullable"
383
+ ]
384
+ },
385
+ "AutoBePrisma.IUniqueIndex": {
386
+ description: "Interface representing a unique index constraint on one or more fields.\n\nUnique indexes enforce data integrity by ensuring no duplicate values exist\nfor the specified field combination. Essential for business rules that\nrequire uniqueness like email addresses, codes, or composite keys.",
387
+ type: "object",
388
+ properties: {
389
+ fieldNames: {
390
+ description: "Array of field names that together form the unique constraint.\n\nCan be single field (e.g., [\"email\"]) or composite (e.g., [\"channel_id\",\n\"code\"]). All field names must exist in the model. Order matters for\ncomposite indexes. Examples: [\"code\"], [\"shopping_channel_id\",\n\"nickname\"], [\"email\"]",
391
+ type: "array",
392
+ items: {
393
+ type: "string"
394
+ },
395
+ minItems: 1,
396
+ uniqueItems: true
397
+ },
398
+ unique: {
399
+ description: "Explicit marker indicating this is a unique index.\n\nAlways true to distinguish from regular indexes. Used by code generator\nto emit \"@@unique\" directive in Prisma schema instead of \"@@index\".",
400
+ "const": true
401
+ }
402
+ },
403
+ required: [
404
+ "fieldNames",
405
+ "unique"
406
+ ]
407
+ },
408
+ "AutoBePrisma.IPlainIndex": {
409
+ description: "Interface representing a regular (non-unique) index for query performance.\n\nRegular indexes speed up database queries by creating optimized data\nstructures for common search patterns. Essential for foreign keys, date\nranges, and frequently filtered fields.",
410
+ type: "object",
411
+ properties: {
412
+ fieldNames: {
413
+ description: "Array of field names to include in the performance index.\n\nCan be single field (e.g., [\"created_at\"]) or composite (e.g.,\n[\"customer_id\", \"created_at\"]). All field names must exist in the model.\nOrder matters for composite indexes and should match common query\npatterns. Examples: [\"created_at\"], [\"shopping_customer_id\",\n\"created_at\"], [\"ip\"]",
414
+ type: "array",
415
+ items: {
416
+ type: "string"
417
+ },
418
+ minItems: 1,
419
+ uniqueItems: true
420
+ }
421
+ },
422
+ required: [
423
+ "fieldNames"
424
+ ]
425
+ },
426
+ "AutoBePrisma.IGinIndex": {
427
+ description: "Interface representing a GIN (Generalized Inverted Index) for full-text\nsearch.\n\nGIN indexes enable advanced PostgreSQL text search capabilities including\nfuzzy matching and partial text search using trigram operations. Essential\nfor user-facing search features on text content.",
428
+ type: "object",
429
+ properties: {
430
+ fieldName: {
431
+ description: "Name of the text field to index for full-text search capabilities.\n\nMust be a string field in the model that contains searchable text.\nExamples from uploaded schemas: \"nickname\", \"title\", \"body\", \"name\" Used\nwith PostgreSQL gin_trgm_ops for trigram-based fuzzy text search.",
432
+ type: "string"
433
+ }
434
+ },
435
+ required: [
436
+ "fieldName"
437
+ ]
428
438
  }
429
- },
430
- required: [
431
- "file"
432
- ],
433
- additionalProperties: false,
434
- $defs: {}
439
+ }
435
440
  },
436
441
  description: "Generates comprehensive Prisma schema files based on detailed requirements\nanalysis.\n\nCreates multiple organized schema files following enterprise patterns\nincluding proper domain separation, relationship modeling, snapshot\npatterns, inheritance, materialized views, and comprehensive documentation.\nThe generated schemas implement best practices for scalability,\nmaintainability, and data integrity.",
437
442
  validate: (() => { const _io0 = input => "object" === typeof input.file && null !== input.file && _io1(input.file); const _io1 = input => "string" === typeof input.filename && RegExp("^[a-zA-Z0-9._-]+\\.prisma$").test(input.filename) && "string" === typeof input.namespace && (Array.isArray(input.models) && input.models.every(elem => "object" === typeof elem && null !== elem && _io2(elem))); const _io2 = input => "string" === typeof input.name && RegExp("^[a-z][a-z0-9_]*$").test(input.name) && "string" === typeof input.description && "boolean" === typeof input.material && ("object" === typeof input.primaryField && null !== input.primaryField && _io3(input.primaryField)) && (Array.isArray(input.foreignFields) && input.foreignFields.every(elem => "object" === typeof elem && null !== elem && _io4(elem))) && (Array.isArray(input.plainFields) && input.plainFields.every(elem => "object" === typeof elem && null !== elem && _io6(elem))) && (Array.isArray(input.uniqueIndexes) && input.uniqueIndexes.every(elem => "object" === typeof elem && null !== elem && _io7(elem))) && (Array.isArray(input.plainIndexes) && input.plainIndexes.every(elem => "object" === typeof elem && null !== elem && _io8(elem))) && (Array.isArray(input.ginIndexes) && input.ginIndexes.every(elem => "object" === typeof elem && null !== elem && _io9(elem))); const _io3 = input => "string" === typeof input.name && RegExp("^[a-z][a-z0-9_]*$").test(input.name) && "uuid" === input.type && "string" === typeof input.description; const _io4 = input => "string" === typeof input.name && RegExp("^[a-z][a-z0-9_]*$").test(input.name) && "uuid" === input.type && "string" === typeof input.description && ("object" === typeof input.relation && null !== input.relation && _io5(input.relation)) && "boolean" === typeof input.unique && "boolean" === typeof input.nullable; const _io5 = input => "string" === typeof input.name && RegExp("^[a-zA-Z_][a-zA-Z0-9_]*$").test(input.name) && "string" === typeof input.targetModel; const _io6 = input => "string" === typeof input.name && RegExp("^[a-z][a-z0-9_]*$").test(input.name) && ("string" === input.type || "boolean" === input.type || "uuid" === input.type || "uri" === input.type || "int" === input.type || "double" === input.type || "datetime" === input.type) && "string" === typeof input.description && "boolean" === typeof input.nullable; const _io7 = input => Array.isArray(input.fieldNames) && (1 <= input.fieldNames.length && __typia_transform__isUniqueItems._isUniqueItems(input.fieldNames) && input.fieldNames.every(elem => "string" === typeof elem)) && true === input.unique; const _io8 = input => Array.isArray(input.fieldNames) && (1 <= input.fieldNames.length && __typia_transform__isUniqueItems._isUniqueItems(input.fieldNames) && input.fieldNames.every(elem => "string" === typeof elem)); const _io9 = input => "string" === typeof input.fieldName; const _vo0 = (input, _path, _exceptionable = true) => [("object" === typeof input.file && null !== input.file || _report(_exceptionable, {
@@ -745,270 +750,35 @@ const collection = {
745
750
  {
746
751
  name: "makePrismaSchemaFile",
747
752
  parameters: {
748
- description: " Properties containing the file\n\n------------------------------\n\nCurrent Type: {@link IMakePrismaSchemaFileProps}",
753
+ description: " Properties containing the file\n\n------------------------------\n\nCurrent Type: {@link IMakePrismaSchemaFileProps}\n\n### Description of {@link file} property:\n\n> Complete definition of a single Prisma schema file.\n> \n> Represents one business domain containing related models, organized for\n> modular schema management and following domain-driven design principles.",
749
754
  type: "object",
750
755
  properties: {
751
756
  file: {
752
- description: "Complete definition of a single Prisma schema file.\n\nRepresents one business domain containing related models, organized for\nmodular schema management and following domain-driven design principles.\n\n------------------------------\n\nDescription of the current {@link AutoBePrisma.IFile} type:\n\n> Interface representing a single Prisma schema file within the application.\n> \n> Each file focuses on a specific business domain and contains related\n> models. File organization follows domain-driven design principles as seen\n> in the uploaded schemas.",
757
+ $ref: "#/$defs/AutoBePrisma.IFile"
758
+ }
759
+ },
760
+ required: [
761
+ "file"
762
+ ],
763
+ additionalProperties: false,
764
+ $defs: {
765
+ "AutoBePrisma.IFile": {
766
+ description: "Interface representing a single Prisma schema file within the application.\n\nEach file focuses on a specific business domain and contains related\nmodels. File organization follows domain-driven design principles as seen\nin the uploaded schemas.",
753
767
  type: "object",
754
768
  properties: {
755
769
  filename: {
756
- title: "Name of the schema file to be generated",
757
770
  description: "Name of the schema file to be generated.\n\nShould follow the naming convention: \"schema-{number}-{domain}.prisma\"\nExamples: \"schema-02-systematic.prisma\", \"schema-03-actors.prisma\" The\nnumber indicates the dependency order for schema generation.\n\n\n@pattern ^[a-zA-Z0-9._-]+\\.prisma$",
758
771
  type: "string"
759
772
  },
760
773
  namespace: {
761
- title: "Business domain namespace that groups related models",
762
774
  description: "Business domain namespace that groups related models.\n\nUsed in Prisma documentation comments as \"@\\namespace directive\".\nExamples from uploaded schemas: \"Systematic\", \"Actors\", \"Sales\", \"Carts\",\n\"Orders\", \"Coupons\", \"Coins\", \"Inquiries\", \"Favorites\", \"Articles\"",
763
775
  type: "string"
764
776
  },
765
777
  models: {
766
- title: "Array of Prisma models (database tables) within this domain",
767
778
  description: "Array of Prisma models (database tables) within this domain.\n\nEach model represents a business entity or concept within the namespace.\nModels can reference each other through foreign key relationships.",
768
779
  type: "array",
769
780
  items: {
770
- description: "Description of the current {@link AutoBePrisma.IModel} type:\n\n> Interface representing a single Prisma model (database table).\n> \n> Based on the uploaded schemas, models follow specific patterns:\n> \n> - Main business entities (e.g., shopping_sales, shopping_customers)\n> - Snapshot/versioning entities for audit trails (e.g.,\n> shopping_sale_snapshots)\n> - Junction tables for M:N relationships (e.g.,\n> shopping_cart_commodity_stocks)\n> - Materialized views for performance (prefixed with mv_)",
771
- type: "object",
772
- properties: {
773
- name: {
774
- title: "Name of the Prisma model (database table name)",
775
- description: "Name of the Prisma model (database table name).\n\nShould follow snake_case convention with domain prefix. Examples:\n\"shopping_customers\", \"shopping_sale_snapshots\", \"bbs_articles\"\nMaterialized views use \"mv_\" prefix: \"mv_shopping_sale_last_snapshots\"\n\n\n@pattern ^[a-z][a-z0-9_]*$",
776
- type: "string"
777
- },
778
- description: {
779
- description: "Detailed description explaining the business purpose and usage of the\nmodel.\n\nShould include:\n\n- Business context and purpose\n- Key relationships with other models\n- Important behavioral notes or constraints\n- References to related entities using \"{@\\link ModelName}\" syntax Example:\n \"Customer information, but not a person but a **connection** basis...\"",
780
- type: "string"
781
- },
782
- material: {
783
- description: "Indicates whether this model represents a materialized view for\nperformance optimization.\n\nMaterialized views are read-only computed tables that cache complex query\nresults. They're marked as \"@\\hidden\" in documentation and prefixed with\n\"mv_\" in naming. Examples: mv_shopping_sale_last_snapshots,\nmv_shopping_cart_commodity_prices",
784
- type: "boolean"
785
- },
786
- primaryField: {
787
- description: "The primary key field of the model.\n\nIn all uploaded schemas, primary keys are always UUID type with \"@\\id\"\ndirective. Usually named \"id\" and marked with \"@\\db.Uuid\" for PostgreSQL\nmapping.\n\n------------------------------\n\nDescription of the current {@link AutoBePrisma.IPrimaryField} type:\n\n> Interface representing the primary key field of a Prisma model.\n> \n> All models in the uploaded schemas use UUID as primary key for better\n> distributed system compatibility and security (no sequential ID exposure).",
788
- type: "object",
789
- properties: {
790
- name: {
791
- title: "Name of the primary key field",
792
- description: "Name of the primary key field.\n\nConsistently named \"id\" across all models in the uploaded schemas.\nRepresents the unique identifier for each record in the table.\n\n\n@pattern ^[a-z][a-z0-9_]*$",
793
- type: "string"
794
- },
795
- type: {
796
- title: "Data type of the primary key field",
797
- description: "Data type of the primary key field.\n\nAlways \"uuid\" in the uploaded schemas for better distributed system\nsupport and to avoid exposing sequential IDs that could reveal business\ninformation.",
798
- type: "string",
799
- "enum": [
800
- "uuid"
801
- ]
802
- },
803
- description: {
804
- title: "Description of the primary key field's purpose",
805
- description: "Description of the primary key field's purpose.\n\nStandard description is \"Primary Key.\" across all models. Serves as the\nunique identifier for the model instance.",
806
- type: "string"
807
- }
808
- },
809
- required: [
810
- "name",
811
- "type",
812
- "description"
813
- ]
814
- },
815
- foreignFields: {
816
- title: "Array of foreign key fields that reference other models",
817
- description: "Array of foreign key fields that reference other models.\n\nThese establish relationships between models and include Prisma relation\ndirectives. Can be nullable (optional relationships) or required\n(mandatory relationships). May have unique constraints for 1:1\nrelationships.",
818
- type: "array",
819
- items: {
820
- description: "Description of the current {@link AutoBePrisma.IForeignField} type:\n\n> Interface representing a foreign key field that establishes relationships\n> between models.\n> \n> Foreign keys create associations between models, enabling relational data\n> modeling. They can represent 1:1, 1:N, or participate in M:N relationships\n> through junction tables.",
821
- type: "object",
822
- properties: {
823
- name: {
824
- title: "Name of the foreign key field",
825
- description: "Name of the foreign key field.\n\nFollows convention: \"{target_model_name_without_prefix}_id\" Examples:\n\"shopping_customer_id\", \"bbs_article_id\", \"attachment_file_id\" For\nself-references: \"parent_id\" (e.g., in hierarchical structures)\n\n\n@pattern ^[a-z][a-z0-9_]*$",
826
- type: "string"
827
- },
828
- type: {
829
- title: "Data type of the foreign key field",
830
- description: "Data type of the foreign key field.\n\nAlways \"uuid\" to match the primary key type of referenced models. Ensures\nreferential integrity and consistency across the schema.",
831
- type: "string",
832
- "enum": [
833
- "uuid"
834
- ]
835
- },
836
- description: {
837
- description: "Description explaining the purpose and target of this foreign key\nrelationship.\n\nShould reference the target model using format: \"Target model's {@\\link\nModelName.id}\" Examples: \"Belonged customer's {@\\link\nshopping_customers.id}\" May include additional context about the\nrelationship's business meaning.",
838
- type: "string"
839
- },
840
- relation: {
841
- title: "Prisma relation configuration defining the association details",
842
- description: "Prisma relation configuration defining the association details.\n\nSpecifies how this foreign key connects to the target model, including\nrelation name, target model, and target field.",
843
- type: "object",
844
- properties: {
845
- name: {
846
- title: "Name of the relation property in the Prisma model",
847
- description: "Name of the relation property in the Prisma model.\n\nUsed to access the related model instance. Usually a descriptive name\nof the relationship. Examples: \"customer\", \"channel\", \"parent\",\n\"snapshot\"\n\n\n@pattern ^[a-zA-Z_][a-zA-Z0-9_]*$",
848
- type: "string"
849
- },
850
- targetModel: {
851
- title: "Name of the target model being referenced",
852
- description: "Name of the target model being referenced.\n\nMust match exactly with an existing model name in the schema. Examples:\n\"shopping_customers\", \"shopping_channels\", \"bbs_articles\"",
853
- type: "string"
854
- }
855
- },
856
- required: [
857
- "name",
858
- "targetModel"
859
- ]
860
- },
861
- unique: {
862
- title: "Whether this foreign key has a unique constraint",
863
- description: "Whether this foreign key has a unique constraint.\n\nTrue: Creates a 1:1 relationship (e.g., user profile, order publish\ndetails) false: Allows 1:N relationship (e.g., customer to multiple\norders) Used for enforcing business rules about relationship\ncardinality.",
864
- type: "boolean"
865
- },
866
- nullable: {
867
- title: "Whether this foreign key can be null (optional relationship)",
868
- description: "Whether this foreign key can be null (optional relationship).\n\nTrue: Relationship is optional, foreign key can be null false:\nRelationship is required, foreign key cannot be null Reflects business\nrules about mandatory vs optional associations.",
869
- type: "boolean"
870
- }
871
- },
872
- required: [
873
- "name",
874
- "type",
875
- "description",
876
- "relation",
877
- "unique",
878
- "nullable"
879
- ]
880
- }
881
- },
882
- plainFields: {
883
- title: "Array of regular data fields that don't reference other models",
884
- description: "Array of regular data fields that don't reference other models.\n\nInclude business data like names, descriptions, timestamps, flags,\namounts, etc. Common patterns: created_at, updated_at, deleted_at for\nsoft deletion and auditing.",
885
- type: "array",
886
- items: {
887
- description: "Description of the current {@link AutoBePrisma.IPlainField} type:\n\n> Interface representing a regular data field that stores business\n> information.\n> \n> These fields contain the actual business data like names, amounts,\n> timestamps, flags, descriptions, and other domain-specific information.",
888
- type: "object",
889
- properties: {
890
- name: {
891
- title: "Name of the field in the database table",
892
- description: "Name of the field in the database table.\n\nShould use snake_case convention. Common patterns from uploaded schemas:\n\n- Timestamps: created_at, updated_at, deleted_at, opened_at, closed_at\n- Identifiers: code, name, nickname, title\n- Business data: value, quantity, price, volume, balance\n- Flags: primary, required, exclusive, secret, multiplicative\n\n\n@pattern ^[a-z][a-z0-9_]*$",
893
- type: "string"
894
- },
895
- type: {
896
- title: "Data type of the field for Prisma schema generation",
897
- description: "Data type of the field for Prisma schema generation.\n\nMaps to appropriate Prisma/PostgreSQL types:\n\n- Boolean: Boolean flags and yes/no values\n- Int: Integer numbers, quantities, sequences\n- Double: Decimal numbers, prices, monetary values, percentages\n- String: Text data, names, descriptions, codes\n- Uri: URL/URI fields for links and references\n- Uuid: UUID fields (for non-foreign-key UUIDs)\n- Date: Date-only values (rare, mostly for business dates)\n- Datetime: Timestamp fields with date and time",
898
- type: "string",
899
- "enum": [
900
- "string",
901
- "boolean",
902
- "uuid",
903
- "uri",
904
- "int",
905
- "double",
906
- "datetime"
907
- ]
908
- },
909
- description: {
910
- title: "Description explaining the business purpose and usage of this field",
911
- description: "Description explaining the business purpose and usage of this field.\n\nShould clearly explain:\n\n- What business concept this field represents\n- Valid values or constraints if applicable\n- How it relates to business processes\n- Any special behavioral notes Example: \"Amount of cash payment.\" or\n \"Whether the unit is required or not.\"",
912
- type: "string"
913
- },
914
- nullable: {
915
- title: "Whether this field can contain null values",
916
- description: "Whether this field can contain null values.\n\nTrue: Field is optional and can be null (e.g., middle name, description)\nfalse: Field is required and cannot be null (e.g., creation timestamp,\nname) Reflects business rules about mandatory vs optional data.",
917
- type: "boolean"
918
- }
919
- },
920
- required: [
921
- "name",
922
- "type",
923
- "description",
924
- "nullable"
925
- ]
926
- }
927
- },
928
- uniqueIndexes: {
929
- title: "Array of unique indexes for enforcing data integrity constraints",
930
- description: "Array of unique indexes for enforcing data integrity constraints.\n\nEnsure uniqueness across single or multiple columns. Examples: unique\nemail addresses, unique codes within a channel, unique combinations like\n(channel_id, nickname).",
931
- type: "array",
932
- items: {
933
- description: "Description of the current {@link AutoBePrisma.IUniqueIndex} type:\n\n> Interface representing a unique index constraint on one or more fields.\n> \n> Unique indexes enforce data integrity by ensuring no duplicate values exist\n> for the specified field combination. Essential for business rules that\n> require uniqueness like email addresses, codes, or composite keys.",
934
- type: "object",
935
- properties: {
936
- fieldNames: {
937
- title: "Array of field names that together form the unique constraint",
938
- description: "Array of field names that together form the unique constraint.\n\nCan be single field (e.g., [\"email\"]) or composite (e.g., [\"channel_id\",\n\"code\"]). All field names must exist in the model. Order matters for\ncomposite indexes. Examples: [\"code\"], [\"shopping_channel_id\",\n\"nickname\"], [\"email\"]\n\n\n@minItems 1\n@uniqueItems",
939
- type: "array",
940
- items: {
941
- type: "string"
942
- }
943
- },
944
- unique: {
945
- title: "Explicit marker indicating this is a unique index",
946
- description: "Explicit marker indicating this is a unique index.\n\nAlways true to distinguish from regular indexes. Used by code generator\nto emit \"@@unique\" directive in Prisma schema instead of \"@@index\".",
947
- type: "boolean",
948
- "enum": [
949
- true
950
- ]
951
- }
952
- },
953
- required: [
954
- "fieldNames",
955
- "unique"
956
- ]
957
- }
958
- },
959
- plainIndexes: {
960
- title: "Array of regular indexes for query performance optimization",
961
- description: "Array of regular indexes for query performance optimization.\n\nSpeed up common query patterns like filtering by foreign keys, date\nranges, or frequently searched fields. Examples: indexes on created_at,\nforeign key fields, search fields.",
962
- type: "array",
963
- items: {
964
- description: "Description of the current {@link AutoBePrisma.IPlainIndex} type:\n\n> Interface representing a regular (non-unique) index for query performance.\n> \n> Regular indexes speed up database queries by creating optimized data\n> structures for common search patterns. Essential for foreign keys, date\n> ranges, and frequently filtered fields.",
965
- type: "object",
966
- properties: {
967
- fieldNames: {
968
- title: "Array of field names to include in the performance index",
969
- description: "Array of field names to include in the performance index.\n\nCan be single field (e.g., [\"created_at\"]) or composite (e.g.,\n[\"customer_id\", \"created_at\"]). All field names must exist in the model.\nOrder matters for composite indexes and should match common query\npatterns. Examples: [\"created_at\"], [\"shopping_customer_id\",\n\"created_at\"], [\"ip\"]\n\n\n@minItems 1\n@uniqueItems",
970
- type: "array",
971
- items: {
972
- type: "string"
973
- }
974
- }
975
- },
976
- required: [
977
- "fieldNames"
978
- ]
979
- }
980
- },
981
- ginIndexes: {
982
- title: "Array of GIN (Generalized Inverted Index) indexes for full-text search",
983
- description: "Array of GIN (Generalized Inverted Index) indexes for full-text search.\n\nUsed specifically for PostgreSQL text search capabilities using trigram\noperations. Applied to text fields that need fuzzy matching or partial\ntext search. Examples: searching names, nicknames, titles, content\nbodies.",
984
- type: "array",
985
- items: {
986
- description: "Description of the current {@link AutoBePrisma.IGinIndex} type:\n\n> Interface representing a GIN (Generalized Inverted Index) for full-text\n> search.\n> \n> GIN indexes enable advanced PostgreSQL text search capabilities including\n> fuzzy matching and partial text search using trigram operations. Essential\n> for user-facing search features on text content.",
987
- type: "object",
988
- properties: {
989
- fieldName: {
990
- title: "Name of the text field to index for full-text search capabilities",
991
- description: "Name of the text field to index for full-text search capabilities.\n\nMust be a string field in the model that contains searchable text.\nExamples from uploaded schemas: \"nickname\", \"title\", \"body\", \"name\" Used\nwith PostgreSQL gin_trgm_ops for trigram-based fuzzy text search.",
992
- type: "string"
993
- }
994
- },
995
- required: [
996
- "fieldName"
997
- ]
998
- }
999
- }
1000
- },
1001
- required: [
1002
- "name",
1003
- "description",
1004
- "material",
1005
- "primaryField",
1006
- "foreignFields",
1007
- "plainFields",
1008
- "uniqueIndexes",
1009
- "plainIndexes",
1010
- "ginIndexes"
1011
- ]
781
+ $ref: "#/$defs/AutoBePrisma.IModel"
1012
782
  }
1013
783
  }
1014
784
  },
@@ -1017,626 +787,246 @@ const collection = {
1017
787
  "namespace",
1018
788
  "models"
1019
789
  ]
1020
- }
1021
- },
1022
- required: [
1023
- "file"
1024
- ],
1025
- additionalProperties: false,
1026
- $defs: {}
1027
- },
1028
- description: "Generates comprehensive Prisma schema files based on detailed requirements\nanalysis.\n\nCreates multiple organized schema files following enterprise patterns\nincluding proper domain separation, relationship modeling, snapshot\npatterns, inheritance, materialized views, and comprehensive documentation.\nThe generated schemas implement best practices for scalability,\nmaintainability, and data integrity.",
1029
- validate: (() => { const _io0 = input => "object" === typeof input.file && null !== input.file && _io1(input.file); const _io1 = input => "string" === typeof input.filename && RegExp("^[a-zA-Z0-9._-]+\\.prisma$").test(input.filename) && "string" === typeof input.namespace && (Array.isArray(input.models) && input.models.every(elem => "object" === typeof elem && null !== elem && _io2(elem))); const _io2 = input => "string" === typeof input.name && RegExp("^[a-z][a-z0-9_]*$").test(input.name) && "string" === typeof input.description && "boolean" === typeof input.material && ("object" === typeof input.primaryField && null !== input.primaryField && _io3(input.primaryField)) && (Array.isArray(input.foreignFields) && input.foreignFields.every(elem => "object" === typeof elem && null !== elem && _io4(elem))) && (Array.isArray(input.plainFields) && input.plainFields.every(elem => "object" === typeof elem && null !== elem && _io6(elem))) && (Array.isArray(input.uniqueIndexes) && input.uniqueIndexes.every(elem => "object" === typeof elem && null !== elem && _io7(elem))) && (Array.isArray(input.plainIndexes) && input.plainIndexes.every(elem => "object" === typeof elem && null !== elem && _io8(elem))) && (Array.isArray(input.ginIndexes) && input.ginIndexes.every(elem => "object" === typeof elem && null !== elem && _io9(elem))); const _io3 = input => "string" === typeof input.name && RegExp("^[a-z][a-z0-9_]*$").test(input.name) && "uuid" === input.type && "string" === typeof input.description; const _io4 = input => "string" === typeof input.name && RegExp("^[a-z][a-z0-9_]*$").test(input.name) && "uuid" === input.type && "string" === typeof input.description && ("object" === typeof input.relation && null !== input.relation && _io5(input.relation)) && "boolean" === typeof input.unique && "boolean" === typeof input.nullable; const _io5 = input => "string" === typeof input.name && RegExp("^[a-zA-Z_][a-zA-Z0-9_]*$").test(input.name) && "string" === typeof input.targetModel; const _io6 = input => "string" === typeof input.name && RegExp("^[a-z][a-z0-9_]*$").test(input.name) && ("string" === input.type || "boolean" === input.type || "uuid" === input.type || "uri" === input.type || "int" === input.type || "double" === input.type || "datetime" === input.type) && "string" === typeof input.description && "boolean" === typeof input.nullable; const _io7 = input => Array.isArray(input.fieldNames) && (1 <= input.fieldNames.length && __typia_transform__isUniqueItems._isUniqueItems(input.fieldNames) && input.fieldNames.every(elem => "string" === typeof elem)) && true === input.unique; const _io8 = input => Array.isArray(input.fieldNames) && (1 <= input.fieldNames.length && __typia_transform__isUniqueItems._isUniqueItems(input.fieldNames) && input.fieldNames.every(elem => "string" === typeof elem)); const _io9 = input => "string" === typeof input.fieldName; const _vo0 = (input, _path, _exceptionable = true) => [("object" === typeof input.file && null !== input.file || _report(_exceptionable, {
1030
- path: _path + ".file",
1031
- expected: "AutoBePrisma.IFile",
1032
- value: input.file
1033
- })) && _vo1(input.file, _path + ".file", true && _exceptionable) || _report(_exceptionable, {
1034
- path: _path + ".file",
1035
- expected: "AutoBePrisma.IFile",
1036
- value: input.file
1037
- })].every(flag => flag); const _vo1 = (input, _path, _exceptionable = true) => ["string" === typeof input.filename && (RegExp("^[a-zA-Z0-9._-]+\\.prisma$").test(input.filename) || _report(_exceptionable, {
1038
- path: _path + ".filename",
1039
- expected: "string & Pattern<\"^[a-zA-Z0-9._-]+\\\\.prisma$\">",
1040
- value: input.filename
1041
- })) || _report(_exceptionable, {
1042
- path: _path + ".filename",
1043
- expected: "(string & Pattern<\"^[a-zA-Z0-9._-]+\\\\.prisma$\">)",
1044
- value: input.filename
1045
- }), "string" === typeof input.namespace || _report(_exceptionable, {
1046
- path: _path + ".namespace",
1047
- expected: "string",
1048
- value: input.namespace
1049
- }), (Array.isArray(input.models) || _report(_exceptionable, {
1050
- path: _path + ".models",
1051
- expected: "Array<AutoBePrisma.IModel>",
1052
- value: input.models
1053
- })) && input.models.map((elem, _index9) => ("object" === typeof elem && null !== elem || _report(_exceptionable, {
1054
- path: _path + ".models[" + _index9 + "]",
1055
- expected: "AutoBePrisma.IModel",
1056
- value: elem
1057
- })) && _vo2(elem, _path + ".models[" + _index9 + "]", true && _exceptionable) || _report(_exceptionable, {
1058
- path: _path + ".models[" + _index9 + "]",
1059
- expected: "AutoBePrisma.IModel",
1060
- value: elem
1061
- })).every(flag => flag) || _report(_exceptionable, {
1062
- path: _path + ".models",
1063
- expected: "Array<AutoBePrisma.IModel>",
1064
- value: input.models
1065
- })].every(flag => flag); const _vo2 = (input, _path, _exceptionable = true) => ["string" === typeof input.name && (RegExp("^[a-z][a-z0-9_]*$").test(input.name) || _report(_exceptionable, {
1066
- path: _path + ".name",
1067
- expected: "string & Pattern<\"^[a-z][a-z0-9_]*$\">",
1068
- value: input.name
1069
- })) || _report(_exceptionable, {
1070
- path: _path + ".name",
1071
- expected: "(string & Pattern<\"^[a-z][a-z0-9_]*$\">)",
1072
- value: input.name
1073
- }), "string" === typeof input.description || _report(_exceptionable, {
1074
- path: _path + ".description",
1075
- expected: "string",
1076
- value: input.description
1077
- }), "boolean" === typeof input.material || _report(_exceptionable, {
1078
- path: _path + ".material",
1079
- expected: "boolean",
1080
- value: input.material
1081
- }), ("object" === typeof input.primaryField && null !== input.primaryField || _report(_exceptionable, {
1082
- path: _path + ".primaryField",
1083
- expected: "AutoBePrisma.IPrimaryField",
1084
- value: input.primaryField
1085
- })) && _vo3(input.primaryField, _path + ".primaryField", true && _exceptionable) || _report(_exceptionable, {
1086
- path: _path + ".primaryField",
1087
- expected: "AutoBePrisma.IPrimaryField",
1088
- value: input.primaryField
1089
- }), (Array.isArray(input.foreignFields) || _report(_exceptionable, {
1090
- path: _path + ".foreignFields",
1091
- expected: "Array<AutoBePrisma.IForeignField>",
1092
- value: input.foreignFields
1093
- })) && input.foreignFields.map((elem, _index10) => ("object" === typeof elem && null !== elem || _report(_exceptionable, {
1094
- path: _path + ".foreignFields[" + _index10 + "]",
1095
- expected: "AutoBePrisma.IForeignField",
1096
- value: elem
1097
- })) && _vo4(elem, _path + ".foreignFields[" + _index10 + "]", true && _exceptionable) || _report(_exceptionable, {
1098
- path: _path + ".foreignFields[" + _index10 + "]",
1099
- expected: "AutoBePrisma.IForeignField",
1100
- value: elem
1101
- })).every(flag => flag) || _report(_exceptionable, {
1102
- path: _path + ".foreignFields",
1103
- expected: "Array<AutoBePrisma.IForeignField>",
1104
- value: input.foreignFields
1105
- }), (Array.isArray(input.plainFields) || _report(_exceptionable, {
1106
- path: _path + ".plainFields",
1107
- expected: "Array<AutoBePrisma.IPlainField>",
1108
- value: input.plainFields
1109
- })) && input.plainFields.map((elem, _index11) => ("object" === typeof elem && null !== elem || _report(_exceptionable, {
1110
- path: _path + ".plainFields[" + _index11 + "]",
1111
- expected: "AutoBePrisma.IPlainField",
1112
- value: elem
1113
- })) && _vo6(elem, _path + ".plainFields[" + _index11 + "]", true && _exceptionable) || _report(_exceptionable, {
1114
- path: _path + ".plainFields[" + _index11 + "]",
1115
- expected: "AutoBePrisma.IPlainField",
1116
- value: elem
1117
- })).every(flag => flag) || _report(_exceptionable, {
1118
- path: _path + ".plainFields",
1119
- expected: "Array<AutoBePrisma.IPlainField>",
1120
- value: input.plainFields
1121
- }), (Array.isArray(input.uniqueIndexes) || _report(_exceptionable, {
1122
- path: _path + ".uniqueIndexes",
1123
- expected: "Array<AutoBePrisma.IUniqueIndex>",
1124
- value: input.uniqueIndexes
1125
- })) && input.uniqueIndexes.map((elem, _index12) => ("object" === typeof elem && null !== elem || _report(_exceptionable, {
1126
- path: _path + ".uniqueIndexes[" + _index12 + "]",
1127
- expected: "AutoBePrisma.IUniqueIndex",
1128
- value: elem
1129
- })) && _vo7(elem, _path + ".uniqueIndexes[" + _index12 + "]", true && _exceptionable) || _report(_exceptionable, {
1130
- path: _path + ".uniqueIndexes[" + _index12 + "]",
1131
- expected: "AutoBePrisma.IUniqueIndex",
1132
- value: elem
1133
- })).every(flag => flag) || _report(_exceptionable, {
1134
- path: _path + ".uniqueIndexes",
1135
- expected: "Array<AutoBePrisma.IUniqueIndex>",
1136
- value: input.uniqueIndexes
1137
- }), (Array.isArray(input.plainIndexes) || _report(_exceptionable, {
1138
- path: _path + ".plainIndexes",
1139
- expected: "Array<AutoBePrisma.IPlainIndex>",
1140
- value: input.plainIndexes
1141
- })) && input.plainIndexes.map((elem, _index13) => ("object" === typeof elem && null !== elem || _report(_exceptionable, {
1142
- path: _path + ".plainIndexes[" + _index13 + "]",
1143
- expected: "AutoBePrisma.IPlainIndex",
1144
- value: elem
1145
- })) && _vo8(elem, _path + ".plainIndexes[" + _index13 + "]", true && _exceptionable) || _report(_exceptionable, {
1146
- path: _path + ".plainIndexes[" + _index13 + "]",
1147
- expected: "AutoBePrisma.IPlainIndex",
1148
- value: elem
1149
- })).every(flag => flag) || _report(_exceptionable, {
1150
- path: _path + ".plainIndexes",
1151
- expected: "Array<AutoBePrisma.IPlainIndex>",
1152
- value: input.plainIndexes
1153
- }), (Array.isArray(input.ginIndexes) || _report(_exceptionable, {
1154
- path: _path + ".ginIndexes",
1155
- expected: "Array<AutoBePrisma.IGinIndex>",
1156
- value: input.ginIndexes
1157
- })) && input.ginIndexes.map((elem, _index14) => ("object" === typeof elem && null !== elem || _report(_exceptionable, {
1158
- path: _path + ".ginIndexes[" + _index14 + "]",
1159
- expected: "AutoBePrisma.IGinIndex",
1160
- value: elem
1161
- })) && _vo9(elem, _path + ".ginIndexes[" + _index14 + "]", true && _exceptionable) || _report(_exceptionable, {
1162
- path: _path + ".ginIndexes[" + _index14 + "]",
1163
- expected: "AutoBePrisma.IGinIndex",
1164
- value: elem
1165
- })).every(flag => flag) || _report(_exceptionable, {
1166
- path: _path + ".ginIndexes",
1167
- expected: "Array<AutoBePrisma.IGinIndex>",
1168
- value: input.ginIndexes
1169
- })].every(flag => flag); const _vo3 = (input, _path, _exceptionable = true) => ["string" === typeof input.name && (RegExp("^[a-z][a-z0-9_]*$").test(input.name) || _report(_exceptionable, {
1170
- path: _path + ".name",
1171
- expected: "string & Pattern<\"^[a-z][a-z0-9_]*$\">",
1172
- value: input.name
1173
- })) || _report(_exceptionable, {
1174
- path: _path + ".name",
1175
- expected: "(string & Pattern<\"^[a-z][a-z0-9_]*$\">)",
1176
- value: input.name
1177
- }), "uuid" === input.type || _report(_exceptionable, {
1178
- path: _path + ".type",
1179
- expected: "\"uuid\"",
1180
- value: input.type
1181
- }), "string" === typeof input.description || _report(_exceptionable, {
1182
- path: _path + ".description",
1183
- expected: "string",
1184
- value: input.description
1185
- })].every(flag => flag); const _vo4 = (input, _path, _exceptionable = true) => ["string" === typeof input.name && (RegExp("^[a-z][a-z0-9_]*$").test(input.name) || _report(_exceptionable, {
1186
- path: _path + ".name",
1187
- expected: "string & Pattern<\"^[a-z][a-z0-9_]*$\">",
1188
- value: input.name
1189
- })) || _report(_exceptionable, {
1190
- path: _path + ".name",
1191
- expected: "(string & Pattern<\"^[a-z][a-z0-9_]*$\">)",
1192
- value: input.name
1193
- }), "uuid" === input.type || _report(_exceptionable, {
1194
- path: _path + ".type",
1195
- expected: "\"uuid\"",
1196
- value: input.type
1197
- }), "string" === typeof input.description || _report(_exceptionable, {
1198
- path: _path + ".description",
1199
- expected: "string",
1200
- value: input.description
1201
- }), ("object" === typeof input.relation && null !== input.relation || _report(_exceptionable, {
1202
- path: _path + ".relation",
1203
- expected: "__type",
1204
- value: input.relation
1205
- })) && _vo5(input.relation, _path + ".relation", true && _exceptionable) || _report(_exceptionable, {
1206
- path: _path + ".relation",
1207
- expected: "__type",
1208
- value: input.relation
1209
- }), "boolean" === typeof input.unique || _report(_exceptionable, {
1210
- path: _path + ".unique",
1211
- expected: "boolean",
1212
- value: input.unique
1213
- }), "boolean" === typeof input.nullable || _report(_exceptionable, {
1214
- path: _path + ".nullable",
1215
- expected: "boolean",
1216
- value: input.nullable
1217
- })].every(flag => flag); const _vo5 = (input, _path, _exceptionable = true) => ["string" === typeof input.name && (RegExp("^[a-zA-Z_][a-zA-Z0-9_]*$").test(input.name) || _report(_exceptionable, {
1218
- path: _path + ".name",
1219
- expected: "string & Pattern<\"^[a-zA-Z_][a-zA-Z0-9_]*$\">",
1220
- value: input.name
1221
- })) || _report(_exceptionable, {
1222
- path: _path + ".name",
1223
- expected: "(string & Pattern<\"^[a-zA-Z_][a-zA-Z0-9_]*$\">)",
1224
- value: input.name
1225
- }), "string" === typeof input.targetModel || _report(_exceptionable, {
1226
- path: _path + ".targetModel",
1227
- expected: "string",
1228
- value: input.targetModel
1229
- })].every(flag => flag); const _vo6 = (input, _path, _exceptionable = true) => ["string" === typeof input.name && (RegExp("^[a-z][a-z0-9_]*$").test(input.name) || _report(_exceptionable, {
1230
- path: _path + ".name",
1231
- expected: "string & Pattern<\"^[a-z][a-z0-9_]*$\">",
1232
- value: input.name
1233
- })) || _report(_exceptionable, {
1234
- path: _path + ".name",
1235
- expected: "(string & Pattern<\"^[a-z][a-z0-9_]*$\">)",
1236
- value: input.name
1237
- }), "string" === input.type || "boolean" === input.type || "uuid" === input.type || "uri" === input.type || "int" === input.type || "double" === input.type || "datetime" === input.type || _report(_exceptionable, {
1238
- path: _path + ".type",
1239
- expected: "(\"boolean\" | \"datetime\" | \"double\" | \"int\" | \"string\" | \"uri\" | \"uuid\")",
1240
- value: input.type
1241
- }), "string" === typeof input.description || _report(_exceptionable, {
1242
- path: _path + ".description",
1243
- expected: "string",
1244
- value: input.description
1245
- }), "boolean" === typeof input.nullable || _report(_exceptionable, {
1246
- path: _path + ".nullable",
1247
- expected: "boolean",
1248
- value: input.nullable
1249
- })].every(flag => flag); const _vo7 = (input, _path, _exceptionable = true) => [(Array.isArray(input.fieldNames) || _report(_exceptionable, {
1250
- path: _path + ".fieldNames",
1251
- expected: "(Array<string> & MinItems<1> & UniqueItems<true>)",
1252
- value: input.fieldNames
1253
- })) && ((1 <= input.fieldNames.length || _report(_exceptionable, {
1254
- path: _path + ".fieldNames",
1255
- expected: "Array<> & MinItems<1>",
1256
- value: input.fieldNames
1257
- })) && (__typia_transform__isUniqueItems._isUniqueItems(input.fieldNames) || _report(_exceptionable, {
1258
- path: _path + ".fieldNames",
1259
- expected: "Array<> & UniqueItems<true>",
1260
- value: input.fieldNames
1261
- })) && input.fieldNames.map((elem, _index15) => "string" === typeof elem || _report(_exceptionable, {
1262
- path: _path + ".fieldNames[" + _index15 + "]",
1263
- expected: "string",
1264
- value: elem
1265
- })).every(flag => flag)) || _report(_exceptionable, {
1266
- path: _path + ".fieldNames",
1267
- expected: "(Array<string> & MinItems<1> & UniqueItems<true>)",
1268
- value: input.fieldNames
1269
- }), true === input.unique || _report(_exceptionable, {
1270
- path: _path + ".unique",
1271
- expected: "true",
1272
- value: input.unique
1273
- })].every(flag => flag); const _vo8 = (input, _path, _exceptionable = true) => [(Array.isArray(input.fieldNames) || _report(_exceptionable, {
1274
- path: _path + ".fieldNames",
1275
- expected: "(Array<string> & MinItems<1> & UniqueItems<true>)",
1276
- value: input.fieldNames
1277
- })) && ((1 <= input.fieldNames.length || _report(_exceptionable, {
1278
- path: _path + ".fieldNames",
1279
- expected: "Array<> & MinItems<1>",
1280
- value: input.fieldNames
1281
- })) && (__typia_transform__isUniqueItems._isUniqueItems(input.fieldNames) || _report(_exceptionable, {
1282
- path: _path + ".fieldNames",
1283
- expected: "Array<> & UniqueItems<true>",
1284
- value: input.fieldNames
1285
- })) && input.fieldNames.map((elem, _index16) => "string" === typeof elem || _report(_exceptionable, {
1286
- path: _path + ".fieldNames[" + _index16 + "]",
1287
- expected: "string",
1288
- value: elem
1289
- })).every(flag => flag)) || _report(_exceptionable, {
1290
- path: _path + ".fieldNames",
1291
- expected: "(Array<string> & MinItems<1> & UniqueItems<true>)",
1292
- value: input.fieldNames
1293
- })].every(flag => flag); const _vo9 = (input, _path, _exceptionable = true) => ["string" === typeof input.fieldName || _report(_exceptionable, {
1294
- path: _path + ".fieldName",
1295
- expected: "string",
1296
- value: input.fieldName
1297
- })].every(flag => flag); const __is = input => "object" === typeof input && null !== input && _io0(input); let errors; let _report; return input => {
1298
- if (false === __is(input)) {
1299
- errors = [];
1300
- _report = __typia_transform__validateReport._validateReport(errors);
1301
- ((input, _path, _exceptionable = true) => ("object" === typeof input && null !== input || _report(true, {
1302
- path: _path + "",
1303
- expected: "IMakePrismaSchemaFileProps",
1304
- value: input
1305
- })) && _vo0(input, _path + "", true) || _report(true, {
1306
- path: _path + "",
1307
- expected: "IMakePrismaSchemaFileProps",
1308
- value: input
1309
- }))(input, "$input", true);
1310
- const success = 0 === errors.length;
1311
- return success ? {
1312
- success,
1313
- data: input
1314
- } : {
1315
- success,
1316
- errors,
1317
- data: input
1318
- };
1319
- }
1320
- return {
1321
- success: true,
1322
- data: input
1323
- };
1324
- }; })()
1325
- }
1326
- ]
1327
- },
1328
- claude,
1329
- llama: claude,
1330
- deepseek: claude,
1331
- "3.1": claude,
1332
- "3.0": {
1333
- model: "3.0",
1334
- options: {
1335
- constraint: true,
1336
- recursive: 3,
1337
- separate: null
1338
- },
1339
- functions: [
1340
- {
1341
- name: "makePrismaSchemaFile",
1342
- parameters: {
1343
- type: "object",
1344
- properties: {
1345
- file: {
790
+ },
791
+ "AutoBePrisma.IModel": {
792
+ description: "Interface representing a single Prisma model (database table).\n\nBased on the uploaded schemas, models follow specific patterns:\n\n- Main business entities (e.g., shopping_sales, shopping_customers)\n- Snapshot/versioning entities for audit trails (e.g.,\n shopping_sale_snapshots)\n- Junction tables for M:N relationships (e.g.,\n shopping_cart_commodity_stocks)\n- Materialized views for performance (prefixed with mv_)\n\n### Description of {@link primaryField} property:\n\n> The primary key field of the model.\n> \n> In all uploaded schemas, primary keys are always UUID type with \"@\\id\"\n> directive. Usually named \"id\" and marked with \"@\\db.Uuid\" for PostgreSQL\n> mapping.",
1346
793
  type: "object",
1347
794
  properties: {
1348
- filename: {
1349
- type: "string",
1350
- pattern: "^[a-zA-Z0-9._-]+\\.prisma$",
1351
- title: "Name of the schema file to be generated",
1352
- description: "Name of the schema file to be generated.\n\nShould follow the naming convention: \"schema-{number}-{domain}.prisma\"\nExamples: \"schema-02-systematic.prisma\", \"schema-03-actors.prisma\" The\nnumber indicates the dependency order for schema generation."
795
+ name: {
796
+ description: "Name of the Prisma model (database table name).\n\nShould follow snake_case convention with domain prefix. Examples:\n\"shopping_customers\", \"shopping_sale_snapshots\", \"bbs_articles\"\nMaterialized views use \"mv_\" prefix: \"mv_shopping_sale_last_snapshots\"\n\n\n@pattern ^[a-z][a-z0-9_]*$",
797
+ type: "string"
1353
798
  },
1354
- namespace: {
1355
- type: "string",
1356
- title: "Business domain namespace that groups related models",
1357
- description: "Business domain namespace that groups related models.\n\nUsed in Prisma documentation comments as \"@\\namespace directive\".\nExamples from uploaded schemas: \"Systematic\", \"Actors\", \"Sales\", \"Carts\",\n\"Orders\", \"Coupons\", \"Coins\", \"Inquiries\", \"Favorites\", \"Articles\""
799
+ description: {
800
+ description: "Detailed description explaining the business purpose and usage of the\nmodel.\n\nShould include:\n\n- Business context and purpose\n- Key relationships with other models\n- Important behavioral notes or constraints\n- References to related entities using \"{@\\link ModelName}\" syntax Example:\n \"Customer information, but not a person but a **connection** basis...\"",
801
+ type: "string"
1358
802
  },
1359
- models: {
803
+ material: {
804
+ description: "Indicates whether this model represents a materialized view for\nperformance optimization.\n\nMaterialized views are read-only computed tables that cache complex query\nresults. They're marked as \"@\\hidden\" in documentation and prefixed with\n\"mv_\" in naming. Examples: mv_shopping_sale_last_snapshots,\nmv_shopping_cart_commodity_prices",
805
+ type: "boolean"
806
+ },
807
+ primaryField: {
808
+ $ref: "#/$defs/AutoBePrisma.IPrimaryField"
809
+ },
810
+ foreignFields: {
811
+ description: "Array of foreign key fields that reference other models.\n\nThese establish relationships between models and include Prisma relation\ndirectives. Can be nullable (optional relationships) or required\n(mandatory relationships). May have unique constraints for 1:1\nrelationships.",
812
+ type: "array",
813
+ items: {
814
+ $ref: "#/$defs/AutoBePrisma.IForeignField"
815
+ }
816
+ },
817
+ plainFields: {
818
+ description: "Array of regular data fields that don't reference other models.\n\nInclude business data like names, descriptions, timestamps, flags,\namounts, etc. Common patterns: created_at, updated_at, deleted_at for\nsoft deletion and auditing.",
819
+ type: "array",
820
+ items: {
821
+ $ref: "#/$defs/AutoBePrisma.IPlainField"
822
+ }
823
+ },
824
+ uniqueIndexes: {
825
+ description: "Array of unique indexes for enforcing data integrity constraints.\n\nEnsure uniqueness across single or multiple columns. Examples: unique\nemail addresses, unique codes within a channel, unique combinations like\n(channel_id, nickname).",
1360
826
  type: "array",
1361
827
  items: {
1362
- type: "object",
1363
- properties: {
1364
- name: {
1365
- type: "string",
1366
- pattern: "^[a-z][a-z0-9_]*$",
1367
- title: "Name of the Prisma model (database table name)",
1368
- description: "Name of the Prisma model (database table name).\n\nShould follow snake_case convention with domain prefix. Examples:\n\"shopping_customers\", \"shopping_sale_snapshots\", \"bbs_articles\"\nMaterialized views use \"mv_\" prefix: \"mv_shopping_sale_last_snapshots\""
1369
- },
1370
- description: {
1371
- type: "string",
1372
- description: "Detailed description explaining the business purpose and usage of the\nmodel.\n\nShould include:\n\n- Business context and purpose\n- Key relationships with other models\n- Important behavioral notes or constraints\n- References to related entities using \"{@\\link ModelName}\" syntax Example:\n \"Customer information, but not a person but a **connection** basis...\""
1373
- },
1374
- material: {
1375
- type: "boolean",
1376
- description: "Indicates whether this model represents a materialized view for\nperformance optimization.\n\nMaterialized views are read-only computed tables that cache complex query\nresults. They're marked as \"@\\hidden\" in documentation and prefixed with\n\"mv_\" in naming. Examples: mv_shopping_sale_last_snapshots,\nmv_shopping_cart_commodity_prices"
1377
- },
1378
- primaryField: {
1379
- type: "object",
1380
- properties: {
1381
- name: {
1382
- type: "string",
1383
- pattern: "^[a-z][a-z0-9_]*$",
1384
- title: "Name of the primary key field",
1385
- description: "Name of the primary key field.\n\nConsistently named \"id\" across all models in the uploaded schemas.\nRepresents the unique identifier for each record in the table."
1386
- },
1387
- type: {
1388
- type: "string",
1389
- "enum": [
1390
- "uuid"
1391
- ],
1392
- title: "Data type of the primary key field",
1393
- description: "Data type of the primary key field.\n\nAlways \"uuid\" in the uploaded schemas for better distributed system\nsupport and to avoid exposing sequential IDs that could reveal business\ninformation."
1394
- },
1395
- description: {
1396
- type: "string",
1397
- title: "Description of the primary key field's purpose",
1398
- description: "Description of the primary key field's purpose.\n\nStandard description is \"Primary Key.\" across all models. Serves as the\nunique identifier for the model instance."
1399
- }
1400
- },
1401
- required: [
1402
- "name",
1403
- "type",
1404
- "description"
1405
- ],
1406
- description: "The primary key field of the model.\n\nIn all uploaded schemas, primary keys are always UUID type with \"@\\id\"\ndirective. Usually named \"id\" and marked with \"@\\db.Uuid\" for PostgreSQL\nmapping.\n\n------------------------------\n\nDescription of the current {@link AutoBePrisma.IPrimaryField} type:\n\n> Interface representing the primary key field of a Prisma model.\n> \n> All models in the uploaded schemas use UUID as primary key for better\n> distributed system compatibility and security (no sequential ID exposure).",
1407
- additionalProperties: false
1408
- },
1409
- foreignFields: {
1410
- type: "array",
1411
- items: {
1412
- type: "object",
1413
- properties: {
1414
- name: {
1415
- type: "string",
1416
- pattern: "^[a-z][a-z0-9_]*$",
1417
- title: "Name of the foreign key field",
1418
- description: "Name of the foreign key field.\n\nFollows convention: \"{target_model_name_without_prefix}_id\" Examples:\n\"shopping_customer_id\", \"bbs_article_id\", \"attachment_file_id\" For\nself-references: \"parent_id\" (e.g., in hierarchical structures)"
1419
- },
1420
- type: {
1421
- type: "string",
1422
- "enum": [
1423
- "uuid"
1424
- ],
1425
- title: "Data type of the foreign key field",
1426
- description: "Data type of the foreign key field.\n\nAlways \"uuid\" to match the primary key type of referenced models. Ensures\nreferential integrity and consistency across the schema."
1427
- },
1428
- description: {
1429
- type: "string",
1430
- description: "Description explaining the purpose and target of this foreign key\nrelationship.\n\nShould reference the target model using format: \"Target model's {@\\link\nModelName.id}\" Examples: \"Belonged customer's {@\\link\nshopping_customers.id}\" May include additional context about the\nrelationship's business meaning."
1431
- },
1432
- relation: {
1433
- type: "object",
1434
- properties: {
1435
- name: {
1436
- type: "string",
1437
- pattern: "^[a-zA-Z_][a-zA-Z0-9_]*$",
1438
- title: "Name of the relation property in the Prisma model",
1439
- description: "Name of the relation property in the Prisma model.\n\nUsed to access the related model instance. Usually a descriptive name\nof the relationship. Examples: \"customer\", \"channel\", \"parent\",\n\"snapshot\""
1440
- },
1441
- targetModel: {
1442
- type: "string",
1443
- title: "Name of the target model being referenced",
1444
- description: "Name of the target model being referenced.\n\nMust match exactly with an existing model name in the schema. Examples:\n\"shopping_customers\", \"shopping_channels\", \"bbs_articles\""
1445
- }
1446
- },
1447
- required: [
1448
- "name",
1449
- "targetModel"
1450
- ],
1451
- title: "Prisma relation configuration defining the association details",
1452
- description: "Prisma relation configuration defining the association details.\n\nSpecifies how this foreign key connects to the target model, including\nrelation name, target model, and target field.",
1453
- additionalProperties: false
1454
- },
1455
- unique: {
1456
- type: "boolean",
1457
- title: "Whether this foreign key has a unique constraint",
1458
- description: "Whether this foreign key has a unique constraint.\n\nTrue: Creates a 1:1 relationship (e.g., user profile, order publish\ndetails) false: Allows 1:N relationship (e.g., customer to multiple\norders) Used for enforcing business rules about relationship\ncardinality."
1459
- },
1460
- nullable: {
1461
- type: "boolean",
1462
- title: "Whether this foreign key can be null (optional relationship)",
1463
- description: "Whether this foreign key can be null (optional relationship).\n\nTrue: Relationship is optional, foreign key can be null false:\nRelationship is required, foreign key cannot be null Reflects business\nrules about mandatory vs optional associations."
1464
- }
1465
- },
1466
- required: [
1467
- "name",
1468
- "type",
1469
- "description",
1470
- "relation",
1471
- "unique",
1472
- "nullable"
1473
- ],
1474
- description: "Description of the current {@link AutoBePrisma.IForeignField} type:\n\n> Interface representing a foreign key field that establishes relationships\n> between models.\n> \n> Foreign keys create associations between models, enabling relational data\n> modeling. They can represent 1:1, 1:N, or participate in M:N relationships\n> through junction tables.",
1475
- additionalProperties: false
1476
- },
1477
- title: "Array of foreign key fields that reference other models",
1478
- description: "Array of foreign key fields that reference other models.\n\nThese establish relationships between models and include Prisma relation\ndirectives. Can be nullable (optional relationships) or required\n(mandatory relationships). May have unique constraints for 1:1\nrelationships."
1479
- },
1480
- plainFields: {
1481
- type: "array",
1482
- items: {
1483
- type: "object",
1484
- properties: {
1485
- name: {
1486
- type: "string",
1487
- pattern: "^[a-z][a-z0-9_]*$",
1488
- title: "Name of the field in the database table",
1489
- description: "Name of the field in the database table.\n\nShould use snake_case convention. Common patterns from uploaded schemas:\n\n- Timestamps: created_at, updated_at, deleted_at, opened_at, closed_at\n- Identifiers: code, name, nickname, title\n- Business data: value, quantity, price, volume, balance\n- Flags: primary, required, exclusive, secret, multiplicative"
1490
- },
1491
- type: {
1492
- type: "string",
1493
- "enum": [
1494
- "string",
1495
- "boolean",
1496
- "uuid",
1497
- "uri",
1498
- "int",
1499
- "double",
1500
- "datetime"
1501
- ],
1502
- title: "Data type of the field for Prisma schema generation",
1503
- description: "Data type of the field for Prisma schema generation.\n\nMaps to appropriate Prisma/PostgreSQL types:\n\n- Boolean: Boolean flags and yes/no values\n- Int: Integer numbers, quantities, sequences\n- Double: Decimal numbers, prices, monetary values, percentages\n- String: Text data, names, descriptions, codes\n- Uri: URL/URI fields for links and references\n- Uuid: UUID fields (for non-foreign-key UUIDs)\n- Date: Date-only values (rare, mostly for business dates)\n- Datetime: Timestamp fields with date and time"
1504
- },
1505
- description: {
1506
- type: "string",
1507
- title: "Description explaining the business purpose and usage of this field",
1508
- description: "Description explaining the business purpose and usage of this field.\n\nShould clearly explain:\n\n- What business concept this field represents\n- Valid values or constraints if applicable\n- How it relates to business processes\n- Any special behavioral notes Example: \"Amount of cash payment.\" or\n \"Whether the unit is required or not.\""
1509
- },
1510
- nullable: {
1511
- type: "boolean",
1512
- title: "Whether this field can contain null values",
1513
- description: "Whether this field can contain null values.\n\nTrue: Field is optional and can be null (e.g., middle name, description)\nfalse: Field is required and cannot be null (e.g., creation timestamp,\nname) Reflects business rules about mandatory vs optional data."
1514
- }
1515
- },
1516
- required: [
1517
- "name",
1518
- "type",
1519
- "description",
1520
- "nullable"
1521
- ],
1522
- description: "Description of the current {@link AutoBePrisma.IPlainField} type:\n\n> Interface representing a regular data field that stores business\n> information.\n> \n> These fields contain the actual business data like names, amounts,\n> timestamps, flags, descriptions, and other domain-specific information.",
1523
- additionalProperties: false
1524
- },
1525
- title: "Array of regular data fields that don't reference other models",
1526
- description: "Array of regular data fields that don't reference other models.\n\nInclude business data like names, descriptions, timestamps, flags,\namounts, etc. Common patterns: created_at, updated_at, deleted_at for\nsoft deletion and auditing."
1527
- },
1528
- uniqueIndexes: {
1529
- type: "array",
1530
- items: {
1531
- type: "object",
1532
- properties: {
1533
- fieldNames: {
1534
- type: "array",
1535
- items: {
1536
- type: "string"
1537
- },
1538
- minItems: 1,
1539
- uniqueItems: true,
1540
- title: "Array of field names that together form the unique constraint",
1541
- description: "Array of field names that together form the unique constraint.\n\nCan be single field (e.g., [\"email\"]) or composite (e.g., [\"channel_id\",\n\"code\"]). All field names must exist in the model. Order matters for\ncomposite indexes. Examples: [\"code\"], [\"shopping_channel_id\",\n\"nickname\"], [\"email\"]"
1542
- },
1543
- unique: {
1544
- type: "boolean",
1545
- "enum": [
1546
- true
1547
- ],
1548
- title: "Explicit marker indicating this is a unique index",
1549
- description: "Explicit marker indicating this is a unique index.\n\nAlways true to distinguish from regular indexes. Used by code generator\nto emit \"@@unique\" directive in Prisma schema instead of \"@@index\"."
1550
- }
1551
- },
1552
- required: [
1553
- "fieldNames",
1554
- "unique"
1555
- ],
1556
- description: "Description of the current {@link AutoBePrisma.IUniqueIndex} type:\n\n> Interface representing a unique index constraint on one or more fields.\n> \n> Unique indexes enforce data integrity by ensuring no duplicate values exist\n> for the specified field combination. Essential for business rules that\n> require uniqueness like email addresses, codes, or composite keys.",
1557
- additionalProperties: false
1558
- },
1559
- title: "Array of unique indexes for enforcing data integrity constraints",
1560
- description: "Array of unique indexes for enforcing data integrity constraints.\n\nEnsure uniqueness across single or multiple columns. Examples: unique\nemail addresses, unique codes within a channel, unique combinations like\n(channel_id, nickname)."
1561
- },
1562
- plainIndexes: {
1563
- type: "array",
1564
- items: {
1565
- type: "object",
1566
- properties: {
1567
- fieldNames: {
1568
- type: "array",
1569
- items: {
1570
- type: "string"
1571
- },
1572
- minItems: 1,
1573
- uniqueItems: true,
1574
- title: "Array of field names to include in the performance index",
1575
- description: "Array of field names to include in the performance index.\n\nCan be single field (e.g., [\"created_at\"]) or composite (e.g.,\n[\"customer_id\", \"created_at\"]). All field names must exist in the model.\nOrder matters for composite indexes and should match common query\npatterns. Examples: [\"created_at\"], [\"shopping_customer_id\",\n\"created_at\"], [\"ip\"]"
1576
- }
1577
- },
1578
- required: [
1579
- "fieldNames"
1580
- ],
1581
- description: "Description of the current {@link AutoBePrisma.IPlainIndex} type:\n\n> Interface representing a regular (non-unique) index for query performance.\n> \n> Regular indexes speed up database queries by creating optimized data\n> structures for common search patterns. Essential for foreign keys, date\n> ranges, and frequently filtered fields.",
1582
- additionalProperties: false
1583
- },
1584
- title: "Array of regular indexes for query performance optimization",
1585
- description: "Array of regular indexes for query performance optimization.\n\nSpeed up common query patterns like filtering by foreign keys, date\nranges, or frequently searched fields. Examples: indexes on created_at,\nforeign key fields, search fields."
1586
- },
1587
- ginIndexes: {
1588
- type: "array",
1589
- items: {
1590
- type: "object",
1591
- properties: {
1592
- fieldName: {
1593
- type: "string",
1594
- title: "Name of the text field to index for full-text search capabilities",
1595
- description: "Name of the text field to index for full-text search capabilities.\n\nMust be a string field in the model that contains searchable text.\nExamples from uploaded schemas: \"nickname\", \"title\", \"body\", \"name\" Used\nwith PostgreSQL gin_trgm_ops for trigram-based fuzzy text search."
1596
- }
1597
- },
1598
- required: [
1599
- "fieldName"
1600
- ],
1601
- description: "Description of the current {@link AutoBePrisma.IGinIndex} type:\n\n> Interface representing a GIN (Generalized Inverted Index) for full-text\n> search.\n> \n> GIN indexes enable advanced PostgreSQL text search capabilities including\n> fuzzy matching and partial text search using trigram operations. Essential\n> for user-facing search features on text content.",
1602
- additionalProperties: false
1603
- },
1604
- title: "Array of GIN (Generalized Inverted Index) indexes for full-text search",
1605
- description: "Array of GIN (Generalized Inverted Index) indexes for full-text search.\n\nUsed specifically for PostgreSQL text search capabilities using trigram\noperations. Applied to text fields that need fuzzy matching or partial\ntext search. Examples: searching names, nicknames, titles, content\nbodies."
1606
- }
828
+ $ref: "#/$defs/AutoBePrisma.IUniqueIndex"
829
+ }
830
+ },
831
+ plainIndexes: {
832
+ description: "Array of regular indexes for query performance optimization.\n\nSpeed up common query patterns like filtering by foreign keys, date\nranges, or frequently searched fields. Examples: indexes on created_at,\nforeign key fields, search fields.",
833
+ type: "array",
834
+ items: {
835
+ $ref: "#/$defs/AutoBePrisma.IPlainIndex"
836
+ }
837
+ },
838
+ ginIndexes: {
839
+ description: "Array of GIN (Generalized Inverted Index) indexes for full-text search.\n\nUsed specifically for PostgreSQL text search capabilities using trigram\noperations. Applied to text fields that need fuzzy matching or partial\ntext search. Examples: searching names, nicknames, titles, content\nbodies.",
840
+ type: "array",
841
+ items: {
842
+ $ref: "#/$defs/AutoBePrisma.IGinIndex"
843
+ }
844
+ }
845
+ },
846
+ required: [
847
+ "name",
848
+ "description",
849
+ "material",
850
+ "primaryField",
851
+ "foreignFields",
852
+ "plainFields",
853
+ "uniqueIndexes",
854
+ "plainIndexes",
855
+ "ginIndexes"
856
+ ]
857
+ },
858
+ "AutoBePrisma.IPrimaryField": {
859
+ description: "Interface representing the primary key field of a Prisma model.\n\nAll models in the uploaded schemas use UUID as primary key for better\ndistributed system compatibility and security (no sequential ID exposure).",
860
+ type: "object",
861
+ properties: {
862
+ name: {
863
+ description: "Name of the primary key field.\n\nConsistently named \"id\" across all models in the uploaded schemas.\nRepresents the unique identifier for each record in the table.\n\n\n@pattern ^[a-z][a-z0-9_]*$",
864
+ type: "string"
865
+ },
866
+ type: {
867
+ description: "Data type of the primary key field.\n\nAlways \"uuid\" in the uploaded schemas for better distributed system\nsupport and to avoid exposing sequential IDs that could reveal business\ninformation.",
868
+ type: "string",
869
+ "enum": [
870
+ "uuid"
871
+ ]
872
+ },
873
+ description: {
874
+ description: "Description of the primary key field's purpose.\n\nStandard description is \"Primary Key.\" across all models. Serves as the\nunique identifier for the model instance.",
875
+ type: "string"
876
+ }
877
+ },
878
+ required: [
879
+ "name",
880
+ "type",
881
+ "description"
882
+ ]
883
+ },
884
+ "AutoBePrisma.IForeignField": {
885
+ description: "Interface representing a foreign key field that establishes relationships\nbetween models.\n\nForeign keys create associations between models, enabling relational data\nmodeling. They can represent 1:1, 1:N, or participate in M:N relationships\nthrough junction tables.",
886
+ type: "object",
887
+ properties: {
888
+ name: {
889
+ description: "Name of the foreign key field.\n\nFollows convention: \"{target_model_name_without_prefix}_id\" Examples:\n\"shopping_customer_id\", \"bbs_article_id\", \"attachment_file_id\" For\nself-references: \"parent_id\" (e.g., in hierarchical structures)\n\n\n@pattern ^[a-z][a-z0-9_]*$",
890
+ type: "string"
891
+ },
892
+ type: {
893
+ description: "Data type of the foreign key field.\n\nAlways \"uuid\" to match the primary key type of referenced models. Ensures\nreferential integrity and consistency across the schema.",
894
+ type: "string",
895
+ "enum": [
896
+ "uuid"
897
+ ]
898
+ },
899
+ description: {
900
+ description: "Description explaining the purpose and target of this foreign key\nrelationship.\n\nShould reference the target model using format: \"Target model's {@\\link\nModelName.id}\" Examples: \"Belonged customer's {@\\link\nshopping_customers.id}\" May include additional context about the\nrelationship's business meaning.",
901
+ type: "string"
902
+ },
903
+ relation: {
904
+ description: "Prisma relation configuration defining the association details.\n\nSpecifies how this foreign key connects to the target model, including\nrelation name, target model, and target field.",
905
+ type: "object",
906
+ properties: {
907
+ name: {
908
+ description: "Name of the relation property in the Prisma model.\n\nUsed to access the related model instance. Usually a descriptive name\nof the relationship. Examples: \"customer\", \"channel\", \"parent\",\n\"snapshot\"\n\n\n@pattern ^[a-zA-Z_][a-zA-Z0-9_]*$",
909
+ type: "string"
1607
910
  },
1608
- required: [
1609
- "name",
1610
- "description",
1611
- "material",
1612
- "primaryField",
1613
- "foreignFields",
1614
- "plainFields",
1615
- "uniqueIndexes",
1616
- "plainIndexes",
1617
- "ginIndexes"
1618
- ],
1619
- description: "Description of the current {@link AutoBePrisma.IModel} type:\n\n> Interface representing a single Prisma model (database table).\n> \n> Based on the uploaded schemas, models follow specific patterns:\n> \n> - Main business entities (e.g., shopping_sales, shopping_customers)\n> - Snapshot/versioning entities for audit trails (e.g.,\n> shopping_sale_snapshots)\n> - Junction tables for M:N relationships (e.g.,\n> shopping_cart_commodity_stocks)\n> - Materialized views for performance (prefixed with mv_)",
1620
- additionalProperties: false
911
+ targetModel: {
912
+ description: "Name of the target model being referenced.\n\nMust match exactly with an existing model name in the schema. Examples:\n\"shopping_customers\", \"shopping_channels\", \"bbs_articles\"",
913
+ type: "string"
914
+ }
1621
915
  },
1622
- title: "Array of Prisma models (database tables) within this domain",
1623
- description: "Array of Prisma models (database tables) within this domain.\n\nEach model represents a business entity or concept within the namespace.\nModels can reference each other through foreign key relationships."
916
+ required: [
917
+ "name",
918
+ "targetModel"
919
+ ]
920
+ },
921
+ unique: {
922
+ description: "Whether this foreign key has a unique constraint.\n\nTrue: Creates a 1:1 relationship (e.g., user profile, order publish\ndetails) false: Allows 1:N relationship (e.g., customer to multiple\norders) Used for enforcing business rules about relationship\ncardinality.",
923
+ type: "boolean"
924
+ },
925
+ nullable: {
926
+ description: "Whether this foreign key can be null (optional relationship).\n\nTrue: Relationship is optional, foreign key can be null false:\nRelationship is required, foreign key cannot be null Reflects business\nrules about mandatory vs optional associations.",
927
+ type: "boolean"
1624
928
  }
1625
929
  },
1626
930
  required: [
1627
- "filename",
1628
- "namespace",
1629
- "models"
1630
- ],
1631
- description: "Complete definition of a single Prisma schema file.\n\nRepresents one business domain containing related models, organized for\nmodular schema management and following domain-driven design principles.\n\n------------------------------\n\nDescription of the current {@link AutoBePrisma.IFile} type:\n\n> Interface representing a single Prisma schema file within the application.\n> \n> Each file focuses on a specific business domain and contains related\n> models. File organization follows domain-driven design principles as seen\n> in the uploaded schemas.",
1632
- additionalProperties: false
931
+ "name",
932
+ "type",
933
+ "description",
934
+ "relation",
935
+ "unique",
936
+ "nullable"
937
+ ]
938
+ },
939
+ "AutoBePrisma.IPlainField": {
940
+ description: "Interface representing a regular data field that stores business\ninformation.\n\nThese fields contain the actual business data like names, amounts,\ntimestamps, flags, descriptions, and other domain-specific information.",
941
+ type: "object",
942
+ properties: {
943
+ name: {
944
+ description: "Name of the field in the database table.\n\nShould use snake_case convention. Common patterns from uploaded schemas:\n\n- Timestamps: created_at, updated_at, deleted_at, opened_at, closed_at\n- Identifiers: code, name, nickname, title\n- Business data: value, quantity, price, volume, balance\n- Flags: primary, required, exclusive, secret, multiplicative\n\n\n@pattern ^[a-z][a-z0-9_]*$",
945
+ type: "string"
946
+ },
947
+ type: {
948
+ description: "Data type of the field for Prisma schema generation.\n\nMaps to appropriate Prisma/PostgreSQL types:\n\n- Boolean: Boolean flags and yes/no values\n- Int: Integer numbers, quantities, sequences\n- Double: Decimal numbers, prices, monetary values, percentages\n- String: Text data, names, descriptions, codes\n- Uri: URL/URI fields for links and references\n- Uuid: UUID fields (for non-foreign-key UUIDs)\n- Date: Date-only values (rare, mostly for business dates)\n- Datetime: Timestamp fields with date and time",
949
+ type: "string",
950
+ "enum": [
951
+ "string",
952
+ "boolean",
953
+ "uuid",
954
+ "uri",
955
+ "int",
956
+ "double",
957
+ "datetime"
958
+ ]
959
+ },
960
+ description: {
961
+ description: "Description explaining the business purpose and usage of this field.\n\nShould clearly explain:\n\n- What business concept this field represents\n- Valid values or constraints if applicable\n- How it relates to business processes\n- Any special behavioral notes Example: \"Amount of cash payment.\" or\n \"Whether the unit is required or not.\"",
962
+ type: "string"
963
+ },
964
+ nullable: {
965
+ description: "Whether this field can contain null values.\n\nTrue: Field is optional and can be null (e.g., middle name, description)\nfalse: Field is required and cannot be null (e.g., creation timestamp,\nname) Reflects business rules about mandatory vs optional data.",
966
+ type: "boolean"
967
+ }
968
+ },
969
+ required: [
970
+ "name",
971
+ "type",
972
+ "description",
973
+ "nullable"
974
+ ]
975
+ },
976
+ "AutoBePrisma.IUniqueIndex": {
977
+ description: "Interface representing a unique index constraint on one or more fields.\n\nUnique indexes enforce data integrity by ensuring no duplicate values exist\nfor the specified field combination. Essential for business rules that\nrequire uniqueness like email addresses, codes, or composite keys.",
978
+ type: "object",
979
+ properties: {
980
+ fieldNames: {
981
+ description: "Array of field names that together form the unique constraint.\n\nCan be single field (e.g., [\"email\"]) or composite (e.g., [\"channel_id\",\n\"code\"]). All field names must exist in the model. Order matters for\ncomposite indexes. Examples: [\"code\"], [\"shopping_channel_id\",\n\"nickname\"], [\"email\"]\n\n\n@minItems 1\n@uniqueItems",
982
+ type: "array",
983
+ items: {
984
+ type: "string"
985
+ }
986
+ },
987
+ unique: {
988
+ description: "Explicit marker indicating this is a unique index.\n\nAlways true to distinguish from regular indexes. Used by code generator\nto emit \"@@unique\" directive in Prisma schema instead of \"@@index\".",
989
+ type: "boolean",
990
+ "enum": [
991
+ true
992
+ ]
993
+ }
994
+ },
995
+ required: [
996
+ "fieldNames",
997
+ "unique"
998
+ ]
999
+ },
1000
+ "AutoBePrisma.IPlainIndex": {
1001
+ description: "Interface representing a regular (non-unique) index for query performance.\n\nRegular indexes speed up database queries by creating optimized data\nstructures for common search patterns. Essential for foreign keys, date\nranges, and frequently filtered fields.",
1002
+ type: "object",
1003
+ properties: {
1004
+ fieldNames: {
1005
+ description: "Array of field names to include in the performance index.\n\nCan be single field (e.g., [\"created_at\"]) or composite (e.g.,\n[\"customer_id\", \"created_at\"]). All field names must exist in the model.\nOrder matters for composite indexes and should match common query\npatterns. Examples: [\"created_at\"], [\"shopping_customer_id\",\n\"created_at\"], [\"ip\"]\n\n\n@minItems 1\n@uniqueItems",
1006
+ type: "array",
1007
+ items: {
1008
+ type: "string"
1009
+ }
1010
+ }
1011
+ },
1012
+ required: [
1013
+ "fieldNames"
1014
+ ]
1015
+ },
1016
+ "AutoBePrisma.IGinIndex": {
1017
+ description: "Interface representing a GIN (Generalized Inverted Index) for full-text\nsearch.\n\nGIN indexes enable advanced PostgreSQL text search capabilities including\nfuzzy matching and partial text search using trigram operations. Essential\nfor user-facing search features on text content.",
1018
+ type: "object",
1019
+ properties: {
1020
+ fieldName: {
1021
+ description: "Name of the text field to index for full-text search capabilities.\n\nMust be a string field in the model that contains searchable text.\nExamples from uploaded schemas: \"nickname\", \"title\", \"body\", \"name\" Used\nwith PostgreSQL gin_trgm_ops for trigram-based fuzzy text search.",
1022
+ type: "string"
1023
+ }
1024
+ },
1025
+ required: [
1026
+ "fieldName"
1027
+ ]
1633
1028
  }
1634
- },
1635
- required: [
1636
- "file"
1637
- ],
1638
- description: " Properties containing the file\n\n------------------------------\n\nCurrent Type: {@link IMakePrismaSchemaFileProps}",
1639
- additionalProperties: false
1029
+ }
1640
1030
  },
1641
1031
  description: "Generates comprehensive Prisma schema files based on detailed requirements\nanalysis.\n\nCreates multiple organized schema files following enterprise patterns\nincluding proper domain separation, relationship modeling, snapshot\npatterns, inheritance, materialized views, and comprehensive documentation.\nThe generated schemas implement best practices for scalability,\nmaintainability, and data integrity.",
1642
1032
  validate: (() => { const _io0 = input => "object" === typeof input.file && null !== input.file && _io1(input.file); const _io1 = input => "string" === typeof input.filename && RegExp("^[a-zA-Z0-9._-]+\\.prisma$").test(input.filename) && "string" === typeof input.namespace && (Array.isArray(input.models) && input.models.every(elem => "object" === typeof elem && null !== elem && _io2(elem))); const _io2 = input => "string" === typeof input.name && RegExp("^[a-z][a-z0-9_]*$").test(input.name) && "string" === typeof input.description && "boolean" === typeof input.material && ("object" === typeof input.primaryField && null !== input.primaryField && _io3(input.primaryField)) && (Array.isArray(input.foreignFields) && input.foreignFields.every(elem => "object" === typeof elem && null !== elem && _io4(elem))) && (Array.isArray(input.plainFields) && input.plainFields.every(elem => "object" === typeof elem && null !== elem && _io6(elem))) && (Array.isArray(input.uniqueIndexes) && input.uniqueIndexes.every(elem => "object" === typeof elem && null !== elem && _io7(elem))) && (Array.isArray(input.plainIndexes) && input.plainIndexes.every(elem => "object" === typeof elem && null !== elem && _io8(elem))) && (Array.isArray(input.ginIndexes) && input.ginIndexes.every(elem => "object" === typeof elem && null !== elem && _io9(elem))); const _io3 = input => "string" === typeof input.name && RegExp("^[a-z][a-z0-9_]*$").test(input.name) && "uuid" === input.type && "string" === typeof input.description; const _io4 = input => "string" === typeof input.name && RegExp("^[a-z][a-z0-9_]*$").test(input.name) && "uuid" === input.type && "string" === typeof input.description && ("object" === typeof input.relation && null !== input.relation && _io5(input.relation)) && "boolean" === typeof input.unique && "boolean" === typeof input.nullable; const _io5 = input => "string" === typeof input.name && RegExp("^[a-zA-Z_][a-zA-Z0-9_]*$").test(input.name) && "string" === typeof input.targetModel; const _io6 = input => "string" === typeof input.name && RegExp("^[a-z][a-z0-9_]*$").test(input.name) && ("string" === input.type || "boolean" === input.type || "uuid" === input.type || "uri" === input.type || "int" === input.type || "double" === input.type || "datetime" === input.type) && "string" === typeof input.description && "boolean" === typeof input.nullable; const _io7 = input => Array.isArray(input.fieldNames) && (1 <= input.fieldNames.length && __typia_transform__isUniqueItems._isUniqueItems(input.fieldNames) && input.fieldNames.every(elem => "string" === typeof elem)) && true === input.unique; const _io8 = input => Array.isArray(input.fieldNames) && (1 <= input.fieldNames.length && __typia_transform__isUniqueItems._isUniqueItems(input.fieldNames) && input.fieldNames.every(elem => "string" === typeof elem)); const _io9 = input => "string" === typeof input.fieldName; const _vo0 = (input, _path, _exceptionable = true) => [("object" === typeof input.file && null !== input.file || _report(_exceptionable, {
@@ -1938,5 +1328,9 @@ const collection = {
1938
1328
  }
1939
1329
  ]
1940
1330
  },
1331
+ claude,
1332
+ llama: claude,
1333
+ deepseek: claude,
1334
+ "3.1": claude,
1941
1335
  };
1942
1336
  //# sourceMappingURL=orchestratePrismaSchema.js.map