@autobe/agent 0.9.2 → 0.10.0

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 (175) hide show
  1. package/lib/AutoBeAgent.js +11 -4
  2. package/lib/AutoBeAgent.js.map +1 -1
  3. package/lib/constants/AutoBeSystemPromptConstant.d.ts +6 -6
  4. package/lib/context/AutoBeTokenUsage.d.ts +15 -1
  5. package/lib/context/AutoBeTokenUsage.js +56 -1
  6. package/lib/context/AutoBeTokenUsage.js.map +1 -1
  7. package/lib/factory/createAutoBeApplication.js +288 -643
  8. package/lib/factory/createAutoBeApplication.js.map +1 -1
  9. package/lib/index.mjs +5057 -7211
  10. package/lib/index.mjs.map +1 -1
  11. package/lib/orchestrate/analyze/AutoBeAnalyzeAgent.js +82 -319
  12. package/lib/orchestrate/analyze/AutoBeAnalyzeAgent.js.map +1 -1
  13. package/lib/orchestrate/analyze/AutoBeAnalyzeReviewer.js +0 -1
  14. package/lib/orchestrate/analyze/AutoBeAnalyzeReviewer.js.map +1 -1
  15. package/lib/orchestrate/analyze/orchestrateAnalyze.js +95 -266
  16. package/lib/orchestrate/analyze/orchestrateAnalyze.js.map +1 -1
  17. package/lib/orchestrate/facade/transformFacadeStateMessage.js +2 -2
  18. package/lib/orchestrate/facade/transformFacadeStateMessage.js.map +1 -1
  19. package/lib/orchestrate/index.d.ts +2 -2
  20. package/lib/orchestrate/index.js +4 -4
  21. package/lib/orchestrate/index.js.map +1 -1
  22. package/lib/orchestrate/interface/orchestrateInterfaceComplement.js +56 -142
  23. package/lib/orchestrate/interface/orchestrateInterfaceComplement.js.map +1 -1
  24. package/lib/orchestrate/interface/orchestrateInterfaceComponents.js +195 -199
  25. package/lib/orchestrate/interface/orchestrateInterfaceComponents.js.map +1 -1
  26. package/lib/orchestrate/interface/orchestrateInterfaceEndpoints.js +75 -172
  27. package/lib/orchestrate/interface/orchestrateInterfaceEndpoints.js.map +1 -1
  28. package/lib/orchestrate/interface/orchestrateInterfaceOperations.js +772 -1097
  29. package/lib/orchestrate/interface/orchestrateInterfaceOperations.js.map +1 -1
  30. package/lib/orchestrate/interface/transformInterfaceHistories.js +2 -0
  31. package/lib/orchestrate/interface/transformInterfaceHistories.js.map +1 -1
  32. package/lib/orchestrate/prisma/orchestratePrismaComponent.js +64 -175
  33. package/lib/orchestrate/prisma/orchestratePrismaComponent.js.map +1 -1
  34. package/lib/orchestrate/prisma/orchestratePrismaCorrect.js +552 -1073
  35. package/lib/orchestrate/prisma/orchestratePrismaCorrect.js.map +1 -1
  36. package/lib/orchestrate/prisma/orchestratePrismaSchema.js +571 -1119
  37. package/lib/orchestrate/prisma/orchestratePrismaSchema.js.map +1 -1
  38. package/lib/orchestrate/prisma/transformPrismaComponentsHistories.js +9 -0
  39. package/lib/orchestrate/prisma/transformPrismaComponentsHistories.js.map +1 -1
  40. package/lib/orchestrate/prisma/transformPrismaSchemaHistories.js +8 -0
  41. package/lib/orchestrate/prisma/transformPrismaSchemaHistories.js.map +1 -1
  42. package/lib/orchestrate/realize/orchestrateRealize.d.ts +11 -0
  43. package/lib/orchestrate/realize/orchestrateRealize.js +109 -0
  44. package/lib/orchestrate/realize/orchestrateRealize.js.map +1 -0
  45. package/lib/orchestrate/realize/orchestrateRealizeCoder.d.ts +25 -0
  46. package/lib/orchestrate/realize/orchestrateRealizeCoder.js +337 -0
  47. package/lib/orchestrate/realize/orchestrateRealizeCoder.js.map +1 -0
  48. package/lib/orchestrate/realize/orchestrateRealizeIntegrator.d.ts +52 -0
  49. package/lib/orchestrate/realize/orchestrateRealizeIntegrator.js +57 -0
  50. package/lib/orchestrate/realize/orchestrateRealizeIntegrator.js.map +1 -0
  51. package/lib/orchestrate/realize/orchestrateRealizePlanner.d.ts +80 -0
  52. package/lib/orchestrate/realize/orchestrateRealizePlanner.js +53 -0
  53. package/lib/orchestrate/realize/orchestrateRealizePlanner.js.map +1 -0
  54. package/lib/orchestrate/realize/orchestrateRealizeValidator.d.ts +46 -0
  55. package/lib/orchestrate/realize/orchestrateRealizeValidator.js +37 -0
  56. package/lib/orchestrate/realize/orchestrateRealizeValidator.js.map +1 -0
  57. package/lib/orchestrate/realize/structures/IAutoBeRealizeCoderApplication.d.ts +33 -0
  58. package/lib/orchestrate/realize/structures/IAutoBeRealizeCoderApplication.js +3 -0
  59. package/lib/orchestrate/realize/structures/IAutoBeRealizeCoderApplication.js.map +1 -0
  60. package/lib/orchestrate/realize/transformRealizeCoderHistories.d.ts +5 -0
  61. package/lib/orchestrate/realize/transformRealizeCoderHistories.js +127 -0
  62. package/lib/orchestrate/realize/transformRealizeCoderHistories.js.map +1 -0
  63. package/lib/orchestrate/test/compile/completeTestCode.d.ts +2 -0
  64. package/lib/orchestrate/test/compile/completeTestCode.js +21 -0
  65. package/lib/orchestrate/test/compile/completeTestCode.js.map +1 -0
  66. package/lib/orchestrate/test/{filterTestFileName.js → compile/filterTestFileName.js} +1 -1
  67. package/lib/orchestrate/test/compile/filterTestFileName.js.map +1 -0
  68. package/lib/orchestrate/test/compile/getTestExternalDeclarations.d.ts +3 -0
  69. package/lib/orchestrate/test/compile/getTestExternalDeclarations.js +27 -0
  70. package/lib/orchestrate/test/compile/getTestExternalDeclarations.js.map +1 -0
  71. package/lib/orchestrate/test/compile/getTestScenarioArtifacts.d.ts +5 -0
  72. package/lib/orchestrate/test/{compileTestScenario.js → compile/getTestScenarioArtifacts.js} +10 -5
  73. package/lib/orchestrate/test/compile/getTestScenarioArtifacts.js.map +1 -0
  74. package/lib/orchestrate/test/orchestrateTest.js +14 -9
  75. package/lib/orchestrate/test/orchestrateTest.js.map +1 -1
  76. package/lib/orchestrate/test/orchestrateTestCorrect.d.ts +3 -2
  77. package/lib/orchestrate/test/orchestrateTestCorrect.js +150 -448
  78. package/lib/orchestrate/test/orchestrateTestCorrect.js.map +1 -1
  79. package/lib/orchestrate/test/orchestrateTestScenario.js +272 -530
  80. package/lib/orchestrate/test/orchestrateTestScenario.js.map +1 -1
  81. package/lib/orchestrate/test/orchestrateTestWrite.d.ts +3 -2
  82. package/lib/orchestrate/test/orchestrateTestWrite.js +139 -90
  83. package/lib/orchestrate/test/orchestrateTestWrite.js.map +1 -1
  84. package/lib/orchestrate/test/structures/IAutoBeTestCorrectApplication.d.ts +121 -0
  85. package/lib/orchestrate/test/structures/IAutoBeTestCorrectApplication.js +3 -0
  86. package/lib/orchestrate/test/structures/IAutoBeTestCorrectApplication.js.map +1 -0
  87. package/lib/orchestrate/test/structures/IAutoBeTestFunction.d.ts +8 -0
  88. package/lib/{utils/types/BackoffOptions.js → orchestrate/test/structures/IAutoBeTestFunction.js} +1 -1
  89. package/lib/orchestrate/test/structures/IAutoBeTestFunction.js.map +1 -0
  90. package/lib/orchestrate/test/structures/IAutoBeTestScenarioApplication.d.ts +14 -2
  91. package/lib/orchestrate/test/structures/IAutoBeTestWriteApplication.d.ts +112 -0
  92. package/lib/orchestrate/test/structures/IAutoBeTestWriteApplication.js +3 -0
  93. package/lib/orchestrate/test/structures/IAutoBeTestWriteApplication.js.map +1 -0
  94. package/lib/orchestrate/test/structures/IAutoBeTestWriteResult.d.ts +7 -0
  95. package/lib/orchestrate/test/structures/IAutoBeTestWriteResult.js +3 -0
  96. package/lib/orchestrate/test/structures/IAutoBeTestWriteResult.js.map +1 -0
  97. package/lib/orchestrate/test/transformTestCorrectHistories.d.ts +3 -2
  98. package/lib/orchestrate/test/transformTestCorrectHistories.js +28 -67
  99. package/lib/orchestrate/test/transformTestCorrectHistories.js.map +1 -1
  100. package/lib/orchestrate/test/transformTestWriteHistories.d.ts +5 -4
  101. package/lib/orchestrate/test/transformTestWriteHistories.js +168 -43
  102. package/lib/orchestrate/test/transformTestWriteHistories.js.map +1 -1
  103. package/lib/structures/IAutoBeConfig.d.ts +11 -0
  104. package/lib/utils/backoffRetry.d.ts +4 -7
  105. package/lib/utils/backoffRetry.js +19 -37
  106. package/lib/utils/backoffRetry.js.map +1 -1
  107. package/lib/utils/forceRetry.d.ts +1 -0
  108. package/lib/{orchestrate/orchestrateRealize.js → utils/forceRetry.js} +15 -8
  109. package/lib/utils/forceRetry.js.map +1 -0
  110. package/package.json +8 -7
  111. package/src/AutoBeAgent.ts +17 -3
  112. package/src/constants/AutoBeSystemPromptConstant.ts +6 -6
  113. package/src/context/AutoBeTokenUsage.ts +85 -1
  114. package/src/factory/createAutoBeApplication.ts +2 -3
  115. package/src/orchestrate/analyze/AutoBeAnalyzeAgent.ts +8 -3
  116. package/src/orchestrate/analyze/AutoBeAnalyzeReviewer.ts +0 -1
  117. package/src/orchestrate/analyze/orchestrateAnalyze.ts +6 -5
  118. package/src/orchestrate/facade/transformFacadeStateMessage.ts +2 -1
  119. package/src/orchestrate/index.ts +2 -2
  120. package/src/orchestrate/interface/orchestrateInterfaceComplement.ts +4 -3
  121. package/src/orchestrate/interface/orchestrateInterfaceComponents.ts +26 -23
  122. package/src/orchestrate/interface/orchestrateInterfaceEndpoints.ts +6 -4
  123. package/src/orchestrate/interface/orchestrateInterfaceOperations.ts +14 -11
  124. package/src/orchestrate/interface/transformInterfaceHistories.ts +2 -0
  125. package/src/orchestrate/prisma/orchestratePrismaComponent.ts +10 -5
  126. package/src/orchestrate/prisma/orchestratePrismaCorrect.ts +11 -5
  127. package/src/orchestrate/prisma/orchestratePrismaSchema.ts +16 -8
  128. package/src/orchestrate/prisma/transformPrismaComponentsHistories.ts +9 -0
  129. package/src/orchestrate/prisma/transformPrismaSchemaHistories.ts +8 -0
  130. package/src/orchestrate/realize/orchestrateRealize.ts +169 -0
  131. package/src/orchestrate/realize/orchestrateRealizeCoder.ts +156 -0
  132. package/src/orchestrate/realize/orchestrateRealizeIntegrator.ts +75 -0
  133. package/src/orchestrate/realize/orchestrateRealizePlanner.ts +115 -0
  134. package/src/orchestrate/realize/orchestrateRealizeValidator.ts +64 -0
  135. package/src/orchestrate/realize/structures/IAutoBeRealizeCoderApplication.ts +36 -0
  136. package/src/orchestrate/realize/transformRealizeCoderHistories.ts +136 -0
  137. package/src/orchestrate/test/compile/completeTestCode.ts +35 -0
  138. package/src/orchestrate/test/{filterTestFileName.ts → compile/filterTestFileName.ts} +1 -1
  139. package/src/orchestrate/test/compile/getTestExternalDeclarations.ts +24 -0
  140. package/src/orchestrate/test/{compileTestScenario.ts → compile/getTestScenarioArtifacts.ts} +16 -8
  141. package/src/orchestrate/test/experimental/orchestrateTestCorrect.ast +240 -0
  142. package/src/orchestrate/test/experimental/orchestrateTestWrite.ast +316 -0
  143. package/src/orchestrate/test/experimental/transformTestCorrectHistories.ast +52 -0
  144. package/src/orchestrate/test/orchestrateTest.ts +33 -16
  145. package/src/orchestrate/test/orchestrateTestCorrect.ts +109 -497
  146. package/src/orchestrate/test/orchestrateTestScenario.ts +102 -71
  147. package/src/orchestrate/test/orchestrateTestWrite.ts +55 -181
  148. package/src/orchestrate/test/structures/IAutoBeTestCorrectApplication.ts +126 -0
  149. package/src/orchestrate/test/structures/IAutoBeTestFunction.ts +10 -0
  150. package/src/orchestrate/test/structures/IAutoBeTestScenarioApplication.ts +14 -2
  151. package/src/orchestrate/test/structures/IAutoBeTestWriteApplication.ts +117 -0
  152. package/src/orchestrate/test/structures/IAutoBeTestWriteResult.ts +9 -0
  153. package/src/orchestrate/test/transformTestCorrectHistories.ts +38 -71
  154. package/src/orchestrate/test/transformTestWriteHistories.ts +88 -46
  155. package/src/structures/IAutoBeConfig.ts +9 -0
  156. package/src/utils/backoffRetry.ts +25 -36
  157. package/src/utils/forceRetry.ts +13 -0
  158. package/lib/factory/invertOpenApiDocument.d.ts +0 -3
  159. package/lib/factory/invertOpenApiDocument.js +0 -51
  160. package/lib/factory/invertOpenApiDocument.js.map +0 -1
  161. package/lib/orchestrate/orchestrateRealize.d.ts +0 -5
  162. package/lib/orchestrate/orchestrateRealize.js.map +0 -1
  163. package/lib/orchestrate/test/compileTestScenario.d.ts +0 -5
  164. package/lib/orchestrate/test/compileTestScenario.js.map +0 -1
  165. package/lib/orchestrate/test/filterTestFileName.js.map +0 -1
  166. package/lib/utils/StringUtil.d.ts +0 -4
  167. package/lib/utils/StringUtil.js +0 -43
  168. package/lib/utils/StringUtil.js.map +0 -1
  169. package/lib/utils/types/BackoffOptions.d.ts +0 -12
  170. package/lib/utils/types/BackoffOptions.js.map +0 -1
  171. package/src/factory/invertOpenApiDocument.ts +0 -63
  172. package/src/orchestrate/orchestrateRealize.ts +0 -18
  173. package/src/utils/StringUtil.ts +0 -45
  174. package/src/utils/types/BackoffOptions.ts +0 -15
  175. /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,7 +148,18 @@ 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
+ title: "Complete definition of a single Prisma schema file",
152
+ 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.",
153
+ $ref: "#/$defs/AutoBePrisma.IFile"
154
+ }
155
+ },
156
+ required: [
157
+ "file"
158
+ ],
159
+ additionalProperties: false,
160
+ $defs: {
161
+ "AutoBePrisma.IFile": {
162
+ 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
163
  type: "object",
148
164
  properties: {
149
165
  filename: {
@@ -162,261 +178,7 @@ const claude = {
162
178
  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
179
  type: "array",
164
180
  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
- ]
181
+ $ref: "#/$defs/AutoBePrisma.IModel"
420
182
  }
421
183
  }
422
184
  },
@@ -425,13 +187,285 @@ const claude = {
425
187
  "namespace",
426
188
  "models"
427
189
  ]
190
+ },
191
+ "AutoBePrisma.IModel": {
192
+ 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_)",
193
+ type: "object",
194
+ properties: {
195
+ name: {
196
+ title: "Name of the Prisma model (database table name)",
197
+ 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\"",
198
+ type: "string",
199
+ pattern: "^[a-z][a-z0-9_]*$"
200
+ },
201
+ description: {
202
+ 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...\"",
203
+ type: "string"
204
+ },
205
+ material: {
206
+ 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",
207
+ type: "boolean"
208
+ },
209
+ primaryField: {
210
+ title: "The primary key field of the model",
211
+ 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.",
212
+ $ref: "#/$defs/AutoBePrisma.IPrimaryField"
213
+ },
214
+ foreignFields: {
215
+ title: "Array of foreign key fields that reference other models",
216
+ 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.",
217
+ type: "array",
218
+ items: {
219
+ $ref: "#/$defs/AutoBePrisma.IForeignField"
220
+ }
221
+ },
222
+ plainFields: {
223
+ title: "Array of regular data fields that don't reference other models",
224
+ 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.",
225
+ type: "array",
226
+ items: {
227
+ $ref: "#/$defs/AutoBePrisma.IPlainField"
228
+ }
229
+ },
230
+ uniqueIndexes: {
231
+ title: "Array of unique indexes for enforcing data integrity constraints",
232
+ 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).",
233
+ type: "array",
234
+ items: {
235
+ $ref: "#/$defs/AutoBePrisma.IUniqueIndex"
236
+ }
237
+ },
238
+ plainIndexes: {
239
+ title: "Array of regular indexes for query performance optimization",
240
+ 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.",
241
+ type: "array",
242
+ items: {
243
+ $ref: "#/$defs/AutoBePrisma.IPlainIndex"
244
+ }
245
+ },
246
+ ginIndexes: {
247
+ title: "Array of GIN (Generalized Inverted Index) indexes for full-text search",
248
+ 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.",
249
+ type: "array",
250
+ items: {
251
+ $ref: "#/$defs/AutoBePrisma.IGinIndex"
252
+ }
253
+ }
254
+ },
255
+ required: [
256
+ "name",
257
+ "description",
258
+ "material",
259
+ "primaryField",
260
+ "foreignFields",
261
+ "plainFields",
262
+ "uniqueIndexes",
263
+ "plainIndexes",
264
+ "ginIndexes"
265
+ ]
266
+ },
267
+ "AutoBePrisma.IPrimaryField": {
268
+ 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).",
269
+ type: "object",
270
+ properties: {
271
+ name: {
272
+ title: "Name of the primary key field",
273
+ 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.",
274
+ type: "string",
275
+ pattern: "^[a-z][a-z0-9_]*$"
276
+ },
277
+ type: {
278
+ title: "Data type of the primary key field",
279
+ 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.",
280
+ "const": "uuid"
281
+ },
282
+ description: {
283
+ title: "Description of the primary key field's purpose",
284
+ 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.",
285
+ type: "string"
286
+ }
287
+ },
288
+ required: [
289
+ "name",
290
+ "type",
291
+ "description"
292
+ ]
293
+ },
294
+ "AutoBePrisma.IForeignField": {
295
+ 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.",
296
+ type: "object",
297
+ properties: {
298
+ name: {
299
+ title: "Name of the foreign key field",
300
+ 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)",
301
+ type: "string",
302
+ pattern: "^[a-z][a-z0-9_]*$"
303
+ },
304
+ type: {
305
+ title: "Data type of the foreign key field",
306
+ 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.",
307
+ "const": "uuid"
308
+ },
309
+ description: {
310
+ 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.",
311
+ type: "string"
312
+ },
313
+ relation: {
314
+ title: "Prisma relation configuration defining the association details",
315
+ 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.",
316
+ type: "object",
317
+ properties: {
318
+ name: {
319
+ title: "Name of the relation property in the Prisma model",
320
+ 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\"",
321
+ type: "string",
322
+ pattern: "^[a-zA-Z_][a-zA-Z0-9_]*$"
323
+ },
324
+ targetModel: {
325
+ title: "Name of the target model being referenced",
326
+ 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\"",
327
+ type: "string"
328
+ }
329
+ },
330
+ required: [
331
+ "name",
332
+ "targetModel"
333
+ ]
334
+ },
335
+ unique: {
336
+ title: "Whether this foreign key has a unique constraint",
337
+ 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.",
338
+ type: "boolean"
339
+ },
340
+ nullable: {
341
+ title: "Whether this foreign key can be null (optional relationship)",
342
+ 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.",
343
+ type: "boolean"
344
+ }
345
+ },
346
+ required: [
347
+ "name",
348
+ "type",
349
+ "description",
350
+ "relation",
351
+ "unique",
352
+ "nullable"
353
+ ]
354
+ },
355
+ "AutoBePrisma.IPlainField": {
356
+ 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.",
357
+ type: "object",
358
+ properties: {
359
+ name: {
360
+ title: "Name of the field in the database table",
361
+ 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",
362
+ type: "string",
363
+ pattern: "^[a-z][a-z0-9_]*$"
364
+ },
365
+ type: {
366
+ title: "Data type of the field for Prisma schema generation",
367
+ 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",
368
+ oneOf: [
369
+ {
370
+ "const": "string"
371
+ },
372
+ {
373
+ "const": "boolean"
374
+ },
375
+ {
376
+ "const": "uuid"
377
+ },
378
+ {
379
+ "const": "uri"
380
+ },
381
+ {
382
+ "const": "int"
383
+ },
384
+ {
385
+ "const": "double"
386
+ },
387
+ {
388
+ "const": "datetime"
389
+ }
390
+ ]
391
+ },
392
+ description: {
393
+ title: "Description explaining the business purpose and usage of this field",
394
+ 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.\"",
395
+ type: "string"
396
+ },
397
+ nullable: {
398
+ title: "Whether this field can contain null values",
399
+ 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.",
400
+ type: "boolean"
401
+ }
402
+ },
403
+ required: [
404
+ "name",
405
+ "type",
406
+ "description",
407
+ "nullable"
408
+ ]
409
+ },
410
+ "AutoBePrisma.IUniqueIndex": {
411
+ 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.",
412
+ type: "object",
413
+ properties: {
414
+ fieldNames: {
415
+ title: "Array of field names that together form the unique constraint",
416
+ 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\"]",
417
+ type: "array",
418
+ items: {
419
+ type: "string"
420
+ },
421
+ minItems: 1,
422
+ uniqueItems: true
423
+ },
424
+ unique: {
425
+ title: "Explicit marker indicating this is a unique index",
426
+ 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\".",
427
+ "const": true
428
+ }
429
+ },
430
+ required: [
431
+ "fieldNames",
432
+ "unique"
433
+ ]
434
+ },
435
+ "AutoBePrisma.IPlainIndex": {
436
+ 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.",
437
+ type: "object",
438
+ properties: {
439
+ fieldNames: {
440
+ title: "Array of field names to include in the performance index",
441
+ 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\"]",
442
+ type: "array",
443
+ items: {
444
+ type: "string"
445
+ },
446
+ minItems: 1,
447
+ uniqueItems: true
448
+ }
449
+ },
450
+ required: [
451
+ "fieldNames"
452
+ ]
453
+ },
454
+ "AutoBePrisma.IGinIndex": {
455
+ 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.",
456
+ type: "object",
457
+ properties: {
458
+ fieldName: {
459
+ title: "Name of the text field to index for full-text search capabilities",
460
+ 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.",
461
+ type: "string"
462
+ }
463
+ },
464
+ required: [
465
+ "fieldName"
466
+ ]
428
467
  }
429
- },
430
- required: [
431
- "file"
432
- ],
433
- additionalProperties: false,
434
- $defs: {}
468
+ }
435
469
  },
436
470
  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
471
  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,11 +779,21 @@ const collection = {
745
779
  {
746
780
  name: "makePrismaSchemaFile",
747
781
  parameters: {
748
- description: " Properties containing the file\n\n------------------------------\n\nCurrent Type: {@link IMakePrismaSchemaFileProps}",
782
+ 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
783
  type: "object",
750
784
  properties: {
751
785
  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.",
786
+ title: "Complete definition of a single Prisma schema file",
787
+ $ref: "#/$defs/AutoBePrisma.IFile"
788
+ }
789
+ },
790
+ required: [
791
+ "file"
792
+ ],
793
+ additionalProperties: false,
794
+ $defs: {
795
+ "AutoBePrisma.IFile": {
796
+ 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
797
  type: "object",
754
798
  properties: {
755
799
  filename: {
@@ -767,248 +811,7 @@ const collection = {
767
811
  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
812
  type: "array",
769
813
  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
- ]
814
+ $ref: "#/$defs/AutoBePrisma.IModel"
1012
815
  }
1013
816
  }
1014
817
  },
@@ -1017,626 +820,271 @@ const collection = {
1017
820
  "namespace",
1018
821
  "models"
1019
822
  ]
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: {
823
+ },
824
+ "AutoBePrisma.IModel": {
825
+ 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
826
  type: "object",
1347
827
  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."
828
+ name: {
829
+ title: "Name of the Prisma model (database table name)",
830
+ 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_]*$",
831
+ type: "string"
1353
832
  },
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\""
833
+ description: {
834
+ 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...\"",
835
+ type: "string"
1358
836
  },
1359
- models: {
837
+ material: {
838
+ 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",
839
+ type: "boolean"
840
+ },
841
+ primaryField: {
842
+ title: "The primary key field of the model",
843
+ $ref: "#/$defs/AutoBePrisma.IPrimaryField"
844
+ },
845
+ foreignFields: {
846
+ title: "Array of foreign key fields that reference other models",
847
+ 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.",
848
+ type: "array",
849
+ items: {
850
+ $ref: "#/$defs/AutoBePrisma.IForeignField"
851
+ }
852
+ },
853
+ plainFields: {
854
+ title: "Array of regular data fields that don't reference other models",
855
+ 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.",
856
+ type: "array",
857
+ items: {
858
+ $ref: "#/$defs/AutoBePrisma.IPlainField"
859
+ }
860
+ },
861
+ uniqueIndexes: {
862
+ title: "Array of unique indexes for enforcing data integrity constraints",
863
+ 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
864
  type: "array",
1361
865
  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
- }
866
+ $ref: "#/$defs/AutoBePrisma.IUniqueIndex"
867
+ }
868
+ },
869
+ plainIndexes: {
870
+ title: "Array of regular indexes for query performance optimization",
871
+ 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.",
872
+ type: "array",
873
+ items: {
874
+ $ref: "#/$defs/AutoBePrisma.IPlainIndex"
875
+ }
876
+ },
877
+ ginIndexes: {
878
+ title: "Array of GIN (Generalized Inverted Index) indexes for full-text search",
879
+ 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.",
880
+ type: "array",
881
+ items: {
882
+ $ref: "#/$defs/AutoBePrisma.IGinIndex"
883
+ }
884
+ }
885
+ },
886
+ required: [
887
+ "name",
888
+ "description",
889
+ "material",
890
+ "primaryField",
891
+ "foreignFields",
892
+ "plainFields",
893
+ "uniqueIndexes",
894
+ "plainIndexes",
895
+ "ginIndexes"
896
+ ]
897
+ },
898
+ "AutoBePrisma.IPrimaryField": {
899
+ 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).",
900
+ type: "object",
901
+ properties: {
902
+ name: {
903
+ title: "Name of the primary key field",
904
+ 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_]*$",
905
+ type: "string"
906
+ },
907
+ type: {
908
+ title: "Data type of the primary key field",
909
+ 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.",
910
+ type: "string",
911
+ "enum": [
912
+ "uuid"
913
+ ]
914
+ },
915
+ description: {
916
+ title: "Description of the primary key field's purpose",
917
+ 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.",
918
+ type: "string"
919
+ }
920
+ },
921
+ required: [
922
+ "name",
923
+ "type",
924
+ "description"
925
+ ]
926
+ },
927
+ "AutoBePrisma.IForeignField": {
928
+ 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.",
929
+ type: "object",
930
+ properties: {
931
+ name: {
932
+ title: "Name of the foreign key field",
933
+ 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_]*$",
934
+ type: "string"
935
+ },
936
+ type: {
937
+ title: "Data type of the foreign key field",
938
+ 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.",
939
+ type: "string",
940
+ "enum": [
941
+ "uuid"
942
+ ]
943
+ },
944
+ description: {
945
+ 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.",
946
+ type: "string"
947
+ },
948
+ relation: {
949
+ title: "Prisma relation configuration defining the association details",
950
+ 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.",
951
+ type: "object",
952
+ properties: {
953
+ name: {
954
+ title: "Name of the relation property in the Prisma model",
955
+ 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_]*$",
956
+ type: "string"
1607
957
  },
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
958
+ targetModel: {
959
+ title: "Name of the target model being referenced",
960
+ 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\"",
961
+ type: "string"
962
+ }
1621
963
  },
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."
964
+ required: [
965
+ "name",
966
+ "targetModel"
967
+ ]
968
+ },
969
+ unique: {
970
+ title: "Whether this foreign key has a unique constraint",
971
+ 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.",
972
+ type: "boolean"
973
+ },
974
+ nullable: {
975
+ title: "Whether this foreign key can be null (optional relationship)",
976
+ 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.",
977
+ type: "boolean"
1624
978
  }
1625
979
  },
1626
980
  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
981
+ "name",
982
+ "type",
983
+ "description",
984
+ "relation",
985
+ "unique",
986
+ "nullable"
987
+ ]
988
+ },
989
+ "AutoBePrisma.IPlainField": {
990
+ 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.",
991
+ type: "object",
992
+ properties: {
993
+ name: {
994
+ title: "Name of the field in the database table",
995
+ 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_]*$",
996
+ type: "string"
997
+ },
998
+ type: {
999
+ title: "Data type of the field for Prisma schema generation",
1000
+ 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",
1001
+ type: "string",
1002
+ "enum": [
1003
+ "string",
1004
+ "boolean",
1005
+ "uuid",
1006
+ "uri",
1007
+ "int",
1008
+ "double",
1009
+ "datetime"
1010
+ ]
1011
+ },
1012
+ description: {
1013
+ title: "Description explaining the business purpose and usage of this field",
1014
+ 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.\"",
1015
+ type: "string"
1016
+ },
1017
+ nullable: {
1018
+ title: "Whether this field can contain null values",
1019
+ 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.",
1020
+ type: "boolean"
1021
+ }
1022
+ },
1023
+ required: [
1024
+ "name",
1025
+ "type",
1026
+ "description",
1027
+ "nullable"
1028
+ ]
1029
+ },
1030
+ "AutoBePrisma.IUniqueIndex": {
1031
+ 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.",
1032
+ type: "object",
1033
+ properties: {
1034
+ fieldNames: {
1035
+ title: "Array of field names that together form the unique constraint",
1036
+ 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",
1037
+ type: "array",
1038
+ items: {
1039
+ type: "string"
1040
+ }
1041
+ },
1042
+ unique: {
1043
+ title: "Explicit marker indicating this is a unique index",
1044
+ 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\".",
1045
+ type: "boolean",
1046
+ "enum": [
1047
+ true
1048
+ ]
1049
+ }
1050
+ },
1051
+ required: [
1052
+ "fieldNames",
1053
+ "unique"
1054
+ ]
1055
+ },
1056
+ "AutoBePrisma.IPlainIndex": {
1057
+ 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.",
1058
+ type: "object",
1059
+ properties: {
1060
+ fieldNames: {
1061
+ title: "Array of field names to include in the performance index",
1062
+ 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",
1063
+ type: "array",
1064
+ items: {
1065
+ type: "string"
1066
+ }
1067
+ }
1068
+ },
1069
+ required: [
1070
+ "fieldNames"
1071
+ ]
1072
+ },
1073
+ "AutoBePrisma.IGinIndex": {
1074
+ 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.",
1075
+ type: "object",
1076
+ properties: {
1077
+ fieldName: {
1078
+ title: "Name of the text field to index for full-text search capabilities",
1079
+ 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.",
1080
+ type: "string"
1081
+ }
1082
+ },
1083
+ required: [
1084
+ "fieldName"
1085
+ ]
1633
1086
  }
1634
- },
1635
- required: [
1636
- "file"
1637
- ],
1638
- description: " Properties containing the file\n\n------------------------------\n\nCurrent Type: {@link IMakePrismaSchemaFileProps}",
1639
- additionalProperties: false
1087
+ }
1640
1088
  },
1641
1089
  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
1090
  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 +1386,9 @@ const collection = {
1938
1386
  }
1939
1387
  ]
1940
1388
  },
1389
+ claude,
1390
+ llama: claude,
1391
+ deepseek: claude,
1392
+ "3.1": claude,
1941
1393
  };
1942
1394
  //# sourceMappingURL=orchestratePrismaSchema.js.map