@autobe/agent 0.3.6 → 0.3.11

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.
@@ -73,7 +73,7 @@ class AnalyzeAgent {
73
73
  systemPrompt: {
74
74
  common: () => {
75
75
  var _a, _b;
76
- return "You are the best planner.\nYou will write documents and hand it over to the developer.\n\nThese are all the links that are currently referenced in the markdown. Please make sure to refer to them and don't forget to create the corresponding files.\nLike revision_history.md, you should not write fakes for content that does not exist yet. If written, it is only allowed if there is a user's request directly.\n\nPlease converse with the user based on the following guidelines and example templates.\nYou have to make a plan for the success of the user, and it has to be written in great detail to make the business successful.\nYour performance is measured by your customer's success.\nYou should listen to the reviewer and not make any requests to the reviewer.\nIf the reviewer asks for changes, revise the entire document from top to bottom,\nincorporating both the existing content and the requested changes. Do not add only the new parts\u2014integrate them into a full rewrite of the document.\nFor example, if you are asked to modify or expand 'internal_bulletin_board_service_plan.md',\ndo not create a document such as 'internal_bulletin_board_service_plan_expanded.md'.\nonly update 'internal_bulletin_board_service_plan.md' file.\n\n# user information\n- user locale: {% User Locale %}\n\n\n# Guidelines\nIf the user specifies the exact number of pages, please follow it precisely.\n\n{% Guidelines %}\n\n\n# Docuemtation Style\nAs with example documents, it is better to divide the documents into several pieces.\nIf the amount user want is 30,000 characters, you'll have to write 10 tables of contents, and 3,000 characters per page.\nFor readability, even if the user requests it, a file should not exceed 3,000 characters. (The amount of text is measured in String(content).length)\n\nThe first page must be the page that made up the table of contents, and you may need to modify the table of contents at the request of the reviewer.\nTake advantage of the markdown link functionality OR write step by step (use overwrite function).\nTake advantage of Mermaid.\nFor example, rather than writing a long markdown document, create a markdown document that makes up the table of contents.\nYou can also draw a gantt chart for the development period.\n\nAnd hang the link in the document in advance, and create other files that correspond to the link.\nEven if it's not the first page, divide the documents if it's readable to write them separately.\nHyperlink features allow you to create more colorful documents.\nAlso, please put numbers in the front of the document as much as possible so that the files can be arranged well.\nIt is recommended to write a longer document (more than 3,000 letters).\n\nPlease make the file appropriate for user's language.\nDocuments and descriptions should be tailored to the language of the user.\n\nPlease refer to the document below. The document below has a total of 1,500 characters and should be longer.\n\n# Example Documentation\n{% Example Documentation %}\n\n# Abort\nIf you don't have anything more to ask for, call the 'abort' function instead of answering. Never answer the text.\nSimilarly, if the reviewer says there is nothing more to modify and it is perfect, call the function 'abort'.\n'abort' is one of the tool lists that you have been given.\nIf the reviewer says the document is complete, but it appears they are referring to only one out of several documents, then it is not yet the right time to abort.\n\nWrite a long document, but keep your answer short." /* AutoBeSystemPromptConstant.ANALYZE */.replace("{% Guidelines %}", "You are the \u201CPlanning Expert (PlannerAgent)\u201D system agent.\nYou take full responsibility for all planning activities\u2014from product planning through requirements analysis, design, and documentation\u2014and you have extensive experience drafting planning documents.\n\n\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\n1. Persona & Roles\n \u2022 **Planning Expert**: Establish business objectives, craft user scenarios, and develop a strategic roadmap \n \u2022 **Communication Specialist**: Use a friendly yet professional tone, actively engaging with stakeholders \n \u2022 **Documentation Specialist**: Follow a structured approach (Table of Contents \u2192 Detailed TOC \u2192 Final Document) and deliver outputs in Markdown\n\n2. Conversation-Driven Extraction Framework (WHY \u2192 WHAT \u2192 HOW)\n 1. **WHY (Reason for the Problem)**\n * \u201CWhy is this feature/project needed?\u201D \u201CWhat business or user problem does it solve?\u201D \n * Ask questions to clearly gather background, KPIs, and success criteria \n 2. **WHAT (What to Solve)**\n * \u201CWhat must be implemented?\u201D \u201CWhat are the key functional and non-functional requirements?\u201D \n * Distinguish between functional vs. non-functional, organize business requirements and user scenarios \n 3. **HOW (How to Execute)**\n * \u201CWhat flow and structure will the service follow?\u201D \u201CHow should the data model and ERD be designed?\u201D\n\n3. Scope & Constraints\n \u2022 Do **not** produce development-level documentation (backend, frontend, or infrastructure tech stacks). \n \u2022 API design, database structure, and architecture reviews should be suggested only at a high level from a planning perspective\u2014avoid any detailed code or configuration references.\n\n4. Deliverable Structuring Guidelines\n 1. **Present the TOC First**\n * Propose only the top-level Table of Contents initially; generate detailed sub-headings after user approval \n * When sub-TOCs grow large, split them into separate Markdown files and interlink them \n 2. **Document Augmentation**\n * Each document may be continuously updated; you may pre-link to future documents as placeholders \n * Only use links to actual, existing document paths\u2014external URLs that don\u2019t exist are prohibited \n 3. **Document Components**\n * Include: Overview, Objectives, User Personas, User Journeys, Functional & Non-Functional Requirements, Acceptance Criteria, ERD \n * Use tables, lists, and diagrams (ASCII or Mermaid) wherever helpful\n\n5. Communication & Feedback\n \u2022 After each phase, summarize progress and ask for the user\u2019s confirmation (e.g., \u201CShall we proceed with this TOC?\u201D) \n \u2022 Upon completing a document: include a feedback prompt such as \u201CIs there anything else to refine?\u201D\n\n6. Final Deliverables\n \u2022 Provide everything in Markdown (`.md`) format \n \u2022 Include inter-document reference links \n \u2022 Do **not** finalize the \u201Ccompleted\u201D version until the user has given explicit approval\n\n7. Review Loop\n \u2022 Use a while-loop process: after drafting any part, send it to the review agent and iterate until they grant approval. \n \u2022 Do not advance to the next section until the review agent confirms the current one meets quality standards.\n\n8. Approval & File Generation\n \u2022 Once the review agent approves the final draft, use the available tools to generate and export the document file. \n\n9. Iterative Writing Flow\n \u2022 Always start by proposing the top-level Table of Contents. \n \u2022 After TOC approval, draft the document one section (paragraph) at a time, submitting each for review before proceeding." /* AutoBeSystemPromptConstant.ANALYZE_GUIDELINE */)
76
+ return "You are the best planner.\nYou will write documents and hand it over to the developer.\n\nThese are all the links that are currently referenced in the markdown. Please make sure to refer to them and don't forget to create the corresponding files.\nLike revision_history.md, you should not write fakes for content that does not exist yet. If written, it is only allowed if there is a user's request directly.\n\nPlease converse with the user based on the following guidelines and example templates.\nYou have to make a plan for the success of the user, and it has to be written in great detail to make the business successful.\nYour performance is measured by your customer's success.\nYou should listen to the reviewer and not make any requests to the reviewer.\nIf the reviewer asks for changes, revise the entire document from top to bottom,\nincorporating both the existing content and the requested changes. Do not add only the new parts\u2014integrate them into a full rewrite of the document.\nFor example, if you are asked to modify or expand 'internal_bulletin_board_service_plan.md',\ndo not create a document such as 'internal_bulletin_board_service_plan_expanded.md'.\nonly update 'internal_bulletin_board_service_plan.md' file.\n\n# user information\n- user locale: {% User Locale %}\n\n\n# Guidelines\nIf the user specifies the exact number of pages, please follow it precisely.\n\n{% Guidelines %}\n\n\n# Docuemtation Style\nAs with example documents, it is better to divide the documents into several pieces.\nIf the amount user want is 30,000 characters, you'll have to write 10 tables of contents, and 3,000 characters per page.\nFor readability, even if the user requests it, a file should not exceed 3,000 characters. (The amount of text is measured in String(content).length)\n\nThe first page must be the page that made up the table of contents, and you may need to modify the table of contents at the request of the reviewer.\nTake advantage of the markdown link functionality OR write step by step (use overwrite function).\nFor example, rather than writing a long markdown document, create a markdown document that makes up the table of contents.\nYou can also draw a gantt chart for the development period.\n\nAnd hang the link in the document in advance, and create other files that correspond to the link.\nEven if it's not the first page, divide the documents if it's readable to write them separately.\nHyperlink features allow you to create more colorful documents.\nAlso, please put numbers in the front of the document as much as possible so that the files can be arranged well.\nIt is recommended to write a longer document (more than 3,000 letters).\n\nPlease make the file appropriate for user's language.\nDocuments and descriptions should be tailored to the language of the user.\n\nPlease refer to the document below. The document below has a total of 1,500 characters and should be longer.\n\n# Example Documentation\n{% Example Documentation %}\n\n# Abort\nIf you don't have anything more to ask for, call the 'abort' function instead of answering. Never answer the text.\nSimilarly, if the reviewer says there is nothing more to modify and it is perfect, call the function 'abort'.\n'abort' is one of the tool lists that you have been given.\nIf the reviewer says the document is complete, but it appears they are referring to only one out of several documents, then it is not yet the right time to abort.\n\nWrite a long document, but keep your answer short." /* AutoBeSystemPromptConstant.ANALYZE */.replace("{% Guidelines %}", "You are the \u201CPlanning Expert (PlannerAgent)\u201D system agent.\nYou take full responsibility for all planning activities\u2014from product planning through requirements analysis, design, and documentation\u2014and you have extensive experience drafting planning documents.\n\n\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\n1. Persona & Roles\n \u2022 **Planning Expert**: Establish business objectives, craft user scenarios, and develop a strategic roadmap \n \u2022 **Communication Specialist**: Use a friendly yet professional tone, actively engaging with stakeholders \n \u2022 **Documentation Specialist**: Follow a structured approach (Table of Contents \u2192 Detailed TOC \u2192 Final Document) and deliver outputs in Markdown\n\n2. Conversation-Driven Extraction Framework (WHY \u2192 WHAT \u2192 HOW)\n 1. **WHY (Reason for the Problem)**\n * \u201CWhy is this feature/project needed?\u201D \u201CWhat business or user problem does it solve?\u201D \n * Ask questions to clearly gather background, KPIs, and success criteria \n 2. **WHAT (What to Solve)**\n * \u201CWhat must be implemented?\u201D \u201CWhat are the key functional and non-functional requirements?\u201D \n * Distinguish between functional vs. non-functional, organize business requirements and user scenarios \n 3. **HOW (How to Execute)**\n * \u201CWhat flow and structure will the service follow?\u201D \u201CHow should the data model and ERD be designed?\u201D\n\n3. Scope & Constraints\n \u2022 Do **not** produce development-level documentation (backend, frontend, or infrastructure tech stacks). \n \u2022 API design, database structure, and architecture reviews should be suggested only at a high level from a planning perspective\u2014avoid any detailed code or configuration references.\n\n4. Deliverable Structuring Guidelines\n 1. **Present the TOC First**\n * Propose only the top-level Table of Contents initially; generate detailed sub-headings after user approval \n * When sub-TOCs grow large, split them into separate Markdown files and interlink them \n 2. **Document Augmentation**\n * Each document may be continuously updated; you may pre-link to future documents as placeholders \n * Only use links to actual, existing document paths\u2014external URLs that don\u2019t exist are prohibited \n 3. **Document Components**\n * Include: Overview, Objectives, User Personas, User Journeys, Functional & Non-Functional Requirements, Acceptance Criteria, ERD \n * Use tables, lists, and diagrams (ASCII or Mermaid) wherever helpful\n\n5. Communication & Feedback\n \u2022 After each phase, summarize progress and ask for the user\u2019s confirmation (e.g., \u201CShall we proceed with this TOC?\u201D) \n \u2022 Upon completing a document: include a feedback prompt such as \u201CIs there anything else to refine?\u201D\n\n6. Final Deliverables\n \u2022 Provide everything in Markdown (`.md`) format \n \u2022 Include inter-document reference links \n \u2022 Do **not** finalize the \u201Ccompleted\u201D version until the user has given explicit approval\n\n7. Review Loop\n \u2022 Use a while-loop process: after drafting any part, send it to the review agent and iterate until they grant approval. \n \u2022 Do not advance to the next section until the review agent confirms the current one meets quality standards.\n\n8. Approval & File Generation\n \u2022 Once the review agent approves the final draft, use the available tools to generate and export the document file. \n\n9. Iterative Writing Flow\n \u2022 Always start by proposing the top-level Table of Contents. \n \u2022 After TOC approval, draft the document one section (paragraph) at a time, submitting each for review before proceeding." /* AutoBeSystemPromptConstant.ANALYZE_GUIDELINE */)
77
77
  .replace("{% Example Documentation %}", "```\uAE30\uD68D\uC11C\n# \uC544\uBCF4\uCE74\uB3C4 \uB9C8\uCF13 (Avocado Market)\n\n**\uC11C\uBE44\uC2A4 \uC0C1\uC138 \uAE30\uD68D \uBCF4\uACE0\uC11C**\n\n---\n\n## 1. \uC11C\uBE44\uC2A4 \uAC1C\uC694\n\n**\uC544\uBCF4\uCE74\uB3C4 \uB9C8\uCF13**\uC740 \uC9C0\uC5ED \uAE30\uBC18 \uC911\uACE0 \uAC70\uB798\uB97C \uB118\uC5B4, **\uCE5C\uD658\uACBD \uAC00\uCE58\uC640 \uCEE4\uBBA4\uB2C8\uD2F0 \uC911\uC2EC\uC758 \uC5F0\uACB0**\uC744 \uC9C0\uD5A5\uD558\uB294 \uCC28\uC138\uB300 \uC911\uACE0\uAC70\uB798 \uD50C\uB7AB\uD3FC\uC785\uB2C8\uB2E4.\n\uC0AC\uC6A9\uC790\uB294 \uB204\uAD6C\uB098 \uC27D\uACE0 \uC548\uC804\uD558\uAC8C \uC911\uACE0 \uBB3C\uD488\uC744 \uC0AC\uACE0\uD314 \uC218 \uC788\uC73C\uBA70, \uC9C0\uC5ED \uC774\uC6C3\uACFC\uC758 \uAD50\uB958\uB97C \uD1B5\uD574 \uC9C0\uC18D \uAC00\uB2A5\uD55C \uC0DD\uD65C\uC744 \uC2E4\uD604\uD560 \uC218 \uC788\uC2B5\uB2C8\uB2E4.\n\uD83D\uDC49 [\uC790\uC138\uD788 \uBCF4\uAE30](01_overview.md)\n\n---\n\n## 2. \uC2DC\uC7A5 \uC870\uC0AC \uBC0F \uBCA4\uCE58\uB9C8\uD0B9\n\n\uAD6D\uB0B4\uC678 \uC911\uACE0\uAC70\uB798 \uD50C\uB7AB\uD3FC \uC2DC\uC7A5 \uD604\uD669\uC744 \uC885\uD569 \uBD84\uC11D\uD558\uACE0, \uC8FC\uC694 \uACBD\uC7C1\uC0AC\uC758 \uC11C\uBE44\uC2A4 \uC804\uB7B5\uACFC \uCC28\uBCC4 \uC694\uC18C\uB97C \uBE44\uAD50\uD558\uC600\uC2B5\uB2C8\uB2E4. \uB610\uD55C, \uD5A5\uD6C4 \uC2DC\uC7A5 \uC131\uC7A5 \uAC00\uB2A5\uC131\uACFC \uD2B8\uB80C\uB4DC\uB3C4 \uD568\uAED8 \uC81C\uC2DC\uD569\uB2C8\uB2E4.\n\uD83D\uDC49 [\uC790\uC138\uD788 \uBCF4\uAE30](02_market_analysis.md)\n\n---\n\n## 3. \uC8FC\uC694 \uAE30\uB2A5 \uBC0F \uC0C1\uC138 \uC124\uBA85\n\n\uC544\uBCF4\uCE74\uB3C4 \uB9C8\uCF13\uC774 \uC81C\uACF5\uD558\uB294 \uD575\uC2EC \uAE30\uB2A5\uB4E4\uACFC \uC2E4\uC81C \uC0AC\uC6A9 \uC2DC\uB098\uB9AC\uC624\uB97C \uAD6C\uCCB4\uC801\uC73C\uB85C \uC124\uBA85\uD569\uB2C8\uB2E4. \uAC01 \uAE30\uB2A5\uC758 \uBAA9\uC801, \uC0AC\uC6A9\uC790\uC5D0\uAC8C \uC81C\uACF5\uB418\uB294 \uAC00\uCE58, \uCC28\uBCC4\uD654\uB41C \uAE30\uC220 \uB610\uB294 UI \uC694\uC18C\uB97C \uD3EC\uD568\uD569\uB2C8\uB2E4.\n\uD83D\uDC49 [\uC790\uC138\uD788 \uBCF4\uAE30](03_features.md)\n\n---\n\n## 4. \uC218\uC775 \uBAA8\uB378 \uBC0F \uC131\uC7A5 \uC804\uB7B5\n\n\uAD11\uACE0, \uD504\uB9AC\uBBF8\uC5C4 \uC11C\uBE44\uC2A4, \uC81C\uD734 \uAE30\uBC18 \uBE44\uC988\uB2C8\uC2A4 \uB4F1 \uB2E4\uC591\uD55C \uC218\uC775\uD654 \uBAA8\uB378\uC744 \uC81C\uC2DC\uD558\uBA70, \uC774\uB97C \uAE30\uBC18\uC73C\uB85C \uD55C \uC911\uC7A5\uAE30 \uC131\uC7A5 \uC804\uB7B5\uC744 \uD3EC\uD568\uD569\uB2C8\uB2E4.\n\uD83D\uDC49 [\uC790\uC138\uD788 \uBCF4\uAE30](04_business_model.md)\n\n---\n\n## 5. UX/UI \uC124\uACC4 \uAC00\uC774\uB4DC\n\n\uC0AC\uC6A9\uC790 \uCE5C\uD654\uC801 \uC778\uD130\uD398\uC774\uC2A4 \uC124\uACC4 \uBC29\uC548\uACFC \uD568\uAED8, \uB808\uD37C\uB7F0\uC2A4 \uC0AC\uB840 \uBC0F \uC0AC\uC6A9\uC790 \uACBD\uD5D8 \uD5A5\uC0C1\uC744 \uC704\uD55C \uB514\uC790\uC778 \uC6D0\uCE59\uC744 \uC81C\uACF5\uD569\uB2C8\uB2E4.\n\uD83D\uDC49 [\uC790\uC138\uD788 \uBCF4\uAE30](05_uxui_guidelines.md)\n\n---\n\n## 6. \uAC1C\uBC1C \uBC0F \uCD9C\uC2DC \uC804\uB7B5\n\n\uC11C\uBE44\uC2A4 \uAC1C\uBC1C\uBD80\uD130 MVP \uC124\uACC4, \uBCA0\uD0C0 \uD14C\uC2A4\uD2B8, \uC815\uC2DD \uCD9C\uC2DC\uAE4C\uC9C0\uC758 \uC804\uCCB4 \uB85C\uB4DC\uB9F5\uC744 \uC81C\uC2DC\uD558\uBA70, \uAC01 \uB2E8\uACC4\uBCC4 \uBAA9\uD45C\uC640 \uC804\uB7B5\uC744 \uAD6C\uCCB4\uD654\uD569\uB2C8\uB2E4.\n\uD83D\uDC49 [\uC790\uC138\uD788 \uBCF4\uAE30](06_release_strategy.md)\n\n---\n\n## 7. \uAE30\uC220 \uC544\uD0A4\uD14D\uCC98\n\n\uD50C\uB7AB\uD3FC\uC758 \uC804\uCCB4 \uC2DC\uC2A4\uD15C \uAD6C\uC870, \uD575\uC2EC \uAE30\uC220 \uC2A4\uD0DD, \uC678\uBD80 API \uC5F0\uB3D9 \uBC29\uC2DD, \uC778\uD504\uB77C \uAD6C\uC131 \uB4F1\uC744 \uD3EC\uD568\uD55C \uAE30\uC220\uC801 \uC124\uACC4 \uB0B4\uC6A9\uC744 \uC815\uB9AC\uD569\uB2C8\uB2E4.\n\uD83D\uDC49 [\uC790\uC138\uD788 \uBCF4\uAE30](07_architecture.md)\n\n---\n\n## 8. \uD3EC\uC9C0\uC154\uB2DD \uBC0F \uB9C8\uCF00\uD305 \uC804\uB7B5\n\n\uD0C0\uAE43 \uC0AC\uC6A9\uC790 \uC815\uC758, \uBE0C\uB79C\uB4DC \uC544\uC774\uB374\uD2F0\uD2F0 \uC218\uB9BD, \uD64D\uBCF4 \uC804\uB7B5, \uC9C0\uC5ED \uBC00\uCC29\uD615 \uCEE4\uBBA4\uB2C8\uD2F0 \uB9C8\uCF00\uD305 \uB4F1 \uC2E4\uC9C8\uC801\uC778 \uC2E4\uD589 \uC804\uB7B5\uC744 \uC81C\uC548\uD569\uB2C8\uB2E4.\n\uD83D\uDC49 [\uC790\uC138\uD788 \uBCF4\uAE30](08_marketing.md)\n\n---\n\n## 9. \uB9AC\uC2A4\uD06C \uAD00\uB9AC \uBC29\uC548\n\n\uC11C\uBE44\uC2A4 \uC6B4\uC601 \uC804\uBC18\uC5D0\uC11C \uBC1C\uC0DD\uD560 \uC218 \uC788\uB294 \uB2E4\uC591\uD55C \uB9AC\uC2A4\uD06C\uB97C \uC2DD\uBCC4\uD558\uACE0, \uC774\uC5D0 \uB300\uD55C \uC0AC\uC804 \uC608\uBC29 \uBC0F \uC0AC\uD6C4 \uB300\uC751 \uBC29\uC548\uC744 \uCCB4\uACC4\uC801\uC73C\uB85C \uC815\uB9AC\uD558\uC600\uC2B5\uB2C8\uB2E4.\n\uD83D\uDC49 [\uC790\uC138\uD788 \uBCF4\uAE30](09_risk_management.md)\n\n---\n\n## 10. \uC11C\uBE44\uC2A4 \uD655\uC7A5 \uAC00\uB2A5\uC131\n\n\uC911\uC7A5\uAE30\uC801\uC73C\uB85C \uACE0\uB824\uD560 \uC218 \uC788\uB294 \uC2E0\uADDC \uAE30\uB2A5, \uBE44\uC988\uB2C8\uC2A4 \uBAA8\uB378 \uD655\uC7A5, \uAE00\uB85C\uBC8C \uC9C4\uCD9C \uB4F1 \uC544\uBCF4\uCE74\uB3C4 \uB9C8\uCF13\uC758 \uBBF8\uB798 \uBE44\uC804\uC744 \uC81C\uC2DC\uD569\uB2C8\uB2E4.\n\uD83D\uDC49 [\uC790\uC138\uD788 \uBCF4\uAE30](10_expansion.md)\n\n```;" /* AutoBeSystemPromptConstant.ANALYZE_EXAMPLE */)
78
78
  .replace("{% User Locale %}", (_b = (_a = ctx.config) === null || _a === void 0 ? void 0 : _a.locale) !== null && _b !== void 0 ? _b : "en-US");
79
79
  },
@@ -1 +1 @@
1
- {"version":3,"file":"AnalyzeAgent.js","sourceRoot":"","sources":["../../src/analyze/AnalyzeAgent.ts"],"names":[],"mappings":"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"}
1
+ {"version":3,"file":"AnalyzeAgent.js","sourceRoot":"","sources":["../../src/analyze/AnalyzeAgent.ts"],"names":[],"mappings":"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"}
@@ -10,5 +10,5 @@ export declare const enum AutoBeSystemPromptConstant {
10
10
  PRISMA_COMPONENT = "You are a world-class database architecture analyst specializing in domain-driven design and schema organization. You excel at analyzing requirements and organizing database models into logical, maintainable file structures.\n\n### Core Principles\n\n- **Never ask for clarification** - Work with the provided requirements and make reasonable assumptions\n- **Output only structured JSON** - Return organized file-table mappings in the specified format\n- **Follow domain-driven design** - Group related entities into cohesive domains\n- **Prioritize logical separation** - Ensure clear boundaries between different business domains\n\n### Default Working Language: English\n\n- Use the language specified by user in messages as the working language when explicitly provided\n- All thinking and analysis must be in the working language\n- All model/table names must be in English regardless of working language\n\n### Task: Analyze Requirements and Generate File Structure\n\nYour primary task is to analyze user requirements and generate a structured file organization plan in the format: `{filename: string; tables: string[]}[]`\n\n### Analysis Steps\n\n1. **Domain Analysis**: Identify distinct business domains from requirements\n2. **Entity Identification**: Extract all entities/models mentioned or implied\n3. **Relationship Mapping**: Understand how entities relate across domains\n4. **File Organization**: Group related entities into logical files\n5. **Validation**: Ensure all entities are accounted for and properly grouped\n\n### File Organization Guidelines\n\n#### Naming Conventions\n\n- **Filenames**: `schema-{number}-{domain}.prisma` (e.g., `schema-01-core.prisma`, `schema-02-users.prisma`)\n- **Main config**: Always include `main.prisma` for datasource/generator configuration\n- **Domain names**: Use clear, descriptive domain names in snake_case\n\n#### Grouping Strategy\n\n- **Core/Foundation**: Basic entities used across multiple domains (users, organizations)\n- **Domain-specific**: Entities belonging to specific business domains\n- **Cross-cutting**: Entities that span multiple domains (notifications, audit logs)\n- **Utility**: Helper entities (settings, configurations)\n\n#### File Structure Rules\n\n- **Maximum 8-10 models per file** for maintainability\n- **Related entities together**: Keep strongly related models in the same file\n- **Dependency consideration**: Place foundational models in earlier files\n- **Logical progression**: Order files from core to specific domains\n\n### Expected Output Format\n\n```json\n[\n {\n \"filename\": \"main.prisma\",\n \"tables\": []\n },\n {\n \"filename\": \"schema-01-core.prisma\", \n \"tables\": [\"users\", \"user_profiles\", \"organizations\"]\n },\n {\n \"filename\": \"schema-02-articles.prisma\",\n \"tables\": [\"articles\", \"article_snapshots\", \"article_comments\"]\n }\n]\n```\n\n### Quality Checklist\n\nBefore outputting, ensure:\n- [ ] All entities from requirements are included\n- [ ] Files are logically organized by domain\n- [ ] No single file is overloaded with too many models\n- [ ] Dependencies flow from core to specific domains\n- [ ] Filename conventions are followed\n- [ ] main.prisma is included for configuration",
11
11
  PRISMA_EXAMPLE = "Study the following comprehensive shopping mall project schema as a reference for implementing all the patterns and best practices outlined above. \n\nThis enterprise-level implementation demonstrates proper domain organization, relationship modeling, documentation standards, and advanced patterns like snapshots, inheritance, and materialized views.\n\n## Input (Requirement Analysis)\n\n```json\n{% EXAMPLE_SHOPPING_REQUIREMENT_ANALYSIS %}\n```\n\nWhen such requirement analysis report comes\n\n## Output (Prisma Schema Files)\n\n```json\n{\"main.prisma\":\"datasource db {\\n provider = \\\"postgresql\\\"\\n url = env(\\\"SHOPPING_POSTGRES_URL\\\")\\n extensions = [pg_trgm]\\n}\\n\\ngenerator client {\\n provider = \\\"prisma-client-js\\\"\\n previewFeatures = [\\\"postgresqlExtensions\\\", \\\"views\\\"]\\n binaryTargets = [\\\"native\\\"]\\n}\\n\\ngenerator markdown {\\n provider = \\\"prisma-markdown\\\"\\n title = \\\"Shopping Mall\\\"\\n output = \\\"../../docs/ERD.md\\\"\\n}\\n\",\"schema-01-articles.prisma\":\"/// Attachment File.\\n///\\n/// Every attachment files that are managed in this shopping mall system.\\n///\\n/// For reference, it is possible to omit one of file name or extension like \\n/// `.gitignore` or `README` case, but not possible to omit both of them,\\n///\\n/// @namespace Articles\\n/// @author Samchon\\nmodel attachment_files {\\n //----\\n // COLUMNS\\n //----\\n /// Primary Key.\\n id String @id @db.Uuid\\n\\n /// File name, except extension.\\n ///\\n /// If there's file `.gitignore`, then its name is an empty string.\\n name String @db.VarChar\\n\\n /// Extension.\\n ///\\n /// Possible to omit like `README` case.\\n extension String? @db.VarChar\\n\\n /// URL path of the real file.\\n url String @db.VarChar(1024)\\n\\n /// Creation time of record.\\n created_at DateTime @db.Timestamptz\\n\\n //----\\n // RELATIONS\\n //----\\n bbs_article_snapshot_files bbs_article_snapshot_files[]\\n bbs_article_comment_snapshots_files bbs_article_comment_snapshot_files[]\\n shopping_sale_snapshot_content_files shopping_sale_snapshot_content_files[]\\n shopping_sale_snapshot_content_thumbnails shopping_sale_snapshot_content_thumbnails[]\\n\\n @@index([url])\\n}\\n\\n/// Article entity.\\n/// \\n/// `bbs_articles` is a super-type entity of all kinds of articles in the \\n/// current shopping mall system, literally shaping individual articles of \\n/// the bulletin board.\\n///\\n/// And, as you can see, the elements that must inevitably exist in the \\n/// article, such as the title or the body, do not exist in the `bbs_articles`, \\n/// but exist in the subsidiary entity, {@link bbs_article_snapshots}, as a \\n/// 1: N relationship, which is because a new snapshot record is published \\n/// every time the article is modified.\\n///\\n/// The reason why a new snapshot record is published every time the article \\n/// is modified is to preserve the evidence. Due to the nature of e-commerce, \\n/// there is always a threat of dispute among the participants. And it can \\n/// happen that disputes arise through articles or comments, and to prevent \\n/// such things as modifying existing articles to manipulate the situation, \\n/// the article is designed in this structure.\\n///\\n/// In other words, to keep evidence, and prevent fraud.\\n///\\n/// @namespace Articles\\n/// @erd Inquiries\\n/// @author Samchon\\nmodel bbs_articles {\\n /// Primary Key.\\n id String @id @db.Uuid\\n\\n /// Creation time of article.\\n created_at DateTime @db.Timestamptz\\n\\n /// Deletion time of article.\\n ///\\n /// To keep evidence, do not delete the article, but just mark it as \\n /// deleted.\\n deleted_at DateTime? @db.Timestamptz\\n\\n //----\\n // RELATIONS\\n //----\\n /// List of snapshots.\\n ///\\n /// It is created for the first time when an article is created, and is\\n /// accumulated every time the article is modified.\\n snapshots bbs_article_snapshots[]\\n\\n /// List of comments.\\n comments bbs_article_comments[]\\n\\n of_inquiry shopping_sale_snapshot_inquiries?\\n of_inquiry_answer shopping_sale_snapshot_inquiry_answers?\\n\\n mv_last mv_bbs_article_last_snapshots?\\n\\n @@index([created_at])\\n}\\n\\n/// Snapshot of article.\\n///\\n/// `bbs_article_snapshots` is a snapshot entity that contains the contents of\\n/// the article, as mentioned in {@link bbs_articles}, the contents of the \\n/// article are separated from the article record to keep evidence and prevent \\n/// fraud.\\n///\\n/// @namespace Articles\\n/// @erd Inquiries\\n/// @author Samchon\\nmodel bbs_article_snapshots {\\n //----\\n // COLUMNS\\n //----\\n /// Primary Key.\\n id String @id @db.Uuid\\n\\n /// Belong article's {@link bbs_articles.id}\\n bbs_article_id String @db.Uuid\\n\\n /// Format of body.\\n ///\\n /// Same meaning with extension like `html`, `md`, `txt`.\\n format String @db.VarChar\\n\\n /// Title of article.\\n title String @db.VarChar\\n\\n /// Content body of article.\\n body String\\n\\n /// Creation time of record.\\n ///\\n /// It means creation time or update time or article.\\n created_at DateTime @db.Timestamptz\\n\\n //----\\n // RELATIONS\\n //----\\n /// Belong article info.\\n article bbs_articles @relation(fields: [bbs_article_id], references: [id], onDelete: Cascade)\\n\\n /// List of wrappers of attachment files.\\n to_files bbs_article_snapshot_files[]\\n\\n of_review shopping_sale_snapshot_review_snapshots?\\n mv_last mv_bbs_article_last_snapshots?\\n shopping_sale_snapshot_inquiry_favorites shopping_sale_snapshot_inquiry_favorites[]\\n\\n @@index([bbs_article_id, created_at])\\n @@index([title(ops: raw(\\\"gin_trgm_ops\\\"))], type: Gin)\\n @@index([body(ops: raw(\\\"gin_trgm_ops\\\"))], type: Gin)\\n}\\n\\n/// Attachment file of article snapshot.\\n///\\n/// `bbs_article_snapshot_files` is an entity that shapes the attached files of\\n/// the article snapshot.\\n///\\n/// `bbs_article_snapshot_files` is a typical pair relationship table to \\n/// resolve the M: N relationship between {@link bbs_article_snapshots} and\\n/// {@link attachment_files} tables. Also, to ensure the order of the attached\\n/// files, it has an additional `sequence` attribute, which we will continue to\\n/// see in this documents.\\n///\\n/// @namespace Articles\\n/// @author Samchon\\nmodel bbs_article_snapshot_files {\\n //----\\n // COLUMNS\\n //----\\n /// Primary Key.\\n id String @id @db.Uuid\\n\\n /// Belonged snapshot's {@link bbs_article_snapshots.id}\\n bbs_article_snapshot_id String @db.Uuid\\n\\n /// Belonged file's {@link attachment_files.id}\\n attachment_file_id String @db.Uuid\\n\\n /// Sequence of attachment file in the snapshot.\\n sequence Int @db.Integer\\n\\n //----\\n // RELATIONS\\n //----\\n /// Belonged article.\\n snapshot bbs_article_snapshots @relation(fields: [bbs_article_snapshot_id], references: [id], onDelete: Cascade)\\n\\n /// Belonged file.\\n file attachment_files @relation(fields: [attachment_file_id], references: [id], onDelete: Cascade)\\n\\n @@index([bbs_article_snapshot_id])\\n @@index([attachment_file_id])\\n}\\n\\n/// Comment written on an article.\\n///\\n/// `bbs_article_comments` is an entity that shapes the comments written on an\\n/// article.\\n///\\n/// And for this comment, as in the previous relationship between \\n/// {@link bbs_articles} and {@link bbs_article_snapshots}, the content body \\n/// of the comment is stored in the sub {@link bbs_article_comment_snapshots} \\n/// table for evidentialism, and a new snapshot record is issued every time \\n/// the comment is modified.\\n///\\n/// Also, `bbs_article_comments} is expressing the relationship of the \\n/// hierarchical reply structure through the `parent_id` attribute.\\n///\\n/// @namespace Articles\\n/// @erd Inquiries\\n/// @author Samchon\\nmodel bbs_article_comments {\\n //----\\n // COLUMNS\\n //----\\n /// Primary Key.\\n id String @id @db.Uuid\\n\\n /// Belonged article's {@link bbs_articles.id}\\n bbs_article_id String @db.Uuid\\n\\n /// Parent comment's {@link bbs_article_comments.id}\\n ///\\n /// Used to express the hierarchical reply structure.\\n parent_id String? @db.Uuid\\n\\n /// Creation time of comment.\\n created_at DateTime @db.Timestamptz\\n\\n /// Deletion time of comment.\\n ///\\n /// Do not allow to delete the comment, but just mark it as deleted, \\n /// to keep evidence.\\n deleted_at DateTime? @db.Timestamptz\\n\\n //----\\n // RELATIONS\\n //----\\n /// Belonged article.\\n article bbs_articles @relation(fields: [bbs_article_id], references: [id], onDelete: Cascade)\\n\\n /// Parent comment.\\n ///\\n /// Only when reply case.\\n parent bbs_article_comments? @relation(\\\"bbs_article_comments_reply\\\", fields: [parent_id], references: [id], onDelete: Cascade)\\n\\n /// List of children comments.\\n ///\\n /// Reply comments of current.\\n children bbs_article_comments[] @relation(\\\"bbs_article_comments_reply\\\")\\n\\n /// List of snapshots.\\n ///\\n /// It is created for the first time when a comment is created, and is\\n /// accumulated every time the comment is modified.\\n snapshots bbs_article_comment_snapshots[]\\n of_inquiry shopping_sale_snapshot_inquiry_comments?\\n\\n @@index([bbs_article_id, parent_id, created_at])\\n}\\n\\n/// Snapshot of comment.\\n///\\n/// `bbs_article_comment_snapshots` is a snapshot entity that contains the \\n/// contents of the comment.\\n///\\n/// As mentioned in {@link bbs_article_comments}, designed to keep evidence \\n/// and prevent fraud.\\n///\\n/// @namespace Articles\\n/// @author Samchon\\nmodel bbs_article_comment_snapshots {\\n //----\\n // COLUMNS\\n //----\\n /// Primary Key.\\n id String @id @db.Uuid\\n\\n /// Belonged article's {@link bbs_article_comments.id}\\n bbs_article_comment_id String @db.Uuid\\n\\n /// Format of content body.\\n ///\\n /// Same meaning with extension like `html`, `md`, `txt`.\\n format String @db.VarChar\\n\\n /// Content body of comment.\\n body String\\n\\n /// Creation time of record.\\n ///\\n /// It means creation time or update time or comment.\\n created_at DateTime @db.Timestamptz\\n\\n //----\\n // RELATIONS\\n //----\\n /// Belong comment info.\\n comment bbs_article_comments @relation(fields: [bbs_article_comment_id], references: [id], onDelete: Cascade)\\n\\n /// List of wrappers of attachment files.\\n files bbs_article_comment_snapshot_files[]\\n\\n @@index([bbs_article_comment_id, created_at])\\n @@index([body(ops: raw(\\\"gin_trgm_ops\\\"))], type: Gin)\\n}\\n\\n/// Attachment file of comment snapshot.\\n/// \\n/// `bbs_article_comment_snapshot_files` is an entity resolving the M:N \\n/// relationship between {@link bbs_article_comment_snapshots} and \\n/// {@link attachment_files} tables.\\n/// \\n/// @namespace Articles\\n/// @author Samchon\\nmodel bbs_article_comment_snapshot_files {\\n //----\\n // COLUMNS\\n //----\\n /// Primary Key.\\n id String @id @db.Uuid\\n\\n /// Belonged snapshot's {@link bbs_article_comment_snapshots.id}\\n bbs_article_comment_snapshot_id String @db.Uuid\\n\\n /// Belonged file's {@link attachment_files.id}\\n attachment_file_id String @db.Uuid\\n\\n /// Sequence order.\\n ///\\n /// Sequence order of the attached file in the belonged snapshot.\\n sequence Int @db.Integer\\n\\n //----\\n // RELATIONS\\n //----\\n /// Belonged article.\\n snapshot bbs_article_comment_snapshots @relation(fields: [bbs_article_comment_snapshot_id], references: [id], onDelete: Cascade)\\n\\n /// Belonged file.\\n file attachment_files @relation(fields: [attachment_file_id], references: [id], onDelete: Cascade)\\n\\n @@index([bbs_article_comment_snapshot_id])\\n @@index([attachment_file_id])\\n}\\n\\n/// @hidden\\nmodel mv_bbs_article_last_snapshots {\\n bbs_article_id String @id @db.Uuid\\n bbs_article_snapshot_id String @db.Uuid\\n\\n article bbs_articles @relation(fields: [bbs_article_id], references: [id], onDelete: Cascade)\\n snapshot bbs_article_snapshots @relation(fields: [bbs_article_snapshot_id], references: [id], onDelete: Cascade)\\n\\n @@unique([bbs_article_snapshot_id])\\n}\\n\",\"schema-02-systematic.prisma\":\"/// Channel information.\\n///\\n/// `shopping_channels` is a concept that shapes the distribution channel in \\n/// the market. Therefore, the difference in the channel in this e-commerce \\n/// system means that it is another site or application.\\n///\\n/// By the way, if your shopping mall system requires only one channel, then \\n/// just use only one. This concept is designed to be expandable in the future.\\n///\\n/// @namespace Systematic\\n/// @erd Sales\\n/// @author Samchon\\nmodel shopping_channels {\\n //----\\n // COLUMNS\\n //----\\n /// Primary Key.\\n id String @id @db.Uuid\\n\\n /// Identifier code.\\n code String @db.VarChar\\n\\n /// Name of channel.\\n name String @db.VarChar\\n\\n /// Creation time of record.\\n created_at DateTime @db.Timestamptz\\n\\n /// Update time of record.\\n updated_at DateTime @db.Timestamptz\\n\\n /// Deletion time of record.\\n deleted_at DateTime? @db.Timestamptz\\n\\n //----\\n // RELATIONS\\n //----\\n shopping_channel_categories shopping_channel_categories[]\\n shopping_customers shopping_customers[]\\n shopping_citizens shopping_citizens[]\\n shopping_members shopping_members[]\\n shopping_member_emails shopping_member_emails[]\\n shopping_external_users shopping_external_users[]\\n\\n @@unique([code])\\n @@unique([name])\\n @@index([created_at])\\n}\\n\\n/// Category of channel.\\n///\\n/// `shopping_channel_categories` is a concept that refers to classification \\n/// categories within a specific channel, and is exactly the same as the concept \\n/// commonly referred to as \\\"category\\\" in shopping malls.\\n///\\n/// And `shopping_channel_categories` is different with \\n/// {@link shopping_sections}. {@link shopping_sections} refers to a \\\"corner\\\" \\n/// that is independent spatial information in the offline market, which cannot \\n/// simultaneously classified in a {@link shopping_sales sale}. Besides, \\n/// `shopping_channel_categories` can be classified into multiple categories \\n/// in a {@link shopping_sales sale} simultaneously.\\n/// \\n/// Product | Section (corner) | Categories\\n/// --------|------------------|--------------------------------------\\n/// Beef | Butcher corner | Frozen food, Meat, **Favorite food**\\n/// Grape | Fruit corner | Fresh food, **Favorite food**\\n/// \\n/// In addition, as `shopping_channel_categories` has 1:N self recursive \\n/// relationship, it is possible to express below hierarchical structures. \\n/// Thus, each channel can set their own category classification as they want.\\n///\\n/// - Food > Meat > Frozen\\n/// - Electronics > Notebook > 15 inches\\n/// - Miscellaneous > Wallet\\n/// \\n/// Furthermore, `shopping_channel_categories` is designed to merge between \\n/// themselves, so there is no burden to edit the category at any time.\\n///\\n/// @namespace Systematic\\n/// @erd Sales\\n/// @author Samchon\\nmodel shopping_channel_categories {\\n //----\\n // COLUMNS\\n //----\\n /// Primary Key.\\n id String @id @db.Uuid\\n\\n /// Belonged channel's {@link shopping_channels.id}.\\n shopping_channel_id String @db.Uuid\\n\\n /// Parent category's {@link shopping_channel_categories.id}.\\n ///\\n /// Only when the category is a subcategory of another one.\\n parent_id String? @db.Uuid\\n\\n /// Identifier code.\\n code String @db.VarChar\\n\\n /// Name of category.\\n name String @db.VarChar\\n\\n /// Creation time of record.\\n created_at DateTime @db.Timestamptz\\n\\n /// Updadte time of record.\\n updated_at DateTime @db.Timestamptz\\n\\n /// Deletion time of record.\\n deleted_at DateTime? @db.Timestamptz\\n\\n //----\\n // RELATIONS\\n //----\\n channel shopping_channels @relation(fields: [shopping_channel_id], references: [id], onDelete: Cascade)\\n parent shopping_channel_categories? @relation(\\\"shopping_channel_categories_children\\\", fields: [parent_id], references: [id], onDelete: Cascade)\\n children shopping_channel_categories[] @relation(\\\"shopping_channel_categories_children\\\")\\n shopping_sale_snapshot_categories shopping_sale_snapshot_categories[]\\n\\n @@unique([shopping_channel_id, code])\\n @@unique([shopping_channel_id, parent_id, name])\\n @@index([parent_id])\\n}\\n\\n/// Section information.\\n///\\n/// `shopping_sections` is a concept that refers to the spatial information \\n/// of the market.\\n///\\n/// If we compare the section mentioned here to the offline market, it means \\n/// a spatially separated area within the store, such as the \\\"fruit corner\\\" \\n/// or \\\"butcher corner\\\". Therefore, in the {@link shopping_sales sale} entity, \\n/// it is not possible to classify multiple sections simultaneously, but only \\n/// one section can be classified.\\n///\\n/// By the way, if your shopping mall system requires only one section, then \\n/// just use only one. This concept is designed to be expandable in the future.\\n///\\n/// @namespace Systematic\\n/// @erd Sales\\n/// @author Samchon\\nmodel shopping_sections {\\n //----\\n // COLUMNS\\n //----\\n /// Primary Key.\\n id String @id @db.Uuid\\n\\n /// Identifier code.\\n code String @db.VarChar\\n\\n /// Name of section.\\n name String @db.VarChar\\n\\n /// Creation time of record.\\n created_at DateTime @db.Timestamptz\\n\\n /// Update time of record.\\n updated_at DateTime @db.Timestamptz\\n\\n /// Deletion time of record.\\n deleted_at DateTime? @db.Timestamptz\\n\\n //----\\n // RELATIONS\\n //----\\n shopping_sales shopping_sales[]\\n shopping_coupon_section_criterias shopping_coupon_section_criterias[]\\n\\n @@unique([code])\\n @@unique([name])\\n @@index([created_at])\\n}\\n\\n/// @hidden\\nmodel mv_cache_times {\\n id String @id @db.Uuid\\n schema String @db.VarChar\\n table String @db.VarChar\\n key String @db.VarChar\\n value DateTime @db.Timestamptz\\n\\n @@unique([schema, table, key])\\n}\\n\",\"schema-03-actors.prisma\":\"/// Customer information, but not a person but a **connection** basis.\\n///\\n/// `shopping_customers` is an entity that literally embodies the information \\n/// of those who participated in the market as customers. By the way, the\\n/// `shopping_Customers` does not mean a person, but a **connection** basis.\\n/// Therefore, even if the same person connects to the shopping mall multiple,\\n/// multiple records are created in `shopping_customers`.\\n/// \\n/// The first purpose of this is to track the customer's inflow path in detail, and \\n/// it is for cases where the same person enters as a non-member, puts items in the \\n/// {@link shopping_cart_commodities shopping cart} in advance, and only authenticates \\n/// their real name or registers/logs in at the moment of \\n/// {@link shopping_order_publishes payment}. It is the second. Lastly, it is \\n/// to accurately track the activities that a person performs at the \\n/// shopping mall in various ways like below.\\n///\\n/// - Same person comes from an {@link shopping_external_users external service}\\n/// - Same person creates multiple {@link shopping_members accounts}\\n/// - Same person makes a purchase as a non-member with only {@link shopping_citizens real name authentication}\\n/// - Same person acts both {@link shopping_sellers seller} and {@link shopping_administrators admin} at the same time\\n/// \\n/// Therefore, `shopping_customers` can have multiple records with the same \\n/// {@link shopping_citizens}, {@link shopping_members}, and \\n/// {@link shopping_external_users}. Additionally, if a customer signs up for \\n/// membership after verifying their real name or signs up for our service \\n/// after being a user of an external service, all related records are changed \\n/// at once. Therefore, identification and tracking of customers can be done \\n/// very systematically.\\n///\\n/// @namespace Actors\\n/// @erd Coins\\n/// @erd Favorites\\n/// @author Samchon\\nmodel shopping_customers {\\n //----\\n // COLUMNS\\n //----\\n /// Primary Key.\\n id String @id @db.Uuid\\n\\n /// Belonged channel's {@link shopping_channels.id}\\n shopping_channel_id String @db.Uuid /// @format uuid\\n\\n /// Belonged member's {@link shopping_members.id}\\n shopping_member_id String? @db.Uuid /// @format uuid\\n\\n /// Belonged external service user's {@link shopping_external_users.id}\\n shopping_external_user_id String? @db.Uuid /// @format uuid\\n\\n /// Belonged citizen's {@link shopping_citizens.id}\\n shopping_citizen_id String? @db.Uuid /// @format uuid\\n\\n /// Connection URL.\\n ///\\n /// {@link window.location.href}\\n href String @db.VarChar(1024)\\n\\n /// Referrer URL.\\n ///\\n /// {@link window.document.referrer}\\n referrer String? @db.VarChar(1024)\\n\\n /// IP address,\\n ip String @db.VarChar\\n\\n /// Creation time of record.\\n ///\\n /// It means the time when the customer connected to the shopping mall.\\n created_at DateTime @db.Timestamptz\\n\\n //----\\n // RELATIONS\\n //----\\n /// Belonged channel.\\n channel shopping_channels @relation(fields: [shopping_channel_id], references: [id], onDelete: Cascade)\\n\\n /// Belonged member.\\n member shopping_members? @relation(fields: [shopping_member_id], references: [id], onDelete: Cascade)\\n\\n /// Belonged external user.\\n external_user shopping_external_users? @relation(fields: [shopping_external_user_id], references: [id], onDelete: Cascade)\\n\\n /// Belonged citizen.\\n citizen shopping_citizens? @relation(fields: [shopping_citizen_id], references: [id], onDelete: Cascade)\\n\\n shopping_carts shopping_carts[]\\n shopping_coupons shopping_coupons[]\\n shopping_coupon_tickets shopping_coupon_tickets[]\\n shopping_deliveries shopping_deliveries[]\\n shopping_deposit_charges shopping_deposit_charges[]\\n shopping_orders shopping_orders[]\\n shopping_sales shopping_sales[]\\n shopping_sale_snapshot_inquiries shopping_sale_snapshot_inquiries[]\\n shopping_sale_snapshot_inquiry_answers shopping_sale_snapshot_inquiry_answers[]\\n shopping_sale_snapshot_inquiry_comments shopping_sale_snapshot_inquiry_comments[]\\n shopping_sale_favorites shopping_sale_favorites[]\\n shopping_sale_snapshot_inquiry_favorites shopping_sale_snapshot_inquiry_favorites[]\\n shopping_address_favorites shopping_address_favorites[]\\n shopping_mileage_donations shopping_mileage_donations[]\\n\\n @@index([shopping_channel_id, created_at])\\n @@index([shopping_citizen_id, created_at])\\n @@index([shopping_external_user_id, created_at])\\n @@index([shopping_member_id, created_at])\\n @@index([href])\\n @@index([referrer])\\n @@index([ip])\\n @@index([created_at])\\n}\\n\\n/// External user information.\\n/// \\n/// `shopping_external_users` is an entity dsigned for when this system needs \\n/// to connect with external services and welcome their users as customers of \\n/// this service.\\n/// \\n/// For reference, customers who connect from an external service must have \\n/// this record, and the external service user is identified through the two \\n/// attributes `application` and `uid`. If a customer connected from an \\n/// external service completes {@link shopping_citizens real-name authentication} \\n/// from this service, each time the external service user reconnects to this \\n/// service and issues a new {@link shopping_customers customer} authentication \\n/// token, {@link shopping_citizens real-name authentication} begins with \\n/// completed.\\n/// \\n/// And `password` is the password issued to the user by the external service \\n/// system (the so-called permanent user authentication token), and is never \\n/// the actual user password. However, for customers who entered the same \\n/// `application` and `uid` as the current external system user, this is to \\n/// determine whether to view this as a correct external system user or a \\n/// violation.\\n/// \\n/// In addition, additional information received from external services can \\n/// be recorded in the `data` field in JSON format.\\n///\\n/// @namespace Actors\\n/// @author Samchon\\nmodel shopping_external_users {\\n //----\\n // COLUMNS\\n //----\\n /// Primary Key.\\n id String @id @db.Uuid\\n\\n /// Belonged channel's {@link shopping_channels.id}\\n shopping_channel_id String @db.Uuid\\n\\n /// Belonged citizen's {@link shopping_citizens.id}\\n shopping_citizen_id String? @db.Uuid\\n\\n /// Identifier code of the external service.\\n ///\\n /// It can be same with {@link shopping_channels.code} in common.\\n application String @db.VarChar\\n\\n /// Identifier key of external user from the external system.\\n uid String @db.VarChar\\n\\n /// Nickname of external user in the external system.\\n nickname String @db.VarChar\\n\\n /// Additional information about external user from the external system.\\n data String?\\n\\n /// Password of external user from the external system.\\n ///\\n /// This is a password issued to the user by an external service, and is \\n /// by no means the actual user password. However, for customers who \\n /// entered the same application and code as the current external system \\n /// user, this is to determine whether to view this as a correct external \\n /// system user or a violation.\\n password String @db.VarChar\\n\\n /// Creation time of record.\\n ///\\n /// Another word, first time when the external user connected.\\n created_at DateTime\\n\\n //----\\n // RELATIONS\\n //----\\n channel shopping_channels @relation(fields: [shopping_channel_id], references: [id], onDelete: Cascade)\\n citizen shopping_citizens? @relation(fields: [shopping_citizen_id], references: [id], onDelete: Cascade)\\n shopping_customers shopping_customers[]\\n\\n @@unique([shopping_channel_id, application, uid])\\n @@unique([shopping_channel_id, application, nickname])\\n @@index([shopping_citizen_id])\\n @@index([application, created_at])\\n @@index([created_at])\\n @@index([nickname(ops: raw(\\\"gin_trgm_ops\\\"))], type: Gin)\\n}\\n\\n/// Citizen verification information.\\n/// \\n/// `shopping_citizens` is an entity that records the user's real name and \\n/// mobile input information.\\n/// \\n/// For reference, in South Korea, real name authentication is required for \\n/// e-commerce participants, so the `name` attribute is important. However, \\n/// the situation is different overseas, so in reality, `mobile` attributes \\n/// are the most important, and identification of individual users is also \\n/// done based on this mobile.\\n/// \\n/// Of course, real name and mobile phone authentication information are \\n/// encrypted and stored.\\n///\\n/// @namespace Actors\\n/// @erd Coins\\n/// @author Samchon\\nmodel shopping_citizens {\\n //----\\n // COLUMNS\\n //----\\n /// Primary Key.\\n id String @id @db.Uuid\\n\\n /// Belonged channel's {@link shopping_channels.id}\\n ///\\n /// This is to manage personal information separately for each channel, \\n /// and also to recognize cases where the same citizen is authenticated \\n /// through different channels.\\n shopping_channel_id String? @db.Uuid\\n\\n /// Mobile phone number.\\n mobile String @db.VarChar\\n\\n /// Real name, or equivalent name identifiable.\\n name String @db.VarChar\\n\\n /// Creation time of record.\\n ///\\n /// In other words, the 1st time of citizen activation.\\n created_at DateTime @db.Timestamptz\\n\\n /// Deletion time of record.\\n deleted_at DateTime? @db.Timestamptz\\n\\n //----\\n // RELATIONS\\n //----\\n channel shopping_channels? @relation(fields: [shopping_channel_id], references: [id], onDelete: Cascade)\\n\\n customers shopping_customers[]\\n members shopping_members[]\\n deposit_histories shopping_deposit_histories[]\\n mileage_histories shopping_mileage_histories[]\\n\\n mv_deposit_balance mv_shopping_deposit_balances?\\n mv_mileage_balance mv_shopping_mileage_balances?\\n mv_shopping_coupon_citizen_inventories mv_shopping_coupon_citizen_inventories[]\\n shopping_external_users shopping_external_users[]\\n shopping_mileage_donations shopping_mileage_donations[]\\n\\n @@unique([shopping_channel_id, mobile])\\n @@index([mobile])\\n @@index([name])\\n @@index([created_at])\\n}\\n\\n/// Member Account.\\n/// \\n/// `shopping_members` is an entity that symbolizes the case when a user \\n/// signs up as a member of this system.\\n/// \\n/// In addition, `shopping_members` itself is a supertype entity, forming \\n/// and managing subtypes for various types of members. However, \\n/// {@link shopping_customers} are an exception, and due to the nature of \\n/// their records being created on a per-connection basis, they are not \\n/// divided into separate subtype entities when they sign up for membership.\\n/// \\n/// For reference, `shopping_members` allows multiple subtypes. Therefore, \\n/// it is also possible for a {@link shopping_citizens citizen} to be sometimes \\n/// a {@link shopping_customers customer}, sometimes a \\n/// {@link shopping_sellers seller}, sometimes an \\n/// {@link shopping_administrators administrator}, and so on. \\n/// \\n/// Of course, this is according to system theory, and it is unclear what \\n/// the planning will be like.\\n///\\n/// @namespace Actors\\n/// @author Samchon\\nmodel shopping_members {\\n //----\\n // COLUMNS\\n //----\\n /// Primary Key.\\n id String @id @db.Uuid\\n\\n /// Belonged channel's {@link shopping_channels.id}\\n shopping_channel_id String @db.Uuid\\n\\n /// Belonged citizen's {@link shopping_citizens.id}\\n shopping_citizen_id String? @db.Uuid\\n\\n /// Nickname.\\n nickname String @db.VarChar\\n\\n /// Password for log-in.\\n password String @db.VarChar\\n\\n /// Creation time of record.\\n ///\\n /// In other words, the joining time.\\n created_at DateTime @db.Timestamptz\\n\\n /// Update time of record.\\n updated_at DateTime @db.Timestamptz\\n\\n /// Deletion time of record.\\n withdrawn_at DateTime? @db.Timestamptz\\n\\n //----\\n // RELATIONS\\n //----\\n /// Belonged channel.\\n channel shopping_channels @relation(fields: [shopping_channel_id], references: [id], onDelete: Cascade)\\n\\n /// Belonged citizen.\\n citizen shopping_citizens? @relation(fields: [shopping_citizen_id], references: [id], onDelete: Cascade)\\n\\n /// List of customer records (connections).\\n customers shopping_customers[]\\n\\n /// List of email addresses.\\n emails shopping_member_emails[]\\n\\n of_seller shopping_sellers?\\n of_admin shopping_administrators?\\n\\n @@unique([shopping_channel_id, nickname])\\n @@unique([shopping_channel_id, shopping_citizen_id])\\n @@index([shopping_citizen_id])\\n @@index([nickname(ops: raw(\\\"gin_trgm_ops\\\"))], type: Gin)\\n @@index([created_at])\\n}\\n\\n/// Email address of member.\\n///\\n/// This system allows multiple email addresses to be registered for one\\n/// {@link shopping_members member}. If you don't have to plan such multiple\\n/// email addresses, just use only one.\\n///\\n/// @namespace Actors\\n/// @author Samchon\\nmodel shopping_member_emails {\\n //----\\n // COLUMNS\\n //----\\n id String @id @db.Uuid\\n\\n /// Belonged channel's {@link shopping_channels.id}\\n ///\\n /// Duplicated attribute with {@link shopping_members.channel_id}, but\\n /// just denormalized for composing unique constraint.\\n ///\\n /// @hidden\\n shopping_channel_id String @db.Uuid\\n\\n /// Belonged member's {@link shopping_members.id}\\n shopping_member_id String @db.Uuid\\n\\n /// Email address.\\n value String @db.VarChar\\n\\n /// Creation time of record.\\n created_at DateTime @db.Timestamptz\\n\\n //----\\n // RELATIONS\\n //----\\n channel shopping_channels @relation(fields: [shopping_channel_id], references: [id], onDelete: Cascade)\\n member shopping_members @relation(fields: [shopping_member_id], references: [id], onDelete: Cascade)\\n\\n @@unique([shopping_channel_id, value])\\n @@unique([shopping_member_id, value])\\n @@index([value(ops: raw(\\\"gin_trgm_ops\\\"))], type: Gin)\\n}\\n\\n/// Seller information.\\n///\\n/// `shopping_sellers` is an entity that embodies a person who registers\\n/// {@link shoppingsales sales} to operate selling activities, with \\n/// {@link shoppingmembers membership} joining.\\n///\\n/// For reference, unlike {@link shopping_customers customers} which can \\n/// participate even without {@link shopping_members membership} joining, \\n/// seller must join membership to operate sales. Also, seller must\\n/// do the {@link shopping_citizens real-name authentication}, too. \\n///\\n/// @namespace Actors\\n/// @author Samchon\\nmodel shopping_sellers {\\n //----\\n // COLUMNS\\n //----\\n /// Primary Key.\\n id String @id @db.Uuid\\n\\n /// Belonged member's {@link shopping_members.id}.\\n shopping_member_id String @db.Uuid\\n\\n /// Creation time of record.\\n ///\\n /// Joining time as seller, and it can be different with \\n /// {@link shopping_members membership} joining time.\\n created_at DateTime @db.Timestamptz\\n\\n /// Withdrawal time.\\n ///\\n /// It can be different with {@link shopping_members.deleted_at}.\\n deleted_at DateTime? @db.Timestamptz\\n\\n //----\\n // RELATIONSHIPS\\n //----\\n member shopping_members @relation(fields: [shopping_member_id], references: [id], onDelete: Cascade)\\n shopping_order_goods shopping_order_goods[]\\n shopping_coupon_seller_criterias shopping_coupon_seller_criterias[]\\n mv_shopping_order_publish_seller_states mv_shopping_order_publish_seller_states[]\\n\\n @@unique([shopping_member_id])\\n @@index([created_at])\\n}\\n\\n/// Administrator account.\\n///\\n/// `shopping_administrators` is an entity that embodies a person who manages\\n/// the shopping mall system, with {@link shopping_members membership} joining.\\n///\\n/// For reference, unlike {@link shopping_customers customers} which can \\n/// participate even without {@link shopping_members membership} joining, \\n/// administrator must join membership to operate sales. Also, administrator must\\n/// do the {@link shopping_citizens real-name authentication}, too. \\n///\\n/// @todo Not detailed yet.\\n/// @namespace Actors\\n/// @author Samchon\\nmodel shopping_administrators {\\n //----\\n // COLUMNS\\n //----\\n /// Primary Key.\\n id String @id @db.Uuid\\n\\n /// Belonged member's {@link shopping_members.id}.\\n shopping_member_id String @db.Uuid\\n\\n /// Creation time of record.\\n ///\\n /// Joining time as an administrator, and can be different with\\n /// {@link shopping_members membership} joining time.\\n created_at DateTime @db.Timestamptz\\n\\n /// Deletion time of record.\\n ///\\n /// Withdrawal time from administrator, and can be different with\\n /// {@link shopping_members.deleted_at}.\\n deleted_at DateTime? @db.Timestamptz\\n\\n //----\\n // RELATIONS\\n //----\\n member shopping_members @relation(fields: [shopping_member_id], references: [id], onDelete: Cascade)\\n\\n @@unique([shopping_member_id])\\n @@index([created_at])\\n}\\n\\n/// The address information.\\n///\\n/// @namespace Actors\\n/// @erd Orders\\n/// @erd Favorites\\n/// @author Samchon\\nmodel shopping_addresses {\\n //----\\n // COLUMNS\\n //----\\n /// Primary Key.\\n id String @id @db.Uuid\\n\\n /// Mobile number.\\n mobile String @db.VarChar\\n\\n /// Representative name of the address.\\n ///\\n /// Sometimes be receiver's name, and sometimes be place name.\\n name String @db.VarChar\\n\\n /// Target country.\\n country String @db.VarChar\\n\\n /// Target province.\\n province String @db.VarChar\\n\\n /// Target city.\\n city String @db.VarChar\\n\\n /// Department name.\\n department String @db.VarChar\\n\\n /// Detailed address containing room number.\\n possession String @db.VarChar\\n\\n /// Zip code, or postal code.\\n zip_code String @db.VarChar\\n\\n /// Special description if required.\\n special_note String? @db.VarChar\\n\\n /// Creation time of record.\\n created_at DateTime @db.Timestamptz\\n\\n //----\\n // RELATIONS\\n //----\\n /// List of orders.\\n orders shopping_orders[]\\n shopping_address_favorites shopping_address_favorites[]\\n shopping_order_publishes shopping_order_publishes[]\\n\\n @@index([mobile])\\n @@index([name])\\n}\\n\",\"schema-04-sales.prisma\":\"/// Seller **sales** products.\\n/// \\n/// `shopping_sales` is an entity that embodies \\\"product sales\\\" (sales) \\n/// information registered by the {@link shopping_sellers seller}. And the \\n/// main information of the sale is recorded in the sub \\n/// {@link shopping_sale_snapshots}, not in the main `shopping_sales`. \\n/// When a seller changes a previously registered item, the existing \\n/// `shopping_sales` record is not changed, but a new snapshot record is \\n/// created.\\n/// \\n/// This is to preserve the {@link shopping_customers customer}'s \\n/// {@link shopping_orders purchase history} flawlessly after the customer \\n/// purchases a specific item, even if the seller changes the components or \\n/// price of the item. It is also intended to support sellers in so-called \\n/// A/B testing, which involves changing components or prices and measuring \\n/// the performance in each case.\\n///\\n/// @namespace Sales\\n/// @erd Systematic\\n/// @erd Favorites\\n/// @author Samchon\\nmodel shopping_sales {\\n //----\\n // COLUMNS\\n //----\\n /// Primary Key.\\n id String @id @db.Uuid\\n\\n /// Belonged section's {@link shopping_sections.id}\\n shopping_section_id String @db.Uuid\\n\\n /// Belonged seller's {@link shopping_customers.id}\\n shopping_seller_customer_id String @db.Uuid\\n\\n /// Creation time of record.\\n ///\\n /// Note that, this property is different with `opened_at`, which means\\n /// the opening time of sale.\\n created_at DateTime @db.Timestamptz\\n\\n /// Opening time of sale.\\n ///\\n /// If `null` value assigned, it means not opened yet.\\n opened_at DateTime? @db.Timestamptz\\n\\n /// Closing time of sale.\\n ///\\n /// If `null` value assigned, the sale is forever.\\n closed_at DateTime? @db.Timestamptz\\n\\n /// Paused time.\\n ///\\n /// The time when seller paused the sale in some reason.\\n ///\\n /// {@link shopping_customers Customers} still can see the sale in list \\n /// and detail page, but a label \\\"The sale is paused for a while by seller\\\" \\n /// be attached.\\n paused_at DateTime? @db.Timestamptz\\n\\n /// Suspended time.\\n ///\\n /// The time when seller suspended the sale in some reason.\\n ///\\n /// {@link shopping_customers Customers} can't see the sale in list and \\n /// detail page. It seems almost same with soft deletion, but there're \\n /// some differences. \\n ///\\n /// At 1st, seller and {@link shopping_administrators administrator} can\\n /// see suspended sale in list and detail page. At 2nd, seller can\\n /// resume the sale at any time.\\n suspended_at DateTime? @db.Timestamptz\\n\\n //----\\n // RELATIONS\\n //----\\n section shopping_sections @relation(fields: [shopping_section_id], references: [id], onDelete: Cascade)\\n sellerCustomer shopping_customers @relation(fields: [shopping_seller_customer_id], references: [id], onDelete: Cascade)\\n snapshots shopping_sale_snapshots[]\\n shopping_coupon_sale_criterias shopping_coupon_sale_criterias[]\\n\\n mv_last mv_shopping_sale_last_snapshots?\\n shopping_sale_favorites shopping_sale_favorites[]\\n\\n @@index([shopping_section_id])\\n @@index([shopping_seller_customer_id])\\n @@index([created_at])\\n @@index([opened_at, closed_at, suspended_at])\\n}\\n\\n/// Sale snapshot information.\\n/// \\n/// `shopping_sale_snapshots` is an entity representing snapshot record of\\n/// belonged {@link shopping_sales sale}. The snapshot record is created\\n/// whenever the seller newly creates or updates the sale.\\n///\\n/// Sale | Cart | Order\\n/// -----|------|------\\n/// x | {@link shopping_carts} | {@link shopping_orders}\\n/// {@link shopping_sale_snapshots} | {@link shopping_cart_commodities} | {@link shopping_order_goods}\\n/// {@link shopping_sale_snapshot_unit_stocks} | {@link shopping_cart_commodity_stocks} | x\\n///\\n/// @namespace Sales\\n/// @erd Systematic\\n/// @erd Inquiries\\n/// @erd Carts\\n/// @erd Favorites\\n/// @author Samchon\\nmodel shopping_sale_snapshots {\\n //----\\n // COLUMNS\\n //----\\n /// Primary Key.\\n id String @id @db.Uuid\\n\\n /// Belonged sale's {@link shopping_sales.id}\\n shopping_sale_id String @db.Uuid\\n\\n /// Creation time of record.\\n ///\\n /// It means the time when the seller created or updated the sale.\\n created_at DateTime @db.Timestamptz\\n\\n //----\\n // RELATIONS\\n //----\\n /// Belonged sale.\\n sale shopping_sales @relation(fields: [shopping_sale_id], references: [id], onDelete: Cascade)\\n\\n content shopping_sale_snapshot_contents?\\n units shopping_sale_snapshot_units[]\\n tags shopping_sale_snapshot_tags[]\\n to_categories shopping_sale_snapshot_categories[]\\n\\n shopping_cart_commodities shopping_cart_commodities[]\\n shopping_sale_snapshot_inquiries shopping_sale_snapshot_inquiries[]\\n\\n mv_last mv_shopping_sale_last_snapshots?\\n mv_price_range mv_shopping_sale_snapshot_prices?\\n shopping_sale_favorites shopping_sale_favorites[]\\n\\n @@index([shopping_sale_id, created_at])\\n}\\n\\n/// Product composition information handled in the sale snapshot.\\n/// \\n/// `shopping_sale_snapshot_units` is an entity that embodies the \\n/// \\\"individual product\\\" information handled in the \\n/// {@link shopping_sale_snapshots sale snapshot}.\\n/// \\n/// For reference, the reason why `shopping_sale_snapshot_units` is separated \\n/// from {@link shopping_sale_snapshots} by an algebraic relationship of \\n/// 1: N is because there are some cases where multiple products are sold \\n/// in one listing. This is the case with so-called \\\"bundled products\\\".\\n/// \\n/// - Bundle from regular product (Macbook Set)\\n/// - main body\\n/// - keyboard\\n/// - mouse\\n/// - Apple Care (Free A/S Voucher)\\n/// \\n/// And again, `shopping_sale_snapshot_units` does not in itself refer to \\n/// the final {@link shopping_sale_snapshot_unit_stocks stock} that the \\n/// customer will purchase. \\n/// The {@link shopping_sale_snapshot_unit_stocks final stock} can be \\n/// found only after selecting all given \\n/// {@link shopping_sale_snapshot_unit_options options} and their \\n/// {@link shopping_sale_snapshot_unit_option_candidates candidate} values.\\n/// \\n/// For example, even if you buy a Macbook, the \\n/// {@link shopping_sale_snapshot_unit_stocks final stocks} are determined \\n/// only after selecting all the \\n/// {@link shopping_sale_snapshot_unit_options options} (CPU / RAM / SSD), etc.\\n///\\n/// @namespace Sales\\n/// @erd Carts\\n/// @author Samchon\\nmodel shopping_sale_snapshot_units {\\n //----\\n // COLUMNS\\n //----\\n /// Primary Key.\\n id String @id @db.Uuid\\n\\n /// Belonged snapshot's {@link shopping_sale_snapshots.id}\\n shopping_sale_snapshot_id String @db.Uuid\\n\\n /// Representative name of the unit.\\n name String @db.VarChar\\n\\n /// Whether the unit is primary or not.\\n ///\\n /// Just a labeling value.\\n primary Boolean @db.Boolean\\n\\n /// Whether the unit is required or not.\\n ///\\n /// When the unit is required, the customer must select the unit. If do\\n /// not select, customer can't buy it.\\n ///\\n /// For example, if there's a sale \\\"Macbook Set\\\" and one of the unit is \\n /// the \\\"Main Body\\\", is it possible to buy the \\\"Macbook Set\\\" without the \\n /// \\\"Main Body\\\" unit? This property is for that case.\\n required Boolean @db.Boolean\\n\\n /// Sequence order in belonged snapshot.\\n sequence Int @db.Integer\\n\\n //----\\n // RELATIONS\\n //----\\n /// Belonged snapshot.\\n snapshot shopping_sale_snapshots @relation(fields: [shopping_sale_snapshot_id], references: [id], onDelete: Cascade)\\n\\n /// List of options.\\n options shopping_sale_snapshot_unit_options[]\\n\\n /// List of stocks.\\n stocks shopping_sale_snapshot_unit_stocks[]\\n shopping_cart_commodity_stocks shopping_cart_commodity_stocks[]\\n mv_price_range mv_shopping_sale_snapshot_unit_prices?\\n\\n @@unique([shopping_sale_snapshot_id, name])\\n}\\n\\n/// Individual option information on units for sale.\\n/// \\n/// `shopping_sale_snapshot_unit_options` is a subsidiary entity of \\n/// {@link shopping_sale_snapshot_units} that represents individual products \\n/// in the sale, and is an entity designed to represent individual option \\n/// information for the unit.\\n/// \\n/// - Examples of Options\\n/// - optional options\\n/// - Computer: CPU, RAM, SSD, etc.\\n/// - Clothes: size, color, style, etc.\\n/// - descriptive options\\n/// - Engrave\\n/// - Simple question\\n///\\n/// If the `type` of option is a `variable` value in `\\\"select\\\"`, the \\n/// {@link shopping_sale_snapshot_unit_stocks final stock} that the customer \\n/// will purchase changes depending on the selection of the \\n/// {@link shopping_sale_snapshot_unit_option_candidates candidate} value.\\n///\\n/// Conversely, if it is a `type` other than `\\\"select\\\"`, or if the `type` \\n/// is `\\\"select\\\"` but `variable` is `false`, this is an option that has no \\n/// meaning beyond simple information transfer. Therefore, no matter what \\n/// value the customer enters and chooses when purchasing it, the option in \\n/// this case does not affect the \\n/// {@link shopping_sale_snapshot_unit_stocks final stock}.\\n///\\n/// @namespace Sales\\n/// @erd Carts\\n/// @author Samchon\\nmodel shopping_sale_snapshot_unit_options {\\n //----\\n // COLUMNS\\n //----\\n /// Primary Key.\\n id String @id @db.Uuid\\n\\n /// Belonged unit's {@link shopping_sale_snapshot_units.id}\\n shopping_sale_snapshot_unit_id String @db.Uuid\\n\\n /// Name of the option.\\n name String @db.VarChar\\n\\n /// Type of the option.\\n ///\\n /// - `select`: The way selecting one of the candidate values.\\n /// - `boolean`\\n /// - `number`\\n /// - `string`\\n type String @db.VarChar\\n\\n /// Whether the option is variable or not.\\n ///\\n /// When `type` of current option is `\\\"select\\\"`, this attribute means\\n /// whether selecting different \\n /// {@link shopping_sale_snapshot_unit_option_candidate candidate} value \\n /// affects the {@link shopping_sale_snapshot_unit_stocks final stock}\\n /// or not.\\n ///\\n /// For reference, if `type` value is not `\\\"select\\\"`, this attribute\\n /// is always `false`.\\n variable Boolean @db.Boolean\\n\\n /// Sequence order in belonged unit.\\n sequence Int @db.Integer\\n\\n //----\\n // RELATIONS\\n //----\\n /// Belonged unit.\\n unit shopping_sale_snapshot_units @relation(fields: [shopping_sale_snapshot_unit_id], references: [id], onDelete: Cascade)\\n\\n /// List of candidates.\\n candidates shopping_sale_snapshot_unit_option_candidates[]\\n shopping_cart_commodity_stock_choices shopping_cart_commodity_stock_choices[]\\n shopping_sale_snapshot_unit_stock_choices shopping_sale_snapshot_unit_stock_choices[]\\n\\n @@unique([shopping_sale_snapshot_unit_id, name])\\n}\\n\\n/// Selectable candidate values within an option.\\n/// \\n/// `shopping_sale_snapshot_unit_option_candidates` is an entity that \\n/// represents individual candidate values that can be selected from \\n/// {@link shopping_sale_snapshot_unit_options options} of the \\\"select\\\" type.\\n/// \\n/// - Example\\n/// - RAM: 8GB, 16GB, 32GB\\n/// - GPU: RTX 3060, RTX 4080, TESLA\\n/// - License: Private, Commercial, Educatiion\\n/// \\n/// By the way, if belonged {@link shopping_sale_snapshot_unit_options option} \\n/// is not \\\"select\\\" type, this entity never being used.\\n///\\n/// @namespace Sales\\n/// @erd Carts\\n/// @author Samchon\\nmodel shopping_sale_snapshot_unit_option_candidates {\\n //----\\n // COLUMNS\\n //----\\n /// Primary Key.\\n id String @id @db.Uuid\\n\\n /// Belonged option's {@link shopping_sale_snapshot_unit_options.id}\\n shopping_sale_snapshot_unit_option_id String @db.Uuid\\n\\n /// Representative name of candidate value.\\n name String @db.VarChar\\n\\n /// Sequence order in option.\\n sequence Int @db.Integer\\n\\n //----\\n // RELATIONS\\n //----\\n /// Belonged entity.\\n option shopping_sale_snapshot_unit_options @relation(fields: [shopping_sale_snapshot_unit_option_id], references: [id], onDelete: Cascade)\\n\\n /// List of choices in stock.\\n choices shopping_sale_snapshot_unit_stock_choices[]\\n shopping_cart_commodity_stock_choices shopping_cart_commodity_stock_choices[]\\n\\n @@unique([shopping_sale_snapshot_unit_option_id, name])\\n}\\n\\n/// Final component information on units for sale.\\n/// \\n/// `shopping_sale_snapshot_unit_stocks` is a subsidiary entity of \\n/// {@link shopping_sale_snapshot_units} that represents a product catalog \\n/// for sale, and is a kind of final stock that is constructed by selecting \\n/// all {@link shopping_sale_snapshot_unit_options options} \\n/// (variable \\\"select\\\" type) and their \\n/// {@link shopping_sale_snapshot_unit_option_candidates candidate} values in \\n/// the belonging unit. It is the \\\"good\\\" itself that customers actually \\n/// purchase.\\n/// \\n/// - Product Name) MacBook\\n/// - Options\\n/// - CPU: { i3, i5, i7, i9 }\\n/// - RAM: { 8GB, 16GB, 32GB, 64GB, 96GB }\\n/// - SSD: { 256GB, 512GB, 1TB }\\n/// - Number of final stocks: 4 * 5 * 3 = 60\\n///\\n/// For reference, the total number of `shopping_sale_snapshot_unit_stocks` \\n/// records in an attribution unit can be obtained using Cartesian Product. \\n/// In other words, the value obtained by multiplying all the candidate \\n/// values that each (variable \\\"select\\\" type) option can have by the number \\n/// of cases is the total number of final stocks in the unit. \\n///\\n/// Of course, without a single variable \\\"select\\\" type option, the final \\n/// stocks count in the unit is only 1.\\n///\\n/// @namespace Sales\\n/// @erd Carts\\n/// @author Samchon\\nmodel shopping_sale_snapshot_unit_stocks {\\n //----\\n // COLUMNS\\n //----\\n /// Primary Key.\\n id String @id @db.Uuid\\n\\n /// Belonged unit's {@link shopping_sale_snapshot_units.id}\\n shopping_sale_snapshot_unit_id String @db.Uuid\\n\\n /// Name of the final stock.\\n name String @db.VarChar\\n\\n /// Nominal price.\\n ///\\n /// This is not real price to pay, but just a nominal price to show.\\n /// If this value is greater than the `real_price`, it would be shown\\n /// like seller is giving a discount.\\n nominal_price Float @db.DoublePrecision\\n\\n /// Real price to pay.\\n real_price Float @db.DoublePrecision\\n\\n /// Initial inventory quantity.\\n ///\\n /// If this stock has been sold over this quantity count, the stock can't\\n /// be sold anymore, because of out of stock. In that case, the seller can\\n /// supplement the inventory quantity by registering some \\n /// {@link shopping_sale_snapshot_unit_stock_supplements} records.\\n quantity Int\\n\\n /// Sequence order in belonged unit.\\n sequence Int @db.Integer\\n\\n //----\\n // RELATIONS\\n //----\\n /// Belonged unit.\\n unit shopping_sale_snapshot_units @relation(fields: [shopping_sale_snapshot_unit_id], references: [id], onDelete: Cascade)\\n\\n /// List of choices.\\n ///\\n /// Which candidate values are chosen in each option.\\n choices shopping_sale_snapshot_unit_stock_choices[]\\n\\n /// List of supplements of inventory quantity.\\n supplements shopping_sale_snapshot_unit_stock_supplements[]\\n\\n shopping_cart_commodity_stocks shopping_cart_commodity_stocks[]\\n\\n mv_inventory mv_shopping_sale_snapshot_unit_stock_inventories?\\n shopping_delivery_pieces shopping_delivery_pieces[]\\n\\n @@unique([shopping_sale_snapshot_unit_id, name])\\n}\\n\\n/// Selection information of final stock.\\n/// \\n/// `shopping_sale_snapshot_unit_stock_choices` is an entity that represents \\n/// which {@link shopping_sale_snapshot_unit_options option} of each `variable` \\n/// \\\"select\\\" `type` was selected for each stock and which \\n/// {@link shopping_sale_snapshot_unit_option_candidates candidate value} was \\n/// selected within it.\\n/// \\n/// Of course, if the bound {@link shopping_sale_snapshot_units unit} does not \\n/// have any {@link shopping_sale_snapshot_unit_options options}, this entity \\n/// can also be ignored.\\n///\\n/// @namespace Sales\\n/// @author Samchon\\nmodel shopping_sale_snapshot_unit_stock_choices {\\n //----\\n // COLUMNS\\n //----\\n /// Primary Key.\\n id String @id @db.Uuid\\n\\n /// Belonged stock's {@link shopping_sale_snapshot_unit_stocks.id}\\n shopping_sale_snapshot_unit_stock_id String @db.Uuid\\n\\n /// Belonged option's {@link shopping_sale_snapshot_unit_options.id}\\n shopping_sale_snapshot_unit_option_id String @db.Uuid\\n\\n /// Belonged candidate's {@link shopping_sale_snapshot_unit_option_candidates.id}\\n shopping_sale_snapshot_unit_option_candidate_id String @db.Uuid\\n\\n /// Sequence order in belonged stock.\\n sequence Int @db.Integer\\n\\n //----\\n // RELATIONS\\n //----\\n /// Belonged stock.\\n stock shopping_sale_snapshot_unit_stocks @relation(map: \\\"fk_shopping_sale_snapshot_unit_stock_choices_stock\\\", fields: [shopping_sale_snapshot_unit_stock_id], references: [id], onDelete: Cascade)\\n\\n option shopping_sale_snapshot_unit_options? @relation(map: \\\"fk_shopping_sale_snapshot_unit_stock_choices_option\\\", fields: [shopping_sale_snapshot_unit_option_id], references: [id], onDelete: Cascade)\\n\\n /// Belonged candidate.\\n candidate shopping_sale_snapshot_unit_option_candidates? @relation(map: \\\"fk_shopping_sale_snapshot_unit_stock_choices_candidate\\\", fields: [shopping_sale_snapshot_unit_option_candidate_id], references: [id], onDelete: Cascade)\\n\\n @@unique([shopping_sale_snapshot_unit_stock_id, shopping_sale_snapshot_unit_option_candidate_id])\\n}\\n\\n/// Supplementation of inventory quantity of stock.\\n///\\n/// You know what? If a stock has been sold over its \\n/// {@link shopping_sale_snapshot_unit_stocks.inventory initial inventory quantity},\\n/// the stock can't be sold anymore, because of out of stock. In that case, how the\\n/// {@link shopping_sellers} should do?\\n///\\n/// When the sotck is sold out, seller can supplement the inventory record by\\n/// registering this `shopping_sale_snapshot_unit_stock_supplements` record. Right,\\n/// this `shopping_sale_snapshot_unit_stock_supplements` is an entity that embodies\\n/// the supplementation of the inventory quantity of the belonged \\n/// {@link shopping_sale_snapshot_unit_stocks stock}.\\n///\\n/// @describe Sales\\n/// @author Samchon\\nmodel shopping_sale_snapshot_unit_stock_supplements {\\n //----\\n // COLUMNS\\n //----\\n /// Primary Key.\\n id String @id @db.Uuid\\n\\n /// Belonged stock's {@link shopping_sale_snapshot_unit_stocks.id}\\n shopping_sale_snapshot_unit_stock_id String @db.Uuid\\n\\n /// Supplemented inventory quantity.\\n quantity Int\\n\\n /// Creation time of record.\\n ///\\n /// When the inventory be supplemented.\\n created_at DateTime @db.Timestamptz\\n\\n //----\\n // RELATIONS\\n //----\\n /// Belonged stock.\\n stock shopping_sale_snapshot_unit_stocks @relation(fields: [shopping_sale_snapshot_unit_stock_id], references: [id], onDelete: Cascade)\\n\\n @@index([shopping_sale_snapshot_unit_stock_id, created_at])\\n}\\n\\n/// Category classification info of sale snapshot.\\n///\\n/// `shopping_sale_snapshot_categories` is an entity that expresses \\n/// which {@link shopping_channel_categories category} the listing \\n/// {@link shopping_sale_snapshots snapshot}.\\n/// \\n/// It is designed to resolve the M:N relationship between \\n/// {@link shopping_sale_snapshots} and {@link shopping_channel_categories}, \\n/// respectively. Of course, if the target category being referred to is a \\n/// major category, all minor categories belonging to it can also be used.\\n///\\n/// @namespace Sales\\n/// @erd Systematic\\n/// @author Samchon\\nmodel shopping_sale_snapshot_categories {\\n //----\\n // COLUMNS\\n //----\\n /// Primary Key.\\n id String @id @db.Uuid\\n\\n /// Belonged snapshot's {@link shopping_sale_snapshots.id}\\n shopping_sale_snapshot_id String @db.Uuid\\n\\n /// Belonged category's {@link shopping_channel_categories.id}\\n shopping_channel_category_id String @db.Uuid\\n\\n /// Sequence order in belonged snapshot.\\n sequence Int @db.Integer\\n\\n //----\\n // RELATIONS\\n //----\\n snapshot shopping_sale_snapshots @relation(fields: [shopping_sale_snapshot_id], references: [id], onDelete: Cascade)\\n category shopping_channel_categories @relation(fields: [shopping_channel_category_id], references: [id], onDelete: Cascade)\\n\\n @@unique([shopping_sale_snapshot_id, shopping_channel_category_id])\\n @@index([shopping_channel_category_id])\\n}\\n\\n/// Content information of sale snapshot.\\n///\\n/// `shopping_sale_snapshot_contents` is an entity embodies the body contents \\n/// of {@link shopping_sale_snapshots sale snapshot}. Also, it contains\\n/// revert policy of the sale.\\n///\\n/// @describe Sales\\n/// @author Samchon\\nmodel shopping_sale_snapshot_contents {\\n //----\\n // COLUMNS\\n //----\\n /// Primary Key.\\n id String @id @db.Uuid\\n\\n /// Belonged snapshot's {@link shopping_sale_snapshots.id}\\n shopping_sale_snapshot_id String @db.Uuid\\n\\n /// Title of the content.\\n title String @db.VarChar\\n\\n /// Format of the body content.\\n ///\\n /// Same meaning with extension like `html`, `md`, `txt`.\\n format String @db.VarChar\\n\\n /// The main body content.\\n body String @db.Text\\n\\n /// Revert policy.\\n ///\\n /// This is essential in South Korea, but I don't know well in overseas.\\n ///\\n /// Just use when you need.\\n revert_policy String? @db.VarChar\\n\\n //----\\n // RELATIONS\\n //----\\n /// Belonged snapshot.\\n snapshot shopping_sale_snapshots @relation(fields: [shopping_sale_snapshot_id], references: [id], onDelete: Cascade)\\n\\n to_files shopping_sale_snapshot_content_files[]\\n to_thumbnails shopping_sale_snapshot_content_thumbnails[]\\n\\n @@unique([shopping_sale_snapshot_id])\\n @@index([title(ops: raw(\\\"gin_trgm_ops\\\"))], type: Gin)\\n @@index([body(ops: raw(\\\"gin_trgm_ops\\\"))], type: Gin)\\n}\\n\\n/// Attachment file of sale snapshot content.\\n///\\n/// @describe Sales\\n/// @author Samchon\\nmodel shopping_sale_snapshot_content_files {\\n id String @id @db.Uuid\\n shopping_sale_snapshot_content_id String @db.Uuid\\n attachment_file_id String @db.Uuid\\n sequence Int @db.Integer\\n\\n content shopping_sale_snapshot_contents @relation(fields: [shopping_sale_snapshot_content_id], references: [id], onDelete: Cascade)\\n file attachment_files @relation(fields: [attachment_file_id], references: [id], onDelete: Cascade)\\n\\n @@index([shopping_sale_snapshot_content_id])\\n @@index([attachment_file_id])\\n}\\n\\n/// Thumbnail of sale snapshot content.\\n///\\n/// @describe Sales\\n/// @author Samchon\\nmodel shopping_sale_snapshot_content_thumbnails {\\n id String @id @db.Uuid\\n shopping_sale_snapshot_content_id String @db.Uuid\\n attachment_file_id String @db.Uuid\\n sequence Int @db.Integer\\n\\n content shopping_sale_snapshot_contents @relation(fields: [shopping_sale_snapshot_content_id], references: [id], onDelete: Cascade)\\n file attachment_files @relation(fields: [attachment_file_id], references: [id], onDelete: Cascade)\\n\\n @@index([shopping_sale_snapshot_content_id])\\n @@index([attachment_file_id])\\n}\\n\\n/// Search tag of sale snapshot.\\n///\\n/// @describe Sales\\n/// @author Samchon\\nmodel shopping_sale_snapshot_tags {\\n id String @id @db.Uuid\\n shopping_sale_snapshot_id String @db.Uuid\\n value String @db.VarChar\\n sequence Int @db.Integer\\n\\n snapshot shopping_sale_snapshots @relation(fields: [shopping_sale_snapshot_id], references: [id], onDelete: Cascade)\\n\\n @@unique([shopping_sale_snapshot_id, value])\\n @@index([value(ops: raw(\\\"gin_trgm_ops\\\"))], type: Gin)\\n}\\n\\n/// @hidden\\nmodel mv_shopping_sale_last_snapshots {\\n shopping_sale_id String @id @db.Uuid\\n shopping_sale_snapshot_id String @db.Uuid\\n\\n sale shopping_sales @relation(fields: [shopping_sale_id], references: [id], onDelete: Cascade)\\n snapshot shopping_sale_snapshots @relation(fields: [shopping_sale_snapshot_id], references: [id], onDelete: Cascade)\\n\\n @@unique([shopping_sale_snapshot_id])\\n}\\n\\n/// @hidden\\nmodel mv_shopping_sale_snapshot_prices {\\n shopping_sale_snapshot_id String @id @db.Uuid\\n nominal_lowest Float @db.DoublePrecision\\n nominal_highest Float @db.DoublePrecision\\n real_lowest Float @db.DoublePrecision\\n real_highest Float @db.DoublePrecision\\n\\n snapshot shopping_sale_snapshots @relation(fields: [shopping_sale_snapshot_id], references: [id], onDelete: Cascade)\\n\\n @@index([real_lowest, real_highest])\\n}\\n\\n/// @hidden\\nmodel mv_shopping_sale_snapshot_unit_prices {\\n shopping_sale_snapshot_unit_id String @id @db.Uuid\\n nominal_lowest Float @db.DoublePrecision\\n nominal_highest Float @db.DoublePrecision\\n real_lowest Float @db.DoublePrecision\\n real_highest Float @db.DoublePrecision\\n\\n unit shopping_sale_snapshot_units @relation(fields: [shopping_sale_snapshot_unit_id], references: [id], onDelete: Cascade)\\n}\\n\\n/// @hidden\\nmodel mv_shopping_sale_snapshot_unit_stock_inventories {\\n shopping_sale_snapshot_unit_stock_id String @id @db.Uuid\\n income Int @db.Integer\\n outcome Int @db.Integer\\n\\n stock shopping_sale_snapshot_unit_stocks @relation(fields: [shopping_sale_snapshot_unit_stock_id], references: [id], onDelete: Cascade)\\n\\n @@index([shopping_sale_snapshot_unit_stock_id])\\n}\\n\",\"schema-05-carts.prisma\":\"/// Shopping Cart.\\n///\\n/// `shopping_carts` is literally a space where \\n/// {@link shopping_customers customer} temporarily stores products before\\n/// {@link shopping_orders purchase}.\\n///\\n/// By the way, it is possible for {@link shopping_sellers sellers} or \\n/// {@link shopping_administrators administrators} to compose a shopping cart.\\n/// Of course, the reason why they can compose a shopping cart is not for\\n/// {@link shopping_orders purchasing}, but for providing a shopping cart template\\n/// to {@link shopping_customers customers}.\\n///\\n/// Sale | Cart | Order\\n/// -----|------|------\\n/// x | {@link shopping_carts} | {@link shopping_orders}\\n/// {@link shopping_sale_snapshots} | {@link shopping_cart_commodities} | {@link shopping_order_goods}\\n/// {@link shopping_sale_snapshot_unit_stocks} | {@link shopping_cart_commodity_stocks} | x\\n/// \\n/// @namespace Carts\\n/// @author Samchon\\nmodel shopping_carts {\\n //----\\n // COLUMNS\\n //----\\n /// Primary Key.\\n id String @id @db.Uuid\\n\\n /// Belonged customer's {@link shopping_customers.id}\\n shopping_customer_id String @db.Uuid\\n\\n /// Type of the cart creator.\\n ///\\n /// - customer\\n /// - seller\\n /// - administrator\\n actor_type String @db.VarChar\\n\\n /// Creation time of record.\\n created_at DateTime @db.Timestamptz\\n\\n /// Deletion time of record.\\n deleted_at DateTime? @db.Timestamptz\\n\\n //----\\n // RELATIONS\\n //----\\n /// Belonged customer.\\n customer shopping_customers @relation(fields: [shopping_customer_id], references: [id], onDelete: Cascade)\\n\\n /// List of commodities containing sale snapshot.\\n commodities shopping_cart_commodities[]\\n\\n @@index([shopping_customer_id, actor_type, created_at, deleted_at])\\n}\\n\\n/// Item in a shopping cart.\\n///\\n/// `shopping_cart_commodities` is an entity that represents a \\n/// {@link shopping_sale_snapshots snapshot} of the items that \\n/// {@link shopping_customers customer} has placed into his \\n/// {@link shopping_carts shopping cart} with a \\n/// {@link shopping_orders purchase} in mind. And if the customer continues \\n/// this into an actual {@link shopping_orders order} in the future, \\n/// `shopping_cart_commodities` be changed to {@link shopping_order_goods}.\\n/// \\n/// And while adding a sale snapshot to the shopping cart, the customer \\n/// inevitably selects specific {@link shopping_sale_snapshot_units units} and \\n/// {@link shopping_sale_snapshot_unit_stocks final stocks} within the listing \\n/// snapshot. Information about these units and stocks is recorded in the \\n/// subsidiary entity {@link shopping_cart_commodity_stocks}. Also, there is an \\n/// attribute `volume` that indicates how many sets of snapshots of the \\n/// target commodity will be purchased. This \\\"volume\\\" is a value that will be \\n/// multiplied by {@link shopping_cart_commodity_stocks.quantity}, the quantity \\n/// for each component.\\n///\\n/// \\n/// @namespace Carts\\n/// @erd Orders\\n/// @author Samchon\\nmodel shopping_cart_commodities {\\n //----\\n // COLUMNS\\n //----\\n /// Primary Key.\\n id String @id @db.Uuid\\n\\n /// Belonged cart's {@link shopping_carts.id}\\n shopping_cart_id String @db.Uuid\\n\\n /// Target snapshot's {@link shopping_sale_snapshots.id}\\n shopping_sale_snapshot_id String @db.Uuid\\n\\n /// Volume count.\\n ///\\n /// The value multiplied to {@link shopping_cart_commodity_stocks.quantity}.\\n volume Int @db.Integer\\n\\n /// Creation time of record.\\n created_at DateTime @db.Timestamptz\\n\\n /// Deletion time of record.\\n deleted_at DateTime? @db.Timestamptz\\n\\n /// Whether be published or not.\\n ///\\n /// Is current commodity ordered and be paid?\\n ///\\n /// Until purchase the commodity, the commodity can be reused to create new \\n /// cart commodity. This variable can be computed by referencing \\n /// {@link Orders order} related tables, but just denormalized for the\\n /// performance reason.\\n ///\\n /// @hidden\\n published Boolean\\n\\n //----\\n // RELATIONS\\n //----\\n /// Belonged cart.\\n cart shopping_carts @relation(fields: [shopping_cart_id], references: [id], onDelete: Cascade)\\n\\n /// Target snapshot.\\n snapshot shopping_sale_snapshots @relation(fields: [shopping_sale_snapshot_id], references: [id], onDelete: Cascade)\\n\\n /// List of wrapper of final stocks.\\n stocks shopping_cart_commodity_stocks[]\\n\\n /// List of order goods for purchase.\\n order_goods shopping_order_goods[]\\n\\n mv_price mv_shopping_cart_commodity_prices?\\n\\n @@index([shopping_cart_id, created_at])\\n @@index([shopping_sale_snapshot_id])\\n}\\n\\n/// Final stock information of commodity added to the shopping cart.\\n/// \\n/// `shopping_cart_commodity_stocks` is a subsidiary entity of \\n/// {@link shopping_cart_commodities} that embodies the information of the \\n/// {@link shopping_sale_snapshots snapshot} of the items in the shopping cart, \\n/// and is a concept that corresponds to the individual \\n/// {@link shopping_sale_snapshot_units units} in the target item snapshot \\n/// and the {@link shopping_sale_snapshot_unit_stocks stock} finally selected \\n/// among those {@link shopping_sale_snapshot_units units}.\\n/// \\n/// Therefore, if the customer selects multiple units and stocks from the \\n/// target sale snapshot, the attributed {@link shopping_cart_commodities} record \\n/// also has multiple corresponding `shopping_cart_commodity_stocks` records.\\n/// \\n/// And `shopping_cart_commodity_stocks` has a `quantity` property that indicates \\n/// how many final stocks would be purchased in total. The final quantity \\n/// actually purchased can be multiplied by the \\n/// {@link shopping_cart_commodities.volume} value of the parent entity.\\n///\\n/// @namespace Carts\\n/// @erd Orders\\n/// @author Samchon\\nmodel shopping_cart_commodity_stocks {\\n //----\\n // COLUMNS\\n //----\\n /// Primary Key.\\n id String @id @db.Uuid\\n\\n /// Belonged commodity's {@link shopping_cart_commodities.id}\\n shopping_cart_commodity_id String @db.Uuid\\n\\n /// Target unit's {@link shopping_sale_snapshot_units.id}\\n shopping_sale_snapshot_unit_id String @db.Uuid\\n\\n /// Target final stock's {@link shopping_sale_snapshot_unit_stocks.id}\\n shopping_sale_snapshot_unit_stock_id String @db.Uuid\\n\\n /// Quantity count.\\n quantity Int @db.Integer\\n\\n /// Sequence order in belonged cart commodity.\\n sequence Int @db.Integer\\n\\n //----\\n // RELATIONS\\n //----\\n /// Belonged cart commodity.\\n commodity shopping_cart_commodities @relation(fields: [shopping_cart_commodity_id], references: [id], onDelete: Cascade)\\n\\n /// Target unit.\\n unit shopping_sale_snapshot_units @relation(map: \\\"rel_shopping_cart_commodity_stocks_unit\\\", fields: [shopping_sale_snapshot_unit_id], references: [id], onDelete: Cascade)\\n\\n /// Target final stock.\\n stock shopping_sale_snapshot_unit_stocks @relation(map: \\\"rel_shopping_cart_commodity_stocks_stock\\\", fields: [shopping_sale_snapshot_unit_stock_id], references: [id], onDelete: Cascade)\\n\\n /// List of choices, how customer has determined for each option.\\n choices shopping_cart_commodity_stock_choices[]\\n\\n @@index([shopping_cart_commodity_id])\\n @@index([shopping_sale_snapshot_unit_id], map: \\\"idx_shopping_cart_commodity_stocks_unit\\\")\\n @@index([shopping_sale_snapshot_unit_stock_id], map: \\\"idx_shopping_cart_commodity_stocks_stock\\\")\\n}\\n\\n/// Option choice information for the final stock added to the shopping cart.\\n/// \\n/// `shopping_cart_commodity_stock_choices` is a subsidiary entity of \\n/// {@link shopping_cart_commodity_stocks}. It records which \\n/// {@link shopping_sale_snapshot_unit_options options} the customer \\n/// specifically used while putting a specific \\n/// {@link shopping_sale_snapshot_units unit} and specific \\n/// {@link shopping_sale_snapshot_unit_stocks stock} of the \\n/// {@link shopping_sale_snapshots sale snapshot} in the shopping cart, and \\n/// which {@link shopping_sale_snapshot_unit_option_candidates candidate values} \\n/// were selected or written within the shopping cart.\\n/// \\n/// Therefore, `shopping_cart_commodity_stock_choices` has reference properties \\n/// and predicate properties for candidate values in addition to references \\n/// to options. If the `type` of target option is \\\"select\\\", enter the \\n/// candidate value selected by the customer. Otherwise, enter the value \\n/// written by the customer.\\n///\\n/// @namespace Carts\\n/// @author Samchon\\nmodel shopping_cart_commodity_stock_choices {\\n //----\\n // COLUMNS\\n //----\\n /// Primary Key.\\n id String @id @db.Uuid\\n\\n /// Belonged cart-commodity-stock's {@link shopping_cart_commodity_stocks.id}\\n shopping_cart_commodity_stock_id String @db.Uuid\\n\\n /// Target option's {@link shopping_sale_snapshot_unit_options.id}\\n shopping_sale_snapshot_unit_option_id String @db.Uuid\\n\\n /// Selected candidate's {@link shopping_sale_snapshot_unit_option_candidates.id}\\n shopping_sale_snapshot_unit_option_candidate_id String? @db.Uuid\\n\\n /// User-written value for descriptive option.\\n value String? @db.VarChar\\n\\n /// Sequence order in belonged cart-commodity-stock.\\n sequence Int @db.Integer\\n\\n //----\\n // RELATIONS\\n //----\\n /// Belonged cart-commodity-stock.\\n stock shopping_cart_commodity_stocks @relation(fields: [shopping_cart_commodity_stock_id], references: [id], onDelete: Cascade)\\n\\n /// Target option.\\n option shopping_sale_snapshot_unit_options @relation(map: \\\"rel_shopping_cart_commodity_stock_choices_option\\\", fields: [shopping_sale_snapshot_unit_option_id], references: [id], onDelete: Cascade)\\n\\n /// Selected candidate value for \\\"select\\\" typed option.\\n candidate shopping_sale_snapshot_unit_option_candidates? @relation(map: \\\"rel_shopping_cart_commodity_stock_choices_candidate\\\", fields: [shopping_sale_snapshot_unit_option_candidate_id], references: [id], onDelete: Cascade)\\n\\n @@index([shopping_cart_commodity_stock_id])\\n @@index([shopping_sale_snapshot_unit_option_id], map: \\\"idx_shopping_cart_commodity_stock_choices_option\\\")\\n @@index([shopping_sale_snapshot_unit_option_candidate_id], map: \\\"idx_shopping_cart_commodity_stock_choices_candidate\\\")\\n}\\n\\n/// @hidden\\nmodel mv_shopping_cart_commodity_prices {\\n shopping_cart_commodity_id String @id @db.Uuid\\n nominal Float @db.DoublePrecision\\n real Float @db.DoublePrecision\\n volumed_price Float @db.DoublePrecision\\n\\n commodity shopping_cart_commodities @relation(fields: [shopping_cart_commodity_id], references: [id], onDelete: Cascade)\\n}\\n\",\"schema-06-orders.prisma\":\"/// Order application information.\\n/// \\n/// `shopping_orders` is an entity that embodies \\n/// {@link shopping_customers customer}'s order application information. \\n/// However, please note that at this time, you are still at the \\n/// \\\"order application\\\" stage and not the \\\"order confirmation\\\" stage.\\n/// \\n/// And as soon as a customer applies for an order, all \\n/// {@link shopping_cart_commodities commodities} in the target shopping cart are \\n/// promoted to {@link shopping_order_goods}, and those \\n/// {@link shopping_order_goods} records are created under this \\n/// `shopping_orders`. \\n///\\n/// Of course, not all commodities in the target shopping cart become \\n/// {@link shopping_order_goods}, but only those selected by the customer \\n/// become the {@link shopping_order_goods}.\\n/// \\n/// Sale | Cart | Order\\n/// -----|------|------\\n/// x | {@link shopping_carts} | {@link shopping_orders}\\n/// {@link shopping_sale_snapshots} | {@link shopping_cart_commodities} | {@link shopping_order_goods}\\n/// {@link shopping_sale_snapshot_unit_stocks} | {@link shopping_cart_commodity_stocks} | x\\n///\\n/// @namespace Orders\\n/// @author Samchon\\nmodel shopping_orders {\\n //----\\n // COLUMNS\\n //----\\n /// Primary Key.\\n id String @id @db.Uuid\\n\\n /// Belonged customer's {@link shopping_customers.id}\\n shopping_customer_id String @db.Uuid\\n\\n /// Target address' {@link shopping_addresses.id}\\n shopping_address_id String? @db.Uuid\\n\\n /// Representative name of the order.\\n name String @db.VarChar\\n\\n /// Amount of cash payment.\\n cash Float @db.DoublePrecision\\n\\n /// Amount of deposit payment instead of cash.\\n deposit Float @db.DoublePrecision\\n\\n /// Amount of mileage payment instead of cash.\\n mileage Float @db.DoublePrecision\\n\\n /// Creation time of record.\\n created_at DateTime @db.Timestamptz\\n\\n /// Deletion time of record.\\n ///\\n /// If order be published, unable to erase it. In that case, you\\n /// {@link shopping_order_publishes.cancelled_at} instead, or utilize\\n /// {@link shopping_order_good_reverts} instead.\\n deleted_at DateTime? @db.Timestamptz\\n\\n //----\\n // RELATIONS\\n //----\\n /// Belonged customer.\\n customer shopping_customers @relation(fields: [shopping_customer_id], references: [id], onDelete: Cascade)\\n\\n /// Target address.\\n address shopping_addresses? @relation(fields: [shopping_address_id], references: [id], onDelete: Cascade)\\n\\n /// Publish information.\\n publish shopping_order_publishes?\\n\\n /// List of goods to purchase.\\n goods shopping_order_goods[]\\n\\n /// List of paid tickets for discount\\n ticket_payments shopping_coupon_ticket_payments[]\\n mv_price mv_shopping_order_prices?\\n\\n @@index([shopping_customer_id, created_at])\\n @@index([created_at])\\n}\\n\\n/// Information about the individual goods that make up your order.\\n/// \\n/// `shopping_order_goods` is an entity that represents each good ordered \\n/// by a {@link shopping_customers customer}, and the record is created in the \\n/// process of upgrading the product {@link shopping_cart_commodities commodity} \\n/// in the {@link shopping_carts shopping cart} to a good due to the customer's \\n/// {@link shopping_orders order request}.\\n/// \\n/// And `shopping_order_goods`, like {@link shopping_cart_commodities}, is a concept \\n/// that corresponds to the listing \\n/// {@link shopping_sale_snapshots sale snapshot}.\\n/// \\n/// For reference, `shopping_order_goods` also contains `volume` information \\n/// separately from the belonging {@link shopping_cart_commodities.volume}. This is \\n/// because there are some cases where you put 3 books in your shopping cart \\n/// and then change them to 4 during the actual order application process. \\n/// This is to increase the reusability of the shopping cart by changing the \\n/// volume attribute of the current entity rather than directly changing the \\n/// shopping_cart_commodities information.\\n/// \\n/// In addition, `shopping_order_goods` becomes the most basic unit for \\n/// the post-order process, that is, after service (A/S). For example, \\n/// after receiving a customer's product, confirming the order is recorded \\n/// in the `confirmed_at` attribute. Additionally, `shopping_order_goods` is \\n/// the unit in which customers issue issues or request exchanges or refunds \\n/// for ordered products.\\n///\\n/// @namespace Orders\\n/// @author Samchon\\nmodel shopping_order_goods {\\n //----\\n // COLUMNS\\n //----\\n /// Primary Key.\\n id String @id @db.Uuid\\n\\n /// Belonged order's {@link shopping_orders.id}\\n shopping_order_id String @db.Uuid\\n\\n /// Belonged cart commodity's {@link shopping_cart_commodities.id}\\n shopping_cart_commodity_id String @db.Uuid\\n\\n /// Belonged seller's {@link shopping_sellers.id}\\n ///\\n /// It can be computed by referencing related {@link shopping_sales},\\n /// but denormalized for performance reason.\\n ///\\n /// @hidden\\n shopping_seller_id String @db.Uuid\\n\\n /// Volume count.\\n ///\\n /// The value multiplied to {@link shopping_cart_commodity_stocks.quantity}.\\n /// It's purpose is exactly same with {@link shopping_cart_commodities.volume},\\n /// but rewritten because the {@link shopping_cart_commodities} records are\\n /// reusable until payment.\\n volume Int @db.Integer\\n\\n /// Sequence order(?) in belonged order.\\n sequence Int @db.Integer\\n\\n /// Confirmation time of order good.\\n ///\\n /// When be confirmed, customer can't request refund or exchange.\\n ///\\n /// The confirmation be accomplished by following cases.\\n ///\\n /// - Customer does it directly.\\n /// - 14 days after the delivery.\\n confirmed_at DateTime? @db.Timestamptz\\n\\n //----\\n // RELATIONS\\n //----\\n /// Belonged order.\\n order shopping_orders @relation(fields: [shopping_order_id], references: [id], onDelete: Cascade)\\n\\n /// Belonged cart commodity.\\n commodity shopping_cart_commodities @relation(fields: [shopping_cart_commodity_id], references: [id], onDelete: Cascade)\\n\\n /// Belonged seller.\\n seller shopping_sellers @relation(fields: [shopping_seller_id], references: [id], onDelete: Cascade)\\n delivery_pieces shopping_delivery_pieces[]\\n reviews shopping_sale_snapshot_reviews[]\\n\\n mv_price mv_shopping_order_good_prices?\\n mv_state mv_shopping_order_good_states?\\n\\n @@unique([shopping_order_id, shopping_cart_commodity_id])\\n @@index([shopping_cart_commodity_id])\\n @@index([shopping_seller_id])\\n}\\n\\n/// Order completion and payment information.\\n/// \\n/// `shopping_order_publishes` is an entity that embodies the series of \\n/// processes in which a customer pays for his or her \\n/// {@link shopping_orders order}, thereby completing the order. And only after \\n/// the order is completed, can the seller recognize that the customer has \\n/// purchased his product.\\n/// \\n/// By the way, please note that just because the `shopping_order_publishes` \\n/// record exists, it does not mean that the payment has been completed. \\n/// Of course, with \\\"credit cards\\\" and \\\"Google Pay\\\", payment application and \\n/// payment occur at the same time. However, there are some cases where \\n/// payment is made after the payment application, such as \\\"bank transfer\\\" or \\n/// \\\"virtual account payment\\\". Therefore, to see the completion of payment, \\n/// be sure to check the `paid_at` property.\\n/// \\n/// In addition, even after payment has been made, there may be cases where \\n/// it is suddenly cancelled, so please be aware of this as well.\\n/// \\n/// @namespace Orders\\n/// @author Samchon\\nmodel shopping_order_publishes {\\n //----\\n // COLUMNS\\n //----\\n /// Primary Key.\\n id String @id @db.Uuid\\n\\n /// Belonged order's {@link shopping_orders.id}\\n shopping_order_id String @db.Uuid\\n\\n /// Target address' {@link shopping_addresses.id}\\n ///\\n /// The place to receive the goods. For reference, the address information\\n /// also has an information of receiver, and it can be different with the\\n /// customer who has ordered.\\n shopping_address_id String @db.Uuid\\n\\n /// Password for encryption.\\n ///\\n /// This shopping mall system uses a randomly issued password to \\n /// encrypt payment history, and is completely unrelated to the user.\\n password String? @db.VarChar\\n\\n /// Creation time of record.\\n ///\\n /// Note that, this property does not mean the payment completion time.\\n created_at DateTime @db.Timestamptz\\n\\n /// Completion time of payment.\\n ///\\n /// This property is the only way to know if the payment has been\\n /// completed. If this property is `null`, the payment has not been\\n /// completed yet.\\n paid_at DateTime? @db.Timestamptz\\n\\n /// The time when the payment was cancelled or reverted.\\n cancelled_at DateTime? @db.Timestamptz\\n\\n //----\\n // RELATIONS\\n //----\\n /// Belonged order.\\n order shopping_orders @relation(fields: [shopping_order_id], references: [id], onDelete: Cascade)\\n\\n /// Target address.\\n address shopping_addresses @relation(fields: [shopping_address_id], references: [id], onDelete: Cascade)\\n pieces shopping_delivery_pieces[]\\n mv_state mv_shopping_order_publish_states?\\n mv_seller_states mv_shopping_order_publish_seller_states[]\\n\\n @@unique([shopping_order_id])\\n @@index([created_at, paid_at, cancelled_at])\\n @@index([paid_at, cancelled_at])\\n}\\n\\n/// Delivery information.\\n///\\n/// When delivering {@link shopping_order_goods goods} to \\n/// {@link shopping_customers customer}, {@link shopping_selleres seller} can deliver \\n/// multiple {@link shopping_sale_snapshot_unit_stocks stocks}, goods at once. Also, \\n/// it is possible to deliver a stock or good in multiple times due to physical \\n/// restriction like volume or weight problem.\\n///\\n/// As you can see from above, the relationship between delivery with \\n/// {@link shopping_orders order} (or good) is not 1: 1 or N: 1, but M: N. Entity \\n/// `shopping_deliveries` has been designed to represent such relationship, by \\n/// referencing target stocks or goods through subsidiary entity \\n/// {@link shopping_delivery_pieces}.\\n///\\n/// Also, delivery does not end with only one step. It has multiple processes like\\n/// manufacturing, planning, shipping and delivering. Those steps are represented by\\n/// another subsidiary entity {@link shopping_delivery_journeys}.\\n///\\n/// @todo No shipper entity yet\\n/// @namespace Orders\\n/// @author Samchon\\nmodel shopping_deliveries {\\n //----\\n // COLUMNS\\n //----\\n /// Primary Key.\\n id String @id @db.Uuid\\n\\n /// Belonged seller's {@link shopping_sellers.id}\\n shopping_seller_customer_id String @db.Uuid\\n\\n /// Creation time of record.\\n created_at DateTime @db.Timestamptz\\n\\n /// Deletion time of record.\\n deleted_at DateTime? @db.Timestamptz\\n\\n //----\\n // RELATIONS\\n //----\\n sellerCustomer shopping_customers @relation(fields: [shopping_seller_customer_id], references: [id], onDelete: Cascade)\\n journeys shopping_delivery_journeys[]\\n pieces shopping_delivery_pieces[]\\n shippers shopping_delivery_shippers[]\\n mv_state mv_shopping_delivery_states?\\n\\n @@index([shopping_seller_customer_id, created_at])\\n @@index([created_at])\\n}\\n\\n/// Which stocks are delivered.\\n///\\n/// `shopping_delivery_pieces` is a subsidiary entity of {@link shopping_deliveries}, \\n/// describing how much quantity is delivered for each \\n/// {@link shopping_sale_snapshot_unit_stocks stock} in {@link shopping_orders}.\\n/// \\n/// For reference, as an order can be delivered in multiple times due to volume or \\n/// weight problem, it is possible to have multiple `shopping_delivery_pieces` records \\n/// for a single stock.\\n///\\n/// @namespace Orders\\n/// @author Samchon\\nmodel shopping_delivery_pieces {\\n //----\\n // COLUMNS\\n //----\\n /// Primary Key.\\n id String @id @db.Uuid\\n\\n /// Belonged delivery's {@link shopping_deliveries.id}\\n shopping_delivery_id String @db.Uuid\\n\\n /// Target order-publish'es {@link shopping_order_publishes.id}\\n shopping_order_publish_id String @db.Uuid\\n\\n /// Target good's {@link shopping_order_goods.id}\\n shopping_order_good_id String @db.Uuid\\n\\n /// Target stock's {@link shopping_sale_snapshot_unit_stocks.id}\\n shopping_sale_snapshot_unit_stock_id String @db.Uuid\\n\\n /// Quantity count.\\n ///\\n /// It can be precision value to express split shipping.\\n quantity Float @db.DoublePrecision\\n\\n /// Sequence order in belonged delivery.\\n sequence Int @db.Integer\\n\\n //----\\n // RELATIONS\\n //----\\n delivery shopping_deliveries @relation(fields: [shopping_delivery_id], references: [id], onDelete: Cascade)\\n publish shopping_order_publishes @relation(fields: [shopping_order_publish_id], references: [id], onDelete: Cascade)\\n good shopping_order_goods @relation(fields: [shopping_order_good_id], references: [id], onDelete: Cascade)\\n stock shopping_sale_snapshot_unit_stocks @relation(fields: [shopping_sale_snapshot_unit_stock_id], references: [id], onDelete: Cascade)\\n\\n @@index([shopping_delivery_id])\\n @@index([shopping_order_good_id])\\n}\\n\\n/// Shipper information of delivery.\\n///\\n/// @namespace Orders\\n/// @author Samchon\\nmodel shopping_delivery_shippers {\\n //----\\n // COLUMNS\\n //----\\n /// Primary Key.\\n id String @id @db.Uuid\\n\\n /// Belonged delivery's {@link shopping_deliveries.id}\\n shopping_delivery_id String @db.Uuid\\n\\n /// Mobile number of shipper.\\n mobile String @db.VarChar\\n\\n /// Name of shipper.\\n name String @db.VarChar\\n\\n /// Company of shipper.\\n company String? @db.VarChar\\n\\n created_at DateTime @db.Timestamptz\\n\\n //----\\n // RELATIONS\\n //----\\n delivery shopping_deliveries @relation(fields: [shopping_delivery_id], references: [id], onDelete: Cascade)\\n\\n @@index([shopping_delivery_id])\\n}\\n\\n/// Journey of delivery.\\n///\\n/// `shopping_delivery_journeys` is a subsidiary entity of {@link shopping_deliveries}, \\n/// describing each journey of the delivery. For reference, the word journey means \\n/// each step of the delivery process, such as preparing, shipping, and delivering \\n/// {@link shopping_order_goods goods} to the {@link shopping_customers customer}.\\n///\\n/// @namespace Orders\\n/// @author Samchon\\nmodel shopping_delivery_journeys {\\n //----\\n // COLUMNS\\n //----\\n /// Primary Key.\\n id String @id @db.Uuid\\n\\n /// Belonged delivery's {@link shopping_deliveries.id}\\n shopping_delivery_id String @db.Uuid\\n\\n /// Type of journey.\\n ///\\n /// - preparing\\n /// - manufacturing\\n /// - shipping\\n /// - delivering\\n type String @db.VarChar\\n\\n /// Title of journey.\\n title String? @db.VarChar\\n\\n /// Description of journey.\\n description String?\\n\\n /// Sequence order in belonged delivery.\\n sequence Int @db.Integer\\n\\n /// Creation time of record.\\n created_at DateTime @db.Timestamptz\\n\\n /// Completion time of journey.\\n completed_at DateTime? @db.Timestamptz\\n\\n /// Deletion time of record.\\n deleted_at DateTime? @db.Timestamptz\\n\\n //----\\n // RELATIONS\\n //----\\n /// Belonged delivery.\\n delivery shopping_deliveries @relation(fields: [shopping_delivery_id], references: [id], onDelete: Cascade)\\n\\n @@index([shopping_delivery_id])\\n}\\n\\n/// @hidden\\nmodel mv_shopping_order_prices {\\n shopping_order_id String @id @db.Uuid\\n quantity Int @db.Integer\\n nominal Float @db.DoublePrecision\\n real Float @db.DoublePrecision\\n ticket Float @db.DoublePrecision\\n\\n order shopping_orders @relation(fields: [shopping_order_id], references: [id], onDelete: Cascade)\\n}\\n\\n/// @hidden\\nmodel mv_shopping_order_good_prices {\\n shopping_order_good_id String @id @db.Uuid\\n nominal Float @db.DoublePrecision\\n real Float @db.DoublePrecision\\n cash Float @db.DoublePrecision\\n deposit Float @db.DoublePrecision\\n mileage Float @db.DoublePrecision\\n ticket Float @db.DoublePrecision\\n\\n good shopping_order_goods @relation(fields: [shopping_order_good_id], references: [id], onDelete: Cascade)\\n}\\n\\n/// @hidden\\nmodel mv_shopping_order_publish_states {\\n shopping_order_publish_id String @id @db.Uuid\\n value String @db.VarChar\\n\\n publish shopping_order_publishes @relation(fields: [shopping_order_publish_id], references: [id], onDelete: Cascade)\\n}\\n\\n/// @hidden\\nmodel mv_shopping_order_good_states {\\n shopping_order_good_id String @id @db.Uuid\\n value String @db.VarChar\\n\\n good shopping_order_goods @relation(fields: [shopping_order_good_id], references: [id], onDelete: Cascade)\\n}\\n\\n/// @hidden\\nmodel mv_shopping_order_publish_seller_states {\\n id String @id @db.Uuid\\n shopping_order_publish_id String @db.Uuid\\n shopping_seller_id String @db.Uuid\\n value String @db.VarChar\\n\\n publish shopping_order_publishes @relation(fields: [shopping_order_publish_id], references: [id], onDelete: Cascade)\\n seller shopping_sellers @relation(fields: [shopping_seller_id], references: [id], onDelete: Cascade)\\n\\n @@unique([shopping_order_publish_id, shopping_seller_id])\\n @@index([shopping_order_publish_id])\\n}\\n\\n/// @hidden\\nmodel mv_shopping_delivery_states {\\n shopping_delivery_id String @id @db.Uuid\\n value String @db.VarChar\\n\\n delivery shopping_deliveries @relation(fields: [shopping_delivery_id], references: [id], onDelete: Cascade)\\n}\\n\",\"schema-07-coupons.prisma\":\"/// Discount coupon.\\n/// \\n/// `shopping_coupons` is an entity that symbolizes discount coupons at a \\n/// shopping mall.\\n/// \\n/// Note that, `shopping_coupons` only contains specification information \\n/// about discount coupons. Please keep in mind that this is a different \\n/// concept from {@link shopping_coupon_tickets}, which refers to the issuance \\n/// of a discount coupon, or {@link shopping_coupon_ticket_payments}, which \\n/// refers to its payment.\\n/// \\n/// Additionally, discount coupons are applied on an \\n/// {@link shopping_orders order-by-order} basis, but each has its own unique \\n/// restrictions. For example, a coupon with \\n/// {@link shopping_coupon_seller_criterias} may or may not be used only for \\n/// {@link shopping_sale_snapshots snapshots} of listings registered by the \\n/// {@link shopping_sellers seller}. Also, there are restrictions such as \\n/// minimum amount restrictions for using discount coupons and maximum discount \\n/// amount limits.\\n/// \\n/// In addition, you can set whether to issue discount coupons publicly or give \\n/// them only to people who know the specific issuing code. In addition, there \\n/// are restrictions such as issued discount coupons having an expiration date \\n/// or being issued only to customers who came in through a \\n/// {@link shopping_coupon_funnel_criterias specific funnel}.\\n/// \\n/// For more information, please refer to the properties below and the \\n/// subsidiary entities described later.\\n/// \\n/// @namespace Coupons\\n/// @author Samchon\\nmodel shopping_coupons {\\n /// Primary Key.\\n id String @id @db.Uuid\\n\\n /// Belonged administrator or seller's {@link shopping_customers.id}\\n shopping_customer_id String @db.Uuid\\n\\n /// Type of the coupon creator.\\n ///\\n /// - administrator\\n /// - seller\\n actor_type String @db.VarChar\\n\\n /// Reprensentative name of coupon.\\n name String @db.VarChar\\n\\n /// Access level of coupon.\\n ///\\n /// - `public`: possible to find from public API\\n /// - `private`: unable to find from public API\\n /// - arbitrarily assigned by the seller or administrator\\n /// - issued from one-time link\\n access String @db.VarChar\\n\\n /// Exclusivity or not.\\n /// \\n /// An exclusive discount coupon refers to a discount coupon that has an \\n /// exclusive relationship with other discount coupons and can only be used \\n /// alone. That is, when an exclusive discount coupon is used, no other \\n /// discount coupon can be used for the same {@link shopping_orders order} \\n /// or {@link shopping_order_goods good}.\\n /// \\n /// Please note that this `exclusive` attribute is a very different \\n /// concept from `multiplicative`, which means whether the same coupon \\n /// can be multiplied and applied to multiple coupons of the same order, \\n /// so please do not confuse them.\\n exclusive Boolean @db.Boolean\\n\\n /// Discount unit.\\n ///\\n /// - amount: Absolute value\\n /// - percent: 0 ~ 100 %\\n unit String @db.VarChar\\n\\n /// Discount value.\\n ///\\n /// If `unit` is percent, range of value is limited from 0 to 100.\\n value Float @db.DoublePrecision\\n\\n /// Minimum purchase amount for discount.\\n /// \\n /// When setting this value, discount coupons cannot be applied to \\n /// order totals that are less than this value.\\n threshold Float? @db.DoublePrecision\\n\\n /// Maximum amount available for discount.\\n /// \\n /// When this value is set, no further discount will be given no matter \\n /// how much you order.\\n limit Int? @db.Integer /// @format uint @minimum 1\\n\\n /// Whether be multiplied to volume or not.\\n ///\\n /// `multiplicative` is a property which means whether the same coupon\\n /// can be multiplied to the volume of order or not. It would be meaningful \\n /// only when the unit of discount is \\\"amount\\\". Otherwise, it's always `false`.\\n /// \\n /// Therefore, if the `multiplicative` value is `true`, the discount amount\\n /// will be multiplied by the volume of order. For example, if the discount\\n /// amount is `1,000 won` and the volume of order is `3`, the total discount \\n /// amount will be `3,000 won`.\\n ///\\n /// For reference, if there's a good that its price is lower than the amount \\n /// value, the good wouldn't be discounted.\\n ///\\n /// ex) `5,000 won` coupon and `10` volume of order\\n /// \\n /// - `false`: Only `5,000 won` would be discounted\\n /// - `true`: `50,000 won` would be discounted\\n multiplicative Boolean @db.Boolean\\n\\n /// Limited quantity issued.\\n /// \\n /// If there is a limit to the quantity issued, it becomes impossible to \\n /// issue tickets exceeding this value.\\n /// \\n /// In other words, the concept of N coupons being issued on a first-come, \\n /// first-served basis is created.\\n volume Int? @db.Integer\\n\\n /// Limited quantity issued per person.\\n /// \\n /// As a limit to the total amount of issuance per person, it is common to \\n /// assign 1 to limit duplicate issuance to the same citizen, or to use \\n /// the `NULL` value to set no limit.\\n /// \\n /// Of course, by assigning a value of N, the total amount issued to the \\n /// same citizen can be limited.\\n volume_per_citizen Int? @db.Integer\\n\\n /// Expiration day(s) value.\\n /// \\n /// The concept of expiring N days after a discount coupon ticket is issued.\\n /// \\n /// Therefore, customers must use the ticket within N days, if possible, \\n /// from the time it is issued.\\n expired_in Int? @db.Integer\\n\\n /// Expiration date.\\n /// \\n /// A concept that expires after YYYY-MM-DD after a discount coupon ticket \\n /// is issued.\\n /// \\n /// Double restrictions are possible with `expired_in`, of which the one \\n /// with the shorter expiration date is used.\\n expired_at DateTime? @db.Timestamptz\\n\\n /// Opening time of the coupon.\\n opened_at DateTime? @db.Timestamptz\\n\\n /// Closing time of the coupon.\\n /// \\n /// Tickets cannot be issued after this time.\\n /// \\n /// However, previously issued tickets can still be used until their \\n /// expiration date.\\n closed_at DateTime? @db.Timestamptz\\n\\n /// Creation time of record.\\n created_at DateTime @db.Timestamptz\\n\\n /// Update time of record.\\n ///\\n /// Only possible to update until `opened_at`.\\n updated_at DateTime @db.Timestamptz\\n\\n /// Deletion time of record.\\n ///\\n /// Pre-issued tickets can still be used until their expiration date.\\n deleted_at DateTime? @db.Timestamptz\\n\\n //----\\n // RELATIONS\\n //----\\n /// Administrator or seller who've designed this coupon.\\n customer shopping_customers @relation(fields: [shopping_customer_id], references: [id], onDelete: Cascade)\\n\\n /// List of criterias.\\n criterias shopping_coupon_criterias[]\\n\\n /// List of one-time issuance codes.\\n ///\\n /// If the `accessor` value of this discount coupon is private, a dedicated \\n /// code is required to issue a ticket for the discount coupon. A list of \\n /// those one-time use codes. \\n disposables shopping_coupon_disposables[]\\n\\n /// List of tickets.\\n ///\\n /// Histories of tickets issued to customers.\\n tickets shopping_coupon_tickets[]\\n mv_inventory mv_shopping_coupon_inventories?\\n mv_citizen_inventories mv_shopping_coupon_citizen_inventories[]\\n\\n @@index([shopping_customer_id, actor_type])\\n @@index([name(ops: raw(\\\"gin_trgm_ops\\\"))], type: Gin)\\n @@index([created_at])\\n @@index([opened_at])\\n}\\n\\n/// Supertype for the applicable conditions of the discount coupon.\\n/// \\n/// `shopping_coupon_criterias` is a supertype entity that embodies the \\n/// conditions for applying a {@link shopping_coupons discount coupon}. All \\n/// subtype entities that wish to impose constraints on the reference unit of \\n/// a discount coupon were created by inheriting this. For example, the \\n/// {@link shopping_coupon_section_criterias} entity, designed to limit \\n/// application to a specific {@link shopping_sections section}, inherits this \\n/// entity `shopping_coupon_criterias`.\\n/// \\n/// In addition, constraints on reference units can be specified through the \\n/// `direction` property to proceed as an inclusion condition or, conversely, \\n/// as an exclusion condition. If the direction value is \\\"include\\\", the coupon \\n/// is applicable only to the reference object. Conversely, if the direction \\n/// value is \\\"exclude\\\", it is a coupon that cannot be applied to the reference \\n/// object.\\n/// \\n/// @namespace Coupons\\n/// @author Samchon\\nmodel shopping_coupon_criterias {\\n /// Primary Key.\\n id String @id @db.Uuid\\n\\n /// Belonged coupon's {@link shopping_coupons.id}\\n shopping_coupon_id String @db.Uuid\\n\\n /// Type of criteria.\\n ///\\n /// It means which subtype being used.\\n type String @db.VarChar\\n\\n /// Direction of criteria.\\n ///\\n /// - include\\n /// - exclude\\n direction String @db.VarChar\\n\\n /// Sequence order in belonged coupon.\\n sequence Int @db.Integer\\n\\n //----\\n // RELATIONS\\n //----\\n /// Belonged coupon.\\n coupon shopping_coupons @relation(fields: [shopping_coupon_id], references: [id], onDelete: Cascade)\\n\\n of_section shopping_coupon_section_criterias?\\n of_sale shopping_coupon_sale_criterias?\\n of_funnel shopping_coupon_funnel_criterias?\\n of_seller shopping_coupon_seller_criterias?\\n\\n @@index([shopping_coupon_id])\\n}\\n\\n/// Conditions for sections of discount coupons.\\n/// \\n/// `shopping_coupon_section_criterias` is a subtype entity of \\n/// {@link shopping_coupon_criterias} and is used when setting conditions for \\n/// a specific {@link shopping_sections section}.\\n/// \\n/// If the {@link shopping_coupon_criterias.direction} value is \\\"include\\\", \\n/// the coupon can only be used for that section. Conversely, if it is \\n/// \\\"exclude\\\", the coupon cannot be used. And if there are multiple \\n/// `shopping_coupon_section_criterias` records within one coupon, conditions \\n/// are applied on a bundle basis. Coupons may or may not be applicable to \\n/// eligible sections.\\n/// \\n/// @namespace Coupons\\n/// @author Samchon\\nmodel shopping_coupon_section_criterias {\\n /// Primary Key.\\n id String @id @db.Uuid\\n\\n /// Target section's {@link shopping_coupon_criterias.id}\\n shopping_section_id String @db.Uuid\\n\\n //----\\n // RELATIONS\\n //----\\n /// Supertype entity.\\n base shopping_coupon_criterias @relation(fields: [id], references: [id], onDelete: Cascade)\\n\\n /// Belonged section.\\n section shopping_sections @relation(fields: [shopping_section_id], references: [id], onDelete: Cascade)\\n\\n @@index([shopping_section_id])\\n}\\n\\n/// Conditions for sellers of discount coupons.\\n/// \\n/// `shopping_coupon_seller_criterias` is a subtype entity of \\n/// {@link shopping_coupon_criterias} and is used when setting conditions for \\n/// a specific {@link shopping_sellers seller}.\\n/// \\n/// If the {@link shopping_coupon_criterias.direction} value is \\\"include\\\", the \\n/// coupon can only be used for that seller. Conversely, if it is \\\"exclude\\\", \\n/// the coupon cannot be used.\\n/// \\n/// And if there are multiple `shopping_coupon_seller_criterias` records within \\n/// one coupon, conditions are applied on a bundle basis. Coupons may or may \\n/// not be applicable to eligible sellers.\\n/// \\n/// @namespace Coupons\\n/// @author Samchon\\nmodel shopping_coupon_seller_criterias {\\n /// PK + FK.\\n id String @id @db.Uuid\\n\\n /// Target seller's {@link shopping_sellers.id}\\n shopping_seller_id String @db.Uuid\\n\\n //----\\n // RELATIONS\\n //----\\n /// Supertype entity.\\n base shopping_coupon_criterias @relation(fields: [id], references: [id], onDelete: Cascade)\\n\\n /// Target seller.\\n seller shopping_sellers @relation(fields: [shopping_seller_id], references: [id], onDelete: Cascade)\\n\\n @@index([shopping_seller_id])\\n}\\n\\n/// Conditions for a specific item in a discount coupon.\\n/// \\n/// `shopping_coupon_sale_criterias` is a subtype entity of \\n/// {@link shopping_coupon_criterias} and is used when setting conditions for \\n/// a specific {@link shopping_sales sale}.\\n/// \\n/// If the {@link shopping_coupon_criterias.direction} value is \\\"include\\\", \\n/// the coupon can only be used for that item. Conversely, if it is \\\"exclude\\\", \\n/// it is a coupon that cannot be used.\\n/// \\n/// And if there are multiple shopping_coupon_sale_criterias records within one coupon, conditions are applied on a bundle basis. Coupons that may or may not be applicable to target properties.\\n///\\n/// @namespace Coupons\\n/// @author Samchon\\nmodel shopping_coupon_sale_criterias {\\n /// PK + FK.\\n id String @id @db.Uuid\\n\\n /// Target sale's {@link shopping_sales.id}\\n shopping_sale_id String @db.Uuid\\n\\n //----\\n // RELATIONS\\n //----\\n /// Supertype entity.\\n base shopping_coupon_criterias @relation(fields: [id], references: [id], onDelete: Cascade)\\n\\n /// Target sale.\\n sale shopping_sales @relation(fields: [shopping_sale_id], references: [id], onDelete: Cascade)\\n\\n @@index([shopping_sale_id])\\n}\\n\\n/// Limit the funnel of discount coupons.\\n/// \\n/// `shopping_coupon_funnel_criterias` is a subtype entity of \\n/// {@link shopping_coupon_criterias}, and is used when you want to issue or \\n/// exclude discount coupons only to {@link shopping_customers customers} who \\n/// came from a specific path.\\n/// \\n/// And funnel restrictions are possible in 3 ways: The first is \\n/// {@link shopping_customers.referrer}, and by parsing \\n/// {@link shopping_customers.href}, which records the customer's access \\n/// address, restrictions can be made in units of specific URLs or variables.\\n/// \\n/// @namespace Coupons\\n/// @author Samchon\\nmodel shopping_coupon_funnel_criterias {\\n /// PK + FK.\\n id String @id @db.Uuid\\n\\n /// What kind of funnel is it?\\n ///\\n /// - path\\n /// - referrer\\n /// - variable\\n kind String @db.VarChar\\n\\n /// Key name of funnel, when `kind` is \\\"variable\\\".\\n key String? @db.VarChar\\n\\n /// Value of funnel.\\n value String @db.VarChar\\n\\n //----\\n // RELATIONS\\n //----\\n /// Supertype entity.\\n base shopping_coupon_criterias @relation(fields: [id], references: [id], onDelete: Cascade)\\n}\\n\\n/// Discount coupon ticket issuance details.\\n/// \\n/// `shopping_coupon_tickets` is an entity that symbolizes \\n/// {@link shopping_coupons discount coupon} tickets issued by \\n/// {@link shopping_customers customers}.\\n/// \\n/// And if the target discount coupon specification itself has an expiration \\n/// date, the expiration date is recorded in `expired_at` and is automatically \\n/// discarded after that expiration date. Of course, it doesn't matter if you \\n/// use the discount coupon for your order within the deadline.\\n/// \\n/// @namespace Coupons\\n/// @author Samchon\\nmodel shopping_coupon_tickets {\\n /// Primary Key.\\n id String @id @db.Uuid\\n\\n /// Belonged customer's {@link shopping_customers.id}\\n shopping_customer_id String @db.Uuid\\n\\n /// Belonged coupon's {@link shopping_coupons.id}\\n shopping_coupon_id String @db.Uuid\\n\\n /// Belonged disposable's {@link shopping_coupon_disposables.id}\\n ///\\n /// Only when current ticket be issued from one-time code.\\n shopping_coupon_disposable_id String? @db.Uuid\\n\\n /// Creation time of record.\\n created_at DateTime @db.Timestamptz\\n\\n /// Expiration time of ticket.\\n expired_at DateTime? @db.Timestamptz\\n\\n //----\\n // RELATIONS\\n //----\\n /// Belonged customer.\\n customer shopping_customers @relation(fields: [shopping_customer_id], references: [id], onDelete: Cascade)\\n\\n /// Belonged coupon.\\n coupon shopping_coupons @relation(fields: [shopping_coupon_id], references: [id], onDelete: Cascade)\\n\\n /// Belonged disposable when issued from one-time code.\\n disposable shopping_coupon_disposables? @relation(fields: [shopping_coupon_disposable_id], references: [id], onDelete: Cascade)\\n\\n /// Payment information.\\n payment shopping_coupon_ticket_payments?\\n\\n @@unique([shopping_coupon_disposable_id])\\n @@index([shopping_customer_id, created_at])\\n @@index([shopping_coupon_id, created_at])\\n}\\n\\n/// Discount coupon ticket payment details.\\n/// \\n/// `shopping_coupon_ticket_payments` is an entity that embodies the payment \\n/// information for the {@link shoppiing_orders order} of \\n/// {@link shopping_coupon_tickets}, and is used when a consumer uses the \\n/// discount coupon ticket he or she was issued to order and has the payment \\n/// amount deducted.\\n/// \\n/// And since {@link shopping_orders} itself is not an entity used in situations \\n/// where an order is completed, but rather an entity designed to express an \\n/// order request, the creation of this `shopping_coupon_ticket_payments` record \\n/// does not actually mean that the attached ticket disappears. Until the \\n/// {@link shopping_customers customer} \\n/// {@link shopping_order_publishes.paid_at completes the payment} and \\n/// confirms the order, the ticket can be understood as a kind of deposit.\\n/// \\n/// Additionally, this record can be deleted by the customer reversing the \\n/// payment of the ticket, but it can also be deleted when the attribution \\n/// order itself is cancelled.\\n/// \\n/// @namespace Coupons\\n/// @author Samchon\\nmodel shopping_coupon_ticket_payments {\\n /// Primary Key.\\n id String @id @db.Uuid\\n\\n /// Belonged ticket's {@link shopping_coupon_tickets.id}\\n shopping_coupon_ticket_id String @db.Uuid\\n\\n /// Target order's {@link shopping_orders.id}\\n shopping_order_id String @db.Uuid\\n\\n /// Sequence order(?) in belonged order.\\n sequence Int @db.Integer\\n\\n /// Creation time of record.\\n created_at DateTime @db.Timestamptz\\n\\n /// Deletion time of record.\\n ///\\n /// In other words, it means that the target order be erased or payment \\n /// be cancelled.\\n deleted_at DateTime? @db.Timestamptz\\n\\n //----\\n // RELATIONS\\n //----\\n /// Belonged ticket.\\n ticket shopping_coupon_tickets @relation(fields: [shopping_coupon_ticket_id], references: [id], onDelete: Cascade)\\n\\n /// Target order.\\n order shopping_orders @relation(fields: [shopping_order_id], references: [id], onDelete: Cascade)\\n\\n @@unique([shopping_coupon_ticket_id])\\n @@index([shopping_order_id])\\n}\\n\\n/// Discount coupon issuance code management.\\n/// \\n/// If a {@link shopping_coupons discount coupon} is not public and anyone can \\n/// receive the ticket, but can only be received by entering a specific \\n/// password (one-time code), use this `shopping_coupon_disposables` entity.\\n/// \\n/// I repeat again, the code code is \\\"one-time use\\\". In other words, if any of \\n/// the customers enters the code, the code is discarded when the ticket \\n/// issuance to the customer is completed. Therefore, if you want to issue \\n/// tickets multiple times using a discount coupon as a secret code, the \\n/// issuing code must also be supported by the corresponding quantity.\\n/// \\n/// @namespace Coupons\\n/// @author Samchon\\nmodel shopping_coupon_disposables {\\n /// Primary Key.\\n id String @id @db.Uuid\\n\\n /// Belonged coupon's {@link shopping_coupons.id}\\n shopping_coupon_id String @db.Uuid\\n\\n /// Identifier code.\\n ///\\n /// Another word, one-time password for issuance.\\n code String @db.VarChar\\n\\n /// Creation time of record.\\n created_at DateTime @db.Timestamptz\\n\\n /// Expired time of record.\\n expired_at DateTime? @db.Timestamptz\\n\\n //----\\n // RELATIONS\\n //----\\n /// Belonged discount coupon.\\n coupon shopping_coupons @relation(fields: [shopping_coupon_id], references: [id], onDelete: Cascade)\\n\\n /// Ticket issued by this one-time code.\\n ticket shopping_coupon_tickets?\\n\\n @@unique([code])\\n @@index([shopping_coupon_id])\\n}\\n\\n/// @hidden\\nmodel mv_shopping_coupon_inventories {\\n shopping_coupon_id String @id @db.Uuid\\n value Int @db.Integer\\n\\n coupon shopping_coupons @relation(fields: [shopping_coupon_id], references: [id], onDelete: Cascade)\\n}\\n\\n/// @hidden\\nmodel mv_shopping_coupon_citizen_inventories {\\n id String @id @db.Uuid\\n shopping_coupon_id String @db.Uuid\\n shopping_citizen_id String @db.Uuid\\n value Int @db.Integer\\n\\n citizen shopping_citizens @relation(fields: [shopping_citizen_id], references: [id], onDelete: Cascade)\\n coupon shopping_coupons @relation(fields: [shopping_coupon_id], references: [id], onDelete: Cascade)\\n\\n @@unique([shopping_coupon_id, shopping_citizen_id])\\n @@index([shopping_coupon_id])\\n}\\n\",\"schema-08-coin.prisma\":\"/// Meta information of the deposit.\\n/// \\n/// `shopping_deposits` is an entity that embodies the specifications for \\n/// incomes and outcomes of deposit at a shopping mall. In other words, \\n/// `shopping_deposits` is not {@link shopping_deposit_histories}, which \\n/// refers to the deposit/outcome details of deposits, but is simply \\n/// metadata that specifies specifications for income/outcome scenarios.\\n///\\n/// @namespace Coins\\n/// @author Samchon\\nmodel shopping_deposits {\\n //----\\n // COLUMNS\\n //----\\n /// Primary Key.\\n id String @id @db.Uuid\\n\\n /// Identifier code.\\n code String @db.VarChar\\n\\n /// The source table occurring the deposit event.\\n source String @db.VarChar\\n\\n /// Direction of deposit.\\n ///\\n /// - `1`: Income\\n /// - `-1`: outcome\\n direction Int @db.Integer\\n\\n /// Creation time of record.\\n created_at DateTime @db.Timestamptz\\n\\n //// Deletion time of record.\\n deleted_at DateTime? @db.Timestamptz\\n\\n //----\\n // RELATIONS\\n //----\\n /// List of histories; income/outcome details.\\n histories shopping_deposit_histories[]\\n\\n @@unique([code])\\n @@index([source])\\n @@index([created_at])\\n}\\n\\n/// Deposit income/outcome details of customers (citizens).\\n///\\n/// `shopping_deposit_histories` is an entity that embodies the \\n/// {@link shopping_customers customer}'s income/outcome history.\\n///\\n/// You can think of it as a kind of accounting ledger table. Therefore, \\n/// note that, `value` must have positive number only, even if it is a \\n/// outcome. The minus value must be expressed by multiplying the \\n/// {@link shopping_deposits.direction} value of the corresponding.\\n///\\n/// @namespace Coins\\n/// @author Samchon\\nmodel shopping_deposit_histories {\\n //----\\n // COLUMNS\\n //----\\n /// Primary Key.\\n id String @id @db.Uuid\\n\\n /// Belonged metadata's {@link shopping_deposits.id}\\n shopping_deposit_id String @db.Uuid\\n\\n /// Belonged citizen's {@link shopping_citizens.id}\\n shopping_citizen_id String @db.Uuid\\n\\n /// The source record occurred deposit/outcome.\\n source_id String @db.Uuid\\n\\n /// Income/outcome amount of deposit.\\n /// \\n /// It must be a positive number, and you can check \\n /// {@link shopping_deposits.direction} for incomes and outcomes. \\n /// If you want to express the figures for incomes and outcomes as \\n /// positive/negative numbers, you can also multiply this field value by \\n /// the attributed {@link shopping_deposits.direction} value.\\n value Float @db.DoublePrecision\\n\\n /// Balance value.\\n ///\\n /// Total balance value after the transaction.\\n balance Float @db.DoublePrecision\\n\\n /// Creation time of record.\\n created_at DateTime @db.Timestamptz\\n\\n /// Cancelled time of record.\\n cancelled_at DateTime? @db.Timestamptz\\n\\n //----\\n // RELATIONS\\n //----\\n deposit shopping_deposits @relation(fields: [shopping_deposit_id], references: [id], onDelete: Cascade)\\n citizen shopping_citizens @relation(fields: [shopping_citizen_id], references: [id], onDelete: Cascade)\\n\\n @@index([shopping_deposit_id, created_at, cancelled_at])\\n @@index([shopping_deposit_id, source_id, created_at, cancelled_at])\\n @@index([shopping_citizen_id, created_at, cancelled_at])\\n @@index([created_at, cancelled_at])\\n}\\n\\n/// Deposit deposit.\\n/// \\n/// `shopping_deposit_charges` is an entity that symbolizes the act of a \\n/// {@link shopping_customers customer} applying for a deposit to a shopping \\n/// mall.\\n/// \\n/// However, `shopping_deposit_charges` expresses the customer's intention to \\n/// make a deposit, but it has not yet been confirmed. Only when the customer \\n/// completes the {@link shopping_deposit_charge_publishes.paid_at payment} \\n/// will the deposit increase be confirmed.\\n/// \\n/// @namespace Coins\\n/// @author Samchon\\nmodel shopping_deposit_charges {\\n //----\\n // COLUMNS\\n //----\\n /// Primary Key.\\n id String @id @db.Uuid\\n\\n /// Belonged metadata's {@link shopping_deposits.id}\\n shopping_customer_id String @db.Uuid\\n\\n /// Charging amount.\\n value Float @db.DoublePrecision\\n\\n /// Creation time of record.\\n created_at DateTime @db.Timestamptz\\n\\n /// Deletion time of record.\\n ///\\n /// Only when be stopped before publishing.\\n deleted_at DateTime? @db.Timestamptz\\n\\n //----\\n // RELATIONS\\n //----\\n customer shopping_customers @relation(fields: [shopping_customer_id], references: [id], onDelete: Cascade)\\n publish shopping_deposit_charge_publishes?\\n\\n @@index([shopping_customer_id, created_at, deleted_at])\\n @@index([created_at, deleted_at])\\n}\\n\\n/// Payment progress information for deposits.\\n/// \\n/// `shopping_deposit_charge_publishes` is an entity that embodies the process \\n/// of a {@link shopping_customers customer} applying for a deposit and making \\n/// a payment.\\n/// \\n/// Please note that the existence of the `shopping_deposit_charge_publishes` \\n/// record does not mean that payment has been completed. Payment is complete \\n/// only when payment (`paid_at`) is complete. This is what the \\n/// \\\"process of payment\\\" mentioned above means.\\n/// \\n/// However, even after payment has been made, there may be cases where it is \\n/// suddenly cancelled, so you must be careful about this as well.\\n/// \\n/// @namespace Coins\\n/// @author Samchon\\nmodel shopping_deposit_charge_publishes {\\n //----\\n // COLUMNS\\n //----\\n /// Primary Key.\\n id String @id @db.Uuid\\n\\n /// Belonged charge appliance's {@link shopping_deposit_charges.id}\\n shopping_deposit_charge_id String @db.Uuid\\n\\n /// Password for encryption.\\n /// \\n /// This shopping mall system uses a randomly issued password to encrypt \\n /// payment history, and is completely unrelated to the user.\\n password String? @db.VarChar\\n\\n /// Creation time of record.\\n ///\\n /// Note that, this property does not mean the payment completion time.\\n created_at DateTime @db.Timestamptz\\n\\n /// Completion time of payment.\\n /// \\n /// This property is the only way to know if the payment has been \\n /// completed. If this property is null, the payment has not been \\n /// completed yet.\\n paid_at DateTime? @db.Timestamptz\\n\\n /// The time when the payment was cancelled or reverted.\\n cancelled_at DateTime? @db.Timestamptz\\n\\n //----\\n // RELATIONS\\n //----\\n charge shopping_deposit_charges @relation(fields: [shopping_deposit_charge_id], references: [id], onDelete: Cascade)\\n\\n @@unique([shopping_deposit_charge_id])\\n}\\n\\n/// Meta information of mileage.\\n/// \\n/// `shopping_mileages` is an entity that embodies specifications for mileage \\n/// deposits and outcomes at a shopping mall. In other words, \\n/// `shopping_mileages` is not {@link shopping_mileage_histories}, which means \\n/// mileage deposit and outcome history, but is simply metadata that \\n/// specifies specifications for scenarios in which mileage is deposited and \\n/// withdrawn.\\n///\\n/// @namespace Coins\\n/// @author Samchon\\nmodel shopping_mileages {\\n /// Primary Key.\\n id String @id @db.Uuid\\n\\n /// Identifier code.\\n code String @db.VarChar\\n\\n /// The source table occurring the mileage event.\\n source String @db.VarChar\\n\\n /// Direction of mileage.\\n ///\\n /// - `1`: Income\\n /// - `-1`: outcome\\n direction Int @db.Integer\\n\\n /// Default value of mileage.\\n ///\\n /// Possible to omit, and how to use this default value is up to the\\n /// backend program. It is okay to use it as a default value when\\n /// creating a new record, or percentage value to be applied.\\n value Float? @db.DoublePrecision\\n\\n /// Creation time of record.\\n created_at DateTime @db.Timestamptz\\n\\n /// Deletion time of record.\\n deleted_at DateTime? @db.Timestamptz\\n\\n //----\\n // RELATIONS\\n //----\\n histories shopping_mileage_histories[]\\n\\n @@unique([code])\\n @@index([source])\\n @@index([created_at])\\n}\\n\\n/// @namespace Coins\\n/// @author Samchon\\nmodel shopping_mileage_donations {\\n //----\\n // COLUMNS\\n //----\\n /// Primary Key.\\n id String @id @db.Uuid\\n\\n /// Belonged seller's {@link shopping_customers.id}\\n shopping_admin_customer_id String @db.Uuid\\n\\n /// Belonged citizen's {@link shopping_citizens.id}\\n shopping_citizen_id String @db.Uuid\\n\\n /// Amount of donation.\\n value Float @db.DoublePrecision\\n\\n /// Reason of donation.\\n reason String\\n\\n /// Creation time of record.\\n created_at DateTime @db.Timestamptz\\n\\n //----\\n // RELATIONS\\n //----\\n adminCustomer shopping_customers @relation(fields: [shopping_admin_customer_id], references: [id], onDelete: Cascade)\\n citizen shopping_citizens @relation(fields: [shopping_citizen_id], references: [id], onDelete: Cascade)\\n\\n @@index([shopping_admin_customer_id])\\n @@index([shopping_citizen_id, created_at])\\n}\\n\\n/// Mileagea income/outcome details of customers (citizens).\\n///\\n/// `shopping_mileage_histories` is an entity that embodies the \\n/// {@link shopping_customers customer}'s deposit/outcome history.\\n///\\n/// You can think of it as a kind of accounting ledger table. Therefore, \\n/// note that, `value` must have positive number only, even if it is a \\n/// outcome. The minus value must be expressed by multiplying the \\n/// {@link shopping_mileages.direction} value of the corresponding.\\n///\\n/// @namespace Coins\\n/// @author Samchon\\nmodel shopping_mileage_histories {\\n //----\\n // COLUMNS\\n //----\\n /// Primary Key.\\n id String @id @db.Uuid\\n\\n /// Belonged metadata's {@link shopping_mileages.id}\\n shopping_mileage_id String @db.Uuid\\n\\n /// Belonged citizen's {@link shopping_citizens.id}\\n shopping_citizen_id String @db.Uuid\\n\\n /// The source record occurred income/outcome.\\n source_id String @db.Uuid\\n\\n /// Income/outcome amount of mileage.\\n /// \\n /// It must be a positive number, and you can check \\n /// {@link shopping_mileages.direction} for incomes and outcomes. \\n /// If you want to express the figures for incomes and outcomes as \\n /// positive/negative numbers, you can also multiply this field value by \\n /// the attributed {@link shopping_mileages.direction} value.\\n value Float @db.DoublePrecision\\n\\n /// Balance value.\\n ///\\n /// Total balance value after the transaction.\\n balance Float @db.DoublePrecision\\n\\n /// Creation time of record.\\n created_at DateTime @db.Timestamptz\\n\\n /// Cancelled time of record.\\n cancelled_at DateTime? @db.Timestamptz\\n\\n //----\\n // RELATIONS\\n //----\\n mileage shopping_mileages @relation(fields: [shopping_mileage_id], references: [id], onDelete: Cascade)\\n citizen shopping_citizens @relation(fields: [shopping_citizen_id], references: [id], onDelete: Cascade)\\n\\n @@index([shopping_mileage_id, created_at, cancelled_at])\\n @@index([shopping_mileage_id, source_id, created_at, cancelled_at])\\n @@index([shopping_citizen_id, created_at, cancelled_at])\\n @@index([created_at, cancelled_at])\\n}\\n\\n/// @hidden\\nmodel mv_shopping_deposit_balances {\\n shopping_citizen_id String @id @db.Uuid\\n value Float @db.DoublePrecision\\n\\n citizen shopping_citizens @relation(fields: [shopping_citizen_id], references: [id], onDelete: Cascade)\\n}\\n\\n/// @hidden\\nmodel mv_shopping_mileage_balances {\\n shopping_citizen_id String @id @db.Uuid\\n value Float @db.DoublePrecision\\n\\n citizen shopping_citizens @relation(fields: [shopping_citizen_id], references: [id], onDelete: Cascade)\\n}\\n\",\"schema-09-inquiries.prisma\":\"/// Inquiry about a sale snapshot.\\n/// \\n/// `shopping_sale_snapshot_inquiries` is a subtype entity of \\n/// {@link bbs_articles}, and represents inquiries written by \\n/// {@link shopping_customers customers} about a {@link shopping_sales sale} \\n/// registered by the {@link shopping_sellers seller} (however, to trace the\\n/// exact {@link shopping_sale_snapshots snapshot}, it is referencing not\\n/// sale but snapshot).\\n/// \\n/// In addition, since the customer is waiting for the seller's response after \\n/// writing the inquiry, whether the seller has viewed the inquiry written by \\n/// the customer is provided for reference as `read_by_seller_at` property. \\n/// Of course, since the inquiry itself is a subtype of a article, it is also \\n/// possible for sellers to communicate with each other through \\n/// {@link shopping_sale_snapshot_inquiry_comments comments} before an \\n/// {@link shopping_sale_snapshot_inquiry_responses official response}.\\n/// \\n/// However, comments themselves can be made by every customers, even if they \\n/// are not the person who wrote the article. Of course, it cannot be written \\n/// unless the seller is a party.\\n///\\n/// @namespace Inquiries\\n/// @erd Favorites\\n/// @author Samchon\\nmodel shopping_sale_snapshot_inquiries {\\n //----\\n // COLUMNS\\n //----\\n /// PK + FK.\\n id String @id @db.Uuid\\n\\n /// Belonged snapshot's {@link shopping_sale_snapshots.id}\\n shopping_sale_snapshot_id String @db.Uuid\\n\\n /// Writer customer's {@link shopping_customers.id}\\n shopping_customer_id String @db.Uuid\\n\\n /// Type of the inquiry article.\\n ///\\n /// - `question`\\n /// - `review`\\n type String @db.VarChar\\n\\n /// Creation time of record.\\n ///\\n /// Duplicated property for fast sorting.\\n ///\\n /// @hidden\\n created_at DateTime @db.Timestamptz\\n\\n /// The first time when the seller read the inquiry.\\n read_by_seller_at DateTime? @db.Timestamptz\\n\\n //----\\n // RELATIONS\\n //----\\n base bbs_articles @relation(fields: [id], references: [id], onDelete: Cascade)\\n snapshot shopping_sale_snapshots @relation(fields: [shopping_sale_snapshot_id], references: [id], onDelete: Cascade)\\n customer shopping_customers @relation(fields: [shopping_customer_id], references: [id], onDelete: Cascade)\\n\\n of_question shopping_sale_snapshot_questions?\\n of_review shopping_sale_snapshot_reviews?\\n answer shopping_sale_snapshot_inquiry_answers?\\n shopping_sale_snapshot_inquiry_favorites shopping_sale_snapshot_inquiry_favorites[]\\n\\n @@index([shopping_sale_snapshot_id])\\n @@index([shopping_customer_id])\\n}\\n\\n/// Question about sale snapshot.\\n/// \\n/// `shopping_sale_snapshot_questions` is a subtype entity of \\n/// {@link shopping_sale_snapshot_inquiries}, and is used when a \\n/// {@link shopping_customers customer} wants to ask something about a \\n/// sale ({@link shopping_sale_snapshots snapshot} at the time) registered by \\n/// the {@link shopping_sellers seller}.\\n/// \\n/// And, like most shopping malls, `shopping_sale_snapshot_questions` also \\n/// provides a `secret` attribute, allowing you to create a \\\"secret message\\\" \\n/// that can only be viewed by the seller and the customer who wrote the \\n/// question.\\n///\\n/// @namespace Inquiries\\n/// @author Samchon\\nmodel shopping_sale_snapshot_questions {\\n //----\\n // COLUMNS\\n //----\\n /// PK + FK.\\n id String @id @db.Uuid\\n\\n /// Whether secret or not.\\n ///\\n /// If secret article, only the writer customer and related seller can see\\n /// the detailed content.\\n secret Boolean @db.Boolean\\n\\n //----\\n // RELATIONS\\n //----\\n base shopping_sale_snapshot_inquiries @relation(fields: [id], references: [id], onDelete: Cascade)\\n}\\n\\n/// Reviews for sale snapshots.\\n/// \\n/// `shopping_sale_snapshot_reviews` is a subtype entity of \\n/// {@link shopping_sale_snapshot_inquiries}, and is used when a \\n/// {@link shopping_customers customer} purchases a sale \\n/// ({@link shopping_sale_snapshots snapshot} at the time) registered by the \\n/// {@link shopping_sellers seller} as a product and leaves a review and \\n/// rating for it.\\n/// \\n/// For reference, `shopping_sale_snapshot_reviews` and \\n/// {@link shopping_order_goods} have a logarithmic relationship of N: 1, \\n/// but this does not mean that customers can continue to write reviews for \\n/// the same product indefinitely. Wouldn't there be restrictions, such as \\n/// if you write a review once, you can write an additional review a month \\n/// later?\\n///\\n/// @namespace Inquiries\\n/// @author Samchon\\nmodel shopping_sale_snapshot_reviews {\\n //----\\n // COLUMNS\\n //----\\n /// PK + FK.\\n id String @id @db.Uuid\\n\\n /// Belonged good's {@link shopping_order_goods.id}\\n shopping_order_good_id String @db.Uuid\\n\\n //----\\n // RELATIONS\\n //----\\n base shopping_sale_snapshot_inquiries @relation(fields: [id], references: [id], onDelete: Cascade)\\n good shopping_order_goods @relation(fields: [shopping_order_good_id], references: [id], onDelete: Cascade)\\n\\n @@index([shopping_order_good_id])\\n}\\n\\n/// A snapshot of the content of the review for the sale snapshot.\\n/// \\n/// `shopping_sale_snapshot_review_snapshots` is a subtype entity of \\n/// {@link bbs_article_snapshots} and is designed to add a `score` property \\n/// to the content of {@link shopping_sale_snapshot_reviews review article}.\\n/// \\n/// In other words, after writing a review article, customers can edit it \\n/// and change the evaluation `score` at any time.\\n///\\n/// @namespace Inquiries\\n/// @author Samchon\\nmodel shopping_sale_snapshot_review_snapshots {\\n //----\\n // COLUMNS\\n //----\\n /// PK + FK.\\n id String @id @db.Uuid\\n\\n /// Estimation score value.\\n score Float @db.DoublePrecision\\n\\n //----\\n // RELATIONS\\n //----\\n base bbs_article_snapshots @relation(fields: [id], references: [id], onDelete: Cascade)\\n}\\n\\n/// Answers to inquiries about sale snapshots.\\n/// \\n/// `shopping_sale_snapshot_inquiry_answers` is an entity that embodies the \\n/// official answer written by the {@link shopping_sellers seller} to the \\n/// {@link shopping_sale_snapshot_inquiries inquiry} written by the \\n/// {@link shopping_customers customer}.\\n/// \\n/// Of course, in addition to writing an official response like this, it is \\n/// also possible for the seller to communicate with the inquiry written \\n/// customer and multiple customers through \\n/// {@link shopping_sale_snapshot_inquiry_comments comments} in the \\n/// attribution inquiry.\\n/// \\n/// For reference, it is not possible to write comments on this answer. \\n/// Encourage people to write comments on the inquiry article. This is to \\n/// prevent comments from being scattered in both inquiry and response \\n/// articles.\\n///\\n/// @namespace Inquiries\\n/// @author Samchon\\nmodel shopping_sale_snapshot_inquiry_answers {\\n //----\\n // COLUMNS\\n //----\\n /// PK + FK\\n id String @id @db.Uuid\\n\\n /// Belonged inquiry's {@link shopping_sale_snapshot_inquiries.id}\\n shopping_sale_snapshot_inquiry_id String @db.Uuid\\n\\n /// Answered seller's {@link shopping_customers.id}\\n shopping_seller_customer_id String @db.Uuid\\n\\n //----\\n // RELATIONS\\n //----\\n base bbs_articles @relation(fields: [id], references: [id], onDelete: Cascade)\\n inquiry shopping_sale_snapshot_inquiries @relation(fields: [shopping_sale_snapshot_inquiry_id], references: [id], onDelete: Cascade)\\n sellerCustomer shopping_customers @relation(fields: [shopping_seller_customer_id], references: [id], onDelete: Cascade)\\n\\n @@unique([shopping_sale_snapshot_inquiry_id])\\n @@index([shopping_seller_customer_id])\\n}\\n\\n/// A comment written on an inquiry article.\\n/// \\n/// `shopping_sale_snapshot_inquiry_comments` is a subtype entity of \\n/// {@link bbs_article_comments}, and is used when you want to communicate with \\n/// multiple people about an {@link shopping_sale_snapshot_inquiries inquiry} \\n/// written by a {@link shopping_customers customer}.\\n/// \\n/// For reference, only related parties can write comments for \\n/// {@link shopping_sellers sellers}, but there is no limit to customers. \\n/// In other words, anyone customer can freely write a comment, even if they are \\n/// not the person who wrote the inquiry.\\n///\\n/// @namespace Inquiries\\n/// @author Samchon\\nmodel shopping_sale_snapshot_inquiry_comments {\\n //----\\n // COLUMNS\\n //----\\n /// PK + FK\\n id String @id @db.Uuid\\n\\n /// Writer's {@link shopping_customers.id}\\n shopping_customer_id String @db.Uuid\\n\\n /// Type of the writer.\\n ///\\n /// - customer\\n /// - seller\\n actor_type String @db.VarChar\\n\\n //----\\n // RELATIONS\\n //----\\n base bbs_article_comments @relation(fields: [id], references: [id], onDelete: Cascade)\\n customer shopping_customers @relation(fields: [shopping_customer_id], references: [id], onDelete: Cascade)\\n\\n @@index([shopping_customer_id])\\n}\\n\",\"schema-10-favorites.prisma\":\"/// Favorite sales.\\n///\\n/// `shopping_sale_favorites` is an entity that symbolizes the \\n/// {@link shopping_sales sale} that the {@link shopping_customers customer}\\n/// has favorited. Also, `shopping_sale_favorites` archives the \\n/// {@link shopping_sale_snapshots snapshot} of the sale at the time when the \\n/// customer favorites it.\\n///\\n/// @namespace Favorites\\n/// @author Samchon\\nmodel shopping_sale_favorites {\\n //----\\n // COLUMNS\\n //----\\n /// Primary Key.\\n id String @id @db.Uuid\\n\\n /// Belonged customer's {@link shopping_customers.id}\\n shopping_customer_id String @db.Uuid\\n\\n /// Target sale's {@link shopping_sales.id}\\n shopping_sale_id String @db.Uuid\\n\\n /// Target snapshot's {@link shopping_sale_snapshots.id}\\n ///\\n /// The snapshot of the sale at the time when the customer favorites it.\\n shopping_sale_snapshot_id String @db.Uuid\\n\\n /// Creation time of record.\\n created_at DateTime @db.Timestamptz\\n\\n /// Deletion time of record.\\n deleted_at DateTime? @db.Timestamptz\\n\\n //----\\n // RELATIONS\\n //----\\n customer shopping_customers @relation(fields: [shopping_customer_id], references: [id], onDelete: Cascade)\\n sale shopping_sales @relation(fields: [shopping_sale_id], references: [id], onDelete: Cascade)\\n snapshot shopping_sale_snapshots @relation(fields: [shopping_sale_snapshot_id], references: [id], onDelete: Cascade)\\n\\n @@index([shopping_customer_id])\\n @@index([shopping_sale_id])\\n @@index([shopping_sale_snapshot_id])\\n}\\n\\n/// Favorite inquiries.\\n///\\n/// `shopping_sale_snapshot_inquiry_favorites` is an entity that symbolizes \\n/// the {@link shopping_sale_snapshot_inquiries inquiry} that the \\n/// {@link shopping_customers customer} has favorited. Also, \\n/// `shopping_sale_snapshot_inquiry_favorites` archives the \\n/// {@link shopping_sale_snapshots snapshot} of the inquiry at the time when\\n/// the customer favorites it. \\n/// \\n/// @namespace Favorites\\n/// @author Samchon\\nmodel shopping_sale_snapshot_inquiry_favorites {\\n //----\\n // COLUMNS\\n //----\\n /// Primary Key.\\n id String @id @db.Uuid\\n\\n /// Belonged customer's {@link shopping_customers.id}\\n shopping_customer_id String @db.Uuid\\n\\n /// Target inquiry's {@link shopping_sale_snapshot_inquiries.id}\\n shopping_sale_snapshot_inquiry_id String @db.Uuid\\n\\n /// Target snapshot's {@link shopping_sale_snapshots.id}\\n ///\\n /// The snapshot of the inquiry at the time when the customer favorites it.\\n bbs_article_snapshot_id String @db.Uuid\\n\\n /// Creation time of record.\\n created_at DateTime @db.Timestamptz\\n\\n /// Deletion time of record.\\n deleted_at DateTime? @db.Timestamptz\\n\\n //----\\n // RELATIONS\\n //----\\n /// Belonged customer.\\n customer shopping_customers @relation(fields: [shopping_customer_id], references: [id], onDelete: Cascade)\\n\\n /// Belonged inquiry.\\n inquiry shopping_sale_snapshot_inquiries @relation(fields: [shopping_sale_snapshot_inquiry_id], references: [id], onDelete: Cascade)\\n\\n /// Belonged snapshot.\\n snapshot bbs_article_snapshots @relation(fields: [bbs_article_snapshot_id], references: [id], onDelete: Cascade)\\n\\n @@index([shopping_customer_id])\\n @@index([shopping_sale_snapshot_inquiry_id])\\n}\\n\\n/// Favorite addresses.\\n///\\n/// `shopping_address_favorites` is an entity that symbolizes the\\n/// {@link shopping_addresses address} that the \\n/// {@link shopping_customers customer} has favorited.\\n///\\n/// @namespace Favorites\\n/// @author Samchon\\nmodel shopping_address_favorites {\\n //----\\n // COLUMNS\\n //----\\n /// Primary Key.\\n id String @id @db.Uuid\\n\\n /// Belonged customer's {@link shopping_customers.id}\\n shopping_customer_id String @db.Uuid\\n\\n /// Target address's {@link shopping_addresses.id}\\n shopping_address_id String @db.Uuid\\n\\n /// Title of the favorite address.\\n title String @db.VarChar\\n\\n /// Whether the favorite address is primary or not.\\n primary Boolean @db.Boolean\\n\\n /// Creation time of record.\\n created_at DateTime @db.Timestamptz\\n\\n /// Deletion time of record.\\n deleted_at DateTime? @db.Timestamptz\\n\\n //----\\n // RELATIONS\\n //----\\n customer shopping_customers @relation(fields: [shopping_customer_id], references: [id], onDelete: Cascade)\\n address shopping_addresses @relation(fields: [shopping_address_id], references: [id], onDelete: Cascade)\\n\\n @@index([shopping_customer_id])\\n @@index([shopping_address_id])\\n}\\n\"}\n```\n\nYou have to make above like prisma schema files.\n\nStudy the above schema files, and follow its coding style.",
12
12
  PRISMA_SCHEMA = "You are a world-class Prisma database schema expert specializing in snapshot-based architecture and temporal data modeling. You excel at creating maintainable, scalable, and well-documented database schemas that preserve data integrity and audit trails.\n\n### Core Principles\n\n- **Never ask for clarification** - Work with the provided requirements and component structure\n- **Output only Prisma schema code** - Return Record<string, string> format with filename as key\n- **Follow snapshot-based architecture** - Design for historical data preservation and audit trails \n- **Prioritize data integrity** - Ensure referential integrity and proper constraints\n\n### Default Working Language: English\n\n- Use the language specified by user in messages as the working language when explicitly provided\n- All thinking and responses must be in the working language\n- All model/field names must be in English regardless of working language\n\n### Input Format\n\nYou will receive:\n1. **User requirements specification** - Detailed business requirements\n2. **Component structure** - `{filename: string; tables: string[]}[]` from Component Agent\n\n### Task: Generate Complete Prisma Schemas\n\nTransform the component structure into complete, valid Prisma schema files based on user requirements.\n\n### Prisma Schema Guidelines\n\n#### Naming Conventions\n\n- **Models**: `snake_case` (e.g., `user_profiles`, `order_items`)\n- **Fields**: `snake_case` (e.g., `created_at`, `user_id`) \n- **Relations**: `snake_case` (e.g., `order_items`, `user_profile`)\n- **No duplicate names** within the same model\n- **Unique model names** across the entire schema\n\n#### File Organization\n\n- Each schema file must start with:\n```prisma\n// filename: schema-domain-name.prisma\n// Purpose: Comprehensive description of what models this file contains\n// Domain: DomainName - detailed explanation of the domain's scope\n// Dependencies: Detailed list of other schema files this depends on\n// Models: List of all models contained in this file\n```\n\n#### Data Types and Constraints\n\n- **Primary Keys**: Always `id String @id @db.Uuid`\n- **No Enums**: Use `String` type with comment specifying allowed values\n- **No JSON**: Use structured relations instead\n- **Timestamps**: Use `DateTime @db.Timestamptz` for all time fields\n- **Text fields**: Use appropriate `@db.VarChar` or `@db.Text` based on expected length\n\n#### Column Guidelines and Format\n\n```prisma\nmodel article_snapshots {\n //----\n // COLUMNS\n //----\n /// Primary Key.\n id String @id @db.Uuid\n\n /// Belong article's {@link bbs_articles.id}\n bbs_article_id String @db.Uuid\n\n /// Format of body content.\n ///\n /// Allowed values: \"html\", \"markdown\", \"plain_text\"\n /// Same meaning as file extension.\n format String @db.VarChar\n\n /// Title of the article.\n ///\n /// Maximum length: 200 characters\n title String @db.VarChar(200)\n\n /// Main content body of the article.\n body String @db.Text\n\n /// Creation timestamp of this snapshot.\n ///\n /// Records when this version was created or updated.\n created_at DateTime @db.Timestamptz\n}\n```\n\n#### Relationship Guidelines\n\n- **Always check cross-file references** - Ensure related models exist in other files\n- **Use @relation keyword** for all relationships with proper field mapping\n- **Include foreign keys** for all relations\n- **Optional relations**: Mark foreign key as optional when appropriate\n- **One-to-One**: Foreign key must have `@unique` annotation\n- **Cascade operations**: Specify `onDelete` and `onUpdate` behavior appropriately\n\n#### Comment Guidelines\n\n- **Model comments**: Comprehensive description including purpose, business logic, and architectural decisions\n- **Field comments**: Clear description with constraints, allowed values, and business meaning\n- **Relation comments**: Explain the relationship and its business purpose\n- **Use {@link model.field}** for cross-references\n- **Include @namespace, @erd, @author** tags for organization\n\n### Expected Output Format\n\n```json\n{\n \"main.prisma\": \"generator client {\\n provider = \\\"prisma-client-js\\\"\\n}\\n\\ndatasource db {\\n provider = \\\"postgresql\\\"\\n url = env(\\\"DATABASE_URL\\\")\\n}\",\n \"schema-01-core.prisma\": \"// filename: schema-01-core.prisma\\n// Purpose: Core user and organization models\\n\\nmodel users {\\n // ... complete model definition\\n}\",\n \"schema-02-articles.prisma\": \"// filename: schema-02-articles.prisma\\n// Purpose: Article management with snapshot architecture\\n\\nmodel articles {\\n // ... complete model definition\\n}\"\n}\n```\n\n### Quality Checklist\n\nBefore outputting, ensure:\n- [ ] All models have proper primary keys\n- [ ] All relationships are bidirectional and properly mapped\n- [ ] Foreign keys exist for all relations\n- [ ] Comments follow the specified format\n- [ ] Naming conventions are consistent\n- [ ] No duplicate names within models\n- [ ] Cross-file references are valid\n- [ ] Snapshot architecture is properly implemented\n- [ ] File organization comments are included",
13
- ANALYZE = "You are the best planner.\nYou will write documents and hand it over to the developer.\n\nThese are all the links that are currently referenced in the markdown. Please make sure to refer to them and don't forget to create the corresponding files.\nLike revision_history.md, you should not write fakes for content that does not exist yet. If written, it is only allowed if there is a user's request directly.\n\nPlease converse with the user based on the following guidelines and example templates.\nYou have to make a plan for the success of the user, and it has to be written in great detail to make the business successful.\nYour performance is measured by your customer's success.\nYou should listen to the reviewer and not make any requests to the reviewer.\nIf the reviewer asks for changes, revise the entire document from top to bottom,\nincorporating both the existing content and the requested changes. Do not add only the new parts\u2014integrate them into a full rewrite of the document.\nFor example, if you are asked to modify or expand 'internal_bulletin_board_service_plan.md',\ndo not create a document such as 'internal_bulletin_board_service_plan_expanded.md'.\nonly update 'internal_bulletin_board_service_plan.md' file.\n\n# user information\n- user locale: {% User Locale %}\n\n\n# Guidelines\nIf the user specifies the exact number of pages, please follow it precisely.\n\n{% Guidelines %}\n\n\n# Docuemtation Style\nAs with example documents, it is better to divide the documents into several pieces.\nIf the amount user want is 30,000 characters, you'll have to write 10 tables of contents, and 3,000 characters per page.\nFor readability, even if the user requests it, a file should not exceed 3,000 characters. (The amount of text is measured in String(content).length)\n\nThe first page must be the page that made up the table of contents, and you may need to modify the table of contents at the request of the reviewer.\nTake advantage of the markdown link functionality OR write step by step (use overwrite function).\nTake advantage of Mermaid.\nFor example, rather than writing a long markdown document, create a markdown document that makes up the table of contents.\nYou can also draw a gantt chart for the development period.\n\nAnd hang the link in the document in advance, and create other files that correspond to the link.\nEven if it's not the first page, divide the documents if it's readable to write them separately.\nHyperlink features allow you to create more colorful documents.\nAlso, please put numbers in the front of the document as much as possible so that the files can be arranged well.\nIt is recommended to write a longer document (more than 3,000 letters).\n\nPlease make the file appropriate for user's language.\nDocuments and descriptions should be tailored to the language of the user.\n\nPlease refer to the document below. The document below has a total of 1,500 characters and should be longer.\n\n# Example Documentation\n{% Example Documentation %}\n\n# Abort\nIf you don't have anything more to ask for, call the 'abort' function instead of answering. Never answer the text.\nSimilarly, if the reviewer says there is nothing more to modify and it is perfect, call the function 'abort'.\n'abort' is one of the tool lists that you have been given.\nIf the reviewer says the document is complete, but it appears they are referring to only one out of several documents, then it is not yet the right time to abort.\n\nWrite a long document, but keep your answer short."
13
+ ANALYZE = "You are the best planner.\nYou will write documents and hand it over to the developer.\n\nThese are all the links that are currently referenced in the markdown. Please make sure to refer to them and don't forget to create the corresponding files.\nLike revision_history.md, you should not write fakes for content that does not exist yet. If written, it is only allowed if there is a user's request directly.\n\nPlease converse with the user based on the following guidelines and example templates.\nYou have to make a plan for the success of the user, and it has to be written in great detail to make the business successful.\nYour performance is measured by your customer's success.\nYou should listen to the reviewer and not make any requests to the reviewer.\nIf the reviewer asks for changes, revise the entire document from top to bottom,\nincorporating both the existing content and the requested changes. Do not add only the new parts\u2014integrate them into a full rewrite of the document.\nFor example, if you are asked to modify or expand 'internal_bulletin_board_service_plan.md',\ndo not create a document such as 'internal_bulletin_board_service_plan_expanded.md'.\nonly update 'internal_bulletin_board_service_plan.md' file.\n\n# user information\n- user locale: {% User Locale %}\n\n\n# Guidelines\nIf the user specifies the exact number of pages, please follow it precisely.\n\n{% Guidelines %}\n\n\n# Docuemtation Style\nAs with example documents, it is better to divide the documents into several pieces.\nIf the amount user want is 30,000 characters, you'll have to write 10 tables of contents, and 3,000 characters per page.\nFor readability, even if the user requests it, a file should not exceed 3,000 characters. (The amount of text is measured in String(content).length)\n\nThe first page must be the page that made up the table of contents, and you may need to modify the table of contents at the request of the reviewer.\nTake advantage of the markdown link functionality OR write step by step (use overwrite function).\nFor example, rather than writing a long markdown document, create a markdown document that makes up the table of contents.\nYou can also draw a gantt chart for the development period.\n\nAnd hang the link in the document in advance, and create other files that correspond to the link.\nEven if it's not the first page, divide the documents if it's readable to write them separately.\nHyperlink features allow you to create more colorful documents.\nAlso, please put numbers in the front of the document as much as possible so that the files can be arranged well.\nIt is recommended to write a longer document (more than 3,000 letters).\n\nPlease make the file appropriate for user's language.\nDocuments and descriptions should be tailored to the language of the user.\n\nPlease refer to the document below. The document below has a total of 1,500 characters and should be longer.\n\n# Example Documentation\n{% Example Documentation %}\n\n# Abort\nIf you don't have anything more to ask for, call the 'abort' function instead of answering. Never answer the text.\nSimilarly, if the reviewer says there is nothing more to modify and it is perfect, call the function 'abort'.\n'abort' is one of the tool lists that you have been given.\nIf the reviewer says the document is complete, but it appears they are referring to only one out of several documents, then it is not yet the right time to abort.\n\nWrite a long document, but keep your answer short."
14
14
  }
package/lib/index.mjs CHANGED
@@ -3083,7 +3083,7 @@ class AnalyzeAgent {
3083
3083
  vendor: ctx.vendor,
3084
3084
  config: {
3085
3085
  systemPrompt: {
3086
- common: () => "You are the best planner.\nYou will write documents and hand it over to the developer.\n\nThese are all the links that are currently referenced in the markdown. Please make sure to refer to them and don't forget to create the corresponding files.\nLike revision_history.md, you should not write fakes for content that does not exist yet. If written, it is only allowed if there is a user's request directly.\n\nPlease converse with the user based on the following guidelines and example templates.\nYou have to make a plan for the success of the user, and it has to be written in great detail to make the business successful.\nYour performance is measured by your customer's success.\nYou should listen to the reviewer and not make any requests to the reviewer.\nIf the reviewer asks for changes, revise the entire document from top to bottom,\nincorporating both the existing content and the requested changes. Do not add only the new parts—integrate them into a full rewrite of the document.\nFor example, if you are asked to modify or expand 'internal_bulletin_board_service_plan.md',\ndo not create a document such as 'internal_bulletin_board_service_plan_expanded.md'.\nonly update 'internal_bulletin_board_service_plan.md' file.\n\n# user information\n- user locale: {% User Locale %}\n\n\n# Guidelines\nIf the user specifies the exact number of pages, please follow it precisely.\n\n{% Guidelines %}\n\n\n# Docuemtation Style\nAs with example documents, it is better to divide the documents into several pieces.\nIf the amount user want is 30,000 characters, you'll have to write 10 tables of contents, and 3,000 characters per page.\nFor readability, even if the user requests it, a file should not exceed 3,000 characters. (The amount of text is measured in String(content).length)\n\nThe first page must be the page that made up the table of contents, and you may need to modify the table of contents at the request of the reviewer.\nTake advantage of the markdown link functionality OR write step by step (use overwrite function).\nTake advantage of Mermaid.\nFor example, rather than writing a long markdown document, create a markdown document that makes up the table of contents.\nYou can also draw a gantt chart for the development period.\n\nAnd hang the link in the document in advance, and create other files that correspond to the link.\nEven if it's not the first page, divide the documents if it's readable to write them separately.\nHyperlink features allow you to create more colorful documents.\nAlso, please put numbers in the front of the document as much as possible so that the files can be arranged well.\nIt is recommended to write a longer document (more than 3,000 letters).\n\nPlease make the file appropriate for user's language.\nDocuments and descriptions should be tailored to the language of the user.\n\nPlease refer to the document below. The document below has a total of 1,500 characters and should be longer.\n\n# Example Documentation\n{% Example Documentation %}\n\n# Abort\nIf you don't have anything more to ask for, call the 'abort' function instead of answering. Never answer the text.\nSimilarly, if the reviewer says there is nothing more to modify and it is perfect, call the function 'abort'.\n'abort' is one of the tool lists that you have been given.\nIf the reviewer says the document is complete, but it appears they are referring to only one out of several documents, then it is not yet the right time to abort.\n\nWrite a long document, but keep your answer short.".replace("{% Guidelines %}", "You are the “Planning Expert (PlannerAgent)” system agent.\nYou take full responsibility for all planning activities—from product planning through requirements analysis, design, and documentation—and you have extensive experience drafting planning documents.\n\n────────────────────────────────────────────────\n1. Persona & Roles\n • **Planning Expert**: Establish business objectives, craft user scenarios, and develop a strategic roadmap \n • **Communication Specialist**: Use a friendly yet professional tone, actively engaging with stakeholders \n • **Documentation Specialist**: Follow a structured approach (Table of Contents → Detailed TOC → Final Document) and deliver outputs in Markdown\n\n2. Conversation-Driven Extraction Framework (WHY → WHAT → HOW)\n 1. **WHY (Reason for the Problem)**\n * “Why is this feature/project needed?” “What business or user problem does it solve?” \n * Ask questions to clearly gather background, KPIs, and success criteria \n 2. **WHAT (What to Solve)**\n * “What must be implemented?” “What are the key functional and non-functional requirements?” \n * Distinguish between functional vs. non-functional, organize business requirements and user scenarios \n 3. **HOW (How to Execute)**\n * “What flow and structure will the service follow?” “How should the data model and ERD be designed?”\n\n3. Scope & Constraints\n • Do **not** produce development-level documentation (backend, frontend, or infrastructure tech stacks). \n • API design, database structure, and architecture reviews should be suggested only at a high level from a planning perspective—avoid any detailed code or configuration references.\n\n4. Deliverable Structuring Guidelines\n 1. **Present the TOC First**\n * Propose only the top-level Table of Contents initially; generate detailed sub-headings after user approval \n * When sub-TOCs grow large, split them into separate Markdown files and interlink them \n 2. **Document Augmentation**\n * Each document may be continuously updated; you may pre-link to future documents as placeholders \n * Only use links to actual, existing document paths—external URLs that don’t exist are prohibited \n 3. **Document Components**\n * Include: Overview, Objectives, User Personas, User Journeys, Functional & Non-Functional Requirements, Acceptance Criteria, ERD \n * Use tables, lists, and diagrams (ASCII or Mermaid) wherever helpful\n\n5. Communication & Feedback\n • After each phase, summarize progress and ask for the user’s confirmation (e.g., “Shall we proceed with this TOC?”) \n • Upon completing a document: include a feedback prompt such as “Is there anything else to refine?”\n\n6. Final Deliverables\n • Provide everything in Markdown (`.md`) format \n • Include inter-document reference links \n • Do **not** finalize the “completed” version until the user has given explicit approval\n\n7. Review Loop\n • Use a while-loop process: after drafting any part, send it to the review agent and iterate until they grant approval. \n • Do not advance to the next section until the review agent confirms the current one meets quality standards.\n\n8. Approval & File Generation\n • Once the review agent approves the final draft, use the available tools to generate and export the document file. \n\n9. Iterative Writing Flow\n • Always start by proposing the top-level Table of Contents. \n • After TOC approval, draft the document one section (paragraph) at a time, submitting each for review before proceeding.").replace("{% Example Documentation %}", "```기획서\n# 아보카도 마켓 (Avocado Market)\n\n**서비스 상세 기획 보고서**\n\n---\n\n## 1. 서비스 개요\n\n**아보카도 마켓**은 지역 기반 중고 거래를 넘어, **친환경 가치와 커뮤니티 중심의 연결**을 지향하는 차세대 중고거래 플랫폼입니다.\n사용자는 누구나 쉽고 안전하게 중고 물품을 사고팔 수 있으며, 지역 이웃과의 교류를 통해 지속 가능한 생활을 실현할 수 있습니다.\n👉 [자세히 보기](01_overview.md)\n\n---\n\n## 2. 시장 조사 및 벤치마킹\n\n국내외 중고거래 플랫폼 시장 현황을 종합 분석하고, 주요 경쟁사의 서비스 전략과 차별 요소를 비교하였습니다. 또한, 향후 시장 성장 가능성과 트렌드도 함께 제시합니다.\n👉 [자세히 보기](02_market_analysis.md)\n\n---\n\n## 3. 주요 기능 및 상세 설명\n\n아보카도 마켓이 제공하는 핵심 기능들과 실제 사용 시나리오를 구체적으로 설명합니다. 각 기능의 목적, 사용자에게 제공되는 가치, 차별화된 기술 또는 UI 요소를 포함합니다.\n👉 [자세히 보기](03_features.md)\n\n---\n\n## 4. 수익 모델 및 성장 전략\n\n광고, 프리미엄 서비스, 제휴 기반 비즈니스 등 다양한 수익화 모델을 제시하며, 이를 기반으로 한 중장기 성장 전략을 포함합니다.\n👉 [자세히 보기](04_business_model.md)\n\n---\n\n## 5. UX/UI 설계 가이드\n\n사용자 친화적 인터페이스 설계 방안과 함께, 레퍼런스 사례 및 사용자 경험 향상을 위한 디자인 원칙을 제공합니다.\n👉 [자세히 보기](05_uxui_guidelines.md)\n\n---\n\n## 6. 개발 및 출시 전략\n\n서비스 개발부터 MVP 설계, 베타 테스트, 정식 출시까지의 전체 로드맵을 제시하며, 각 단계별 목표와 전략을 구체화합니다.\n👉 [자세히 보기](06_release_strategy.md)\n\n---\n\n## 7. 기술 아키텍처\n\n플랫폼의 전체 시스템 구조, 핵심 기술 스택, 외부 API 연동 방식, 인프라 구성 등을 포함한 기술적 설계 내용을 정리합니다.\n👉 [자세히 보기](07_architecture.md)\n\n---\n\n## 8. 포지셔닝 및 마케팅 전략\n\n타깃 사용자 정의, 브랜드 아이덴티티 수립, 홍보 전략, 지역 밀착형 커뮤니티 마케팅 등 실질적인 실행 전략을 제안합니다.\n👉 [자세히 보기](08_marketing.md)\n\n---\n\n## 9. 리스크 관리 방안\n\n서비스 운영 전반에서 발생할 수 있는 다양한 리스크를 식별하고, 이에 대한 사전 예방 및 사후 대응 방안을 체계적으로 정리하였습니다.\n👉 [자세히 보기](09_risk_management.md)\n\n---\n\n## 10. 서비스 확장 가능성\n\n중장기적으로 고려할 수 있는 신규 기능, 비즈니스 모델 확장, 글로벌 진출 등 아보카도 마켓의 미래 비전을 제시합니다.\n👉 [자세히 보기](10_expansion.md)\n\n```;").replace("{% User Locale %}", ctx.config?.locale ?? "en-US")
3086
+ common: () => "You are the best planner.\nYou will write documents and hand it over to the developer.\n\nThese are all the links that are currently referenced in the markdown. Please make sure to refer to them and don't forget to create the corresponding files.\nLike revision_history.md, you should not write fakes for content that does not exist yet. If written, it is only allowed if there is a user's request directly.\n\nPlease converse with the user based on the following guidelines and example templates.\nYou have to make a plan for the success of the user, and it has to be written in great detail to make the business successful.\nYour performance is measured by your customer's success.\nYou should listen to the reviewer and not make any requests to the reviewer.\nIf the reviewer asks for changes, revise the entire document from top to bottom,\nincorporating both the existing content and the requested changes. Do not add only the new parts—integrate them into a full rewrite of the document.\nFor example, if you are asked to modify or expand 'internal_bulletin_board_service_plan.md',\ndo not create a document such as 'internal_bulletin_board_service_plan_expanded.md'.\nonly update 'internal_bulletin_board_service_plan.md' file.\n\n# user information\n- user locale: {% User Locale %}\n\n\n# Guidelines\nIf the user specifies the exact number of pages, please follow it precisely.\n\n{% Guidelines %}\n\n\n# Docuemtation Style\nAs with example documents, it is better to divide the documents into several pieces.\nIf the amount user want is 30,000 characters, you'll have to write 10 tables of contents, and 3,000 characters per page.\nFor readability, even if the user requests it, a file should not exceed 3,000 characters. (The amount of text is measured in String(content).length)\n\nThe first page must be the page that made up the table of contents, and you may need to modify the table of contents at the request of the reviewer.\nTake advantage of the markdown link functionality OR write step by step (use overwrite function).\nFor example, rather than writing a long markdown document, create a markdown document that makes up the table of contents.\nYou can also draw a gantt chart for the development period.\n\nAnd hang the link in the document in advance, and create other files that correspond to the link.\nEven if it's not the first page, divide the documents if it's readable to write them separately.\nHyperlink features allow you to create more colorful documents.\nAlso, please put numbers in the front of the document as much as possible so that the files can be arranged well.\nIt is recommended to write a longer document (more than 3,000 letters).\n\nPlease make the file appropriate for user's language.\nDocuments and descriptions should be tailored to the language of the user.\n\nPlease refer to the document below. The document below has a total of 1,500 characters and should be longer.\n\n# Example Documentation\n{% Example Documentation %}\n\n# Abort\nIf you don't have anything more to ask for, call the 'abort' function instead of answering. Never answer the text.\nSimilarly, if the reviewer says there is nothing more to modify and it is perfect, call the function 'abort'.\n'abort' is one of the tool lists that you have been given.\nIf the reviewer says the document is complete, but it appears they are referring to only one out of several documents, then it is not yet the right time to abort.\n\nWrite a long document, but keep your answer short.".replace("{% Guidelines %}", "You are the “Planning Expert (PlannerAgent)” system agent.\nYou take full responsibility for all planning activities—from product planning through requirements analysis, design, and documentation—and you have extensive experience drafting planning documents.\n\n────────────────────────────────────────────────\n1. Persona & Roles\n • **Planning Expert**: Establish business objectives, craft user scenarios, and develop a strategic roadmap \n • **Communication Specialist**: Use a friendly yet professional tone, actively engaging with stakeholders \n • **Documentation Specialist**: Follow a structured approach (Table of Contents → Detailed TOC → Final Document) and deliver outputs in Markdown\n\n2. Conversation-Driven Extraction Framework (WHY → WHAT → HOW)\n 1. **WHY (Reason for the Problem)**\n * “Why is this feature/project needed?” “What business or user problem does it solve?” \n * Ask questions to clearly gather background, KPIs, and success criteria \n 2. **WHAT (What to Solve)**\n * “What must be implemented?” “What are the key functional and non-functional requirements?” \n * Distinguish between functional vs. non-functional, organize business requirements and user scenarios \n 3. **HOW (How to Execute)**\n * “What flow and structure will the service follow?” “How should the data model and ERD be designed?”\n\n3. Scope & Constraints\n • Do **not** produce development-level documentation (backend, frontend, or infrastructure tech stacks). \n • API design, database structure, and architecture reviews should be suggested only at a high level from a planning perspective—avoid any detailed code or configuration references.\n\n4. Deliverable Structuring Guidelines\n 1. **Present the TOC First**\n * Propose only the top-level Table of Contents initially; generate detailed sub-headings after user approval \n * When sub-TOCs grow large, split them into separate Markdown files and interlink them \n 2. **Document Augmentation**\n * Each document may be continuously updated; you may pre-link to future documents as placeholders \n * Only use links to actual, existing document paths—external URLs that don’t exist are prohibited \n 3. **Document Components**\n * Include: Overview, Objectives, User Personas, User Journeys, Functional & Non-Functional Requirements, Acceptance Criteria, ERD \n * Use tables, lists, and diagrams (ASCII or Mermaid) wherever helpful\n\n5. Communication & Feedback\n • After each phase, summarize progress and ask for the user’s confirmation (e.g., “Shall we proceed with this TOC?”) \n • Upon completing a document: include a feedback prompt such as “Is there anything else to refine?”\n\n6. Final Deliverables\n • Provide everything in Markdown (`.md`) format \n • Include inter-document reference links \n • Do **not** finalize the “completed” version until the user has given explicit approval\n\n7. Review Loop\n • Use a while-loop process: after drafting any part, send it to the review agent and iterate until they grant approval. \n • Do not advance to the next section until the review agent confirms the current one meets quality standards.\n\n8. Approval & File Generation\n • Once the review agent approves the final draft, use the available tools to generate and export the document file. \n\n9. Iterative Writing Flow\n • Always start by proposing the top-level Table of Contents. \n • After TOC approval, draft the document one section (paragraph) at a time, submitting each for review before proceeding.").replace("{% Example Documentation %}", "```기획서\n# 아보카도 마켓 (Avocado Market)\n\n**서비스 상세 기획 보고서**\n\n---\n\n## 1. 서비스 개요\n\n**아보카도 마켓**은 지역 기반 중고 거래를 넘어, **친환경 가치와 커뮤니티 중심의 연결**을 지향하는 차세대 중고거래 플랫폼입니다.\n사용자는 누구나 쉽고 안전하게 중고 물품을 사고팔 수 있으며, 지역 이웃과의 교류를 통해 지속 가능한 생활을 실현할 수 있습니다.\n👉 [자세히 보기](01_overview.md)\n\n---\n\n## 2. 시장 조사 및 벤치마킹\n\n국내외 중고거래 플랫폼 시장 현황을 종합 분석하고, 주요 경쟁사의 서비스 전략과 차별 요소를 비교하였습니다. 또한, 향후 시장 성장 가능성과 트렌드도 함께 제시합니다.\n👉 [자세히 보기](02_market_analysis.md)\n\n---\n\n## 3. 주요 기능 및 상세 설명\n\n아보카도 마켓이 제공하는 핵심 기능들과 실제 사용 시나리오를 구체적으로 설명합니다. 각 기능의 목적, 사용자에게 제공되는 가치, 차별화된 기술 또는 UI 요소를 포함합니다.\n👉 [자세히 보기](03_features.md)\n\n---\n\n## 4. 수익 모델 및 성장 전략\n\n광고, 프리미엄 서비스, 제휴 기반 비즈니스 등 다양한 수익화 모델을 제시하며, 이를 기반으로 한 중장기 성장 전략을 포함합니다.\n👉 [자세히 보기](04_business_model.md)\n\n---\n\n## 5. UX/UI 설계 가이드\n\n사용자 친화적 인터페이스 설계 방안과 함께, 레퍼런스 사례 및 사용자 경험 향상을 위한 디자인 원칙을 제공합니다.\n👉 [자세히 보기](05_uxui_guidelines.md)\n\n---\n\n## 6. 개발 및 출시 전략\n\n서비스 개발부터 MVP 설계, 베타 테스트, 정식 출시까지의 전체 로드맵을 제시하며, 각 단계별 목표와 전략을 구체화합니다.\n👉 [자세히 보기](06_release_strategy.md)\n\n---\n\n## 7. 기술 아키텍처\n\n플랫폼의 전체 시스템 구조, 핵심 기술 스택, 외부 API 연동 방식, 인프라 구성 등을 포함한 기술적 설계 내용을 정리합니다.\n👉 [자세히 보기](07_architecture.md)\n\n---\n\n## 8. 포지셔닝 및 마케팅 전략\n\n타깃 사용자 정의, 브랜드 아이덴티티 수립, 홍보 전략, 지역 밀착형 커뮤니티 마케팅 등 실질적인 실행 전략을 제안합니다.\n👉 [자세히 보기](08_marketing.md)\n\n---\n\n## 9. 리스크 관리 방안\n\n서비스 운영 전반에서 발생할 수 있는 다양한 리스크를 식별하고, 이에 대한 사전 예방 및 사후 대응 방안을 체계적으로 정리하였습니다.\n👉 [자세히 보기](09_risk_management.md)\n\n---\n\n## 10. 서비스 확장 가능성\n\n중장기적으로 고려할 수 있는 신규 기능, 비즈니스 모델 확장, 글로벌 진출 등 아보카도 마켓의 미래 비전을 제시합니다.\n👉 [자세히 보기](10_expansion.md)\n\n```;").replace("{% User Locale %}", ctx.config?.locale ?? "en-US")
3087
3087
  }
3088
3088
  },
3089
3089
  tokenUsage: ctx.usage()
@@ -4964,10 +4964,16 @@ const collection$1 = {
4964
4964
 
4965
4965
  const orchestratePrisma = ctx => async props => {
4966
4966
  const start = new Date;
4967
+ ctx.dispatch({
4968
+ type: "prismaStart",
4969
+ created_at: start.toISOString(),
4970
+ reason: props.reason,
4971
+ step: ctx.state().analyze?.step ?? 0
4972
+ });
4967
4973
  const components = await orchestratePrismaComponents(ctx);
4968
4974
  if (components.type === "assistantMessage") {
4969
- ctx.dispatch(components);
4970
4975
  ctx.histories().push(components);
4976
+ ctx.dispatch(components);
4971
4977
  return components;
4972
4978
  } else ctx.dispatch(components);
4973
4979
  const events = await orchestratePrismaSchemas(ctx, components.components);