@autobe/agent 0.3.23 → 0.4.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 (48) hide show
  1. package/lib/AutoBeAgent.d.ts +0 -7
  2. package/lib/AutoBeAgent.js +5 -5
  3. package/lib/AutoBeAgent.js.map +1 -1
  4. package/lib/constants/AutoBeSystemPromptConstant.d.ts +4 -4
  5. package/lib/factory/createAgenticaHistory.js +1 -1
  6. package/lib/factory/createAgenticaHistory.js.map +1 -1
  7. package/lib/factory/createAutoBeApplication.js +9 -9
  8. package/lib/factory/createAutoBeApplication.js.map +1 -1
  9. package/lib/index.d.ts +0 -4
  10. package/lib/index.mjs +3508 -504
  11. package/lib/index.mjs.map +1 -1
  12. package/lib/orchestrate/interface/transformInterfaceHistories.js +3 -3
  13. package/lib/orchestrate/interface/transformInterfaceHistories.js.map +1 -1
  14. package/lib/orchestrate/prisma/orchestratePrisma.js +13 -8
  15. package/lib/orchestrate/prisma/orchestratePrisma.js.map +1 -1
  16. package/lib/orchestrate/prisma/orchestratePrismaComponent.js +67 -26
  17. package/lib/orchestrate/prisma/orchestratePrismaComponent.js.map +1 -1
  18. package/lib/orchestrate/prisma/orchestratePrismaCorrect.d.ts +4 -0
  19. package/lib/orchestrate/prisma/orchestratePrismaCorrect.js +2010 -0
  20. package/lib/orchestrate/prisma/orchestratePrismaCorrect.js.map +1 -0
  21. package/lib/orchestrate/prisma/orchestratePrismaSchema.js +1649 -80
  22. package/lib/orchestrate/prisma/orchestratePrismaSchema.js.map +1 -1
  23. package/lib/orchestrate/prisma/transformPrismaComponentsHistories.js +1 -1
  24. package/lib/orchestrate/prisma/transformPrismaComponentsHistories.js.map +1 -1
  25. package/lib/orchestrate/prisma/transformPrismaCorrectHistories.d.ts +3 -0
  26. package/lib/orchestrate/prisma/{transformPrismaCompilerHistories.js → transformPrismaCorrectHistories.js} +11 -10
  27. package/lib/orchestrate/prisma/transformPrismaCorrectHistories.js.map +1 -0
  28. package/lib/orchestrate/prisma/transformPrismaHistories.js +1 -1
  29. package/lib/orchestrate/prisma/transformPrismaHistories.js.map +1 -1
  30. package/lib/orchestrate/prisma/transformPrismaSchemaHistories.js +1 -1
  31. package/lib/orchestrate/prisma/transformPrismaSchemaHistories.js.map +1 -1
  32. package/package.json +4 -4
  33. package/src/AutoBeAgent.ts +5 -5
  34. package/src/constants/AutoBeSystemPromptConstant.ts +4 -4
  35. package/src/factory/createAgenticaHistory.ts +1 -1
  36. package/src/factory/createAutoBeApplication.ts +9 -9
  37. package/src/orchestrate/interface/transformInterfaceHistories.ts +3 -3
  38. package/src/orchestrate/prisma/orchestratePrisma.ts +20 -12
  39. package/src/orchestrate/prisma/orchestratePrismaComponent.ts +6 -3
  40. package/src/orchestrate/prisma/orchestratePrismaCorrect.ts +258 -0
  41. package/src/orchestrate/prisma/orchestratePrismaSchema.ts +16 -53
  42. package/src/orchestrate/prisma/{transformPrismaCompilerHistories.ts → transformPrismaCorrectHistories.ts} +10 -10
  43. package/lib/orchestrate/prisma/orchestratePrismaCompiler.d.ts +0 -4
  44. package/lib/orchestrate/prisma/orchestratePrismaCompiler.js +0 -443
  45. package/lib/orchestrate/prisma/orchestratePrismaCompiler.js.map +0 -1
  46. package/lib/orchestrate/prisma/transformPrismaCompilerHistories.d.ts +0 -3
  47. package/lib/orchestrate/prisma/transformPrismaCompilerHistories.js.map +0 -1
  48. package/src/orchestrate/prisma/orchestratePrismaCompiler.ts +0 -276
@@ -46,6 +46,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
46
46
  };
47
47
  Object.defineProperty(exports, "__esModule", { value: true });
48
48
  exports.orchestratePrismaSchemas = orchestratePrismaSchemas;
49
+ const __typia_transform__isUniqueItems = __importStar(require("typia/lib/internal/_isUniqueItems.js"));
49
50
  const __typia_transform__validateReport = __importStar(require("typia/lib/internal/_validateReport.js"));
50
51
  const core_1 = require("@agentica/core");
51
52
  const typia_1 = __importDefault(require("typia"));
@@ -67,8 +68,7 @@ function orchestratePrismaSchemas(ctx, components) {
67
68
  const event = {
68
69
  type: "prismaSchemas",
69
70
  created_at: start.toISOString(),
70
- filename: c.filename,
71
- content: result.content,
71
+ file: result.file,
72
72
  completed: (i += c.tables.length),
73
73
  total,
74
74
  step: (_b = (_a = ctx.state().analyze) === null || _a === void 0 ? void 0 : _a.step) !== null && _b !== void 0 ? _b : 0,
@@ -95,6 +95,7 @@ function process(ctx, component) {
95
95
  model: ctx.model,
96
96
  build: (next) => {
97
97
  pointer.value = next;
98
+ pointer.value.file.filename = component.filename;
98
99
  },
99
100
  }),
100
101
  ],
@@ -104,29 +105,7 @@ function process(ctx, component) {
104
105
  event.body.tool_choice = "required";
105
106
  }
106
107
  }));
107
- yield agentica.conversate([
108
- "Please generate Prisma schema files based on the previous requirement analysis report.",
109
- "",
110
- "**Context:**",
111
- `- Target filename: \`${component.filename}\``,
112
- `- Tables to implement in this file: \`${component.tables.join("`, `")}\``,
113
- `- All available tables in the system: \`${component.entireTables.join("`, `")}\``,
114
- "",
115
- "**Instructions:**",
116
- "1. Create comprehensive Prisma schema content for the specified tables",
117
- "2. Reference the previous requirement analysis to understand business logic and data structures",
118
- "3. Establish appropriate relationships between tables using the entireTables list as reference",
119
- "4. Include proper field types, constraints, indexes, and documentation",
120
- "5. Follow enterprise-level schema design patterns and best practices",
121
- "6. Ensure cross-table relationships are accurately modeled based on business requirements",
122
- "",
123
- "**Key Requirements:**",
124
- "- Implement only the tables specified for this file",
125
- "- Create foreign key relationships to tables from entireTables when business logic requires it",
126
- "- Add comprehensive field documentation and model descriptions",
127
- "- Include appropriate indexes for performance optimization",
128
- "- Follow consistent naming conventions and data types",
129
- ].join("\n"));
108
+ yield agentica.conversate("Make prisma schema file please");
130
109
  if (pointer.value === null)
131
110
  throw new Error("Unreachable code: Prisma Schema not generated");
132
111
  return pointer.value;
@@ -140,7 +119,7 @@ function createApplication(props) {
140
119
  name: "Prisma Generator",
141
120
  application,
142
121
  execute: {
143
- makePrismaSchemaFiles: (next) => {
122
+ makePrismaSchemaFile: (next) => {
144
123
  props.build(next);
145
124
  },
146
125
  },
@@ -154,49 +133,582 @@ const claude = {
154
133
  },
155
134
  functions: [
156
135
  {
157
- name: "makePrismaSchemaFiles",
136
+ name: "makePrismaSchemaFile",
158
137
  parameters: {
159
- description: " Properties containing the complete set of Prisma schema files\n\n------------------------------\n\nCurrent Type: {@link IMakePrismaSchemaFilesProps}",
138
+ description: " Properties containing the file\n\n------------------------------\n\nCurrent Type: {@link IMakePrismaSchemaFileProps}",
160
139
  type: "object",
161
140
  properties: {
162
- content: {
163
- title: "Complete Prisma schema content as a single concatenated string",
164
- description: "Complete Prisma schema content as a single concatenated string.\n\nContains all schema files organized by domain/functionality with clear file\nseparators. Each file section includes models, relationships, indexes, and\ncomprehensive documentation following enterprise patterns.\n\nContent should be organized following enterprise patterns:\n\n- Main.prisma: Configuration, datasource, and generators\n- Schema-XX-domain.prisma: Domain-specific entity definitions\n- Proper cross-file relationships and dependencies",
165
- type: "string"
166
- },
167
- description: {
168
- title: "Summary description of the application requirements and business context",
169
- description: "Summary description of the application requirements and business context.",
170
- type: "string"
141
+ file: {
142
+ 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.",
143
+ type: "object",
144
+ properties: {
145
+ filename: {
146
+ title: "Name of the schema file to be generated",
147
+ 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.",
148
+ type: "string",
149
+ pattern: "^[a-zA-Z0-9._-]+\\.prisma$"
150
+ },
151
+ namespace: {
152
+ title: "Business domain namespace that groups related models",
153
+ 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\"",
154
+ type: "string"
155
+ },
156
+ models: {
157
+ title: "Array of Prisma models (database tables) within this domain",
158
+ 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.",
159
+ type: "array",
160
+ items: {
161
+ 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_)",
162
+ type: "object",
163
+ properties: {
164
+ name: {
165
+ title: "Name of the Prisma model (database table name)",
166
+ 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\"",
167
+ type: "string",
168
+ pattern: "^[a-z][a-z0-9_]*$"
169
+ },
170
+ description: {
171
+ 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...\"",
172
+ type: "string"
173
+ },
174
+ material: {
175
+ 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",
176
+ type: "boolean"
177
+ },
178
+ primaryField: {
179
+ 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).",
180
+ type: "object",
181
+ properties: {
182
+ name: {
183
+ title: "Name of the primary key field",
184
+ 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.",
185
+ type: "string",
186
+ pattern: "^[a-z][a-z0-9_]*$"
187
+ },
188
+ type: {
189
+ title: "Data type of the primary key field",
190
+ 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.",
191
+ "const": "uuid"
192
+ },
193
+ description: {
194
+ title: "Description of the primary key field's purpose",
195
+ 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.",
196
+ type: "string"
197
+ }
198
+ },
199
+ required: [
200
+ "name",
201
+ "type",
202
+ "description"
203
+ ]
204
+ },
205
+ foreignFields: {
206
+ title: "Array of foreign key fields that reference other models",
207
+ 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.",
208
+ type: "array",
209
+ items: {
210
+ 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.",
211
+ type: "object",
212
+ properties: {
213
+ name: {
214
+ title: "Name of the foreign key field",
215
+ 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)",
216
+ type: "string",
217
+ pattern: "^[a-z][a-z0-9_]*$"
218
+ },
219
+ type: {
220
+ title: "Data type of the foreign key field",
221
+ 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.",
222
+ "const": "uuid"
223
+ },
224
+ description: {
225
+ 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.",
226
+ type: "string"
227
+ },
228
+ relation: {
229
+ title: "Prisma relation configuration defining the association details",
230
+ 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.",
231
+ type: "object",
232
+ properties: {
233
+ name: {
234
+ title: "Name of the relation property in the Prisma model",
235
+ 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\"",
236
+ type: "string",
237
+ pattern: "^[a-zA-Z_][a-zA-Z0-9_]*$"
238
+ },
239
+ targetModel: {
240
+ title: "Name of the target model being referenced",
241
+ 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\"",
242
+ type: "string"
243
+ }
244
+ },
245
+ required: [
246
+ "name",
247
+ "targetModel"
248
+ ]
249
+ },
250
+ unique: {
251
+ title: "Whether this foreign key has a unique constraint",
252
+ 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.",
253
+ type: "boolean"
254
+ },
255
+ nullable: {
256
+ title: "Whether this foreign key can be null (optional relationship)",
257
+ 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.",
258
+ type: "boolean"
259
+ }
260
+ },
261
+ required: [
262
+ "name",
263
+ "type",
264
+ "description",
265
+ "relation",
266
+ "unique",
267
+ "nullable"
268
+ ]
269
+ }
270
+ },
271
+ plainFields: {
272
+ title: "Array of regular data fields that don't reference other models",
273
+ 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.",
274
+ type: "array",
275
+ items: {
276
+ 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.",
277
+ type: "object",
278
+ properties: {
279
+ name: {
280
+ title: "Name of the field in the database table",
281
+ 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",
282
+ type: "string",
283
+ pattern: "^[a-z][a-z0-9_]*$"
284
+ },
285
+ type: {
286
+ title: "Data type of the field for Prisma schema generation",
287
+ 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",
288
+ oneOf: [
289
+ {
290
+ "const": "string"
291
+ },
292
+ {
293
+ "const": "boolean"
294
+ },
295
+ {
296
+ "const": "uuid"
297
+ },
298
+ {
299
+ "const": "uri"
300
+ },
301
+ {
302
+ "const": "int"
303
+ },
304
+ {
305
+ "const": "double"
306
+ },
307
+ {
308
+ "const": "datetime"
309
+ }
310
+ ]
311
+ },
312
+ description: {
313
+ title: "Description explaining the business purpose and usage of this field",
314
+ 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.\"",
315
+ type: "string"
316
+ },
317
+ nullable: {
318
+ title: "Whether this field can contain null values",
319
+ 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.",
320
+ type: "boolean"
321
+ }
322
+ },
323
+ required: [
324
+ "name",
325
+ "type",
326
+ "description",
327
+ "nullable"
328
+ ]
329
+ }
330
+ },
331
+ uniqueIndexes: {
332
+ title: "Array of unique indexes for enforcing data integrity constraints",
333
+ 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).",
334
+ type: "array",
335
+ items: {
336
+ 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.",
337
+ type: "object",
338
+ properties: {
339
+ fieldNames: {
340
+ title: "Array of field names that together form the unique constraint",
341
+ 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\"]",
342
+ type: "array",
343
+ items: {
344
+ type: "string"
345
+ },
346
+ minItems: 1,
347
+ uniqueItems: true
348
+ },
349
+ unique: {
350
+ title: "Explicit marker indicating this is a unique index",
351
+ 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\".",
352
+ "const": true
353
+ }
354
+ },
355
+ required: [
356
+ "fieldNames",
357
+ "unique"
358
+ ]
359
+ }
360
+ },
361
+ plainIndexes: {
362
+ title: "Array of regular indexes for query performance optimization",
363
+ 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.",
364
+ type: "array",
365
+ items: {
366
+ 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.",
367
+ type: "object",
368
+ properties: {
369
+ fieldNames: {
370
+ title: "Array of field names to include in the performance index",
371
+ 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\"]",
372
+ type: "array",
373
+ items: {
374
+ type: "string"
375
+ },
376
+ minItems: 1,
377
+ uniqueItems: true
378
+ }
379
+ },
380
+ required: [
381
+ "fieldNames"
382
+ ]
383
+ }
384
+ },
385
+ ginIndexes: {
386
+ title: "Array of GIN (Generalized Inverted Index) indexes for full-text search",
387
+ 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.",
388
+ type: "array",
389
+ items: {
390
+ 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.",
391
+ type: "object",
392
+ properties: {
393
+ fieldName: {
394
+ title: "Name of the text field to index for full-text search capabilities",
395
+ 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.",
396
+ type: "string"
397
+ }
398
+ },
399
+ required: [
400
+ "fieldName"
401
+ ]
402
+ }
403
+ }
404
+ },
405
+ required: [
406
+ "name",
407
+ "description",
408
+ "material",
409
+ "primaryField",
410
+ "foreignFields",
411
+ "plainFields",
412
+ "uniqueIndexes",
413
+ "plainIndexes",
414
+ "ginIndexes"
415
+ ]
416
+ }
417
+ }
418
+ },
419
+ required: [
420
+ "filename",
421
+ "namespace",
422
+ "models"
423
+ ]
171
424
  }
172
425
  },
173
426
  required: [
174
- "content",
175
- "description"
427
+ "file"
176
428
  ],
177
429
  additionalProperties: false,
178
430
  $defs: {}
179
431
  },
180
432
  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.",
181
- validate: (() => { const _io0 = input => "string" === typeof input.content && "string" === typeof input.description; const _vo0 = (input, _path, _exceptionable = true) => ["string" === typeof input.content || _report(_exceptionable, {
182
- path: _path + ".content",
433
+ 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, {
434
+ path: _path + ".file",
435
+ expected: "AutoBePrisma.IFile",
436
+ value: input.file
437
+ })) && _vo1(input.file, _path + ".file", true && _exceptionable) || _report(_exceptionable, {
438
+ path: _path + ".file",
439
+ expected: "AutoBePrisma.IFile",
440
+ value: input.file
441
+ })].every(flag => flag); const _vo1 = (input, _path, _exceptionable = true) => ["string" === typeof input.filename && (RegExp("^[a-zA-Z0-9._-]+\\.prisma$").test(input.filename) || _report(_exceptionable, {
442
+ path: _path + ".filename",
443
+ expected: "string & Pattern<\"^[a-zA-Z0-9._-]+\\\\.prisma$\">",
444
+ value: input.filename
445
+ })) || _report(_exceptionable, {
446
+ path: _path + ".filename",
447
+ expected: "(string & Pattern<\"^[a-zA-Z0-9._-]+\\\\.prisma$\">)",
448
+ value: input.filename
449
+ }), "string" === typeof input.namespace || _report(_exceptionable, {
450
+ path: _path + ".namespace",
451
+ expected: "string",
452
+ value: input.namespace
453
+ }), (Array.isArray(input.models) || _report(_exceptionable, {
454
+ path: _path + ".models",
455
+ expected: "Array<AutoBePrisma.IModel>",
456
+ value: input.models
457
+ })) && input.models.map((elem, _index9) => ("object" === typeof elem && null !== elem || _report(_exceptionable, {
458
+ path: _path + ".models[" + _index9 + "]",
459
+ expected: "AutoBePrisma.IModel",
460
+ value: elem
461
+ })) && _vo2(elem, _path + ".models[" + _index9 + "]", true && _exceptionable) || _report(_exceptionable, {
462
+ path: _path + ".models[" + _index9 + "]",
463
+ expected: "AutoBePrisma.IModel",
464
+ value: elem
465
+ })).every(flag => flag) || _report(_exceptionable, {
466
+ path: _path + ".models",
467
+ expected: "Array<AutoBePrisma.IModel>",
468
+ value: input.models
469
+ })].every(flag => flag); const _vo2 = (input, _path, _exceptionable = true) => ["string" === typeof input.name && (RegExp("^[a-z][a-z0-9_]*$").test(input.name) || _report(_exceptionable, {
470
+ path: _path + ".name",
471
+ expected: "string & Pattern<\"^[a-z][a-z0-9_]*$\">",
472
+ value: input.name
473
+ })) || _report(_exceptionable, {
474
+ path: _path + ".name",
475
+ expected: "(string & Pattern<\"^[a-z][a-z0-9_]*$\">)",
476
+ value: input.name
477
+ }), "string" === typeof input.description || _report(_exceptionable, {
478
+ path: _path + ".description",
479
+ expected: "string",
480
+ value: input.description
481
+ }), "boolean" === typeof input.material || _report(_exceptionable, {
482
+ path: _path + ".material",
483
+ expected: "boolean",
484
+ value: input.material
485
+ }), ("object" === typeof input.primaryField && null !== input.primaryField || _report(_exceptionable, {
486
+ path: _path + ".primaryField",
487
+ expected: "AutoBePrisma.IPrimaryField",
488
+ value: input.primaryField
489
+ })) && _vo3(input.primaryField, _path + ".primaryField", true && _exceptionable) || _report(_exceptionable, {
490
+ path: _path + ".primaryField",
491
+ expected: "AutoBePrisma.IPrimaryField",
492
+ value: input.primaryField
493
+ }), (Array.isArray(input.foreignFields) || _report(_exceptionable, {
494
+ path: _path + ".foreignFields",
495
+ expected: "Array<AutoBePrisma.IForeignField>",
496
+ value: input.foreignFields
497
+ })) && input.foreignFields.map((elem, _index10) => ("object" === typeof elem && null !== elem || _report(_exceptionable, {
498
+ path: _path + ".foreignFields[" + _index10 + "]",
499
+ expected: "AutoBePrisma.IForeignField",
500
+ value: elem
501
+ })) && _vo4(elem, _path + ".foreignFields[" + _index10 + "]", true && _exceptionable) || _report(_exceptionable, {
502
+ path: _path + ".foreignFields[" + _index10 + "]",
503
+ expected: "AutoBePrisma.IForeignField",
504
+ value: elem
505
+ })).every(flag => flag) || _report(_exceptionable, {
506
+ path: _path + ".foreignFields",
507
+ expected: "Array<AutoBePrisma.IForeignField>",
508
+ value: input.foreignFields
509
+ }), (Array.isArray(input.plainFields) || _report(_exceptionable, {
510
+ path: _path + ".plainFields",
511
+ expected: "Array<AutoBePrisma.IPlainField>",
512
+ value: input.plainFields
513
+ })) && input.plainFields.map((elem, _index11) => ("object" === typeof elem && null !== elem || _report(_exceptionable, {
514
+ path: _path + ".plainFields[" + _index11 + "]",
515
+ expected: "AutoBePrisma.IPlainField",
516
+ value: elem
517
+ })) && _vo6(elem, _path + ".plainFields[" + _index11 + "]", true && _exceptionable) || _report(_exceptionable, {
518
+ path: _path + ".plainFields[" + _index11 + "]",
519
+ expected: "AutoBePrisma.IPlainField",
520
+ value: elem
521
+ })).every(flag => flag) || _report(_exceptionable, {
522
+ path: _path + ".plainFields",
523
+ expected: "Array<AutoBePrisma.IPlainField>",
524
+ value: input.plainFields
525
+ }), (Array.isArray(input.uniqueIndexes) || _report(_exceptionable, {
526
+ path: _path + ".uniqueIndexes",
527
+ expected: "Array<AutoBePrisma.IUniqueIndex>",
528
+ value: input.uniqueIndexes
529
+ })) && input.uniqueIndexes.map((elem, _index12) => ("object" === typeof elem && null !== elem || _report(_exceptionable, {
530
+ path: _path + ".uniqueIndexes[" + _index12 + "]",
531
+ expected: "AutoBePrisma.IUniqueIndex",
532
+ value: elem
533
+ })) && _vo7(elem, _path + ".uniqueIndexes[" + _index12 + "]", true && _exceptionable) || _report(_exceptionable, {
534
+ path: _path + ".uniqueIndexes[" + _index12 + "]",
535
+ expected: "AutoBePrisma.IUniqueIndex",
536
+ value: elem
537
+ })).every(flag => flag) || _report(_exceptionable, {
538
+ path: _path + ".uniqueIndexes",
539
+ expected: "Array<AutoBePrisma.IUniqueIndex>",
540
+ value: input.uniqueIndexes
541
+ }), (Array.isArray(input.plainIndexes) || _report(_exceptionable, {
542
+ path: _path + ".plainIndexes",
543
+ expected: "Array<AutoBePrisma.IPlainIndex>",
544
+ value: input.plainIndexes
545
+ })) && input.plainIndexes.map((elem, _index13) => ("object" === typeof elem && null !== elem || _report(_exceptionable, {
546
+ path: _path + ".plainIndexes[" + _index13 + "]",
547
+ expected: "AutoBePrisma.IPlainIndex",
548
+ value: elem
549
+ })) && _vo8(elem, _path + ".plainIndexes[" + _index13 + "]", true && _exceptionable) || _report(_exceptionable, {
550
+ path: _path + ".plainIndexes[" + _index13 + "]",
551
+ expected: "AutoBePrisma.IPlainIndex",
552
+ value: elem
553
+ })).every(flag => flag) || _report(_exceptionable, {
554
+ path: _path + ".plainIndexes",
555
+ expected: "Array<AutoBePrisma.IPlainIndex>",
556
+ value: input.plainIndexes
557
+ }), (Array.isArray(input.ginIndexes) || _report(_exceptionable, {
558
+ path: _path + ".ginIndexes",
559
+ expected: "Array<AutoBePrisma.IGinIndex>",
560
+ value: input.ginIndexes
561
+ })) && input.ginIndexes.map((elem, _index14) => ("object" === typeof elem && null !== elem || _report(_exceptionable, {
562
+ path: _path + ".ginIndexes[" + _index14 + "]",
563
+ expected: "AutoBePrisma.IGinIndex",
564
+ value: elem
565
+ })) && _vo9(elem, _path + ".ginIndexes[" + _index14 + "]", true && _exceptionable) || _report(_exceptionable, {
566
+ path: _path + ".ginIndexes[" + _index14 + "]",
567
+ expected: "AutoBePrisma.IGinIndex",
568
+ value: elem
569
+ })).every(flag => flag) || _report(_exceptionable, {
570
+ path: _path + ".ginIndexes",
571
+ expected: "Array<AutoBePrisma.IGinIndex>",
572
+ value: input.ginIndexes
573
+ })].every(flag => flag); const _vo3 = (input, _path, _exceptionable = true) => ["string" === typeof input.name && (RegExp("^[a-z][a-z0-9_]*$").test(input.name) || _report(_exceptionable, {
574
+ path: _path + ".name",
575
+ expected: "string & Pattern<\"^[a-z][a-z0-9_]*$\">",
576
+ value: input.name
577
+ })) || _report(_exceptionable, {
578
+ path: _path + ".name",
579
+ expected: "(string & Pattern<\"^[a-z][a-z0-9_]*$\">)",
580
+ value: input.name
581
+ }), "uuid" === input.type || _report(_exceptionable, {
582
+ path: _path + ".type",
583
+ expected: "\"uuid\"",
584
+ value: input.type
585
+ }), "string" === typeof input.description || _report(_exceptionable, {
586
+ path: _path + ".description",
183
587
  expected: "string",
184
- value: input.content
588
+ value: input.description
589
+ })].every(flag => flag); const _vo4 = (input, _path, _exceptionable = true) => ["string" === typeof input.name && (RegExp("^[a-z][a-z0-9_]*$").test(input.name) || _report(_exceptionable, {
590
+ path: _path + ".name",
591
+ expected: "string & Pattern<\"^[a-z][a-z0-9_]*$\">",
592
+ value: input.name
593
+ })) || _report(_exceptionable, {
594
+ path: _path + ".name",
595
+ expected: "(string & Pattern<\"^[a-z][a-z0-9_]*$\">)",
596
+ value: input.name
597
+ }), "uuid" === input.type || _report(_exceptionable, {
598
+ path: _path + ".type",
599
+ expected: "\"uuid\"",
600
+ value: input.type
185
601
  }), "string" === typeof input.description || _report(_exceptionable, {
186
602
  path: _path + ".description",
187
603
  expected: "string",
188
604
  value: input.description
605
+ }), ("object" === typeof input.relation && null !== input.relation || _report(_exceptionable, {
606
+ path: _path + ".relation",
607
+ expected: "__type",
608
+ value: input.relation
609
+ })) && _vo5(input.relation, _path + ".relation", true && _exceptionable) || _report(_exceptionable, {
610
+ path: _path + ".relation",
611
+ expected: "__type",
612
+ value: input.relation
613
+ }), "boolean" === typeof input.unique || _report(_exceptionable, {
614
+ path: _path + ".unique",
615
+ expected: "boolean",
616
+ value: input.unique
617
+ }), "boolean" === typeof input.nullable || _report(_exceptionable, {
618
+ path: _path + ".nullable",
619
+ expected: "boolean",
620
+ value: input.nullable
621
+ })].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, {
622
+ path: _path + ".name",
623
+ expected: "string & Pattern<\"^[a-zA-Z_][a-zA-Z0-9_]*$\">",
624
+ value: input.name
625
+ })) || _report(_exceptionable, {
626
+ path: _path + ".name",
627
+ expected: "(string & Pattern<\"^[a-zA-Z_][a-zA-Z0-9_]*$\">)",
628
+ value: input.name
629
+ }), "string" === typeof input.targetModel || _report(_exceptionable, {
630
+ path: _path + ".targetModel",
631
+ expected: "string",
632
+ value: input.targetModel
633
+ })].every(flag => flag); const _vo6 = (input, _path, _exceptionable = true) => ["string" === typeof input.name && (RegExp("^[a-z][a-z0-9_]*$").test(input.name) || _report(_exceptionable, {
634
+ path: _path + ".name",
635
+ expected: "string & Pattern<\"^[a-z][a-z0-9_]*$\">",
636
+ value: input.name
637
+ })) || _report(_exceptionable, {
638
+ path: _path + ".name",
639
+ expected: "(string & Pattern<\"^[a-z][a-z0-9_]*$\">)",
640
+ value: input.name
641
+ }), "string" === input.type || "boolean" === input.type || "uuid" === input.type || "uri" === input.type || "int" === input.type || "double" === input.type || "datetime" === input.type || _report(_exceptionable, {
642
+ path: _path + ".type",
643
+ expected: "(\"boolean\" | \"datetime\" | \"double\" | \"int\" | \"string\" | \"uri\" | \"uuid\")",
644
+ value: input.type
645
+ }), "string" === typeof input.description || _report(_exceptionable, {
646
+ path: _path + ".description",
647
+ expected: "string",
648
+ value: input.description
649
+ }), "boolean" === typeof input.nullable || _report(_exceptionable, {
650
+ path: _path + ".nullable",
651
+ expected: "boolean",
652
+ value: input.nullable
653
+ })].every(flag => flag); const _vo7 = (input, _path, _exceptionable = true) => [(Array.isArray(input.fieldNames) || _report(_exceptionable, {
654
+ path: _path + ".fieldNames",
655
+ expected: "(Array<string> & MinItems<1> & UniqueItems<true>)",
656
+ value: input.fieldNames
657
+ })) && ((1 <= input.fieldNames.length || _report(_exceptionable, {
658
+ path: _path + ".fieldNames",
659
+ expected: "Array<> & MinItems<1>",
660
+ value: input.fieldNames
661
+ })) && (__typia_transform__isUniqueItems._isUniqueItems(input.fieldNames) || _report(_exceptionable, {
662
+ path: _path + ".fieldNames",
663
+ expected: "Array<> & UniqueItems<true>",
664
+ value: input.fieldNames
665
+ })) && input.fieldNames.map((elem, _index15) => "string" === typeof elem || _report(_exceptionable, {
666
+ path: _path + ".fieldNames[" + _index15 + "]",
667
+ expected: "string",
668
+ value: elem
669
+ })).every(flag => flag)) || _report(_exceptionable, {
670
+ path: _path + ".fieldNames",
671
+ expected: "(Array<string> & MinItems<1> & UniqueItems<true>)",
672
+ value: input.fieldNames
673
+ }), true === input.unique || _report(_exceptionable, {
674
+ path: _path + ".unique",
675
+ expected: "true",
676
+ value: input.unique
677
+ })].every(flag => flag); const _vo8 = (input, _path, _exceptionable = true) => [(Array.isArray(input.fieldNames) || _report(_exceptionable, {
678
+ path: _path + ".fieldNames",
679
+ expected: "(Array<string> & MinItems<1> & UniqueItems<true>)",
680
+ value: input.fieldNames
681
+ })) && ((1 <= input.fieldNames.length || _report(_exceptionable, {
682
+ path: _path + ".fieldNames",
683
+ expected: "Array<> & MinItems<1>",
684
+ value: input.fieldNames
685
+ })) && (__typia_transform__isUniqueItems._isUniqueItems(input.fieldNames) || _report(_exceptionable, {
686
+ path: _path + ".fieldNames",
687
+ expected: "Array<> & UniqueItems<true>",
688
+ value: input.fieldNames
689
+ })) && input.fieldNames.map((elem, _index16) => "string" === typeof elem || _report(_exceptionable, {
690
+ path: _path + ".fieldNames[" + _index16 + "]",
691
+ expected: "string",
692
+ value: elem
693
+ })).every(flag => flag)) || _report(_exceptionable, {
694
+ path: _path + ".fieldNames",
695
+ expected: "(Array<string> & MinItems<1> & UniqueItems<true>)",
696
+ value: input.fieldNames
697
+ })].every(flag => flag); const _vo9 = (input, _path, _exceptionable = true) => ["string" === typeof input.fieldName || _report(_exceptionable, {
698
+ path: _path + ".fieldName",
699
+ expected: "string",
700
+ value: input.fieldName
189
701
  })].every(flag => flag); const __is = input => "object" === typeof input && null !== input && _io0(input); let errors; let _report; return input => {
190
702
  if (false === __is(input)) {
191
703
  errors = [];
192
704
  _report = __typia_transform__validateReport._validateReport(errors);
193
705
  ((input, _path, _exceptionable = true) => ("object" === typeof input && null !== input || _report(true, {
194
706
  path: _path + "",
195
- expected: "IMakePrismaSchemaFilesProps",
707
+ expected: "IMakePrismaSchemaFileProps",
196
708
  value: input
197
709
  })) && _vo0(input, _path + "", true) || _report(true, {
198
710
  path: _path + "",
199
- expected: "IMakePrismaSchemaFilesProps",
711
+ expected: "IMakePrismaSchemaFileProps",
200
712
  value: input
201
713
  }))(input, "$input", true);
202
714
  const success = 0 === errors.length;
@@ -227,49 +739,568 @@ const collection = {
227
739
  },
228
740
  functions: [
229
741
  {
230
- name: "makePrismaSchemaFiles",
742
+ name: "makePrismaSchemaFile",
231
743
  parameters: {
232
- description: " Properties containing the complete set of Prisma schema files\n\n------------------------------\n\nCurrent Type: {@link IMakePrismaSchemaFilesProps}",
744
+ description: " Properties containing the file\n\n------------------------------\n\nCurrent Type: {@link IMakePrismaSchemaFileProps}",
233
745
  type: "object",
234
746
  properties: {
235
- content: {
236
- title: "Complete Prisma schema content as a single concatenated string",
237
- description: "Complete Prisma schema content as a single concatenated string.\n\nContains all schema files organized by domain/functionality with clear file\nseparators. Each file section includes models, relationships, indexes, and\ncomprehensive documentation following enterprise patterns.\n\nContent should be organized following enterprise patterns:\n\n- Main.prisma: Configuration, datasource, and generators\n- Schema-XX-domain.prisma: Domain-specific entity definitions\n- Proper cross-file relationships and dependencies",
238
- type: "string"
239
- },
240
- description: {
241
- title: "Summary description of the application requirements and business context",
242
- description: "Summary description of the application requirements and business context.",
243
- type: "string"
747
+ file: {
748
+ 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.",
749
+ type: "object",
750
+ properties: {
751
+ filename: {
752
+ title: "Name of the schema file to be generated",
753
+ description: "Name of the schema file to be generated.\n\nShould follow the naming convention: \"schema-{number}-{domain}.prisma\"\nExamples: \"schema-02-systematic.prisma\", \"schema-03-actors.prisma\" The\nnumber indicates the dependency order for schema generation.\n\n\n@pattern ^[a-zA-Z0-9._-]+\\.prisma$",
754
+ type: "string"
755
+ },
756
+ namespace: {
757
+ title: "Business domain namespace that groups related models",
758
+ 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\"",
759
+ type: "string"
760
+ },
761
+ models: {
762
+ title: "Array of Prisma models (database tables) within this domain",
763
+ 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.",
764
+ type: "array",
765
+ items: {
766
+ 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_)",
767
+ type: "object",
768
+ properties: {
769
+ name: {
770
+ title: "Name of the Prisma model (database table name)",
771
+ 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_]*$",
772
+ type: "string"
773
+ },
774
+ description: {
775
+ 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...\"",
776
+ type: "string"
777
+ },
778
+ material: {
779
+ 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",
780
+ type: "boolean"
781
+ },
782
+ primaryField: {
783
+ 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).",
784
+ type: "object",
785
+ properties: {
786
+ name: {
787
+ title: "Name of the primary key field",
788
+ 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_]*$",
789
+ type: "string"
790
+ },
791
+ type: {
792
+ title: "Data type of the primary key field",
793
+ 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.",
794
+ type: "string",
795
+ "enum": [
796
+ "uuid"
797
+ ]
798
+ },
799
+ description: {
800
+ title: "Description of the primary key field's purpose",
801
+ 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.",
802
+ type: "string"
803
+ }
804
+ },
805
+ required: [
806
+ "name",
807
+ "type",
808
+ "description"
809
+ ]
810
+ },
811
+ foreignFields: {
812
+ title: "Array of foreign key fields that reference other models",
813
+ 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.",
814
+ type: "array",
815
+ items: {
816
+ 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.",
817
+ type: "object",
818
+ properties: {
819
+ name: {
820
+ title: "Name of the foreign key field",
821
+ 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_]*$",
822
+ type: "string"
823
+ },
824
+ type: {
825
+ title: "Data type of the foreign key field",
826
+ 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.",
827
+ type: "string",
828
+ "enum": [
829
+ "uuid"
830
+ ]
831
+ },
832
+ description: {
833
+ 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.",
834
+ type: "string"
835
+ },
836
+ relation: {
837
+ title: "Prisma relation configuration defining the association details",
838
+ 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.",
839
+ type: "object",
840
+ properties: {
841
+ name: {
842
+ title: "Name of the relation property in the Prisma model",
843
+ 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_]*$",
844
+ type: "string"
845
+ },
846
+ targetModel: {
847
+ title: "Name of the target model being referenced",
848
+ 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\"",
849
+ type: "string"
850
+ }
851
+ },
852
+ required: [
853
+ "name",
854
+ "targetModel"
855
+ ]
856
+ },
857
+ unique: {
858
+ title: "Whether this foreign key has a unique constraint",
859
+ 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.",
860
+ type: "boolean"
861
+ },
862
+ nullable: {
863
+ title: "Whether this foreign key can be null (optional relationship)",
864
+ 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.",
865
+ type: "boolean"
866
+ }
867
+ },
868
+ required: [
869
+ "name",
870
+ "type",
871
+ "description",
872
+ "relation",
873
+ "unique",
874
+ "nullable"
875
+ ]
876
+ }
877
+ },
878
+ plainFields: {
879
+ title: "Array of regular data fields that don't reference other models",
880
+ 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.",
881
+ type: "array",
882
+ items: {
883
+ 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.",
884
+ type: "object",
885
+ properties: {
886
+ name: {
887
+ title: "Name of the field in the database table",
888
+ 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_]*$",
889
+ type: "string"
890
+ },
891
+ type: {
892
+ title: "Data type of the field for Prisma schema generation",
893
+ 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",
894
+ type: "string",
895
+ "enum": [
896
+ "string",
897
+ "boolean",
898
+ "uuid",
899
+ "uri",
900
+ "int",
901
+ "double",
902
+ "datetime"
903
+ ]
904
+ },
905
+ description: {
906
+ title: "Description explaining the business purpose and usage of this field",
907
+ 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.\"",
908
+ type: "string"
909
+ },
910
+ nullable: {
911
+ title: "Whether this field can contain null values",
912
+ 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.",
913
+ type: "boolean"
914
+ }
915
+ },
916
+ required: [
917
+ "name",
918
+ "type",
919
+ "description",
920
+ "nullable"
921
+ ]
922
+ }
923
+ },
924
+ uniqueIndexes: {
925
+ title: "Array of unique indexes for enforcing data integrity constraints",
926
+ 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).",
927
+ type: "array",
928
+ items: {
929
+ 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.",
930
+ type: "object",
931
+ properties: {
932
+ fieldNames: {
933
+ title: "Array of field names that together form the unique constraint",
934
+ 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",
935
+ type: "array",
936
+ items: {
937
+ type: "string"
938
+ }
939
+ },
940
+ unique: {
941
+ title: "Explicit marker indicating this is a unique index",
942
+ 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\".",
943
+ type: "boolean",
944
+ "enum": [
945
+ true
946
+ ]
947
+ }
948
+ },
949
+ required: [
950
+ "fieldNames",
951
+ "unique"
952
+ ]
953
+ }
954
+ },
955
+ plainIndexes: {
956
+ title: "Array of regular indexes for query performance optimization",
957
+ 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.",
958
+ type: "array",
959
+ items: {
960
+ 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.",
961
+ type: "object",
962
+ properties: {
963
+ fieldNames: {
964
+ title: "Array of field names to include in the performance index",
965
+ 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",
966
+ type: "array",
967
+ items: {
968
+ type: "string"
969
+ }
970
+ }
971
+ },
972
+ required: [
973
+ "fieldNames"
974
+ ]
975
+ }
976
+ },
977
+ ginIndexes: {
978
+ title: "Array of GIN (Generalized Inverted Index) indexes for full-text search",
979
+ 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.",
980
+ type: "array",
981
+ items: {
982
+ 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.",
983
+ type: "object",
984
+ properties: {
985
+ fieldName: {
986
+ title: "Name of the text field to index for full-text search capabilities",
987
+ 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.",
988
+ type: "string"
989
+ }
990
+ },
991
+ required: [
992
+ "fieldName"
993
+ ]
994
+ }
995
+ }
996
+ },
997
+ required: [
998
+ "name",
999
+ "description",
1000
+ "material",
1001
+ "primaryField",
1002
+ "foreignFields",
1003
+ "plainFields",
1004
+ "uniqueIndexes",
1005
+ "plainIndexes",
1006
+ "ginIndexes"
1007
+ ]
1008
+ }
1009
+ }
1010
+ },
1011
+ required: [
1012
+ "filename",
1013
+ "namespace",
1014
+ "models"
1015
+ ]
244
1016
  }
245
1017
  },
246
1018
  required: [
247
- "content",
248
- "description"
1019
+ "file"
249
1020
  ],
250
1021
  additionalProperties: false,
251
1022
  $defs: {}
252
1023
  },
253
1024
  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.",
254
- validate: (() => { const _io0 = input => "string" === typeof input.content && "string" === typeof input.description; const _vo0 = (input, _path, _exceptionable = true) => ["string" === typeof input.content || _report(_exceptionable, {
255
- path: _path + ".content",
1025
+ 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, {
1026
+ path: _path + ".file",
1027
+ expected: "AutoBePrisma.IFile",
1028
+ value: input.file
1029
+ })) && _vo1(input.file, _path + ".file", true && _exceptionable) || _report(_exceptionable, {
1030
+ path: _path + ".file",
1031
+ expected: "AutoBePrisma.IFile",
1032
+ value: input.file
1033
+ })].every(flag => flag); const _vo1 = (input, _path, _exceptionable = true) => ["string" === typeof input.filename && (RegExp("^[a-zA-Z0-9._-]+\\.prisma$").test(input.filename) || _report(_exceptionable, {
1034
+ path: _path + ".filename",
1035
+ expected: "string & Pattern<\"^[a-zA-Z0-9._-]+\\\\.prisma$\">",
1036
+ value: input.filename
1037
+ })) || _report(_exceptionable, {
1038
+ path: _path + ".filename",
1039
+ expected: "(string & Pattern<\"^[a-zA-Z0-9._-]+\\\\.prisma$\">)",
1040
+ value: input.filename
1041
+ }), "string" === typeof input.namespace || _report(_exceptionable, {
1042
+ path: _path + ".namespace",
256
1043
  expected: "string",
257
- value: input.content
1044
+ value: input.namespace
1045
+ }), (Array.isArray(input.models) || _report(_exceptionable, {
1046
+ path: _path + ".models",
1047
+ expected: "Array<AutoBePrisma.IModel>",
1048
+ value: input.models
1049
+ })) && input.models.map((elem, _index9) => ("object" === typeof elem && null !== elem || _report(_exceptionable, {
1050
+ path: _path + ".models[" + _index9 + "]",
1051
+ expected: "AutoBePrisma.IModel",
1052
+ value: elem
1053
+ })) && _vo2(elem, _path + ".models[" + _index9 + "]", true && _exceptionable) || _report(_exceptionable, {
1054
+ path: _path + ".models[" + _index9 + "]",
1055
+ expected: "AutoBePrisma.IModel",
1056
+ value: elem
1057
+ })).every(flag => flag) || _report(_exceptionable, {
1058
+ path: _path + ".models",
1059
+ expected: "Array<AutoBePrisma.IModel>",
1060
+ value: input.models
1061
+ })].every(flag => flag); const _vo2 = (input, _path, _exceptionable = true) => ["string" === typeof input.name && (RegExp("^[a-z][a-z0-9_]*$").test(input.name) || _report(_exceptionable, {
1062
+ path: _path + ".name",
1063
+ expected: "string & Pattern<\"^[a-z][a-z0-9_]*$\">",
1064
+ value: input.name
1065
+ })) || _report(_exceptionable, {
1066
+ path: _path + ".name",
1067
+ expected: "(string & Pattern<\"^[a-z][a-z0-9_]*$\">)",
1068
+ value: input.name
258
1069
  }), "string" === typeof input.description || _report(_exceptionable, {
259
1070
  path: _path + ".description",
260
1071
  expected: "string",
261
1072
  value: input.description
1073
+ }), "boolean" === typeof input.material || _report(_exceptionable, {
1074
+ path: _path + ".material",
1075
+ expected: "boolean",
1076
+ value: input.material
1077
+ }), ("object" === typeof input.primaryField && null !== input.primaryField || _report(_exceptionable, {
1078
+ path: _path + ".primaryField",
1079
+ expected: "AutoBePrisma.IPrimaryField",
1080
+ value: input.primaryField
1081
+ })) && _vo3(input.primaryField, _path + ".primaryField", true && _exceptionable) || _report(_exceptionable, {
1082
+ path: _path + ".primaryField",
1083
+ expected: "AutoBePrisma.IPrimaryField",
1084
+ value: input.primaryField
1085
+ }), (Array.isArray(input.foreignFields) || _report(_exceptionable, {
1086
+ path: _path + ".foreignFields",
1087
+ expected: "Array<AutoBePrisma.IForeignField>",
1088
+ value: input.foreignFields
1089
+ })) && input.foreignFields.map((elem, _index10) => ("object" === typeof elem && null !== elem || _report(_exceptionable, {
1090
+ path: _path + ".foreignFields[" + _index10 + "]",
1091
+ expected: "AutoBePrisma.IForeignField",
1092
+ value: elem
1093
+ })) && _vo4(elem, _path + ".foreignFields[" + _index10 + "]", true && _exceptionable) || _report(_exceptionable, {
1094
+ path: _path + ".foreignFields[" + _index10 + "]",
1095
+ expected: "AutoBePrisma.IForeignField",
1096
+ value: elem
1097
+ })).every(flag => flag) || _report(_exceptionable, {
1098
+ path: _path + ".foreignFields",
1099
+ expected: "Array<AutoBePrisma.IForeignField>",
1100
+ value: input.foreignFields
1101
+ }), (Array.isArray(input.plainFields) || _report(_exceptionable, {
1102
+ path: _path + ".plainFields",
1103
+ expected: "Array<AutoBePrisma.IPlainField>",
1104
+ value: input.plainFields
1105
+ })) && input.plainFields.map((elem, _index11) => ("object" === typeof elem && null !== elem || _report(_exceptionable, {
1106
+ path: _path + ".plainFields[" + _index11 + "]",
1107
+ expected: "AutoBePrisma.IPlainField",
1108
+ value: elem
1109
+ })) && _vo6(elem, _path + ".plainFields[" + _index11 + "]", true && _exceptionable) || _report(_exceptionable, {
1110
+ path: _path + ".plainFields[" + _index11 + "]",
1111
+ expected: "AutoBePrisma.IPlainField",
1112
+ value: elem
1113
+ })).every(flag => flag) || _report(_exceptionable, {
1114
+ path: _path + ".plainFields",
1115
+ expected: "Array<AutoBePrisma.IPlainField>",
1116
+ value: input.plainFields
1117
+ }), (Array.isArray(input.uniqueIndexes) || _report(_exceptionable, {
1118
+ path: _path + ".uniqueIndexes",
1119
+ expected: "Array<AutoBePrisma.IUniqueIndex>",
1120
+ value: input.uniqueIndexes
1121
+ })) && input.uniqueIndexes.map((elem, _index12) => ("object" === typeof elem && null !== elem || _report(_exceptionable, {
1122
+ path: _path + ".uniqueIndexes[" + _index12 + "]",
1123
+ expected: "AutoBePrisma.IUniqueIndex",
1124
+ value: elem
1125
+ })) && _vo7(elem, _path + ".uniqueIndexes[" + _index12 + "]", true && _exceptionable) || _report(_exceptionable, {
1126
+ path: _path + ".uniqueIndexes[" + _index12 + "]",
1127
+ expected: "AutoBePrisma.IUniqueIndex",
1128
+ value: elem
1129
+ })).every(flag => flag) || _report(_exceptionable, {
1130
+ path: _path + ".uniqueIndexes",
1131
+ expected: "Array<AutoBePrisma.IUniqueIndex>",
1132
+ value: input.uniqueIndexes
1133
+ }), (Array.isArray(input.plainIndexes) || _report(_exceptionable, {
1134
+ path: _path + ".plainIndexes",
1135
+ expected: "Array<AutoBePrisma.IPlainIndex>",
1136
+ value: input.plainIndexes
1137
+ })) && input.plainIndexes.map((elem, _index13) => ("object" === typeof elem && null !== elem || _report(_exceptionable, {
1138
+ path: _path + ".plainIndexes[" + _index13 + "]",
1139
+ expected: "AutoBePrisma.IPlainIndex",
1140
+ value: elem
1141
+ })) && _vo8(elem, _path + ".plainIndexes[" + _index13 + "]", true && _exceptionable) || _report(_exceptionable, {
1142
+ path: _path + ".plainIndexes[" + _index13 + "]",
1143
+ expected: "AutoBePrisma.IPlainIndex",
1144
+ value: elem
1145
+ })).every(flag => flag) || _report(_exceptionable, {
1146
+ path: _path + ".plainIndexes",
1147
+ expected: "Array<AutoBePrisma.IPlainIndex>",
1148
+ value: input.plainIndexes
1149
+ }), (Array.isArray(input.ginIndexes) || _report(_exceptionable, {
1150
+ path: _path + ".ginIndexes",
1151
+ expected: "Array<AutoBePrisma.IGinIndex>",
1152
+ value: input.ginIndexes
1153
+ })) && input.ginIndexes.map((elem, _index14) => ("object" === typeof elem && null !== elem || _report(_exceptionable, {
1154
+ path: _path + ".ginIndexes[" + _index14 + "]",
1155
+ expected: "AutoBePrisma.IGinIndex",
1156
+ value: elem
1157
+ })) && _vo9(elem, _path + ".ginIndexes[" + _index14 + "]", true && _exceptionable) || _report(_exceptionable, {
1158
+ path: _path + ".ginIndexes[" + _index14 + "]",
1159
+ expected: "AutoBePrisma.IGinIndex",
1160
+ value: elem
1161
+ })).every(flag => flag) || _report(_exceptionable, {
1162
+ path: _path + ".ginIndexes",
1163
+ expected: "Array<AutoBePrisma.IGinIndex>",
1164
+ value: input.ginIndexes
1165
+ })].every(flag => flag); const _vo3 = (input, _path, _exceptionable = true) => ["string" === typeof input.name && (RegExp("^[a-z][a-z0-9_]*$").test(input.name) || _report(_exceptionable, {
1166
+ path: _path + ".name",
1167
+ expected: "string & Pattern<\"^[a-z][a-z0-9_]*$\">",
1168
+ value: input.name
1169
+ })) || _report(_exceptionable, {
1170
+ path: _path + ".name",
1171
+ expected: "(string & Pattern<\"^[a-z][a-z0-9_]*$\">)",
1172
+ value: input.name
1173
+ }), "uuid" === input.type || _report(_exceptionable, {
1174
+ path: _path + ".type",
1175
+ expected: "\"uuid\"",
1176
+ value: input.type
1177
+ }), "string" === typeof input.description || _report(_exceptionable, {
1178
+ path: _path + ".description",
1179
+ expected: "string",
1180
+ value: input.description
1181
+ })].every(flag => flag); const _vo4 = (input, _path, _exceptionable = true) => ["string" === typeof input.name && (RegExp("^[a-z][a-z0-9_]*$").test(input.name) || _report(_exceptionable, {
1182
+ path: _path + ".name",
1183
+ expected: "string & Pattern<\"^[a-z][a-z0-9_]*$\">",
1184
+ value: input.name
1185
+ })) || _report(_exceptionable, {
1186
+ path: _path + ".name",
1187
+ expected: "(string & Pattern<\"^[a-z][a-z0-9_]*$\">)",
1188
+ value: input.name
1189
+ }), "uuid" === input.type || _report(_exceptionable, {
1190
+ path: _path + ".type",
1191
+ expected: "\"uuid\"",
1192
+ value: input.type
1193
+ }), "string" === typeof input.description || _report(_exceptionable, {
1194
+ path: _path + ".description",
1195
+ expected: "string",
1196
+ value: input.description
1197
+ }), ("object" === typeof input.relation && null !== input.relation || _report(_exceptionable, {
1198
+ path: _path + ".relation",
1199
+ expected: "__type",
1200
+ value: input.relation
1201
+ })) && _vo5(input.relation, _path + ".relation", true && _exceptionable) || _report(_exceptionable, {
1202
+ path: _path + ".relation",
1203
+ expected: "__type",
1204
+ value: input.relation
1205
+ }), "boolean" === typeof input.unique || _report(_exceptionable, {
1206
+ path: _path + ".unique",
1207
+ expected: "boolean",
1208
+ value: input.unique
1209
+ }), "boolean" === typeof input.nullable || _report(_exceptionable, {
1210
+ path: _path + ".nullable",
1211
+ expected: "boolean",
1212
+ value: input.nullable
1213
+ })].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, {
1214
+ path: _path + ".name",
1215
+ expected: "string & Pattern<\"^[a-zA-Z_][a-zA-Z0-9_]*$\">",
1216
+ value: input.name
1217
+ })) || _report(_exceptionable, {
1218
+ path: _path + ".name",
1219
+ expected: "(string & Pattern<\"^[a-zA-Z_][a-zA-Z0-9_]*$\">)",
1220
+ value: input.name
1221
+ }), "string" === typeof input.targetModel || _report(_exceptionable, {
1222
+ path: _path + ".targetModel",
1223
+ expected: "string",
1224
+ value: input.targetModel
1225
+ })].every(flag => flag); const _vo6 = (input, _path, _exceptionable = true) => ["string" === typeof input.name && (RegExp("^[a-z][a-z0-9_]*$").test(input.name) || _report(_exceptionable, {
1226
+ path: _path + ".name",
1227
+ expected: "string & Pattern<\"^[a-z][a-z0-9_]*$\">",
1228
+ value: input.name
1229
+ })) || _report(_exceptionable, {
1230
+ path: _path + ".name",
1231
+ expected: "(string & Pattern<\"^[a-z][a-z0-9_]*$\">)",
1232
+ value: input.name
1233
+ }), "string" === input.type || "boolean" === input.type || "uuid" === input.type || "uri" === input.type || "int" === input.type || "double" === input.type || "datetime" === input.type || _report(_exceptionable, {
1234
+ path: _path + ".type",
1235
+ expected: "(\"boolean\" | \"datetime\" | \"double\" | \"int\" | \"string\" | \"uri\" | \"uuid\")",
1236
+ value: input.type
1237
+ }), "string" === typeof input.description || _report(_exceptionable, {
1238
+ path: _path + ".description",
1239
+ expected: "string",
1240
+ value: input.description
1241
+ }), "boolean" === typeof input.nullable || _report(_exceptionable, {
1242
+ path: _path + ".nullable",
1243
+ expected: "boolean",
1244
+ value: input.nullable
1245
+ })].every(flag => flag); const _vo7 = (input, _path, _exceptionable = true) => [(Array.isArray(input.fieldNames) || _report(_exceptionable, {
1246
+ path: _path + ".fieldNames",
1247
+ expected: "(Array<string> & MinItems<1> & UniqueItems<true>)",
1248
+ value: input.fieldNames
1249
+ })) && ((1 <= input.fieldNames.length || _report(_exceptionable, {
1250
+ path: _path + ".fieldNames",
1251
+ expected: "Array<> & MinItems<1>",
1252
+ value: input.fieldNames
1253
+ })) && (__typia_transform__isUniqueItems._isUniqueItems(input.fieldNames) || _report(_exceptionable, {
1254
+ path: _path + ".fieldNames",
1255
+ expected: "Array<> & UniqueItems<true>",
1256
+ value: input.fieldNames
1257
+ })) && input.fieldNames.map((elem, _index15) => "string" === typeof elem || _report(_exceptionable, {
1258
+ path: _path + ".fieldNames[" + _index15 + "]",
1259
+ expected: "string",
1260
+ value: elem
1261
+ })).every(flag => flag)) || _report(_exceptionable, {
1262
+ path: _path + ".fieldNames",
1263
+ expected: "(Array<string> & MinItems<1> & UniqueItems<true>)",
1264
+ value: input.fieldNames
1265
+ }), true === input.unique || _report(_exceptionable, {
1266
+ path: _path + ".unique",
1267
+ expected: "true",
1268
+ value: input.unique
1269
+ })].every(flag => flag); const _vo8 = (input, _path, _exceptionable = true) => [(Array.isArray(input.fieldNames) || _report(_exceptionable, {
1270
+ path: _path + ".fieldNames",
1271
+ expected: "(Array<string> & MinItems<1> & UniqueItems<true>)",
1272
+ value: input.fieldNames
1273
+ })) && ((1 <= input.fieldNames.length || _report(_exceptionable, {
1274
+ path: _path + ".fieldNames",
1275
+ expected: "Array<> & MinItems<1>",
1276
+ value: input.fieldNames
1277
+ })) && (__typia_transform__isUniqueItems._isUniqueItems(input.fieldNames) || _report(_exceptionable, {
1278
+ path: _path + ".fieldNames",
1279
+ expected: "Array<> & UniqueItems<true>",
1280
+ value: input.fieldNames
1281
+ })) && input.fieldNames.map((elem, _index16) => "string" === typeof elem || _report(_exceptionable, {
1282
+ path: _path + ".fieldNames[" + _index16 + "]",
1283
+ expected: "string",
1284
+ value: elem
1285
+ })).every(flag => flag)) || _report(_exceptionable, {
1286
+ path: _path + ".fieldNames",
1287
+ expected: "(Array<string> & MinItems<1> & UniqueItems<true>)",
1288
+ value: input.fieldNames
1289
+ })].every(flag => flag); const _vo9 = (input, _path, _exceptionable = true) => ["string" === typeof input.fieldName || _report(_exceptionable, {
1290
+ path: _path + ".fieldName",
1291
+ expected: "string",
1292
+ value: input.fieldName
262
1293
  })].every(flag => flag); const __is = input => "object" === typeof input && null !== input && _io0(input); let errors; let _report; return input => {
263
1294
  if (false === __is(input)) {
264
1295
  errors = [];
265
1296
  _report = __typia_transform__validateReport._validateReport(errors);
266
1297
  ((input, _path, _exceptionable = true) => ("object" === typeof input && null !== input || _report(true, {
267
1298
  path: _path + "",
268
- expected: "IMakePrismaSchemaFilesProps",
1299
+ expected: "IMakePrismaSchemaFileProps",
269
1300
  value: input
270
1301
  })) && _vo0(input, _path + "", true) || _report(true, {
271
1302
  path: _path + "",
272
- expected: "IMakePrismaSchemaFilesProps",
1303
+ expected: "IMakePrismaSchemaFileProps",
273
1304
  value: input
274
1305
  }))(input, "$input", true);
275
1306
  const success = 0 === errors.length;
@@ -303,48 +1334,586 @@ const collection = {
303
1334
  },
304
1335
  functions: [
305
1336
  {
306
- name: "makePrismaSchemaFiles",
1337
+ name: "makePrismaSchemaFile",
307
1338
  parameters: {
308
1339
  type: "object",
309
1340
  properties: {
310
- content: {
311
- type: "string",
312
- title: "Complete Prisma schema content as a single concatenated string",
313
- description: "Complete Prisma schema content as a single concatenated string.\n\nContains all schema files organized by domain/functionality with clear file\nseparators. Each file section includes models, relationships, indexes, and\ncomprehensive documentation following enterprise patterns.\n\nContent should be organized following enterprise patterns:\n\n- Main.prisma: Configuration, datasource, and generators\n- Schema-XX-domain.prisma: Domain-specific entity definitions\n- Proper cross-file relationships and dependencies"
314
- },
315
- description: {
316
- type: "string",
317
- title: "Summary description of the application requirements and business context",
318
- description: "Summary description of the application requirements and business context."
1341
+ file: {
1342
+ type: "object",
1343
+ properties: {
1344
+ filename: {
1345
+ type: "string",
1346
+ pattern: "^[a-zA-Z0-9._-]+\\.prisma$",
1347
+ title: "Name of the schema file to be generated",
1348
+ 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."
1349
+ },
1350
+ namespace: {
1351
+ type: "string",
1352
+ title: "Business domain namespace that groups related models",
1353
+ 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\""
1354
+ },
1355
+ models: {
1356
+ type: "array",
1357
+ items: {
1358
+ type: "object",
1359
+ properties: {
1360
+ name: {
1361
+ type: "string",
1362
+ pattern: "^[a-z][a-z0-9_]*$",
1363
+ title: "Name of the Prisma model (database table name)",
1364
+ 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\""
1365
+ },
1366
+ description: {
1367
+ type: "string",
1368
+ 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...\""
1369
+ },
1370
+ material: {
1371
+ type: "boolean",
1372
+ 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"
1373
+ },
1374
+ primaryField: {
1375
+ type: "object",
1376
+ properties: {
1377
+ name: {
1378
+ type: "string",
1379
+ pattern: "^[a-z][a-z0-9_]*$",
1380
+ title: "Name of the primary key field",
1381
+ 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."
1382
+ },
1383
+ type: {
1384
+ type: "string",
1385
+ "enum": [
1386
+ "uuid"
1387
+ ],
1388
+ title: "Data type of the primary key field",
1389
+ 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."
1390
+ },
1391
+ description: {
1392
+ type: "string",
1393
+ title: "Description of the primary key field's purpose",
1394
+ 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."
1395
+ }
1396
+ },
1397
+ required: [
1398
+ "name",
1399
+ "type",
1400
+ "description"
1401
+ ],
1402
+ 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).",
1403
+ additionalProperties: false
1404
+ },
1405
+ foreignFields: {
1406
+ type: "array",
1407
+ items: {
1408
+ type: "object",
1409
+ properties: {
1410
+ name: {
1411
+ type: "string",
1412
+ pattern: "^[a-z][a-z0-9_]*$",
1413
+ title: "Name of the foreign key field",
1414
+ 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)"
1415
+ },
1416
+ type: {
1417
+ type: "string",
1418
+ "enum": [
1419
+ "uuid"
1420
+ ],
1421
+ title: "Data type of the foreign key field",
1422
+ 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."
1423
+ },
1424
+ description: {
1425
+ type: "string",
1426
+ 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."
1427
+ },
1428
+ relation: {
1429
+ type: "object",
1430
+ properties: {
1431
+ name: {
1432
+ type: "string",
1433
+ pattern: "^[a-zA-Z_][a-zA-Z0-9_]*$",
1434
+ title: "Name of the relation property in the Prisma model",
1435
+ 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\""
1436
+ },
1437
+ targetModel: {
1438
+ type: "string",
1439
+ title: "Name of the target model being referenced",
1440
+ 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\""
1441
+ }
1442
+ },
1443
+ required: [
1444
+ "name",
1445
+ "targetModel"
1446
+ ],
1447
+ title: "Prisma relation configuration defining the association details",
1448
+ 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.",
1449
+ additionalProperties: false
1450
+ },
1451
+ unique: {
1452
+ type: "boolean",
1453
+ title: "Whether this foreign key has a unique constraint",
1454
+ 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."
1455
+ },
1456
+ nullable: {
1457
+ type: "boolean",
1458
+ title: "Whether this foreign key can be null (optional relationship)",
1459
+ 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."
1460
+ }
1461
+ },
1462
+ required: [
1463
+ "name",
1464
+ "type",
1465
+ "description",
1466
+ "relation",
1467
+ "unique",
1468
+ "nullable"
1469
+ ],
1470
+ 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.",
1471
+ additionalProperties: false
1472
+ },
1473
+ title: "Array of foreign key fields that reference other models",
1474
+ 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."
1475
+ },
1476
+ plainFields: {
1477
+ type: "array",
1478
+ items: {
1479
+ type: "object",
1480
+ properties: {
1481
+ name: {
1482
+ type: "string",
1483
+ pattern: "^[a-z][a-z0-9_]*$",
1484
+ title: "Name of the field in the database table",
1485
+ 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"
1486
+ },
1487
+ type: {
1488
+ type: "string",
1489
+ "enum": [
1490
+ "string",
1491
+ "boolean",
1492
+ "uuid",
1493
+ "uri",
1494
+ "int",
1495
+ "double",
1496
+ "datetime"
1497
+ ],
1498
+ title: "Data type of the field for Prisma schema generation",
1499
+ 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"
1500
+ },
1501
+ description: {
1502
+ type: "string",
1503
+ title: "Description explaining the business purpose and usage of this field",
1504
+ 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.\""
1505
+ },
1506
+ nullable: {
1507
+ type: "boolean",
1508
+ title: "Whether this field can contain null values",
1509
+ 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."
1510
+ }
1511
+ },
1512
+ required: [
1513
+ "name",
1514
+ "type",
1515
+ "description",
1516
+ "nullable"
1517
+ ],
1518
+ 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.",
1519
+ additionalProperties: false
1520
+ },
1521
+ title: "Array of regular data fields that don't reference other models",
1522
+ 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."
1523
+ },
1524
+ uniqueIndexes: {
1525
+ type: "array",
1526
+ items: {
1527
+ type: "object",
1528
+ properties: {
1529
+ fieldNames: {
1530
+ type: "array",
1531
+ items: {
1532
+ type: "string"
1533
+ },
1534
+ minItems: 1,
1535
+ uniqueItems: true,
1536
+ title: "Array of field names that together form the unique constraint",
1537
+ 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\"]"
1538
+ },
1539
+ unique: {
1540
+ type: "boolean",
1541
+ "enum": [
1542
+ true
1543
+ ],
1544
+ title: "Explicit marker indicating this is a unique index",
1545
+ 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\"."
1546
+ }
1547
+ },
1548
+ required: [
1549
+ "fieldNames",
1550
+ "unique"
1551
+ ],
1552
+ 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.",
1553
+ additionalProperties: false
1554
+ },
1555
+ title: "Array of unique indexes for enforcing data integrity constraints",
1556
+ 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)."
1557
+ },
1558
+ plainIndexes: {
1559
+ type: "array",
1560
+ items: {
1561
+ type: "object",
1562
+ properties: {
1563
+ fieldNames: {
1564
+ type: "array",
1565
+ items: {
1566
+ type: "string"
1567
+ },
1568
+ minItems: 1,
1569
+ uniqueItems: true,
1570
+ title: "Array of field names to include in the performance index",
1571
+ 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\"]"
1572
+ }
1573
+ },
1574
+ required: [
1575
+ "fieldNames"
1576
+ ],
1577
+ 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.",
1578
+ additionalProperties: false
1579
+ },
1580
+ title: "Array of regular indexes for query performance optimization",
1581
+ 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."
1582
+ },
1583
+ ginIndexes: {
1584
+ type: "array",
1585
+ items: {
1586
+ type: "object",
1587
+ properties: {
1588
+ fieldName: {
1589
+ type: "string",
1590
+ title: "Name of the text field to index for full-text search capabilities",
1591
+ 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."
1592
+ }
1593
+ },
1594
+ required: [
1595
+ "fieldName"
1596
+ ],
1597
+ 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.",
1598
+ additionalProperties: false
1599
+ },
1600
+ title: "Array of GIN (Generalized Inverted Index) indexes for full-text search",
1601
+ 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."
1602
+ }
1603
+ },
1604
+ required: [
1605
+ "name",
1606
+ "description",
1607
+ "material",
1608
+ "primaryField",
1609
+ "foreignFields",
1610
+ "plainFields",
1611
+ "uniqueIndexes",
1612
+ "plainIndexes",
1613
+ "ginIndexes"
1614
+ ],
1615
+ 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_)",
1616
+ additionalProperties: false
1617
+ },
1618
+ title: "Array of Prisma models (database tables) within this domain",
1619
+ 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."
1620
+ }
1621
+ },
1622
+ required: [
1623
+ "filename",
1624
+ "namespace",
1625
+ "models"
1626
+ ],
1627
+ 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.",
1628
+ additionalProperties: false
319
1629
  }
320
1630
  },
321
1631
  required: [
322
- "content",
323
- "description"
1632
+ "file"
324
1633
  ],
325
- description: " Properties containing the complete set of Prisma schema files\n\n------------------------------\n\nCurrent Type: {@link IMakePrismaSchemaFilesProps}",
1634
+ description: " Properties containing the file\n\n------------------------------\n\nCurrent Type: {@link IMakePrismaSchemaFileProps}",
326
1635
  additionalProperties: false
327
1636
  },
328
1637
  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.",
329
- validate: (() => { const _io0 = input => "string" === typeof input.content && "string" === typeof input.description; const _vo0 = (input, _path, _exceptionable = true) => ["string" === typeof input.content || _report(_exceptionable, {
330
- path: _path + ".content",
1638
+ 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, {
1639
+ path: _path + ".file",
1640
+ expected: "AutoBePrisma.IFile",
1641
+ value: input.file
1642
+ })) && _vo1(input.file, _path + ".file", true && _exceptionable) || _report(_exceptionable, {
1643
+ path: _path + ".file",
1644
+ expected: "AutoBePrisma.IFile",
1645
+ value: input.file
1646
+ })].every(flag => flag); const _vo1 = (input, _path, _exceptionable = true) => ["string" === typeof input.filename && (RegExp("^[a-zA-Z0-9._-]+\\.prisma$").test(input.filename) || _report(_exceptionable, {
1647
+ path: _path + ".filename",
1648
+ expected: "string & Pattern<\"^[a-zA-Z0-9._-]+\\\\.prisma$\">",
1649
+ value: input.filename
1650
+ })) || _report(_exceptionable, {
1651
+ path: _path + ".filename",
1652
+ expected: "(string & Pattern<\"^[a-zA-Z0-9._-]+\\\\.prisma$\">)",
1653
+ value: input.filename
1654
+ }), "string" === typeof input.namespace || _report(_exceptionable, {
1655
+ path: _path + ".namespace",
1656
+ expected: "string",
1657
+ value: input.namespace
1658
+ }), (Array.isArray(input.models) || _report(_exceptionable, {
1659
+ path: _path + ".models",
1660
+ expected: "Array<AutoBePrisma.IModel>",
1661
+ value: input.models
1662
+ })) && input.models.map((elem, _index9) => ("object" === typeof elem && null !== elem || _report(_exceptionable, {
1663
+ path: _path + ".models[" + _index9 + "]",
1664
+ expected: "AutoBePrisma.IModel",
1665
+ value: elem
1666
+ })) && _vo2(elem, _path + ".models[" + _index9 + "]", true && _exceptionable) || _report(_exceptionable, {
1667
+ path: _path + ".models[" + _index9 + "]",
1668
+ expected: "AutoBePrisma.IModel",
1669
+ value: elem
1670
+ })).every(flag => flag) || _report(_exceptionable, {
1671
+ path: _path + ".models",
1672
+ expected: "Array<AutoBePrisma.IModel>",
1673
+ value: input.models
1674
+ })].every(flag => flag); const _vo2 = (input, _path, _exceptionable = true) => ["string" === typeof input.name && (RegExp("^[a-z][a-z0-9_]*$").test(input.name) || _report(_exceptionable, {
1675
+ path: _path + ".name",
1676
+ expected: "string & Pattern<\"^[a-z][a-z0-9_]*$\">",
1677
+ value: input.name
1678
+ })) || _report(_exceptionable, {
1679
+ path: _path + ".name",
1680
+ expected: "(string & Pattern<\"^[a-z][a-z0-9_]*$\">)",
1681
+ value: input.name
1682
+ }), "string" === typeof input.description || _report(_exceptionable, {
1683
+ path: _path + ".description",
331
1684
  expected: "string",
332
- value: input.content
1685
+ value: input.description
1686
+ }), "boolean" === typeof input.material || _report(_exceptionable, {
1687
+ path: _path + ".material",
1688
+ expected: "boolean",
1689
+ value: input.material
1690
+ }), ("object" === typeof input.primaryField && null !== input.primaryField || _report(_exceptionable, {
1691
+ path: _path + ".primaryField",
1692
+ expected: "AutoBePrisma.IPrimaryField",
1693
+ value: input.primaryField
1694
+ })) && _vo3(input.primaryField, _path + ".primaryField", true && _exceptionable) || _report(_exceptionable, {
1695
+ path: _path + ".primaryField",
1696
+ expected: "AutoBePrisma.IPrimaryField",
1697
+ value: input.primaryField
1698
+ }), (Array.isArray(input.foreignFields) || _report(_exceptionable, {
1699
+ path: _path + ".foreignFields",
1700
+ expected: "Array<AutoBePrisma.IForeignField>",
1701
+ value: input.foreignFields
1702
+ })) && input.foreignFields.map((elem, _index10) => ("object" === typeof elem && null !== elem || _report(_exceptionable, {
1703
+ path: _path + ".foreignFields[" + _index10 + "]",
1704
+ expected: "AutoBePrisma.IForeignField",
1705
+ value: elem
1706
+ })) && _vo4(elem, _path + ".foreignFields[" + _index10 + "]", true && _exceptionable) || _report(_exceptionable, {
1707
+ path: _path + ".foreignFields[" + _index10 + "]",
1708
+ expected: "AutoBePrisma.IForeignField",
1709
+ value: elem
1710
+ })).every(flag => flag) || _report(_exceptionable, {
1711
+ path: _path + ".foreignFields",
1712
+ expected: "Array<AutoBePrisma.IForeignField>",
1713
+ value: input.foreignFields
1714
+ }), (Array.isArray(input.plainFields) || _report(_exceptionable, {
1715
+ path: _path + ".plainFields",
1716
+ expected: "Array<AutoBePrisma.IPlainField>",
1717
+ value: input.plainFields
1718
+ })) && input.plainFields.map((elem, _index11) => ("object" === typeof elem && null !== elem || _report(_exceptionable, {
1719
+ path: _path + ".plainFields[" + _index11 + "]",
1720
+ expected: "AutoBePrisma.IPlainField",
1721
+ value: elem
1722
+ })) && _vo6(elem, _path + ".plainFields[" + _index11 + "]", true && _exceptionable) || _report(_exceptionable, {
1723
+ path: _path + ".plainFields[" + _index11 + "]",
1724
+ expected: "AutoBePrisma.IPlainField",
1725
+ value: elem
1726
+ })).every(flag => flag) || _report(_exceptionable, {
1727
+ path: _path + ".plainFields",
1728
+ expected: "Array<AutoBePrisma.IPlainField>",
1729
+ value: input.plainFields
1730
+ }), (Array.isArray(input.uniqueIndexes) || _report(_exceptionable, {
1731
+ path: _path + ".uniqueIndexes",
1732
+ expected: "Array<AutoBePrisma.IUniqueIndex>",
1733
+ value: input.uniqueIndexes
1734
+ })) && input.uniqueIndexes.map((elem, _index12) => ("object" === typeof elem && null !== elem || _report(_exceptionable, {
1735
+ path: _path + ".uniqueIndexes[" + _index12 + "]",
1736
+ expected: "AutoBePrisma.IUniqueIndex",
1737
+ value: elem
1738
+ })) && _vo7(elem, _path + ".uniqueIndexes[" + _index12 + "]", true && _exceptionable) || _report(_exceptionable, {
1739
+ path: _path + ".uniqueIndexes[" + _index12 + "]",
1740
+ expected: "AutoBePrisma.IUniqueIndex",
1741
+ value: elem
1742
+ })).every(flag => flag) || _report(_exceptionable, {
1743
+ path: _path + ".uniqueIndexes",
1744
+ expected: "Array<AutoBePrisma.IUniqueIndex>",
1745
+ value: input.uniqueIndexes
1746
+ }), (Array.isArray(input.plainIndexes) || _report(_exceptionable, {
1747
+ path: _path + ".plainIndexes",
1748
+ expected: "Array<AutoBePrisma.IPlainIndex>",
1749
+ value: input.plainIndexes
1750
+ })) && input.plainIndexes.map((elem, _index13) => ("object" === typeof elem && null !== elem || _report(_exceptionable, {
1751
+ path: _path + ".plainIndexes[" + _index13 + "]",
1752
+ expected: "AutoBePrisma.IPlainIndex",
1753
+ value: elem
1754
+ })) && _vo8(elem, _path + ".plainIndexes[" + _index13 + "]", true && _exceptionable) || _report(_exceptionable, {
1755
+ path: _path + ".plainIndexes[" + _index13 + "]",
1756
+ expected: "AutoBePrisma.IPlainIndex",
1757
+ value: elem
1758
+ })).every(flag => flag) || _report(_exceptionable, {
1759
+ path: _path + ".plainIndexes",
1760
+ expected: "Array<AutoBePrisma.IPlainIndex>",
1761
+ value: input.plainIndexes
1762
+ }), (Array.isArray(input.ginIndexes) || _report(_exceptionable, {
1763
+ path: _path + ".ginIndexes",
1764
+ expected: "Array<AutoBePrisma.IGinIndex>",
1765
+ value: input.ginIndexes
1766
+ })) && input.ginIndexes.map((elem, _index14) => ("object" === typeof elem && null !== elem || _report(_exceptionable, {
1767
+ path: _path + ".ginIndexes[" + _index14 + "]",
1768
+ expected: "AutoBePrisma.IGinIndex",
1769
+ value: elem
1770
+ })) && _vo9(elem, _path + ".ginIndexes[" + _index14 + "]", true && _exceptionable) || _report(_exceptionable, {
1771
+ path: _path + ".ginIndexes[" + _index14 + "]",
1772
+ expected: "AutoBePrisma.IGinIndex",
1773
+ value: elem
1774
+ })).every(flag => flag) || _report(_exceptionable, {
1775
+ path: _path + ".ginIndexes",
1776
+ expected: "Array<AutoBePrisma.IGinIndex>",
1777
+ value: input.ginIndexes
1778
+ })].every(flag => flag); const _vo3 = (input, _path, _exceptionable = true) => ["string" === typeof input.name && (RegExp("^[a-z][a-z0-9_]*$").test(input.name) || _report(_exceptionable, {
1779
+ path: _path + ".name",
1780
+ expected: "string & Pattern<\"^[a-z][a-z0-9_]*$\">",
1781
+ value: input.name
1782
+ })) || _report(_exceptionable, {
1783
+ path: _path + ".name",
1784
+ expected: "(string & Pattern<\"^[a-z][a-z0-9_]*$\">)",
1785
+ value: input.name
1786
+ }), "uuid" === input.type || _report(_exceptionable, {
1787
+ path: _path + ".type",
1788
+ expected: "\"uuid\"",
1789
+ value: input.type
333
1790
  }), "string" === typeof input.description || _report(_exceptionable, {
334
1791
  path: _path + ".description",
335
1792
  expected: "string",
336
1793
  value: input.description
1794
+ })].every(flag => flag); const _vo4 = (input, _path, _exceptionable = true) => ["string" === typeof input.name && (RegExp("^[a-z][a-z0-9_]*$").test(input.name) || _report(_exceptionable, {
1795
+ path: _path + ".name",
1796
+ expected: "string & Pattern<\"^[a-z][a-z0-9_]*$\">",
1797
+ value: input.name
1798
+ })) || _report(_exceptionable, {
1799
+ path: _path + ".name",
1800
+ expected: "(string & Pattern<\"^[a-z][a-z0-9_]*$\">)",
1801
+ value: input.name
1802
+ }), "uuid" === input.type || _report(_exceptionable, {
1803
+ path: _path + ".type",
1804
+ expected: "\"uuid\"",
1805
+ value: input.type
1806
+ }), "string" === typeof input.description || _report(_exceptionable, {
1807
+ path: _path + ".description",
1808
+ expected: "string",
1809
+ value: input.description
1810
+ }), ("object" === typeof input.relation && null !== input.relation || _report(_exceptionable, {
1811
+ path: _path + ".relation",
1812
+ expected: "__type",
1813
+ value: input.relation
1814
+ })) && _vo5(input.relation, _path + ".relation", true && _exceptionable) || _report(_exceptionable, {
1815
+ path: _path + ".relation",
1816
+ expected: "__type",
1817
+ value: input.relation
1818
+ }), "boolean" === typeof input.unique || _report(_exceptionable, {
1819
+ path: _path + ".unique",
1820
+ expected: "boolean",
1821
+ value: input.unique
1822
+ }), "boolean" === typeof input.nullable || _report(_exceptionable, {
1823
+ path: _path + ".nullable",
1824
+ expected: "boolean",
1825
+ value: input.nullable
1826
+ })].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, {
1827
+ path: _path + ".name",
1828
+ expected: "string & Pattern<\"^[a-zA-Z_][a-zA-Z0-9_]*$\">",
1829
+ value: input.name
1830
+ })) || _report(_exceptionable, {
1831
+ path: _path + ".name",
1832
+ expected: "(string & Pattern<\"^[a-zA-Z_][a-zA-Z0-9_]*$\">)",
1833
+ value: input.name
1834
+ }), "string" === typeof input.targetModel || _report(_exceptionable, {
1835
+ path: _path + ".targetModel",
1836
+ expected: "string",
1837
+ value: input.targetModel
1838
+ })].every(flag => flag); const _vo6 = (input, _path, _exceptionable = true) => ["string" === typeof input.name && (RegExp("^[a-z][a-z0-9_]*$").test(input.name) || _report(_exceptionable, {
1839
+ path: _path + ".name",
1840
+ expected: "string & Pattern<\"^[a-z][a-z0-9_]*$\">",
1841
+ value: input.name
1842
+ })) || _report(_exceptionable, {
1843
+ path: _path + ".name",
1844
+ expected: "(string & Pattern<\"^[a-z][a-z0-9_]*$\">)",
1845
+ value: input.name
1846
+ }), "string" === input.type || "boolean" === input.type || "uuid" === input.type || "uri" === input.type || "int" === input.type || "double" === input.type || "datetime" === input.type || _report(_exceptionable, {
1847
+ path: _path + ".type",
1848
+ expected: "(\"boolean\" | \"datetime\" | \"double\" | \"int\" | \"string\" | \"uri\" | \"uuid\")",
1849
+ value: input.type
1850
+ }), "string" === typeof input.description || _report(_exceptionable, {
1851
+ path: _path + ".description",
1852
+ expected: "string",
1853
+ value: input.description
1854
+ }), "boolean" === typeof input.nullable || _report(_exceptionable, {
1855
+ path: _path + ".nullable",
1856
+ expected: "boolean",
1857
+ value: input.nullable
1858
+ })].every(flag => flag); const _vo7 = (input, _path, _exceptionable = true) => [(Array.isArray(input.fieldNames) || _report(_exceptionable, {
1859
+ path: _path + ".fieldNames",
1860
+ expected: "(Array<string> & MinItems<1> & UniqueItems<true>)",
1861
+ value: input.fieldNames
1862
+ })) && ((1 <= input.fieldNames.length || _report(_exceptionable, {
1863
+ path: _path + ".fieldNames",
1864
+ expected: "Array<> & MinItems<1>",
1865
+ value: input.fieldNames
1866
+ })) && (__typia_transform__isUniqueItems._isUniqueItems(input.fieldNames) || _report(_exceptionable, {
1867
+ path: _path + ".fieldNames",
1868
+ expected: "Array<> & UniqueItems<true>",
1869
+ value: input.fieldNames
1870
+ })) && input.fieldNames.map((elem, _index15) => "string" === typeof elem || _report(_exceptionable, {
1871
+ path: _path + ".fieldNames[" + _index15 + "]",
1872
+ expected: "string",
1873
+ value: elem
1874
+ })).every(flag => flag)) || _report(_exceptionable, {
1875
+ path: _path + ".fieldNames",
1876
+ expected: "(Array<string> & MinItems<1> & UniqueItems<true>)",
1877
+ value: input.fieldNames
1878
+ }), true === input.unique || _report(_exceptionable, {
1879
+ path: _path + ".unique",
1880
+ expected: "true",
1881
+ value: input.unique
1882
+ })].every(flag => flag); const _vo8 = (input, _path, _exceptionable = true) => [(Array.isArray(input.fieldNames) || _report(_exceptionable, {
1883
+ path: _path + ".fieldNames",
1884
+ expected: "(Array<string> & MinItems<1> & UniqueItems<true>)",
1885
+ value: input.fieldNames
1886
+ })) && ((1 <= input.fieldNames.length || _report(_exceptionable, {
1887
+ path: _path + ".fieldNames",
1888
+ expected: "Array<> & MinItems<1>",
1889
+ value: input.fieldNames
1890
+ })) && (__typia_transform__isUniqueItems._isUniqueItems(input.fieldNames) || _report(_exceptionable, {
1891
+ path: _path + ".fieldNames",
1892
+ expected: "Array<> & UniqueItems<true>",
1893
+ value: input.fieldNames
1894
+ })) && input.fieldNames.map((elem, _index16) => "string" === typeof elem || _report(_exceptionable, {
1895
+ path: _path + ".fieldNames[" + _index16 + "]",
1896
+ expected: "string",
1897
+ value: elem
1898
+ })).every(flag => flag)) || _report(_exceptionable, {
1899
+ path: _path + ".fieldNames",
1900
+ expected: "(Array<string> & MinItems<1> & UniqueItems<true>)",
1901
+ value: input.fieldNames
1902
+ })].every(flag => flag); const _vo9 = (input, _path, _exceptionable = true) => ["string" === typeof input.fieldName || _report(_exceptionable, {
1903
+ path: _path + ".fieldName",
1904
+ expected: "string",
1905
+ value: input.fieldName
337
1906
  })].every(flag => flag); const __is = input => "object" === typeof input && null !== input && _io0(input); let errors; let _report; return input => {
338
1907
  if (false === __is(input)) {
339
1908
  errors = [];
340
1909
  _report = __typia_transform__validateReport._validateReport(errors);
341
1910
  ((input, _path, _exceptionable = true) => ("object" === typeof input && null !== input || _report(true, {
342
1911
  path: _path + "",
343
- expected: "IMakePrismaSchemaFilesProps",
1912
+ expected: "IMakePrismaSchemaFileProps",
344
1913
  value: input
345
1914
  })) && _vo0(input, _path + "", true) || _report(true, {
346
1915
  path: _path + "",
347
- expected: "IMakePrismaSchemaFilesProps",
1916
+ expected: "IMakePrismaSchemaFileProps",
348
1917
  value: input
349
1918
  }))(input, "$input", true);
350
1919
  const success = 0 === errors.length;