Files
yidaima/RuoYi-Vue/sql/db_2026-07-15.sql

3175 lines
2.9 MiB
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

/*
Navicat Premium Data Transfer
Source Server : 本地数据库
Source Server Type : MySQL
Source Server Version : 80012
Source Host : localhost:3306
Source Schema : ry
Target Server Type : MySQL
Target Server Version : 80012
File Encoding : 65001
Date: 15/07/2026 12:30:20
*/
SET NAMES utf8mb4;
SET FOREIGN_KEY_CHECKS = 0;
-- ----------------------------
-- Table structure for factory_ai_stage_output
-- ----------------------------
DROP TABLE IF EXISTS `factory_ai_stage_output`;
CREATE TABLE `factory_ai_stage_output` (
`stage_output_id` bigint(20) NOT NULL AUTO_INCREMENT COMMENT 'Stage output ID',
`generation_id` bigint(20) NOT NULL COMMENT 'Parent generation ID',
`project_id` bigint(20) NOT NULL COMMENT 'Project ID',
`user_id` bigint(20) NOT NULL COMMENT 'Front user ID',
`generate_type` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NOT NULL COMMENT 'Stage generation type',
`request_payload` longtext CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL COMMENT 'Rendered stage input',
`response_payload` longtext CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL COMMENT 'Raw model response or correction attempts',
`success` char(1) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT '0' COMMENT '1 success, 0 failure',
`error_message` varchar(1000) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT '' COMMENT 'Stage error',
`elapsed_ms` bigint(20) NULL DEFAULT 0 COMMENT 'Elapsed milliseconds',
`create_time` datetime(0) NOT NULL COMMENT 'Created at',
PRIMARY KEY (`stage_output_id`) USING BTREE,
INDEX `idx_factory_ai_stage_output_generation`(`generation_id`) USING BTREE,
INDEX `idx_factory_ai_stage_output_project`(`project_id`, `create_time`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 100 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_0900_ai_ci COMMENT = 'Per-stage AI output evidence' ROW_FORMAT = Dynamic;
-- ----------------------------
-- Records of factory_ai_stage_output
-- ----------------------------
INSERT INTO `factory_ai_stage_output` VALUES (100, 100, 100, 100, 'app_blueprint', '{\"projectName\":\"图书管理系统\",\"projectDescription\":\"【AI补全需求】\\n业务目标图书管理系统旨在提供图书借阅、归还、查询及读者管理的基础功能支持图书库存管理与借阅期限控制。\\n\\n角色管理员、读者\\n\\n核心对象图书、读者、借阅记录、图书分类\\n\\n核心流程读者在系统内注册账号填写姓名、学号或工号、联系方式等信息管理员审核通过后激活读者账号读者登录系统通过关键词书名、作者、ISBN查询图书系统显示图书的库存数量、可借状态、存放位置读者选择一本可借图书并发起借阅请求系统检测读者当前借阅未还数量是否达到上限若未达到则生成借阅记录扣减库存数量1本借阅状态变为借出开始计借阅时间读者在借阅期限内将图书归还至图书馆管理员扫描图书条码或输入图书ID系统找到对应借阅记录更新归还时间为当前时间归还状态变为已还库存数量加1若读者超期未还系统在归还时自动计算超期天数并生成逾期费用读者需在系统内支付逾期费用后方可完成归还或管理员登记后读者线下支付系统记录支付状态读者可查看本人的借阅历史、当前借阅图书及应还日期管理员可管理图书信息新增、编辑图书基本信息、分类、库存数量、读者信息冻结、解冻、重置密码、查看所有借阅记录管理员可处理图书损坏或丢失标记图书状态为损坏或丢失扣除库存读者需赔偿。\\n\\n业务规则AI假设每位读者最多可借阅5本图书AI假设图书借阅期限为30天起算时间为借阅请求被管理员确认或系统自动确认时刻AI假设逾期费用为每本每天0.5元按天计费不足1天按1天计算Ceil取整单本逾期费用上限为图书定价的1倍AI假设图书定价默认为50元若未录入则使用此默认值每次借阅只能借阅同一本书1本读者账号需激活且未被冻结才能借阅库存数量为0时不可借阅已借出的图书状态为借出不可再次借阅归还时若图书损坏管理员标记损坏等级赔偿金额为图书定价的50%AI假设若图书丢失赔偿金额为图书定价的2倍AI假设系统自动在每晚23:59检查所有借阅记录将当日到期的图书标记为即将逾期状态仅供提醒但逾期计算以实际归还日期为准。\\n\\n异常边界库存不足时读者无法发起借阅请求系统提示该图书已全部借出状态不符时若图书状态为损坏或丢失不可借阅若读者账号被冻结不可借阅若读者当前借阅未还数量已达上限不可借阅重复提交时同一读者对于同一本图书在未归还前不可重复提交借阅请求系统检测已有进行中的借阅记录则拒绝取消时读者可在管理员确认借阅前取消借阅请求取消后库存不扣减借阅一旦确认无法取消超时时读者在借阅期限到期后仍可归还图书但需支付逾期费用重复支付时若读者已支付逾期费用再次支付时系统提示该笔费用已支付避免重复扣款。\\n\\n验收场景读者张三学号2023001当前借阅未还数量为4本查询到图书《数据结构》库存有2本定价50元。张三在2024年1月1日10:00发起借阅请求管理员确认后借阅成功库存变为1本应还日期为2024年1月31日。张三在2024年2月2日14:00归还超期2天1月31日到期2月1日第1天2月2日第2天。逾期费用计算2天×0.5元/天=1元未超过定价50元无需封顶。张三支付1元后归还完成库存恢复为2本。\\n\\n其他模块公告栏、新闻资讯、友情链接、帮助中心\",\"industryTemplate\":\"\",\"stylePreset\":\"dark-tech\",\"extraRequirements\":\"\"}', '{\n \"roles\": [\n {\n \"code\": \"admin\",\n \"name\": \"管理员\",\n \"description\": \"系统管理员,管理图书、读者、借阅记录等所有业务\"\n },\n {\n \"code\": \"reader\",\n \"name\": \"读者\",\n \"description\": \"注册读者,可查询图书、借阅归还、管理个人信息\"\n }\n ],\n \"frontendMenus\": [\n {\n \"code\": \"book_catalog\",\n \"name\": \"图书目录\",\n \"path\": \"/books\",\n \"pageCode\": \"book_catalog_page\",\n \"requiresLogin\": false,\n \"visibleRoles\": [],\n \"dataScope\": \"PUBLIC\"\n },\n {\n \"code\": \"announcement_list\",\n \"name\": \"公告栏\",\n \"path\": \"/announcements\",\n \"pageCode\": \"announcement_list_page\",\n \"requiresLogin\": false,\n \"visibleRoles\": [],\n \"dataScope\": \"PUBLIC\"\n },\n {\n \"code\": \"news_list\",\n \"name\": \"新闻资讯\",\n \"path\": \"/news\",\n \"pageCode\": \"news_list_page\",\n \"requiresLogin\": false,\n \"visibleRoles\": [],\n \"dataScope\": \"PUBLIC\"\n },\n {\n \"code\": \"friend_link_list\",\n \"name\": \"友情链接\",\n \"path\": \"/friend-links\",\n \"pageCode\": \"friend_link_list_page\",\n \"requiresLogin\": false,\n \"visibleRoles\": [],\n \"dataScope\": \"PUBLIC\"\n },\n {\n \"code\": \"help_center\",\n \"name\": \"帮助中心\",\n \"path\": \"/help\",\n \"pageCode\": \"help_center_page\",\n \"requiresLogin\": false,\n \"visibleRoles\": [],\n \"dataScope\": \"PUBLIC\"\n },\n {\n \"code\": \"my_borrowing\",\n \"name\": \"我的借阅\",\n \"path\": \"/my-borrowing\",\n \"pageCode\": \"my_borrowing_page\",\n \"requiresLogin\": true,\n \"visibleRoles\": [\"reader\"],\n \"dataScope\": \"CURRENT_USER\"\n },\n {\n \"code\": \"reader_profile\",\n \"name\": \"个人资料\",\n \"path\": \"/reader/profile\",\n \"pageCode\": \"reader_profile_page\",\n \"requiresLogin\": true,\n \"visibleRoles\": [\"reader\"],\n \"dataScope\": \"CURRENT_USER\"\n }\n ],\n \"frontendPages\": [\n {\n \"code\": \"book_catalog_page\",\n \"name\": \"图书目录\",\n \"menuCode\": \"book_catalog\",\n \"path\": \"/books\",\n \"pageType\": \"list\",\n \"tableName\": \"book_info\"\n },\n {\n \"code\": \"announcement_list_page\",\n \"name\": \"公告栏\",\n \"menuCode\": \"announcement_list\",\n \"path\": \"/announcements\",\n \"pageType\": \"list\",\n \"tableName\": \"announcement\"\n },\n {\n \"code\": \"news_list_page\",\n \"name\": \"新闻资讯\",\n \"menuCode\": \"news_list\",\n \"path\": \"/news\",\n \"pageType\": \"list\",\n \"tableName\": \"news\"\n },\n {\n \"code\": \"friend_link_list_page\",\n \"name\": \"友情链接\",\n \"menuCode\": \"friend_link_list\",\n \"path\": \"/friend-links\",\n \"pageType\": \"list\",\n \"tableName\": \"friend_link\"\n },\n {\n \"code\": \"help_center_page\",\n \"name\": \"帮助中心\",\n \"menuCode\": \"help_center\",\n \"path\": \"/help\",\n \"pageType\": \"list\",\n \"tableName\": \"help_article\"\n },\n {\n \"code\": \"my_borrowing_page\",\n \"name\": \"我的借阅\",\n \"menuCode\": \"my_borrowing\",\n \"path\": \"/my-borrowing\",\n \"pageType\": \"current_user_list\",\n \"tableName\": \"borrowing_record\"\n },\n {\n \"code\": \"reader_profile_page\",\n \"name\": \"个人资料\",\n \"menuCode\": \"reader_profile\",\n \"path\": \"/reader/profile\",\n \"pageType\": \"form\",\n \"tableName\": \"reader\"\n },\n {\n \"code\": \"book_detail_page\",\n \"name\": \"图书详情\",\n \"menuCode\": null,\n \"path\": \"/books/:id\",\n \"pageType\": \"detail\",\n \"tableName\": \"book_info\"\n },\n {\n \"code\": \"borrowing_detail_page\",\n \"name\": \"借阅详情\",\n \"menuCode\": null,\n \"path\": \"/my-borrowing/:id\",\n \"pageType\": \"detail\",\n \"tableName\": \"borrowing_record\"\n }\n ],\n \"adminMenus\": [\n {\n \"code\": \"book_admin\",\n \"name\": \"图书管理\",\n \"path\": \"/admin/books\",\n \"pageCode\": \"book_admin_page\",\n \"tableName\": \"book_info\",\n \"pageType\": \"list\",\n \"requiresLogin\": true,\n \"visibleRoles\": [\"admin\"],\n \"dataScope\": \"ROLE\"\n },\n {\n \"code\": \"reader_admin\",\n \"name\": \"读者管理\",\n \"path\": \"/admin/readers\",\n \"pageCode\": \"reader_admin_page\",\n \"tableName\": \"reader\",\n \"pageType\": \"list\",\n \"requiresLogin\": true,\n \"visibleRoles\": [\"admin\"],\n \"dataScope\": \"ROLE\"\n },\n {\n \"code\": \"borrowing_admin\",\n \"name\": \"借阅记录管理\",\n \"path\": \"/admin/borrowings\",\n \"pageCode\": \"borrowing_admin_page\",\n \"tableName\": \"borrowing_record\",\n \"pageType\": \"list\",\n \"requiresLogin\": true,\n \"visibleRoles\": [\"admin\"],\n \"dataScope\": \"ROLE\"\n },\n {\n \"code\": \"category_admin\",\n \"name\": \"图书分类管理\",\n \"path\": \"/admin/categories\",\n \"pageCode\": \"category_admin_page\",\n \"tableName\": \"book_category\",\n \"pageType\": \"list\",\n \"requiresLogin\": true,\n \"visibleRoles\": [\"admin\"],\n \"dataScope\": \"ROLE\"\n },\n {\n \"code\": \"announcement_admin\",\n \"name\": \"公告管理\",\n \"path\": \"/admin/announcements\",\n \"pageCode\": \"announcement_admin_page\",\n \"tableName\": \"announcement\",\n \"pageType\": \"list\",\n \"requiresLogin\": true,\n \"visibleRoles\": [\"admin\"],\n \"dataScope\": \"ROLE\"\n },\n {\n \"code\": \"news_admin\",\n \"name\": \"新闻管理\",\n \"path\": \"/admin/news\",\n \"pageCode\": \"news_admin_page\",\n \"tableName\": \"news\",\n \"pageType\": \"list\",\n \"requiresLogin\": true,\n \"visibleRoles\": [\"admin\"],\n \"dataScope\": \"ROLE\"\n },\n {\n \"code\": \"friend_link_admin\",\n \"name\": \"友情链接管理\",\n \"path\": \"/admin/friend-links\",\n \"pageCode\": \"friend_link_admin_page\",\n \"tableName\": \"friend_link\",\n \"pageType\": \"list\",\n \"requiresLogin\": true,\n \"visibleRoles\": [\"admin\"],\n \"dataScope\": \"ROLE\"\n },\n {\n \"code\": \"help_admin\",\n \"name\": \"帮助中心管理\",\n \"path\": \"/admin/help\",\n \"pageCode\": \"help_admin_page\",\n \"tableName\": \"help_article\",\n \"pageType\": \"list\",\n \"requiresLogin\": true,\n \"visibleRoles\": [\"admin\"],\n \"dataScope\": \"ROLE\"\n },\n {\n \"code\": \"admin_profile\",\n \"name\": \"管理员个人资料\",\n \"path\": \"/admin/profile\",\n \"pageCode\": \"admin_profile_page\",\n \"tableName\": \"admin_info\",\n \"pageType\": \"form\",\n \"requiresLogin\": true,\n \"visibleRoles\": [\"admin\"],\n \"dataScope\": \"ROLE\"\n }\n ],\n \"adminHomeDashboard\": {\n \"title\": \"运营总览\",\n \"description\": \"核心业务数据\",\n \"metrics\": [\n {\"label\": \"总图书数\", \"value\": 0, \"semantic\": \"inventory\"},\n {\"label\": \"总读者数\", \"value\": 0, \"semantic\": \"user\"},\n {\"label\": \"当前借出\", \"value\": 0, \"semantic\": \"order\"},\n {\"label\": \"逾期未还\", \"value\": 0, \"semantic\": \"warning\"}\n ],\n \"charts\": [\n {\"title\": \"借阅趋势\", \"type\": \"trend\", \"semantic\": \"order\"},\n {\"title\": \"图书分类分布\", \"type\": \"distribution\", \"semantic\": \"content\"}\n ]\n }\n}', '1', NULL, 47008, '2026-07-14 15:18:16');
INSERT INTO `factory_ai_stage_output` VALUES (101, 100, 100, 100, 'flow_config', '{\"mode\":\"generate\",\"projectName\":\"图书管理系统\",\"projectDescription\":\"【AI补全需求】\\n业务目标图书管理系统旨在提供图书借阅、归还、查询及读者管理的基础功能支持图书库存管理与借阅期限控制。\\n\\n角色管理员、读者\\n\\n核心对象图书、读者、借阅记录、图书分类\\n\\n核心流程读者在系统内注册账号填写姓名、学号或工号、联系方式等信息管理员审核通过后激活读者账号读者登录系统通过关键词书名、作者、ISBN查询图书系统显示图书的库存数量、可借状态、存放位置读者选择一本可借图书并发起借阅请求系统检测读者当前借阅未还数量是否达到上限若未达到则生成借阅记录扣减库存数量1本借阅状态变为借出开始计借阅时间读者在借阅期限内将图书归还至图书馆管理员扫描图书条码或输入图书ID系统找到对应借阅记录更新归还时间为当前时间归还状态变为已还库存数量加1若读者超期未还系统在归还时自动计算超期天数并生成逾期费用读者需在系统内支付逾期费用后方可完成归还或管理员登记后读者线下支付系统记录支付状态读者可查看本人的借阅历史、当前借阅图书及应还日期管理员可管理图书信息新增、编辑图书基本信息、分类、库存数量、读者信息冻结、解冻、重置密码、查看所有借阅记录管理员可处理图书损坏或丢失标记图书状态为损坏或丢失扣除库存读者需赔偿。\\n\\n业务规则AI假设每位读者最多可借阅5本图书AI假设图书借阅期限为30天起算时间为借阅请求被管理员确认或系统自动确认时刻AI假设逾期费用为每本每天0.5元按天计费不足1天按1天计算Ceil取整单本逾期费用上限为图书定价的1倍AI假设图书定价默认为50元若未录入则使用此默认值每次借阅只能借阅同一本书1本读者账号需激活且未被冻结才能借阅库存数量为0时不可借阅已借出的图书状态为借出不可再次借阅归还时若图书损坏管理员标记损坏等级赔偿金额为图书定价的50%AI假设若图书丢失赔偿金额为图书定价的2倍AI假设系统自动在每晚23:59检查所有借阅记录将当日到期的图书标记为即将逾期状态仅供提醒但逾期计算以实际归还日期为准。\\n\\n异常边界库存不足时读者无法发起借阅请求系统提示该图书已全部借出状态不符时若图书状态为损坏或丢失不可借阅若读者账号被冻结不可借阅若读者当前借阅未还数量已达上限不可借阅重复提交时同一读者对于同一本图书在未归还前不可重复提交借阅请求系统检测已有进行中的借阅记录则拒绝取消时读者可在管理员确认借阅前取消借阅请求取消后库存不扣减借阅一旦确认无法取消超时时读者在借阅期限到期后仍可归还图书但需支付逾期费用重复支付时若读者已支付逾期费用再次支付时系统提示该笔费用已支付避免重复扣款。\\n\\n验收场景读者张三学号2023001当前借阅未还数量为4本查询到图书《数据结构》库存有2本定价50元。张三在2024年1月1日10:00发起借阅请求管理员确认后借阅成功库存变为1本应还日期为2024年1月31日。张三在2024年2月2日14:00归还超期2天1月31日到期2月1日第1天2月2日第2天。逾期费用计算2天×0.5元/天=1元未超过定价50元无需封顶。张三支付1元后归还完成库存恢复为2本。\\n\\n其他模块公告栏、新闻资讯、友情链接、帮助中心\",\"industryTemplate\":\"\",\"stylePreset\":\"dark-tech\",\"extraRequirements\":\"\",\"confirmedAppBlueprint\":{\"adminHomeDashboard\":{\"charts\":[{\"filters\":[],\"metrics\":[],\"semantic\":\"order\",\"title\":\"借阅趋势\",\"type\":\"trend\"},{\"filters\":[],\"metrics\":[],\"semantic\":\"content\",\"title\":\"图书分类分布\",\"type\":\"distribution\"}],\"description\":\"核心业务数据\",\"metrics\":[{\"filters\":[],\"semantic\":\"inventory\"},{\"filters\":[],\"semantic\":\"user\"},{\"filters\":[],\"semantic\":\"order\"},{\"filters\":[],\"semantic\":\"warning\"}],\"title\":\"运营总览\"},\"adminMenus\":[{\"code\":\"book_admin\",\"dataScope\":\"ROLE\",\"name\":\"图书管理\",\"pageCode\":\"book_admin_page\",\"pageType\":\"list\",\"path\":\"/admin/books\",\"requiresLogin\":true,\"tableName\":\"book_info\",\"visibleRoles\":[\"admin\"]},{\"code\":\"reader_admin\",\"dataScope\":\"ROLE\",\"name\":\"读者管理\",\"pageCode\":\"reader_admin_page\",\"pageType\":\"list\",\"path\":\"/admin/readers\",\"requiresLogin\":true,\"tableName\":\"reader\",\"visibleRoles\":[\"admin\"]},{\"code\":\"borrowing_admin\",\"dataScope\":\"ROLE\",\"name\":\"借阅记录管理\",\"pageCode\":\"borrowing_admin_page\",\"pageType\":\"list\",\"path\":\"/admin/borrowings\",\"requiresLogin\":true,\"tableName\":\"borrowing_record\",\"visibleRoles\":[\"admin\"]},{\"code\":\"category_admin\",\"dataScope\":\"ROLE\",\"name\":\"图书分类管理\",\"pageCode\":\"category_admin_page\",\"pageType\":\"list\",\"path\":\"/admin/categories\",\"requiresLogin\":true,\"tableName\":\"book_category\",\"visibleRoles\":[\"admin\"]},{\"code\":\"announcement_admin\",\"dataScope\":\"ROLE\",\"name\":\"公告管理\",\"pageCode\":\"announcement_admin_page\",\"pageType\":\"list\",\"path\":\"/admin/announcements\",\"requiresLogin\":true,\"tableName\":\"announcement\",\"visibleRoles\":[\"admin\"]},{\"code\":\"news_admin\",\"dataScope\":\"ROLE\",\"name\":\"新闻管理\",\"pageCode\":\"news_admin_page\",\"pageType\":\"list\",\"path\":\"/admin/news\",\"requiresLogin\":true,\"tableName\":\"news\",\"visibleRoles\":[\"admin\"]},{\"code\":\"friend_link_admin\",\"dataScope\":\"ROLE\",\"name\":\"友情链接管理\",\"pageCode\":\"friend_link_admin_page\",\"pageType\":\"list\",\"path\":\"/admin/friend-links\",\"requiresLogin\":true,\"tableName\":\"friend_link\",\"visibleRoles\":[\"admin\"]},{\"code\":\"help_admin\",\"dataScope\":\"ROLE\",\"name\":\"帮助中心管理\",\"pageCode\":\"help_admin_page\",\"pageType\":\"list\",\"path\":\"/admin/help\",\"requiresLogin\":true,\"tableName\":\"help_article\",\"visibleRoles\":[\"admin\"]},{\"code\":\"admin_profile\",\"dataScope\":\"ROLE\",\"name\":\"管理员个人资料\",\"pageCode\":\"admin_profile_page\",\"pageType\":\"form\",\"path\":\"/admin/profile\",\"requiresLogin\":true,\"tableName\":\"admin_info\",\"visibleRoles\":[\"admin\"]}],\"frontendMenus\":[{\"code\":\"book_catalog\",\"dataScope\":\"PUBLIC\",\"name\":\"图书目录\",\"pageCode\":\"book_catalog_page\",\"pageType\":\"\",\"path\":\"/books\",\"requiresLogin\":false,\"tableName\":\"\",\"visibleRoles\":[]},{\"code\":\"announcement_list\",\"dataScope\":\"PUBLIC\",\"name\":\"公告栏\",\"pageCode\":\"announcement_list_page\",\"pageType\":\"\",\"path\":\"/announcements\",\"requiresLogin\":false,\"tableName\":\"\",\"visibleRoles\":[]},{\"code\":\"news_list\",\"dataScope\":\"PUBLIC\",\"name\":\"新闻资讯\",\"pageCode\":\"news_list_page\",\"pageType\":\"\",\"path\":\"/news\",\"requiresLogin\":false,\"tableName\":\"\",\"visibleRoles\":[]},{\"code\":\"friend_link_list\",\"dataScope\":\"PUBLIC\",\"name\":\"友情链接\",\"pageCode\":\"friend_link_list_page\",\"pageType\":\"\",\"path\":\"/friend-links\",\"requiresLogin\":false,\"tableName\":\"\",\"visibleRoles\":[]},{\"code\":\"help_center\",\"dataScope\":\"PUBLIC\",\"name\":\"帮助中心\",\"pageCode\":\"help_center_page\",\"pageType\":\"\",\"path\":\"/help\",\"requiresLogin\":false,\"tableName\":\"\",\"visibleRoles\":[]},{\"code\":\"my_borrowing\",\"dataScope\":\"CURRENT_USER\",\"name\":\"我的借阅\",\"pageCode\":\"my_borrowing_page\",\"pageType\":\"\",\"path\":\"/my-borrowing\",\"requiresLogin\":true,\"tableName\":\"\",\"visibleRoles\":[\"reader\"]},{\"code\":\"reader_profile\",\"dataScope\":\"CURRENT_USER\",\"name\":\"个人资料\",\"pageCode\":\"reader_profile_page\",\"pageType\":\"\",\"path\":\"/reader/profile\",\"requiresLogin\":true,\"tableName\":\"\",\"visibleRoles\":[\"reader\"]}],\"frontendPages\":[{\"code\":\"book_catalog_page\",\"menuCode\":\"book_catalog\",\"name\":\"图书目录\",\"pageType\":\"list\",\"parentPageCode\":\"\",\"path\":\"/books\",\"tableName\":\"book_info\"},{\"code\":\"announcement_list_page\",\"menuCode\":\"announcement_list\",\"name\":\"公告栏\",\"pageType\":\"list\",\"parentPageCode\":\"\",\"path\":\"/announcements\",\"tableName\":\"announcement\"},{\"code\":\"news_list_page\",\"menuCode\":\"news_list\",\"name\":\"新闻资讯\",\"pageType\":\"list\",\"parentPageCode\":\"\",\"path\":\"/news\",\"tableName\":\"news\"},{\"code\":\"friend_link_list_page\",\"menuCode\":\"friend_link_list\",\"name\":\"友情链接\",\"pageType\":\"list\",\"parentPageCode\":\"\",\"path\":\"/friend-links\",\"tableName\":\"friend_link\"},{\"code\":\"help_center_page\",\"menuCode\":\"help_center\",\"name\":\"帮助中心\",\"pageType\":\"list\",\"parentPageCode\":\"\",\"path\":\"/help\",\"tableName\":\"help_article\"},{\"code\":\"my_borrowing_page\",\"menuCode\":\"my_borrowing\",\"name\":\"我的借阅\",\"pageType\":\"current_user_list\",\"parentPageCode\":\"\",\"path\":\"/my-borrowing\",\"tableName\":\"borrowing_record\"},{\"code\":\"reader_profile_page\",\"menuCode\":\"reader_profile\",\"name\":\"个人资料\",\"pageType\":\"form\",\"parentPageCode\":\"\",\"path\":\"/reader/profile\",\"tableName\":\"reader\"},{\"code\":\"book_detail_page\",\"menuCode\":\"\",\"name\":\"图书详情\",\"pageType\":\"detail\",\"parentPageCode\":\"\",\"path\":\"/books/:id\",\"tableName\":\"book_info\"},{\"code\":\"borrowing_detail_page\",\"menuCode\":\"\",\"name\":\"借阅详情\",\"pageType\":\"detail\",\"parentPageCode\":\"\",\"path\":\"/my-borrowing/:id\",\"tableName\":\"borrowing_record\"}],\"roles\":[{\"code\":\"admin\",\"description\":\"系统管理员,管理图书、读者、借阅记录等所有业务\",\"name\":\"管理员\"},{\"code\":\"reader\",\"description\":\"注册读者,可查询图书、借阅归还、管理个人信息\",\"name\":\"读者\"}]}}', '{\n \"version\": \"1.0\",\n \"code\": \"borrowing_flow\",\n \"name\": \"借阅记录状态流转\",\n \"mainTable\": \"borrowing_record\",\n \"statusField\": \"status\",\n \"notFoundMessage\": \"借阅记录不存在\",\n \"states\": [\n {\"code\": \"pending_approval\", \"label\": \"待审批\"},\n {\"code\": \"borrowing\", \"label\": \"借出中\"},\n {\"code\": \"waiting_payment\", \"label\": \"待支付逾期费\"},\n {\"code\": \"returned\", \"label\": \"已归还\"},\n {\"code\": \"damaged\", \"label\": \"损坏\"},\n {\"code\": \"lost\", \"label\": \"丢失\"},\n {\"code\": \"cancelled\", \"label\": \"已取消\"},\n {\"code\": \"closed\", \"label\": \"已处理\"}\n ],\n \"actions\": [\n {\n \"code\": \"approve\",\n \"name\": \"确认借阅\",\n \"from\": \"pending_approval\",\n \"to\": \"borrowing\",\n \"actor\": \"admin\",\n \"method\": \"POST\",\n \"path\": \"/borrow-record/approve\",\n \"invalidStateMessage\": \"当前状态不能审核\",\n \"successMessage\": \"借阅确认成功\",\n \"audit\": {\"userField\": \"approve_user_id\", \"timeField\": \"approve_time\"},\n \"effects\": [\n {\n \"type\": \"decrease\",\n \"table\": \"book_info\",\n \"relationField\": \"book_id\",\n \"field\": \"stock\",\n \"amount\": \"1\",\n \"min\": \"0\",\n \"notFoundMessage\": \"图书不存在\",\n \"errorMessage\": \"图书库存不足\"\n }\n ],\n \"button\": {\n \"scope\": \"admin\",\n \"pageCode\": \"borrowing_admin_page\",\n \"slot\": \"list.rowActions\",\n \"type\": \"success\",\n \"confirm\": \"确认通过该借阅请求吗?\",\n \"order\": 10\n }\n },\n {\n \"code\": \"reject\",\n \"name\": \"拒绝借阅\",\n \"from\": \"pending_approval\",\n \"to\": \"cancelled\",\n \"actor\": \"admin\",\n \"method\": \"POST\",\n \"path\": \"/borrow-record/reject\",\n \"invalidStateMessage\": \"当前状态不能拒绝\",\n \"successMessage\": \"已拒绝借阅请求\",\n \"effects\": [],\n \"button\": {\n \"scope\": \"admin\",\n \"pageCode\": \"borrowing_admin_page\",\n \"slot\": \"list.rowActions\",\n \"type\": \"danger\",\n \"confirm\": \"确认拒绝该借阅请求吗?\",\n \"order\": 20\n }\n },\n {\n \"code\": \"cancel\",\n \"name\": \"取消借阅\",\n \"from\": \"pending_approval\",\n \"to\": \"cancelled\",\n \"actor\": \"reader\",\n \"method\": \"POST\",\n \"path\": \"/borrow-record/cancel\",\n \"invalidStateMessage\": \"只能取消待审批的借阅\",\n \"successMessage\": \"借阅请求已取消\",\n \"effects\": [],\n \"button\": {\n \"scope\": \"reader\",\n \"pageCode\": \"my_borrowing_page\",\n \"slot\": \"list.rowActions\",\n \"type\": \"default\",\n \"confirm\": \"确认取消该借阅请求吗?\",\n \"order\": 10\n }\n },\n {\n \"code\": \"return_no_overdue\",\n \"name\": \"归还(无逾期)\",\n \"from\": \"borrowing\",\n \"to\": \"returned\",\n \"actor\": \"admin\",\n \"method\": \"POST\",\n \"path\": \"/borrow-record/return\",\n \"invalidStateMessage\": \"当前记录未在借出中\",\n \"successMessage\": \"归还成功\",\n \"effects\": [\n {\n \"type\": \"increase\",\n \"table\": \"book_info\",\n \"relationField\": \"book_id\",\n \"field\": \"stock\",\n \"amount\": \"1\",\n \"notFoundMessage\": \"图书不存在\",\n \"errorMessage\": \"图书归还失败\"\n }\n ],\n \"button\": {\n \"scope\": \"admin\",\n \"pageCode\": \"borrowing_admin_page\",\n \"slot\": \"list.rowActions\",\n \"type\": \"primary\",\n \"confirm\": \"确认正常归还?\",\n \"order\": 30\n }\n },\n {\n \"code\": \"return_with_overdue\",\n \"name\": \"归还(有逾期)\",\n \"from\": \"borrowing\",\n \"to\": \"waiting_payment\",\n \"actor\": \"admin\",\n \"method\": \"POST\",\n \"path\": \"/borrow-record/return-overdue\",\n \"invalidStateMessage\": \"当前记录未在借出中\",\n \"successMessage\": \"归还成功,请支付逾期费用\",\n \"effects\": [\n {\n \"type\": \"increase\",\n \"table\": \"book_info\",\n \"relationField\": \"book_id\",\n \"field\": \"stock\",\n \"amount\": \"1\",\n \"notFoundMessage\": \"图书不存在\",\n \"errorMessage\": \"图书归还失败\"\n }\n ],\n \"button\": {\n \"scope\": \"admin\",\n \"pageCode\": \"borrowing_admin_page\",\n \"slot\": \"list.rowActions\",\n \"type\": \"warning\",\n \"confirm\": \"该借阅已超期,确认归还并生成逾期费用?\",\n \"order\": 40\n }\n },\n {\n \"code\": \"pay_overdue\",\n \"name\": \"支付逾期费\",\n \"from\": \"waiting_payment\",\n \"to\": \"returned\",\n \"actor\": \"reader\",\n \"method\": \"POST\",\n \"path\": \"/borrow-record/pay-overdue\",\n \"invalidStateMessage\": \"当前记录无需支付逾期费\",\n \"successMessage\": \"逾期费支付成功\",\n \"effects\": [],\n \"button\": {\n \"scope\": \"reader\",\n \"pageCode\": \"my_borrowing_page\",\n \"slot\": \"list.rowActions\",\n \"type\": \"success\",\n \"confirm\": \"确认支付逾期费用?\",\n \"order\": 20\n }\n },\n {\n \"code\": \"mark_damaged\",\n \"name\": \"标记损坏\",\n \"from\": \"borrowing\",\n \"to\": \"damaged\",\n \"actor\": \"admin\",\n \"method\": \"POST\",\n \"path\": \"/borrow-record/mark-damaged\",\n \"invalidStateMessage\": \"当前记录未在借出中\",\n \"successMessage\": \"已标记为损坏\",\n \"effects\": [\n {\n \"type\": \"decrease\",\n \"table\": \"book_info\",\n \"relationField\": \"book_id\",\n \"field\": \"stock\",\n \"amount\": \"1\",\n \"min\": \"0\",\n \"notFoundMessage\": \"图书不存在\",\n \"errorMessage\": \"库存不足\"\n }\n ],\n \"button\": {\n \"scope\": \"admin\",\n \"pageCode\": \"borrowing_admin_page\",\n \"slot\": \"list.rowActions\",\n \"type\": \"danger\",\n \"confirm\": \"确认标记该图书为损坏?\",\n \"order\": 50\n }\n },\n {\n \"code\": \"mark_lost\",\n \"name\": \"标记丢失\",\n \"from\": \"borrowing\",\n \"to\": \"lost\",\n \"actor\": \"admin\",\n \"method\": \"POST\",\n \"path\": \"/borrow-record/mark-lost\",\n \"invalidStateMessage\": \"当前记录未在借出中\",\n \"successMessage\": \"已标记为丢失\",\n \"effects\": [\n {\n \"type\": \"decrease\",\n \"table\": \"book_info\",\n \"relationField\": \"book_id\",\n \"field\": \"stock\",\n \"amount\": \"1\",\n \"min\": \"0\",\n \"notFoundMessage\": \"图书不存在\",\n \"errorMessage\": \"库存不足\"\n }\n ],\n \"button\": {\n \"scope\": \"admin\",\n \"pageCode\": \"borrowing_admin_page\",\n \"slot\": \"list.rowActions\",\n \"type\": \"danger\",\n \"confirm\": \"确认标记该图书为丢失?\",\n \"order\": 60\n }\n },\n {\n \"code\": \"pay_damage_compensation\",\n \"name\": \"支付损坏赔偿\",\n \"from\": \"damaged\",\n \"to\": \"closed\",\n \"actor\": \"reader\",\n \"method\": \"POST\",\n \"path\": \"/borrow-record/pay-damage\",\n \"invalidStateMessage\": \"当前记录未标记为损坏\",\n \"successMessage\": \"赔偿支付成功\",\n \"effects\": [],\n \"button\": {\n \"scope\": \"reader\",\n \"pageCode\": \"my_borrowing_page\",\n \"slot\": \"list.rowActions\",\n \"type\": \"primary\",\n \"confirm\": \"确认支付损坏赔偿?\",\n \"order\": 30\n }\n },\n {\n \"code\": \"pay_lost_compensation\",\n \"name\": \"支付丢失赔偿\",\n \"from\": \"lost\",\n \"to\": \"closed\",\n \"actor\": \"reader\",\n \"method\": \"POST\",\n \"path\": \"/borrow-record/pay-lost\",\n \"invalidStateMessage\": \"当前记录未标记为丢失\",\n \"successMessage\": \"赔偿支付成功\",\n \"effects\": [],\n \"button\": {\n \"scope\": \"reader\",\n \"pageCode\": \"my_borrowing_page\",\n \"slot\": \"list.rowActions\",\n \"type\": \"primary\",\n \"confirm\": \"确认支付丢失赔偿?\",\n \"order\": 40\n }\n },\n {\n \"code\": \"admin_close_damaged\",\n \"name\": \"管理员处理损坏\",\n \"from\": \"damaged\",\n \"to\": \"closed\",\n \"actor\": \"admin\",\n \"method\": \"POST\",\n \"path\": \"/borrow-record/close-damaged\",\n \"invalidStateMessage\": \"当前记录未标记为损坏\",\n \"successMessage\": \"损坏记录已处理\",\n \"effects\": [],\n \"button\": {\n \"scope\": \"admin\",\n \"pageCode\": \"borrowing_admin_page\",\n \"slot\": \"list.rowActions\",\n \"type\": \"primary\",\n \"confirm\": \"确认处理该损坏记录?\",\n \"order\": 70\n }\n },\n {\n \"code\": \"admin_close_lost\",\n \"name\": \"管理员处理丢失\",\n \"from\": \"lost\",\n \"to\": \"closed\",\n \"actor\": \"admin\",\n \"method\": \"POST\",\n \"path\": \"/borrow-record/close-lost\",\n \"invalidStateMessage\": \"当前记录未标记为丢失\",\n \"successMessage\": \"丢失记录已处理\",\n \"effects\": [],\n \"button\": {\n \"scope\": \"admin\",\n \"pageCode\": \"borrowing_admin_page\",\n \"slot\": \"list.rowActions\",\n \"type\": \"primary\",\n \"confirm\": \"确认处理该丢失记录?\",\n \"order\": 80\n }\n }\n ],\n \"metrics\": [\n {\"code\": \"pending_approval_count\", \"name\": \"待审批数量\", \"table\": \"borrowing_record\", \"aggregate\": \"count\", \"field\": \"id\", \"status\": \"pending_approval\", \"unit\": \"条\"},\n {\"code\": \"borrowing_count\", \"name\": \"借出中数量\", \"table\": \"borrowing_record\", \"aggregate\": \"count\", \"field\": \"id\", \"status\": \"borrowing\", \"unit\": \"条\"},\n {\"code\": \"waiting_payment_count\", \"name\": \"待支付逾期费数量\", \"table\": \"borrowing_record\", \"aggregate\": \"count\", \"field\": \"id\", \"status\": \"waiting_payment\", \"unit\": \"条\"},\n {\"code\": \"returned_count\", \"name\": \"已归还数量\", \"table\": \"borrowing_record\", \"aggregate\": \"count\", \"field\": \"id\", \"status\": \"returned\", \"unit\": \"条\"},\n {\"code\": \"damaged_lost_count\", \"name\": \"损坏丢失数量\", \"table\": \"borrowing_record\", \"aggregate\": \"count\", \"field\": \"id\", \"status\": \"damaged\", \"unit\": \"条\"},\n {\"code\": \"lost_count\", \"name\": \"丢失数量\", \"table\": \"borrowing_record\", \"aggregate\": \"count\", \"field\": \"id\", \"status\": \"lost\", \"unit\": \"条\"},\n {\"code\": \"total_borrowings\", \"name\": \"总借阅次数\", \"table\": \"borrowing_record\", \"aggregate\": \"count\", \"field\": \"id\", \"status\": \"\", \"unit\": \"条\"}\n ]\n}', '1', NULL, 65054, '2026-07-14 15:19:21');
INSERT INTO `factory_ai_stage_output` VALUES (102, 100, 100, 100, 'database', '{\"mode\":\"generate\",\"projectName\":\"图书管理系统\",\"projectDescription\":\"【AI补全需求】\\n业务目标图书管理系统旨在提供图书借阅、归还、查询及读者管理的基础功能支持图书库存管理与借阅期限控制。\\n\\n角色管理员、读者\\n\\n核心对象图书、读者、借阅记录、图书分类\\n\\n核心流程读者在系统内注册账号填写姓名、学号或工号、联系方式等信息管理员审核通过后激活读者账号读者登录系统通过关键词书名、作者、ISBN查询图书系统显示图书的库存数量、可借状态、存放位置读者选择一本可借图书并发起借阅请求系统检测读者当前借阅未还数量是否达到上限若未达到则生成借阅记录扣减库存数量1本借阅状态变为借出开始计借阅时间读者在借阅期限内将图书归还至图书馆管理员扫描图书条码或输入图书ID系统找到对应借阅记录更新归还时间为当前时间归还状态变为已还库存数量加1若读者超期未还系统在归还时自动计算超期天数并生成逾期费用读者需在系统内支付逾期费用后方可完成归还或管理员登记后读者线下支付系统记录支付状态读者可查看本人的借阅历史、当前借阅图书及应还日期管理员可管理图书信息新增、编辑图书基本信息、分类、库存数量、读者信息冻结、解冻、重置密码、查看所有借阅记录管理员可处理图书损坏或丢失标记图书状态为损坏或丢失扣除库存读者需赔偿。\\n\\n业务规则AI假设每位读者最多可借阅5本图书AI假设图书借阅期限为30天起算时间为借阅请求被管理员确认或系统自动确认时刻AI假设逾期费用为每本每天0.5元按天计费不足1天按1天计算Ceil取整单本逾期费用上限为图书定价的1倍AI假设图书定价默认为50元若未录入则使用此默认值每次借阅只能借阅同一本书1本读者账号需激活且未被冻结才能借阅库存数量为0时不可借阅已借出的图书状态为借出不可再次借阅归还时若图书损坏管理员标记损坏等级赔偿金额为图书定价的50%AI假设若图书丢失赔偿金额为图书定价的2倍AI假设系统自动在每晚23:59检查所有借阅记录将当日到期的图书标记为即将逾期状态仅供提醒但逾期计算以实际归还日期为准。\\n\\n异常边界库存不足时读者无法发起借阅请求系统提示该图书已全部借出状态不符时若图书状态为损坏或丢失不可借阅若读者账号被冻结不可借阅若读者当前借阅未还数量已达上限不可借阅重复提交时同一读者对于同一本图书在未归还前不可重复提交借阅请求系统检测已有进行中的借阅记录则拒绝取消时读者可在管理员确认借阅前取消借阅请求取消后库存不扣减借阅一旦确认无法取消超时时读者在借阅期限到期后仍可归还图书但需支付逾期费用重复支付时若读者已支付逾期费用再次支付时系统提示该笔费用已支付避免重复扣款。\\n\\n验收场景读者张三学号2023001当前借阅未还数量为4本查询到图书《数据结构》库存有2本定价50元。张三在2024年1月1日10:00发起借阅请求管理员确认后借阅成功库存变为1本应还日期为2024年1月31日。张三在2024年2月2日14:00归还超期2天1月31日到期2月1日第1天2月2日第2天。逾期费用计算2天×0.5元/天=1元未超过定价50元无需封顶。张三支付1元后归还完成库存恢复为2本。\\n\\n其他模块公告栏、新闻资讯、友情链接、帮助中心\",\"industryTemplate\":\"\",\"stylePreset\":\"dark-tech\",\"extraRequirements\":\"\",\"confirmedAppBlueprint\":{\"adminHomeDashboard\":{\"charts\":[{\"filters\":[],\"metrics\":[],\"semantic\":\"order\",\"title\":\"借阅趋势\",\"type\":\"trend\"},{\"filters\":[],\"metrics\":[],\"semantic\":\"content\",\"title\":\"图书分类分布\",\"type\":\"distribution\"}],\"description\":\"核心业务数据\",\"metrics\":[{\"filters\":[],\"semantic\":\"inventory\"},{\"filters\":[],\"semantic\":\"user\"},{\"filters\":[],\"semantic\":\"order\"},{\"filters\":[],\"semantic\":\"warning\"}],\"title\":\"运营总览\"},\"adminMenus\":[{\"code\":\"book_admin\",\"dataScope\":\"ROLE\",\"name\":\"图书管理\",\"pageCode\":\"book_admin_page\",\"pageType\":\"list\",\"path\":\"/admin/books\",\"requiresLogin\":true,\"tableName\":\"book_info\",\"visibleRoles\":[\"admin\"]},{\"code\":\"reader_admin\",\"dataScope\":\"ROLE\",\"name\":\"读者管理\",\"pageCode\":\"reader_admin_page\",\"pageType\":\"list\",\"path\":\"/admin/readers\",\"requiresLogin\":true,\"tableName\":\"reader\",\"visibleRoles\":[\"admin\"]},{\"code\":\"borrowing_admin\",\"dataScope\":\"ROLE\",\"name\":\"借阅记录管理\",\"pageCode\":\"borrowing_admin_page\",\"pageType\":\"list\",\"path\":\"/admin/borrowings\",\"requiresLogin\":true,\"tableName\":\"borrowing_record\",\"visibleRoles\":[\"admin\"]},{\"code\":\"category_admin\",\"dataScope\":\"ROLE\",\"name\":\"图书分类管理\",\"pageCode\":\"category_admin_page\",\"pageType\":\"list\",\"path\":\"/admin/categories\",\"requiresLogin\":true,\"tableName\":\"book_category\",\"visibleRoles\":[\"admin\"]},{\"code\":\"announcement_admin\",\"dataScope\":\"ROLE\",\"name\":\"公告管理\",\"pageCode\":\"announcement_admin_page\",\"pageType\":\"list\",\"path\":\"/admin/announcements\",\"requiresLogin\":true,\"tableName\":\"announcement\",\"visibleRoles\":[\"admin\"]},{\"code\":\"news_admin\",\"dataScope\":\"ROLE\",\"name\":\"新闻管理\",\"pageCode\":\"news_admin_page\",\"pageType\":\"list\",\"path\":\"/admin/news\",\"requiresLogin\":true,\"tableName\":\"news\",\"visibleRoles\":[\"admin\"]},{\"code\":\"friend_link_admin\",\"dataScope\":\"ROLE\",\"name\":\"友情链接管理\",\"pageCode\":\"friend_link_admin_page\",\"pageType\":\"list\",\"path\":\"/admin/friend-links\",\"requiresLogin\":true,\"tableName\":\"friend_link\",\"visibleRoles\":[\"admin\"]},{\"code\":\"help_admin\",\"dataScope\":\"ROLE\",\"name\":\"帮助中心管理\",\"pageCode\":\"help_admin_page\",\"pageType\":\"list\",\"path\":\"/admin/help\",\"requiresLogin\":true,\"tableName\":\"help_article\",\"visibleRoles\":[\"admin\"]},{\"code\":\"admin_profile\",\"dataScope\":\"ROLE\",\"name\":\"管理员个人资料\",\"pageCode\":\"admin_profile_page\",\"pageType\":\"form\",\"path\":\"/admin/profile\",\"requiresLogin\":true,\"tableName\":\"admin_info\",\"visibleRoles\":[\"admin\"]}],\"frontendMenus\":[{\"code\":\"book_catalog\",\"dataScope\":\"PUBLIC\",\"name\":\"图书目录\",\"pageCode\":\"book_catalog_page\",\"pageType\":\"\",\"path\":\"/books\",\"requiresLogin\":false,\"tableName\":\"\",\"visibleRoles\":[]},{\"code\":\"announcement_list\",\"dataScope\":\"PUBLIC\",\"name\":\"公告栏\",\"pageCode\":\"announcement_list_page\",\"pageType\":\"\",\"path\":\"/announcements\",\"requiresLogin\":false,\"tableName\":\"\",\"visibleRoles\":[]},{\"code\":\"news_list\",\"dataScope\":\"PUBLIC\",\"name\":\"新闻资讯\",\"pageCode\":\"news_list_page\",\"pageType\":\"\",\"path\":\"/news\",\"requiresLogin\":false,\"tableName\":\"\",\"visibleRoles\":[]},{\"code\":\"friend_link_list\",\"dataScope\":\"PUBLIC\",\"name\":\"友情链接\",\"pageCode\":\"friend_link_list_page\",\"pageType\":\"\",\"path\":\"/friend-links\",\"requiresLogin\":false,\"tableName\":\"\",\"visibleRoles\":[]},{\"code\":\"help_center\",\"dataScope\":\"PUBLIC\",\"name\":\"帮助中心\",\"pageCode\":\"help_center_page\",\"pageType\":\"\",\"path\":\"/help\",\"requiresLogin\":false,\"tableName\":\"\",\"visibleRoles\":[]},{\"code\":\"my_borrowing\",\"dataScope\":\"CURRENT_USER\",\"name\":\"我的借阅\",\"pageCode\":\"my_borrowing_page\",\"pageType\":\"\",\"path\":\"/my-borrowing\",\"requiresLogin\":true,\"tableName\":\"\",\"visibleRoles\":[\"reader\"]},{\"code\":\"reader_profile\",\"dataScope\":\"CURRENT_USER\",\"name\":\"个人资料\",\"pageCode\":\"reader_profile_page\",\"pageType\":\"\",\"path\":\"/reader/profile\",\"requiresLogin\":true,\"tableName\":\"\",\"visibleRoles\":[\"reader\"]}],\"frontendPages\":[{\"code\":\"book_catalog_page\",\"menuCode\":\"book_catalog\",\"name\":\"图书目录\",\"pageType\":\"list\",\"parentPageCode\":\"\",\"path\":\"/books\",\"tableName\":\"book_info\"},{\"code\":\"announcement_list_page\",\"menuCode\":\"announcement_list\",\"name\":\"公告栏\",\"pageType\":\"list\",\"parentPageCode\":\"\",\"path\":\"/announcements\",\"tableName\":\"announcement\"},{\"code\":\"news_list_page\",\"menuCode\":\"news_list\",\"name\":\"新闻资讯\",\"pageType\":\"list\",\"parentPageCode\":\"\",\"path\":\"/news\",\"tableName\":\"news\"},{\"code\":\"friend_link_list_page\",\"menuCode\":\"friend_link_list\",\"name\":\"友情链接\",\"pageType\":\"list\",\"parentPageCode\":\"\",\"path\":\"/friend-links\",\"tableName\":\"friend_link\"},{\"code\":\"help_center_page\",\"menuCode\":\"help_center\",\"name\":\"帮助中心\",\"pageType\":\"list\",\"parentPageCode\":\"\",\"path\":\"/help\",\"tableName\":\"help_article\"},{\"code\":\"my_borrowing_page\",\"menuCode\":\"my_borrowing\",\"name\":\"我的借阅\",\"pageType\":\"current_user_list\",\"parentPageCode\":\"\",\"path\":\"/my-borrowing\",\"tableName\":\"borrowing_record\"},{\"code\":\"reader_profile_page\",\"menuCode\":\"reader_profile\",\"name\":\"个人资料\",\"pageType\":\"form\",\"parentPageCode\":\"\",\"path\":\"/reader/profile\",\"tableName\":\"reader\"},{\"code\":\"book_detail_page\",\"menuCode\":\"\",\"name\":\"图书详情\",\"pageType\":\"detail\",\"parentPageCode\":\"\",\"path\":\"/books/:id\",\"tableName\":\"book_info\"},{\"code\":\"borrowing_detail_page\",\"menuCode\":\"\",\"name\":\"借阅详情\",\"pageType\":\"detail\",\"parentPageCode\":\"\",\"path\":\"/my-borrowing/:id\",\"tableName\":\"borrowing_record\"}],\"roles\":[{\"code\":\"admin\",\"description\":\"系统管理员,管理图书、读者、借阅记录等所有业务\",\"name\":\"管理员\"},{\"code\":\"reader\",\"description\":\"注册读者,可查询图书、借阅归还、管理个人信息\",\"name\":\"读者\"}]},\"flowConfig\":{\"actions\":[{\"actor\":\"admin\",\"audit\":{\"timeField\":\"approve_time\",\"userField\":\"approve_user_id\"},\"button\":{\"confirm\":\"确认通过该借阅请求吗?\",\"order\":10,\"pageCode\":\"borrowing_admin_page\",\"scope\":\"admin\",\"slot\":\"list.rowActions\",\"type\":\"success\"},\"code\":\"approve\",\"effects\":[{\"amount\":\"1\",\"errorMessage\":\"图书库存不足\",\"field\":\"stock\",\"min\":\"0\",\"notFoundMessage\":\"图书不存在\",\"relationField\":\"book_id\",\"table\":\"book_info\",\"type\":\"decrease\",\"values\":{}}],\"from\":\"pending_approval\",\"invalidStateMessage\":\"当前状态不能审核\",\"method\":\"POST\",\"name\":\"确认借阅\",\"path\":\"/borrow-record/approve\",\"successMessage\":\"借阅确认成功\",\"to\":\"borrowing\"},{\"actor\":\"admin\",\"button\":{\"confirm\":\"确认拒绝该借阅请求吗?\",\"order\":20,\"pageCode\":\"borrowing_admin_page\",\"scope\":\"admin\",\"slot\":\"list.rowActions\",\"type\":\"danger\"},\"code\":\"reject\",\"effects\":[],\"from\":\"pending_approval\",\"invalidStateMessage\":\"当前状态不能拒绝\",\"method\":\"POST\",\"name\":\"拒绝借阅\",\"path\":\"/borrow-record/reject\",\"successMessage\":\"已拒绝借阅请求\",\"to\":\"cancelled\"},{\"actor\":\"reader\",\"button\":{\"confirm\":\"确认取消该借阅请求吗?\",\"order\":10,\"pageCode\":\"my_borrowing_page\",\"scope\":\"reader\",\"slot\":\"list.rowActions\",\"type\":\"default\"},\"code\":\"cancel\",\"effects\":[],\"from\":\"pending_approval\",\"invalidStateMessage\":\"只能取消待审批的借阅\",\"method\":\"POST\",\"name\":\"取消借阅\",\"path\":\"/borrow-record/cancel\",\"successMessage\":\"借阅请求已取消\",\"to\":\"cancelled\"},{\"actor\":\"admin\",\"button\":{\"confirm\":\"确认正常归还?\",\"order\":30,\"pageCode\":\"borrowing_admin_page\",\"scope\":\"admin\",\"slot\":\"list.rowActions\",\"type\":\"primary\"},\"code\":\"return_no_overdue\",\"effects\":[{\"amount\":\"1\",\"errorMessage\":\"图书归还失败\",\"field\":\"stock\",\"min\":\"0\",\"notFoundMessage\":\"图书不存在\",\"relationField\":\"book_id\",\"table\":\"book_info\",\"type\":\"increase\",\"values\":{}}],\"from\":\"borrowing\",\"invalidStateMessage\":\"当前记录未在借出中\",\"method\":\"POST\",\"name\":\"归还(无逾期)\",\"path\":\"/borrow-record/return\",\"successMessage\":\"归还成功\",\"to\":\"returned\"},{\"actor\":\"admin\",\"button\":{\"confirm\":\"该借阅已超期,确认归还并生成逾期费用?\",\"order\":40,\"pageCode\":\"borrowing_admin_page\",\"scope\":\"admin\",\"slot\":\"list.rowActions\",\"type\":\"warning\"},\"code\":\"return_with_overdue\",\"effects\":[{\"amount\":\"1\",\"errorMessage\":\"图书归还失败\",\"field\":\"stock\",\"min\":\"0\",\"notFoundMessage\":\"图书不存在\",\"relationField\":\"book_id\",\"table\":\"book_info\",\"type\":\"increase\",\"values\":{}}],\"from\":\"borrowing\",\"invalidStateMessage\":\"当前记录未在借出中\",\"method\":\"POST\",\"name\":\"归还(有逾期)\",\"path\":\"/borrow-record/return-overdue\",\"successMessage\":\"归还成功,请支付逾期费用\",\"to\":\"waiting_payment\"},{\"actor\":\"reader\",\"button\":{\"confirm\":\"确认支付逾期费用?\",\"order\":20,\"pageCode\":\"my_borrowing_page\",\"scope\":\"reader\",\"slot\":\"list.rowActions\",\"type\":\"success\"},\"code\":\"pay_overdue\",\"effects\":[],\"from\":\"waiting_payment\",\"invalidStateMessage\":\"当前记录无需支付逾期费\",\"method\":\"POST\",\"name\":\"支付逾期费\",\"path\":\"/borrow-record/pay-overdue\",\"successMessage\":\"逾期费支付成功\",\"to\":\"returned\"},{\"actor\":\"admin\",\"button\":{\"confirm\":\"确认标记该图书为损坏?\",\"order\":50,\"pageCode\":\"borrowing_admin_page\",\"scope\":\"admin\",\"slot\":\"list.rowActions\",\"type\":\"danger\"},\"code\":\"mark_damaged\",\"effects\":[{\"amount\":\"1\",\"errorMessage\":\"库存不足\",\"field\":\"stock\",\"min\":\"0\",\"notFoundMessage\":\"图书不存在\",\"relationField\":\"book_id\",\"table\":\"book_info\",\"type\":\"decrease\",\"values\":{}}],\"from\":\"borrowing\",\"invalidStateMessage\":\"当前记录未在借出中\",\"method\":\"POST\",\"name\":\"标记损坏\",\"path\":\"/borrow-record/mark-damaged\",\"successMessage\":\"已标记为损坏\",\"to\":\"damaged\"},{\"actor\":\"admin\",\"button\":{\"confirm\":\"确认标记该图书为丢失?\",\"order\":60,\"pageCode\":\"borrowing_admin_page\",\"scope\":\"admin\",\"slot\":\"list.rowActions\",\"type\":\"danger\"},\"code\":\"mark_lost\",\"effects\":[{\"amount\":\"1\",\"errorMessage\":\"库存不足\",\"field\":\"stock\",\"min\":\"0\",\"notFoundMessage\":\"图书不存在\",\"relationField\":\"book_id\",\"table\":\"book_info\",\"type\":\"decrease\",\"values\":{}}],\"from\":\"borrowing\",\"invalidStateMessage\":\"当前记录未在借出中\",\"method\":\"POST\",\"name\":\"标记丢失\",\"path\":\"/borrow-record/mark-lost\",\"successMessage\":\"已标记为丢失\",\"to\":\"lost\"},{\"actor\":\"reader\",\"button\":{\"confirm\":\"确认支付损坏赔偿?\",\"order\":30,\"pageCode\":\"my_borrowing_page\",\"scope\":\"reader\",\"slot\":\"list.rowActions\",\"type\":\"primary\"},\"code\":\"pay_damage_compensation\",\"effects\":[],\"from\":\"damaged\",\"invalidStateMessage\":\"当前记录未标记为损坏\",\"method\":\"POST\",\"name\":\"支付损坏赔偿\",\"path\":\"/borrow-record/pay-damage\",\"successMessage\":\"赔偿支付成功\",\"to\":\"closed\"},{\"actor\":\"reader\",\"button\":{\"confirm\":\"确认支付丢失赔偿?\",\"order\":40,\"pageCode\":\"my_borrowing_page\",\"scope\":\"reader\",\"slot\":\"list.rowActions\",\"type\":\"primary\"},\"code\":\"pay_lost_compensation\",\"effects\":[],\"from\":\"lost\",\"invalidStateMessage\":\"当前记录未标记为丢失\",\"method\":\"POST\",\"name\":\"支付丢失赔偿\",\"path\":\"/borrow-record/pay-lost\",\"successMessage\":\"赔偿支付成功\",\"to\":\"closed\"},{\"actor\":\"admin\",\"button\":{\"confirm\":\"确认处理该损坏记录?\",\"order\":70,\"pageCode\":\"borrowing_admin_page\",\"scope\":\"admin\",\"slot\":\"list.rowActions\",\"type\":\"primary\"},\"code\":\"admin_close_damaged\",\"effects\":[],\"from\":\"damaged\",\"invalidStateMessage\":\"当前记录未标记为损坏\",\"method\":\"POST\",\"name\":\"管理员处理损坏\",\"path\":\"/borrow-record/close-damaged\",\"successMessage\":\"损坏记录已处理\",\"to\":\"closed\"},{\"actor\":\"admin\",\"button\":{\"confirm\":\"确认处理该丢失记录?\",\"order\":80,\"pageCode\":\"borrowing_admin_page\",\"scope\":\"admin\",\"slot\":\"list.rowActions\",\"type\":\"primary\"},\"code\":\"admin_close_lost\",\"effects\":[],\"from\":\"lost\",\"invalidStateMessage\":\"当前记录未标记为丢失\",\"method\":\"POST\",\"name\":\"管理员处理丢失\",\"path\":\"/borrow-record/close-lost\",\"successMessage\":\"丢失记录已处理\",\"to\":\"closed\"}],\"code\":\"borrowing_flow\",\"mainTable\":\"borrowing_record\",\"metrics\":[{\"aggregate\":\"count\",\"code\":\"pending_approval_count\",\"field\":\"id\",\"name\":\"待审批数量\",\"status\":\"pending_approval\",\"table\":\"borrowing_record\",\"unit\":\"条\"},{\"aggregate\":\"count\",\"code\":\"borrowing_count\",\"field\":\"id\",\"name\":\"借出中数量\",\"status\":\"borrowing\",\"table\":\"borrowing_record\",\"unit\":\"条\"},{\"aggregate\":\"count\",\"code\":\"waiting_payment_count\",\"field\":\"id\",\"name\":\"待支付逾期费数量\",\"status\":\"waiting_payment\",\"table\":\"borrowing_record\",\"unit\":\"条\"},{\"aggregate\":\"count\",\"code\":\"returned_count\",\"field\":\"id\",\"name\":\"已归还数量\",\"status\":\"returned\",\"table\":\"borrowing_record\",\"unit\":\"条\"},{\"aggregate\":\"count\",\"code\":\"damaged_lost_count\",\"field\":\"id\",\"name\":\"损坏丢失数量\",\"status\":\"damaged\",\"table\":\"borrowing_record\",\"unit\":\"条\"},{\"aggregate\":\"count\",\"code\":\"lost_count\",\"field\":\"id\",\"name\":\"丢失数量\",\"status\":\"lost\",\"table\":\"borrowing_record\",\"unit\":\"条\"},{\"aggregate\":\"count\",\"code\":\"total_borrowings\",\"field\":\"id\",\"name\":\"总借阅次数\",\"status\":\"\",\"table\":\"borrowing_record\",\"unit\":\"条\"}],\"name\":\"借阅记录状态流转\",\"notFoundMessage\":\"借阅记录不存在\",\"states\":[{\"code\":\"pending_approval\",\"label\":\"待审批\"},{\"code\":\"borrowing\",\"label\":\"借出中\"},{\"code\":\"waiting_payment\",\"label\":\"待支付逾期费\"},{\"code\":\"returned\",\"label\":\"已归还\"},{\"code\":\"damaged\",\"label\":\"损坏\"},{\"code\":\"lost\",\"label\":\"丢失\"},{\"code\":\"cancelled\",\"label\":\"已取消\"},{\"code\":\"closed\",\"label\":\"已处理\"}],\"statusField\":\"status\",\"version\":\"1.0\"},\"compiledFlowContract\":{\"acceptanceScenarios\":[],\"actions\":[{\"actor\":\"admin\",\"code\":\"approve\",\"name\":\"确认借阅\",\"ownerObject\":\"borrowing_record\",\"ownerTable\":\"borrowing_record\",\"preconditions\":[],\"quantityEffects\":[{\"actionCode\":\"approve\",\"amount\":\"1\",\"effectType\":\"decrease\",\"objectCode\":\"book_info\",\"quantityField\":\"stock\",\"tableName\":\"book_info\"}],\"recordEffects\":[],\"required\":true,\"stateTransitions\":[{\"actionCode\":\"approve\",\"fromState\":\"pending_approval\",\"toState\":\"borrowing\"}]},{\"actor\":\"admin\",\"code\":\"reject\",\"name\":\"拒绝借阅\",\"ownerObject\":\"borrowing_record\",\"ownerTable\":\"borrowing_record\",\"preconditions\":[],\"quantityEffects\":[],\"recordEffects\":[],\"required\":true,\"stateTransitions\":[{\"actionCode\":\"reject\",\"fromState\":\"pending_approval\",\"toState\":\"cancelled\"}]},{\"actor\":\"reader\",\"code\":\"cancel\",\"name\":\"取消借阅\",\"ownerObject\":\"borrowing_record\",\"ownerTable\":\"borrowing_record\",\"preconditions\":[],\"quantityEffects\":[],\"recordEffects\":[],\"required\":true,\"stateTransitions\":[{\"actionCode\":\"cancel\",\"fromState\":\"pending_approval\",\"toState\":\"cancelled\"}]},{\"actor\":\"admin\",\"code\":\"return_no_overdue\",\"name\":\"归还(无逾期)\",\"ownerObject\":\"borrowing_record\",\"ownerTable\":\"borrowing_record\",\"preconditions\":[],\"quantityEffects\":[{\"actionCode\":\"return_no_overdue\",\"amount\":\"1\",\"effectType\":\"increase\",\"objectCode\":\"book_info\",\"quantityField\":\"stock\",\"tableName\":\"book_info\"}],\"recordEffects\":[],\"required\":true,\"stateTransitions\":[{\"actionCode\":\"return_no_overdue\",\"fromState\":\"borrowing\",\"toState\":\"returned\"}]},{\"actor\":\"admin\",\"code\":\"return_with_overdue\",\"name\":\"归还(有逾期)\",\"ownerObject\":\"borrowing_record\",\"ownerTable\":\"borrowing_record\",\"preconditions\":[],\"quantityEffects\":[{\"actionCode\":\"return_with_overdue\",\"amount\":\"1\",\"effectType\":\"increase\",\"objectCode\":\"book_info\",\"quantityField\":\"stock\",\"tableName\":\"book_info\"}],\"recordEffects\":[],\"required\":true,\"stateTransitions\":[{\"actionCode\":\"return_with_overdue\",\"fromState\":\"borrowing\",\"toState\":\"waiting_payment\"}]},{\"actor\":\"reader\",\"code\":\"pay_overdue\",\"name\":\"支付逾期费\",\"ownerObject\":\"borrowing_record\",\"ownerTable\":\"borrowing_record\",\"preconditions\":[],\"quantityEffects\":[],\"recordEffects\":[],\"required\":true,\"stateTransitions\":[{\"actionCode\":\"pay_overdue\",\"fromState\":\"waiting_payment\",\"toState\":\"returned\"}]},{\"actor\":\"admin\",\"code\":\"mark_damaged\",\"name\":\"标记损坏\",\"ownerObject\":\"borrowing_record\",\"ownerTable\":\"borrowing_record\",\"preconditions\":[],\"quantityEffects\":[{\"actionCode\":\"mark_damaged\",\"amount\":\"1\",\"effectType\":\"decrease\",\"objectCode\":\"book_info\",\"quantityField\":\"stock\",\"tableName\":\"book_info\"}],\"recordEffects\":[],\"required\":true,\"stateTransitions\":[{\"actionCode\":\"mark_damaged\",\"fromState\":\"borrowing\",\"toState\":\"damaged\"}]},{\"actor\":\"admin\",\"code\":\"mark_lost\",\"name\":\"标记丢失\",\"ownerObject\":\"borrowing_record\",\"ownerTable\":\"borrowing_record\",\"preconditions\":[],\"quantityEffects\":[{\"actionCode\":\"mark_lost\",\"amount\":\"1\",\"effectType\":\"decrease\",\"objectCode\":\"book_info\",\"quantityField\":\"stock\",\"tableName\":\"book_info\"}],\"recordEffects\":[],\"required\":true,\"stateTransitions\":[{\"actionCode\":\"mark_lost\",\"fromState\":\"borrowing\",\"toState\":\"lost\"}]},{\"actor\":\"reader\",\"code\":\"pay_damage_compensation\",\"name\":\"支付损坏赔偿\",\"ownerObject\":\"borrowing_record\",\"ownerTable\":\"borrowing_record\",\"preconditions\":[],\"quantityEffects\":[],\"recordEffects\":[],\"required\":true,\"stateTransitions\":[{\"actionCode\":\"pay_damage_compensation\",\"fromState\":\"damaged\",\"toState\":\"closed\"}]},{\"actor\":\"reader\",\"code\":\"pay_lost_compensation\",\"name\":\"支付丢失赔偿\",\"ownerObject\":\"borrowing_record\",\"ownerTable\":\"borrowing_record\",\"preconditions\":[],\"quantityEffects\":[],\"recordEffects\":[],\"required\":true,\"stateTransitions\":[{\"actionCode\":\"pay_lost_compensation\",\"fromState\":\"lost\",\"toState\":\"closed\"}]},{\"actor\":\"admin\",\"code\":\"admin_close_damaged\",\"name\":\"管理员处理损坏\",\"ownerObject\":\"borrowing_record\",\"ownerTable\":\"borrowing_record\",\"preconditions\":[],\"quantityEffects\":[],\"recordEffects\":[],\"required\":true,\"stateTransitions\":[{\"actionCode\":\"admin_close_damaged\",\"fromState\":\"damaged\",\"toState\":\"closed\"}]},{\"actor\":\"admin\",\"code\":\"admin_close_lost\",\"name\":\"管理员处理丢失\",\"ownerObject\":\"borrowing_record\",\"ownerTable\":\"borrowing_record\",\"preconditions\":[],\"quantityEffects\":[],\"recordEffects\":[],\"required\":true,\"stateTransitions\":[{\"actionCode\":\"admin_close_lost\",\"fromState\":\"lost\",\"toState\":\"closed\"}]}],\"businessPolicies\":[],\"coreObjects\":[{\"code\":\"borrowing_record\",\"name\":\"借阅记录状态流转\",\"objectType\":\"main\",\"tableName\":\"borrowing_record\"},{\"code\":\"book_info\",\"name\":\"book_info\",\"objectType\":\"related\",\"tableName\":\"book_info\"}],\"domainName\":\"借阅记录状态流转\",\"metrics\":[{\"aggregate\":\"count\",\"code\":\"pending_approval_count\",\"field\":\"id\",\"filters\":[{\"field\":\"status\",\"operator\":\"eq\",\"values\":[\"pending_approval\"]}],\"name\":\"待审批数量\",\"relatedActionCodes\":[],\"required\":true,\"tableName\":\"borrowing_record\",\"unit\":\"条\"},{\"aggregate\":\"count\",\"code\":\"borrowing_count\",\"field\":\"id\",\"filters\":[{\"field\":\"status\",\"operator\":\"eq\",\"values\":[\"borrowing\"]}],\"name\":\"借出中数量\",\"relatedActionCodes\":[],\"required\":true,\"tableName\":\"borrowing_record\",\"unit\":\"条\"},{\"aggregate\":\"count\",\"code\":\"waiting_payment_count\",\"field\":\"id\",\"filters\":[{\"field\":\"status\",\"operator\":\"eq\",\"values\":[\"waiting_payment\"]}],\"name\":\"待支付逾期费数量\",\"relatedActionCodes\":[],\"required\":true,\"tableName\":\"borrowing_record\",\"unit\":\"条\"},{\"aggregate\":\"count\",\"code\":\"returned_count\",\"field\":\"id\",\"filters\":[{\"field\":\"status\",\"operator\":\"eq\",\"values\":[\"returned\"]}],\"name\":\"已归还数量\",\"relatedActionCodes\":[],\"required\":true,\"tableName\":\"borrowing_record\",\"unit\":\"条\"},{\"aggregate\":\"count\",\"code\":\"damaged_lost_count\",\"field\":\"id\",\"filters\":[{\"field\":\"status\",\"operator\":\"eq\",\"values\":[\"damaged\"]}],\"name\":\"损坏丢失数量\",\"relatedActionCodes\":[],\"required\":true,\"tableName\":\"borrowing_record\",\"unit\":\"条\"},{\"aggregate\":\"count\",\"code\":\"lost_count\",\"field\":\"id\",\"filters\":[{\"field\":\"status\",\"operator\":\"eq\",\"values\":[\"lost\"]}],\"name\":\"丢失数量\",\"relatedActionCodes\":[],\"required\":true,\"tableName\":\"borrowing_record\",\"unit\":\"条\"},{\"aggregate\":\"count\",\"code\":\"total_borrowings\",\"field\":\"id\",\"filters\":[],\"name\":\"总借阅次数\",\"relatedActionCodes\":[],\"required\":true,\"tableName\":\"borrowing_record\",\"unit\":\"条\"}],\"pageBindings\":[{\"actionCode\":\"approve\",\"pageCode\":\"borrowing_admin_page\",\"slot\":\"list.rowActions\",\"tableName\":\"borrowing_record\",\"target\":\"admin\"},{\"actionCode\":\"reject\",\"pageCode\":\"borrowing_admin_page\",\"slot\":\"list.rowActions\",\"tableName\":\"borrowing_record\",\"target\":\"admin\"},{\"actionCode\":\"cancel\",\"pageCode\":\"my_borrowing_page\",\"slot\":\"list.rowActions\",\"tableName\":\"borrowing_record\",\"target\":\"reader\"},{\"actionCode\":\"return_no_overdue\",\"pageCode\":\"borrowing_admin_page\",\"slot\":\"list.rowActions\",\"tableName\":\"borrowing_record\",\"target\":\"admin\"},{\"actionCode\":\"return_with_overdue\",\"pageCode\":\"borrowing_admin_page\",\"slot\":\"list.rowActions\",\"tableName\":\"borrowing_record\",\"target\":\"admin\"},{\"actionCode\":\"pay_overdue\",\"pageCode\":\"my_borrowing_page\",\"slot\":\"list.rowActions\",\"tableName\":\"borrowing_record\",\"target\":\"reader\"},{\"actionCode\":\"mark_damaged\",\"pageCode\":\"borrowing_admin_page\",\"slot\":\"list.rowActions\",\"tableName\":\"borrowing_record\",\"target\":\"admin\"},{\"actionCode\":\"mark_lost\",\"pageCode\":\"borrowing_admin_page\",\"slot\":\"list.rowActions\",\"tableName\":\"borrowing_record\",\"target\":\"admin\"},{\"actionCode\":\"pay_damage_compensation\",\"pageCode\":\"my_borrowing_page\",\"slot\":\"list.rowActions\",\"tableName\":\"borrowing_record\",\"target\":\"reader\"},{\"actionCode\":\"pay_lost_compensation\",\"pageCode\":\"my_borrowing_page\",\"slot\":\"list.rowActions\",\"tableName\":\"borrowing_record\",\"target\":\"reader\"},{\"actionCode\":\"admin_close_damaged\",\"pageCode\":\"borrowing_admin_page\",\"slot\":\"list.rowActions\",\"tableName\":\"borrowing_record\",\"target\":\"admin\"},{\"actionCode\":\"admin_close_lost\",\"pageCode\":\"borrowing_admin_page\",\"slot\":\"list.rowActions\",\"tableName\":\"borrowing_record\",\"target\":\"admin\"}],\"quantityRules\":[{\"actionCode\":\"approve\",\"amount\":\"1\",\"effectType\":\"decrease\",\"objectCode\":\"book_info\",\"quantityField\":\"stock\",\"tableName\":\"book_info\"},{\"actionCode\":\"return_no_overdue\",\"amount\":\"1\",\"effectType\":\"increase\",\"objectCode\":\"book_info\",\"quantityField\":\"stock\",\"tableName\":\"book_info\"},{\"actionCode\":\"return_with_overdue\",\"amount\":\"1\",\"effectType\":\"increase\",\"objectCode\":\"book_info\",\"quantityField\":\"stock\",\"tableName\":\"book_info\"},{\"actionCode\":\"mark_damaged\",\"amount\":\"1\",\"effectType\":\"decrease\",\"objectCode\":\"book_info\",\"quantityField\":\"stock\",\"tableName\":\"book_info\"},{\"actionCode\":\"mark_lost\",\"amount\":\"1\",\"effectType\":\"decrease\",\"objectCode\":\"book_info\",\"quantityField\":\"stock\",\"tableName\":\"book_info\"}],\"recordRules\":[],\"stateMachines\":[{\"objectCode\":\"borrowing_record\",\"states\":[\"pending_approval\",\"borrowing\",\"waiting_payment\",\"returned\",\"damaged\",\"lost\",\"cancelled\",\"closed\"],\"statusField\":\"status\",\"tableName\":\"borrowing_record\",\"transitions\":[{\"actionCode\":\"approve\",\"fromState\":\"pending_approval\",\"toState\":\"borrowing\"},{\"actionCode\":\"reject\",\"fromState\":\"pending_approval\",\"toState\":\"cancelled\"},{\"actionCode\":\"cancel\",\"fromState\":\"pending_approval\",\"toState\":\"cancelled\"},{\"actionCode\":\"return_no_overdue\",\"fromState\":\"borrowing\",\"toState\":\"returned\"},{\"actionCode\":\"return_with_overdue\",\"fromState\":\"borrowing\",\"toState\":\"waiting_payment\"},{\"actionCode\":\"pay_overdue\",\"fromState\":\"waiting_payment\",\"toState\":\"returned\"},{\"actionCode\":\"mark_damaged\",\"fromState\":\"borrowing\",\"toState\":\"damaged\"},{\"actionCode\":\"mark_lost\",\"fromState\":\"borrowing\",\"toState\":\"lost\"},{\"actionCode\":\"pay_damage_compensation\",\"fromState\":\"damaged\",\"toState\":\"closed\"},{\"actionCode\":\"pay_lost_compensation\",\"fromState\":\"lost\",\"toState\":\"closed\"},{\"actionCode\":\"admin_close_damaged\",\"fromState\":\"damaged\",\"toState\":\"closed\"},{\"actionCode\":\"admin_close_lost\",\"fromState\":\"lost\",\"toState\":\"closed\"}]}]},\"canonicalTableRegistry\":[\"book_info\",\"announcement\",\"news\",\"friend_link\",\"help_article\",\"borrowing_record\",\"reader\",\"book_category\",\"admin_info\"],\"limits\":{\"maxTables\":12,\"maxColumnsPerTable\":30}}', '{\n \"tables\": [\n {\n \"tableName\": \"book_category\",\n \"tableComment\": \"图书分类表\",\n \"adminMenuName\": \"图书分类管理\",\n \"operations\": {\n \"add\": true,\n \"edit\": true,\n \"remove\": true,\n \"removeType\": \"physical\",\n \"reason\": \"\"\n },\n \"columns\": [\n {\n \"columnName\": \"id\",\n \"columnLabel\": \"ID\",\n \"columnComment\": \"主键ID\",\n \"columnType\": \"bigint(20)\",\n \"isPk\": \"1\",\n \"isIncrement\": \"1\",\n \"isRequired\": \"1\"\n },\n {\n \"columnName\": \"name\",\n \"columnLabel\": \"分类名称\",\n \"columnComment\": \"分类名称\",\n \"columnType\": \"varchar(100)\",\n \"isPk\": \"0\",\n \"isIncrement\": \"0\",\n \"isRequired\": \"1\",\n \"javaType\": \"String\",\n \"htmlType\": \"input\"\n },\n {\n \"columnName\": \"description\",\n \"columnLabel\": \"描述\",\n \"columnComment\": \"分类描述\",\n \"columnType\": \"varchar(255)\",\n \"isPk\": \"0\",\n \"isIncrement\": \"0\",\n \"isRequired\": \"0\",\n \"javaType\": \"String\",\n \"htmlType\": \"textarea\"\n },\n {\n \"columnName\": \"sort_order\",\n \"columnLabel\": \"排序\",\n \"columnComment\": \"排序序号\",\n \"columnType\": \"int(11)\",\n \"isPk\": \"0\",\n \"isIncrement\": \"0\",\n \"isRequired\": \"0\",\n \"javaType\": \"Integer\",\n \"htmlType\": \"input\"\n },\n {\n \"columnName\": \"status\",\n \"columnLabel\": \"状态\",\n \"columnComment\": \"启用状态(1启用,0禁用)\",\n \"columnType\": \"char(1)\",\n \"isPk\": \"0\",\n \"isIncrement\": \"0\",\n \"isRequired\": \"1\",\n \"javaType\": \"String\",\n \"htmlType\": \"select\",\n \"dictOptions\": [\n {\n \"label\": \"启用\",\n \"value\": \"1\"\n },\n {\n \"label\": \"禁用\",\n \"value\": \"0\"\n }\n ]\n },\n {\n \"columnName\": \"create_time\",\n \"columnLabel\": \"创建时间\",\n \"columnComment\": \"创建时间\",\n \"columnType\": \"datetime\",\n \"isPk\": \"0\",\n \"isIncrement\": \"0\",\n \"isRequired\": \"0\",\n \"javaType\": \"Date\",\n \"htmlType\": \"datetime\"\n },\n {\n \"columnName\": \"update_time\",\n \"columnLabel\": \"更新时间\",\n \"columnComment\": \"更新时间\",\n \"columnType\": \"datetime\",\n \"isPk\": \"0\",\n \"isIncrement\": \"0\",\n \"isRequired\": \"0\",\n \"javaType\": \"Date\",\n \"htmlType\": \"datetime\"\n }\n ]\n },\n {\n \"tableName\": \"book_info\",\n \"tableComment\": \"图书信息表\",\n \"adminMenuName\": \"图书管理\",\n \"operations\": {\n \"add\": true,\n \"edit\": true,\n \"remove\": true,\n \"removeType\": \"physical\",\n \"reason\": \"\"\n },\n \"columns\": [\n {\n \"columnName\": \"id\",\n \"columnLabel\": \"ID\",\n \"columnComment\": \"主键ID\",\n \"columnType\": \"bigint(20)\",\n \"isPk\": \"1\",\n \"isIncrement\": \"1\",\n \"isRequired\": \"1\"\n },\n {\n \"columnName\": \"category_id\",\n \"columnLabel\": \"分类\",\n \"columnComment\": \"所属分类ID\",\n \"columnType\": \"bigint(20)\",\n \"isPk\": \"0\",\n \"isIncrement\": \"0\",\n \"isRequired\": \"1\",\n \"javaType\": \"Long\",\n \"htmlType\": \"select\",\n \"dictType\": \"remote:book_category:id:name\"\n },\n {\n \"columnName\": \"title\",\n \"columnLabel\": \"书名\",\n \"columnComment\": \"图书名称\",\n \"columnType\": \"varchar(200)\",\n \"isPk\": \"0\",\n \"isIncrement\": \"0\",\n \"isRequired\": \"1\",\n \"javaType\": \"String\",\n \"htmlType\": \"input\"\n },\n {\n \"columnName\": \"author\",\n \"columnLabel\": \"作者\",\n \"columnComment\": \"图书作者\",\n \"columnType\": \"varchar(100)\",\n \"isPk\": \"0\",\n \"isIncrement\": \"0\",\n \"isRequired\": \"1\",\n \"javaType\": \"String\",\n \"htmlType\": \"input\"\n },\n {\n \"columnName\": \"isbn\",\n \"columnLabel\": \"ISBN\",\n \"columnComment\": \"国际标准书号\",\n \"columnType\": \"varchar(20)\",\n \"isPk\": \"0\",\n \"isIncrement\": \"0\",\n \"isRequired\": \"0\",\n \"javaType\": \"String\",\n \"htmlType\": \"input\"\n },\n {\n \"columnName\": \"publisher\",\n \"columnLabel\": \"出版社\",\n \"columnComment\": \"出版社名称\",\n \"columnType\": \"varchar(100)\",\n \"isPk\": \"0\",\n \"isIncrement\": \"0\",\n \"isRequired\": \"0\",\n \"javaType\": \"String\",\n \"htmlType\": \"input\"\n },\n {\n \"columnName\": \"publish_date\",\n \"columnLabel\": \"出版日期\",\n \"columnComment\": \"出版日期\",\n \"columnType\": \"date\",\n \"isPk\": \"0\",\n \"isIncrement\": \"0\",\n \"isRequired\": \"0\",\n \"javaType\": \"Date\",\n \"htmlType\": \"date\"\n },\n {\n \"columnName\": \"price\",\n \"columnLabel\": \"定价\",\n \"columnComment\": \"图书定价(元)\",\n \"columnType\": \"decimal(10,2)\",\n \"isPk\": \"0\",\n \"isIncrement\": \"0\",\n \"isRequired\": \"1\",\n \"javaType\": \"BigDecimal\",\n \"htmlType\": \"input\"\n },\n {\n \"columnName\": \"stock\",\n \"columnLabel\": \"库存数量\",\n \"columnComment\": \"当前可借库存\",\n \"columnType\": \"int(11)\",\n \"isPk\": \"0\",\n \"isIncrement\": \"0\",\n \"isRequired\": \"1\",\n \"javaType\": \"Integer\",\n \"htmlType\": \"input\"\n },\n {\n \"columnName\": \"location\",\n \"columnLabel\": \"存放位置\",\n \"columnComment\": \"图书存放位置\",\n \"columnType\": \"varchar(100)\",\n \"isPk\": \"0\",\n \"isIncrement\": \"0\",\n \"isRequired\": \"0\",\n \"javaType\": \"String\",\n \"htmlType\": \"input\"\n },\n {\n \"columnName\": \"status\",\n \"columnLabel\": \"状态\",\n \"columnComment\": \"上架状态(1上架,0下架)\",\n \"columnType\": \"char(1)\",\n \"isPk\": \"0\",\n \"isIncrement\": \"0\",\n \"isRequired\": \"1\",\n \"javaType\": \"String\",\n \"htmlType\": \"select\",\n \"dictOptions\": [\n {\n \"label\": \"上架\",\n \"value\": \"1\"\n },\n {\n \"label\": \"下架\",\n \"value\": \"0\"\n }\n ]\n },\n {\n \"columnName\": \"cover_image\",\n \"columnLabel\": \"封面图片\",\n \"columnComment\": \"图书封面URL\",\n \"columnType\": \"varchar(500)\",\n \"isPk\": \"0\",\n \"isIncrement\": \"0\",\n \"isRequired\": \"0\",\n \"javaType\": \"String\",\n \"htmlType\": \"imageUpload\"\n },\n {\n \"columnName\": \"description\",\n \"columnLabel\": \"简介\",\n \"columnComment\": \"图书简介\",\n \"columnType\": \"text\",\n \"isPk\": \"0\",\n \"isIncrement\": \"0\",\n \"isRequired\": \"0\",\n \"javaType\": \"String\",\n \"htmlType\": \"editor\"\n },\n {\n \"columnName\": \"create_time\",\n \"columnLabel\": \"创建时间\",\n \"columnComment\": \"创建时间\",\n \"columnType\": \"datetime\",\n \"isPk\": \"0\",\n \"isIncrement\": \"0\",\n \"isRequired\": \"0\",\n \"javaType\": \"Date\",\n \"htmlType\": \"datetime\"\n },\n {\n \"columnName\": \"update_time\",\n \"columnLabel\": \"更新时间\",\n \"columnComment\": \"更新时间\",\n \"columnType\": \"datetime\",\n \"isPk\": \"0\",\n \"isIncrement\": \"0\",\n \"isRequired\": \"0\",\n \"javaType\": \"Date\",\n \"htmlType\": \"datetime\"\n }\n ]\n },\n {\n \"tableName\": \"reader\",\n \"tableComment\": \"读者信息表\",\n \"adminMenuName\": \"读者管理\",\n \"operations\": {\n \"add\": true,\n \"edit\": true,\n \"remove\": true,\n \"removeType\": \"physical\",\n \"reason\": \"\"\n },\n \"columns\": [\n {\n \"columnName\": \"reader_id\",\n \"columnLabel\": \"读者ID\",\n \"columnComment\": \"读者主键ID自动递增\",\n \"columnType\": \"bigint(20)\",\n \"isPk\": \"1\",\n \"isIncrement\": \"1\",\n \"isRequired\": \"1\"\n },\n {\n \"columnName\": \"username\",\n \"columnLabel\": \"用户名\",\n \"columnComment\": \"读者登录用户名\",\n \"columnType\": \"varchar(50)\",\n \"isPk\": \"0\",\n \"isIncrement\": \"0\",\n \"isRequired\": \"1\",\n \"javaType\": \"String\",\n \"htmlType\": \"input\"\n },\n {\n \"columnName\": \"password_hash\",\n \"columnLabel\": \"密码哈希\",\n \"columnComment\": \"读者登录密码哈希值\",\n \"columnType\": \"varchar(255)\",\n \"isPk\": \"0\",\n \"isIncrement\": \"0\",\n \"isRequired\": \"1\",\n \"javaType\": \"String\",\n \"htmlType\": \"input\"\n },\n {\n \"columnName\": \"nickname\",\n \"columnLabel\": \"昵称\",\n \"columnComment\": \"读者显示名称\",\n \"columnType\": \"varchar(100)\",\n \"isPk\": \"0\",\n \"isIncrement\": \"0\",\n \"isRequired\": \"1\",\n \"javaType\": \"String\",\n \"htmlType\": \"input\"\n },\n {\n \"columnName\": \"student_id\",\n \"columnLabel\": \"学号/工号\",\n \"columnComment\": \"读者学号或工号\",\n \"columnType\": \"varchar(50)\",\n \"isPk\": \"0\",\n \"isIncrement\": \"0\",\n \"isRequired\": \"0\",\n \"javaType\": \"String\",\n \"htmlType\": \"input\"\n },\n {\n \"columnName\": \"phone\",\n \"columnLabel\": \"手机号\",\n \"columnComment\": \"读者手机号码\",\n \"columnType\": \"varchar(20)\",\n \"isPk\": \"0\",\n \"isIncrement\": \"0\",\n \"isRequired\": \"0\",\n \"javaType\": \"String\",\n \"htmlType\": \"input\"\n },\n {\n \"columnName\": \"email\",\n \"columnLabel\": \"邮箱\",\n \"columnComment\": \"读者电子邮箱\",\n \"columnType\": \"varchar(100)\",\n \"isPk\": \"0\",\n \"isIncrement\": \"0\",\n \"isRequired\": \"0\",\n \"javaType\": \"String\",\n \"htmlType\": \"input\"\n },\n {\n \"columnName\": \"status\",\n \"columnLabel\": \"状态\",\n \"columnComment\": \"读者账号状态(1激活,0冻结)\",\n \"columnType\": \"char(1)\",\n \"isPk\": \"0\",\n \"isIncrement\": \"0\",\n \"isRequired\": \"1\",\n \"javaType\": \"String\",\n \"htmlType\": \"select\",\n \"dictOptions\": [\n {\n \"label\": \"激活\",\n \"value\": \"1\"\n },\n {\n \"label\": \"冻结\",\n \"value\": \"0\"\n }\n ]\n },\n {\n \"columnName\": \"create_time\",\n \"columnLabel\": \"创建时间\",\n \"columnComment\": \"账号创建时间\",\n \"columnType\": \"datetime\",\n \"isPk\": \"0\",\n \"isIncrement\": \"0\",\n \"isRequired\": \"0\",\n \"javaType\": \"Date\",\n \"htmlType\": \"datetime\"\n },\n {\n \"columnName\": \"update_time\",\n \"columnLabel\": \"更新时间\",\n \"columnComment\": \"账号更新时间\",\n \"columnType\": \"datetime\",\n \"isPk\": \"0\",\n \"isIncrement\": \"0\",\n \"isRequired\": \"0\",\n \"javaType\": \"Date\",\n \"htmlType\": \"datetime\"\n }\n ]\n },\n {\n \"tableName\": \"borrowing_record\",\n \"tableComment\": \"借阅记录表\",\n \"adminMenuName\": \"借阅记录管理\",\n \"operations\": {\n \"add\": true,\n \"edit\": false,\n \"remove\": false,\n \"removeType\": \"physical\",\n \"reason\": \"借阅记录通过状态流转管理,不可直接编辑或删除\"\n },\n \"columns\": [\n {\n \"columnName\": \"id\",\n \"columnLabel\": \"记录ID\",\n \"columnComment\": \"借阅记录主键ID\",\n \"columnType\": \"bigint(20)\",\n \"isPk\": \"1\",\n \"isIncrement\": \"1\",\n \"isRequired\": \"1\"\n },\n {\n \"columnName\": \"reader_id\",\n \"columnLabel\": \"读者\",\n \"columnComment\": \"借阅读者ID\",\n \"columnType\": \"bigint(20)\",\n \"isPk\": \"0\",\n \"isIncrement\": \"0\",\n \"isRequired\": \"1\",\n \"javaType\": \"Long\",\n \"htmlType\": \"select\",\n \"dictType\": \"remote:reader:reader_id:nickname\"\n },\n {\n \"columnName\": \"book_id\",\n \"columnLabel\": \"图书\",\n \"columnComment\": \"借阅图书ID\",\n \"columnType\": \"bigint(20)\",\n \"isPk\": \"0\",\n \"isIncrement\": \"0\",\n \"isRequired\": \"1\",\n \"javaType\": \"Long\",\n \"htmlType\": \"select\",\n \"dictType\": \"remote:book_info:id:title\"\n },\n {\n \"columnName\": \"borrow_date\",\n \"columnLabel\": \"借出时间\",\n \"columnComment\": \"借阅确认时间\",\n \"columnType\": \"datetime\",\n \"isPk\": \"0\",\n \"isIncrement\": \"0\",\n \"isRequired\": \"1\",\n \"javaType\": \"Date\",\n \"htmlType\": \"datetime\"\n },\n {\n \"columnName\": \"due_date\",\n \"columnLabel\": \"应还日期\",\n \"columnComment\": \"借阅截止日期借出后30天\",\n \"columnType\": \"datetime\",\n \"isPk\": \"0\",\n \"isIncrement\": \"0\",\n \"isRequired\": \"1\",\n \"javaType\": \"Date\",\n \"htmlType\": \"datetime\"\n },\n {\n \"columnName\": \"return_date\",\n \"columnLabel\": \"归还时间\",\n \"columnComment\": \"实际归还时间\",\n \"columnType\": \"datetime\",\n \"isPk\": \"0\",\n \"isIncrement\": \"0\",\n \"isRequired\": \"0\",\n \"javaType\": \"Date\",\n \"htmlType\": \"datetime\"\n },\n {\n \"columnName\": \"overdue_fee\",\n \"columnLabel\": \"逾期费用\",\n \"columnComment\": \"逾期未还产生的费用(元)\",\n \"columnType\": \"decimal(10,2)\",\n \"isPk\": \"0\",\n \"isIncrement\": \"0\",\n \"isRequired\": \"0\",\n \"javaType\": \"BigDecimal\",\n \"htmlType\": \"input\"\n },\n {\n \"columnName\": \"damage_compensation\",\n \"columnLabel\": \"损坏赔偿\",\n \"columnComment\": \"图书损坏赔款金额(元)\",\n \"columnType\": \"decimal(10,2)\",\n \"isPk\": \"0\",\n \"isIncrement\": \"0\",\n \"isRequired\": \"0\",\n \"javaType\": \"BigDecimal\",\n \"htmlType\": \"input\"\n },\n {\n \"columnName\": \"lost_compensation\",\n \"columnLabel\": \"丢失赔偿\",\n \"columnComment\": \"图书丢失赔款金额(元)\",\n \"columnType\": \"decimal(10,2)\",\n \"isPk\": \"0\",\n \"isIncrement\": \"0\",\n \"isRequired\": \"0\",\n \"javaType\": \"BigDecimal\",\n \"htmlType\": \"input\"\n },\n {\n \"columnName\": \"status\",\n \"columnLabel\": \"借阅状态\",\n \"columnComment\": \"借阅记录状态(对应状态机)\",\n \"columnType\": \"varchar(20)\",\n \"isPk\": \"0\",\n \"isIncrement\": \"0\",\n \"isRequired\": \"1\",\n \"javaType\": \"String\",\n \"htmlType\": \"select\",\n \"dictOptions\": [\n {\"label\": \"待审批\", \"value\": \"pending_approval\"},\n {\"label\": \"借出中\", \"value\": \"borrowing\"},\n {\"label\": \"待支付逾期费\", \"value\": \"waiting_payment\"},\n {\"label\": \"已归还\", \"value\": \"returned\"},\n {\"label\": \"损坏\", \"value\": \"damaged\"},\n {\"label\": \"丢失\", \"value\": \"lost\"},\n {\"label\": \"已取消\", \"value\": \"cancelled\"},\n {\"label\": \"已处理\", \"value\": \"closed\"}\n ]\n },\n {\n \"columnName\": \"approve_user_id\",\n \"columnLabel\": \"审批人ID\",\n \"columnComment\": \"审批通过的管理员ID\",\n \"columnType\": \"bigint(20)\",\n \"isPk\": \"0\",\n \"isIncrement\": \"0\",\n \"isRequired\": \"0\",\n \"javaType\": \"Long\",\n \"htmlType\": \"select\",\n \"dictType\": \"remote:admin_info:admin_id:nickname\"\n },\n {\n \"columnName\": \"approve_time\",\n \"columnLabel\": \"审批时间\",\n \"columnComment\": \"审批确认时间\",\n \"columnType\": \"datetime\",\n \"isPk\": \"0\",\n \"isIncrement\": \"0\",\n \"isRequired\": \"0\",\n \"javaType\": \"Date\",\n \"htmlType\": \"datetime\"\n },\n {\n \"columnName\": \"create_time\",\n \"columnLabel\": \"创建时间\",\n \"columnComment\": \"记录创建时间(读者发起借阅时间)\",\n \"columnType\": \"datetime\",\n \"isPk\": \"0\",\n \"isIncrement\": \"0\",\n \"isRequired\": \"0\",\n \"javaType\": \"Date\",\n \"htmlType\": \"datetime\"\n },\n {\n \"columnName\": \"update_time\",\n \"columnLabel\": \"更新时间\",\n \"columnComment\": \"记录最后更新时间\",\n \"columnType\": \"datetime\",\n \"isPk\": \"0\",\n \"isIncrement\": \"0\",\n \"isRequired\": \"0\",\n \"javaType\": \"Date\",\n \"htmlType\": \"datetime\"\n }\n ]\n },\n {\n \"tableName\": \"admin_info\",\n \"tableComment\": \"管理员信息表\",\n \"adminMenuName\": \"管理员个人资料\",\n \"operations\": {\n \"add\": false,\n \"edit\": true,\n \"remove\": false,\n \"removeType\": \"physical\",\n \"reason\": \"管理员账号仅用于登录和编辑个人资料\"\n },\n \"columns\": [\n {\n \"columnName\": \"admin_id\",\n \"columnLabel\": \"管理员ID\",\n \"columnComment\": \"管理员主键ID自动递增\",\n \"columnType\": \"bigint(20)\",\n \"isPk\": \"1\",\n \"isIncrement\": \"1\",\n \"isRequired\": \"1\"\n },\n {\n \"columnName\": \"username\",\n \"columnLabel\": \"用户名\",\n \"columnComment\": \"管理员登录用户名\",\n \"columnType\": \"varchar(50)\",\n \"isPk\": \"0\",\n \"isIncrement\": \"0\",\n \"isRequired\": \"1\",\n \"javaType\": \"String\",\n \"htmlType\": \"input\"\n },\n {\n \"columnName\": \"password_hash\",\n \"columnLabel\": \"密码哈希\",\n \"columnComment\": \"管理员登录密码哈希值\",\n \"columnType\": \"varchar(255)\",\n \"isPk\": \"0\",\n \"isIncrement\": \"0\",\n \"isRequired\": \"1\",\n \"javaType\": \"String\",\n \"htmlType\": \"input\"\n },\n {\n \"columnName\": \"nickname\",\n \"columnLabel\": \"昵称\",\n \"columnComment\": \"管理员显示名称\",\n \"columnType\": \"varchar(100)\",\n \"isPk\": \"0\",\n \"isIncrement\": \"0\",\n \"isRequired\": \"1\",\n \"javaType\": \"String\",\n \"htmlType\": \"input\"\n },\n {\n \"columnName\": \"status\",\n \"columnLabel\": \"状态\",\n \"columnComment\": \"管理员账号状态(1启用,0禁用)\",\n \"columnType\": \"char(1)\",\n \"isPk\": \"0\",\n \"isIncrement\": \"0\",\n \"isRequired\": \"1\",\n \"javaType\": \"String\",\n \"htmlType\": \"select\",\n \"dictOptions\": [\n {\"label\": \"启用\", \"value\": \"1\"},\n {\"label\": \"禁用\", \"value\": \"0\"}\n ]\n },\n {\n \"columnName\": \"create_time\",\n \"columnLabel\": \"创建时间\",\n \"columnComment\": \"账号创建时间\",\n \"columnType\": \"datetime\",\n \"isPk\": \"0\",\n \"isIncrement\": \"0\",\n \"isRequired\": \"0\",\n \"javaType\": \"Date\",\n \"htmlType\": \"datetime\"\n },\n {\n \"columnName\": \"update_time\",\n \"columnLabel\": \"更新时间\",\n \"columnComment\": \"账号更新时间\",\n \"columnType\": \"datetime\",\n \"isPk\": \"0\",\n \"isIncrement\": \"0\",\n \"isRequired\": \"0\",\n \"javaType\": \"Date\",\n \"htmlType\": \"datetime\"\n }\n ]\n },\n {\n \"tableName\": \"announcement\",\n \"tableComment\": \"公告信息表\",\n \"adminMenuName\": \"公告管理\",\n \"operations\": {\n \"add\": true,\n \"edit\": true,\n \"remove\": true,\n \"removeType\": \"physical\",\n \"reason\": \"\"\n },\n \"columns\": [\n {\n \"columnName\": \"id\",\n \"columnLabel\": \"ID\",\n \"columnComment\": \"公告主键ID\",\n \"columnType\": \"bigint(20)\",\n \"isPk\": \"1\",\n \"isIncrement\": \"1\",\n \"isRequired\": \"1\"\n },\n {\n \"columnName\": \"title\",\n \"columnLabel\": \"标题\",\n \"columnComment\": \"公告标题\",\n \"columnType\": \"varchar(200)\",\n \"isPk\": \"0\",\n \"isIncrement\": \"0\",\n \"isRequired\": \"1\",\n \"javaType\": \"String\",\n \"htmlType\": \"input\"\n },\n {\n \"columnName\": \"content\",\n \"columnLabel\": \"内容\",\n \"columnComment\": \"公告正文内容\",\n \"columnType\": \"text\",\n \"isPk\": \"0\",\n \"isIncrement\": \"0\",\n \"isRequired\": \"1\",\n \"javaType\": \"String\",\n \"htmlType\": \"editor\"\n },\n {\n \"columnName\": \"publish_time\",\n \"columnLabel\": \"发布时间\",\n \"columnComment\": \"公告发布时间\",\n \"columnType\": \"datetime\",\n \"isPk\": \"0\",\n \"isIncrement\": \"0\",\n \"isRequired\": \"0\",\n \"javaType\": \"Date\",\n \"htmlType\": \"datetime\"\n },\n {\n \"columnName\": \"status\",\n \"columnLabel\": \"状态\",\n \"columnComment\": \"公告状态(1发布,0草稿)\",\n \"columnType\": \"char(1)\",\n \"isPk\": \"0\",\n \"isIncrement\": \"0\",\n \"isRequired\": \"1\",\n \"javaType\": \"String\",\n \"htmlType\": \"select\",\n \"dictOptions\": [\n {\"label\": \"发布\", \"value\": \"1\"},\n {\"label\": \"草稿\", \"value\": \"0\"}\n ]\n },\n {\n \"columnName\": \"create_time\",\n \"columnLabel\": \"创建时间\",\n \"columnComment\": \"记录创建时间\",\n \"columnType\": \"datetime\",\n \"isPk\": \"0\",\n \"isIncrement\": \"0\",\n \"isRequired\": \"0\",\n \"javaType\": \"Date\",\n \"htmlType\": \"datetime\"\n },\n {\n \"columnName\": \"update_time\",\n \"columnLabel\": \"更新时间\",\n \"columnComment\": \"记录更新时间\",\n \"columnType\": \"datetime\",\n \"isPk\": \"0\",\n \"isIncrement\": \"0\",\n \"isRequired\": \"0\",\n \"javaType\": \"Date\",\n \"htmlType\": \"datetime\"\n }\n ]\n },\n {\n \"tableName\": \"news\",\n \"tableComment\": \"新闻资讯表\",\n \"adminMenuName\": \"新闻管理\",\n \"operations\": {\n \"add\": true,\n \"edit\": true,\n \"remove\": true,\n \"removeType\": \"physical\",\n \"reason\": \"\"\n },\n \"columns\": [\n {\n \"columnName\": \"id\",\n \"columnLabel\": \"ID\",\n \"columnComment\": \"新闻主键ID\",\n \"columnType\": \"bigint(20)\",\n \"isPk\": \"1\",\n \"isIncrement\": \"1\",\n \"isRequired\": \"1\"\n },\n {\n \"columnName\": \"title\",\n \"columnLabel\": \"标题\",\n \"columnComment\": \"新闻标题\",\n \"columnType\": \"varchar(200)\",\n \"isPk\": \"0\",\n \"isIncrement\": \"0\",\n \"isRequired\": \"1\",\n \"javaType\": \"String\",\n \"htmlType\": \"input\"\n },\n {\n \"columnName\": \"content\",\n \"columnLabel\": \"内容\",\n \"columnComment\": \"新闻正文内容\",\n \"columnType\": \"text\",\n \"isPk\": \"0\",\n \"isIncrement\": \"0\",\n \"isRequired\": \"1\",\n \"javaType\": \"String\",\n \"htmlType\": \"editor\"\n },\n {\n \"columnName\": \"author\",\n \"columnLabel\": \"作者\",\n \"columnComment\": \"新闻作者\",\n \"columnType\": \"varchar(100)\",\n \"isPk\": \"0\",\n \"isIncrement\": \"0\",\n \"isRequired\": \"0\",\n \"javaType\": \"String\",\n \"htmlType\": \"input\"\n },\n {\n \"columnName\": \"publish_time\",\n \"columnLabel\": \"发布时间\",\n \"columnComment\": \"新闻发布时间\",\n \"columnType\": \"datetime\",\n \"isPk\": \"0\",\n \"isIncrement\": \"0\",\n \"isRequired\": \"0\",\n \"javaType\": \"Date\",\n \"htmlType\": \"datetime\"\n },\n {\n \"columnName\": \"source\",\n \"columnLabel\": \"来源\",\n \"columnComment\": \"新闻来源\",\n \"columnType\": \"varchar(200)\",\n \"isPk\": \"0\",\n \"isIncrement\": \"0\",\n \"isRequired\": \"0\",\n \"javaType\": \"String\",\n \"htmlType\": \"input\"\n },\n {\n \"columnName\": \"status\",\n \"columnLabel\": \"状态\",\n \"columnComment\": \"新闻状态(1发布,0草稿)\",\n \"columnType\": \"char(1)\",\n \"isPk\": \"0\",\n \"isIncrement\": \"0\",\n \"isRequired\": \"1\",\n \"javaType\": \"String\",\n \"htmlType\": \"select\",\n \"dictOptions\": [\n {\"label\": \"发布\", \"value\": \"1\"},\n {\"label\": \"草稿\", \"value\": \"0\"}\n ]\n },\n {\n \"columnName\": \"create_time\",\n \"columnLabel\": \"创建时间\",\n \"columnComment\": \"记录创建时间\",\n \"columnType\": \"datetime\",\n \"isPk\": \"0\",\n \"isIncrement\": \"0\",\n \"isRequired\": \"0\",\n \"javaType\": \"Date\",\n \"htmlType\": \"datetime\"\n },\n {\n \"columnName\": \"update_time\",\n \"columnLabel\": \"更新时间\",\n \"columnComment\": \"记录更新时间\",\n \"columnType\": \"datetime\",\n \"isPk\": \"0\",\n \"isIncrement\": \"0\",\n \"isRequired\": \"0\",\n \"javaType\": \"Date\",\n \"htmlType\": \"datetime\"\n }\n ]\n },\n {\n \"tableName\": \"friend_link\",\n \"tableComment\": \"友情链接表\",\n \"adminMenuName\": \"友情链接管理\",\n \"operations\": {\n \"add\": true,\n \"edit\": true,\n \"remove\": true,\n \"removeType\": \"physical\",\n \"reason\": \"\"\n },\n \"columns\": [\n {\n \"columnName\": \"id\",\n \"columnLabel\": \"ID\",\n \"columnComment\": \"友情链接主键ID\",\n \"columnType\": \"bigint(20)\",\n \"isPk\": \"1\",\n \"isIncrement\": \"1\",\n \"isRequired\": \"1\"\n },\n {\n \"columnName\": \"name\",\n \"columnLabel\": \"名称\",\n \"columnComment\": \"链接站点名称\",\n \"columnType\": \"varchar(200)\",\n \"isPk\": \"0\",\n \"isIncrement\": \"0\",\n \"isRequired\": \"1\",\n \"javaType\": \"String\",\n \"htmlType\": \"input\"\n },\n {\n \"columnName\": \"url\",\n \"columnLabel\": \"链接地址\",\n \"columnComment\": \"网站URL\",\n \"columnType\": \"varchar(500)\",\n \"isPk\": \"0\",\n \"isIncrement\": \"0\",\n \"isRequired\": \"1\",\n \"javaType\": \"String\",\n \"htmlType\": \"input\"\n },\n {\n \"columnName\": \"logo\",\n \"columnLabel\": \"LOGO\",\n \"columnComment\": \"站点LOGO图片URL\",\n \"columnType\": \"varchar(500)\",\n \"isPk\": \"0\",\n \"isIncrement\": \"0\",\n \"isRequired\": \"0\",\n \"javaType\": \"String\",\n \"htmlType\": \"imageUpload\"\n },\n {\n \"columnName\": \"sort_order\",\n \"columnLabel\": \"排序\",\n \"columnComment\": \"显示排序序号\",\n \"columnType\": \"int(11)\",\n \"isPk\": \"0\",\n \"isIncrement\": \"0\",\n \"isRequired\": \"0\",\n \"javaType\": \"Integer\",\n \"htmlType\": \"input\"\n },\n {\n \"columnName\": \"status\",\n \"columnLabel\": \"状态\",\n \"columnComment\": \"启用状态(1启用,0禁用)\",\n \"columnType\": \"char(1)\",\n \"isPk\": \"0\",\n \"isIncrement\": \"0\",\n \"isRequired\": \"1\",\n \"javaType\": \"String\",\n \"htmlType\": \"select\",\n \"dictOptions\": [\n {\"label\": \"启用\", \"value\": \"1\"},\n {\"label\": \"禁用\", \"value\": \"0\"}\n ]\n },\n {\n \"columnName\": \"create_time\",\n \"columnLabel\": \"创建时间\",\n \"columnComment\": \"记录创建时间\",\n \"columnType\": \"datetime\",\n \"isPk\": \"0\",\n \"isIncrement\": \"0\",\n \"isRequired\": \"0\",\n \"javaType\": \"Date\",\n \"htmlType\": \"datetime\"\n },\n {\n \"columnName\": \"update_time\",\n \"columnLabel\": \"更新时间\",\n \"columnComment\": \"记录更新时间\",\n \"columnType\": \"datetime\",\n \"isPk\": \"0\",\n \"isIncrement\": \"0\",\n \"isRequired\": \"0\",\n \"javaType\": \"Date\",\n \"htmlType\": \"datetime\"\n }\n ]\n },\n {\n \"tableName\": \"help_article\",\n \"tableComment\": \"帮助中心文章表\",\n \"adminMenuName\": \"帮助中心管理\",\n \"operations\": {\n \"add\": true,\n \"edit\": true,\n \"remove\": true,\n \"removeType\": \"physical\",\n \"reason\": \"\"\n },\n \"columns\": [\n {\n \"columnName\": \"id\",\n \"columnLabel\": \"ID\",\n \"columnComment\": \"文章主键ID\",\n \"columnType\": \"bigint(20)\",\n \"isPk\": \"1\",\n \"isIncrement\": \"1\",\n \"isRequired\": \"1\"\n },\n {\n \"columnName\": \"title\",\n \"columnLabel\": \"标题\",\n \"columnComment\": \"文章标题\",\n \"columnType\": \"varchar(200)\",\n \"isPk\": \"0\",\n \"isIncrement\": \"0\",\n \"isRequired\": \"1\",\n \"javaType\": \"String\",\n \"htmlType\": \"input\"\n },\n {\n \"columnName\": \"content\",\n \"columnLabel\": \"内容\",\n \"columnComment\": \"文章正文内容\",\n \"columnType\": \"text\",\n \"isPk\": \"0\",\n \"isIncrement\": \"0\",\n \"isRequired\": \"1\",\n \"javaType\": \"String\",\n \"htmlType\": \"editor\"\n },\n {\n \"columnName\": \"category\",\n \"columnLabel\": \"分类\",\n \"columnComment\": \"文章所属分类\",\n \"columnType\": \"varchar(100)\",\n \"isPk\": \"0\",\n \"isIncrement\": \"0\",\n \"isRequired\": \"0\",\n \"javaType\": \"String\",\n \"htmlType\": \"input\"\n },\n {\n \"columnName\": \"sort_order\",\n \"columnLabel\": \"排序\",\n \"columnComment\": \"显示排序序号\",\n \"columnType\": \"int(11)\",\n \"isPk\": \"0\",\n \"isIncrement\": \"0\",\n \"isRequired\": \"0\",\n \"javaType\": \"Integer\",\n \"htmlType\": \"input\"\n },\n {\n \"columnName\": \"status\",\n \"columnLabel\": \"状态\",\n \"columnComment\": \"文章状态(1发布,0草稿)\",\n \"columnType\": \"char(1)\",\n \"isPk\": \"0\",\n \"isIncrement\": \"0\",\n \"isRequired\": \"1\",\n \"javaType\": \"String\",\n \"htmlType\": \"select\",\n \"dictOptions\": [\n {\"label\": \"发布\", \"value\": \"1\"},\n {\"label\": \"草稿\", \"value\": \"0\"}\n ]\n },\n {\n \"columnName\": \"create_time\",\n \"columnLabel\": \"创建时间\",\n \"columnComment\": \"记录创建时间\",\n \"columnType\": \"datetime\",\n \"isPk\": \"0\",\n \"isIncrement\": \"0\",\n \"isRequired\": \"0\",\n \"javaType\": \"Date\",\n \"htmlType\": \"datetime\"\n },\n {\n \"columnName\": \"update_time\",\n \"columnLabel\": \"更新时间\",\n \"columnComment\": \"记录更新时间\",\n \"columnType\": \"datetime\",\n \"isPk\": \"0\",\n \"isIncrement\": \"0\",\n \"isRequired\": \"0\",\n \"javaType\": \"Date\",\n \"htmlType\": \"datetime\"\n }\n ]\n }\n ]\n}', '1', NULL, 106612, '2026-07-14 15:21:08');
INSERT INTO `factory_ai_stage_output` VALUES (103, 101, 101, 100, 'app_blueprint', '{\"projectName\":\"图书管理系统\",\"projectDescription\":\"项目定位:一个面向高校图书馆的图书管理系统,供读者在线借书、还书、预约,管理员进行图书管理和借阅审核。\\n\\n角色管理员、读者。\\n\\n核心流程读者检索图书→提交借书申请→管理员审核通过并发放图书→读者还书或续借→管理员确认归还→超期则系统自动生成罚款→读者在线缴纳罚款。\\n\\n关键规则每位读者最多同时借阅5本书借阅期限为30天可续借1次续借期15天超期罚款0.1元/天预约图书保留2天逾期未取自动取消。\\n\\n异常边界库存为0时禁止借出同一读者重复提交同一本书的借书申请时提示“已借出或预约中”状态为“已借出”或“逾期”时无法再次借书预约超时自动释放库存支付罚款时若余额不足则失败。\",\"industryTemplate\":\"\",\"stylePreset\":\"dark-tech\",\"extraRequirements\":\"\"}', '{\n \"roles\": [\n {\n \"code\": \"admin\",\n \"name\": \"管理员\",\n \"description\": \"系统管理员,负责图书管理、借阅审核等\"\n },\n {\n \"code\": \"reader\",\n \"name\": \"读者\",\n \"description\": \"普通读者,可在线借书、预约、缴纳罚款\"\n }\n ],\n \"frontendMenus\": [\n {\n \"code\": \"book_catalog\",\n \"name\": \"图书目录\",\n \"path\": \"/books\",\n \"pageCode\": \"book_catalog_page\",\n \"requiresLogin\": false,\n \"visibleRoles\": [],\n \"dataScope\": \"PUBLIC\"\n },\n {\n \"code\": \"my_borrows\",\n \"name\": \"我的借阅\",\n \"path\": \"/my/borrows\",\n \"pageCode\": \"my_borrows_page\",\n \"requiresLogin\": true,\n \"visibleRoles\": [\"reader\"],\n \"dataScope\": \"CURRENT_USER\"\n },\n {\n \"code\": \"my_reservations\",\n \"name\": \"我的预约\",\n \"path\": \"/my/reservations\",\n \"pageCode\": \"my_reservations_page\",\n \"requiresLogin\": true,\n \"visibleRoles\": [\"reader\"],\n \"dataScope\": \"CURRENT_USER\"\n },\n {\n \"code\": \"my_fines\",\n \"name\": \"我的罚款\",\n \"path\": \"/my/fines\",\n \"pageCode\": \"my_fines_page\",\n \"requiresLogin\": true,\n \"visibleRoles\": [\"reader\"],\n \"dataScope\": \"CURRENT_USER\"\n },\n {\n \"code\": \"reader_profile\",\n \"name\": \"个人信息\",\n \"path\": \"/my/profile\",\n \"pageCode\": \"reader_profile_page\",\n \"requiresLogin\": true,\n \"visibleRoles\": [\"reader\"],\n \"dataScope\": \"CURRENT_USER\"\n }\n ],\n \"frontendPages\": [\n {\n \"code\": \"book_catalog_page\",\n \"name\": \"图书目录\",\n \"menuCode\": \"book_catalog\",\n \"path\": \"/books\",\n \"pageType\": \"list\",\n \"tableName\": \"book_info\"\n },\n {\n \"code\": \"my_borrows_page\",\n \"name\": \"我的借阅\",\n \"menuCode\": \"my_borrows\",\n \"path\": \"/my/borrows\",\n \"pageType\": \"current_user_list\",\n \"tableName\": \"borrow_record\"\n },\n {\n \"code\": \"my_reservations_page\",\n \"name\": \"我的预约\",\n \"menuCode\": \"my_reservations\",\n \"path\": \"/my/reservations\",\n \"pageType\": \"current_user_list\",\n \"tableName\": \"reservation\"\n },\n {\n \"code\": \"my_fines_page\",\n \"name\": \"我的罚款\",\n \"menuCode\": \"my_fines\",\n \"path\": \"/my/fines\",\n \"pageType\": \"current_user_list\",\n \"tableName\": \"fine_record\"\n },\n {\n \"code\": \"reader_profile_page\",\n \"name\": \"个人信息\",\n \"menuCode\": \"reader_profile\",\n \"path\": \"/my/profile\",\n \"pageType\": \"form\",\n \"tableName\": \"reader\"\n }\n ],\n \"adminMenus\": [\n {\n \"code\": \"book_admin\",\n \"name\": \"图书管理\",\n \"path\": \"/admin/books\",\n \"pageCode\": \"book_admin_page\",\n \"tableName\": \"book_info\",\n \"pageType\": \"list\",\n \"requiresLogin\": true,\n \"visibleRoles\": [\"admin\"],\n \"dataScope\": \"ROLE\"\n },\n {\n \"code\": \"borrow_admin\",\n \"name\": \"借阅审核\",\n \"path\": \"/admin/borrows\",\n \"pageCode\": \"borrow_admin_page\",\n \"tableName\": \"borrow_record\",\n \"pageType\": \"list\",\n \"requiresLogin\": true,\n \"visibleRoles\": [\"admin\"],\n \"dataScope\": \"ROLE\"\n },\n {\n \"code\": \"reader_admin\",\n \"name\": \"读者管理\",\n \"path\": \"/admin/readers\",\n \"pageCode\": \"reader_admin_page\",\n \"tableName\": \"reader\",\n \"pageType\": \"list\",\n \"requiresLogin\": true,\n \"visibleRoles\": [\"admin\"],\n \"dataScope\": \"ROLE\"\n },\n {\n \"code\": \"fine_admin\",\n \"name\": \"罚款管理\",\n \"path\": \"/admin/fines\",\n \"pageCode\": \"fine_admin_page\",\n \"tableName\": \"fine_record\",\n \"pageType\": \"list\",\n \"requiresLogin\": true,\n \"visibleRoles\": [\"admin\"],\n \"dataScope\": \"ROLE\"\n },\n {\n \"code\": \"admin_profile\",\n \"name\": \"管理员资料\",\n \"path\": \"/admin/profile\",\n \"pageCode\": \"admin_profile_page\",\n \"tableName\": \"admin\",\n \"pageType\": \"form\",\n \"requiresLogin\": true,\n \"visibleRoles\": [\"admin\"],\n \"dataScope\": \"CURRENT_USER\"\n }\n ],\n \"adminHomeDashboard\": {\n \"title\": \"运营总览\",\n \"description\": \"核心业务数据\",\n \"metrics\": [\n {\n \"label\": \"总图书数\",\n \"value\": null,\n \"semantic\": \"content\"\n },\n {\n \"label\": \"总读者数\",\n \"value\": null,\n \"semantic\": \"user\"\n },\n {\n \"label\": \"当前借出\",\n \"value\": null,\n \"semantic\": \"order\"\n },\n {\n \"label\": \"罚款总额\",\n \"value\": null,\n \"semantic\": \"money\"\n }\n ],\n \"charts\": [\n {\n \"title\": \"借阅趋势\",\n \"type\": \"line\",\n \"dataSource\": \"borrow_record\",\n \"xField\": \"date\",\n \"yField\": \"count\",\n \"semantic\": \"order\"\n },\n {\n \"title\": \"图书分类分布\",\n \"type\": \"pie\",\n \"dataSource\": \"book_info\",\n \"categoryField\": \"category\",\n \"valueField\": \"count\",\n \"semantic\": \"content\"\n }\n ]\n }\n}', '1', NULL, 34257, '2026-07-14 15:45:38');
INSERT INTO `factory_ai_stage_output` VALUES (104, 101, 101, 100, 'flow_config', '{\"mode\":\"generate\",\"projectName\":\"图书管理系统\",\"projectDescription\":\"项目定位:一个面向高校图书馆的图书管理系统,供读者在线借书、还书、预约,管理员进行图书管理和借阅审核。\\n\\n角色管理员、读者。\\n\\n核心流程读者检索图书→提交借书申请→管理员审核通过并发放图书→读者还书或续借→管理员确认归还→超期则系统自动生成罚款→读者在线缴纳罚款。\\n\\n关键规则每位读者最多同时借阅5本书借阅期限为30天可续借1次续借期15天超期罚款0.1元/天预约图书保留2天逾期未取自动取消。\\n\\n异常边界库存为0时禁止借出同一读者重复提交同一本书的借书申请时提示“已借出或预约中”状态为“已借出”或“逾期”时无法再次借书预约超时自动释放库存支付罚款时若余额不足则失败。\",\"industryTemplate\":\"\",\"stylePreset\":\"dark-tech\",\"extraRequirements\":\"\",\"confirmedAppBlueprint\":{\"adminHomeDashboard\":{\"charts\":[{\"filters\":[],\"metrics\":[],\"semantic\":\"order\",\"title\":\"借阅趋势\",\"type\":\"line\"},{\"filters\":[],\"metrics\":[],\"semantic\":\"content\",\"title\":\"图书分类分布\",\"type\":\"pie\"}],\"description\":\"核心业务数据\",\"metrics\":[{\"filters\":[],\"semantic\":\"content\"},{\"filters\":[],\"semantic\":\"user\"},{\"filters\":[],\"semantic\":\"order\"},{\"filters\":[],\"semantic\":\"money\"}],\"title\":\"运营总览\"},\"adminMenus\":[{\"code\":\"book_admin\",\"dataScope\":\"ROLE\",\"name\":\"图书管理\",\"pageCode\":\"book_admin_page\",\"pageType\":\"list\",\"path\":\"/admin/books\",\"requiresLogin\":true,\"tableName\":\"book_info\",\"visibleRoles\":[\"admin\"]},{\"code\":\"borrow_admin\",\"dataScope\":\"ROLE\",\"name\":\"借阅审核\",\"pageCode\":\"borrow_admin_page\",\"pageType\":\"list\",\"path\":\"/admin/borrows\",\"requiresLogin\":true,\"tableName\":\"borrow_record\",\"visibleRoles\":[\"admin\"]},{\"code\":\"reader_admin\",\"dataScope\":\"ROLE\",\"name\":\"读者管理\",\"pageCode\":\"reader_admin_page\",\"pageType\":\"list\",\"path\":\"/admin/readers\",\"requiresLogin\":true,\"tableName\":\"reader\",\"visibleRoles\":[\"admin\"]},{\"code\":\"fine_admin\",\"dataScope\":\"ROLE\",\"name\":\"罚款管理\",\"pageCode\":\"fine_admin_page\",\"pageType\":\"list\",\"path\":\"/admin/fines\",\"requiresLogin\":true,\"tableName\":\"fine_record\",\"visibleRoles\":[\"admin\"]},{\"code\":\"admin_profile\",\"dataScope\":\"CURRENT_USER\",\"name\":\"管理员资料\",\"pageCode\":\"admin_profile_page\",\"pageType\":\"form\",\"path\":\"/admin/profile\",\"requiresLogin\":true,\"tableName\":\"admin\",\"visibleRoles\":[\"admin\"]}],\"frontendMenus\":[{\"code\":\"book_catalog\",\"dataScope\":\"PUBLIC\",\"name\":\"图书目录\",\"pageCode\":\"book_catalog_page\",\"pageType\":\"\",\"path\":\"/books\",\"requiresLogin\":false,\"tableName\":\"\",\"visibleRoles\":[]},{\"code\":\"my_borrows\",\"dataScope\":\"CURRENT_USER\",\"name\":\"我的借阅\",\"pageCode\":\"my_borrows_page\",\"pageType\":\"\",\"path\":\"/my/borrows\",\"requiresLogin\":true,\"tableName\":\"\",\"visibleRoles\":[\"reader\"]},{\"code\":\"my_reservations\",\"dataScope\":\"CURRENT_USER\",\"name\":\"我的预约\",\"pageCode\":\"my_reservations_page\",\"pageType\":\"\",\"path\":\"/my/reservations\",\"requiresLogin\":true,\"tableName\":\"\",\"visibleRoles\":[\"reader\"]},{\"code\":\"my_fines\",\"dataScope\":\"CURRENT_USER\",\"name\":\"我的罚款\",\"pageCode\":\"my_fines_page\",\"pageType\":\"\",\"path\":\"/my/fines\",\"requiresLogin\":true,\"tableName\":\"\",\"visibleRoles\":[\"reader\"]},{\"code\":\"reader_profile\",\"dataScope\":\"CURRENT_USER\",\"name\":\"个人信息\",\"pageCode\":\"reader_profile_page\",\"pageType\":\"\",\"path\":\"/my/profile\",\"requiresLogin\":true,\"tableName\":\"\",\"visibleRoles\":[\"reader\"]}],\"frontendPages\":[{\"code\":\"book_catalog_page\",\"menuCode\":\"book_catalog\",\"name\":\"图书目录\",\"pageType\":\"list\",\"parentPageCode\":\"\",\"path\":\"/books\",\"tableName\":\"book_info\"},{\"code\":\"my_borrows_page\",\"menuCode\":\"my_borrows\",\"name\":\"我的借阅\",\"pageType\":\"current_user_list\",\"parentPageCode\":\"\",\"path\":\"/my/borrows\",\"tableName\":\"borrow_record\"},{\"code\":\"my_reservations_page\",\"menuCode\":\"my_reservations\",\"name\":\"我的预约\",\"pageType\":\"current_user_list\",\"parentPageCode\":\"\",\"path\":\"/my/reservations\",\"tableName\":\"reservation\"},{\"code\":\"my_fines_page\",\"menuCode\":\"my_fines\",\"name\":\"我的罚款\",\"pageType\":\"current_user_list\",\"parentPageCode\":\"\",\"path\":\"/my/fines\",\"tableName\":\"fine_record\"},{\"code\":\"reader_profile_page\",\"menuCode\":\"reader_profile\",\"name\":\"个人信息\",\"pageType\":\"form\",\"parentPageCode\":\"\",\"path\":\"/my/profile\",\"tableName\":\"reader\"}],\"roles\":[{\"code\":\"admin\",\"description\":\"系统管理员,负责图书管理、借阅审核等\",\"name\":\"管理员\"},{\"code\":\"reader\",\"description\":\"普通读者,可在线借书、预约、缴纳罚款\",\"name\":\"读者\"}]}}', '{\n \"version\": \"1.0\",\n \"code\": \"borrow_flow\",\n \"name\": \"借阅管理流程\",\n \"mainTable\": \"borrow_record\",\n \"statusField\": \"status\",\n \"notFoundMessage\": \"借阅记录不存在\",\n \"states\": [\n {\"code\": \"pending\", \"label\": \"待审核\"},\n {\"code\": \"borrowing\", \"label\": \"借阅中\"},\n {\"code\": \"overdue\", \"label\": \"逾期\"},\n {\"code\": \"returning\", \"label\": \"归还中\"},\n {\"code\": \"returned_with_fine\", \"label\": \"待缴费归还\"},\n {\"code\": \"returned\", \"label\": \"已归还\"},\n {\"code\": \"cancelled\", \"label\": \"已取消\"}\n ],\n \"actions\": [\n {\n \"code\": \"approve\",\n \"name\": \"审核通过\",\n \"from\": \"pending\",\n \"to\": \"borrowing\",\n \"actor\": \"admin\",\n \"method\": \"POST\",\n \"path\": \"/borrow-record/approve\",\n \"invalidStateMessage\": \"当前状态不能审核\",\n \"successMessage\": \"审核成功,图书已借出\",\n \"audit\": {\"userField\": \"approve_user_id\", \"timeField\": \"approve_time\"},\n \"effects\": [\n {\n \"type\": \"decrease\",\n \"table\": \"book\",\n \"relationField\": \"book_id\",\n \"field\": \"stock\",\n \"amount\": \"1\",\n \"min\": \"0\",\n \"notFoundMessage\": \"图书不存在\",\n \"errorMessage\": \"图书库存不足\"\n }\n ],\n \"button\": {\"scope\": \"admin\", \"pageCode\": \"borrow_admin_page\", \"slot\": \"list.rowActions\", \"type\": \"success\", \"confirm\": \"确认审核通过吗?\", \"order\": 10}\n },\n {\n \"code\": \"reject\",\n \"name\": \"审核拒绝\",\n \"from\": \"pending\",\n \"to\": \"cancelled\",\n \"actor\": \"admin\",\n \"method\": \"POST\",\n \"path\": \"/borrow-record/reject\",\n \"invalidStateMessage\": \"当前状态不能拒绝\",\n \"successMessage\": \"已拒绝借书申请\",\n \"audit\": {\"userField\": \"approve_user_id\", \"timeField\": \"approve_time\"},\n \"effects\": [],\n \"button\": {\"scope\": \"admin\", \"pageCode\": \"borrow_admin_page\", \"slot\": \"list.rowActions\", \"type\": \"danger\", \"confirm\": \"确认拒绝吗?\", \"order\": 20}\n },\n {\n \"code\": \"return_apply\",\n \"name\": \"申请还书\",\n \"from\": \"borrowing\",\n \"to\": \"returning\",\n \"actor\": \"reader\",\n \"method\": \"POST\",\n \"path\": \"/borrow-record/return-apply\",\n \"invalidStateMessage\": \"当前借阅记录无法申请还书\",\n \"successMessage\": \"还书申请已提交,请等待管理员确认\",\n \"audit\": {\"userField\": \"return_applicant_id\", \"timeField\": \"return_apply_time\"},\n \"effects\": [],\n \"button\": {\"scope\": \"reader\", \"pageCode\": \"my_borrows_page\", \"slot\": \"list.rowActions\", \"type\": \"primary\", \"confirm\": \"确认申请还书吗?\", \"order\": 10}\n },\n {\n \"code\": \"return_apply_overdue\",\n \"name\": \"逾期还书申请\",\n \"from\": \"overdue\",\n \"to\": \"returning\",\n \"actor\": \"reader\",\n \"method\": \"POST\",\n \"path\": \"/borrow-record/return-apply-overdue\",\n \"invalidStateMessage\": \"当前记录无法申请还书\",\n \"successMessage\": \"还书申请已提交\",\n \"audit\": {\"userField\": \"return_applicant_id\", \"timeField\": \"return_apply_time\"},\n \"effects\": [],\n \"button\": {\"scope\": \"reader\", \"pageCode\": \"my_borrows_page\", \"slot\": \"list.rowActions\", \"type\": \"primary\", \"confirm\": \"确认申请还书吗?\", \"order\": 20}\n },\n {\n \"code\": \"confirm_return_normal\",\n \"name\": \"确认归还\",\n \"from\": \"returning\",\n \"to\": \"returned\",\n \"actor\": \"admin\",\n \"method\": \"POST\",\n \"path\": \"/borrow-record/confirm-return\",\n \"invalidStateMessage\": \"当前状态不能确认归还\",\n \"successMessage\": \"归还确认成功\",\n \"audit\": {\"userField\": \"confirm_return_user_id\", \"timeField\": \"confirm_return_time\"},\n \"effects\": [],\n \"button\": {\"scope\": \"admin\", \"pageCode\": \"borrow_admin_page\", \"slot\": \"list.rowActions\", \"type\": \"success\", \"confirm\": \"确认归还吗?\", \"order\": 30}\n },\n {\n \"code\": \"confirm_return_overdue\",\n \"name\": \"确认归还(超期)\",\n \"from\": \"returning\",\n \"to\": \"returned_with_fine\",\n \"actor\": \"admin\",\n \"method\": \"POST\",\n \"path\": \"/borrow-record/confirm-return-overdue\",\n \"invalidStateMessage\": \"当前状态不能确认归还\",\n \"successMessage\": \"归还确认成功,已生成罚款记录\",\n \"audit\": {\"userField\": \"confirm_return_user_id\", \"timeField\": \"confirm_return_time\"},\n \"effects\": [\n {\n \"type\": \"create_record\",\n \"table\": \"fine_record\",\n \"values\": {\n \"borrow_record_id\": \"record.id\",\n \"user_id\": \"record.user_id\",\n \"amount\": \"0.1\",\n \"status\": \"unpaid\",\n \"created_at\": \"now\"\n },\n \"notFoundMessage\": \"\",\n \"errorMessage\": \"罚款记录创建失败\"\n }\n ],\n \"button\": {\"scope\": \"admin\", \"pageCode\": \"borrow_admin_page\", \"slot\": \"list.rowActions\", \"type\": \"warning\", \"confirm\": \"该记录已超期,确认归还并生成罚款吗?\", \"order\": 40}\n },\n {\n \"code\": \"pay_fine\",\n \"name\": \"缴纳罚款\",\n \"from\": \"returned_with_fine\",\n \"to\": \"returned\",\n \"actor\": \"reader\",\n \"method\": \"POST\",\n \"path\": \"/borrow-record/pay-fine\",\n \"invalidStateMessage\": \"无需缴纳罚款\",\n \"successMessage\": \"罚款缴纳成功\",\n \"audit\": {\"userField\": \"pay_fine_user_id\", \"timeField\": \"pay_fine_time\"},\n \"effects\": [\n {\n \"type\": \"update_related\",\n \"table\": \"fine_record\",\n \"relationField\": \"borrow_record_id\",\n \"values\": {\n \"status\": \"paid\",\n \"pay_time\": \"now\"\n },\n \"notFoundMessage\": \"罚款记录不存在\",\n \"errorMessage\": \"更新罚款状态失败\"\n }\n ],\n \"button\": {\"scope\": \"reader\", \"pageCode\": \"my_borrows_page\", \"slot\": \"list.rowActions\", \"type\": \"primary\", \"confirm\": \"确认缴纳罚款吗?\", \"order\": 30}\n },\n {\n \"code\": \"mark_overdue\",\n \"name\": \"标记逾期\",\n \"from\": \"borrowing\",\n \"to\": \"overdue\",\n \"actor\": \"admin\",\n \"method\": \"POST\",\n \"path\": \"/borrow-record/mark-overdue\",\n \"invalidStateMessage\": \"当前状态不能标记逾期\",\n \"successMessage\": \"已标记为逾期\",\n \"audit\": {\"userField\": \"mark_overdue_user_id\", \"timeField\": \"mark_overdue_time\"},\n \"effects\": [],\n \"button\": {\"scope\": \"admin\", \"pageCode\": \"borrow_admin_page\", \"slot\": \"list.rowActions\", \"type\": \"warning\", \"confirm\": \"确认标记逾期吗?\", \"order\": 50}\n }\n ],\n \"metrics\": [\n {\"code\": \"borrowing_count\", \"name\": \"借阅中数量\", \"table\": \"borrow_record\", \"aggregate\": \"count\", \"field\": \"id\", \"status\": \"borrowing\", \"unit\": \"条\"},\n {\"code\": \"overdue_count\", \"name\": \"逾期数量\", \"table\": \"borrow_record\", \"aggregate\": \"count\", \"field\": \"id\", \"status\": \"overdue\", \"unit\": \"条\"},\n {\"code\": \"returned_count\", \"name\": \"已归还数量\", \"table\": \"borrow_record\", \"aggregate\": \"count\", \"field\": \"id\", \"status\": \"returned\", \"unit\": \"条\"},\n {\"code\": \"pending_count\", \"name\": \"待审核数量\", \"table\": \"borrow_record\", \"aggregate\": \"count\", \"field\": \"id\", \"status\": \"pending\", \"unit\": \"条\"}\n ]\n}', '1', NULL, 94731, '2026-07-14 15:47:13');
INSERT INTO `factory_ai_stage_output` VALUES (105, 101, 101, 100, 'database', '{\"mode\":\"generate\",\"projectName\":\"图书管理系统\",\"projectDescription\":\"项目定位:一个面向高校图书馆的图书管理系统,供读者在线借书、还书、预约,管理员进行图书管理和借阅审核。\\n\\n角色管理员、读者。\\n\\n核心流程读者检索图书→提交借书申请→管理员审核通过并发放图书→读者还书或续借→管理员确认归还→超期则系统自动生成罚款→读者在线缴纳罚款。\\n\\n关键规则每位读者最多同时借阅5本书借阅期限为30天可续借1次续借期15天超期罚款0.1元/天预约图书保留2天逾期未取自动取消。\\n\\n异常边界库存为0时禁止借出同一读者重复提交同一本书的借书申请时提示“已借出或预约中”状态为“已借出”或“逾期”时无法再次借书预约超时自动释放库存支付罚款时若余额不足则失败。\",\"industryTemplate\":\"\",\"stylePreset\":\"dark-tech\",\"extraRequirements\":\"\",\"confirmedAppBlueprint\":{\"adminHomeDashboard\":{\"charts\":[{\"filters\":[],\"metrics\":[],\"semantic\":\"order\",\"title\":\"借阅趋势\",\"type\":\"line\"},{\"filters\":[],\"metrics\":[],\"semantic\":\"content\",\"title\":\"图书分类分布\",\"type\":\"pie\"}],\"description\":\"核心业务数据\",\"metrics\":[{\"filters\":[],\"semantic\":\"content\"},{\"filters\":[],\"semantic\":\"user\"},{\"filters\":[],\"semantic\":\"order\"},{\"filters\":[],\"semantic\":\"money\"}],\"title\":\"运营总览\"},\"adminMenus\":[{\"code\":\"book_admin\",\"dataScope\":\"ROLE\",\"name\":\"图书管理\",\"pageCode\":\"book_admin_page\",\"pageType\":\"list\",\"path\":\"/admin/books\",\"requiresLogin\":true,\"tableName\":\"book_info\",\"visibleRoles\":[\"admin\"]},{\"code\":\"borrow_admin\",\"dataScope\":\"ROLE\",\"name\":\"借阅审核\",\"pageCode\":\"borrow_admin_page\",\"pageType\":\"list\",\"path\":\"/admin/borrows\",\"requiresLogin\":true,\"tableName\":\"borrow_record\",\"visibleRoles\":[\"admin\"]},{\"code\":\"reader_admin\",\"dataScope\":\"ROLE\",\"name\":\"读者管理\",\"pageCode\":\"reader_admin_page\",\"pageType\":\"list\",\"path\":\"/admin/readers\",\"requiresLogin\":true,\"tableName\":\"reader\",\"visibleRoles\":[\"admin\"]},{\"code\":\"fine_admin\",\"dataScope\":\"ROLE\",\"name\":\"罚款管理\",\"pageCode\":\"fine_admin_page\",\"pageType\":\"list\",\"path\":\"/admin/fines\",\"requiresLogin\":true,\"tableName\":\"fine_record\",\"visibleRoles\":[\"admin\"]},{\"code\":\"admin_profile\",\"dataScope\":\"CURRENT_USER\",\"name\":\"管理员资料\",\"pageCode\":\"admin_profile_page\",\"pageType\":\"form\",\"path\":\"/admin/profile\",\"requiresLogin\":true,\"tableName\":\"admin\",\"visibleRoles\":[\"admin\"]}],\"frontendMenus\":[{\"code\":\"book_catalog\",\"dataScope\":\"PUBLIC\",\"name\":\"图书目录\",\"pageCode\":\"book_catalog_page\",\"pageType\":\"\",\"path\":\"/books\",\"requiresLogin\":false,\"tableName\":\"\",\"visibleRoles\":[]},{\"code\":\"my_borrows\",\"dataScope\":\"CURRENT_USER\",\"name\":\"我的借阅\",\"pageCode\":\"my_borrows_page\",\"pageType\":\"\",\"path\":\"/my/borrows\",\"requiresLogin\":true,\"tableName\":\"\",\"visibleRoles\":[\"reader\"]},{\"code\":\"my_reservations\",\"dataScope\":\"CURRENT_USER\",\"name\":\"我的预约\",\"pageCode\":\"my_reservations_page\",\"pageType\":\"\",\"path\":\"/my/reservations\",\"requiresLogin\":true,\"tableName\":\"\",\"visibleRoles\":[\"reader\"]},{\"code\":\"my_fines\",\"dataScope\":\"CURRENT_USER\",\"name\":\"我的罚款\",\"pageCode\":\"my_fines_page\",\"pageType\":\"\",\"path\":\"/my/fines\",\"requiresLogin\":true,\"tableName\":\"\",\"visibleRoles\":[\"reader\"]},{\"code\":\"reader_profile\",\"dataScope\":\"CURRENT_USER\",\"name\":\"个人信息\",\"pageCode\":\"reader_profile_page\",\"pageType\":\"\",\"path\":\"/my/profile\",\"requiresLogin\":true,\"tableName\":\"\",\"visibleRoles\":[\"reader\"]}],\"frontendPages\":[{\"code\":\"book_catalog_page\",\"menuCode\":\"book_catalog\",\"name\":\"图书目录\",\"pageType\":\"list\",\"parentPageCode\":\"\",\"path\":\"/books\",\"tableName\":\"book_info\"},{\"code\":\"my_borrows_page\",\"menuCode\":\"my_borrows\",\"name\":\"我的借阅\",\"pageType\":\"current_user_list\",\"parentPageCode\":\"\",\"path\":\"/my/borrows\",\"tableName\":\"borrow_record\"},{\"code\":\"my_reservations_page\",\"menuCode\":\"my_reservations\",\"name\":\"我的预约\",\"pageType\":\"current_user_list\",\"parentPageCode\":\"\",\"path\":\"/my/reservations\",\"tableName\":\"reservation\"},{\"code\":\"my_fines_page\",\"menuCode\":\"my_fines\",\"name\":\"我的罚款\",\"pageType\":\"current_user_list\",\"parentPageCode\":\"\",\"path\":\"/my/fines\",\"tableName\":\"fine_record\"},{\"code\":\"reader_profile_page\",\"menuCode\":\"reader_profile\",\"name\":\"个人信息\",\"pageType\":\"form\",\"parentPageCode\":\"\",\"path\":\"/my/profile\",\"tableName\":\"reader\"}],\"roles\":[{\"code\":\"admin\",\"description\":\"系统管理员,负责图书管理、借阅审核等\",\"name\":\"管理员\"},{\"code\":\"reader\",\"description\":\"普通读者,可在线借书、预约、缴纳罚款\",\"name\":\"读者\"}]},\"flowConfig\":{\"actions\":[{\"actor\":\"admin\",\"audit\":{\"timeField\":\"approve_time\",\"userField\":\"approve_user_id\"},\"button\":{\"confirm\":\"确认审核通过吗?\",\"order\":10,\"pageCode\":\"borrow_admin_page\",\"scope\":\"admin\",\"slot\":\"list.rowActions\",\"type\":\"success\"},\"code\":\"approve\",\"effects\":[{\"amount\":\"1\",\"errorMessage\":\"图书库存不足\",\"field\":\"stock\",\"min\":\"0\",\"notFoundMessage\":\"图书不存在\",\"relationField\":\"book_id\",\"table\":\"book\",\"type\":\"decrease\",\"values\":{}}],\"from\":\"pending\",\"invalidStateMessage\":\"当前状态不能审核\",\"method\":\"POST\",\"name\":\"审核通过\",\"path\":\"/borrow-record/approve\",\"successMessage\":\"审核成功,图书已借出\",\"to\":\"borrowing\"},{\"actor\":\"admin\",\"audit\":{\"timeField\":\"approve_time\",\"userField\":\"approve_user_id\"},\"button\":{\"confirm\":\"确认拒绝吗?\",\"order\":20,\"pageCode\":\"borrow_admin_page\",\"scope\":\"admin\",\"slot\":\"list.rowActions\",\"type\":\"danger\"},\"code\":\"reject\",\"effects\":[],\"from\":\"pending\",\"invalidStateMessage\":\"当前状态不能拒绝\",\"method\":\"POST\",\"name\":\"审核拒绝\",\"path\":\"/borrow-record/reject\",\"successMessage\":\"已拒绝借书申请\",\"to\":\"cancelled\"},{\"actor\":\"reader\",\"audit\":{\"timeField\":\"return_apply_time\",\"userField\":\"return_applicant_id\"},\"button\":{\"confirm\":\"确认申请还书吗?\",\"order\":10,\"pageCode\":\"my_borrows_page\",\"scope\":\"reader\",\"slot\":\"list.rowActions\",\"type\":\"primary\"},\"code\":\"return_apply\",\"effects\":[],\"from\":\"borrowing\",\"invalidStateMessage\":\"当前借阅记录无法申请还书\",\"method\":\"POST\",\"name\":\"申请还书\",\"path\":\"/borrow-record/return-apply\",\"successMessage\":\"还书申请已提交,请等待管理员确认\",\"to\":\"returning\"},{\"actor\":\"reader\",\"audit\":{\"timeField\":\"return_apply_time\",\"userField\":\"return_applicant_id\"},\"button\":{\"confirm\":\"确认申请还书吗?\",\"order\":20,\"pageCode\":\"my_borrows_page\",\"scope\":\"reader\",\"slot\":\"list.rowActions\",\"type\":\"primary\"},\"code\":\"return_apply_overdue\",\"effects\":[],\"from\":\"overdue\",\"invalidStateMessage\":\"当前记录无法申请还书\",\"method\":\"POST\",\"name\":\"逾期还书申请\",\"path\":\"/borrow-record/return-apply-overdue\",\"successMessage\":\"还书申请已提交\",\"to\":\"returning\"},{\"actor\":\"admin\",\"audit\":{\"timeField\":\"confirm_return_time\",\"userField\":\"confirm_return_user_id\"},\"button\":{\"confirm\":\"确认归还吗?\",\"order\":30,\"pageCode\":\"borrow_admin_page\",\"scope\":\"admin\",\"slot\":\"list.rowActions\",\"type\":\"success\"},\"code\":\"confirm_return_normal\",\"effects\":[],\"from\":\"returning\",\"invalidStateMessage\":\"当前状态不能确认归还\",\"method\":\"POST\",\"name\":\"确认归还\",\"path\":\"/borrow-record/confirm-return\",\"successMessage\":\"归还确认成功\",\"to\":\"returned\"},{\"actor\":\"admin\",\"audit\":{\"timeField\":\"confirm_return_time\",\"userField\":\"confirm_return_user_id\"},\"button\":{\"confirm\":\"该记录已超期,确认归还并生成罚款吗?\",\"order\":40,\"pageCode\":\"borrow_admin_page\",\"scope\":\"admin\",\"slot\":\"list.rowActions\",\"type\":\"warning\"},\"code\":\"confirm_return_overdue\",\"effects\":[{\"amount\":\"1\",\"errorMessage\":\"罚款记录创建失败\",\"min\":\"0\",\"notFoundMessage\":\"\",\"table\":\"fine_record\",\"type\":\"create_record\",\"values\":{\"amount\":\"0.1\",\"user_id\":\"record.user_id\",\"created_at\":\"now\",\"borrow_record_id\":\"record.id\",\"status\":\"unpaid\"}}],\"from\":\"returning\",\"invalidStateMessage\":\"当前状态不能确认归还\",\"method\":\"POST\",\"name\":\"确认归还(超期)\",\"path\":\"/borrow-record/confirm-return-overdue\",\"successMessage\":\"归还确认成功,已生成罚款记录\",\"to\":\"returned_with_fine\"},{\"actor\":\"reader\",\"audit\":{\"timeField\":\"pay_fine_time\",\"userField\":\"pay_fine_user_id\"},\"button\":{\"confirm\":\"确认缴纳罚款吗?\",\"order\":30,\"pageCode\":\"my_borrows_page\",\"scope\":\"reader\",\"slot\":\"list.rowActions\",\"type\":\"primary\"},\"code\":\"pay_fine\",\"effects\":[{\"amount\":\"1\",\"errorMessage\":\"更新罚款状态失败\",\"min\":\"0\",\"notFoundMessage\":\"罚款记录不存在\",\"relationField\":\"borrow_record_id\",\"table\":\"fine_record\",\"type\":\"update_related\",\"values\":{\"status\":\"paid\",\"pay_time\":\"now\"}}],\"from\":\"returned_with_fine\",\"invalidStateMessage\":\"无需缴纳罚款\",\"method\":\"POST\",\"name\":\"缴纳罚款\",\"path\":\"/borrow-record/pay-fine\",\"successMessage\":\"罚款缴纳成功\",\"to\":\"returned\"},{\"actor\":\"admin\",\"audit\":{\"timeField\":\"mark_overdue_time\",\"userField\":\"mark_overdue_user_id\"},\"button\":{\"confirm\":\"确认标记逾期吗?\",\"order\":50,\"pageCode\":\"borrow_admin_page\",\"scope\":\"admin\",\"slot\":\"list.rowActions\",\"type\":\"warning\"},\"code\":\"mark_overdue\",\"effects\":[],\"from\":\"borrowing\",\"invalidStateMessage\":\"当前状态不能标记逾期\",\"method\":\"POST\",\"name\":\"标记逾期\",\"path\":\"/borrow-record/mark-overdue\",\"successMessage\":\"已标记为逾期\",\"to\":\"overdue\"}],\"code\":\"borrow_flow\",\"mainTable\":\"borrow_record\",\"metrics\":[{\"aggregate\":\"count\",\"code\":\"borrowing_count\",\"field\":\"id\",\"name\":\"借阅中数量\",\"status\":\"borrowing\",\"table\":\"borrow_record\",\"unit\":\"条\"},{\"aggregate\":\"count\",\"code\":\"overdue_count\",\"field\":\"id\",\"name\":\"逾期数量\",\"status\":\"overdue\",\"table\":\"borrow_record\",\"unit\":\"条\"},{\"aggregate\":\"count\",\"code\":\"returned_count\",\"field\":\"id\",\"name\":\"已归还数量\",\"status\":\"returned\",\"table\":\"borrow_record\",\"unit\":\"条\"},{\"aggregate\":\"count\",\"code\":\"pending_count\",\"field\":\"id\",\"name\":\"待审核数量\",\"status\":\"pending\",\"table\":\"borrow_record\",\"unit\":\"条\"}],\"name\":\"借阅管理流程\",\"notFoundMessage\":\"借阅记录不存在\",\"states\":[{\"code\":\"pending\",\"label\":\"待审核\"},{\"code\":\"borrowing\",\"label\":\"借阅中\"},{\"code\":\"overdue\",\"label\":\"逾期\"},{\"code\":\"returning\",\"label\":\"归还中\"},{\"code\":\"returned_with_fine\",\"label\":\"待缴费归还\"},{\"code\":\"returned\",\"label\":\"已归还\"},{\"code\":\"cancelled\",\"label\":\"已取消\"}],\"statusField\":\"status\",\"version\":\"1.0\"},\"compiledFlowContract\":{\"acceptanceScenarios\":[],\"actions\":[{\"actor\":\"admin\",\"code\":\"approve\",\"name\":\"审核通过\",\"ownerObject\":\"borrow_record\",\"ownerTable\":\"borrow_record\",\"preconditions\":[],\"quantityEffects\":[{\"actionCode\":\"approve\",\"amount\":\"1\",\"effectType\":\"decrease\",\"objectCode\":\"book\",\"quantityField\":\"stock\",\"tableName\":\"book\"}],\"recordEffects\":[],\"required\":true,\"stateTransitions\":[{\"actionCode\":\"approve\",\"fromState\":\"pending\",\"toState\":\"borrowing\"}]},{\"actor\":\"admin\",\"code\":\"reject\",\"name\":\"审核拒绝\",\"ownerObject\":\"borrow_record\",\"ownerTable\":\"borrow_record\",\"preconditions\":[],\"quantityEffects\":[],\"recordEffects\":[],\"required\":true,\"stateTransitions\":[{\"actionCode\":\"reject\",\"fromState\":\"pending\",\"toState\":\"cancelled\"}]},{\"actor\":\"reader\",\"code\":\"return_apply\",\"name\":\"申请还书\",\"ownerObject\":\"borrow_record\",\"ownerTable\":\"borrow_record\",\"preconditions\":[],\"quantityEffects\":[],\"recordEffects\":[],\"required\":true,\"stateTransitions\":[{\"actionCode\":\"return_apply\",\"fromState\":\"borrowing\",\"toState\":\"returning\"}]},{\"actor\":\"reader\",\"code\":\"return_apply_overdue\",\"name\":\"逾期还书申请\",\"ownerObject\":\"borrow_record\",\"ownerTable\":\"borrow_record\",\"preconditions\":[],\"quantityEffects\":[],\"recordEffects\":[],\"required\":true,\"stateTransitions\":[{\"actionCode\":\"return_apply_overdue\",\"fromState\":\"overdue\",\"toState\":\"returning\"}]},{\"actor\":\"admin\",\"code\":\"confirm_return_normal\",\"name\":\"确认归还\",\"ownerObject\":\"borrow_record\",\"ownerTable\":\"borrow_record\",\"preconditions\":[],\"quantityEffects\":[],\"recordEffects\":[],\"required\":true,\"stateTransitions\":[{\"actionCode\":\"confirm_return_normal\",\"fromState\":\"returning\",\"toState\":\"returned\"}]},{\"actor\":\"admin\",\"code\":\"confirm_return_overdue\",\"name\":\"确认归还(超期)\",\"ownerObject\":\"borrow_record\",\"ownerTable\":\"borrow_record\",\"preconditions\":[],\"quantityEffects\":[],\"recordEffects\":[],\"required\":true,\"stateTransitions\":[{\"actionCode\":\"confirm_return_overdue\",\"fromState\":\"returning\",\"toState\":\"returned_with_fine\"}]},{\"actor\":\"reader\",\"code\":\"pay_fine\",\"name\":\"缴纳罚款\",\"ownerObject\":\"borrow_record\",\"ownerTable\":\"borrow_record\",\"preconditions\":[],\"quantityEffects\":[],\"recordEffects\":[],\"required\":true,\"stateTransitions\":[{\"actionCode\":\"pay_fine\",\"fromState\":\"returned_with_fine\",\"toState\":\"returned\"}]},{\"actor\":\"admin\",\"code\":\"mark_overdue\",\"name\":\"标记逾期\",\"ownerObject\":\"borrow_record\",\"ownerTable\":\"borrow_record\",\"preconditions\":[],\"quantityEffects\":[],\"recordEffects\":[],\"required\":true,\"stateTransitions\":[{\"actionCode\":\"mark_overdue\",\"fromState\":\"borrowing\",\"toState\":\"overdue\"}]}],\"businessPolicies\":[],\"coreObjects\":[{\"code\":\"borrow_record\",\"name\":\"借阅管理流程\",\"objectType\":\"main\",\"tableName\":\"borrow_record\"},{\"code\":\"book\",\"name\":\"book\",\"objectType\":\"related\",\"tableName\":\"book\"},{\"code\":\"fine_record\",\"name\":\"fine_record\",\"objectType\":\"related\",\"tableName\":\"fine_record\"}],\"domainName\":\"借阅管理流程\",\"metrics\":[{\"aggregate\":\"count\",\"code\":\"borrowing_count\",\"field\":\"id\",\"filters\":[{\"field\":\"status\",\"operator\":\"eq\",\"values\":[\"borrowing\"]}],\"name\":\"借阅中数量\",\"relatedActionCodes\":[],\"required\":true,\"tableName\":\"borrow_record\",\"unit\":\"条\"},{\"aggregate\":\"count\",\"code\":\"overdue_count\",\"field\":\"id\",\"filters\":[{\"field\":\"status\",\"operator\":\"eq\",\"values\":[\"overdue\"]}],\"name\":\"逾期数量\",\"relatedActionCodes\":[],\"required\":true,\"tableName\":\"borrow_record\",\"unit\":\"条\"},{\"aggregate\":\"count\",\"code\":\"returned_count\",\"field\":\"id\",\"filters\":[{\"field\":\"status\",\"operator\":\"eq\",\"values\":[\"returned\"]}],\"name\":\"已归还数量\",\"relatedActionCodes\":[],\"required\":true,\"tableName\":\"borrow_record\",\"unit\":\"条\"},{\"aggregate\":\"count\",\"code\":\"pending_count\",\"field\":\"id\",\"filters\":[{\"field\":\"status\",\"operator\":\"eq\",\"values\":[\"pending\"]}],\"name\":\"待审核数量\",\"relatedActionCodes\":[],\"required\":true,\"tableName\":\"borrow_record\",\"unit\":\"条\"}],\"pageBindings\":[{\"actionCode\":\"approve\",\"pageCode\":\"borrow_admin_page\",\"slot\":\"list.rowActions\",\"tableName\":\"borrow_record\",\"target\":\"admin\"},{\"actionCode\":\"reject\",\"pageCode\":\"borrow_admin_page\",\"slot\":\"list.rowActions\",\"tableName\":\"borrow_record\",\"target\":\"admin\"},{\"actionCode\":\"return_apply\",\"pageCode\":\"my_borrows_page\",\"slot\":\"list.rowActions\",\"tableName\":\"borrow_record\",\"target\":\"reader\"},{\"actionCode\":\"return_apply_overdue\",\"pageCode\":\"my_borrows_page\",\"slot\":\"list.rowActions\",\"tableName\":\"borrow_record\",\"target\":\"reader\"},{\"actionCode\":\"confirm_return_normal\",\"pageCode\":\"borrow_admin_page\",\"slot\":\"list.rowActions\",\"tableName\":\"borrow_record\",\"target\":\"admin\"},{\"actionCode\":\"confirm_return_overdue\",\"pageCode\":\"borrow_admin_page\",\"slot\":\"list.rowActions\",\"tableName\":\"borrow_record\",\"target\":\"admin\"},{\"actionCode\":\"pay_fine\",\"pageCode\":\"my_borrows_page\",\"slot\":\"list.rowActions\",\"tableName\":\"borrow_record\",\"target\":\"reader\"},{\"actionCode\":\"mark_overdue\",\"pageCode\":\"borrow_admin_page\",\"slot\":\"list.rowActions\",\"tableName\":\"borrow_record\",\"target\":\"admin\"}],\"quantityRules\":[{\"actionCode\":\"approve\",\"amount\":\"1\",\"effectType\":\"decrease\",\"objectCode\":\"book\",\"quantityField\":\"stock\",\"tableName\":\"book\"}],\"recordRules\":[],\"stateMachines\":[{\"objectCode\":\"borrow_record\",\"states\":[\"pending\",\"borrowing\",\"overdue\",\"returning\",\"returned_with_fine\",\"returned\",\"cancelled\"],\"statusField\":\"status\",\"tableName\":\"borrow_record\",\"transitions\":[{\"actionCode\":\"approve\",\"fromState\":\"pending\",\"toState\":\"borrowing\"},{\"actionCode\":\"reject\",\"fromState\":\"pending\",\"toState\":\"cancelled\"},{\"actionCode\":\"return_apply\",\"fromState\":\"borrowing\",\"toState\":\"returning\"},{\"actionCode\":\"return_apply_overdue\",\"fromState\":\"overdue\",\"toState\":\"returning\"},{\"actionCode\":\"confirm_return_normal\",\"fromState\":\"returning\",\"toState\":\"returned\"},{\"actionCode\":\"confirm_return_overdue\",\"fromState\":\"returning\",\"toState\":\"returned_with_fine\"},{\"actionCode\":\"pay_fine\",\"fromState\":\"returned_with_fine\",\"toState\":\"returned\"},{\"actionCode\":\"mark_overdue\",\"fromState\":\"borrowing\",\"toState\":\"overdue\"}]}]},\"canonicalTableRegistry\":[\"book_info\",\"borrow_record\",\"reservation\",\"fine_record\",\"reader\",\"admin\"],\"limits\":{\"maxTables\":12,\"maxColumnsPerTable\":30}}', '{\n \"tables\": [\n {\n \"tableName\": \"book_info\",\n \"tableComment\": \"图书信息表\",\n \"adminMenuName\": \"图书管理\",\n \"operations\": {\n \"add\": true,\n \"edit\": true,\n \"remove\": true,\n \"removeType\": \"physical\",\n \"reason\": \"\"\n },\n \"columns\": [\n {\n \"columnName\": \"id\",\n \"columnLabel\": \"ID\",\n \"columnComment\": \"主键ID\",\n \"columnType\": \"bigint(20)\",\n \"isPk\": \"1\",\n \"isIncrement\": \"1\",\n \"isRequired\": \"1\"\n },\n {\n \"columnName\": \"title\",\n \"columnLabel\": \"书名\",\n \"columnComment\": \"图书名称\",\n \"columnType\": \"varchar(200)\",\n \"isPk\": \"0\",\n \"isIncrement\": \"0\",\n \"isRequired\": \"1\",\n \"javaType\": \"String\",\n \"htmlType\": \"input\"\n },\n {\n \"columnName\": \"author\",\n \"columnLabel\": \"作者\",\n \"columnComment\": \"图书作者\",\n \"columnType\": \"varchar(100)\",\n \"isPk\": \"0\",\n \"isIncrement\": \"0\",\n \"isRequired\": \"1\",\n \"javaType\": \"String\",\n \"htmlType\": \"input\"\n },\n {\n \"columnName\": \"publisher\",\n \"columnLabel\": \"出版社\",\n \"columnComment\": \"出版社名称\",\n \"columnType\": \"varchar(100)\",\n \"isPk\": \"0\",\n \"isIncrement\": \"0\",\n \"isRequired\": \"0\",\n \"javaType\": \"String\",\n \"htmlType\": \"input\"\n },\n {\n \"columnName\": \"isbn\",\n \"columnLabel\": \"ISBN\",\n \"columnComment\": \"国际标准书号\",\n \"columnType\": \"varchar(20)\",\n \"isPk\": \"0\",\n \"isIncrement\": \"0\",\n \"isRequired\": \"1\",\n \"javaType\": \"String\",\n \"htmlType\": \"input\"\n },\n {\n \"columnName\": \"category\",\n \"columnLabel\": \"分类\",\n \"columnComment\": \"图书分类\",\n \"columnType\": \"varchar(50)\",\n \"isPk\": \"0\",\n \"isIncrement\": \"0\",\n \"isRequired\": \"0\",\n \"javaType\": \"String\",\n \"htmlType\": \"select\",\n \"dictType\": \"book_category\",\n \"dictOptions\": [\n {\n \"label\": \"文学\",\n \"value\": \"literature\"\n },\n {\n \"label\": \"科学\",\n \"value\": \"science\"\n },\n {\n \"label\": \"历史\",\n \"value\": \"history\"\n },\n {\n \"label\": \"技术\",\n \"value\": \"technology\"\n },\n {\n \"label\": \"其他\",\n \"value\": \"other\"\n }\n ]\n },\n {\n \"columnName\": \"stock\",\n \"columnLabel\": \"库存\",\n \"columnComment\": \"当前可借库存数量\",\n \"columnType\": \"int(11)\",\n \"isPk\": \"0\",\n \"isIncrement\": \"0\",\n \"isRequired\": \"1\",\n \"javaType\": \"Integer\",\n \"htmlType\": \"input\"\n },\n {\n \"columnName\": \"description\",\n \"columnLabel\": \"简介\",\n \"columnComment\": \"图书简介\",\n \"columnType\": \"text\",\n \"isPk\": \"0\",\n \"isIncrement\": \"0\",\n \"isRequired\": \"0\",\n \"javaType\": \"String\",\n \"htmlType\": \"editor\"\n }\n ]\n },\n {\n \"tableName\": \"book\",\n \"tableComment\": \"图书库存表(与业务闭环关联)\",\n \"adminMenuName\": \"图书库存\",\n \"operations\": {\n \"add\": true,\n \"edit\": true,\n \"remove\": true,\n \"removeType\": \"physical\",\n \"reason\": \"\"\n },\n \"columns\": [\n {\n \"columnName\": \"id\",\n \"columnLabel\": \"ID\",\n \"columnComment\": \"主键ID\",\n \"columnType\": \"bigint(20)\",\n \"isPk\": \"1\",\n \"isIncrement\": \"1\",\n \"isRequired\": \"1\"\n },\n {\n \"columnName\": \"stock\",\n \"columnLabel\": \"库存\",\n \"columnComment\": \"当前可借库存数量(业务闭环引用)\",\n \"columnType\": \"int(11)\",\n \"isPk\": \"0\",\n \"isIncrement\": \"0\",\n \"isRequired\": \"1\",\n \"javaType\": \"Integer\",\n \"htmlType\": \"input\"\n },\n {\n \"columnName\": \"title\",\n \"columnLabel\": \"书名\",\n \"columnComment\": \"图书名称\",\n \"columnType\": \"varchar(200)\",\n \"isPk\": \"0\",\n \"isIncrement\": \"0\",\n \"isRequired\": \"1\",\n \"javaType\": \"String\",\n \"htmlType\": \"input\"\n },\n {\n \"columnName\": \"author\",\n \"columnLabel\": \"作者\",\n \"columnComment\": \"图书作者\",\n \"columnType\": \"varchar(100)\",\n \"isPk\": \"0\",\n \"isIncrement\": \"0\",\n \"isRequired\": \"1\",\n \"javaType\": \"String\",\n \"htmlType\": \"input\"\n },\n {\n \"columnName\": \"isbn\",\n \"columnLabel\": \"ISBN\",\n \"columnComment\": \"国际标准书号\",\n \"columnType\": \"varchar(20)\",\n \"isPk\": \"0\",\n \"isIncrement\": \"0\",\n \"isRequired\": \"1\",\n \"javaType\": \"String\",\n \"htmlType\": \"input\"\n },\n {\n \"columnName\": \"category\",\n \"columnLabel\": \"分类\",\n \"columnComment\": \"图书分类\",\n \"columnType\": \"varchar(50)\",\n \"isPk\": \"0\",\n \"isIncrement\": \"0\",\n \"isRequired\": \"0\",\n \"javaType\": \"String\",\n \"htmlType\": \"select\",\n \"dictType\": \"book_category\",\n \"dictOptions\": [\n {\n \"label\": \"文学\",\n \"value\": \"literature\"\n },\n {\n \"label\": \"科学\",\n \"value\": \"science\"\n },\n {\n \"label\": \"历史\",\n \"value\": \"history\"\n },\n {\n \"label\": \"技术\",\n \"value\": \"technology\"\n },\n {\n \"label\": \"其他\",\n \"value\": \"other\"\n }\n ]\n }\n ]\n },\n {\n \"tableName\": \"borrow_record\",\n \"tableComment\": \"借阅记录表\",\n \"adminMenuName\": \"借阅审核\",\n \"operations\": {\n \"add\": true,\n \"edit\": false,\n \"remove\": false,\n \"removeType\": \"physical\",\n \"reason\": \"仅新增记录,不允许编辑和删除\"\n },\n \"columns\": [\n {\n \"columnName\": \"id\",\n \"columnLabel\": \"ID\",\n \"columnComment\": \"主键ID\",\n \"columnType\": \"bigint(20)\",\n \"isPk\": \"1\",\n \"isIncrement\": \"1\",\n \"isRequired\": \"1\"\n },\n {\n \"columnName\": \"reader_id\",\n \"columnLabel\": \"读者ID\",\n \"columnComment\": \"借阅读者ID关联reader表\",\n \"columnType\": \"bigint(20)\",\n \"isPk\": \"0\",\n \"isIncrement\": \"0\",\n \"isRequired\": \"1\",\n \"javaType\": \"Long\",\n \"htmlType\": \"select\",\n \"dictType\": \"remote:reader:reader_id:nickname\"\n },\n {\n \"columnName\": \"book_id\",\n \"columnLabel\": \"图书ID\",\n \"columnComment\": \"借阅图书ID关联book_info表\",\n \"columnType\": \"bigint(20)\",\n \"isPk\": \"0\",\n \"isIncrement\": \"0\",\n \"isRequired\": \"1\",\n \"javaType\": \"Long\",\n \"htmlType\": \"select\",\n \"dictType\": \"remote:book_info:id:title\"\n },\n {\n \"columnName\": \"borrow_date\",\n \"columnLabel\": \"借书日期\",\n \"columnComment\": \"借出图书的日期\",\n \"columnType\": \"datetime\",\n \"isPk\": \"0\",\n \"isIncrement\": \"0\",\n \"isRequired\": \"1\",\n \"javaType\": \"Date\",\n \"htmlType\": \"datetime\"\n },\n {\n \"columnName\": \"due_date\",\n \"columnLabel\": \"应还日期\",\n \"columnComment\": \"图书应归还日期\",\n \"columnType\": \"datetime\",\n \"isPk\": \"0\",\n \"isIncrement\": \"0\",\n \"isRequired\": \"1\",\n \"javaType\": \"Date\",\n \"htmlType\": \"datetime\"\n },\n {\n \"columnName\": \"return_date\",\n \"columnLabel\": \"实际归还日期\",\n \"columnComment\": \"实际归还图书的日期\",\n \"columnType\": \"datetime\",\n \"isPk\": \"0\",\n \"isIncrement\": \"0\",\n \"isRequired\": \"0\",\n \"javaType\": \"Date\",\n \"htmlType\": \"datetime\"\n },\n {\n \"columnName\": \"renew_count\",\n \"columnLabel\": \"续借次数\",\n \"columnComment\": \"已续借次数最多1次\",\n \"columnType\": \"int(11)\",\n \"isPk\": \"0\",\n \"isIncrement\": \"0\",\n \"isRequired\": \"0\",\n \"javaType\": \"Integer\",\n \"htmlType\": \"input\"\n },\n {\n \"columnName\": \"status\",\n \"columnLabel\": \"借阅状态\",\n \"columnComment\": \"借阅记录状态pending-待审核borrowing-借阅中overdue-逾期returning-归还中returned_with_fine-待缴费归还returned-已归还cancelled-已取消\",\n \"columnType\": \"varchar(20)\",\n \"isPk\": \"0\",\n \"isIncrement\": \"0\",\n \"isRequired\": \"1\",\n \"javaType\": \"String\",\n \"htmlType\": \"select\",\n \"dictType\": \"borrow_status\",\n \"dictOptions\": [\n {\n \"label\": \"待审核\",\n \"value\": \"pending\"\n },\n {\n \"label\": \"借阅中\",\n \"value\": \"borrowing\"\n },\n {\n \"label\": \"逾期\",\n \"value\": \"overdue\"\n },\n {\n \"label\": \"归还中\",\n \"value\": \"returning\"\n },\n {\n \"label\": \"待缴费归还\",\n \"value\": \"returned_with_fine\"\n },\n {\n \"label\": \"已归还\",\n \"value\": \"returned\"\n },\n {\n \"label\": \"已取消\",\n \"value\": \"cancelled\"\n }\n ]\n },\n {\n \"columnName\": \"approve_user_id\",\n \"columnLabel\": \"审核管理员ID\",\n \"columnComment\": \"审核通过的管理员ID关联admin表\",\n \"columnType\": \"bigint(20)\",\n \"isPk\": \"0\",\n \"isIncrement\": \"0\",\n \"isRequired\": \"0\",\n \"javaType\": \"Long\",\n \"htmlType\": \"select\",\n \"dictType\": \"remote:admin:admin_id:username\"\n },\n {\n \"columnName\": \"approve_time\",\n \"columnLabel\": \"审核时间\",\n \"columnComment\": \"审核通过的时间\",\n \"columnType\": \"datetime\",\n \"isPk\": \"0\",\n \"isIncrement\": \"0\",\n \"isRequired\": \"0\",\n \"javaType\": \"Date\",\n \"htmlType\": \"datetime\"\n },\n {\n \"columnName\": \"return_applicant_id\",\n \"columnLabel\": \"还书申请人ID\",\n \"columnComment\": \"申请还书的读者ID关联reader表\",\n \"columnType\": \"bigint(20)\",\n \"isPk\": \"0\",\n \"isIncrement\": \"0\",\n \"isRequired\": \"0\",\n \"javaType\": \"Long\",\n \"htmlType\": \"select\",\n \"dictType\": \"remote:reader:reader_id:nickname\"\n },\n {\n \"columnName\": \"return_apply_time\",\n \"columnLabel\": \"还书申请时间\",\n \"columnComment\": \"申请还书的时间\",\n \"columnType\": \"datetime\",\n \"isPk\": \"0\",\n \"isIncrement\": \"0\",\n \"isRequired\": \"0\",\n \"javaType\": \"Date\",\n \"htmlType\": \"datetime\"\n },\n {\n \"columnName\": \"confirm_return_user_id\",\n \"columnLabel\": \"确认归还管理员ID\",\n \"columnComment\": \"确认归还的管理员ID关联admin表\",\n \"columnType\": \"bigint(20)\",\n \"isPk\": \"0\",\n \"isIncrement\": \"0\",\n \"isRequired\": \"0\",\n \"javaType\": \"Long\",\n \"htmlType\": \"select\",\n \"dictType\": \"remote:admin:admin_id:username\"\n },\n {\n \"columnName\": \"confirm_return_time\",\n \"columnLabel\": \"确认归还时间\",\n \"columnComment\": \"确认归还的时间\",\n \"columnType\": \"datetime\",\n \"isPk\": \"0\",\n \"isIncrement\": \"0\",\n \"isRequired\": \"0\",\n \"javaType\": \"Date\",\n \"htmlType\": \"datetime\"\n },\n {\n \"columnName\": \"mark_overdue_user_id\",\n \"columnLabel\": \"标记逾期管理员ID\",\n \"columnComment\": \"标记逾期的管理员ID关联admin表\",\n \"columnType\": \"bigint(20)\",\n \"isPk\": \"0\",\n \"isIncrement\": \"0\",\n \"isRequired\": \"0\",\n \"javaType\": \"Long\",\n \"htmlType\": \"select\",\n \"dictType\": \"remote:admin:admin_id:username\"\n },\n {\n \"columnName\": \"mark_overdue_time\",\n \"columnLabel\": \"标记逾期时间\",\n \"columnComment\": \"标记逾期的时间\",\n \"columnType\": \"datetime\",\n \"isPk\": \"0\",\n \"isIncrement\": \"0\",\n \"isRequired\": \"0\",\n \"javaType\": \"Date\",\n \"htmlType\": \"datetime\"\n }\n ]\n },\n {\n \"tableName\": \"reservation\",\n \"tableComment\": \"预约记录表\",\n \"adminMenuName\": \"预约记录\",\n \"operations\": {\n \"add\": true,\n \"edit\": false,\n \"remove\": false,\n \"removeType\": \"physical\",\n \"reason\": \"仅新增预约记录,不允许编辑和删除\"\n },\n \"columns\": [\n {\n \"columnName\": \"id\",\n \"columnLabel\": \"ID\",\n \"columnComment\": \"主键ID\",\n \"columnType\": \"bigint(20)\",\n \"isPk\": \"1\",\n \"isIncrement\": \"1\",\n \"isRequired\": \"1\"\n },\n {\n \"columnName\": \"reader_id\",\n \"columnLabel\": \"读者ID\",\n \"columnComment\": \"预约读者ID关联reader表\",\n \"columnType\": \"bigint(20)\",\n \"isPk\": \"0\",\n \"isIncrement\": \"0\",\n \"isRequired\": \"1\",\n \"javaType\": \"Long\",\n \"htmlType\": \"select\",\n \"dictType\": \"remote:reader:reader_id:nickname\"\n },\n {\n \"columnName\": \"book_id\",\n \"columnLabel\": \"图书ID\",\n \"columnComment\": \"预约图书ID关联book_info表\",\n \"columnType\": \"bigint(20)\",\n \"isPk\": \"0\",\n \"isIncrement\": \"0\",\n \"isRequired\": \"1\",\n \"javaType\": \"Long\",\n \"htmlType\": \"select\",\n \"dictType\": \"remote:book_info:id:title\"\n },\n {\n \"columnName\": \"reserve_date\",\n \"columnLabel\": \"预约日期\",\n \"columnComment\": \"发起预约的日期\",\n \"columnType\": \"datetime\",\n \"isPk\": \"0\",\n \"isIncrement\": \"0\",\n \"isRequired\": \"1\",\n \"javaType\": \"Date\",\n \"htmlType\": \"datetime\"\n },\n {\n \"columnName\": \"expire_date\",\n \"columnLabel\": \"过期日期\",\n \"columnComment\": \"预约保留截止日期,超时自动取消\",\n \"columnType\": \"datetime\",\n \"isPk\": \"0\",\n \"isIncrement\": \"0\",\n \"isRequired\": \"1\",\n \"javaType\": \"Date\",\n \"htmlType\": \"datetime\"\n },\n {\n \"columnName\": \"pickup_date\",\n \"columnLabel\": \"取书日期\",\n \"columnComment\": \"实际取书的日期\",\n \"columnType\": \"datetime\",\n \"isPk\": \"0\",\n \"isIncrement\": \"0\",\n \"isRequired\": \"0\",\n \"javaType\": \"Date\",\n \"htmlType\": \"datetime\"\n },\n {\n \"columnName\": \"status\",\n \"columnLabel\": \"预约状态\",\n \"columnComment\": \"预约状态waiting-等待取书picked-已取走cancelled-已取消expired-已过期\",\n \"columnType\": \"varchar(20)\",\n \"isPk\": \"0\",\n \"isIncrement\": \"0\",\n \"isRequired\": \"1\",\n \"javaType\": \"String\",\n \"htmlType\": \"select\",\n \"dictType\": \"reservation_status\",\n \"dictOptions\": [\n {\n \"label\": \"等待取书\",\n \"value\": \"waiting\"\n },\n {\n \"label\": \"已取走\",\n \"value\": \"picked\"\n },\n {\n \"label\": \"已取消\",\n \"value\": \"cancelled\"\n },\n {\n \"label\": \"已过期\",\n \"value\": \"expired\"\n }\n ]\n }\n ]\n },\n {\n \"tableName\": \"fine_record\",\n \"tableComment\": \"罚款记录表\",\n \"adminMenuName\": \"罚款管理\",\n \"operations\": {\n \"add\": true,\n \"edit\": false,\n \"remove\": false,\n \"removeType\": \"physical\",\n \"reason\": \"仅新增罚款记录,不允许编辑和删除\"\n },\n \"columns\": [\n {\n \"columnName\": \"id\",\n \"columnLabel\": \"ID\",\n \"columnComment\": \"主键ID\",\n \"columnType\": \"bigint(20)\",\n \"isPk\": \"1\",\n \"isIncrement\": \"1\",\n \"isRequired\": \"1\"\n },\n {\n \"columnName\": \"borrow_record_id\",\n \"columnLabel\": \"借阅记录ID\",\n \"columnComment\": \"关联的借阅记录ID\",\n \"columnType\": \"bigint(20)\",\n \"isPk\": \"0\",\n \"isIncrement\": \"0\",\n \"isRequired\": \"1\",\n \"javaType\": \"Long\",\n \"htmlType\": \"select\",\n \"dictType\": \"remote:borrow_record:id:borrow_date\"\n },\n {\n \"columnName\": \"reader_id\",\n \"columnLabel\": \"读者ID\",\n \"columnComment\": \"被罚款读者ID关联reader表\",\n \"columnType\": \"bigint(20)\",\n \"isPk\": \"0\",\n \"isIncrement\": \"0\",\n \"isRequired\": \"1\",\n \"javaType\": \"Long\",\n \"htmlType\": \"select\",\n \"dictType\": \"remote:reader:reader_id:nickname\"\n },\n {\n \"columnName\": \"amount\",\n \"columnLabel\": \"罚款金额\",\n \"columnComment\": \"罚款金额(元)\",\n \"columnType\": \"decimal(10,2)\",\n \"isPk\": \"0\",\n \"isIncrement\": \"0\",\n \"isRequired\": \"1\",\n \"javaType\": \"BigDecimal\",\n \"htmlType\": \"input\"\n },\n {\n \"columnName\": \"overdue_days\",\n \"columnLabel\": \"逾期天数\",\n \"columnComment\": \"逾期天数\",\n \"columnType\": \"int(11)\",\n \"isPk\": \"0\",\n \"isIncrement\": \"0\",\n \"isRequired\": \"0\",\n \"javaType\": \"Integer\",\n \"htmlType\": \"input\"\n },\n {\n \"columnName\": \"status\",\n \"columnLabel\": \"罚款状态\",\n \"columnComment\": \"罚款状态unpaid-未支付paid-已支付\",\n \"columnType\": \"varchar(10)\",\n \"isPk\": \"0\",\n \"isIncrement\": \"0\",\n \"isRequired\": \"1\",\n \"javaType\": \"String\",\n \"htmlType\": \"select\",\n \"dictType\": \"fine_status\",\n \"dictOptions\": [\n {\n \"label\": \"未支付\",\n \"value\": \"unpaid\"\n },\n {\n \"label\": \"已支付\",\n \"value\": \"paid\"\n }\n ]\n },\n {\n \"columnName\": \"created_at\",\n \"columnLabel\": \"创建时间\",\n \"columnComment\": \"罚款记录的创建时间\",\n \"columnType\": \"datetime\",\n \"isPk\": \"0\",\n \"isIncrement\": \"0\",\n \"isRequired\": \"1\",\n \"javaType\": \"Date\",\n \"htmlType\": \"datetime\"\n },\n {\n \"columnName\": \"pay_time\",\n \"columnLabel\": \"支付时间\",\n \"columnComment\": \"罚款支付时间\",\n \"columnType\": \"datetime\",\n \"isPk\": \"0\",\n \"isIncrement\": \"0\",\n \"isRequired\": \"0\",\n \"javaType\": \"Date\",\n \"htmlType\": \"datetime\"\n }\n ]\n },\n {\n \"tableName\": \"reader\",\n \"tableComment\": \"读者表\",\n \"adminMenuName\": \"读者管理\",\n \"operations\": {\n \"add\": true,\n \"edit\": true,\n \"remove\": true,\n \"removeType\": \"soft\",\n \"reason\": \"\"\n },\n \"columns\": [\n {\n \"columnName\": \"reader_id\",\n \"columnLabel\": \"读者ID\",\n \"columnComment\": \"读者主键ID也作为登录账号标识\",\n \"columnType\": \"bigint(20)\",\n \"isPk\": \"1\",\n \"isIncrement\": \"1\",\n \"isRequired\": \"1\"\n },\n {\n \"columnName\": \"username\",\n \"columnLabel\": \"用户名\",\n \"columnComment\": \"登录用户名\",\n \"columnType\": \"varchar(50)\",\n \"isPk\": \"0\",\n \"isIncrement\": \"0\",\n \"isRequired\": \"1\",\n \"javaType\": \"String\",\n \"htmlType\": \"input\"\n },\n {\n \"columnName\": \"password_hash\",\n \"columnLabel\": \"密码哈希\",\n \"columnComment\": \"加密后的密码\",\n \"columnType\": \"varchar(255)\",\n \"isPk\": \"0\",\n \"isIncrement\": \"0\",\n \"isRequired\": \"1\",\n \"javaType\": \"String\",\n \"htmlType\": \"input\"\n },\n {\n \"columnName\": \"nickname\",\n \"columnLabel\": \"昵称\",\n \"columnComment\": \"读者昵称\",\n \"columnType\": \"varchar(50)\",\n \"isPk\": \"0\",\n \"isIncrement\": \"0\",\n \"isRequired\": \"0\",\n \"javaType\": \"String\",\n \"htmlType\": \"input\"\n },\n {\n \"columnName\": \"email\",\n \"columnLabel\": \"邮箱\",\n \"columnComment\": \"读者邮箱地址\",\n \"columnType\": \"varchar(100)\",\n \"isPk\": \"0\",\n \"isIncrement\": \"0\",\n \"isRequired\": \"0\",\n \"javaType\": \"String\",\n \"htmlType\": \"input\"\n },\n {\n \"columnName\": \"phone\",\n \"columnLabel\": \"手机号\",\n \"columnComment\": \"读者手机号码\",\n \"columnType\": \"varchar(20)\",\n \"isPk\": \"0\",\n \"isIncrement\": \"0\",\n \"isRequired\": \"0\",\n \"javaType\": \"String\",\n \"htmlType\": \"input\"\n },\n {\n \"columnName\": \"status\",\n \"columnLabel\": \"状态\",\n \"columnComment\": \"账号状态1-正常0-禁用\",\n \"columnType\": \"char(1)\",\n \"isPk\": \"0\",\n \"isIncrement\": \"0\",\n \"isRequired\": \"1\",\n \"javaType\": \"String\",\n \"htmlType\": \"select\",\n \"dictType\": \"account_status\",\n \"dictOptions\": [\n {\n \"label\": \"正常\",\n \"value\": \"1\"\n },\n {\n \"label\": \"禁用\",\n \"value\": \"0\"\n }\n ]\n },\n {\n \"columnName\": \"deleted\",\n \"columnLabel\": \"删除标记\",\n \"columnComment\": \"软删除标记0-未删除1-已删除\",\n \"columnType\": \"tinyint(1)\",\n \"isPk\": \"0\",\n \"isIncrement\": \"0\",\n \"isRequired\": \"1\",\n \"javaType\": \"Integer\",\n \"htmlType\": \"input\"\n },\n {\n \"columnName\": \"create_time\",\n \"columnLabel\": \"创建时间\",\n \"columnComment\": \"账号创建时间\",\n \"columnType\": \"datetime\",\n \"isPk\": \"0\",\n \"isIncrement\": \"0\",\n \"isRequired\": \"1\",\n \"javaType\": \"Date\",\n \"htmlType\": \"datetime\"\n }\n ]\n },\n {\n \"tableName\": \"admin\",\n \"tableComment\": \"管理员表\",\n \"adminMenuName\": \"管理员资料\",\n \"operations\": {\n \"add\": false,\n \"edit\": true,\n \"remove\": false,\n \"removeType\": \"physical\",\n \"reason\": \"管理员账号不允许添加和删除,仅可编辑\"\n },\n \"columns\": [\n {\n \"columnName\": \"admin_id\",\n \"columnLabel\": \"管理员ID\",\n \"columnComment\": \"管理员主键ID\",\n \"columnType\": \"bigint(20)\",\n \"isPk\": \"1\",\n \"isIncrement\": \"1\",\n \"isRequired\": \"1\"\n },\n {\n \"columnName\": \"username\",\n \"columnLabel\": \"用户名\",\n \"columnComment\": \"登录用户名\",\n \"columnType\": \"varchar(50)\",\n \"isPk\": \"0\",\n \"isIncrement\": \"0\",\n \"isRequired\": \"1\",\n \"javaType\": \"String\",\n \"htmlType\": \"input\"\n },\n {\n \"columnName\": \"password_hash\",\n \"columnLabel\": \"密码哈希\",\n \"columnComment\": \"加密后的密码\",\n \"columnType\": \"varchar(255)\",\n \"isPk\": \"0\",\n \"isIncrement\": \"0\",\n \"isRequired\": \"1\",\n \"javaType\": \"String\",\n \"htmlType\": \"input\"\n },\n {\n \"columnName\": \"nickname\",\n \"columnLabel\": \"昵称\",\n \"columnComment\": \"管理员昵称\",\n \"columnType\": \"varchar(50)\",\n \"isPk\": \"0\",\n \"isIncrement\": \"0\",\n \"isRequired\": \"0\",\n \"javaType\": \"String\",\n \"htmlType\": \"input\"\n },\n {\n \"columnName\": \"status\",\n \"columnLabel\": \"状态\",\n \"columnComment\": \"账号状态1-正常0-禁用\",\n \"columnType\": \"char(1)\",\n \"isPk\": \"0\",\n \"isIncrement\": \"0\",\n \"isRequired\": \"1\",\n \"javaType\": \"String\",\n \"htmlType\": \"select\",\n \"dictType\": \"account_status\",\n \"dictOptions\": [\n {\n \"label\": \"正常\",\n \"value\": \"1\"\n },\n {\n \"label\": \"禁用\",\n \"value\": \"0\"\n }\n ]\n },\n {\n \"columnName\": \"create_time\",\n \"columnLabel\": \"创建时间\",\n \"columnComment\": \"账号创建时间\",\n \"columnType\": \"datetime\",\n \"isPk\": \"0\",\n \"isIncrement\": \"0\",\n \"isRequired\": \"1\",\n \"javaType\": \"Date\",\n \"htmlType\": \"datetime\"\n }\n ]\n }\n ]\n}', '1', NULL, 179093, '2026-07-14 15:50:12');
INSERT INTO `factory_ai_stage_output` VALUES (106, 102, 102, 100, 'app_blueprint', '{\"projectName\":\"图书管理系统\",\"projectDescription\":\"项目定位:面向高校图书馆的图书管理系统,用于读者借阅预约、管理员日常管理和系统管理员后台维护。 \\n角色读者、管理员。 \\n核心流程读者查询图书并发起借阅/预约请求管理员审核并完成借出状态变为已借出读者还书时管理员处理并更新图书状态为可借预约图书到馆后保留2天超时自动释放借阅超期生成罚款读者可通过管理台缴纳。 \\n关键规则每位读者最多同时借阅5本每本借阅期限30天超期每天罚款0.5元预约图书保留2天图书总数固定可借数量随借出减少还书后恢复。 \\n异常边界可借数量为0时无法借阅/预约;已借出状态不得重复借出;预约取消后释放名额;超期未还时借阅入口禁用;若读者已有同本书未还,不可再次借阅。\",\"industryTemplate\":\"\",\"stylePreset\":\"dark-tech\",\"extraRequirements\":\"\"}', '{\n \"roles\": [\n {\n \"code\": \"reader\",\n \"name\": \"读者\",\n \"description\": \"可以查询图书、借阅、预约、查看个人记录并缴纳罚款\"\n },\n {\n \"code\": \"admin\",\n \"name\": \"管理员\",\n \"description\": \"系统管理员,管理图书、借阅、预约、读者及罚款\"\n }\n ],\n \"frontendMenus\": [\n {\n \"code\": \"book_catalog\",\n \"name\": \"图书目录\",\n \"path\": \"/books\",\n \"pageCode\": \"book_catalog_page\",\n \"requiresLogin\": false,\n \"visibleRoles\": [],\n \"dataScope\": \"PUBLIC\"\n },\n {\n \"code\": \"my_borrows\",\n \"name\": \"我的借阅\",\n \"path\": \"/borrows\",\n \"pageCode\": \"my_borrows_page\",\n \"requiresLogin\": true,\n \"visibleRoles\": [\"reader\"],\n \"dataScope\": \"CURRENT_USER\"\n },\n {\n \"code\": \"my_reservations\",\n \"name\": \"我的预约\",\n \"path\": \"/reservations\",\n \"pageCode\": \"my_reservations_page\",\n \"requiresLogin\": true,\n \"visibleRoles\": [\"reader\"],\n \"dataScope\": \"CURRENT_USER\"\n },\n {\n \"code\": \"my_fines\",\n \"name\": \"我的罚款\",\n \"path\": \"/fines\",\n \"pageCode\": \"my_fines_page\",\n \"requiresLogin\": true,\n \"visibleRoles\": [\"reader\"],\n \"dataScope\": \"CURRENT_USER\"\n },\n {\n \"code\": \"reader_profile\",\n \"name\": \"个人资料\",\n \"path\": \"/profile\",\n \"pageCode\": \"reader_profile_page\",\n \"requiresLogin\": true,\n \"visibleRoles\": [\"reader\"],\n \"dataScope\": \"CURRENT_USER\"\n }\n ],\n \"frontendPages\": [\n {\n \"code\": \"book_catalog_page\",\n \"name\": \"图书目录\",\n \"menuCode\": \"book_catalog\",\n \"path\": \"/books\",\n \"pageType\": \"list\",\n \"tableName\": \"book_info\"\n },\n {\n \"code\": \"book_detail_page\",\n \"name\": \"图书详情\",\n \"menuCode\": \"book_catalog\",\n \"path\": \"/books/:id\",\n \"pageType\": \"detail\",\n \"tableName\": \"book_info\"\n },\n {\n \"code\": \"my_borrows_page\",\n \"name\": \"我的借阅\",\n \"menuCode\": \"my_borrows\",\n \"path\": \"/borrows\",\n \"pageType\": \"current_user_list\",\n \"tableName\": \"borrow_record\"\n },\n {\n \"code\": \"my_reservations_page\",\n \"name\": \"我的预约\",\n \"menuCode\": \"my_reservations\",\n \"path\": \"/reservations\",\n \"pageType\": \"current_user_list\",\n \"tableName\": \"reservation_record\"\n },\n {\n \"code\": \"my_fines_page\",\n \"name\": \"我的罚款\",\n \"menuCode\": \"my_fines\",\n \"path\": \"/fines\",\n \"pageType\": \"current_user_list\",\n \"tableName\": \"fine_record\"\n },\n {\n \"code\": \"reader_profile_page\",\n \"name\": \"个人资料\",\n \"menuCode\": \"reader_profile\",\n \"path\": \"/profile\",\n \"pageType\": \"form\",\n \"tableName\": \"reader\"\n }\n ],\n \"adminMenus\": [\n {\n \"code\": \"book_admin\",\n \"name\": \"图书管理\",\n \"path\": \"/admin/books\",\n \"pageCode\": \"book_admin_page\",\n \"tableName\": \"book_info\",\n \"pageType\": \"list\",\n \"requiresLogin\": true,\n \"visibleRoles\": [\"admin\"],\n \"dataScope\": \"ROLE\"\n },\n {\n \"code\": \"borrow_admin\",\n \"name\": \"借阅管理\",\n \"path\": \"/admin/borrows\",\n \"pageCode\": \"borrow_admin_page\",\n \"tableName\": \"borrow_record\",\n \"pageType\": \"list\",\n \"requiresLogin\": true,\n \"visibleRoles\": [\"admin\"],\n \"dataScope\": \"ROLE\"\n },\n {\n \"code\": \"reservation_admin\",\n \"name\": \"预约管理\",\n \"path\": \"/admin/reservations\",\n \"pageCode\": \"reservation_admin_page\",\n \"tableName\": \"reservation_record\",\n \"pageType\": \"list\",\n \"requiresLogin\": true,\n \"visibleRoles\": [\"admin\"],\n \"dataScope\": \"ROLE\"\n },\n {\n \"code\": \"fine_admin\",\n \"name\": \"罚款管理\",\n \"path\": \"/admin/fines\",\n \"pageCode\": \"fine_admin_page\",\n \"tableName\": \"fine_record\",\n \"pageType\": \"list\",\n \"requiresLogin\": true,\n \"visibleRoles\": [\"admin\"],\n \"dataScope\": \"ROLE\"\n },\n {\n \"code\": \"reader_admin\",\n \"name\": \"读者管理\",\n \"path\": \"/admin/readers\",\n \"pageCode\": \"reader_admin_page\",\n \"tableName\": \"reader\",\n \"pageType\": \"list\",\n \"requiresLogin\": true,\n \"visibleRoles\": [\"admin\"],\n \"dataScope\": \"ROLE\"\n },\n {\n \"code\": \"admin_admin\",\n \"name\": \"管理员管理\",\n \"path\": \"/admin/admins\",\n \"pageCode\": \"admin_admin_page\",\n \"tableName\": \"admin\",\n \"pageType\": \"list\",\n \"requiresLogin\": true,\n \"visibleRoles\": [\"admin\"],\n \"dataScope\": \"ROLE\"\n },\n {\n \"code\": \"admin_profile\",\n \"name\": \"个人资料\",\n \"path\": \"/admin/profile\",\n \"pageCode\": \"admin_profile_page\",\n \"tableName\": \"admin\",\n \"pageType\": \"form\",\n \"requiresLogin\": true,\n \"visibleRoles\": [\"admin\"],\n \"dataScope\": \"CURRENT_USER\"\n }\n ],\n \"adminHomeDashboard\": {\n \"title\": \"运营总览\",\n \"description\": \"核心业务数据\",\n \"metrics\": [\n {\n \"code\": \"total_books\",\n \"name\": \"总图书数\",\n \"tableName\": \"book_info\",\n \"aggregate\": \"count\",\n \"semantic\": \"content\"\n },\n {\n \"code\": \"total_borrowed\",\n \"name\": \"当前借出\",\n \"tableName\": \"borrow_record\",\n \"aggregate\": \"count\",\n \"filter\": \"status=borrowed\",\n \"semantic\": \"order\"\n },\n {\n \"code\": \"total_readers\",\n \"name\": \"读者总数\",\n \"tableName\": \"reader\",\n \"aggregate\": \"count\",\n \"semantic\": \"user\"\n },\n {\n \"code\": \"unpaid_fines\",\n \"name\": \"未缴罚款总额\",\n \"tableName\": \"fine_record\",\n \"aggregate\": \"sum\",\n \"field\": \"amount\",\n \"filter\": \"paid=false\",\n \"semantic\": \"money\"\n }\n ],\n \"charts\": [\n {\n \"code\": \"borrow_trend\",\n \"name\": \"借阅趋势\",\n \"tableName\": \"borrow_record\",\n \"type\": \"line\",\n \"xField\": \"created_at\",\n \"yField\": \"count\",\n \"xAggregate\": \"month\",\n \"semantic\": \"order\"\n },\n {\n \"code\": \"book_category_distribution\",\n \"name\": \"图书分类分布\",\n \"tableName\": \"book_info\",\n \"type\": \"pie\",\n \"xField\": \"category\",\n \"yField\": \"count\",\n \"semantic\": \"content\"\n }\n ]\n }\n}', '1', NULL, 33771, '2026-07-14 15:53:31');
INSERT INTO `factory_ai_stage_output` VALUES (107, 102, 102, 100, 'flow_config', '{\"mode\":\"generate\",\"projectName\":\"图书管理系统\",\"projectDescription\":\"项目定位:面向高校图书馆的图书管理系统,用于读者借阅预约、管理员日常管理和系统管理员后台维护。 \\n角色读者、管理员。 \\n核心流程读者查询图书并发起借阅/预约请求管理员审核并完成借出状态变为已借出读者还书时管理员处理并更新图书状态为可借预约图书到馆后保留2天超时自动释放借阅超期生成罚款读者可通过管理台缴纳。 \\n关键规则每位读者最多同时借阅5本每本借阅期限30天超期每天罚款0.5元预约图书保留2天图书总数固定可借数量随借出减少还书后恢复。 \\n异常边界可借数量为0时无法借阅/预约;已借出状态不得重复借出;预约取消后释放名额;超期未还时借阅入口禁用;若读者已有同本书未还,不可再次借阅。\",\"industryTemplate\":\"\",\"stylePreset\":\"dark-tech\",\"extraRequirements\":\"\",\"confirmedAppBlueprint\":{\"adminHomeDashboard\":{\"charts\":[{\"code\":\"borrow_trend\",\"filters\":[],\"metrics\":[],\"semantic\":\"order\",\"tableName\":\"borrow_record\",\"type\":\"line\"},{\"code\":\"book_category_distribution\",\"filters\":[],\"metrics\":[],\"semantic\":\"content\",\"tableName\":\"book_info\",\"type\":\"pie\"}],\"description\":\"核心业务数据\",\"metrics\":[{\"aggregate\":\"count\",\"code\":\"total_books\",\"filters\":[],\"semantic\":\"content\",\"tableName\":\"book_info\"},{\"aggregate\":\"count\",\"code\":\"total_borrowed\",\"filters\":[],\"semantic\":\"order\",\"tableName\":\"borrow_record\"},{\"aggregate\":\"count\",\"code\":\"total_readers\",\"filters\":[],\"semantic\":\"user\",\"tableName\":\"reader\"},{\"aggregate\":\"sum\",\"code\":\"unpaid_fines\",\"field\":\"amount\",\"filters\":[],\"semantic\":\"money\",\"tableName\":\"fine_record\"}],\"title\":\"运营总览\"},\"adminMenus\":[{\"code\":\"book_admin\",\"dataScope\":\"ROLE\",\"name\":\"图书管理\",\"pageCode\":\"book_admin_page\",\"pageType\":\"list\",\"path\":\"/admin/books\",\"requiresLogin\":true,\"tableName\":\"book_info\",\"visibleRoles\":[\"admin\"]},{\"code\":\"borrow_admin\",\"dataScope\":\"ROLE\",\"name\":\"借阅管理\",\"pageCode\":\"borrow_admin_page\",\"pageType\":\"list\",\"path\":\"/admin/borrows\",\"requiresLogin\":true,\"tableName\":\"borrow_record\",\"visibleRoles\":[\"admin\"]},{\"code\":\"reservation_admin\",\"dataScope\":\"ROLE\",\"name\":\"预约管理\",\"pageCode\":\"reservation_admin_page\",\"pageType\":\"list\",\"path\":\"/admin/reservations\",\"requiresLogin\":true,\"tableName\":\"reservation_record\",\"visibleRoles\":[\"admin\"]},{\"code\":\"fine_admin\",\"dataScope\":\"ROLE\",\"name\":\"罚款管理\",\"pageCode\":\"fine_admin_page\",\"pageType\":\"list\",\"path\":\"/admin/fines\",\"requiresLogin\":true,\"tableName\":\"fine_record\",\"visibleRoles\":[\"admin\"]},{\"code\":\"reader_admin\",\"dataScope\":\"ROLE\",\"name\":\"读者管理\",\"pageCode\":\"reader_admin_page\",\"pageType\":\"list\",\"path\":\"/admin/readers\",\"requiresLogin\":true,\"tableName\":\"reader\",\"visibleRoles\":[\"admin\"]},{\"code\":\"admin_admin\",\"dataScope\":\"ROLE\",\"name\":\"管理员管理\",\"pageCode\":\"admin_admin_page\",\"pageType\":\"list\",\"path\":\"/admin/admins\",\"requiresLogin\":true,\"tableName\":\"admin\",\"visibleRoles\":[\"admin\"]},{\"code\":\"admin_profile\",\"dataScope\":\"CURRENT_USER\",\"name\":\"个人资料\",\"pageCode\":\"admin_profile_page\",\"pageType\":\"form\",\"path\":\"/admin/profile\",\"requiresLogin\":true,\"tableName\":\"admin\",\"visibleRoles\":[\"admin\"]}],\"frontendMenus\":[{\"code\":\"book_catalog\",\"dataScope\":\"PUBLIC\",\"name\":\"图书目录\",\"pageCode\":\"book_catalog_page\",\"pageType\":\"\",\"path\":\"/books\",\"requiresLogin\":false,\"tableName\":\"\",\"visibleRoles\":[]},{\"code\":\"my_borrows\",\"dataScope\":\"CURRENT_USER\",\"name\":\"我的借阅\",\"pageCode\":\"my_borrows_page\",\"pageType\":\"\",\"path\":\"/borrows\",\"requiresLogin\":true,\"tableName\":\"\",\"visibleRoles\":[\"reader\"]},{\"code\":\"my_reservations\",\"dataScope\":\"CURRENT_USER\",\"name\":\"我的预约\",\"pageCode\":\"my_reservations_page\",\"pageType\":\"\",\"path\":\"/reservations\",\"requiresLogin\":true,\"tableName\":\"\",\"visibleRoles\":[\"reader\"]},{\"code\":\"my_fines\",\"dataScope\":\"CURRENT_USER\",\"name\":\"我的罚款\",\"pageCode\":\"my_fines_page\",\"pageType\":\"\",\"path\":\"/fines\",\"requiresLogin\":true,\"tableName\":\"\",\"visibleRoles\":[\"reader\"]},{\"code\":\"reader_profile\",\"dataScope\":\"CURRENT_USER\",\"name\":\"个人资料\",\"pageCode\":\"reader_profile_page\",\"pageType\":\"\",\"path\":\"/profile\",\"requiresLogin\":true,\"tableName\":\"\",\"visibleRoles\":[\"reader\"]}],\"frontendPages\":[{\"code\":\"book_catalog_page\",\"menuCode\":\"book_catalog\",\"name\":\"图书目录\",\"pageType\":\"list\",\"parentPageCode\":\"\",\"path\":\"/books\",\"tableName\":\"book_info\"},{\"code\":\"book_detail_page\",\"menuCode\":\"book_catalog\",\"name\":\"图书详情\",\"pageType\":\"detail\",\"parentPageCode\":\"\",\"path\":\"/books/:id\",\"tableName\":\"book_info\"},{\"code\":\"my_borrows_page\",\"menuCode\":\"my_borrows\",\"name\":\"我的借阅\",\"pageType\":\"current_user_list\",\"parentPageCode\":\"\",\"path\":\"/borrows\",\"tableName\":\"borrow_record\"},{\"code\":\"my_reservations_page\",\"menuCode\":\"my_reservations\",\"name\":\"我的预约\",\"pageType\":\"current_user_list\",\"parentPageCode\":\"\",\"path\":\"/reservations\",\"tableName\":\"reservation_record\"},{\"code\":\"my_fines_page\",\"menuCode\":\"my_fines\",\"name\":\"我的罚款\",\"pageType\":\"current_user_list\",\"parentPageCode\":\"\",\"path\":\"/fines\",\"tableName\":\"fine_record\"},{\"code\":\"reader_profile_page\",\"menuCode\":\"reader_profile\",\"name\":\"个人资料\",\"pageType\":\"form\",\"parentPageCode\":\"\",\"path\":\"/profile\",\"tableName\":\"reader\"}],\"roles\":[{\"code\":\"reader\",\"description\":\"可以查询图书、借阅、预约、查看个人记录并缴纳罚款\",\"name\":\"读者\"},{\"code\":\"admin\",\"description\":\"系统管理员,管理图书、借阅、预约、读者及罚款\",\"name\":\"管理员\"}]}}', '{\n \"version\": \"1.0\",\n \"code\": \"library_manage\",\n \"name\": \"图书管理系统\",\n \"mainTable\": \"borrow_record\",\n \"statusField\": \"status\",\n \"notFoundMessage\": \"主记录不存在\",\n \"states\": [\n {\"code\": \"borrow_pending\", \"label\": \"待审核\"},\n {\"code\": \"borrow_borrowing\", \"label\": \"借阅中\"},\n {\"code\": \"borrow_returned\", \"label\": \"已归还\"},\n {\"code\": \"borrow_rejected\", \"label\": \"已驳回\"},\n {\"code\": \"reservation_pending\", \"label\": \"待确认\"},\n {\"code\": \"reservation_reserved\", \"label\": \"已预留\"},\n {\"code\": \"reservation_cancelled\", \"label\": \"已取消\"},\n {\"code\": \"reservation_expired\", \"label\": \"已超时\"},\n {\"code\": \"reservation_borrowed\", \"label\": \"已借出\"},\n {\"code\": \"fine_unpaid\", \"label\": \"未支付\"},\n {\"code\": \"fine_paid\", \"label\": \"已支付\"}\n ],\n \"actions\": [\n {\n \"code\": \"approve_borrow\",\n \"name\": \"审核通过\",\n \"from\": \"borrow_pending\",\n \"to\": \"borrow_borrowing\",\n \"actor\": \"admin\",\n \"method\": \"POST\",\n \"path\": \"/borrow-record/approve\",\n \"invalidStateMessage\": \"当前状态不能审核\",\n \"successMessage\": \"审核成功\",\n \"audit\": {\"userField\": \"approve_user_id\", \"timeField\": \"approve_time\"},\n \"effects\": [\n {\n \"type\": \"decrease\",\n \"table\": \"book_info\",\n \"relationField\": \"book_id\",\n \"field\": \"stock\",\n \"amount\": \"1\",\n \"min\": \"0\",\n \"notFoundMessage\": \"图书不存在\",\n \"errorMessage\": \"图书库存不足\"\n }\n ],\n \"button\": {\n \"scope\": \"admin\",\n \"pageCode\": \"borrow_admin_page\",\n \"slot\": \"list.rowActions\",\n \"type\": \"success\",\n \"confirm\": \"确认审核通过吗?\",\n \"order\": 10\n }\n },\n {\n \"code\": \"reject_borrow\",\n \"name\": \"驳回\",\n \"from\": \"borrow_pending\",\n \"to\": \"borrow_rejected\",\n \"actor\": \"admin\",\n \"method\": \"POST\",\n \"path\": \"/borrow-record/reject\",\n \"invalidStateMessage\": \"当前状态不能驳回\",\n \"successMessage\": \"已驳回\",\n \"effects\": [],\n \"button\": {\n \"scope\": \"admin\",\n \"pageCode\": \"borrow_admin_page\",\n \"slot\": \"list.rowActions\",\n \"type\": \"danger\",\n \"confirm\": \"确认驳回吗?\",\n \"order\": 20\n }\n },\n {\n \"code\": \"return_book\",\n \"name\": \"还书\",\n \"from\": \"borrow_borrowing\",\n \"to\": \"borrow_returned\",\n \"actor\": \"admin\",\n \"method\": \"POST\",\n \"path\": \"/borrow-record/return\",\n \"invalidStateMessage\": \"当前状态不能还书\",\n \"successMessage\": \"还书成功\",\n \"effects\": [\n {\n \"type\": \"increase\",\n \"table\": \"book_info\",\n \"relationField\": \"book_id\",\n \"field\": \"stock\",\n \"amount\": \"1\",\n \"notFoundMessage\": \"图书不存在\",\n \"errorMessage\": \"库存增加失败\"\n }\n ],\n \"button\": {\n \"scope\": \"admin\",\n \"pageCode\": \"borrow_admin_page\",\n \"slot\": \"list.rowActions\",\n \"type\": \"primary\",\n \"confirm\": \"确认还书吗?\",\n \"order\": 30\n }\n },\n {\n \"code\": \"confirm_reservation\",\n \"name\": \"确认到馆\",\n \"from\": \"reservation_pending\",\n \"to\": \"reservation_reserved\",\n \"actor\": \"admin\",\n \"method\": \"POST\",\n \"path\": \"/reservation/confirm\",\n \"invalidStateMessage\": \"当前预约状态不能确认\",\n \"successMessage\": \"已确认到馆\",\n \"effects\": [],\n \"button\": {\n \"scope\": \"admin\",\n \"pageCode\": \"reservation_admin_page\",\n \"slot\": \"list.rowActions\",\n \"type\": \"success\",\n \"confirm\": \"确认该预约图书已到馆吗?\",\n \"order\": 10\n }\n },\n {\n \"code\": \"cancel_reservation\",\n \"name\": \"取消预约\",\n \"from\": \"reservation_pending\",\n \"to\": \"reservation_cancelled\",\n \"actor\": \"admin\",\n \"method\": \"POST\",\n \"path\": \"/reservation/cancel\",\n \"invalidStateMessage\": \"当前预约状态不能取消\",\n \"successMessage\": \"已取消预约\",\n \"effects\": [],\n \"button\": {\n \"scope\": \"admin\",\n \"pageCode\": \"reservation_admin_page\",\n \"slot\": \"list.rowActions\",\n \"type\": \"warning\",\n \"confirm\": \"确认取消该预约吗?\",\n \"order\": 20\n }\n },\n {\n \"code\": \"borrow_from_reservation\",\n \"name\": \"借出预约图书\",\n \"from\": \"reservation_reserved\",\n \"to\": \"reservation_borrowed\",\n \"actor\": \"admin\",\n \"method\": \"POST\",\n \"path\": \"/reservation/borrow\",\n \"invalidStateMessage\": \"当前预约状态不能借出\",\n \"successMessage\": \"借出成功\",\n \"effects\": [\n {\n \"type\": \"create_record\",\n \"table\": \"borrow_record\",\n \"values\": {\n \"user_id\": \"currentUserId\",\n \"book_id\": \"record.book_id\",\n \"status\": \"borrow_borrowing\",\n \"start_time\": \"now\",\n \"due_time\": \"now\",\n \"admin_id\": \"currentUserId\"\n }\n },\n {\n \"type\": \"decrease\",\n \"table\": \"book_info\",\n \"relationField\": \"book_id\",\n \"field\": \"stock\",\n \"amount\": \"1\",\n \"min\": \"0\",\n \"notFoundMessage\": \"图书不存在\",\n \"errorMessage\": \"图书库存不足\"\n }\n ],\n \"button\": {\n \"scope\": \"admin\",\n \"pageCode\": \"reservation_admin_page\",\n \"slot\": \"list.rowActions\",\n \"type\": \"primary\",\n \"confirm\": \"确认借出该预约图书吗?\",\n \"order\": 30\n }\n },\n {\n \"code\": \"pay_fine\",\n \"name\": \"缴纳罚款\",\n \"from\": \"fine_unpaid\",\n \"to\": \"fine_paid\",\n \"actor\": \"reader\",\n \"method\": \"POST\",\n \"path\": \"/fine/pay\",\n \"invalidStateMessage\": \"该罚款已支付或无需缴纳\",\n \"successMessage\": \"缴纳成功\",\n \"effects\": [],\n \"button\": {\n \"scope\": \"current_user\",\n \"pageCode\": \"my_fines_page\",\n \"slot\": \"list.rowActions\",\n \"type\": \"primary\",\n \"confirm\": \"确认缴纳该笔罚款吗?\",\n \"order\": 10\n }\n }\n ],\n \"metrics\": [\n {\"code\": \"total_books\", \"name\": \"图书总数\", \"table\": \"book_info\", \"aggregate\": \"count\", \"field\": \"id\", \"unit\": \"本\"},\n {\"code\": \"total_borrowed\", \"name\": \"借阅数量\", \"table\": \"borrow_record\", \"aggregate\": \"count\", \"field\": \"id\", \"status\": \"borrow_borrowing\", \"unit\": \"条\"},\n {\"code\": \"total_readers\", \"name\": \"读者总数\", \"table\": \"reader\", \"aggregate\": \"count\", \"field\": \"id\", \"unit\": \"人\"},\n {\"code\": \"unpaid_fines\", \"name\": \"未缴罚款总额\", \"table\": \"fine_record\", \"aggregate\": \"sum\", \"field\": \"amount\", \"status\": \"fine_unpaid\", \"unit\": \"元\"}\n ]\n}', '1', NULL, 114755, '2026-07-14 15:55:26');
INSERT INTO `factory_ai_stage_output` VALUES (108, 102, 102, 100, 'database', '{\"mode\":\"generate\",\"projectName\":\"图书管理系统\",\"projectDescription\":\"项目定位:面向高校图书馆的图书管理系统,用于读者借阅预约、管理员日常管理和系统管理员后台维护。 \\n角色读者、管理员。 \\n核心流程读者查询图书并发起借阅/预约请求管理员审核并完成借出状态变为已借出读者还书时管理员处理并更新图书状态为可借预约图书到馆后保留2天超时自动释放借阅超期生成罚款读者可通过管理台缴纳。 \\n关键规则每位读者最多同时借阅5本每本借阅期限30天超期每天罚款0.5元预约图书保留2天图书总数固定可借数量随借出减少还书后恢复。 \\n异常边界可借数量为0时无法借阅/预约;已借出状态不得重复借出;预约取消后释放名额;超期未还时借阅入口禁用;若读者已有同本书未还,不可再次借阅。\",\"industryTemplate\":\"\",\"stylePreset\":\"dark-tech\",\"extraRequirements\":\"\",\"confirmedAppBlueprint\":{\"adminHomeDashboard\":{\"charts\":[{\"code\":\"borrow_trend\",\"filters\":[],\"metrics\":[],\"semantic\":\"order\",\"tableName\":\"borrow_record\",\"type\":\"line\"},{\"code\":\"book_category_distribution\",\"filters\":[],\"metrics\":[],\"semantic\":\"content\",\"tableName\":\"book_info\",\"type\":\"pie\"}],\"description\":\"核心业务数据\",\"metrics\":[{\"aggregate\":\"count\",\"code\":\"total_books\",\"filters\":[],\"semantic\":\"content\",\"tableName\":\"book_info\"},{\"aggregate\":\"count\",\"code\":\"total_borrowed\",\"filters\":[],\"semantic\":\"order\",\"tableName\":\"borrow_record\"},{\"aggregate\":\"count\",\"code\":\"total_readers\",\"filters\":[],\"semantic\":\"user\",\"tableName\":\"reader\"},{\"aggregate\":\"sum\",\"code\":\"unpaid_fines\",\"field\":\"amount\",\"filters\":[],\"semantic\":\"money\",\"tableName\":\"fine_record\"}],\"title\":\"运营总览\"},\"adminMenus\":[{\"code\":\"book_admin\",\"dataScope\":\"ROLE\",\"name\":\"图书管理\",\"pageCode\":\"book_admin_page\",\"pageType\":\"list\",\"path\":\"/admin/books\",\"requiresLogin\":true,\"tableName\":\"book_info\",\"visibleRoles\":[\"admin\"]},{\"code\":\"borrow_admin\",\"dataScope\":\"ROLE\",\"name\":\"借阅管理\",\"pageCode\":\"borrow_admin_page\",\"pageType\":\"list\",\"path\":\"/admin/borrows\",\"requiresLogin\":true,\"tableName\":\"borrow_record\",\"visibleRoles\":[\"admin\"]},{\"code\":\"reservation_admin\",\"dataScope\":\"ROLE\",\"name\":\"预约管理\",\"pageCode\":\"reservation_admin_page\",\"pageType\":\"list\",\"path\":\"/admin/reservations\",\"requiresLogin\":true,\"tableName\":\"reservation_record\",\"visibleRoles\":[\"admin\"]},{\"code\":\"fine_admin\",\"dataScope\":\"ROLE\",\"name\":\"罚款管理\",\"pageCode\":\"fine_admin_page\",\"pageType\":\"list\",\"path\":\"/admin/fines\",\"requiresLogin\":true,\"tableName\":\"fine_record\",\"visibleRoles\":[\"admin\"]},{\"code\":\"reader_admin\",\"dataScope\":\"ROLE\",\"name\":\"读者管理\",\"pageCode\":\"reader_admin_page\",\"pageType\":\"list\",\"path\":\"/admin/readers\",\"requiresLogin\":true,\"tableName\":\"reader\",\"visibleRoles\":[\"admin\"]},{\"code\":\"admin_admin\",\"dataScope\":\"ROLE\",\"name\":\"管理员管理\",\"pageCode\":\"admin_admin_page\",\"pageType\":\"list\",\"path\":\"/admin/admins\",\"requiresLogin\":true,\"tableName\":\"admin\",\"visibleRoles\":[\"admin\"]},{\"code\":\"admin_profile\",\"dataScope\":\"CURRENT_USER\",\"name\":\"个人资料\",\"pageCode\":\"admin_profile_page\",\"pageType\":\"form\",\"path\":\"/admin/profile\",\"requiresLogin\":true,\"tableName\":\"admin\",\"visibleRoles\":[\"admin\"]}],\"frontendMenus\":[{\"code\":\"book_catalog\",\"dataScope\":\"PUBLIC\",\"name\":\"图书目录\",\"pageCode\":\"book_catalog_page\",\"pageType\":\"\",\"path\":\"/books\",\"requiresLogin\":false,\"tableName\":\"\",\"visibleRoles\":[]},{\"code\":\"my_borrows\",\"dataScope\":\"CURRENT_USER\",\"name\":\"我的借阅\",\"pageCode\":\"my_borrows_page\",\"pageType\":\"\",\"path\":\"/borrows\",\"requiresLogin\":true,\"tableName\":\"\",\"visibleRoles\":[\"reader\"]},{\"code\":\"my_reservations\",\"dataScope\":\"CURRENT_USER\",\"name\":\"我的预约\",\"pageCode\":\"my_reservations_page\",\"pageType\":\"\",\"path\":\"/reservations\",\"requiresLogin\":true,\"tableName\":\"\",\"visibleRoles\":[\"reader\"]},{\"code\":\"my_fines\",\"dataScope\":\"CURRENT_USER\",\"name\":\"我的罚款\",\"pageCode\":\"my_fines_page\",\"pageType\":\"\",\"path\":\"/fines\",\"requiresLogin\":true,\"tableName\":\"\",\"visibleRoles\":[\"reader\"]},{\"code\":\"reader_profile\",\"dataScope\":\"CURRENT_USER\",\"name\":\"个人资料\",\"pageCode\":\"reader_profile_page\",\"pageType\":\"\",\"path\":\"/profile\",\"requiresLogin\":true,\"tableName\":\"\",\"visibleRoles\":[\"reader\"]}],\"frontendPages\":[{\"code\":\"book_catalog_page\",\"menuCode\":\"book_catalog\",\"name\":\"图书目录\",\"pageType\":\"list\",\"parentPageCode\":\"\",\"path\":\"/books\",\"tableName\":\"book_info\"},{\"code\":\"book_detail_page\",\"menuCode\":\"book_catalog\",\"name\":\"图书详情\",\"pageType\":\"detail\",\"parentPageCode\":\"\",\"path\":\"/books/:id\",\"tableName\":\"book_info\"},{\"code\":\"my_borrows_page\",\"menuCode\":\"my_borrows\",\"name\":\"我的借阅\",\"pageType\":\"current_user_list\",\"parentPageCode\":\"\",\"path\":\"/borrows\",\"tableName\":\"borrow_record\"},{\"code\":\"my_reservations_page\",\"menuCode\":\"my_reservations\",\"name\":\"我的预约\",\"pageType\":\"current_user_list\",\"parentPageCode\":\"\",\"path\":\"/reservations\",\"tableName\":\"reservation_record\"},{\"code\":\"my_fines_page\",\"menuCode\":\"my_fines\",\"name\":\"我的罚款\",\"pageType\":\"current_user_list\",\"parentPageCode\":\"\",\"path\":\"/fines\",\"tableName\":\"fine_record\"},{\"code\":\"reader_profile_page\",\"menuCode\":\"reader_profile\",\"name\":\"个人资料\",\"pageType\":\"form\",\"parentPageCode\":\"\",\"path\":\"/profile\",\"tableName\":\"reader\"}],\"roles\":[{\"code\":\"reader\",\"description\":\"可以查询图书、借阅、预约、查看个人记录并缴纳罚款\",\"name\":\"读者\"},{\"code\":\"admin\",\"description\":\"系统管理员,管理图书、借阅、预约、读者及罚款\",\"name\":\"管理员\"}]},\"flowConfig\":{\"actions\":[{\"actor\":\"admin\",\"audit\":{\"timeField\":\"approve_time\",\"userField\":\"approve_user_id\"},\"button\":{\"confirm\":\"确认审核通过吗?\",\"order\":10,\"pageCode\":\"borrow_admin_page\",\"scope\":\"admin\",\"slot\":\"list.rowActions\",\"type\":\"success\"},\"code\":\"approve_borrow\",\"effects\":[{\"amount\":\"1\",\"errorMessage\":\"图书库存不足\",\"field\":\"stock\",\"min\":\"0\",\"notFoundMessage\":\"图书不存在\",\"relationField\":\"book_id\",\"table\":\"book_info\",\"type\":\"decrease\",\"values\":{}}],\"from\":\"borrow_pending\",\"invalidStateMessage\":\"当前状态不能审核\",\"method\":\"POST\",\"name\":\"审核通过\",\"path\":\"/borrow-record/approve\",\"successMessage\":\"审核成功\",\"to\":\"borrow_borrowing\"},{\"actor\":\"admin\",\"button\":{\"confirm\":\"确认驳回吗?\",\"order\":20,\"pageCode\":\"borrow_admin_page\",\"scope\":\"admin\",\"slot\":\"list.rowActions\",\"type\":\"danger\"},\"code\":\"reject_borrow\",\"effects\":[],\"from\":\"borrow_pending\",\"invalidStateMessage\":\"当前状态不能驳回\",\"method\":\"POST\",\"name\":\"驳回\",\"path\":\"/borrow-record/reject\",\"successMessage\":\"已驳回\",\"to\":\"borrow_rejected\"},{\"actor\":\"admin\",\"button\":{\"confirm\":\"确认还书吗?\",\"order\":30,\"pageCode\":\"borrow_admin_page\",\"scope\":\"admin\",\"slot\":\"list.rowActions\",\"type\":\"primary\"},\"code\":\"return_book\",\"effects\":[{\"amount\":\"1\",\"errorMessage\":\"库存增加失败\",\"field\":\"stock\",\"min\":\"0\",\"notFoundMessage\":\"图书不存在\",\"relationField\":\"book_id\",\"table\":\"book_info\",\"type\":\"increase\",\"values\":{}}],\"from\":\"borrow_borrowing\",\"invalidStateMessage\":\"当前状态不能还书\",\"method\":\"POST\",\"name\":\"还书\",\"path\":\"/borrow-record/return\",\"successMessage\":\"还书成功\",\"to\":\"borrow_returned\"},{\"actor\":\"admin\",\"button\":{\"confirm\":\"确认该预约图书已到馆吗?\",\"order\":10,\"pageCode\":\"reservation_admin_page\",\"scope\":\"admin\",\"slot\":\"list.rowActions\",\"type\":\"success\"},\"code\":\"confirm_reservation\",\"effects\":[],\"from\":\"reservation_pending\",\"invalidStateMessage\":\"当前预约状态不能确认\",\"method\":\"POST\",\"name\":\"确认到馆\",\"path\":\"/reservation/confirm\",\"successMessage\":\"已确认到馆\",\"to\":\"reservation_reserved\"},{\"actor\":\"admin\",\"button\":{\"confirm\":\"确认取消该预约吗?\",\"order\":20,\"pageCode\":\"reservation_admin_page\",\"scope\":\"admin\",\"slot\":\"list.rowActions\",\"type\":\"warning\"},\"code\":\"cancel_reservation\",\"effects\":[],\"from\":\"reservation_pending\",\"invalidStateMessage\":\"当前预约状态不能取消\",\"method\":\"POST\",\"name\":\"取消预约\",\"path\":\"/reservation/cancel\",\"successMessage\":\"已取消预约\",\"to\":\"reservation_cancelled\"},{\"actor\":\"admin\",\"button\":{\"confirm\":\"确认借出该预约图书吗?\",\"order\":30,\"pageCode\":\"reservation_admin_page\",\"scope\":\"admin\",\"slot\":\"list.rowActions\",\"type\":\"primary\"},\"code\":\"borrow_from_reservation\",\"effects\":[{\"amount\":\"1\",\"min\":\"0\",\"table\":\"borrow_record\",\"type\":\"create_record\",\"values\":{\"start_time\":\"now\",\"due_time\":\"now\",\"user_id\":\"currentUserId\",\"admin_id\":\"currentUserId\",\"book_id\":\"record.book_id\",\"status\":\"borrow_borrowing\"}},{\"amount\":\"1\",\"errorMessage\":\"图书库存不足\",\"field\":\"stock\",\"min\":\"0\",\"notFoundMessage\":\"图书不存在\",\"relationField\":\"book_id\",\"table\":\"book_info\",\"type\":\"decrease\",\"values\":{}}],\"from\":\"reservation_reserved\",\"invalidStateMessage\":\"当前预约状态不能借出\",\"method\":\"POST\",\"name\":\"借出预约图书\",\"path\":\"/reservation/borrow\",\"successMessage\":\"借出成功\",\"to\":\"reservation_borrowed\"},{\"actor\":\"reader\",\"button\":{\"confirm\":\"确认缴纳该笔罚款吗?\",\"order\":10,\"pageCode\":\"my_fines_page\",\"scope\":\"current_user\",\"slot\":\"list.rowActions\",\"type\":\"primary\"},\"code\":\"pay_fine\",\"effects\":[],\"from\":\"fine_unpaid\",\"invalidStateMessage\":\"该罚款已支付或无需缴纳\",\"method\":\"POST\",\"name\":\"缴纳罚款\",\"path\":\"/fine/pay\",\"successMessage\":\"缴纳成功\",\"to\":\"fine_paid\"}],\"code\":\"library_manage\",\"mainTable\":\"borrow_record\",\"metrics\":[{\"aggregate\":\"count\",\"code\":\"total_books\",\"field\":\"id\",\"name\":\"图书总数\",\"table\":\"book_info\",\"unit\":\"本\"},{\"aggregate\":\"count\",\"code\":\"total_borrowed\",\"field\":\"id\",\"name\":\"借阅数量\",\"status\":\"borrow_borrowing\",\"table\":\"borrow_record\",\"unit\":\"条\"},{\"aggregate\":\"count\",\"code\":\"total_readers\",\"field\":\"id\",\"name\":\"读者总数\",\"table\":\"reader\",\"unit\":\"人\"},{\"aggregate\":\"sum\",\"code\":\"unpaid_fines\",\"field\":\"amount\",\"name\":\"未缴罚款总额\",\"status\":\"fine_unpaid\",\"table\":\"fine_record\",\"unit\":\"元\"}],\"name\":\"图书管理系统\",\"notFoundMessage\":\"主记录不存在\",\"states\":[{\"code\":\"borrow_pending\",\"label\":\"待审核\"},{\"code\":\"borrow_borrowing\",\"label\":\"借阅中\"},{\"code\":\"borrow_returned\",\"label\":\"已归还\"},{\"code\":\"borrow_rejected\",\"label\":\"已驳回\"},{\"code\":\"reservation_pending\",\"label\":\"待确认\"},{\"code\":\"reservation_reserved\",\"label\":\"已预留\"},{\"code\":\"reservation_cancelled\",\"label\":\"已取消\"},{\"code\":\"reservation_expired\",\"label\":\"已超时\"},{\"code\":\"reservation_borrowed\",\"label\":\"已借出\"},{\"code\":\"fine_unpaid\",\"label\":\"未支付\"},{\"code\":\"fine_paid\",\"label\":\"已支付\"}],\"statusField\":\"status\",\"version\":\"1.0\"},\"compiledFlowContract\":{\"acceptanceScenarios\":[],\"actions\":[{\"actor\":\"admin\",\"code\":\"approve_borrow\",\"name\":\"审核通过\",\"ownerObject\":\"borrow_record\",\"ownerTable\":\"borrow_record\",\"preconditions\":[],\"quantityEffects\":[{\"actionCode\":\"approve_borrow\",\"amount\":\"1\",\"effectType\":\"decrease\",\"objectCode\":\"book_info\",\"quantityField\":\"stock\",\"tableName\":\"book_info\"}],\"recordEffects\":[],\"required\":true,\"stateTransitions\":[{\"actionCode\":\"approve_borrow\",\"fromState\":\"borrow_pending\",\"toState\":\"borrow_borrowing\"}]},{\"actor\":\"admin\",\"code\":\"reject_borrow\",\"name\":\"驳回\",\"ownerObject\":\"borrow_record\",\"ownerTable\":\"borrow_record\",\"preconditions\":[],\"quantityEffects\":[],\"recordEffects\":[],\"required\":true,\"stateTransitions\":[{\"actionCode\":\"reject_borrow\",\"fromState\":\"borrow_pending\",\"toState\":\"borrow_rejected\"}]},{\"actor\":\"admin\",\"code\":\"return_book\",\"name\":\"还书\",\"ownerObject\":\"borrow_record\",\"ownerTable\":\"borrow_record\",\"preconditions\":[],\"quantityEffects\":[{\"actionCode\":\"return_book\",\"amount\":\"1\",\"effectType\":\"increase\",\"objectCode\":\"book_info\",\"quantityField\":\"stock\",\"tableName\":\"book_info\"}],\"recordEffects\":[],\"required\":true,\"stateTransitions\":[{\"actionCode\":\"return_book\",\"fromState\":\"borrow_borrowing\",\"toState\":\"borrow_returned\"}]},{\"actor\":\"admin\",\"code\":\"confirm_reservation\",\"name\":\"确认到馆\",\"ownerObject\":\"borrow_record\",\"ownerTable\":\"borrow_record\",\"preconditions\":[],\"quantityEffects\":[],\"recordEffects\":[],\"required\":true,\"stateTransitions\":[{\"actionCode\":\"confirm_reservation\",\"fromState\":\"reservation_pending\",\"toState\":\"reservation_reserved\"}]},{\"actor\":\"admin\",\"code\":\"cancel_reservation\",\"name\":\"取消预约\",\"ownerObject\":\"borrow_record\",\"ownerTable\":\"borrow_record\",\"preconditions\":[],\"quantityEffects\":[],\"recordEffects\":[],\"required\":true,\"stateTransitions\":[{\"actionCode\":\"cancel_reservation\",\"fromState\":\"reservation_pending\",\"toState\":\"reservation_cancelled\"}]},{\"actor\":\"admin\",\"code\":\"borrow_from_reservation\",\"name\":\"借出预约图书\",\"ownerObject\":\"borrow_record\",\"ownerTable\":\"borrow_record\",\"preconditions\":[],\"quantityEffects\":[{\"actionCode\":\"borrow_from_reservation\",\"amount\":\"1\",\"effectType\":\"decrease\",\"objectCode\":\"book_info\",\"quantityField\":\"stock\",\"tableName\":\"book_info\"}],\"recordEffects\":[],\"required\":true,\"stateTransitions\":[{\"actionCode\":\"borrow_from_reservation\",\"fromState\":\"reservation_reserved\",\"toState\":\"reservation_borrowed\"}]},{\"actor\":\"reader\",\"code\":\"pay_fine\",\"name\":\"缴纳罚款\",\"ownerObject\":\"borrow_record\",\"ownerTable\":\"borrow_record\",\"preconditions\":[],\"quantityEffects\":[],\"recordEffects\":[],\"required\":true,\"stateTransitions\":[{\"actionCode\":\"pay_fine\",\"fromState\":\"fine_unpaid\",\"toState\":\"fine_paid\"}]}],\"businessPolicies\":[],\"coreObjects\":[{\"code\":\"borrow_record\",\"name\":\"图书管理系统\",\"objectType\":\"main\",\"tableName\":\"borrow_record\"},{\"code\":\"book_info\",\"name\":\"book_info\",\"objectType\":\"related\",\"tableName\":\"book_info\"}],\"domainName\":\"图书管理系统\",\"metrics\":[{\"aggregate\":\"count\",\"code\":\"total_books\",\"field\":\"id\",\"filters\":[],\"name\":\"图书总数\",\"relatedActionCodes\":[],\"required\":true,\"tableName\":\"book_info\",\"unit\":\"本\"},{\"aggregate\":\"count\",\"code\":\"total_borrowed\",\"field\":\"id\",\"filters\":[{\"field\":\"status\",\"operator\":\"eq\",\"values\":[\"borrow_borrowing\"]}],\"name\":\"借阅数量\",\"relatedActionCodes\":[],\"required\":true,\"tableName\":\"borrow_record\",\"unit\":\"条\"},{\"aggregate\":\"count\",\"code\":\"total_readers\",\"field\":\"id\",\"filters\":[],\"name\":\"读者总数\",\"relatedActionCodes\":[],\"required\":true,\"tableName\":\"reader\",\"unit\":\"人\"},{\"aggregate\":\"sum\",\"code\":\"unpaid_fines\",\"field\":\"amount\",\"filters\":[{\"field\":\"status\",\"operator\":\"eq\",\"values\":[\"fine_unpaid\"]}],\"name\":\"未缴罚款总额\",\"relatedActionCodes\":[],\"required\":true,\"tableName\":\"fine_record\",\"unit\":\"元\"}],\"pageBindings\":[{\"actionCode\":\"approve_borrow\",\"pageCode\":\"borrow_admin_page\",\"slot\":\"list.rowActions\",\"tableName\":\"borrow_record\",\"target\":\"admin\"},{\"actionCode\":\"reject_borrow\",\"pageCode\":\"borrow_admin_page\",\"slot\":\"list.rowActions\",\"tableName\":\"borrow_record\",\"target\":\"admin\"},{\"actionCode\":\"return_book\",\"pageCode\":\"borrow_admin_page\",\"slot\":\"list.rowActions\",\"tableName\":\"borrow_record\",\"target\":\"admin\"},{\"actionCode\":\"confirm_reservation\",\"pageCode\":\"reservation_admin_page\",\"slot\":\"list.rowActions\",\"tableName\":\"borrow_record\",\"target\":\"admin\"},{\"actionCode\":\"cancel_reservation\",\"pageCode\":\"reservation_admin_page\",\"slot\":\"list.rowActions\",\"tableName\":\"borrow_record\",\"target\":\"admin\"},{\"actionCode\":\"borrow_from_reservation\",\"pageCode\":\"reservation_admin_page\",\"slot\":\"list.rowActions\",\"tableName\":\"borrow_record\",\"target\":\"admin\"},{\"actionCode\":\"pay_fine\",\"pageCode\":\"my_fines_page\",\"slot\":\"list.rowActions\",\"tableName\":\"borrow_record\",\"target\":\"current_user\"}],\"quantityRules\":[{\"actionCode\":\"approve_borrow\",\"amount\":\"1\",\"effectType\":\"decrease\",\"objectCode\":\"book_info\",\"quantityField\":\"stock\",\"tableName\":\"book_info\"},{\"actionCode\":\"return_book\",\"amount\":\"1\",\"effectType\":\"increase\",\"objectCode\":\"book_info\",\"quantityField\":\"stock\",\"tableName\":\"book_info\"},{\"actionCode\":\"borrow_from_reservation\",\"amount\":\"1\",\"effectType\":\"decrease\",\"objectCode\":\"book_info\",\"quantityField\":\"stock\",\"tableName\":\"book_info\"}],\"recordRules\":[],\"stateMachines\":[{\"objectCode\":\"borrow_record\",\"states\":[\"borrow_pending\",\"borrow_borrowing\",\"borrow_returned\",\"borrow_rejected\",\"reservation_pending\",\"reservation_reserved\",\"reservation_cancelled\",\"reservation_expired\",\"reservation_borrowed\",\"fine_unpaid\",\"fine_paid\"],\"statusField\":\"status\",\"tableName\":\"borrow_record\",\"transitions\":[{\"actionCode\":\"approve_borrow\",\"fromState\":\"borrow_pending\",\"toState\":\"borrow_borrowing\"},{\"actionCode\":\"reject_borrow\",\"fromState\":\"borrow_pending\",\"toState\":\"borrow_rejected\"},{\"actionCode\":\"return_book\",\"fromState\":\"borrow_borrowing\",\"toState\":\"borrow_returned\"},{\"actionCode\":\"confirm_reservation\",\"fromState\":\"reservation_pending\",\"toState\":\"reservation_reserved\"},{\"actionCode\":\"cancel_reservation\",\"fromState\":\"reservation_pending\",\"toState\":\"reservation_cancelled\"},{\"actionCode\":\"borrow_from_reservation\",\"fromState\":\"reservation_reserved\",\"toState\":\"reservation_borrowed\"},{\"actionCode\":\"pay_fine\",\"fromState\":\"fine_unpaid\",\"toState\":\"fine_paid\"}]}]},\"canonicalTableRegistry\":[\"book_info\",\"borrow_record\",\"reservation_record\",\"fine_record\",\"reader\",\"admin\"],\"limits\":{\"maxTables\":12,\"maxColumnsPerTable\":30}}', '{\n \"tables\": [\n {\n \"tableName\": \"book_info\",\n \"tableComment\": \"图书信息表\",\n \"adminMenuName\": \"图书信息\",\n \"operations\": {\n \"add\": true,\n \"edit\": true,\n \"remove\": true,\n \"removeType\": \"physical\",\n \"reason\": \"\"\n },\n \"columns\": [\n {\n \"columnName\": \"id\",\n \"columnLabel\": \"ID\",\n \"columnComment\": \"主键ID\",\n \"columnType\": \"bigint(20)\",\n \"isPk\": \"1\",\n \"isIncrement\": \"1\",\n \"isRequired\": \"1\"\n },\n {\n \"columnName\": \"title\",\n \"columnLabel\": \"书名\",\n \"columnComment\": \"图书名称\",\n \"columnType\": \"varchar(200)\",\n \"isPk\": \"0\",\n \"isIncrement\": \"0\",\n \"isRequired\": \"1\"\n },\n {\n \"columnName\": \"author\",\n \"columnLabel\": \"作者\",\n \"columnComment\": \"图书作者\",\n \"columnType\": \"varchar(100)\",\n \"isPk\": \"0\",\n \"isIncrement\": \"0\",\n \"isRequired\": \"1\"\n },\n {\n \"columnName\": \"isbn\",\n \"columnLabel\": \"ISBN\",\n \"columnComment\": \"国际标准书号\",\n \"columnType\": \"varchar(20)\",\n \"isPk\": \"0\",\n \"isIncrement\": \"0\",\n \"isRequired\": \"0\"\n },\n {\n \"columnName\": \"publisher\",\n \"columnLabel\": \"出版社\",\n \"columnComment\": \"出版社名称\",\n \"columnType\": \"varchar(100)\",\n \"isPk\": \"0\",\n \"isIncrement\": \"0\",\n \"isRequired\": \"0\"\n },\n {\n \"columnName\": \"publish_date\",\n \"columnLabel\": \"出版日期\",\n \"columnComment\": \"图书出版日期\",\n \"columnType\": \"date\",\n \"isPk\": \"0\",\n \"isIncrement\": \"0\",\n \"isRequired\": \"0\"\n },\n {\n \"columnName\": \"category\",\n \"columnLabel\": \"分类\",\n \"columnComment\": \"图书分类\",\n \"columnType\": \"varchar(50)\",\n \"isPk\": \"0\",\n \"isIncrement\": \"0\",\n \"isRequired\": \"0\",\n \"htmlType\": \"select\",\n \"dictType\": \"book_category\",\n \"dictOptions\": [\n {\"value\": \"literature\", \"label\": \"文学\"},\n {\"value\": \"science\", \"label\": \"科学\"},\n {\"value\": \"history\", \"label\": \"历史\"},\n {\"value\": \"technology\", \"label\": \"技术\"}\n ]\n },\n {\n \"columnName\": \"stock\",\n \"columnLabel\": \"可借数量\",\n \"columnComment\": \"当前可借出的图书数量\",\n \"columnType\": \"int(11)\",\n \"isPk\": \"0\",\n \"isIncrement\": \"0\",\n \"isRequired\": \"1\",\n \"defaultValue\": \"0\"\n },\n {\n \"columnName\": \"cover_image\",\n \"columnLabel\": \"封面图片\",\n \"columnComment\": \"图书封面图片URL\",\n \"columnType\": \"varchar(255)\",\n \"isPk\": \"0\",\n \"isIncrement\": \"0\",\n \"isRequired\": \"0\",\n \"htmlType\": \"imageUpload\"\n },\n {\n \"columnName\": \"description\",\n \"columnLabel\": \"简介\",\n \"columnComment\": \"图书内容简介\",\n \"columnType\": \"text\",\n \"isPk\": \"0\",\n \"isIncrement\": \"0\",\n \"isRequired\": \"0\",\n \"htmlType\": \"editor\"\n }\n ]\n },\n {\n \"tableName\": \"borrow_record\",\n \"tableComment\": \"借阅记录表\",\n \"adminMenuName\": \"借阅记录\",\n \"operations\": {\n \"add\": true,\n \"edit\": false,\n \"remove\": false,\n \"removeType\": \"physical\",\n \"reason\": \"借阅记录仅新增,不可编辑或删除\"\n },\n \"columns\": [\n {\n \"columnName\": \"id\",\n \"columnLabel\": \"ID\",\n \"columnComment\": \"主键ID\",\n \"columnType\": \"bigint(20)\",\n \"isPk\": \"1\",\n \"isIncrement\": \"1\",\n \"isRequired\": \"1\"\n },\n {\n \"columnName\": \"user_id\",\n \"columnLabel\": \"读者\",\n \"columnComment\": \"借阅读者ID关联读者表\",\n \"columnType\": \"bigint(20)\",\n \"isPk\": \"0\",\n \"isIncrement\": \"0\",\n \"isRequired\": \"1\",\n \"htmlType\": \"select\",\n \"dictType\": \"remote:reader:id:username\"\n },\n {\n \"columnName\": \"book_id\",\n \"columnLabel\": \"图书\",\n \"columnComment\": \"借阅图书ID关联图书信息表\",\n \"columnType\": \"bigint(20)\",\n \"isPk\": \"0\",\n \"isIncrement\": \"0\",\n \"isRequired\": \"1\",\n \"htmlType\": \"select\",\n \"dictType\": \"remote:book_info:id:title\"\n },\n {\n \"columnName\": \"admin_id\",\n \"columnLabel\": \"管理员\",\n \"columnComment\": \"处理借阅的管理员ID关联管理员表\",\n \"columnType\": \"bigint(20)\",\n \"isPk\": \"0\",\n \"isIncrement\": \"0\",\n \"isRequired\": \"0\",\n \"htmlType\": \"select\",\n \"dictType\": \"remote:admin:id:username\"\n },\n {\n \"columnName\": \"start_time\",\n \"columnLabel\": \"借出时间\",\n \"columnComment\": \"借阅开始时间\",\n \"columnType\": \"datetime\",\n \"isPk\": \"0\",\n \"isIncrement\": \"0\",\n \"isRequired\": \"1\"\n },\n {\n \"columnName\": \"due_time\",\n \"columnLabel\": \"应还时间\",\n \"columnComment\": \"应归还日期借出后30天\",\n \"columnType\": \"datetime\",\n \"isPk\": \"0\",\n \"isIncrement\": \"0\",\n \"isRequired\": \"1\"\n },\n {\n \"columnName\": \"return_time\",\n \"columnLabel\": \"实际归还时间\",\n \"columnComment\": \"实际归还日期,还书时填写\",\n \"columnType\": \"datetime\",\n \"isPk\": \"0\",\n \"isIncrement\": \"0\",\n \"isRequired\": \"0\"\n },\n {\n \"columnName\": \"status\",\n \"columnLabel\": \"状态\",\n \"columnComment\": \"借阅记录状态:待审核/借阅中/已归还/已驳回/待确认/已预留/已取消/已超时/已借出/罚款未付/罚款已付\",\n \"columnType\": \"varchar(20)\",\n \"isPk\": \"0\",\n \"isIncrement\": \"0\",\n \"isRequired\": \"1\",\n \"htmlType\": \"select\",\n \"dictType\": \"borrow_status\",\n \"dictOptions\": [\n {\"value\": \"borrow_pending\", \"label\": \"待审核\"},\n {\"value\": \"borrow_borrowing\", \"label\": \"借阅中\"},\n {\"value\": \"borrow_returned\", \"label\": \"已归还\"},\n {\"value\": \"borrow_rejected\", \"label\": \"已驳回\"},\n {\"value\": \"reservation_pending\", \"label\": \"待确认\"},\n {\"value\": \"reservation_reserved\", \"label\": \"已预留\"},\n {\"value\": \"reservation_cancelled\", \"label\": \"已取消\"},\n {\"value\": \"reservation_expired\", \"label\": \"已超时\"},\n {\"value\": \"reservation_borrowed\", \"label\": \"已借出\"},\n {\"value\": \"fine_unpaid\", \"label\": \"罚款未付\"},\n {\"value\": \"fine_paid\", \"label\": \"罚款已付\"}\n ]\n },\n {\n \"columnName\": \"create_time\",\n \"columnLabel\": \"创建时间\",\n \"columnComment\": \"记录创建时间\",\n \"columnType\": \"datetime\",\n \"isPk\": \"0\",\n \"isIncrement\": \"0\",\n \"isRequired\": \"1\"\n },\n {\n \"columnName\": \"remark\",\n \"columnLabel\": \"备注\",\n \"columnComment\": \"借阅备注信息\",\n \"columnType\": \"varchar(255)\",\n \"isPk\": \"0\",\n \"isIncrement\": \"0\",\n \"isRequired\": \"0\"\n }\n ]\n },\n {\n \"tableName\": \"reservation_record\",\n \"tableComment\": \"预约记录表\",\n \"adminMenuName\": \"预约记录\",\n \"operations\": {\n \"add\": true,\n \"edit\": false,\n \"remove\": false,\n \"removeType\": \"physical\",\n \"reason\": \"预约记录仅新增,不可编辑或删除\"\n },\n \"columns\": [\n {\n \"columnName\": \"id\",\n \"columnLabel\": \"ID\",\n \"columnComment\": \"主键ID\",\n \"columnType\": \"bigint(20)\",\n \"isPk\": \"1\",\n \"isIncrement\": \"1\",\n \"isRequired\": \"1\"\n },\n {\n \"columnName\": \"user_id\",\n \"columnLabel\": \"读者\",\n \"columnComment\": \"预约读者ID关联读者表\",\n \"columnType\": \"bigint(20)\",\n \"isPk\": \"0\",\n \"isIncrement\": \"0\",\n \"isRequired\": \"1\",\n \"htmlType\": \"select\",\n \"dictType\": \"remote:reader:id:username\"\n },\n {\n \"columnName\": \"book_id\",\n \"columnLabel\": \"图书\",\n \"columnComment\": \"预约图书ID关联图书信息表\",\n \"columnType\": \"bigint(20)\",\n \"isPk\": \"0\",\n \"isIncrement\": \"0\",\n \"isRequired\": \"1\",\n \"htmlType\": \"select\",\n \"dictType\": \"remote:book_info:id:title\"\n },\n {\n \"columnName\": \"status\",\n \"columnLabel\": \"状态\",\n \"columnComment\": \"预约记录状态:待确认/已预留/已取消/已超时/已借出\",\n \"columnType\": \"varchar(20)\",\n \"isPk\": \"0\",\n \"isIncrement\": \"0\",\n \"isRequired\": \"1\",\n \"htmlType\": \"select\",\n \"dictType\": \"reservation_status\",\n \"dictOptions\": [\n {\"value\": \"reservation_pending\", \"label\": \"待确认\"},\n {\"value\": \"reservation_reserved\", \"label\": \"已预留\"},\n {\"value\": \"reservation_cancelled\", \"label\": \"已取消\"},\n {\"value\": \"reservation_expired\", \"label\": \"已超时\"},\n {\"value\": \"reservation_borrowed\", \"label\": \"已借出\"}\n ]\n },\n {\n \"columnName\": \"create_time\",\n \"columnLabel\": \"预约时间\",\n \"columnComment\": \"预约创建时间\",\n \"columnType\": \"datetime\",\n \"isPk\": \"0\",\n \"isIncrement\": \"0\",\n \"isRequired\": \"1\"\n },\n {\n \"columnName\": \"expire_time\",\n \"columnLabel\": \"保留截止时间\",\n \"columnComment\": \"预约图书到馆后保留截止时间到馆后2天\",\n \"columnType\": \"datetime\",\n \"isPk\": \"0\",\n \"isIncrement\": \"0\",\n \"isRequired\": \"0\"\n },\n {\n \"columnName\": \"admin_id\",\n \"columnLabel\": \"处理管理员\",\n \"columnComment\": \"处理预约的管理员ID关联管理员表\",\n \"columnType\": \"bigint(20)\",\n \"isPk\": \"0\",\n \"isIncrement\": \"0\",\n \"isRequired\": \"0\",\n \"htmlType\": \"select\",\n \"dictType\": \"remote:admin:id:username\"\n },\n {\n \"columnName\": \"remark\",\n \"columnLabel\": \"备注\",\n \"columnComment\": \"预约备注信息\",\n \"columnType\": \"varchar(255)\",\n \"isPk\": \"0\",\n \"isIncrement\": \"0\",\n \"isRequired\": \"0\"\n }\n ]\n },\n {\n \"tableName\": \"fine_record\",\n \"tableComment\": \"罚款记录表\",\n \"adminMenuName\": \"罚款记录\",\n \"operations\": {\n \"add\": true,\n \"edit\": false,\n \"remove\": false,\n \"removeType\": \"physical\",\n \"reason\": \"罚款记录仅新增,不可编辑或删除\"\n },\n \"columns\": [\n {\n \"columnName\": \"id\",\n \"columnLabel\": \"ID\",\n \"columnComment\": \"主键ID\",\n \"columnType\": \"bigint(20)\",\n \"isPk\": \"1\",\n \"isIncrement\": \"1\",\n \"isRequired\": \"1\"\n },\n {\n \"columnName\": \"borrow_record_id\",\n \"columnLabel\": \"关联借阅\",\n \"columnComment\": \"关联的借阅记录ID\",\n \"columnType\": \"bigint(20)\",\n \"isPk\": \"0\",\n \"isIncrement\": \"0\",\n \"isRequired\": \"1\",\n \"htmlType\": \"select\",\n \"dictType\": \"remote:borrow_record:id:id\"\n },\n {\n \"columnName\": \"user_id\",\n \"columnLabel\": \"读者\",\n \"columnComment\": \"罚款所属读者ID关联读者表\",\n \"columnType\": \"bigint(20)\",\n \"isPk\": \"0\",\n \"isIncrement\": \"0\",\n \"isRequired\": \"1\",\n \"htmlType\": \"select\",\n \"dictType\": \"remote:reader:id:username\"\n },\n {\n \"columnName\": \"amount\",\n \"columnLabel\": \"罚款金额\",\n \"columnComment\": \"罚款金额(元)\",\n \"columnType\": \"decimal(10,2)\",\n \"isPk\": \"0\",\n \"isIncrement\": \"0\",\n \"isRequired\": \"1\"\n },\n {\n \"columnName\": \"status\",\n \"columnLabel\": \"状态\",\n \"columnComment\": \"罚款状态:未支付/已支付\",\n \"columnType\": \"varchar(20)\",\n \"isPk\": \"0\",\n \"isIncrement\": \"0\",\n \"isRequired\": \"1\",\n \"htmlType\": \"select\",\n \"dictType\": \"fine_status\",\n \"dictOptions\": [\n {\"value\": \"fine_unpaid\", \"label\": \"未支付\"},\n {\"value\": \"fine_paid\", \"label\": \"已支付\"}\n ]\n },\n {\n \"columnName\": \"create_time\",\n \"columnLabel\": \"生成时间\",\n \"columnComment\": \"罚款生成时间\",\n \"columnType\": \"datetime\",\n \"isPk\": \"0\",\n \"isIncrement\": \"0\",\n \"isRequired\": \"1\"\n },\n {\n \"columnName\": \"pay_time\",\n \"columnLabel\": \"支付时间\",\n \"columnComment\": \"罚款支付时间\",\n \"columnType\": \"datetime\",\n \"isPk\": \"0\",\n \"isIncrement\": \"0\",\n \"isRequired\": \"0\"\n }\n ]\n },\n {\n \"tableName\": \"reader\",\n \"tableComment\": \"读者账号表\",\n \"adminMenuName\": \"读者账号\",\n \"operations\": {\n \"add\": true,\n \"edit\": true,\n \"remove\": true,\n \"removeType\": \"physical\",\n \"reason\": \"\"\n },\n \"columns\": [\n {\n \"columnName\": \"id\",\n \"columnLabel\": \"读者ID\",\n \"columnComment\": \"读者主键ID\",\n \"columnType\": \"bigint(20)\",\n \"isPk\": \"1\",\n \"isIncrement\": \"1\",\n \"isRequired\": \"1\"\n },\n {\n \"columnName\": \"username\",\n \"columnLabel\": \"用户名\",\n \"columnComment\": \"读者登录用户名\",\n \"columnType\": \"varchar(50)\",\n \"isPk\": \"0\",\n \"isIncrement\": \"0\",\n \"isRequired\": \"1\"\n },\n {\n \"columnName\": \"password_hash\",\n \"columnLabel\": \"密码哈希\",\n \"columnComment\": \"读者登录密码哈希值\",\n \"columnType\": \"varchar(255)\",\n \"isPk\": \"0\",\n \"isIncrement\": \"0\",\n \"isRequired\": \"1\"\n },\n {\n \"columnName\": \"nickname\",\n \"columnLabel\": \"昵称\",\n \"columnComment\": \"读者昵称\",\n \"columnType\": \"varchar(50)\",\n \"isPk\": \"0\",\n \"isIncrement\": \"0\",\n \"isRequired\": \"1\"\n },\n {\n \"columnName\": \"status\",\n \"columnLabel\": \"状态\",\n \"columnComment\": \"读者账号状态active/inactive\",\n \"columnType\": \"varchar(20)\",\n \"isPk\": \"0\",\n \"isIncrement\": \"0\",\n \"isRequired\": \"1\",\n \"defaultValue\": \"active\",\n \"htmlType\": \"select\",\n \"dictType\": \"account_status\",\n \"dictOptions\": [\n {\"value\": \"active\", \"label\": \"正常\"},\n {\"value\": \"inactive\", \"label\": \"停用\"}\n ]\n },\n {\n \"columnName\": \"create_time\",\n \"columnLabel\": \"创建时间\",\n \"columnComment\": \"账号创建时间\",\n \"columnType\": \"datetime\",\n \"isPk\": \"0\",\n \"isIncrement\": \"0\",\n \"isRequired\": \"1\"\n },\n {\n \"columnName\": \"email\",\n \"columnLabel\": \"电子邮箱\",\n \"columnComment\": \"读者电子邮箱\",\n \"columnType\": \"varchar(100)\",\n \"isPk\": \"0\",\n \"isIncrement\": \"0\",\n \"isRequired\": \"0\"\n },\n {\n \"columnName\": \"phone\",\n \"columnLabel\": \"手机号\",\n \"columnComment\": \"读者手机号码\",\n \"columnType\": \"varchar(20)\",\n \"isPk\": \"0\",\n \"isIncrement\": \"0\",\n \"isRequired\": \"0\"\n }\n ]\n },\n {\n \"tableName\": \"admin\",\n \"tableComment\": \"管理员账号表\",\n \"adminMenuName\": \"管理员账号\",\n \"operations\": {\n \"add\": true,\n \"edit\": true,\n \"remove\": true,\n \"removeType\": \"physical\",\n \"reason\": \"\"\n },\n \"columns\": [\n {\n \"columnName\": \"id\",\n \"columnLabel\": \"管理员ID\",\n \"columnComment\": \"管理员主键ID\",\n \"columnType\": \"bigint(20)\",\n \"isPk\": \"1\",\n \"isIncrement\": \"1\",\n \"isRequired\": \"1\"\n },\n {\n \"columnName\": \"username\",\n \"columnLabel\": \"用户名\",\n \"columnComment\": \"管理员登录用户名\",\n \"columnType\": \"varchar(50)\",\n \"isPk\": \"0\",\n \"isIncrement\": \"0\",\n \"isRequired\": \"1\"\n },\n {\n \"columnName\": \"password_hash\",\n \"columnLabel\": \"密码哈希\",\n \"columnComment\": \"管理员登录密码哈希值\",\n \"columnType\": \"varchar(255)\",\n \"isPk\": \"0\",\n \"isIncrement\": \"0\",\n \"isRequired\": \"1\"\n },\n {\n \"columnName\": \"nickname\",\n \"columnLabel\": \"昵称\",\n \"columnComment\": \"管理员昵称\",\n \"columnType\": \"varchar(50)\",\n \"isPk\": \"0\",\n \"isIncrement\": \"0\",\n \"isRequired\": \"1\"\n },\n {\n \"columnName\": \"status\",\n \"columnLabel\": \"状态\",\n \"columnComment\": \"管理员账号状态active/inactive\",\n \"columnType\": \"varchar(20)\",\n \"isPk\": \"0\",\n \"isIncrement\": \"0\",\n \"isRequired\": \"1\",\n \"defaultValue\": \"active\",\n \"htmlType\": \"select\",\n \"dictType\": \"account_status\",\n \"dictOptions\": [\n {\"value\": \"active\", \"label\": \"正常\"},\n {\"value\": \"inactive\", \"label\": \"停用\"}\n ]\n },\n {\n \"columnName\": \"create_time\",\n \"columnLabel\": \"创建时间\",\n \"columnComment\": \"账号创建时间\",\n \"columnType\": \"datetime\",\n \"isPk\": \"0\",\n \"isIncrement\": \"0\",\n \"isRequired\": \"1\"\n }\n ]\n }\n ]\n}', '1', NULL, 151349, '2026-07-14 15:57:57');
INSERT INTO `factory_ai_stage_output` VALUES (109, 103, 103, 100, 'app_blueprint', '{\"projectName\":\"图书管理系统\",\"projectDescription\":\"【AI补全需求】\\n项目定位面向高校图书馆的图书管理系统供读者和管理员使用。 \\n角色读者、管理员。 \\n核心流程读者检索图书 → 提交借书申请 → 管理员审核通过 → 读者取得图书(借出) → 读者还书 → 管理员确认归还。若超期,读者需缴纳逾期费用后完成还书。 \\n关键规则AI假设每位读者最多同时借阅5本书单次借阅期限30天逾期每天每本收费0.5元图书可借数量减1库存为0时不可借出管理员可手动下架图书。 \\n异常边界库存不足时禁止借出读者已借满5本时无法提交申请图书已被预约或借出时提示不可用读者未还清逾期费用无法再借新书管理员可拒绝借书申请或取消异常订单。\",\"industryTemplate\":\"\",\"stylePreset\":\"dark-tech\",\"extraRequirements\":\"\"}', '{\n \"roles\": [\n {\n \"code\": \"admin\",\n \"name\": \"管理员\",\n \"description\": \"系统管理员,负责图书管理、借阅审核、逾期处理等\"\n },\n {\n \"code\": \"reader\",\n \"name\": \"读者\",\n \"description\": \"普通读者,可检索图书、借书、还书、预约等\"\n }\n ],\n \"frontendMenus\": [\n {\n \"code\": \"book_catalog\",\n \"name\": \"图书目录\",\n \"path\": \"/books\",\n \"pageCode\": \"book_catalog_page\",\n \"requiresLogin\": false,\n \"visibleRoles\": [],\n \"dataScope\": \"PUBLIC\"\n },\n {\n \"code\": \"my_borrows\",\n \"name\": \"我的借阅\",\n \"path\": \"/my-borrows\",\n \"pageCode\": \"my_borrows_page\",\n \"requiresLogin\": true,\n \"visibleRoles\": [\"reader\"],\n \"dataScope\": \"CURRENT_USER\"\n },\n {\n \"code\": \"my_reservations\",\n \"name\": \"我的预约\",\n \"path\": \"/my-reservations\",\n \"pageCode\": \"my_reservations_page\",\n \"requiresLogin\": true,\n \"visibleRoles\": [\"reader\"],\n \"dataScope\": \"CURRENT_USER\"\n },\n {\n \"code\": \"my_fines\",\n \"name\": \"我的罚款\",\n \"path\": \"/my-fines\",\n \"pageCode\": \"my_fines_page\",\n \"requiresLogin\": true,\n \"visibleRoles\": [\"reader\"],\n \"dataScope\": \"CURRENT_USER\"\n },\n {\n \"code\": \"reader_profile\",\n \"name\": \"个人资料\",\n \"path\": \"/profile\",\n \"pageCode\": \"reader_profile_page\",\n \"requiresLogin\": true,\n \"visibleRoles\": [\"reader\"],\n \"dataScope\": \"CURRENT_USER\"\n }\n ],\n \"frontendPages\": [\n {\n \"code\": \"book_catalog_page\",\n \"name\": \"图书目录\",\n \"menuCode\": \"book_catalog\",\n \"path\": \"/books\",\n \"pageType\": \"list\",\n \"tableName\": \"book_info\"\n },\n {\n \"code\": \"book_detail_page\",\n \"name\": \"图书详情\",\n \"menuCode\": \"book_catalog\",\n \"path\": \"/books/:id\",\n \"pageType\": \"detail\",\n \"tableName\": \"book_info\"\n },\n {\n \"code\": \"my_borrows_page\",\n \"name\": \"我的借阅\",\n \"menuCode\": \"my_borrows\",\n \"path\": \"/my-borrows\",\n \"pageType\": \"current_user_list\",\n \"tableName\": \"borrow_record\"\n },\n {\n \"code\": \"my_reservations_page\",\n \"name\": \"我的预约\",\n \"menuCode\": \"my_reservations\",\n \"path\": \"/my-reservations\",\n \"pageType\": \"current_user_list\",\n \"tableName\": \"reservation\"\n },\n {\n \"code\": \"my_fines_page\",\n \"name\": \"我的罚款\",\n \"menuCode\": \"my_fines\",\n \"path\": \"/my-fines\",\n \"pageType\": \"current_user_list\",\n \"tableName\": \"fine\"\n },\n {\n \"code\": \"reader_profile_page\",\n \"name\": \"个人资料\",\n \"menuCode\": \"reader_profile\",\n \"path\": \"/profile\",\n \"pageType\": \"form\",\n \"tableName\": \"reader\"\n }\n ],\n \"adminMenus\": [\n {\n \"code\": \"book_admin\",\n \"name\": \"图书管理\",\n \"path\": \"/admin/books\",\n \"pageCode\": \"book_admin_page\",\n \"tableName\": \"book_info\",\n \"pageType\": \"list\",\n \"requiresLogin\": true,\n \"visibleRoles\": [\"admin\"],\n \"dataScope\": \"ROLE\"\n },\n {\n \"code\": \"reader_admin\",\n \"name\": \"读者管理\",\n \"path\": \"/admin/readers\",\n \"pageCode\": \"reader_admin_page\",\n \"tableName\": \"reader\",\n \"pageType\": \"list\",\n \"requiresLogin\": true,\n \"visibleRoles\": [\"admin\"],\n \"dataScope\": \"ROLE\"\n },\n {\n \"code\": \"borrow_application_admin\",\n \"name\": \"借书申请管理\",\n \"path\": \"/admin/borrow-applications\",\n \"pageCode\": \"borrow_application_admin_page\",\n \"tableName\": \"borrow_application\",\n \"pageType\": \"list\",\n \"requiresLogin\": true,\n \"visibleRoles\": [\"admin\"],\n \"dataScope\": \"ROLE\"\n },\n {\n \"code\": \"borrow_record_admin\",\n \"name\": \"借阅记录管理\",\n \"path\": \"/admin/borrow-records\",\n \"pageCode\": \"borrow_record_admin_page\",\n \"tableName\": \"borrow_record\",\n \"pageType\": \"list\",\n \"requiresLogin\": true,\n \"visibleRoles\": [\"admin\"],\n \"dataScope\": \"ROLE\"\n },\n {\n \"code\": \"fine_admin\",\n \"name\": \"逾期费用管理\",\n \"path\": \"/admin/fines\",\n \"pageCode\": \"fine_admin_page\",\n \"tableName\": \"fine\",\n \"pageType\": \"list\",\n \"requiresLogin\": true,\n \"visibleRoles\": [\"admin\"],\n \"dataScope\": \"ROLE\"\n },\n {\n \"code\": \"reservation_admin\",\n \"name\": \"预约管理\",\n \"path\": \"/admin/reservations\",\n \"pageCode\": \"reservation_admin_page\",\n \"tableName\": \"reservation\",\n \"pageType\": \"list\",\n \"requiresLogin\": true,\n \"visibleRoles\": [\"admin\"],\n \"dataScope\": \"ROLE\"\n }\n ],\n \"adminHomeDashboard\": {\n \"title\": \"运营总览\",\n \"description\": \"核心业务数据\",\n \"metrics\": [\n {\n \"code\": \"total_books\",\n \"name\": \"图书总数\",\n \"semantic\": \"inventory\",\n \"field\": \"count\"\n },\n {\n \"code\": \"total_readers\",\n \"name\": \"读者总数\",\n \"semantic\": \"user\",\n \"field\": \"count\"\n },\n {\n \"code\": \"current_borrowed\",\n \"name\": \"当前借出数\",\n \"semantic\": \"order\",\n \"field\": \"count\"\n },\n {\n \"code\": \"pending_applications\",\n \"name\": \"待处理申请\",\n \"semantic\": \"task\",\n \"field\": \"count\"\n }\n ],\n \"charts\": [\n {\n \"code\": \"borrow_trend\",\n \"name\": \"借阅趋势\",\n \"type\": \"line\",\n \"semantic\": \"order\",\n \"field\": \"date\"\n },\n {\n \"code\": \"book_category_distribution\",\n \"name\": \"图书分类分布\",\n \"type\": \"pie\",\n \"semantic\": \"content\",\n \"field\": \"category\"\n }\n ]\n }\n}', '1', NULL, 28963, '2026-07-14 16:19:51');
INSERT INTO `factory_ai_stage_output` VALUES (110, 103, 103, 100, 'flow_config', '{\"mode\":\"generate\",\"projectName\":\"图书管理系统\",\"projectDescription\":\"【AI补全需求】\\n项目定位面向高校图书馆的图书管理系统供读者和管理员使用。 \\n角色读者、管理员。 \\n核心流程读者检索图书 → 提交借书申请 → 管理员审核通过 → 读者取得图书(借出) → 读者还书 → 管理员确认归还。若超期,读者需缴纳逾期费用后完成还书。 \\n关键规则AI假设每位读者最多同时借阅5本书单次借阅期限30天逾期每天每本收费0.5元图书可借数量减1库存为0时不可借出管理员可手动下架图书。 \\n异常边界库存不足时禁止借出读者已借满5本时无法提交申请图书已被预约或借出时提示不可用读者未还清逾期费用无法再借新书管理员可拒绝借书申请或取消异常订单。\",\"industryTemplate\":\"\",\"stylePreset\":\"dark-tech\",\"extraRequirements\":\"\",\"confirmedAppBlueprint\":{\"adminHomeDashboard\":{\"charts\":[{\"code\":\"borrow_trend\",\"filters\":[],\"metrics\":[],\"semantic\":\"order\",\"type\":\"line\"},{\"code\":\"book_category_distribution\",\"filters\":[],\"metrics\":[],\"semantic\":\"content\",\"type\":\"pie\"}],\"description\":\"核心业务数据\",\"metrics\":[{\"code\":\"total_books\",\"field\":\"count\",\"filters\":[],\"semantic\":\"inventory\"},{\"code\":\"total_readers\",\"field\":\"count\",\"filters\":[],\"semantic\":\"user\"},{\"code\":\"current_borrowed\",\"field\":\"count\",\"filters\":[],\"semantic\":\"order\"},{\"code\":\"pending_applications\",\"field\":\"count\",\"filters\":[],\"semantic\":\"task\"}],\"title\":\"运营总览\"},\"adminMenus\":[{\"code\":\"book_admin\",\"dataScope\":\"ROLE\",\"name\":\"图书管理\",\"pageCode\":\"book_admin_page\",\"pageType\":\"list\",\"path\":\"/admin/books\",\"requiresLogin\":true,\"tableName\":\"book_info\",\"visibleRoles\":[\"admin\"]},{\"code\":\"reader_admin\",\"dataScope\":\"ROLE\",\"name\":\"读者管理\",\"pageCode\":\"reader_admin_page\",\"pageType\":\"list\",\"path\":\"/admin/readers\",\"requiresLogin\":true,\"tableName\":\"reader\",\"visibleRoles\":[\"admin\"]},{\"code\":\"borrow_application_admin\",\"dataScope\":\"ROLE\",\"name\":\"借书申请管理\",\"pageCode\":\"borrow_application_admin_page\",\"pageType\":\"list\",\"path\":\"/admin/borrow-applications\",\"requiresLogin\":true,\"tableName\":\"borrow_application\",\"visibleRoles\":[\"admin\"]},{\"code\":\"borrow_record_admin\",\"dataScope\":\"ROLE\",\"name\":\"借阅记录管理\",\"pageCode\":\"borrow_record_admin_page\",\"pageType\":\"list\",\"path\":\"/admin/borrow-records\",\"requiresLogin\":true,\"tableName\":\"borrow_record\",\"visibleRoles\":[\"admin\"]},{\"code\":\"fine_admin\",\"dataScope\":\"ROLE\",\"name\":\"逾期费用管理\",\"pageCode\":\"fine_admin_page\",\"pageType\":\"list\",\"path\":\"/admin/fines\",\"requiresLogin\":true,\"tableName\":\"fine\",\"visibleRoles\":[\"admin\"]},{\"code\":\"reservation_admin\",\"dataScope\":\"ROLE\",\"name\":\"预约管理\",\"pageCode\":\"reservation_admin_page\",\"pageType\":\"list\",\"path\":\"/admin/reservations\",\"requiresLogin\":true,\"tableName\":\"reservation\",\"visibleRoles\":[\"admin\"]}],\"frontendMenus\":[{\"code\":\"book_catalog\",\"dataScope\":\"PUBLIC\",\"name\":\"图书目录\",\"pageCode\":\"book_catalog_page\",\"pageType\":\"\",\"path\":\"/books\",\"requiresLogin\":false,\"tableName\":\"\",\"visibleRoles\":[]},{\"code\":\"my_borrows\",\"dataScope\":\"CURRENT_USER\",\"name\":\"我的借阅\",\"pageCode\":\"my_borrows_page\",\"pageType\":\"\",\"path\":\"/my-borrows\",\"requiresLogin\":true,\"tableName\":\"\",\"visibleRoles\":[\"reader\"]},{\"code\":\"my_reservations\",\"dataScope\":\"CURRENT_USER\",\"name\":\"我的预约\",\"pageCode\":\"my_reservations_page\",\"pageType\":\"\",\"path\":\"/my-reservations\",\"requiresLogin\":true,\"tableName\":\"\",\"visibleRoles\":[\"reader\"]},{\"code\":\"my_fines\",\"dataScope\":\"CURRENT_USER\",\"name\":\"我的罚款\",\"pageCode\":\"my_fines_page\",\"pageType\":\"\",\"path\":\"/my-fines\",\"requiresLogin\":true,\"tableName\":\"\",\"visibleRoles\":[\"reader\"]},{\"code\":\"reader_profile\",\"dataScope\":\"CURRENT_USER\",\"name\":\"个人资料\",\"pageCode\":\"reader_profile_page\",\"pageType\":\"\",\"path\":\"/profile\",\"requiresLogin\":true,\"tableName\":\"\",\"visibleRoles\":[\"reader\"]}],\"frontendPages\":[{\"code\":\"book_catalog_page\",\"menuCode\":\"book_catalog\",\"name\":\"图书目录\",\"pageType\":\"list\",\"parentPageCode\":\"\",\"path\":\"/books\",\"tableName\":\"book_info\"},{\"code\":\"book_detail_page\",\"menuCode\":\"book_catalog\",\"name\":\"图书详情\",\"pageType\":\"detail\",\"parentPageCode\":\"\",\"path\":\"/books/:id\",\"tableName\":\"book_info\"},{\"code\":\"my_borrows_page\",\"menuCode\":\"my_borrows\",\"name\":\"我的借阅\",\"pageType\":\"current_user_list\",\"parentPageCode\":\"\",\"path\":\"/my-borrows\",\"tableName\":\"borrow_record\"},{\"code\":\"my_reservations_page\",\"menuCode\":\"my_reservations\",\"name\":\"我的预约\",\"pageType\":\"current_user_list\",\"parentPageCode\":\"\",\"path\":\"/my-reservations\",\"tableName\":\"reservation\"},{\"code\":\"my_fines_page\",\"menuCode\":\"my_fines\",\"name\":\"我的罚款\",\"pageType\":\"current_user_list\",\"parentPageCode\":\"\",\"path\":\"/my-fines\",\"tableName\":\"fine\"},{\"code\":\"reader_profile_page\",\"menuCode\":\"reader_profile\",\"name\":\"个人资料\",\"pageType\":\"form\",\"parentPageCode\":\"\",\"path\":\"/profile\",\"tableName\":\"reader\"}],\"roles\":[{\"code\":\"admin\",\"description\":\"系统管理员,负责图书管理、借阅审核、逾期处理等\",\"name\":\"管理员\"},{\"code\":\"reader\",\"description\":\"普通读者,可检索图书、借书、还书、预约等\",\"name\":\"读者\"}]}}', '{\n \"version\": \"1.0\",\n \"code\": \"borrow_record_flow\",\n \"name\": \"借阅记录流程\",\n \"mainTable\": \"borrow_record\",\n \"statusField\": \"status\",\n \"notFoundMessage\": \"主记录不存在\",\n \"states\": [\n {\"code\": \"pending\", \"label\": \"待审核\"},\n {\"code\": \"borrowing\", \"label\": \"借阅中\"},\n {\"code\": \"returning\", \"label\": \"待确认归还\"},\n {\"code\": \"returned\", \"label\": \"已归还\"},\n {\"code\": \"cancelled\", \"label\": \"已取消\"},\n {\"code\": \"rejected\", \"label\": \"已拒绝\"}\n ],\n \"actions\": [\n {\n \"code\": \"approve\",\n \"name\": \"审核通过\",\n \"from\": \"pending\",\n \"to\": \"borrowing\",\n \"actor\": \"admin\",\n \"method\": \"POST\",\n \"path\": \"/borrow-record/approve\",\n \"invalidStateMessage\": \"当前状态不能审核\",\n \"successMessage\": \"审核成功\",\n \"audit\": {\"userField\": \"approve_user_id\", \"timeField\": \"approve_time\"},\n \"effects\": [\n {\n \"type\": \"decrease\",\n \"table\": \"book_info\",\n \"relationField\": \"book_id\",\n \"field\": \"stock\",\n \"amount\": \"1\",\n \"min\": \"0\",\n \"notFoundMessage\": \"图书不存在\",\n \"errorMessage\": \"图书库存不足\"\n }\n ],\n \"button\": {\n \"scope\": \"admin\",\n \"pageCode\": \"borrow_application_admin_page\",\n \"slot\": \"list.rowActions\",\n \"type\": \"primary\",\n \"confirm\": \"确认审核通过吗?\",\n \"order\": 10\n }\n },\n {\n \"code\": \"reject\",\n \"name\": \"拒绝申请\",\n \"from\": \"pending\",\n \"to\": \"rejected\",\n \"actor\": \"admin\",\n \"method\": \"POST\",\n \"path\": \"/borrow-record/reject\",\n \"invalidStateMessage\": \"当前状态不能拒绝\",\n \"successMessage\": \"已拒绝\",\n \"audit\": {\"userField\": \"reject_user_id\", \"timeField\": \"reject_time\"},\n \"effects\": [],\n \"button\": {\n \"scope\": \"admin\",\n \"pageCode\": \"borrow_application_admin_page\",\n \"slot\": \"list.rowActions\",\n \"type\": \"danger\",\n \"confirm\": \"确认拒绝该申请吗?\",\n \"order\": 20\n }\n },\n {\n \"code\": \"cancel\",\n \"name\": \"取消申请\",\n \"from\": \"pending\",\n \"to\": \"cancelled\",\n \"actor\": \"admin\",\n \"method\": \"POST\",\n \"path\": \"/borrow-record/cancel\",\n \"invalidStateMessage\": \"当前状态不能取消\",\n \"successMessage\": \"已取消\",\n \"effects\": [],\n \"button\": {\n \"scope\": \"admin\",\n \"pageCode\": \"borrow_application_admin_page\",\n \"slot\": \"list.rowActions\",\n \"type\": \"warning\",\n \"confirm\": \"确认取消该申请吗?\",\n \"order\": 30\n }\n },\n {\n \"code\": \"return\",\n \"name\": \"还书\",\n \"from\": \"borrowing\",\n \"to\": \"returning\",\n \"actor\": \"reader\",\n \"method\": \"POST\",\n \"path\": \"/borrow-record/return\",\n \"invalidStateMessage\": \"当前状态不能还书\",\n \"successMessage\": \"还书请求已提交,等待管理员确认\",\n \"effects\": [\n {\n \"type\": \"create_record\",\n \"table\": \"fine\",\n \"values\": {\n \"reader_id\": \"record.reader_id\",\n \"book_id\": \"record.book_id\",\n \"borrow_record_id\": \"record.id\",\n \"amount\": \"0.00\",\n \"status\": \"unpaid\",\n \"created_at\": \"now\"\n }\n }\n ],\n \"button\": {\n \"scope\": \"reader\",\n \"pageCode\": \"my_borrows_page\",\n \"slot\": \"list.rowActions\",\n \"type\": \"warning\",\n \"confirm\": \"确认还书吗?\",\n \"order\": 10\n }\n },\n {\n \"code\": \"confirm_return\",\n \"name\": \"确认归还\",\n \"from\": \"returning\",\n \"to\": \"returned\",\n \"actor\": \"admin\",\n \"method\": \"POST\",\n \"path\": \"/borrow-record/confirm-return\",\n \"invalidStateMessage\": \"当前状态不能确认归还\",\n \"successMessage\": \"归还确认成功\",\n \"audit\": {\"userField\": \"confirm_user_id\", \"timeField\": \"confirm_time\"},\n \"effects\": [\n {\n \"type\": \"increase\",\n \"table\": \"book_info\",\n \"relationField\": \"book_id\",\n \"field\": \"stock\",\n \"amount\": \"1\",\n \"notFoundMessage\": \"图书不存在\",\n \"errorMessage\": \"图书库存更新失败\"\n }\n ],\n \"button\": {\n \"scope\": \"admin\",\n \"pageCode\": \"borrow_record_admin_page\",\n \"slot\": \"list.rowActions\",\n \"type\": \"success\",\n \"confirm\": \"确认已收到还书?\",\n \"order\": 10\n }\n }\n ],\n \"metrics\": [\n {\"code\": \"total_books\", \"name\": \"总图书数\", \"table\": \"book_info\", \"aggregate\": \"count\", \"field\": \"id\", \"unit\": \"册\"},\n {\"code\": \"total_readers\", \"name\": \"总读者数\", \"table\": \"reader\", \"aggregate\": \"count\", \"field\": \"id\", \"unit\": \"人\"},\n {\"code\": \"current_borrowed\", \"name\": \"当前借阅中\", \"table\": \"borrow_record\", \"aggregate\": \"count\", \"field\": \"id\", \"status\": \"borrowing\", \"unit\": \"条\"},\n {\"code\": \"pending_applications\", \"name\": \"待审核申请\", \"table\": \"borrow_record\", \"aggregate\": \"count\", \"field\": \"id\", \"status\": \"pending\", \"unit\": \"条\"}\n ]\n}', '1', NULL, 94569, '2026-07-14 16:21:25');
INSERT INTO `factory_ai_stage_output` VALUES (111, 103, 103, 100, 'database', '{\"mode\":\"generate\",\"projectName\":\"图书管理系统\",\"projectDescription\":\"【AI补全需求】\\n项目定位面向高校图书馆的图书管理系统供读者和管理员使用。 \\n角色读者、管理员。 \\n核心流程读者检索图书 → 提交借书申请 → 管理员审核通过 → 读者取得图书(借出) → 读者还书 → 管理员确认归还。若超期,读者需缴纳逾期费用后完成还书。 \\n关键规则AI假设每位读者最多同时借阅5本书单次借阅期限30天逾期每天每本收费0.5元图书可借数量减1库存为0时不可借出管理员可手动下架图书。 \\n异常边界库存不足时禁止借出读者已借满5本时无法提交申请图书已被预约或借出时提示不可用读者未还清逾期费用无法再借新书管理员可拒绝借书申请或取消异常订单。\",\"industryTemplate\":\"\",\"stylePreset\":\"dark-tech\",\"extraRequirements\":\"\",\"confirmedAppBlueprint\":{\"adminHomeDashboard\":{\"charts\":[{\"code\":\"borrow_trend\",\"filters\":[],\"metrics\":[],\"semantic\":\"order\",\"type\":\"line\"},{\"code\":\"book_category_distribution\",\"filters\":[],\"metrics\":[],\"semantic\":\"content\",\"type\":\"pie\"}],\"description\":\"核心业务数据\",\"metrics\":[{\"code\":\"total_books\",\"field\":\"count\",\"filters\":[],\"semantic\":\"inventory\"},{\"code\":\"total_readers\",\"field\":\"count\",\"filters\":[],\"semantic\":\"user\"},{\"code\":\"current_borrowed\",\"field\":\"count\",\"filters\":[],\"semantic\":\"order\"},{\"code\":\"pending_applications\",\"field\":\"count\",\"filters\":[],\"semantic\":\"task\"}],\"title\":\"运营总览\"},\"adminMenus\":[{\"code\":\"book_admin\",\"dataScope\":\"ROLE\",\"name\":\"图书管理\",\"pageCode\":\"book_admin_page\",\"pageType\":\"list\",\"path\":\"/admin/books\",\"requiresLogin\":true,\"tableName\":\"book_info\",\"visibleRoles\":[\"admin\"]},{\"code\":\"reader_admin\",\"dataScope\":\"ROLE\",\"name\":\"读者管理\",\"pageCode\":\"reader_admin_page\",\"pageType\":\"list\",\"path\":\"/admin/readers\",\"requiresLogin\":true,\"tableName\":\"reader\",\"visibleRoles\":[\"admin\"]},{\"code\":\"borrow_application_admin\",\"dataScope\":\"ROLE\",\"name\":\"借书申请管理\",\"pageCode\":\"borrow_application_admin_page\",\"pageType\":\"list\",\"path\":\"/admin/borrow-applications\",\"requiresLogin\":true,\"tableName\":\"borrow_application\",\"visibleRoles\":[\"admin\"]},{\"code\":\"borrow_record_admin\",\"dataScope\":\"ROLE\",\"name\":\"借阅记录管理\",\"pageCode\":\"borrow_record_admin_page\",\"pageType\":\"list\",\"path\":\"/admin/borrow-records\",\"requiresLogin\":true,\"tableName\":\"borrow_record\",\"visibleRoles\":[\"admin\"]},{\"code\":\"fine_admin\",\"dataScope\":\"ROLE\",\"name\":\"逾期费用管理\",\"pageCode\":\"fine_admin_page\",\"pageType\":\"list\",\"path\":\"/admin/fines\",\"requiresLogin\":true,\"tableName\":\"fine\",\"visibleRoles\":[\"admin\"]},{\"code\":\"reservation_admin\",\"dataScope\":\"ROLE\",\"name\":\"预约管理\",\"pageCode\":\"reservation_admin_page\",\"pageType\":\"list\",\"path\":\"/admin/reservations\",\"requiresLogin\":true,\"tableName\":\"reservation\",\"visibleRoles\":[\"admin\"]}],\"frontendMenus\":[{\"code\":\"book_catalog\",\"dataScope\":\"PUBLIC\",\"name\":\"图书目录\",\"pageCode\":\"book_catalog_page\",\"pageType\":\"\",\"path\":\"/books\",\"requiresLogin\":false,\"tableName\":\"\",\"visibleRoles\":[]},{\"code\":\"my_borrows\",\"dataScope\":\"CURRENT_USER\",\"name\":\"我的借阅\",\"pageCode\":\"my_borrows_page\",\"pageType\":\"\",\"path\":\"/my-borrows\",\"requiresLogin\":true,\"tableName\":\"\",\"visibleRoles\":[\"reader\"]},{\"code\":\"my_reservations\",\"dataScope\":\"CURRENT_USER\",\"name\":\"我的预约\",\"pageCode\":\"my_reservations_page\",\"pageType\":\"\",\"path\":\"/my-reservations\",\"requiresLogin\":true,\"tableName\":\"\",\"visibleRoles\":[\"reader\"]},{\"code\":\"my_fines\",\"dataScope\":\"CURRENT_USER\",\"name\":\"我的罚款\",\"pageCode\":\"my_fines_page\",\"pageType\":\"\",\"path\":\"/my-fines\",\"requiresLogin\":true,\"tableName\":\"\",\"visibleRoles\":[\"reader\"]},{\"code\":\"reader_profile\",\"dataScope\":\"CURRENT_USER\",\"name\":\"个人资料\",\"pageCode\":\"reader_profile_page\",\"pageType\":\"\",\"path\":\"/profile\",\"requiresLogin\":true,\"tableName\":\"\",\"visibleRoles\":[\"reader\"]}],\"frontendPages\":[{\"code\":\"book_catalog_page\",\"menuCode\":\"book_catalog\",\"name\":\"图书目录\",\"pageType\":\"list\",\"parentPageCode\":\"\",\"path\":\"/books\",\"tableName\":\"book_info\"},{\"code\":\"book_detail_page\",\"menuCode\":\"book_catalog\",\"name\":\"图书详情\",\"pageType\":\"detail\",\"parentPageCode\":\"\",\"path\":\"/books/:id\",\"tableName\":\"book_info\"},{\"code\":\"my_borrows_page\",\"menuCode\":\"my_borrows\",\"name\":\"我的借阅\",\"pageType\":\"current_user_list\",\"parentPageCode\":\"\",\"path\":\"/my-borrows\",\"tableName\":\"borrow_record\"},{\"code\":\"my_reservations_page\",\"menuCode\":\"my_reservations\",\"name\":\"我的预约\",\"pageType\":\"current_user_list\",\"parentPageCode\":\"\",\"path\":\"/my-reservations\",\"tableName\":\"reservation\"},{\"code\":\"my_fines_page\",\"menuCode\":\"my_fines\",\"name\":\"我的罚款\",\"pageType\":\"current_user_list\",\"parentPageCode\":\"\",\"path\":\"/my-fines\",\"tableName\":\"fine\"},{\"code\":\"reader_profile_page\",\"menuCode\":\"reader_profile\",\"name\":\"个人资料\",\"pageType\":\"form\",\"parentPageCode\":\"\",\"path\":\"/profile\",\"tableName\":\"reader\"}],\"roles\":[{\"code\":\"admin\",\"description\":\"系统管理员,负责图书管理、借阅审核、逾期处理等\",\"name\":\"管理员\"},{\"code\":\"reader\",\"description\":\"普通读者,可检索图书、借书、还书、预约等\",\"name\":\"读者\"}]},\"flowConfig\":{\"actions\":[{\"actor\":\"admin\",\"audit\":{\"timeField\":\"approve_time\",\"userField\":\"approve_user_id\"},\"button\":{\"confirm\":\"确认审核通过吗?\",\"order\":10,\"pageCode\":\"borrow_application_admin_page\",\"scope\":\"admin\",\"slot\":\"list.rowActions\",\"type\":\"primary\"},\"code\":\"approve\",\"effects\":[{\"amount\":\"1\",\"errorMessage\":\"图书库存不足\",\"field\":\"stock\",\"min\":\"0\",\"notFoundMessage\":\"图书不存在\",\"relationField\":\"book_id\",\"table\":\"book_info\",\"type\":\"decrease\",\"values\":{}}],\"from\":\"pending\",\"invalidStateMessage\":\"当前状态不能审核\",\"method\":\"POST\",\"name\":\"审核通过\",\"path\":\"/borrow-record/approve\",\"successMessage\":\"审核成功\",\"to\":\"borrowing\"},{\"actor\":\"admin\",\"audit\":{\"timeField\":\"reject_time\",\"userField\":\"reject_user_id\"},\"button\":{\"confirm\":\"确认拒绝该申请吗?\",\"order\":20,\"pageCode\":\"borrow_application_admin_page\",\"scope\":\"admin\",\"slot\":\"list.rowActions\",\"type\":\"danger\"},\"code\":\"reject\",\"effects\":[],\"from\":\"pending\",\"invalidStateMessage\":\"当前状态不能拒绝\",\"method\":\"POST\",\"name\":\"拒绝申请\",\"path\":\"/borrow-record/reject\",\"successMessage\":\"已拒绝\",\"to\":\"rejected\"},{\"actor\":\"admin\",\"button\":{\"confirm\":\"确认取消该申请吗?\",\"order\":30,\"pageCode\":\"borrow_application_admin_page\",\"scope\":\"admin\",\"slot\":\"list.rowActions\",\"type\":\"warning\"},\"code\":\"cancel\",\"effects\":[],\"from\":\"pending\",\"invalidStateMessage\":\"当前状态不能取消\",\"method\":\"POST\",\"name\":\"取消申请\",\"path\":\"/borrow-record/cancel\",\"successMessage\":\"已取消\",\"to\":\"cancelled\"},{\"actor\":\"reader\",\"button\":{\"confirm\":\"确认还书吗?\",\"order\":10,\"pageCode\":\"my_borrows_page\",\"scope\":\"reader\",\"slot\":\"list.rowActions\",\"type\":\"warning\"},\"code\":\"return\",\"effects\":[{\"amount\":\"1\",\"min\":\"0\",\"table\":\"fine\",\"type\":\"create_record\",\"values\":{\"reader_id\":\"record.reader_id\",\"amount\":\"0.00\",\"created_at\":\"now\",\"borrow_record_id\":\"record.id\",\"book_id\":\"record.book_id\",\"status\":\"unpaid\"}}],\"from\":\"borrowing\",\"invalidStateMessage\":\"当前状态不能还书\",\"method\":\"POST\",\"name\":\"还书\",\"path\":\"/borrow-record/return\",\"successMessage\":\"还书请求已提交,等待管理员确认\",\"to\":\"returning\"},{\"actor\":\"admin\",\"audit\":{\"timeField\":\"confirm_time\",\"userField\":\"confirm_user_id\"},\"button\":{\"confirm\":\"确认已收到还书?\",\"order\":10,\"pageCode\":\"borrow_record_admin_page\",\"scope\":\"admin\",\"slot\":\"list.rowActions\",\"type\":\"success\"},\"code\":\"confirm_return\",\"effects\":[{\"amount\":\"1\",\"errorMessage\":\"图书库存更新失败\",\"field\":\"stock\",\"min\":\"0\",\"notFoundMessage\":\"图书不存在\",\"relationField\":\"book_id\",\"table\":\"book_info\",\"type\":\"increase\",\"values\":{}}],\"from\":\"returning\",\"invalidStateMessage\":\"当前状态不能确认归还\",\"method\":\"POST\",\"name\":\"确认归还\",\"path\":\"/borrow-record/confirm-return\",\"successMessage\":\"归还确认成功\",\"to\":\"returned\"}],\"code\":\"borrow_record_flow\",\"mainTable\":\"borrow_record\",\"metrics\":[{\"aggregate\":\"count\",\"code\":\"total_books\",\"field\":\"id\",\"name\":\"总图书数\",\"table\":\"book_info\",\"unit\":\"册\"},{\"aggregate\":\"count\",\"code\":\"total_readers\",\"field\":\"id\",\"name\":\"总读者数\",\"table\":\"reader\",\"unit\":\"人\"},{\"aggregate\":\"count\",\"code\":\"current_borrowed\",\"field\":\"id\",\"name\":\"当前借阅中\",\"status\":\"borrowing\",\"table\":\"borrow_record\",\"unit\":\"条\"},{\"aggregate\":\"count\",\"code\":\"pending_applications\",\"field\":\"id\",\"name\":\"待审核申请\",\"status\":\"pending\",\"table\":\"borrow_record\",\"unit\":\"条\"}],\"name\":\"借阅记录流程\",\"notFoundMessage\":\"主记录不存在\",\"states\":[{\"code\":\"pending\",\"label\":\"待审核\"},{\"code\":\"borrowing\",\"label\":\"借阅中\"},{\"code\":\"returning\",\"label\":\"待确认归还\"},{\"code\":\"returned\",\"label\":\"已归还\"},{\"code\":\"cancelled\",\"label\":\"已取消\"},{\"code\":\"rejected\",\"label\":\"已拒绝\"}],\"statusField\":\"status\",\"version\":\"1.0\"},\"compiledFlowContract\":{\"acceptanceScenarios\":[],\"actions\":[{\"actor\":\"admin\",\"code\":\"approve\",\"name\":\"审核通过\",\"ownerObject\":\"borrow_record\",\"ownerTable\":\"borrow_record\",\"preconditions\":[],\"quantityEffects\":[{\"actionCode\":\"approve\",\"amount\":\"1\",\"effectType\":\"decrease\",\"objectCode\":\"book_info\",\"quantityField\":\"stock\",\"tableName\":\"book_info\"}],\"recordEffects\":[],\"required\":true,\"stateTransitions\":[{\"actionCode\":\"approve\",\"fromState\":\"pending\",\"toState\":\"borrowing\"}]},{\"actor\":\"admin\",\"code\":\"reject\",\"name\":\"拒绝申请\",\"ownerObject\":\"borrow_record\",\"ownerTable\":\"borrow_record\",\"preconditions\":[],\"quantityEffects\":[],\"recordEffects\":[],\"required\":true,\"stateTransitions\":[{\"actionCode\":\"reject\",\"fromState\":\"pending\",\"toState\":\"rejected\"}]},{\"actor\":\"admin\",\"code\":\"cancel\",\"name\":\"取消申请\",\"ownerObject\":\"borrow_record\",\"ownerTable\":\"borrow_record\",\"preconditions\":[],\"quantityEffects\":[],\"recordEffects\":[],\"required\":true,\"stateTransitions\":[{\"actionCode\":\"cancel\",\"fromState\":\"pending\",\"toState\":\"cancelled\"}]},{\"actor\":\"reader\",\"code\":\"return\",\"name\":\"还书\",\"ownerObject\":\"borrow_record\",\"ownerTable\":\"borrow_record\",\"preconditions\":[],\"quantityEffects\":[],\"recordEffects\":[],\"required\":true,\"stateTransitions\":[{\"actionCode\":\"return\",\"fromState\":\"borrowing\",\"toState\":\"returning\"}]},{\"actor\":\"admin\",\"code\":\"confirm_return\",\"name\":\"确认归还\",\"ownerObject\":\"borrow_record\",\"ownerTable\":\"borrow_record\",\"preconditions\":[],\"quantityEffects\":[{\"actionCode\":\"confirm_return\",\"amount\":\"1\",\"effectType\":\"increase\",\"objectCode\":\"book_info\",\"quantityField\":\"stock\",\"tableName\":\"book_info\"}],\"recordEffects\":[],\"required\":true,\"stateTransitions\":[{\"actionCode\":\"confirm_return\",\"fromState\":\"returning\",\"toState\":\"returned\"}]}],\"businessPolicies\":[],\"coreObjects\":[{\"code\":\"borrow_record\",\"name\":\"借阅记录流程\",\"objectType\":\"main\",\"tableName\":\"borrow_record\"},{\"code\":\"book_info\",\"name\":\"book_info\",\"objectType\":\"related\",\"tableName\":\"book_info\"},{\"code\":\"fine\",\"name\":\"fine\",\"objectType\":\"related\",\"tableName\":\"fine\"}],\"domainName\":\"借阅记录流程\",\"metrics\":[{\"aggregate\":\"count\",\"code\":\"total_books\",\"field\":\"id\",\"filters\":[],\"name\":\"总图书数\",\"relatedActionCodes\":[],\"required\":true,\"tableName\":\"book_info\",\"unit\":\"册\"},{\"aggregate\":\"count\",\"code\":\"total_readers\",\"field\":\"id\",\"filters\":[],\"name\":\"总读者数\",\"relatedActionCodes\":[],\"required\":true,\"tableName\":\"reader\",\"unit\":\"人\"},{\"aggregate\":\"count\",\"code\":\"current_borrowed\",\"field\":\"id\",\"filters\":[{\"field\":\"status\",\"operator\":\"eq\",\"values\":[\"borrowing\"]}],\"name\":\"当前借阅中\",\"relatedActionCodes\":[],\"required\":true,\"tableName\":\"borrow_record\",\"unit\":\"条\"},{\"aggregate\":\"count\",\"code\":\"pending_applications\",\"field\":\"id\",\"filters\":[{\"field\":\"status\",\"operator\":\"eq\",\"values\":[\"pending\"]}],\"name\":\"待审核申请\",\"relatedActionCodes\":[],\"required\":true,\"tableName\":\"borrow_record\",\"unit\":\"条\"}],\"pageBindings\":[{\"actionCode\":\"approve\",\"pageCode\":\"borrow_application_admin_page\",\"slot\":\"list.rowActions\",\"tableName\":\"borrow_record\",\"target\":\"admin\"},{\"actionCode\":\"reject\",\"pageCode\":\"borrow_application_admin_page\",\"slot\":\"list.rowActions\",\"tableName\":\"borrow_record\",\"target\":\"admin\"},{\"actionCode\":\"cancel\",\"pageCode\":\"borrow_application_admin_page\",\"slot\":\"list.rowActions\",\"tableName\":\"borrow_record\",\"target\":\"admin\"},{\"actionCode\":\"return\",\"pageCode\":\"my_borrows_page\",\"slot\":\"list.rowActions\",\"tableName\":\"borrow_record\",\"target\":\"reader\"},{\"actionCode\":\"confirm_return\",\"pageCode\":\"borrow_record_admin_page\",\"slot\":\"list.rowActions\",\"tableName\":\"borrow_record\",\"target\":\"admin\"}],\"quantityRules\":[{\"actionCode\":\"approve\",\"amount\":\"1\",\"effectType\":\"decrease\",\"objectCode\":\"book_info\",\"quantityField\":\"stock\",\"tableName\":\"book_info\"},{\"actionCode\":\"confirm_return\",\"amount\":\"1\",\"effectType\":\"increase\",\"objectCode\":\"book_info\",\"quantityField\":\"stock\",\"tableName\":\"book_info\"}],\"recordRules\":[],\"stateMachines\":[{\"objectCode\":\"borrow_record\",\"states\":[\"pending\",\"borrowing\",\"returning\",\"returned\",\"cancelled\",\"rejected\"],\"statusField\":\"status\",\"tableName\":\"borrow_record\",\"transitions\":[{\"actionCode\":\"approve\",\"fromState\":\"pending\",\"toState\":\"borrowing\"},{\"actionCode\":\"reject\",\"fromState\":\"pending\",\"toState\":\"rejected\"},{\"actionCode\":\"cancel\",\"fromState\":\"pending\",\"toState\":\"cancelled\"},{\"actionCode\":\"return\",\"fromState\":\"borrowing\",\"toState\":\"returning\"},{\"actionCode\":\"confirm_return\",\"fromState\":\"returning\",\"toState\":\"returned\"}]}]},\"canonicalTableRegistry\":[\"book_info\",\"borrow_record\",\"reservation\",\"fine\",\"reader\",\"borrow_application\"],\"limits\":{\"maxTables\":12,\"maxColumnsPerTable\":30}}', '{\n \"tables\": [\n {\n \"tableName\": \"book_info\",\n \"tableComment\": \"图书信息表\",\n \"adminMenuName\": \"图书管理\",\n \"operations\": {\n \"add\": true,\n \"edit\": true,\n \"remove\": true,\n \"removeType\": \"physical\",\n \"reason\": \"\"\n },\n \"columns\": [\n {\n \"columnName\": \"id\",\n \"columnLabel\": \"图书ID\",\n \"columnComment\": \"主键ID\",\n \"columnType\": \"bigint(20)\",\n \"isPk\": \"1\",\n \"isIncrement\": \"1\",\n \"isRequired\": \"1\",\n \"javaType\": \"Long\",\n \"htmlType\": \"input\"\n },\n {\n \"columnName\": \"isbn\",\n \"columnLabel\": \"ISBN\",\n \"columnComment\": \"国际标准书号\",\n \"columnType\": \"varchar(20)\",\n \"isPk\": \"0\",\n \"isIncrement\": \"0\",\n \"isRequired\": \"1\",\n \"javaType\": \"String\",\n \"htmlType\": \"input\"\n },\n {\n \"columnName\": \"title\",\n \"columnLabel\": \"书名\",\n \"columnComment\": \"图书名称\",\n \"columnType\": \"varchar(255)\",\n \"isPk\": \"0\",\n \"isIncrement\": \"0\",\n \"isRequired\": \"1\",\n \"javaType\": \"String\",\n \"htmlType\": \"input\"\n },\n {\n \"columnName\": \"author\",\n \"columnLabel\": \"作者\",\n \"columnComment\": \"图书作者\",\n \"columnType\": \"varchar(255)\",\n \"isPk\": \"0\",\n \"isIncrement\": \"0\",\n \"isRequired\": \"0\",\n \"javaType\": \"String\",\n \"htmlType\": \"input\"\n },\n {\n \"columnName\": \"publisher\",\n \"columnLabel\": \"出版社\",\n \"columnComment\": \"出版社名称\",\n \"columnType\": \"varchar(255)\",\n \"isPk\": \"0\",\n \"isIncrement\": \"0\",\n \"isRequired\": \"0\",\n \"javaType\": \"String\",\n \"htmlType\": \"input\"\n },\n {\n \"columnName\": \"publish_date\",\n \"columnLabel\": \"出版日期\",\n \"columnComment\": \"图书出版日期\",\n \"columnType\": \"date\",\n \"isPk\": \"0\",\n \"isIncrement\": \"0\",\n \"isRequired\": \"0\",\n \"javaType\": \"Date\",\n \"htmlType\": \"datetime\"\n },\n {\n \"columnName\": \"category\",\n \"columnLabel\": \"分类\",\n \"columnComment\": \"图书分类\",\n \"columnType\": \"varchar(50)\",\n \"isPk\": \"0\",\n \"isIncrement\": \"0\",\n \"isRequired\": \"0\",\n \"javaType\": \"String\",\n \"htmlType\": \"select\",\n \"dictType\": \"book_category\",\n \"dictOptions\": [\n {\n \"value\": \"literature\",\n \"label\": \"文学\"\n },\n {\n \"value\": \"science\",\n \"label\": \"科学\"\n },\n {\n \"value\": \"history\",\n \"label\": \"历史\"\n },\n {\n \"value\": \"technology\",\n \"label\": \"技术\"\n },\n {\n \"value\": \"art\",\n \"label\": \"艺术\"\n },\n {\n \"value\": \"other\",\n \"label\": \"其他\"\n }\n ]\n },\n {\n \"columnName\": \"description\",\n \"columnLabel\": \"简介\",\n \"columnComment\": \"图书内容简介\",\n \"columnType\": \"text\",\n \"isPk\": \"0\",\n \"isIncrement\": \"0\",\n \"isRequired\": \"0\",\n \"javaType\": \"String\",\n \"htmlType\": \"editor\"\n },\n {\n \"columnName\": \"cover_image\",\n \"columnLabel\": \"封面\",\n \"columnComment\": \"图书封面图片URL\",\n \"columnType\": \"varchar(255)\",\n \"isPk\": \"0\",\n \"isIncrement\": \"0\",\n \"isRequired\": \"0\",\n \"javaType\": \"String\",\n \"htmlType\": \"imageUpload\"\n },\n {\n \"columnName\": \"stock\",\n \"columnLabel\": \"库存数量\",\n \"columnComment\": \"当前可借库存\",\n \"columnType\": \"int(11)\",\n \"isPk\": \"0\",\n \"isIncrement\": \"0\",\n \"isRequired\": \"1\",\n \"javaType\": \"Integer\",\n \"htmlType\": \"input\"\n },\n {\n \"columnName\": \"total_stock\",\n \"columnLabel\": \"总库存\",\n \"columnComment\": \"馆藏总数量\",\n \"columnType\": \"int(11)\",\n \"isPk\": \"0\",\n \"isIncrement\": \"0\",\n \"isRequired\": \"1\",\n \"javaType\": \"Integer\",\n \"htmlType\": \"input\"\n },\n {\n \"columnName\": \"status\",\n \"columnLabel\": \"状态\",\n \"columnComment\": \"图书状态available-可借, unavailable-不可借, removed-下架\",\n \"columnType\": \"varchar(20)\",\n \"isPk\": \"0\",\n \"isIncrement\": \"0\",\n \"isRequired\": \"1\",\n \"javaType\": \"String\",\n \"htmlType\": \"select\",\n \"dictType\": \"book_status\",\n \"dictOptions\": [\n {\n \"value\": \"available\",\n \"label\": \"可借\"\n },\n {\n \"value\": \"unavailable\",\n \"label\": \"不可借\"\n },\n {\n \"value\": \"removed\",\n \"label\": \"下架\"\n }\n ]\n }\n ]\n },\n {\n \"tableName\": \"borrow_record\",\n \"tableComment\": \"借阅记录表\",\n \"adminMenuName\": \"借阅记录管理\",\n \"operations\": {\n \"add\": true,\n \"edit\": false,\n \"remove\": false,\n \"removeType\": \"physical\",\n \"reason\": \"\"\n },\n \"columns\": [\n {\n \"columnName\": \"id\",\n \"columnLabel\": \"记录ID\",\n \"columnComment\": \"主键ID\",\n \"columnType\": \"bigint(20)\",\n \"isPk\": \"1\",\n \"isIncrement\": \"1\",\n \"isRequired\": \"1\",\n \"javaType\": \"Long\",\n \"htmlType\": \"input\"\n },\n {\n \"columnName\": \"reader_id\",\n \"columnLabel\": \"读者\",\n \"columnComment\": \"借阅读者ID关联reader表\",\n \"columnType\": \"bigint(20)\",\n \"isPk\": \"0\",\n \"isIncrement\": \"0\",\n \"isRequired\": \"1\",\n \"javaType\": \"Long\",\n \"htmlType\": \"select\",\n \"dictType\": \"remote:reader:id:nickname\"\n },\n {\n \"columnName\": \"book_id\",\n \"columnLabel\": \"图书\",\n \"columnComment\": \"借阅图书ID关联book_info表\",\n \"columnType\": \"bigint(20)\",\n \"isPk\": \"0\",\n \"isIncrement\": \"0\",\n \"isRequired\": \"1\",\n \"javaType\": \"Long\",\n \"htmlType\": \"select\",\n \"dictType\": \"remote:book_info:id:title\"\n },\n {\n \"columnName\": \"borrow_time\",\n \"columnLabel\": \"借书时间\",\n \"columnComment\": \"实际借书时间\",\n \"columnType\": \"datetime\",\n \"isPk\": \"0\",\n \"isIncrement\": \"0\",\n \"isRequired\": \"1\",\n \"javaType\": \"Date\",\n \"htmlType\": \"datetime\"\n },\n {\n \"columnName\": \"due_time\",\n \"columnLabel\": \"应还时间\",\n \"columnComment\": \"应归还日期\",\n \"columnType\": \"datetime\",\n \"isPk\": \"0\",\n \"isIncrement\": \"0\",\n \"isRequired\": \"1\",\n \"javaType\": \"Date\",\n \"htmlType\": \"datetime\"\n },\n {\n \"columnName\": \"return_time\",\n \"columnLabel\": \"实际还书时间\",\n \"columnComment\": \"读者归还时间\",\n \"columnType\": \"datetime\",\n \"isPk\": \"0\",\n \"isIncrement\": \"0\",\n \"isRequired\": \"0\",\n \"javaType\": \"Date\",\n \"htmlType\": \"datetime\"\n },\n {\n \"columnName\": \"status\",\n \"columnLabel\": \"状态\",\n \"columnComment\": \"借阅状态pending-待审核, borrowing-借阅中, returning-待确认归还, returned-已归还, cancelled-已取消, rejected-已拒绝\",\n \"columnType\": \"varchar(20)\",\n \"isPk\": \"0\",\n \"isIncrement\": \"0\",\n \"isRequired\": \"1\",\n \"javaType\": \"String\",\n \"htmlType\": \"select\",\n \"dictType\": \"borrow_record_status\",\n \"dictOptions\": [\n {\n \"value\": \"pending\",\n \"label\": \"待审核\"\n },\n {\n \"value\": \"borrowing\",\n \"label\": \"借阅中\"\n },\n {\n \"value\": \"returning\",\n \"label\": \"待确认归还\"\n },\n {\n \"value\": \"returned\",\n \"label\": \"已归还\"\n },\n {\n \"value\": \"cancelled\",\n \"label\": \"已取消\"\n },\n {\n \"value\": \"rejected\",\n \"label\": \"已拒绝\"\n }\n ]\n },\n {\n \"columnName\": \"approve_user_id\",\n \"columnLabel\": \"审核人\",\n \"columnComment\": \"审核通过的管理员ID关联admin表\",\n \"columnType\": \"bigint(20)\",\n \"isPk\": \"0\",\n \"isIncrement\": \"0\",\n \"isRequired\": \"0\",\n \"javaType\": \"Long\",\n \"htmlType\": \"select\",\n \"dictType\": \"remote:admin:id:username\"\n },\n {\n \"columnName\": \"approve_time\",\n \"columnLabel\": \"审核时间\",\n \"columnComment\": \"管理员审核通过时间\",\n \"columnType\": \"datetime\",\n \"isPk\": \"0\",\n \"isIncrement\": \"0\",\n \"isRequired\": \"0\",\n \"javaType\": \"Date\",\n \"htmlType\": \"datetime\"\n },\n {\n \"columnName\": \"confirm_user_id\",\n \"columnLabel\": \"确认归还人\",\n \"columnComment\": \"确认归还的管理员ID关联admin表\",\n \"columnType\": \"bigint(20)\",\n \"isPk\": \"0\",\n \"isIncrement\": \"0\",\n \"isRequired\": \"0\",\n \"javaType\": \"Long\",\n \"htmlType\": \"select\",\n \"dictType\": \"remote:admin:id:username\"\n },\n {\n \"columnName\": \"confirm_time\",\n \"columnLabel\": \"归还确认时间\",\n \"columnComment\": \"管理员确认归还时间\",\n \"columnType\": \"datetime\",\n \"isPk\": \"0\",\n \"isIncrement\": \"0\",\n \"isRequired\": \"0\",\n \"javaType\": \"Date\",\n \"htmlType\": \"datetime\"\n },\n {\n \"columnName\": \"created_at\",\n \"columnLabel\": \"创建时间\",\n \"columnComment\": \"记录创建时间(申请时间)\",\n \"columnType\": \"datetime\",\n \"isPk\": \"0\",\n \"isIncrement\": \"0\",\n \"isRequired\": \"1\",\n \"javaType\": \"Date\",\n \"htmlType\": \"datetime\"\n },\n {\n \"columnName\": \"updated_at\",\n \"columnLabel\": \"更新时间\",\n \"columnComment\": \"记录最后更新时间\",\n \"columnType\": \"datetime\",\n \"isPk\": \"0\",\n \"isIncrement\": \"0\",\n \"isRequired\": \"0\",\n \"javaType\": \"Date\",\n \"htmlType\": \"datetime\"\n }\n ]\n },\n {\n \"tableName\": \"reservation\",\n \"tableComment\": \"预约表\",\n \"adminMenuName\": \"预约管理\",\n \"operations\": {\n \"add\": true,\n \"edit\": false,\n \"remove\": false,\n \"removeType\": \"physical\",\n \"reason\": \"\"\n },\n \"columns\": [\n {\n \"columnName\": \"id\",\n \"columnLabel\": \"预约ID\",\n \"columnComment\": \"主键ID\",\n \"columnType\": \"bigint(20)\",\n \"isPk\": \"1\",\n \"isIncrement\": \"1\",\n \"isRequired\": \"1\",\n \"javaType\": \"Long\",\n \"htmlType\": \"input\"\n },\n {\n \"columnName\": \"reader_id\",\n \"columnLabel\": \"读者\",\n \"columnComment\": \"预约读者ID关联reader表\",\n \"columnType\": \"bigint(20)\",\n \"isPk\": \"0\",\n \"isIncrement\": \"0\",\n \"isRequired\": \"1\",\n \"javaType\": \"Long\",\n \"htmlType\": \"select\",\n \"dictType\": \"remote:reader:id:nickname\"\n },\n {\n \"columnName\": \"book_id\",\n \"columnLabel\": \"图书\",\n \"columnComment\": \"预约图书ID关联book_info表\",\n \"columnType\": \"bigint(20)\",\n \"isPk\": \"0\",\n \"isIncrement\": \"0\",\n \"isRequired\": \"1\",\n \"javaType\": \"Long\",\n \"htmlType\": \"select\",\n \"dictType\": \"remote:book_info:id:title\"\n },\n {\n \"columnName\": \"reserve_time\",\n \"columnLabel\": \"预约时间\",\n \"columnComment\": \"读者预约时间\",\n \"columnType\": \"datetime\",\n \"isPk\": \"0\",\n \"isIncrement\": \"0\",\n \"isRequired\": \"1\",\n \"javaType\": \"Date\",\n \"htmlType\": \"datetime\"\n },\n {\n \"columnName\": \"status\",\n \"columnLabel\": \"状态\",\n \"columnComment\": \"预约状态waiting-等待中, fulfilled-已借出, cancelled-已取消, expired-已过期\",\n \"columnType\": \"varchar(20)\",\n \"isPk\": \"0\",\n \"isIncrement\": \"0\",\n \"isRequired\": \"1\",\n \"javaType\": \"String\",\n \"htmlType\": \"select\",\n \"dictType\": \"reservation_status\",\n \"dictOptions\": [\n {\n \"value\": \"waiting\",\n \"label\": \"等待中\"\n },\n {\n \"value\": \"fulfilled\",\n \"label\": \"已借出\"\n },\n {\n \"value\": \"cancelled\",\n \"label\": \"已取消\"\n },\n {\n \"value\": \"expired\",\n \"label\": \"已过期\"\n }\n ]\n },\n {\n \"columnName\": \"expire_time\",\n \"columnLabel\": \"过期时间\",\n \"columnComment\": \"预约自动过期时间\",\n \"columnType\": \"datetime\",\n \"isPk\": \"0\",\n \"isIncrement\": \"0\",\n \"isRequired\": \"0\",\n \"javaType\": \"Date\",\n \"htmlType\": \"datetime\"\n },\n {\n \"columnName\": \"fulfilled_record_id\",\n \"columnLabel\": \"关联借阅记录\",\n \"columnComment\": \"预约后实际借出的借阅记录ID关联borrow_record表\",\n \"columnType\": \"bigint(20)\",\n \"isPk\": \"0\",\n \"isIncrement\": \"0\",\n \"isRequired\": \"0\",\n \"javaType\": \"Long\",\n \"htmlType\": \"select\",\n \"dictType\": \"remote:borrow_record:id:id\"\n }\n ]\n },\n {\n \"tableName\": \"fine\",\n \"tableComment\": \"罚款表\",\n \"adminMenuName\": \"逾期费用管理\",\n \"operations\": {\n \"add\": true,\n \"edit\": false,\n \"remove\": false,\n \"removeType\": \"physical\",\n \"reason\": \"\"\n },\n \"columns\": [\n {\n \"columnName\": \"id\",\n \"columnLabel\": \"罚款ID\",\n \"columnComment\": \"主键ID\",\n \"columnType\": \"bigint(20)\",\n \"isPk\": \"1\",\n \"isIncrement\": \"1\",\n \"isRequired\": \"1\",\n \"javaType\": \"Long\",\n \"htmlType\": \"input\"\n },\n {\n \"columnName\": \"reader_id\",\n \"columnLabel\": \"读者\",\n \"columnComment\": \"被罚款读者ID关联reader表\",\n \"columnType\": \"bigint(20)\",\n \"isPk\": \"0\",\n \"isIncrement\": \"0\",\n \"isRequired\": \"1\",\n \"javaType\": \"Long\",\n \"htmlType\": \"select\",\n \"dictType\": \"remote:reader:id:nickname\"\n },\n {\n \"columnName\": \"book_id\",\n \"columnLabel\": \"图书\",\n \"columnComment\": \"关联图书ID关联book_info表\",\n \"columnType\": \"bigint(20)\",\n \"isPk\": \"0\",\n \"isIncrement\": \"0\",\n \"isRequired\": \"1\",\n \"javaType\": \"Long\",\n \"htmlType\": \"select\",\n \"dictType\": \"remote:book_info:id:title\"\n },\n {\n \"columnName\": \"borrow_record_id\",\n \"columnLabel\": \"借阅记录\",\n \"columnComment\": \"关联借阅记录ID关联borrow_record表\",\n \"columnType\": \"bigint(20)\",\n \"isPk\": \"0\",\n \"isIncrement\": \"0\",\n \"isRequired\": \"1\",\n \"javaType\": \"Long\",\n \"htmlType\": \"select\",\n \"dictType\": \"remote:borrow_record:id:id\"\n },\n {\n \"columnName\": \"overdue_days\",\n \"columnLabel\": \"逾期天数\",\n \"columnComment\": \"实际逾期天数\",\n \"columnType\": \"int(11)\",\n \"isPk\": \"0\",\n \"isIncrement\": \"0\",\n \"isRequired\": \"1\",\n \"javaType\": \"Integer\",\n \"htmlType\": \"input\"\n },\n {\n \"columnName\": \"amount\",\n \"columnLabel\": \"罚款金额\",\n \"columnComment\": \"需缴纳的罚款金额(元)\",\n \"columnType\": \"decimal(10,2)\",\n \"isPk\": \"0\",\n \"isIncrement\": \"0\",\n \"isRequired\": \"1\",\n \"javaType\": \"BigDecimal\",\n \"htmlType\": \"input\"\n },\n {\n \"columnName\": \"status\",\n \"columnLabel\": \"状态\",\n \"columnComment\": \"罚款状态unpaid-未支付, paid-已支付, waived-已免除\",\n \"columnType\": \"varchar(20)\",\n \"isPk\": \"0\",\n \"isIncrement\": \"0\",\n \"isRequired\": \"1\",\n \"javaType\": \"String\",\n \"htmlType\": \"select\",\n \"dictType\": \"fine_status\",\n \"dictOptions\": [\n {\n \"value\": \"unpaid\",\n \"label\": \"未支付\"\n },\n {\n \"value\": \"paid\",\n \"label\": \"已支付\"\n },\n {\n \"value\": \"waived\",\n \"label\": \"已免除\"\n }\n ]\n },\n {\n \"columnName\": \"create_time\",\n \"columnLabel\": \"创建时间\",\n \"columnComment\": \"罚款记录生成时间\",\n \"columnType\": \"datetime\",\n \"isPk\": \"0\",\n \"isIncrement\": \"0\",\n \"isRequired\": \"1\",\n \"javaType\": \"Date\",\n \"htmlType\": \"datetime\"\n },\n {\n \"columnName\": \"pay_time\",\n \"columnLabel\": \"支付时间\",\n \"columnComment\": \"读者支付罚款时间\",\n \"columnType\": \"datetime\",\n \"isPk\": \"0\",\n \"isIncrement\": \"0\",\n \"isRequired\": \"0\",\n \"javaType\": \"Date\",\n \"htmlType\": \"datetime\"\n }\n ]\n },\n {\n \"tableName\": \"reader\",\n \"tableComment\": \"读者信息表\",\n \"adminMenuName\": \"读者管理\",\n \"operations\": {\n \"add\": true,\n \"edit\": true,\n \"remove\": true,\n \"removeType\": \"physical\",\n \"reason\": \"\"\n },\n \"columns\": [\n {\n \"columnName\": \"id\",\n \"columnLabel\": \"读者ID\",\n \"columnComment\": \"主键ID\",\n \"columnType\": \"bigint(20)\",\n \"isPk\": \"1\",\n \"isIncrement\": \"1\",\n \"isRequired\": \"1\",\n \"javaType\": \"Long\",\n \"htmlType\": \"input\"\n },\n {\n \"columnName\": \"username\",\n \"columnLabel\": \"用户名\",\n \"columnComment\": \"登录用户名\",\n \"columnType\": \"varchar(50)\",\n \"isPk\": \"0\",\n \"isIncrement\": \"0\",\n \"isRequired\": \"1\",\n \"javaType\": \"String\",\n \"htmlType\": \"input\"\n },\n {\n \"columnName\": \"password_hash\",\n \"columnLabel\": \"密码哈希\",\n \"columnComment\": \"加密后的密码\",\n \"columnType\": \"varchar(255)\",\n \"isPk\": \"0\",\n \"isIncrement\": \"0\",\n \"isRequired\": \"1\",\n \"javaType\": \"String\",\n \"htmlType\": \"input\"\n },\n {\n \"columnName\": \"nickname\",\n \"columnLabel\": \"昵称\",\n \"columnComment\": \"读者昵称/显示名\",\n \"columnType\": \"varchar(50)\",\n \"isPk\": \"0\",\n \"isIncrement\": \"0\",\n \"isRequired\": \"0\",\n \"javaType\": \"String\",\n \"htmlType\": \"input\"\n },\n {\n \"columnName\": \"status\",\n \"columnLabel\": \"状态\",\n \"columnComment\": \"读者账号状态active-正常, inactive-停用, locked-锁定\",\n \"columnType\": \"varchar(20)\",\n \"isPk\": \"0\",\n \"isIncrement\": \"0\",\n \"isRequired\": \"1\",\n \"javaType\": \"String\",\n \"htmlType\": \"select\",\n \"dictType\": \"reader_status\",\n \"dictOptions\": [\n {\n \"value\": \"active\",\n \"label\": \"正常\"\n },\n {\n \"value\": \"inactive\",\n \"label\": \"停用\"\n },\n {\n \"value\": \"locked\",\n \"label\": \"锁定\"\n }\n ]\n },\n {\n \"columnName\": \"create_time\",\n \"columnLabel\": \"创建时间\",\n \"columnComment\": \"账号创建时间\",\n \"columnType\": \"datetime\",\n \"isPk\": \"0\",\n \"isIncrement\": \"0\",\n \"isRequired\": \"1\",\n \"javaType\": \"Date\",\n \"htmlType\": \"datetime\"\n },\n {\n \"columnName\": \"real_name\",\n \"columnLabel\": \"真实姓名\",\n \"columnComment\": \"读者真实姓名\",\n \"columnType\": \"varchar(50)\",\n \"isPk\": \"0\",\n \"isIncrement\": \"0\",\n \"isRequired\": \"0\",\n \"javaType\": \"String\",\n \"htmlType\": \"input\"\n },\n {\n \"columnName\": \"student_id\",\n \"columnLabel\": \"学号\",\n \"columnComment\": \"读者学号/工号\",\n \"columnType\": \"varchar(20)\",\n \"isPk\": \"0\",\n \"isIncrement\": \"0\",\n \"isRequired\": \"0\",\n \"javaType\": \"String\",\n \"htmlType\": \"input\"\n },\n {\n \"columnName\": \"phone\",\n \"columnLabel\": \"手机号\",\n \"columnComment\": \"联系手机号码\",\n \"columnType\": \"varchar(20)\",\n \"isPk\": \"0\",\n \"isIncrement\": \"0\",\n \"isRequired\": \"0\",\n \"javaType\": \"String\",\n \"htmlType\": \"input\"\n },\n {\n \"columnName\": \"email\",\n \"columnLabel\": \"邮箱\",\n \"columnComment\": \"电子邮箱地址\",\n \"columnType\": \"varchar(100)\",\n \"isPk\": \"0\",\n \"isIncrement\": \"0\",\n \"isRequired\": \"0\",\n \"javaType\": \"String\",\n \"htmlType\": \"input\"\n },\n {\n \"columnName\": \"gender\",\n \"columnLabel\": \"性别\",\n \"columnComment\": \"读者性别\",\n \"columnType\": \"varchar(10)\",\n \"isPk\": \"0\",\n \"isIncrement\": \"0\",\n \"isRequired\": \"0\",\n \"javaType\": \"String\",\n \"htmlType\": \"select\",\n \"dictType\": \"gender\",\n \"dictOptions\": [\n {\n \"value\": \"male\",\n \"label\": \"男\"\n },\n {\n \"value\": \"female\",\n \"label\": \"女\"\n }\n ]\n },\n {\n \"columnName\": \"avatar\",\n \"columnLabel\": \"头像\",\n \"columnComment\": \"读者头像图片URL\",\n \"columnType\": \"varchar(255)\",\n \"isPk\": \"0\",\n \"isIncrement\": \"0\",\n \"isRequired\": \"0\",\n \"javaType\": \"String\",\n \"htmlType\": \"imageUpload\"\n },\n {\n \"columnName\": \"borrowed_count\",\n \"columnLabel\": \"当前借阅数\",\n \"columnComment\": \"当前正在借阅的图书数量\",\n \"columnType\": \"int(11)\",\n \"isPk\": \"0\",\n \"isIncrement\": \"0\",\n \"isRequired\": \"0\",\n \"javaType\": \"Integer\",\n \"htmlType\": \"input\"\n }\n ]\n },\n {\n \"tableName\": \"borrow_application\",\n \"tableComment\": \"借书申请表\",\n \"adminMenuName\": \"借书申请管理\",\n \"operations\": {\n \"add\": true,\n \"edit\": false,\n \"remove\": false,\n \"removeType\": \"physical\",\n \"reason\": \"\"\n },\n \"columns\": [\n {\n \"columnName\": \"id\",\n \"columnLabel\": \"申请ID\",\n \"columnComment\": \"主键ID\",\n \"columnType\": \"bigint(20)\",\n \"isPk\": \"1\",\n \"isIncrement\": \"1\",\n \"isRequired\": \"1\",\n \"javaType\": \"Long\",\n \"htmlType\": \"input\"\n },\n {\n \"columnName\": \"reader_id\",\n \"columnLabel\": \"读者\",\n \"columnComment\": \"申请读者ID关联reader表\",\n \"columnType\": \"bigint(20)\",\n \"isPk\": \"0\",\n \"isIncrement\": \"0\",\n \"isRequired\": \"1\",\n \"javaType\": \"Long\",\n \"htmlType\": \"select\",\n \"dictType\": \"remote:reader:id:nickname\"\n },\n {\n \"columnName\": \"book_id\",\n \"columnLabel\": \"图书\",\n \"columnComment\": \"申请图书ID关联book_info表\",\n \"columnType\": \"bigint(20)\",\n \"isPk\": \"0\",\n \"isIncrement\": \"0\",\n \"isRequired\": \"1\",\n \"javaType\": \"Long\",\n \"htmlType\": \"select\",\n \"dictType\": \"remote:book_info:id:title\"\n },\n {\n \"columnName\": \"apply_time\",\n \"columnLabel\": \"申请时间\",\n \"columnComment\": \"读者提交申请时间\",\n \"columnType\": \"datetime\",\n \"isPk\": \"0\",\n \"isIncrement\": \"0\",\n \"isRequired\": \"1\",\n \"javaType\": \"Date\",\n \"htmlType\": \"datetime\"\n },\n {\n \"columnName\": \"status\",\n \"columnLabel\": \"状态\",\n \"columnComment\": \"申请状态pending-待审核, approved-已通过, rejected-已拒绝, cancelled-已取消\",\n \"columnType\": \"varchar(20)\",\n \"isPk\": \"0\",\n \"isIncrement\": \"0\",\n \"isRequired\": \"1\",\n \"javaType\": \"String\",\n \"htmlType\": \"select\",\n \"dictType\": \"borrow_application_status\",\n \"dictOptions\": [\n {\n \"value\": \"pending\",\n \"label\": \"待审核\"\n },\n {\n \"value\": \"approved\",\n \"label\": \"已通过\"\n },\n {\n \"value\": \"rejected\",\n \"label\": \"已拒绝\"\n },\n {\n \"value\": \"cancelled\",\n \"label\": \"已取消\"\n }\n ]\n },\n {\n \"columnName\": \"approve_user_id\",\n \"columnLabel\": \"审批人\",\n \"columnComment\": \"审批管理员ID关联admin表\",\n \"columnType\": \"bigint(20)\",\n \"isPk\": \"0\",\n \"isIncrement\": \"0\",\n \"isRequired\": \"0\",\n \"javaType\": \"Long\",\n \"htmlType\": \"select\",\n \"dictType\": \"remote:admin:id:username\"\n },\n {\n \"columnName\": \"approve_time\",\n \"columnLabel\": \"审批时间\",\n \"columnComment\": \"管理员审批时间\",\n \"columnType\": \"datetime\",\n \"isPk\": \"0\",\n \"isIncrement\": \"0\",\n \"isRequired\": \"0\",\n \"javaType\": \"Date\",\n \"htmlType\": \"datetime\"\n },\n {\n \"columnName\": \"reject_reason\",\n \"columnLabel\": \"拒绝原因\",\n \"columnComment\": \"管理员拒绝申请的原因\",\n \"columnType\": \"varchar(255)\",\n \"isPk\": \"0\",\n \"isIncrement\": \"0\",\n \"isRequired\": \"0\",\n \"javaType\": \"String\",\n \"htmlType\": \"textarea\"\n }\n ]\n },\n {\n \"tableName\": \"admin\",\n \"tableComment\": \"管理员账号表\",\n \"adminMenuName\": \"管理员管理\",\n \"operations\": {\n \"add\": true,\n \"edit\": true,\n \"remove\": true,\n \"removeType\": \"physical\",\n \"reason\": \"\"\n },\n \"columns\": [\n {\n \"columnName\": \"id\",\n \"columnLabel\": \"管理员ID\",\n \"columnComment\": \"主键ID\",\n \"columnType\": \"bigint(20)\",\n \"isPk\": \"1\",\n \"isIncrement\": \"1\",\n \"isRequired\": \"1\",\n \"javaType\": \"Long\",\n \"htmlType\": \"input\"\n },\n {\n \"columnName\": \"username\",\n \"columnLabel\": \"用户名\",\n \"columnComment\": \"登录用户名\",\n \"columnType\": \"varchar(50)\",\n \"isPk\": \"0\",\n \"isIncrement\": \"0\",\n \"isRequired\": \"1\",\n \"javaType\": \"String\",\n \"htmlType\": \"input\"\n },\n {\n \"columnName\": \"password_hash\",\n \"columnLabel\": \"密码哈希\",\n \"columnComment\": \"加密后的密码\",\n \"columnType\": \"varchar(255)\",\n \"isPk\": \"0\",\n \"isIncrement\": \"0\",\n \"isRequired\": \"1\",\n \"javaType\": \"String\",\n \"htmlType\": \"input\"\n },\n {\n \"columnName\": \"nickname\",\n \"columnLabel\": \"昵称\",\n \"columnComment\": \"管理员显示名称\",\n \"columnType\": \"varchar(50)\",\n \"isPk\": \"0\",\n \"isIncrement\": \"0\",\n \"isRequired\": \"0\",\n \"javaType\": \"String\",\n \"htmlType\": \"input\"\n },\n {\n \"columnName\": \"status\",\n \"columnLabel\": \"状态\",\n \"columnComment\": \"管理员账号状态active-正常, inactive-停用\",\n \"columnType\": \"varchar(20)\",\n \"isPk\": \"0\",\n \"isIncrement\": \"0\",\n \"isRequired\": \"1\",\n \"javaType\": \"String\",\n \"htmlType\": \"select\",\n \"dictType\": \"admin_status\",\n \"dictOptions\": [\n {\n \"value\": \"active\",\n \"label\": \"正常\"\n },\n {\n \"value\": \"inactive\",\n \"label\": \"停用\"\n }\n ]\n },\n {\n \"columnName\": \"create_time\",\n \"columnLabel\": \"创建时间\",\n \"columnComment\": \"账号创建时间\",\n \"columnType\": \"datetime\",\n \"isPk\": \"0\",\n \"isIncrement\": \"0\",\n \"isRequired\": \"1\",\n \"javaType\": \"Date\",\n \"htmlType\": \"datetime\"\n }\n ]\n }\n ]\n}', '1', NULL, 145469, '2026-07-14 16:23:51');
INSERT INTO `factory_ai_stage_output` VALUES (112, 104, 104, 100, 'app_blueprint', '{\"projectName\":\"图书管理系统\",\"projectDescription\":\"项目定位面向高校图书馆的图书管理系统供学生、教师和管理员使用。角色学生、教师可借更多书且期限更长、管理员。核心业务对象图书、借阅记录、预约记录、罚款记录。核心流程用户检索图书→查看可借状态→借阅需未逾期、未超限→到期归还或续借每本限续借1次续借15天→逾期按0.1元/天罚款→管理员处理预约到书、上架新书。关键规则学生最多借5本期限30天教师最多10本期限60天。同一用户重复借阅同一本书仅在归还后方可再次借阅。预约图书到书后保留3天逾期释放。罚款累计超过10元暂停借阅权限。异常边界库存不足时不可借阅已预约图书不可借出给未预约用户超期未还不可再借图书状态为“在馆”才能借出用户存在欠款或黑名单时拒绝操作。\",\"industryTemplate\":\"\",\"stylePreset\":\"dark-tech\",\"extraRequirements\":\"\"}', '{\n \"roles\": [\n {\n \"code\": \"admin\",\n \"name\": \"管理员\",\n \"description\": \"系统管理员,管理图书、借阅、预约、罚款及用户账号\"\n },\n {\n \"code\": \"student\",\n \"name\": \"学生\",\n \"description\": \"学生用户可借阅图书最多5本期限30天\"\n },\n {\n \"code\": \"teacher\",\n \"name\": \"教师\",\n \"description\": \"教师用户可借阅图书最多10本期限60天\"\n }\n ],\n \"frontendMenus\": [\n {\n \"code\": \"book_catalog\",\n \"name\": \"图书目录\",\n \"path\": \"/books\",\n \"pageCode\": \"book_catalog_page\",\n \"requiresLogin\": false,\n \"visibleRoles\": [],\n \"dataScope\": \"PUBLIC\"\n },\n {\n \"code\": \"my_borrowings\",\n \"name\": \"我的借阅\",\n \"path\": \"/my/borrowings\",\n \"pageCode\": \"my_borrowings_page\",\n \"requiresLogin\": true,\n \"visibleRoles\": [\"student\", \"teacher\"],\n \"dataScope\": \"CURRENT_USER\"\n },\n {\n \"code\": \"my_reservations\",\n \"name\": \"我的预约\",\n \"path\": \"/my/reservations\",\n \"pageCode\": \"my_reservations_page\",\n \"requiresLogin\": true,\n \"visibleRoles\": [\"student\", \"teacher\"],\n \"dataScope\": \"CURRENT_USER\"\n },\n {\n \"code\": \"my_fines\",\n \"name\": \"我的罚款\",\n \"path\": \"/my/fines\",\n \"pageCode\": \"my_fines_page\",\n \"requiresLogin\": true,\n \"visibleRoles\": [\"student\", \"teacher\"],\n \"dataScope\": \"CURRENT_USER\"\n },\n {\n \"code\": \"student_profile\",\n \"name\": \"学生个人资料\",\n \"path\": \"/student/profile\",\n \"pageCode\": \"student_profile_page\",\n \"requiresLogin\": true,\n \"visibleRoles\": [\"student\"],\n \"dataScope\": \"CURRENT_USER\"\n },\n {\n \"code\": \"teacher_profile\",\n \"name\": \"教师个人资料\",\n \"path\": \"/teacher/profile\",\n \"pageCode\": \"teacher_profile_page\",\n \"requiresLogin\": true,\n \"visibleRoles\": [\"teacher\"],\n \"dataScope\": \"CURRENT_USER\"\n }\n ],\n \"frontendPages\": [\n {\n \"code\": \"book_catalog_page\",\n \"name\": \"图书目录\",\n \"menuCode\": \"book_catalog\",\n \"path\": \"/books\",\n \"pageType\": \"list\",\n \"tableName\": \"book_info\"\n },\n {\n \"code\": \"book_detail_page\",\n \"name\": \"图书详情\",\n \"menuCode\": null,\n \"path\": \"/books/:id\",\n \"pageType\": \"detail\",\n \"tableName\": \"book_info\"\n },\n {\n \"code\": \"my_borrowings_page\",\n \"name\": \"我的借阅\",\n \"menuCode\": \"my_borrowings\",\n \"path\": \"/my/borrowings\",\n \"pageType\": \"current_user_list\",\n \"tableName\": \"borrowing_record\"\n },\n {\n \"code\": \"my_reservations_page\",\n \"name\": \"我的预约\",\n \"menuCode\": \"my_reservations\",\n \"path\": \"/my/reservations\",\n \"pageType\": \"current_user_list\",\n \"tableName\": \"reservation\"\n },\n {\n \"code\": \"my_fines_page\",\n \"name\": \"我的罚款\",\n \"menuCode\": \"my_fines\",\n \"path\": \"/my/fines\",\n \"pageType\": \"current_user_list\",\n \"tableName\": \"fine\"\n },\n {\n \"code\": \"student_profile_page\",\n \"name\": \"学生个人资料\",\n \"menuCode\": \"student_profile\",\n \"path\": \"/student/profile\",\n \"pageType\": \"form\",\n \"tableName\": \"student\"\n },\n {\n \"code\": \"teacher_profile_page\",\n \"name\": \"教师个人资料\",\n \"menuCode\": \"teacher_profile\",\n \"path\": \"/teacher/profile\",\n \"pageType\": \"form\",\n \"tableName\": \"teacher\"\n }\n ],\n \"adminMenus\": [\n {\n \"code\": \"book_management\",\n \"name\": \"图书管理\",\n \"path\": \"/admin/books\",\n \"pageCode\": \"book_management_page\",\n \"tableName\": \"book_info\",\n \"pageType\": \"list\",\n \"requiresLogin\": true,\n \"visibleRoles\": [\"admin\"],\n \"dataScope\": \"ROLE\"\n },\n {\n \"code\": \"borrowing_management\",\n \"name\": \"借阅管理\",\n \"path\": \"/admin/borrowings\",\n \"pageCode\": \"borrowing_management_page\",\n \"tableName\": \"borrowing_record\",\n \"pageType\": \"list\",\n \"requiresLogin\": true,\n \"visibleRoles\": [\"admin\"],\n \"dataScope\": \"ROLE\"\n },\n {\n \"code\": \"reservation_management\",\n \"name\": \"预约管理\",\n \"path\": \"/admin/reservations\",\n \"pageCode\": \"reservation_management_page\",\n \"tableName\": \"reservation\",\n \"pageType\": \"list\",\n \"requiresLogin\": true,\n \"visibleRoles\": [\"admin\"],\n \"dataScope\": \"ROLE\"\n },\n {\n \"code\": \"fine_management\",\n \"name\": \"罚款管理\",\n \"path\": \"/admin/fines\",\n \"pageCode\": \"fine_management_page\",\n \"tableName\": \"fine\",\n \"pageType\": \"list\",\n \"requiresLogin\": true,\n \"visibleRoles\": [\"admin\"],\n \"dataScope\": \"ROLE\"\n },\n {\n \"code\": \"student_management\",\n \"name\": \"学生管理\",\n \"path\": \"/admin/students\",\n \"pageCode\": \"student_management_page\",\n \"tableName\": \"student\",\n \"pageType\": \"list\",\n \"requiresLogin\": true,\n \"visibleRoles\": [\"admin\"],\n \"dataScope\": \"ROLE\"\n },\n {\n \"code\": \"teacher_management\",\n \"name\": \"教师管理\",\n \"path\": \"/admin/teachers\",\n \"pageCode\": \"teacher_management_page\",\n \"tableName\": \"teacher\",\n \"pageType\": \"list\",\n \"requiresLogin\": true,\n \"visibleRoles\": [\"admin\"],\n \"dataScope\": \"ROLE\"\n }\n ],\n \"adminHomeDashboard\": {\n \"title\": \"运营总览\",\n \"description\": \"核心业务数据\",\n \"metrics\": [\n {\n \"label\": \"图书总数\",\n \"value\": 0,\n \"semantic\": \"content\"\n },\n {\n \"label\": \"本月借阅数\",\n \"value\": 0,\n \"semantic\": \"order\"\n },\n {\n \"label\": \"逾期未还数\",\n \"value\": 0,\n \"semantic\": \"warning\"\n },\n {\n \"label\": \"未缴罚款总额\",\n \"value\": 0,\n \"semantic\": \"money\"\n }\n ],\n \"charts\": [\n {\n \"title\": \"借阅趋势\",\n \"type\": \"line\",\n \"semantic\": \"order\",\n \"description\": \"按月统计借阅数量\"\n },\n {\n \"title\": \"图书分类分布\",\n \"type\": \"pie\",\n \"semantic\": \"content\",\n \"description\": \"各分类图书占比\"\n }\n ]\n }\n}', '1', NULL, 43042, '2026-07-14 17:15:44');
INSERT INTO `factory_ai_stage_output` VALUES (113, 104, 104, 100, 'flow_config', '{\"mode\":\"generate\",\"projectName\":\"图书管理系统\",\"projectDescription\":\"项目定位面向高校图书馆的图书管理系统供学生、教师和管理员使用。角色学生、教师可借更多书且期限更长、管理员。核心业务对象图书、借阅记录、预约记录、罚款记录。核心流程用户检索图书→查看可借状态→借阅需未逾期、未超限→到期归还或续借每本限续借1次续借15天→逾期按0.1元/天罚款→管理员处理预约到书、上架新书。关键规则学生最多借5本期限30天教师最多10本期限60天。同一用户重复借阅同一本书仅在归还后方可再次借阅。预约图书到书后保留3天逾期释放。罚款累计超过10元暂停借阅权限。异常边界库存不足时不可借阅已预约图书不可借出给未预约用户超期未还不可再借图书状态为“在馆”才能借出用户存在欠款或黑名单时拒绝操作。\",\"industryTemplate\":\"\",\"stylePreset\":\"dark-tech\",\"extraRequirements\":\"\",\"confirmedAppBlueprint\":{\"adminHomeDashboard\":{\"charts\":[{\"filters\":[],\"metrics\":[],\"semantic\":\"order\",\"title\":\"借阅趋势\",\"type\":\"line\"},{\"filters\":[],\"metrics\":[],\"semantic\":\"content\",\"title\":\"图书分类分布\",\"type\":\"pie\"}],\"description\":\"核心业务数据\",\"metrics\":[{\"filters\":[],\"semantic\":\"content\"},{\"filters\":[],\"semantic\":\"order\"},{\"filters\":[],\"semantic\":\"warning\"},{\"filters\":[],\"semantic\":\"money\"}],\"title\":\"运营总览\"},\"adminMenus\":[{\"code\":\"book_management\",\"dataScope\":\"ROLE\",\"name\":\"图书管理\",\"pageCode\":\"book_management_page\",\"pageType\":\"list\",\"path\":\"/admin/books\",\"requiresLogin\":true,\"tableName\":\"book_info\",\"visibleRoles\":[\"admin\"]},{\"code\":\"borrowing_management\",\"dataScope\":\"ROLE\",\"name\":\"借阅管理\",\"pageCode\":\"borrowing_management_page\",\"pageType\":\"list\",\"path\":\"/admin/borrowings\",\"requiresLogin\":true,\"tableName\":\"borrowing_record\",\"visibleRoles\":[\"admin\"]},{\"code\":\"reservation_management\",\"dataScope\":\"ROLE\",\"name\":\"预约管理\",\"pageCode\":\"reservation_management_page\",\"pageType\":\"list\",\"path\":\"/admin/reservations\",\"requiresLogin\":true,\"tableName\":\"reservation\",\"visibleRoles\":[\"admin\"]},{\"code\":\"fine_management\",\"dataScope\":\"ROLE\",\"name\":\"罚款管理\",\"pageCode\":\"fine_management_page\",\"pageType\":\"list\",\"path\":\"/admin/fines\",\"requiresLogin\":true,\"tableName\":\"fine\",\"visibleRoles\":[\"admin\"]},{\"code\":\"student_management\",\"dataScope\":\"ROLE\",\"name\":\"学生管理\",\"pageCode\":\"student_management_page\",\"pageType\":\"list\",\"path\":\"/admin/students\",\"requiresLogin\":true,\"tableName\":\"student\",\"visibleRoles\":[\"admin\"]},{\"code\":\"teacher_management\",\"dataScope\":\"ROLE\",\"name\":\"教师管理\",\"pageCode\":\"teacher_management_page\",\"pageType\":\"list\",\"path\":\"/admin/teachers\",\"requiresLogin\":true,\"tableName\":\"teacher\",\"visibleRoles\":[\"admin\"]}],\"frontendMenus\":[{\"code\":\"book_catalog\",\"dataScope\":\"PUBLIC\",\"name\":\"图书目录\",\"pageCode\":\"book_catalog_page\",\"pageType\":\"\",\"path\":\"/books\",\"requiresLogin\":false,\"tableName\":\"\",\"visibleRoles\":[]},{\"code\":\"my_borrowings\",\"dataScope\":\"CURRENT_USER\",\"name\":\"我的借阅\",\"pageCode\":\"my_borrowings_page\",\"pageType\":\"\",\"path\":\"/my/borrowings\",\"requiresLogin\":true,\"tableName\":\"\",\"visibleRoles\":[\"student\",\"teacher\"]},{\"code\":\"my_reservations\",\"dataScope\":\"CURRENT_USER\",\"name\":\"我的预约\",\"pageCode\":\"my_reservations_page\",\"pageType\":\"\",\"path\":\"/my/reservations\",\"requiresLogin\":true,\"tableName\":\"\",\"visibleRoles\":[\"student\",\"teacher\"]},{\"code\":\"my_fines\",\"dataScope\":\"CURRENT_USER\",\"name\":\"我的罚款\",\"pageCode\":\"my_fines_page\",\"pageType\":\"\",\"path\":\"/my/fines\",\"requiresLogin\":true,\"tableName\":\"\",\"visibleRoles\":[\"student\",\"teacher\"]},{\"code\":\"student_profile\",\"dataScope\":\"CURRENT_USER\",\"name\":\"学生个人资料\",\"pageCode\":\"student_profile_page\",\"pageType\":\"\",\"path\":\"/student/profile\",\"requiresLogin\":true,\"tableName\":\"\",\"visibleRoles\":[\"student\"]},{\"code\":\"teacher_profile\",\"dataScope\":\"CURRENT_USER\",\"name\":\"教师个人资料\",\"pageCode\":\"teacher_profile_page\",\"pageType\":\"\",\"path\":\"/teacher/profile\",\"requiresLogin\":true,\"tableName\":\"\",\"visibleRoles\":[\"teacher\"]}],\"frontendPages\":[{\"code\":\"book_catalog_page\",\"menuCode\":\"book_catalog\",\"name\":\"图书目录\",\"pageType\":\"list\",\"parentPageCode\":\"\",\"path\":\"/books\",\"tableName\":\"book_info\"},{\"code\":\"book_detail_page\",\"menuCode\":\"\",\"name\":\"图书详情\",\"pageType\":\"detail\",\"parentPageCode\":\"\",\"path\":\"/books/:id\",\"tableName\":\"book_info\"},{\"code\":\"my_borrowings_page\",\"menuCode\":\"my_borrowings\",\"name\":\"我的借阅\",\"pageType\":\"current_user_list\",\"parentPageCode\":\"\",\"path\":\"/my/borrowings\",\"tableName\":\"borrowing_record\"},{\"code\":\"my_reservations_page\",\"menuCode\":\"my_reservations\",\"name\":\"我的预约\",\"pageType\":\"current_user_list\",\"parentPageCode\":\"\",\"path\":\"/my/reservations\",\"tableName\":\"reservation\"},{\"code\":\"my_fines_page\",\"menuCode\":\"my_fines\",\"name\":\"我的罚款\",\"pageType\":\"current_user_list\",\"parentPageCode\":\"\",\"path\":\"/my/fines\",\"tableName\":\"fine\"},{\"code\":\"student_profile_page\",\"menuCode\":\"student_profile\",\"name\":\"学生个人资料\",\"pageType\":\"form\",\"parentPageCode\":\"\",\"path\":\"/student/profile\",\"tableName\":\"student\"},{\"code\":\"teacher_profile_page\",\"menuCode\":\"teacher_profile\",\"name\":\"教师个人资料\",\"pageType\":\"form\",\"parentPageCode\":\"\",\"path\":\"/teacher/profile\",\"tableName\":\"teacher\"}],\"roles\":[{\"code\":\"admin\",\"description\":\"系统管理员,管理图书、借阅、预约、罚款及用户账号\",\"name\":\"管理员\"},{\"code\":\"student\",\"description\":\"学生用户可借阅图书最多5本期限30天\",\"name\":\"学生\"},{\"code\":\"teacher\",\"description\":\"教师用户可借阅图书最多10本期限60天\",\"name\":\"教师\"}]}}', '{\"attemptCount\":2,\"responses\":[\"```json\\n{\\n \\\"version\\\": \\\"1.0\\\",\\n \\\"code\\\": \\\"borrowing_flow\\\",\\n \\\"name\\\": \\\"借阅流程\\\",\\n \\\"mainTable\\\": \\\"borrowing_record\\\",\\n \\\"statusField\\\": \\\"status\\\",\\n \\\"notFoundMessage\\\": \\\"借阅记录不存在\\\",\\n \\\"states\\\": [\\n {\\\"code\\\": \\\"pending\\\", \\\"label\\\": \\\"待审核\\\"},\\n {\\\"code\\\": \\\"borrowing\\\", \\\"label\\\": \\\"借阅中\\\"},\\n {\\\"code\\\": \\\"borrowing_renewed\\\", \\\"label\\\": \\\"已续借\\\"},\\n {\\\"code\\\": \\\"overdue\\\", \\\"label\\\": \\\"逾期\\\"},\\n {\\\"code\\\": \\\"returned\\\", \\\"label\\\": \\\"已归还\\\"},\\n {\\\"code\\\": \\\"rejected\\\", \\\"label\\\": \\\"已驳回\\\"}\\n ],\\n \\\"actions\\\": [\\n {\\n \\\"code\\\": \\\"approve\\\",\\n \\\"name\\\": \\\"审核通过\\\",\\n \\\"from\\\": \\\"pending\\\",\\n \\\"to\\\": \\\"borrowing\\\",\\n \\\"actor\\\": \\\"admin\\\",\\n \\\"method\\\": \\\"POST\\\",\\n \\\"path\\\": \\\"/admin/borrowings/approve\\\",\\n \\\"invalidStateMessage\\\": \\\"当前状态不能审核\\\",\\n \\\"successMessage\\\": \\\"审核成功\\\",\\n \\\"audit\\\": {\\\"userField\\\": \\\"approve_user_id\\\", \\\"timeField\\\": \\\"approve_time\\\"},\\n \\\"effects\\\": [\\n {\\n \\\"type\\\": \\\"decrease\\\",\\n \\\"table\\\": \\\"book_info\\\",\\n \\\"relationField\\\": \\\"book_id\\\",\\n \\\"field\\\": \\\"stock\\\",\\n \\\"amount\\\": \\\"1\\\",\\n \\\"min\\\": \\\"0\\\",\\n \\\"notFoundMessage\\\": \\\"图书不存在\\\",\\n \\\"errorMessage\\\": \\\"图书库存不足\\\"\\n }\\n ],\\n \\\"button\\\": {\\n \\\"scope\\\": \\\"admin\\\",\\n \\\"pageCode\\\": \\\"borrowing_management_page\\\",\\n \\\"slot\\\": \\\"list.rowActions\\\",\\n \\\"type\\\": \\\"success\\\",\\n \\\"confirm\\\": \\\"确认审核通过吗?\\\",\\n \\\"order\\\": 10\\n }\\n },\\n {\\n \\\"code\\\": \\\"reject\\\",\\n \\\"name\\\": \\\"驳回\\\",\\n \\\"from\\\": \\\"pending\\\",\\n \\\"to\\\": \\\"rejected\\\",\\n \\\"actor\\\": \\\"admin\\\",\\n \\\"method\\\": \\\"POST\\\",\\n \\\"path\\\": \\\"/admin/borrowings/reject\\\",\\n \\\"invalidStateMessage\\\": \\\"当前状态不能驳回\\\",\\n \\\"successMessage\\\": \\\"已驳回\\\",\\n \\\"audit\\\": {\\\"userField\\\": \\\"approve_user_id\\\", \\\"timeField\\\": \\\"approve_time\\\"},\\n \\\"effects\\\": [],\\n \\\"button\\\": {\\n \\\"scope\\\": \\\"admin\\\",\\n \\\"pageCode\\\": \\\"borrowing_management_page\\\",\\n \\\"slot\\\": \\\"list.rowActions\\\",\\n \\\"type\\\": \\\"danger\\\",\\n \\\"confirm\\\": \\\"确认驳回借阅申请吗?\\\",\\n \\\"order\\\": 20\\n }\\n },\\n {\\n \\\"code\\\": \\\"return_book\\\",\\n \\\"name\\\": \\\"归还\\\",\\n \\\"from\\\": \\\"borrowing\\\",\\n \\\"to\\\": \\\"returned\\\",\\n \\\"actor\\\": \\\"admin\\\",\\n \\\"method\\\": \\\"POST\\\",\\n \\\"path\\\": \\\"/admin/borrowings/return\\\",\\n \\\"invalidStateMessage\\\": \\\"当前状态不能归还\\\",\\n \\\"successMessage\\\": \\\"归还成功\\\",\\n \\\"audit\\\": {\\\"userField\\\": \\\"return_user_id\\\", \\\"timeField\\\": \\\"return_time\\\"},\\n \\\"effects\\\": [\\n {\\n \\\"type\\\": \\\"increase\\\",\\n \\\"table\\\": \\\"book_info\\\",\\n \\\"relationField\\\": \\\"book_id\\\",\\n \\\"field\\\": \\\"stock\\\",\\n \\\"amount\\\": \\\"1\\\",\\n \\\"notFoundMessage\\\": \\\"图书不存在\\\",\\n \\\"errorMessage\\\": \\\"归还失败\\\"\\n }\\n ],\\n \\\"button\\\": {\\n \\\"scope\\\": \\\"admin\\\",\\n \\\"pageCode\\\": \\\"borrowing_management_page\\\",\\n \\\"slot\\\": \\\"list.rowActions\\\",\\n \\\"type\\\": \\\"primary\\\",\\n \\\"confirm\\\": \\\"确认归还图书吗?\\\",\\n \\\"order\\\": 30\\n }\\n },\\n {\\n \\\"code\\\": \\\"return_overdue\\\",\\n \\\"name\\\": \\\"归还(逾期)\\\",\\n \\\"from\\\": \\\"overdue\\\",\\n \\\"to\\\": \\\"returned\\\",\\n \\\"actor\\\": \\\"admin\\\",\\n \\\"method\\\": \\\"POST\\\",\\n \\\"path\\\": \\\"/admin/borrowings/return-overdue\\\",\\n \\\"invalidStateMessage\\\": \\\"当前状态不是逾期\\\",\\n \\\"successMessage\\\": \\\"归还成功,罚款已记录\\\",\\n \\\"audit\\\": {\\\"userField\\\": \\\"return_user_id\\\", \\\"timeField\\\": \\\"return_time\\\"},\\n \\\"effects\\\": [\\n {\\n \\\"type\\\": \\\"increase\\\",\\n \\\"table\\\": \\\"book_info\\\",\\n \\\"relationField\\\": \\\"book_id\\\",\\n \\\"field\\\": \\\"stock\\\",\\n \\\"amount\\\": \\\"1\\\",\\n \\\"notFoundMessage\\\": \\\"图书不存在\\\",\\n \\\"errorMessage\\\": \\\"归还失败\\\"\\n },\\n {\\n \\\"type\\\": \\\"create_record\\\",\\n \\\"table\\\": \\\"fine\\\",\\n \\\"values\\\": {\\n \\\"borrowing_id\\\": \\\"record.id\\\",\\n \\\"user_id\\\": \\\"record.user_id\\\",\\n \\\"amount\\\": \\\"record.overdue_days * 0.1\\\",\\n \\\"paid_amount\\\": \\\"0\\\",\\n \\\"status\\\": \\\"unpaid\\\",\\n \\\"create_time\\\": \\\"now\\\"\\n }\\n }\\n ],\\n \\\"button\\\": {\\n \\\"scope\\\": \\\"admin\\\",\\n \\\"pageCode\\\": \\\"borrowing_management_page\\\",\\n \\\"slot\\\": \\\"list.rowActions\\\",\\n \\\"type\\\": \\\"warning\\\",\\n \\\"confirm\\\": \\\"逾期归还将产生罚款,确认吗?\\\",\\n \\\"order\\\": 31\\n }\\n },\\n {\\n \\\"code\\\": \\\"renew\\\",\\n \\\"name\\\": \\\"续借\\\",\\n \\\"from\\\": \\\"borrowing\\\",\\n \\\"to\\\": \\\"borrowing_renewed\\\",\\n \\\"actor\\\": \\\"user\\\",\\n \\\"method\\\": \\\"POST\\\",\\n \\\"path\\\": \\\"/my/borrowings/renew\\\",\\n \\\"invalidStateMessage\\\": \\\"当前状态不允许续借\\\",\\n \\\"successMessage\\\": \\\"续借成功到期日延长15天\\\",\\n \\\"audit\\\": {\\\"userField\\\": \\\"renew_user_id\\\", \\\"timeField\\\": \\\"renew_time\\\"},\\n \\\"effects\\\": [],\\n \\\"button\\\": {\\n \\\"scope\\\": [\\\"student\\\",\\\"teacher\\\"],\\n \\\"pageCode\\\": \\\"my_borrowings_page\\\",\\n \\\"slot\\\": \\\"list.rowActions\\\",\\n \\\"type\\\": \\\"default\\\",\\n \\\"confirm\\\": \\\"确认续借仅限一次续借15天\\\",\\n \\\"order\\\": 40\\n }\\n },\\n {\\n \\\"code\\\": \\\"overdue_check\\\",\\n \\\"name\\\": \\\"标记逾期\\\",\\n \\\"from\\\": \\\"borrowing\\\",\\n \\\"to\\\": \\\"overdue\\\",\\n \\\"actor\\\": \\\"system\\\",\\n \\\"method\\\": \\\"POST\\\",\\n \\\"path\\\": \\\"/system/borrowings/overdue\\\",\\n \\\"invalidStateMessage\\\": \\\"\\\",\\n \\\"successMessage\\\": \\\"\\\",\\n \\\"audit\\\": {\\\"userField\\\": \\\"\\\", \\\"timeField\\\": \\\"overdue_time\\\"},\\n \\\"effects\\\": [],\\n \\\"button\\\": null\\n },\\n {\\n \\\"code\\\": \\\"overdue_check_renewed\\\",\\n \\\"name\\\": \\\"标记逾期(续借)\\\",\\n \\\"from\\\": \\\"borrowing_renewed\\\",\\n \\\"to\\\": \\\"overdue\\\",\\n \\\"actor\\\": \\\"system\\\",\\n \\\"method\\\": \\\"POST\\\",\\n \\\"path\\\": \\\"/system/borrowings/overdue-renewed\\\",\\n \\\"invalidStateMessage\\\": \\\"\\\",\\n \\\"successMessage\\\": \\\"\\\",\\n \\\"audit\\\": {\\\"userField\\\": \\\"\\\", \\\"timeField\\\": \\\"overdue_time\\\"},\\n \\\"effects\\\": [],\\n \\\"button\\\": null\\n }\\n ],\\n \\\"metrics\\\": [\\n {\\n \\\"code\\\": \\\"borrowing_count\\\",\\n \\\"name\\\": \\\"借阅中数量\\\",\\n \\\"table\\\": \\\"borrowing_record\\\",\\n \\\"aggregate\\\": \\\"count\\\",\\n \\\"field\\\": \\\"id\\\",\\n \\\"status\\\": \\\"borrowing\\\",\\n \\\"unit\\\": \\\"条\\\"\\n },\\n {\\n \\\"code\\\": \\\"renewed_count\\\",\\n \\\"name\\\": \\\"续借中数量\\\",\\n \\\"table\\\": \\\"borrowing_record\\\",\\n \\\"aggregate\\\": \\\"count\\\",\\n \\\"field\\\": \\\"id\\\",\\n \\\"status\\\": \\\"borrowing_renewed\\\",\\n \\\"unit\\\": \\\"条\\\"\\n },\\n {\\n \\\"code\\\": \\\"overdue_count\\\",\\n \\\"name\\\": \\\"逾期数量\\\",\\n \\\"table\\\": \\\"borrowing_record\\\",\\n \\\"aggregate\\\": \\\"count\\\",\\n \\\"field\\\": \\\"id\\\",\\n \\\"status\\\": \\\"overdue\\\",\\n \\\"unit\\\": \\\"条\\\"\\n },\\n {\\n \\\"code\\\": \\\"total_fines\\\",\\n \\\"name\\\": \\\"未缴纳罚款总额\\\",\\n \\\"table\\\": \\\"fine\\\",\\n \\\"aggregate\\\": \\\"sum\\\",\\n \\\"field\\\": \\\"amount\\\",\\n \\\"status\\\": \\\"unpaid\\\",\\n \\\"unit\\\": \\\"元\\\"\\n },\\n {\\n \\\"code\\\": \\\"pending_count\\\",\\n \\\"name\\\": \\\"待审核申请\\\",\\n \\\"table\\\": \\\"borrowing_record\\\",\\n \\\"aggregate\\\": \\\"count\\\",\\n \\\"field\\\": \\\"id\\\",\\n \\\"status\\\": \\\"pending\\\",\\n \\\"unit\\\": \\\"条\\\"\\n }\\n ]\\n}\\n```\",\"{\\n \\\"version\\\": \\\"1.0\\\",\\n \\\"code\\\": \\\"borrowing_flow\\\",\\n \\\"name\\\": \\\"借阅流程\\\",\\n \\\"mainTable\\\": \\\"borrowing_record\\\",\\n \\\"statusField\\\": \\\"status\\\",\\n \\\"notFoundMessage\\\": \\\"借阅记录不存在\\\",\\n \\\"states\\\": [\\n {\\\"code\\\": \\\"pending\\\", \\\"label\\\": \\\"待审核\\\"},\\n {\\\"code\\\": \\\"borrowing\\\", \\\"label\\\": \\\"借阅中\\\"},\\n {\\\"code\\\": \\\"borrowing_renewed\\\", \\\"label\\\": \\\"已续借\\\"},\\n {\\\"code\\\": \\\"overdue\\\", \\\"label\\\": \\\"逾期\\\"},\\n {\\\"code\\\": \\\"returned\\\", \\\"label\\\": \\\"已归还\\\"},\\n {\\\"code\\\": \\\"rejected\\\", \\\"label\\\": \\\"已驳回\\\"}\\n ],\\n \\\"actions\\\": [\\n {\\n \\\"code\\\": \\\"approve\\\",\\n \\\"name\\\": \\\"审核通过\\\",\\n \\\"from\\\": \\\"pending\\\",\\n \\\"to\\\": \\\"borrowing\\\",\\n \\\"actor\\\": \\\"admin\\\",\\n \\\"method\\\": \\\"POST\\\",\\n \\\"path\\\": \\\"/admin/borrowings/approve\\\",\\n \\\"invalidStateMessage\\\": \\\"当前状态不能审核\\\",\\n \\\"successMessage\\\": \\\"审核成功\\\",\\n \\\"audit\\\": {\\\"userField\\\": \\\"approve_user_id\\\", \\\"timeField\\\": \\\"approve_time\\\"},\\n \\\"effects\\\": [\\n {\\n \\\"type\\\": \\\"decrease\\\",\\n \\\"table\\\": \\\"book_info\\\",\\n \\\"relationField\\\": \\\"book_id\\\",\\n \\\"field\\\": \\\"stock\\\",\\n \\\"amount\\\": \\\"1\\\",\\n \\\"min\\\": \\\"0\\\",\\n \\\"notFoundMessage\\\": \\\"图书不存在\\\",\\n \\\"errorMessage\\\": \\\"图书库存不足\\\"\\n }\\n ],\\n \\\"button\\\": {\\n \\\"scope\\\": \\\"admin\\\",\\n \\\"pageCode\\\": \\\"borrowing_management_page\\\",\\n \\\"slot\\\": \\\"list.rowActions\\\",\\n \\\"type\\\": \\\"success\\\",\\n \\\"confirm\\\": \\\"确认审核通过吗?\\\",\\n \\\"order\\\": 10\\n }\\n },\\n {\\n \\\"code\\\": \\\"reject\\\",\\n \\\"name\\\": \\\"驳回\\\",\\n \\\"from\\\": \\\"pending\\\",\\n \\\"to\\\": \\\"rejected\\\",\\n \\\"actor\\\": \\\"admin\\\",\\n \\\"method\\\": \\\"POST\\\",\\n \\\"path\\\": \\\"/admin/borrowings/reject\\\",\\n \\\"invalidStateMessage\\\": \\\"当前状态不能驳回\\\",\\n \\\"successMessage\\\": \\\"已驳回\\\",\\n \\\"audit\\\": {\\\"userField\\\": \\\"approve_user_id\\\", \\\"timeField\\\": \\\"approve_time\\\"},\\n \\\"effects\\\": [],\\n \\\"button\\\": {\\n \\\"scope\\\": \\\"admin\\\",\\n \\\"pageCode\\\": \\\"borrowing_management_page\\\",\\n \\\"slot\\\": \\\"list.rowActions\\\",\\n \\\"type\\\": \\\"danger\\\",\\n \\\"confirm\\\": \\\"确认驳回借阅申请吗?\\\",\\n \\\"order\\\": 20\\n }\\n },\\n {\\n \\\"code\\\": \\\"return_book\\\",\\n \\\"name\\\": \\\"归还\\\",\\n \\\"from\\\": \\\"borrowing\\\",\\n \\\"to\\\": \\\"returned\\\",\\n \\\"actor\\\": \\\"admin\\\",\\n \\\"method\\\": \\\"POST\\\",\\n \\\"path\\\": \\\"/admin/borrowings/return\\\",\\n \\\"invalidStateMessage\\\": \\\"当前状态不能归还\\\",\\n \\\"successMessage\\\": \\\"归还成功\\\",\\n \\\"audit\\\": {\\\"userField\\\": \\\"return_user_id\\\", \\\"timeField\\\": \\\"return_time\\\"},\\n \\\"effects\\\": [\\n {\\n \\\"type\\\": \\\"increase\\\",\\n \\\"table\\\": \\\"book_info\\\",\\n \\\"relationField\\\": \\\"book_id\\\",\\n \\\"field\\\": \\\"stock\\\",\\n \\\"amount\\\": \\\"1\\\",\\n \\\"notFoundMessage\\\": \\\"图书不存在\\\",\\n \\\"errorMessage\\\": \\\"归还失败\\\"\\n }\\n ],\\n \\\"button\\\": {\\n \\\"scope\\\": \\\"admin\\\",\\n \\\"pageCode\\\": \\\"borrowing_management_page\\\",\\n \\\"slot\\\": \\\"list.rowActions\\\",\\n \\\"type\\\": \\\"primary\\\",\\n \\\"confirm\\\": \\\"确认归还图书吗?\\\",\\n \\\"order\\\": 30\\n }\\n },\\n {\\n \\\"code\\\": \\\"return_overdue\\\",\\n \\\"name\\\": \\\"归还(逾期)\\\",\\n \\\"from\\\": \\\"overdue\\\",\\n \\\"to\\\": \\\"returned\\\",\\n \\\"actor\\\": \\\"admin\\\",\\n \\\"method\\\": \\\"POST\\\",\\n \\\"path\\\": \\\"/admin/borrowings/return-overdue\\\",\\n \\\"invalidStateMessage\\\": \\\"当前状态不是逾期\\\",\\n \\\"successMessage\\\": \\\"归还成功,罚款已记录\\\",\\n \\\"audit\\\": {\\\"userField\\\": \\\"return_user_id\\\", \\\"timeField\\\": \\\"return_time\\\"},\\n \\\"effects\\\": [\\n {\\n \\\"type\\\": \\\"increase\\\",\\n \\\"table\\\": \\\"book_info\\\",\\n \\\"relationField\\\": \\\"book_id\\\",\\n \\\"field\\\": \\\"stock\\\",\\n \\\"amount\\\": \\\"1\\\",\\n \\\"notFoundMessage\\\": \\\"图书不存在\\\",\\n \\\"errorMessage\\\": \\\"归还失败\\\"\\n },\\n {\\n \\\"type\\\": \\\"create_record\\\",\\n \\\"table\\\": \\\"fine\\\",\\n \\\"values\\\": {\\n \\\"borrowing_id\\\": \\\"record.id\\\",\\n \\\"user_id\\\": \\\"record.user_id\\\",\\n \\\"amount\\\": \\\"record.overdue_days * 0.1\\\",\\n \\\"paid_amount\\\": \\\"0\\\",\\n \\\"status\\\": \\\"unpaid\\\",\\n \\\"create_time\\\": \\\"now\\\"\\n }\\n }\\n ],\\n \\\"button\\\": {\\n \\\"scope\\\": \\\"admin\\\",\\n \\\"pageCode\\\": \\\"borrowing_management_page\\\",\\n \\\"slot\\\": \\\"list.rowActions\\\",\\n \\\"type\\\": \\\"warning\\\",\\n \\\"confirm\\\": \\\"逾期归还将产生罚款,确认吗?\\\",\\n \\\"order\\\": 31\\n }\\n },\\n {\\n \\\"code\\\": \\\"renew\\\",\\n \\\"name\\\": \\\"续借\\\",\\n \\\"from\\\": \\\"borrowing\\\",\\n \\\"to\\\": \\\"borrowing_renewed\\\",\\n \\\"actor\\\": \\\"user\\\",\\n \\\"method\\\": \\\"POST\\\",\\n \\\"path\\\": \\\"/my/borrowings/renew\\\",\\n \\\"invalidStateMessage\\\": \\\"当前状态不允许续借\\\",\\n \\\"successMessage\\\": \\\"续借成功到期日延长15天\\\",\\n \\\"audit\\\": {\\\"userField\\\": \\\"renew_user_id\\\", \\\"timeField\\\": \\\"renew_time\\\"},\\n \\\"effects\\\": [],\\n \\\"button\\\": {\\n \\\"scope\\\": [\\\"student\\\",\\\"teacher\\\"],\\n \\\"pageCode\\\": \\\"my_borrowings_page\\\",\\n \\\"slot\\\": \\\"list.rowActions\\\",\\n \\\"type\\\": \\\"default\\\",\\n \\\"confirm\\\": \\\"确认续借仅限一次续借15天\\\",\\n \\\"order\\\": 40\\n }\\n },\\n {\\n \\\"code\\\": \\\"overdue_check\\\",\\n \\\"name\\\": \\\"标记逾期\\\",\\n \\\"from\\\": \\\"borrowing\\\",\\n \\\"to\\\": \\\"overdue\\\",\\n \\\"actor\\\": \\\"system\\\",\\n \\\"method\\\": \\\"POST\\\",\\n \\\"path\\\": \\\"/system/borrowings/overdue\\\",\\n \\\"invalidStateMessage\\\": \\\"\\\",\\n \\\"successMessage\\\": \\\"\\\",\\n \\\"audit\\\": {\\\"userField\\\": \\\"\\\", \\\"timeField\\\": \\\"overdue_time\\\"},\\n \\\"effects\\\": [],\\n \\\"button\\\": null\\n },\\n {\\n \\\"code\\\": \\\"overdue_check_renewed\\\",\\n \\\"name\\\": \\\"标记逾期(续借)\\\",\\n \\\"from\\\": \\\"borrowing_renewed\\\",\\n \\\"to\\\": \\\"overdue\\\",\\n \\\"actor\\\": \\\"system\\\",\\n \\\"method\\\": \\\"POST\\\",\\n \\\"path\\\": \\\"/system/borrowings/overdue-renewed\\\",\\n \\\"invalidStateMessage\\\": \\\"\\\",\\n \\\"successMessage\\\": \\\"\\\",\\n \\\"audit\\\": {\\\"userField\\\": \\\"\\\", \\\"timeField\\\": \\\"overdue_time\\\"},\\n \\\"effects\\\": [],\\n \\\"button\\\": null\\n }\\n ],\\n \\\"metrics\\\": [\\n {\\n \\\"code\\\": \\\"borrowing_count\\\",\\n \\\"name\\\": \\\"借阅中数量\\\",\\n \\\"table\\\": \\\"borrowing_record\\\",\\n \\\"aggregate\\\": \\\"count\\\",\\n \\\"field\\\": \\\"id\\\",\\n \\\"status\\\": \\\"borrowing\\\",\\n \\\"unit\\\": \\\"条\\\"\\n },\\n {\\n \\\"code\\\": \\\"renewed_count\\\",\\n \\\"name\\\": \\\"续借中数量\\\",\\n \\\"table\\\": \\\"borrowing_record\\\",\\n \\\"aggregate\\\": \\\"count\\\",\\n \\\"field\\\": \\\"id\\\",\\n \\\"status\\\": \\\"borrowing_renewed\\\",\\n \\\"unit\\\": \\\"条\\\"\\n },\\n {\\n \\\"code\\\": \\\"overdue_count\\\",\\n \\\"name\\\": \\\"逾期数量\\\",\\n \\\"table\\\": \\\"borrowing_record\\\",\\n \\\"aggregate\\\": \\\"count\\\",\\n \\\"field\\\": \\\"id\\\",\\n \\\"status\\\": \\\"overdue\\\",\\n \\\"unit\\\": \\\"条\\\"\\n },\\n {\\n \\\"code\\\": \\\"total_fines\\\",\\n \\\"name\\\": \\\"未缴纳罚款总额\\\",\\n \\\"table\\\": \\\"fine\\\",\\n \\\"aggregate\\\": \\\"sum\\\",\\n \\\"field\\\": \\\"amount\\\",\\n \\\"status\\\": \\\"unpaid\\\",\\n \\\"unit\\\": \\\"元\\\"\\n },\\n {\\n \\\"code\\\": \\\"pending_count\\\",\\n \\\"name\\\": \\\"待审核申请\\\",\\n \\\"table\\\": \\\"borrowing_record\\\",\\n \\\"aggregate\\\": \\\"count\\\",\\n \\\"field\\\": \\\"id\\\",\\n \\\"status\\\": \\\"pending\\\",\\n \\\"unit\\\": \\\"条\\\"\\n }\\n ]\\n}\"]}', '0', '统计状态不存在: total_fines -> unpaid', 128163, '2026-07-14 17:17:52');
INSERT INTO `factory_ai_stage_output` VALUES (114, 105, 105, 100, 'app_blueprint', '{\"projectName\":\"图书管理系统\",\"projectDescription\":\"功能:借书、还书、预约、取消预约\\n角色用户、管理员\\n其他模块轮播图、公告、新闻\",\"industryTemplate\":\"\",\"stylePreset\":\"dark-tech\",\"extraRequirements\":\"\"}', '{\n \"roles\": [\n {\n \"code\": \"admin\",\n \"name\": \"管理员\",\n \"description\": \"系统管理员,管理图书、借阅、预约、用户、轮播图、公告、新闻等\"\n },\n {\n \"code\": \"reader\",\n \"name\": \"读者\",\n \"description\": \"普通读者,可浏览图书、借书、还书、预约、取消预约\"\n }\n ],\n \"frontendMenus\": [\n {\n \"code\": \"book_catalog\",\n \"name\": \"图书目录\",\n \"path\": \"/books\",\n \"pageCode\": \"book_catalog_page\",\n \"requiresLogin\": false,\n \"visibleRoles\": [],\n \"dataScope\": \"PUBLIC\"\n },\n {\n \"code\": \"announcement\",\n \"name\": \"公告\",\n \"path\": \"/announcements\",\n \"pageCode\": \"announcement_list_page\",\n \"requiresLogin\": false,\n \"visibleRoles\": [],\n \"dataScope\": \"PUBLIC\"\n },\n {\n \"code\": \"news\",\n \"name\": \"新闻\",\n \"path\": \"/news\",\n \"pageCode\": \"news_list_page\",\n \"requiresLogin\": false,\n \"visibleRoles\": [],\n \"dataScope\": \"PUBLIC\"\n },\n {\n \"code\": \"reader_profile\",\n \"name\": \"个人资料\",\n \"path\": \"/profile\",\n \"pageCode\": \"reader_profile_page\",\n \"requiresLogin\": true,\n \"visibleRoles\": [\"reader\"],\n \"dataScope\": \"CURRENT_USER\"\n },\n {\n \"code\": \"my_borrows\",\n \"name\": \"我的借阅\",\n \"path\": \"/my-borrows\",\n \"pageCode\": \"my_borrows_page\",\n \"requiresLogin\": true,\n \"visibleRoles\": [\"reader\"],\n \"dataScope\": \"CURRENT_USER\"\n },\n {\n \"code\": \"my_reservations\",\n \"name\": \"我的预约\",\n \"path\": \"/my-reservations\",\n \"pageCode\": \"my_reservations_page\",\n \"requiresLogin\": true,\n \"visibleRoles\": [\"reader\"],\n \"dataScope\": \"CURRENT_USER\"\n }\n ],\n \"frontendPages\": [\n {\n \"code\": \"book_catalog_page\",\n \"name\": \"图书目录\",\n \"menuCode\": \"book_catalog\",\n \"path\": \"/books\",\n \"pageType\": \"list\",\n \"tableName\": \"book_info\"\n },\n {\n \"code\": \"book_detail_page\",\n \"name\": \"图书详情\",\n \"menuCode\": \"book_catalog\",\n \"path\": \"/books/:id\",\n \"pageType\": \"detail\",\n \"tableName\": \"book_info\"\n },\n {\n \"code\": \"announcement_list_page\",\n \"name\": \"公告列表\",\n \"menuCode\": \"announcement\",\n \"path\": \"/announcements\",\n \"pageType\": \"list\",\n \"tableName\": \"announcement\"\n },\n {\n \"code\": \"announcement_detail_page\",\n \"name\": \"公告详情\",\n \"menuCode\": \"announcement\",\n \"path\": \"/announcements/:id\",\n \"pageType\": \"detail\",\n \"tableName\": \"announcement\"\n },\n {\n \"code\": \"news_list_page\",\n \"name\": \"新闻列表\",\n \"menuCode\": \"news\",\n \"path\": \"/news\",\n \"pageType\": \"list\",\n \"tableName\": \"news\"\n },\n {\n \"code\": \"news_detail_page\",\n \"name\": \"新闻详情\",\n \"menuCode\": \"news\",\n \"path\": \"/news/:id\",\n \"pageType\": \"detail\",\n \"tableName\": \"news\"\n },\n {\n \"code\": \"reader_profile_page\",\n \"name\": \"个人资料\",\n \"menuCode\": \"reader_profile\",\n \"path\": \"/profile\",\n \"pageType\": \"form\",\n \"tableName\": \"reader\"\n },\n {\n \"code\": \"my_borrows_page\",\n \"name\": \"我的借阅\",\n \"menuCode\": \"my_borrows\",\n \"path\": \"/my-borrows\",\n \"pageType\": \"current_user_list\",\n \"tableName\": \"borrow_record\"\n },\n {\n \"code\": \"my_reservations_page\",\n \"name\": \"我的预约\",\n \"menuCode\": \"my_reservations\",\n \"path\": \"/my-reservations\",\n \"pageType\": \"current_user_list\",\n \"tableName\": \"reservation\"\n }\n ],\n \"adminMenus\": [\n {\n \"code\": \"book_admin\",\n \"name\": \"图书管理\",\n \"path\": \"/admin/books\",\n \"pageCode\": \"book_admin_page\",\n \"pageType\": \"list\",\n \"tableName\": \"book_info\",\n \"requiresLogin\": true,\n \"visibleRoles\": [\"admin\"],\n \"dataScope\": \"ROLE\"\n },\n {\n \"code\": \"borrow_admin\",\n \"name\": \"借阅管理\",\n \"path\": \"/admin/borrows\",\n \"pageCode\": \"borrow_admin_page\",\n \"pageType\": \"list\",\n \"tableName\": \"borrow_record\",\n \"requiresLogin\": true,\n \"visibleRoles\": [\"admin\"],\n \"dataScope\": \"ROLE\"\n },\n {\n \"code\": \"reservation_admin\",\n \"name\": \"预约管理\",\n \"path\": \"/admin/reservations\",\n \"pageCode\": \"reservation_admin_page\",\n \"pageType\": \"list\",\n \"tableName\": \"reservation\",\n \"requiresLogin\": true,\n \"visibleRoles\": [\"admin\"],\n \"dataScope\": \"ROLE\"\n },\n {\n \"code\": \"reader_admin\",\n \"name\": \"读者管理\",\n \"path\": \"/admin/readers\",\n \"pageCode\": \"reader_admin_page\",\n \"pageType\": \"list\",\n \"tableName\": \"reader\",\n \"requiresLogin\": true,\n \"visibleRoles\": [\"admin\"],\n \"dataScope\": \"ROLE\"\n },\n {\n \"code\": \"carousel_admin\",\n \"name\": \"轮播图管理\",\n \"path\": \"/admin/carousels\",\n \"pageCode\": \"carousel_admin_page\",\n \"pageType\": \"list\",\n \"tableName\": \"carousel\",\n \"requiresLogin\": true,\n \"visibleRoles\": [\"admin\"],\n \"dataScope\": \"ROLE\"\n },\n {\n \"code\": \"announcement_admin\",\n \"name\": \"公告管理\",\n \"path\": \"/admin/announcements\",\n \"pageCode\": \"announcement_admin_page\",\n \"pageType\": \"list\",\n \"tableName\": \"announcement\",\n \"requiresLogin\": true,\n \"visibleRoles\": [\"admin\"],\n \"dataScope\": \"ROLE\"\n },\n {\n \"code\": \"news_admin\",\n \"name\": \"新闻管理\",\n \"path\": \"/admin/news\",\n \"pageCode\": \"news_admin_page\",\n \"pageType\": \"list\",\n \"tableName\": \"news\",\n \"requiresLogin\": true,\n \"visibleRoles\": [\"admin\"],\n \"dataScope\": \"ROLE\"\n }\n ],\n \"adminHomeDashboard\": {\n \"title\": \"运营总览\",\n \"description\": \"核心业务数据\",\n \"metrics\": [\n {\n \"name\": \"总图书数\",\n \"semantic\": \"inventory\",\n \"valueKey\": \"totalBooks\",\n \"tableName\": \"book_info\"\n },\n {\n \"name\": \"总读者数\",\n \"semantic\": \"user\",\n \"valueKey\": \"totalReaders\",\n \"tableName\": \"reader\"\n },\n {\n \"name\": \"在借数量\",\n \"semantic\": \"order\",\n \"valueKey\": \"borrowedCount\",\n \"tableName\": \"borrow_record\"\n },\n {\n \"name\": \"当前预约数\",\n \"semantic\": \"task\",\n \"valueKey\": \"reservationCount\",\n \"tableName\": \"reservation\"\n }\n ],\n \"charts\": [\n {\n \"title\": \"借阅趋势\",\n \"type\": \"line\",\n \"tableName\": \"borrow_record\",\n \"xField\": \"borrow_date\",\n \"yField\": \"count\",\n \"metric\": \"count\",\n \"dimension\": \"borrow_date\"\n },\n {\n \"title\": \"图书分类分布\",\n \"type\": \"pie\",\n \"tableName\": \"book_info\",\n \"dimension\": \"category\",\n \"metric\": \"count\"\n }\n ]\n }\n}', '0', 'expect \':\', but }, offset 6259, character \", line 260, column 23, fastjson-version 2.0.53 { \"roles\": [ { \"code\": \"admin\", \"name\": \"管理员\", \"description\": \"系统管理员,管理图书、借阅、预约、用户、轮播图、公告、新闻等\" }, { \"code\": \"reader\", \"name\": \"读者\", \"description\": \"普通读者,可浏览图书、借书、还书、预约、取消预约\" } ], \"frontendMenus\": [ { \"code\": \"book_catalog\", \"name\": \"图书目录\", \"path\": \"/books\", \"pageCode\": \"book_catalog_page\", \"requiresLogin\": false, \"visibleRoles\": [], \"dataScope\": \"PUBLIC\" }, { \"code\": \"announcement\", \"name\": \"公告\", \"path\": \"/announcements\", \"pageCode\": \"announcement_list_page\", \"requiresLogin\": false, \"visibleRoles\": [], \"dataScope\": \"PUBLIC\" }, { \"code\": \"news\", \"name\": \"新闻\", \"path\": \"/news\", \"pageCode\": \"news_list_page\", \"requiresLogin\": false, \"visibleRoles\": [], \"dataScope\": \"PUBLIC\" }, { \"code\": \"', 55040, '2026-07-14 17:20:47');
INSERT INTO `factory_ai_stage_output` VALUES (115, 106, 105, 100, 'app_blueprint', '{\"projectName\":\"图书管理系统\",\"projectDescription\":\"功能:借书、还书、预约、取消预约\\n角色用户、管理员\\n其他模块轮播图、公告、新闻\",\"industryTemplate\":\"\",\"stylePreset\":\"dark-tech\",\"extraRequirements\":\"\"}', '{\n \"roles\": [\n {\n \"code\": \"admin\",\n \"name\": \"管理员\",\n \"description\": \"系统管理员,管理图书、借阅、读者、轮播图、公告、新闻等\"\n },\n {\n \"code\": \"reader\",\n \"name\": \"读者\",\n \"description\": \"借书、还书、预约、取消预约的普通用户\"\n }\n ],\n \"frontendMenus\": [\n {\n \"code\": \"book_catalog\",\n \"name\": \"图书目录\",\n \"path\": \"/books\",\n \"pageCode\": \"book_catalog_page\",\n \"requiresLogin\": false,\n \"visibleRoles\": [],\n \"dataScope\": \"PUBLIC\"\n },\n {\n \"code\": \"my_borrows\",\n \"name\": \"我的借阅\",\n \"path\": \"/my-borrows\",\n \"pageCode\": \"my_borrows_page\",\n \"requiresLogin\": true,\n \"visibleRoles\": [\"reader\"],\n \"dataScope\": \"CURRENT_USER\"\n },\n {\n \"code\": \"reader_profile\",\n \"name\": \"个人资料\",\n \"path\": \"/reader/profile\",\n \"pageCode\": \"reader_profile_page\",\n \"requiresLogin\": true,\n \"visibleRoles\": [\"reader\"],\n \"dataScope\": \"CURRENT_USER\"\n }\n ],\n \"frontendPages\": [\n {\n \"code\": \"book_catalog_page\",\n \"name\": \"图书目录\",\n \"menuCode\": \"book_catalog\",\n \"path\": \"/books\",\n \"pageType\": \"list\",\n \"tableName\": \"book_info\"\n },\n {\n \"code\": \"book_detail_page\",\n \"name\": \"图书详情\",\n \"menuCode\": \"book_catalog\",\n \"path\": \"/books/:id\",\n \"pageType\": \"detail\",\n \"tableName\": \"book_info\"\n },\n {\n \"code\": \"my_borrows_page\",\n \"name\": \"我的借阅\",\n \"menuCode\": \"my_borrows\",\n \"path\": \"/my-borrows\",\n \"pageType\": \"current_user_list\",\n \"tableName\": \"borrow_record\"\n },\n {\n \"code\": \"reader_profile_page\",\n \"name\": \"个人资料\",\n \"menuCode\": \"reader_profile\",\n \"path\": \"/reader/profile\",\n \"pageType\": \"form\",\n \"tableName\": \"reader\"\n }\n ],\n \"adminMenus\": [\n {\n \"code\": \"book_admin\",\n \"name\": \"图书管理\",\n \"path\": \"/admin/books\",\n \"pageCode\": \"book_admin_page\",\n \"tableName\": \"book_info\",\n \"pageType\": \"list\",\n \"requiresLogin\": true,\n \"visibleRoles\": [\"admin\"],\n \"dataScope\": \"ROLE\"\n },\n {\n \"code\": \"borrow_admin\",\n \"name\": \"借阅管理\",\n \"path\": \"/admin/borrows\",\n \"pageCode\": \"borrow_admin_page\",\n \"tableName\": \"borrow_record\",\n \"pageType\": \"list\",\n \"requiresLogin\": true,\n \"visibleRoles\": [\"admin\"],\n \"dataScope\": \"ROLE\"\n },\n {\n \"code\": \"reader_admin\",\n \"name\": \"读者管理\",\n \"path\": \"/admin/readers\",\n \"pageCode\": \"reader_admin_page\",\n \"tableName\": \"reader\",\n \"pageType\": \"list\",\n \"requiresLogin\": true,\n \"visibleRoles\": [\"admin\"],\n \"dataScope\": \"ROLE\"\n },\n {\n \"code\": \"carousel_admin\",\n \"name\": \"轮播图管理\",\n \"path\": \"/admin/carousels\",\n \"pageCode\": \"carousel_admin_page\",\n \"tableName\": \"carousel\",\n \"pageType\": \"list\",\n \"requiresLogin\": true,\n \"visibleRoles\": [\"admin\"],\n \"dataScope\": \"ROLE\"\n },\n {\n \"code\": \"announcement_admin\",\n \"name\": \"公告管理\",\n \"path\": \"/admin/announcements\",\n \"pageCode\": \"announcement_admin_page\",\n \"tableName\": \"announcement\",\n \"pageType\": \"list\",\n \"requiresLogin\": true,\n \"visibleRoles\": [\"admin\"],\n \"dataScope\": \"ROLE\"\n },\n {\n \"code\": \"news_admin\",\n \"name\": \"新闻管理\",\n \"path\": \"/admin/news\",\n \"pageCode\": \"news_admin_page\",\n \"tableName\": \"news\",\n \"pageType\": \"list\",\n \"requiresLogin\": true,\n \"visibleRoles\": [\"admin\"],\n \"dataScope\": \"ROLE\"\n }\n ],\n \"adminHomeDashboard\": {\n \"title\": \"运营总览\",\n \"description\": \"核心业务数据统计\",\n \"metrics\": [\n {\n \"label\": \"图书总量\",\n \"value\": null,\n \"semantic\": \"inventory\",\n \"tableName\": \"book_info\"\n },\n {\n \"label\": \"借出数量\",\n \"value\": null,\n \"semantic\": \"order\",\n \"tableName\": \"borrow_record\"\n },\n {\n \"label\": \"预约数量\",\n \"value\": null,\n \"semantic\": \"task\",\n \"tableName\": \"borrow_record\"\n },\n {\n \"label\": \"读者总数\",\n \"value\": null,\n \"semantic\": \"user\",\n \"tableName\": \"reader\"\n }\n ],\n \"charts\": [\n {\n \"label\": \"每日借阅趋势\",\n \"type\": \"line\",\n \"semantic\": \"order\",\n \"tableName\": \"borrow_record\",\n \"xField\": \"borrow_date\",\n \"yField\": \"count\"\n },\n {\n \"label\": \"图书分类分布\",\n \"type\": \"pie\",\n \"semantic\": \"content\",\n \"tableName\": \"book_info\",\n \"xField\": \"category\",\n \"yField\": \"count\"\n }\n ]\n }\n}', '1', NULL, 31151, '2026-07-14 17:24:47');
INSERT INTO `factory_ai_stage_output` VALUES (116, 106, 105, 100, 'flow_config', '{\"mode\":\"generate\",\"projectName\":\"图书管理系统\",\"projectDescription\":\"功能:借书、还书、预约、取消预约\\n角色用户、管理员\\n其他模块轮播图、公告、新闻\",\"industryTemplate\":\"\",\"stylePreset\":\"dark-tech\",\"extraRequirements\":\"\",\"confirmedAppBlueprint\":{\"adminHomeDashboard\":{\"charts\":[{\"filters\":[],\"metrics\":[],\"semantic\":\"order\",\"tableName\":\"borrow_record\",\"type\":\"line\"},{\"filters\":[],\"metrics\":[],\"semantic\":\"content\",\"tableName\":\"book_info\",\"type\":\"pie\"}],\"description\":\"核心业务数据统计\",\"metrics\":[{\"filters\":[],\"semantic\":\"inventory\",\"tableName\":\"book_info\"},{\"filters\":[],\"semantic\":\"order\",\"tableName\":\"borrow_record\"},{\"filters\":[],\"semantic\":\"task\",\"tableName\":\"borrow_record\"},{\"filters\":[],\"semantic\":\"user\",\"tableName\":\"reader\"}],\"title\":\"运营总览\"},\"adminMenus\":[{\"code\":\"book_admin\",\"dataScope\":\"ROLE\",\"name\":\"图书管理\",\"pageCode\":\"book_admin_page\",\"pageType\":\"list\",\"path\":\"/admin/books\",\"requiresLogin\":true,\"tableName\":\"book_info\",\"visibleRoles\":[\"admin\"]},{\"code\":\"borrow_admin\",\"dataScope\":\"ROLE\",\"name\":\"借阅管理\",\"pageCode\":\"borrow_admin_page\",\"pageType\":\"list\",\"path\":\"/admin/borrows\",\"requiresLogin\":true,\"tableName\":\"borrow_record\",\"visibleRoles\":[\"admin\"]},{\"code\":\"reader_admin\",\"dataScope\":\"ROLE\",\"name\":\"读者管理\",\"pageCode\":\"reader_admin_page\",\"pageType\":\"list\",\"path\":\"/admin/readers\",\"requiresLogin\":true,\"tableName\":\"reader\",\"visibleRoles\":[\"admin\"]},{\"code\":\"carousel_admin\",\"dataScope\":\"ROLE\",\"name\":\"轮播图管理\",\"pageCode\":\"carousel_admin_page\",\"pageType\":\"list\",\"path\":\"/admin/carousels\",\"requiresLogin\":true,\"tableName\":\"carousel\",\"visibleRoles\":[\"admin\"]},{\"code\":\"announcement_admin\",\"dataScope\":\"ROLE\",\"name\":\"公告管理\",\"pageCode\":\"announcement_admin_page\",\"pageType\":\"list\",\"path\":\"/admin/announcements\",\"requiresLogin\":true,\"tableName\":\"announcement\",\"visibleRoles\":[\"admin\"]},{\"code\":\"news_admin\",\"dataScope\":\"ROLE\",\"name\":\"新闻管理\",\"pageCode\":\"news_admin_page\",\"pageType\":\"list\",\"path\":\"/admin/news\",\"requiresLogin\":true,\"tableName\":\"news\",\"visibleRoles\":[\"admin\"]}],\"frontendMenus\":[{\"code\":\"book_catalog\",\"dataScope\":\"PUBLIC\",\"name\":\"图书目录\",\"pageCode\":\"book_catalog_page\",\"pageType\":\"\",\"path\":\"/books\",\"requiresLogin\":false,\"tableName\":\"\",\"visibleRoles\":[]},{\"code\":\"my_borrows\",\"dataScope\":\"CURRENT_USER\",\"name\":\"我的借阅\",\"pageCode\":\"my_borrows_page\",\"pageType\":\"\",\"path\":\"/my-borrows\",\"requiresLogin\":true,\"tableName\":\"\",\"visibleRoles\":[\"reader\"]},{\"code\":\"reader_profile\",\"dataScope\":\"CURRENT_USER\",\"name\":\"个人资料\",\"pageCode\":\"reader_profile_page\",\"pageType\":\"\",\"path\":\"/reader/profile\",\"requiresLogin\":true,\"tableName\":\"\",\"visibleRoles\":[\"reader\"]}],\"frontendPages\":[{\"code\":\"book_catalog_page\",\"menuCode\":\"book_catalog\",\"name\":\"图书目录\",\"pageType\":\"list\",\"parentPageCode\":\"\",\"path\":\"/books\",\"tableName\":\"book_info\"},{\"code\":\"book_detail_page\",\"menuCode\":\"book_catalog\",\"name\":\"图书详情\",\"pageType\":\"detail\",\"parentPageCode\":\"\",\"path\":\"/books/:id\",\"tableName\":\"book_info\"},{\"code\":\"my_borrows_page\",\"menuCode\":\"my_borrows\",\"name\":\"我的借阅\",\"pageType\":\"current_user_list\",\"parentPageCode\":\"\",\"path\":\"/my-borrows\",\"tableName\":\"borrow_record\"},{\"code\":\"reader_profile_page\",\"menuCode\":\"reader_profile\",\"name\":\"个人资料\",\"pageType\":\"form\",\"parentPageCode\":\"\",\"path\":\"/reader/profile\",\"tableName\":\"reader\"}],\"roles\":[{\"code\":\"admin\",\"description\":\"系统管理员,管理图书、借阅、读者、轮播图、公告、新闻等\",\"name\":\"管理员\"},{\"code\":\"reader\",\"description\":\"借书、还书、预约、取消预约的普通用户\",\"name\":\"读者\"}]}}', '{\n \"version\": \"1.0\",\n \"code\": \"borrow_record\",\n \"name\": \"借阅管理\",\n \"mainTable\": \"borrow_record\",\n \"statusField\": \"status\",\n \"notFoundMessage\": \"借阅记录不存在\",\n \"states\": [\n {\"code\": \"pending\", \"label\": \"待审核\"},\n {\"code\": \"borrowing\", \"label\": \"借出中\"},\n {\"code\": \"returned\", \"label\": \"已归还\"},\n {\"code\": \"reserved\", \"label\": \"已预约\"},\n {\"code\": \"canceled\", \"label\": \"已取消\"}\n ],\n \"actions\": [\n {\n \"code\": \"admin_approve\",\n \"name\": \"审核通过\",\n \"from\": \"pending\",\n \"to\": \"borrowing\",\n \"actor\": \"admin\",\n \"method\": \"POST\",\n \"path\": \"/borrow-record/approve\",\n \"invalidStateMessage\": \"当前状态不能审核通过\",\n \"successMessage\": \"审核成功,图书已借出\",\n \"audit\": {\"userField\": \"approve_user_id\", \"timeField\": \"approve_time\"},\n \"effects\": [\n {\n \"type\": \"decrease\",\n \"table\": \"book_info\",\n \"relationField\": \"book_id\",\n \"field\": \"stock\",\n \"amount\": \"1\",\n \"min\": \"0\",\n \"notFoundMessage\": \"图书不存在\",\n \"errorMessage\": \"图书库存不足\"\n }\n ],\n \"button\": {\n \"scope\": \"admin\",\n \"pageCode\": \"borrow_admin_page\",\n \"slot\": \"list.rowActions\",\n \"type\": \"success\",\n \"confirm\": \"确认审核通过吗?\",\n \"order\": 10\n }\n },\n {\n \"code\": \"admin_reject\",\n \"name\": \"拒绝申请\",\n \"from\": \"pending\",\n \"to\": \"canceled\",\n \"actor\": \"admin\",\n \"method\": \"POST\",\n \"path\": \"/borrow-record/reject\",\n \"invalidStateMessage\": \"当前状态不能拒绝\",\n \"successMessage\": \"申请已拒绝\",\n \"audit\": {\"userField\": \"approve_user_id\", \"timeField\": \"approve_time\"},\n \"effects\": [],\n \"button\": {\n \"scope\": \"admin\",\n \"pageCode\": \"borrow_admin_page\",\n \"slot\": \"list.rowActions\",\n \"type\": \"danger\",\n \"confirm\": \"确认拒绝该借书申请吗?\",\n \"order\": 20\n }\n },\n {\n \"code\": \"admin_return\",\n \"name\": \"确认还书\",\n \"from\": \"borrowing\",\n \"to\": \"returned\",\n \"actor\": \"admin\",\n \"method\": \"POST\",\n \"path\": \"/borrow-record/return\",\n \"invalidStateMessage\": \"当前状态不能还书\",\n \"successMessage\": \"还书成功\",\n \"audit\": {\"userField\": \"return_user_id\", \"timeField\": \"return_time\"},\n \"effects\": [\n {\n \"type\": \"increase\",\n \"table\": \"book_info\",\n \"relationField\": \"book_id\",\n \"field\": \"stock\",\n \"amount\": \"1\",\n \"notFoundMessage\": \"图书不存在\",\n \"errorMessage\": \"图书库存恢复失败\"\n }\n ],\n \"button\": {\n \"scope\": \"admin\",\n \"pageCode\": \"borrow_admin_page\",\n \"slot\": \"list.rowActions\",\n \"type\": \"primary\",\n \"confirm\": \"确认已归还图书?\",\n \"order\": 30\n }\n },\n {\n \"code\": \"user_cancel_apply\",\n \"name\": \"取消申请\",\n \"from\": \"pending\",\n \"to\": \"canceled\",\n \"actor\": \"reader\",\n \"method\": \"POST\",\n \"path\": \"/my-borrows/cancel-apply\",\n \"invalidStateMessage\": \"当前状态不能取消申请\",\n \"successMessage\": \"借书申请已取消\",\n \"audit\": {},\n \"effects\": [],\n \"button\": {\n \"scope\": \"reader\",\n \"pageCode\": \"my_borrows_page\",\n \"slot\": \"list.rowActions\",\n \"type\": \"default\",\n \"confirm\": \"确认取消借书申请?\",\n \"order\": 10\n }\n },\n {\n \"code\": \"user_cancel_reserve\",\n \"name\": \"取消预约\",\n \"from\": \"reserved\",\n \"to\": \"canceled\",\n \"actor\": \"reader\",\n \"method\": \"POST\",\n \"path\": \"/my-borrows/cancel-reserve\",\n \"invalidStateMessage\": \"当前状态不能取消预约\",\n \"successMessage\": \"预约已取消\",\n \"audit\": {},\n \"effects\": [],\n \"button\": {\n \"scope\": \"reader\",\n \"pageCode\": \"my_borrows_page\",\n \"slot\": \"list.rowActions\",\n \"type\": \"default\",\n \"confirm\": \"确认取消预约?\",\n \"order\": 20\n }\n }\n ],\n \"metrics\": [\n {\n \"code\": \"borrowing_count\",\n \"name\": \"借阅中数量\",\n \"table\": \"borrow_record\",\n \"aggregate\": \"count\",\n \"field\": \"id\",\n \"status\": \"borrowing\",\n \"unit\": \"条\"\n },\n {\n \"code\": \"pending_count\",\n \"name\": \"待审核数量\",\n \"table\": \"borrow_record\",\n \"aggregate\": \"count\",\n \"field\": \"id\",\n \"status\": \"pending\",\n \"unit\": \"条\"\n },\n {\n \"code\": \"total_books\",\n \"name\": \"图书总量\",\n \"table\": \"book_info\",\n \"aggregate\": \"count\",\n \"field\": \"id\",\n \"status\": null,\n \"unit\": \"本\"\n },\n {\n \"code\": \"total_readers\",\n \"name\": \"读者数量\",\n \"table\": \"reader\",\n \"aggregate\": \"count\",\n \"field\": \"id\",\n \"status\": null,\n \"unit\": \"人\"\n }\n ]\n}', '1', NULL, 37761, '2026-07-14 17:25:25');
INSERT INTO `factory_ai_stage_output` VALUES (117, 106, 105, 100, 'database', '{\"mode\":\"generate\",\"projectName\":\"图书管理系统\",\"projectDescription\":\"功能:借书、还书、预约、取消预约\\n角色用户、管理员\\n其他模块轮播图、公告、新闻\",\"industryTemplate\":\"\",\"stylePreset\":\"dark-tech\",\"extraRequirements\":\"\",\"confirmedAppBlueprint\":{\"adminHomeDashboard\":{\"charts\":[{\"filters\":[],\"metrics\":[],\"semantic\":\"order\",\"tableName\":\"borrow_record\",\"type\":\"line\"},{\"filters\":[],\"metrics\":[],\"semantic\":\"content\",\"tableName\":\"book_info\",\"type\":\"pie\"}],\"description\":\"核心业务数据统计\",\"metrics\":[{\"filters\":[],\"semantic\":\"inventory\",\"tableName\":\"book_info\"},{\"filters\":[],\"semantic\":\"order\",\"tableName\":\"borrow_record\"},{\"filters\":[],\"semantic\":\"task\",\"tableName\":\"borrow_record\"},{\"filters\":[],\"semantic\":\"user\",\"tableName\":\"reader\"}],\"title\":\"运营总览\"},\"adminMenus\":[{\"code\":\"book_admin\",\"dataScope\":\"ROLE\",\"name\":\"图书管理\",\"pageCode\":\"book_admin_page\",\"pageType\":\"list\",\"path\":\"/admin/books\",\"requiresLogin\":true,\"tableName\":\"book_info\",\"visibleRoles\":[\"admin\"]},{\"code\":\"borrow_admin\",\"dataScope\":\"ROLE\",\"name\":\"借阅管理\",\"pageCode\":\"borrow_admin_page\",\"pageType\":\"list\",\"path\":\"/admin/borrows\",\"requiresLogin\":true,\"tableName\":\"borrow_record\",\"visibleRoles\":[\"admin\"]},{\"code\":\"reader_admin\",\"dataScope\":\"ROLE\",\"name\":\"读者管理\",\"pageCode\":\"reader_admin_page\",\"pageType\":\"list\",\"path\":\"/admin/readers\",\"requiresLogin\":true,\"tableName\":\"reader\",\"visibleRoles\":[\"admin\"]},{\"code\":\"carousel_admin\",\"dataScope\":\"ROLE\",\"name\":\"轮播图管理\",\"pageCode\":\"carousel_admin_page\",\"pageType\":\"list\",\"path\":\"/admin/carousels\",\"requiresLogin\":true,\"tableName\":\"carousel\",\"visibleRoles\":[\"admin\"]},{\"code\":\"announcement_admin\",\"dataScope\":\"ROLE\",\"name\":\"公告管理\",\"pageCode\":\"announcement_admin_page\",\"pageType\":\"list\",\"path\":\"/admin/announcements\",\"requiresLogin\":true,\"tableName\":\"announcement\",\"visibleRoles\":[\"admin\"]},{\"code\":\"news_admin\",\"dataScope\":\"ROLE\",\"name\":\"新闻管理\",\"pageCode\":\"news_admin_page\",\"pageType\":\"list\",\"path\":\"/admin/news\",\"requiresLogin\":true,\"tableName\":\"news\",\"visibleRoles\":[\"admin\"]}],\"frontendMenus\":[{\"code\":\"book_catalog\",\"dataScope\":\"PUBLIC\",\"name\":\"图书目录\",\"pageCode\":\"book_catalog_page\",\"pageType\":\"\",\"path\":\"/books\",\"requiresLogin\":false,\"tableName\":\"\",\"visibleRoles\":[]},{\"code\":\"my_borrows\",\"dataScope\":\"CURRENT_USER\",\"name\":\"我的借阅\",\"pageCode\":\"my_borrows_page\",\"pageType\":\"\",\"path\":\"/my-borrows\",\"requiresLogin\":true,\"tableName\":\"\",\"visibleRoles\":[\"reader\"]},{\"code\":\"reader_profile\",\"dataScope\":\"CURRENT_USER\",\"name\":\"个人资料\",\"pageCode\":\"reader_profile_page\",\"pageType\":\"\",\"path\":\"/reader/profile\",\"requiresLogin\":true,\"tableName\":\"\",\"visibleRoles\":[\"reader\"]}],\"frontendPages\":[{\"code\":\"book_catalog_page\",\"menuCode\":\"book_catalog\",\"name\":\"图书目录\",\"pageType\":\"list\",\"parentPageCode\":\"\",\"path\":\"/books\",\"tableName\":\"book_info\"},{\"code\":\"book_detail_page\",\"menuCode\":\"book_catalog\",\"name\":\"图书详情\",\"pageType\":\"detail\",\"parentPageCode\":\"\",\"path\":\"/books/:id\",\"tableName\":\"book_info\"},{\"code\":\"my_borrows_page\",\"menuCode\":\"my_borrows\",\"name\":\"我的借阅\",\"pageType\":\"current_user_list\",\"parentPageCode\":\"\",\"path\":\"/my-borrows\",\"tableName\":\"borrow_record\"},{\"code\":\"reader_profile_page\",\"menuCode\":\"reader_profile\",\"name\":\"个人资料\",\"pageType\":\"form\",\"parentPageCode\":\"\",\"path\":\"/reader/profile\",\"tableName\":\"reader\"}],\"roles\":[{\"code\":\"admin\",\"description\":\"系统管理员,管理图书、借阅、读者、轮播图、公告、新闻等\",\"name\":\"管理员\"},{\"code\":\"reader\",\"description\":\"借书、还书、预约、取消预约的普通用户\",\"name\":\"读者\"}]},\"flowConfig\":{\"actions\":[{\"actor\":\"admin\",\"audit\":{\"timeField\":\"approve_time\",\"userField\":\"approve_user_id\"},\"button\":{\"confirm\":\"确认审核通过吗?\",\"order\":10,\"pageCode\":\"borrow_admin_page\",\"scope\":\"admin\",\"slot\":\"list.rowActions\",\"type\":\"success\"},\"code\":\"admin_approve\",\"effects\":[{\"amount\":\"1\",\"errorMessage\":\"图书库存不足\",\"field\":\"stock\",\"min\":\"0\",\"notFoundMessage\":\"图书不存在\",\"relationField\":\"book_id\",\"table\":\"book_info\",\"type\":\"decrease\",\"values\":{}}],\"from\":\"pending\",\"invalidStateMessage\":\"当前状态不能审核通过\",\"method\":\"POST\",\"name\":\"审核通过\",\"path\":\"/borrow-record/approve\",\"successMessage\":\"审核成功,图书已借出\",\"to\":\"borrowing\"},{\"actor\":\"admin\",\"audit\":{\"timeField\":\"approve_time\",\"userField\":\"approve_user_id\"},\"button\":{\"confirm\":\"确认拒绝该借书申请吗?\",\"order\":20,\"pageCode\":\"borrow_admin_page\",\"scope\":\"admin\",\"slot\":\"list.rowActions\",\"type\":\"danger\"},\"code\":\"admin_reject\",\"effects\":[],\"from\":\"pending\",\"invalidStateMessage\":\"当前状态不能拒绝\",\"method\":\"POST\",\"name\":\"拒绝申请\",\"path\":\"/borrow-record/reject\",\"successMessage\":\"申请已拒绝\",\"to\":\"canceled\"},{\"actor\":\"admin\",\"audit\":{\"timeField\":\"return_time\",\"userField\":\"return_user_id\"},\"button\":{\"confirm\":\"确认已归还图书?\",\"order\":30,\"pageCode\":\"borrow_admin_page\",\"scope\":\"admin\",\"slot\":\"list.rowActions\",\"type\":\"primary\"},\"code\":\"admin_return\",\"effects\":[{\"amount\":\"1\",\"errorMessage\":\"图书库存恢复失败\",\"field\":\"stock\",\"min\":\"0\",\"notFoundMessage\":\"图书不存在\",\"relationField\":\"book_id\",\"table\":\"book_info\",\"type\":\"increase\",\"values\":{}}],\"from\":\"borrowing\",\"invalidStateMessage\":\"当前状态不能还书\",\"method\":\"POST\",\"name\":\"确认还书\",\"path\":\"/borrow-record/return\",\"successMessage\":\"还书成功\",\"to\":\"returned\"},{\"actor\":\"reader\",\"audit\":{},\"button\":{\"confirm\":\"确认取消借书申请?\",\"order\":10,\"pageCode\":\"my_borrows_page\",\"scope\":\"reader\",\"slot\":\"list.rowActions\",\"type\":\"default\"},\"code\":\"user_cancel_apply\",\"effects\":[],\"from\":\"pending\",\"invalidStateMessage\":\"当前状态不能取消申请\",\"method\":\"POST\",\"name\":\"取消申请\",\"path\":\"/my-borrows/cancel-apply\",\"successMessage\":\"借书申请已取消\",\"to\":\"canceled\"},{\"actor\":\"reader\",\"audit\":{},\"button\":{\"confirm\":\"确认取消预约?\",\"order\":20,\"pageCode\":\"my_borrows_page\",\"scope\":\"reader\",\"slot\":\"list.rowActions\",\"type\":\"default\"},\"code\":\"user_cancel_reserve\",\"effects\":[],\"from\":\"reserved\",\"invalidStateMessage\":\"当前状态不能取消预约\",\"method\":\"POST\",\"name\":\"取消预约\",\"path\":\"/my-borrows/cancel-reserve\",\"successMessage\":\"预约已取消\",\"to\":\"canceled\"}],\"code\":\"borrow_record\",\"mainTable\":\"borrow_record\",\"metrics\":[{\"aggregate\":\"count\",\"code\":\"borrowing_count\",\"field\":\"id\",\"name\":\"借阅中数量\",\"status\":\"borrowing\",\"table\":\"borrow_record\",\"unit\":\"条\"},{\"aggregate\":\"count\",\"code\":\"pending_count\",\"field\":\"id\",\"name\":\"待审核数量\",\"status\":\"pending\",\"table\":\"borrow_record\",\"unit\":\"条\"},{\"aggregate\":\"count\",\"code\":\"total_books\",\"field\":\"id\",\"name\":\"图书总量\",\"table\":\"book_info\",\"unit\":\"本\"},{\"aggregate\":\"count\",\"code\":\"total_readers\",\"field\":\"id\",\"name\":\"读者数量\",\"table\":\"reader\",\"unit\":\"人\"}],\"name\":\"借阅管理\",\"notFoundMessage\":\"借阅记录不存在\",\"states\":[{\"code\":\"pending\",\"label\":\"待审核\"},{\"code\":\"borrowing\",\"label\":\"借出中\"},{\"code\":\"returned\",\"label\":\"已归还\"},{\"code\":\"reserved\",\"label\":\"已预约\"},{\"code\":\"canceled\",\"label\":\"已取消\"}],\"statusField\":\"status\",\"version\":\"1.0\"},\"compiledFlowContract\":{\"acceptanceScenarios\":[],\"actions\":[{\"actor\":\"admin\",\"code\":\"admin_approve\",\"name\":\"审核通过\",\"ownerObject\":\"borrow_record\",\"ownerTable\":\"borrow_record\",\"preconditions\":[],\"quantityEffects\":[{\"actionCode\":\"admin_approve\",\"amount\":\"1\",\"effectType\":\"decrease\",\"objectCode\":\"book_info\",\"quantityField\":\"stock\",\"tableName\":\"book_info\"}],\"recordEffects\":[],\"required\":true,\"stateTransitions\":[{\"actionCode\":\"admin_approve\",\"fromState\":\"pending\",\"toState\":\"borrowing\"}]},{\"actor\":\"admin\",\"code\":\"admin_reject\",\"name\":\"拒绝申请\",\"ownerObject\":\"borrow_record\",\"ownerTable\":\"borrow_record\",\"preconditions\":[],\"quantityEffects\":[],\"recordEffects\":[],\"required\":true,\"stateTransitions\":[{\"actionCode\":\"admin_reject\",\"fromState\":\"pending\",\"toState\":\"canceled\"}]},{\"actor\":\"admin\",\"code\":\"admin_return\",\"name\":\"确认还书\",\"ownerObject\":\"borrow_record\",\"ownerTable\":\"borrow_record\",\"preconditions\":[],\"quantityEffects\":[{\"actionCode\":\"admin_return\",\"amount\":\"1\",\"effectType\":\"increase\",\"objectCode\":\"book_info\",\"quantityField\":\"stock\",\"tableName\":\"book_info\"}],\"recordEffects\":[],\"required\":true,\"stateTransitions\":[{\"actionCode\":\"admin_return\",\"fromState\":\"borrowing\",\"toState\":\"returned\"}]},{\"actor\":\"reader\",\"code\":\"user_cancel_apply\",\"name\":\"取消申请\",\"ownerObject\":\"borrow_record\",\"ownerTable\":\"borrow_record\",\"preconditions\":[],\"quantityEffects\":[],\"recordEffects\":[],\"required\":true,\"stateTransitions\":[{\"actionCode\":\"user_cancel_apply\",\"fromState\":\"pending\",\"toState\":\"canceled\"}]},{\"actor\":\"reader\",\"code\":\"user_cancel_reserve\",\"name\":\"取消预约\",\"ownerObject\":\"borrow_record\",\"ownerTable\":\"borrow_record\",\"preconditions\":[],\"quantityEffects\":[],\"recordEffects\":[],\"required\":true,\"stateTransitions\":[{\"actionCode\":\"user_cancel_reserve\",\"fromState\":\"reserved\",\"toState\":\"canceled\"}]}],\"businessPolicies\":[],\"coreObjects\":[{\"code\":\"borrow_record\",\"name\":\"借阅管理\",\"objectType\":\"main\",\"tableName\":\"borrow_record\"},{\"code\":\"book_info\",\"name\":\"book_info\",\"objectType\":\"related\",\"tableName\":\"book_info\"}],\"domainName\":\"借阅管理\",\"metrics\":[{\"aggregate\":\"count\",\"code\":\"borrowing_count\",\"field\":\"id\",\"filters\":[{\"field\":\"status\",\"operator\":\"eq\",\"values\":[\"borrowing\"]}],\"name\":\"借阅中数量\",\"relatedActionCodes\":[],\"required\":true,\"tableName\":\"borrow_record\",\"unit\":\"条\"},{\"aggregate\":\"count\",\"code\":\"pending_count\",\"field\":\"id\",\"filters\":[{\"field\":\"status\",\"operator\":\"eq\",\"values\":[\"pending\"]}],\"name\":\"待审核数量\",\"relatedActionCodes\":[],\"required\":true,\"tableName\":\"borrow_record\",\"unit\":\"条\"},{\"aggregate\":\"count\",\"code\":\"total_books\",\"field\":\"id\",\"filters\":[],\"name\":\"图书总量\",\"relatedActionCodes\":[],\"required\":true,\"tableName\":\"book_info\",\"unit\":\"本\"},{\"aggregate\":\"count\",\"code\":\"total_readers\",\"field\":\"id\",\"filters\":[],\"name\":\"读者数量\",\"relatedActionCodes\":[],\"required\":true,\"tableName\":\"reader\",\"unit\":\"人\"}],\"pageBindings\":[{\"actionCode\":\"admin_approve\",\"pageCode\":\"borrow_admin_page\",\"slot\":\"list.rowActions\",\"tableName\":\"borrow_record\",\"target\":\"admin\"},{\"actionCode\":\"admin_reject\",\"pageCode\":\"borrow_admin_page\",\"slot\":\"list.rowActions\",\"tableName\":\"borrow_record\",\"target\":\"admin\"},{\"actionCode\":\"admin_return\",\"pageCode\":\"borrow_admin_page\",\"slot\":\"list.rowActions\",\"tableName\":\"borrow_record\",\"target\":\"admin\"},{\"actionCode\":\"user_cancel_apply\",\"pageCode\":\"my_borrows_page\",\"slot\":\"list.rowActions\",\"tableName\":\"borrow_record\",\"target\":\"frontend\"},{\"actionCode\":\"user_cancel_reserve\",\"pageCode\":\"my_borrows_page\",\"slot\":\"list.rowActions\",\"tableName\":\"borrow_record\",\"target\":\"frontend\"}],\"quantityRules\":[{\"actionCode\":\"admin_approve\",\"amount\":\"1\",\"effectType\":\"decrease\",\"objectCode\":\"book_info\",\"quantityField\":\"stock\",\"tableName\":\"book_info\"},{\"actionCode\":\"admin_return\",\"amount\":\"1\",\"effectType\":\"increase\",\"objectCode\":\"book_info\",\"quantityField\":\"stock\",\"tableName\":\"book_info\"}],\"recordRules\":[],\"stateMachines\":[{\"objectCode\":\"borrow_record\",\"states\":[\"pending\",\"borrowing\",\"returned\",\"reserved\",\"canceled\"],\"statusField\":\"status\",\"tableName\":\"borrow_record\",\"transitions\":[{\"actionCode\":\"admin_approve\",\"fromState\":\"pending\",\"toState\":\"borrowing\"},{\"actionCode\":\"admin_reject\",\"fromState\":\"pending\",\"toState\":\"canceled\"},{\"actionCode\":\"admin_return\",\"fromState\":\"borrowing\",\"toState\":\"returned\"},{\"actionCode\":\"user_cancel_apply\",\"fromState\":\"pending\",\"toState\":\"canceled\"},{\"actionCode\":\"user_cancel_reserve\",\"fromState\":\"reserved\",\"toState\":\"canceled\"}]}]},\"canonicalTableRegistry\":[\"book_info\",\"borrow_record\",\"reader\",\"carousel\",\"announcement\",\"news\"],\"limits\":{\"maxTables\":12,\"maxColumnsPerTable\":30}}', '{\n \"tables\": [\n {\n \"tableName\": \"book_info\",\n \"tableComment\": \"图书信息表\",\n \"adminMenuName\": \"图书管理\",\n \"operations\": {\n \"add\": true,\n \"edit\": true,\n \"remove\": true,\n \"removeType\": \"physical\",\n \"reason\": \"\"\n },\n \"columns\": [\n {\n \"columnName\": \"id\",\n \"columnLabel\": \"ID\",\n \"columnComment\": \"主键ID\",\n \"columnType\": \"bigint(20)\",\n \"isPk\": \"1\",\n \"isIncrement\": \"1\",\n \"isRequired\": \"1\",\n \"javaType\": \"Long\",\n \"htmlType\": \"input\"\n },\n {\n \"columnName\": \"title\",\n \"columnLabel\": \"书名\",\n \"columnComment\": \"图书标题\",\n \"columnType\": \"varchar(200)\",\n \"isPk\": \"0\",\n \"isIncrement\": \"0\",\n \"isRequired\": \"1\",\n \"javaType\": \"String\",\n \"htmlType\": \"input\"\n },\n {\n \"columnName\": \"author\",\n \"columnLabel\": \"作者\",\n \"columnComment\": \"图书作者\",\n \"columnType\": \"varchar(100)\",\n \"isPk\": \"0\",\n \"isIncrement\": \"0\",\n \"isRequired\": \"0\",\n \"javaType\": \"String\",\n \"htmlType\": \"input\"\n },\n {\n \"columnName\": \"publisher\",\n \"columnLabel\": \"出版社\",\n \"columnComment\": \"出版社名称\",\n \"columnType\": \"varchar(100)\",\n \"isPk\": \"0\",\n \"isIncrement\": \"0\",\n \"isRequired\": \"0\",\n \"javaType\": \"String\",\n \"htmlType\": \"input\"\n },\n {\n \"columnName\": \"isbn\",\n \"columnLabel\": \"ISBN\",\n \"columnComment\": \"国际标准书号\",\n \"columnType\": \"varchar(20)\",\n \"isPk\": \"0\",\n \"isIncrement\": \"0\",\n \"isRequired\": \"0\",\n \"javaType\": \"String\",\n \"htmlType\": \"input\"\n },\n {\n \"columnName\": \"stock\",\n \"columnLabel\": \"库存\",\n \"columnComment\": \"图书当前库存数量\",\n \"columnType\": \"int(11)\",\n \"isPk\": \"0\",\n \"isIncrement\": \"0\",\n \"isRequired\": \"1\",\n \"javaType\": \"Integer\",\n \"htmlType\": \"input\"\n },\n {\n \"columnName\": \"category\",\n \"columnLabel\": \"分类\",\n \"columnComment\": \"图书分类\",\n \"columnType\": \"varchar(50)\",\n \"isPk\": \"0\",\n \"isIncrement\": \"0\",\n \"isRequired\": \"0\",\n \"javaType\": \"String\",\n \"htmlType\": \"select\",\n \"dictOptions\": [\"文学\", \"科技\", \"历史\", \"艺术\", \"教育\"]\n },\n {\n \"columnName\": \"cover_image\",\n \"columnLabel\": \"封面图片\",\n \"columnComment\": \"图书封面图片URL\",\n \"columnType\": \"varchar(500)\",\n \"isPk\": \"0\",\n \"isIncrement\": \"0\",\n \"isRequired\": \"0\",\n \"javaType\": \"String\",\n \"htmlType\": \"imageUpload\"\n },\n {\n \"columnName\": \"description\",\n \"columnLabel\": \"简介\",\n \"columnComment\": \"图书简介内容\",\n \"columnType\": \"text\",\n \"isPk\": \"0\",\n \"isIncrement\": \"0\",\n \"isRequired\": \"0\",\n \"javaType\": \"String\",\n \"htmlType\": \"editor\"\n },\n {\n \"columnName\": \"status\",\n \"columnLabel\": \"状态\",\n \"columnComment\": \"图书状态active-上架inactive-下架\",\n \"columnType\": \"varchar(20)\",\n \"isPk\": \"0\",\n \"isIncrement\": \"0\",\n \"isRequired\": \"1\",\n \"javaType\": \"String\",\n \"htmlType\": \"select\",\n \"dictOptions\": [\"active\", \"inactive\"]\n },\n {\n \"columnName\": \"create_time\",\n \"columnLabel\": \"创建时间\",\n \"columnComment\": \"记录创建时间\",\n \"columnType\": \"datetime\",\n \"isPk\": \"0\",\n \"isIncrement\": \"0\",\n \"isRequired\": \"0\",\n \"javaType\": \"Date\",\n \"htmlType\": \"datetime\"\n },\n {\n \"columnName\": \"update_time\",\n \"columnLabel\": \"更新时间\",\n \"columnComment\": \"记录最后更新时间\",\n \"columnType\": \"datetime\",\n \"isPk\": \"0\",\n \"isIncrement\": \"0\",\n \"isRequired\": \"0\",\n \"javaType\": \"Date\",\n \"htmlType\": \"datetime\"\n }\n ]\n },\n {\n \"tableName\": \"borrow_record\",\n \"tableComment\": \"借阅记录表\",\n \"adminMenuName\": \"借阅记录\",\n \"operations\": {\n \"add\": true,\n \"edit\": false,\n \"remove\": false,\n \"removeType\": \"physical\",\n \"reason\": \"仅新增,不允许编辑或删除\"\n },\n \"columns\": [\n {\n \"columnName\": \"id\",\n \"columnLabel\": \"ID\",\n \"columnComment\": \"主键ID\",\n \"columnType\": \"bigint(20)\",\n \"isPk\": \"1\",\n \"isIncrement\": \"1\",\n \"isRequired\": \"1\",\n \"javaType\": \"Long\",\n \"htmlType\": \"input\"\n },\n {\n \"columnName\": \"book_id\",\n \"columnLabel\": \"图书\",\n \"columnComment\": \"关联图书ID\",\n \"columnType\": \"bigint(20)\",\n \"isPk\": \"0\",\n \"isIncrement\": \"0\",\n \"isRequired\": \"1\",\n \"javaType\": \"Long\",\n \"htmlType\": \"select\",\n \"dictType\": \"remote:book_info:id:title\"\n },\n {\n \"columnName\": \"reader_id\",\n \"columnLabel\": \"读者\",\n \"columnComment\": \"关联读者信息ID\",\n \"columnType\": \"bigint(20)\",\n \"isPk\": \"0\",\n \"isIncrement\": \"0\",\n \"isRequired\": \"1\",\n \"javaType\": \"Long\",\n \"htmlType\": \"select\",\n \"dictType\": \"remote:reader:id:real_name\"\n },\n {\n \"columnName\": \"status\",\n \"columnLabel\": \"状态\",\n \"columnComment\": \"借阅状态pending-待审核, borrowing-借出中, returned-已归还, reserved-已预约, canceled-已取消\",\n \"columnType\": \"varchar(20)\",\n \"isPk\": \"0\",\n \"isIncrement\": \"0\",\n \"isRequired\": \"1\",\n \"javaType\": \"String\",\n \"htmlType\": \"select\",\n \"dictOptions\": [\"pending\", \"borrowing\", \"returned\", \"reserved\", \"canceled\"]\n },\n {\n \"columnName\": \"reserve_time\",\n \"columnLabel\": \"预约时间\",\n \"columnComment\": \"读者预约图书的时间\",\n \"columnType\": \"datetime\",\n \"isPk\": \"0\",\n \"isIncrement\": \"0\",\n \"isRequired\": \"0\",\n \"javaType\": \"Date\",\n \"htmlType\": \"datetime\"\n },\n {\n \"columnName\": \"borrow_time\",\n \"columnLabel\": \"借出时间\",\n \"columnComment\": \"实际借出图书的时间(审核通过时)\",\n \"columnType\": \"datetime\",\n \"isPk\": \"0\",\n \"isIncrement\": \"0\",\n \"isRequired\": \"0\",\n \"javaType\": \"Date\",\n \"htmlType\": \"datetime\"\n },\n {\n \"columnName\": \"due_time\",\n \"columnLabel\": \"应还日期\",\n \"columnComment\": \"要求归还的最后日期\",\n \"columnType\": \"datetime\",\n \"isPk\": \"0\",\n \"isIncrement\": \"0\",\n \"isRequired\": \"0\",\n \"javaType\": \"Date\",\n \"htmlType\": \"datetime\"\n },\n {\n \"columnName\": \"approve_user_id\",\n \"columnLabel\": \"审核人ID\",\n \"columnComment\": \"执行审核通过的管理员ID\",\n \"columnType\": \"bigint(20)\",\n \"isPk\": \"0\",\n \"isIncrement\": \"0\",\n \"isRequired\": \"0\",\n \"javaType\": \"Long\",\n \"htmlType\": \"select\",\n \"dictType\": \"remote:admin_account:admin_id:username\"\n },\n {\n \"columnName\": \"approve_time\",\n \"columnLabel\": \"审核时间\",\n \"columnComment\": \"管理员审核通过的时间\",\n \"columnType\": \"datetime\",\n \"isPk\": \"0\",\n \"isIncrement\": \"0\",\n \"isRequired\": \"0\",\n \"javaType\": \"Date\",\n \"htmlType\": \"datetime\"\n },\n {\n \"columnName\": \"return_user_id\",\n \"columnLabel\": \"还书人ID\",\n \"columnComment\": \"确认还书的管理员ID\",\n \"columnType\": \"bigint(20)\",\n \"isPk\": \"0\",\n \"isIncrement\": \"0\",\n \"isRequired\": \"0\",\n \"javaType\": \"Long\",\n \"htmlType\": \"select\",\n \"dictType\": \"remote:admin_account:admin_id:username\"\n },\n {\n \"columnName\": \"return_time\",\n \"columnLabel\": \"归还时间\",\n \"columnComment\": \"管理员确认归还的时间\",\n \"columnType\": \"datetime\",\n \"isPk\": \"0\",\n \"isIncrement\": \"0\",\n \"isRequired\": \"0\",\n \"javaType\": \"Date\",\n \"htmlType\": \"datetime\"\n },\n {\n \"columnName\": \"create_time\",\n \"columnLabel\": \"创建时间\",\n \"columnComment\": \"记录创建时间\",\n \"columnType\": \"datetime\",\n \"isPk\": \"0\",\n \"isIncrement\": \"0\",\n \"isRequired\": \"0\",\n \"javaType\": \"Date\",\n \"htmlType\": \"datetime\"\n },\n {\n \"columnName\": \"update_time\",\n \"columnLabel\": \"更新时间\",\n \"columnComment\": \"记录最后更新时间\",\n \"columnType\": \"datetime\",\n \"isPk\": \"0\",\n \"isIncrement\": \"0\",\n \"isRequired\": \"0\",\n \"javaType\": \"Date\",\n \"htmlType\": \"datetime\"\n }\n ]\n },\n {\n \"tableName\": \"reader\",\n \"tableComment\": \"读者信息表\",\n \"adminMenuName\": \"读者管理\",\n \"operations\": {\n \"add\": true,\n \"edit\": true,\n \"remove\": true,\n \"removeType\": \"physical\",\n \"reason\": \"\"\n },\n \"columns\": [\n {\n \"columnName\": \"id\",\n \"columnLabel\": \"ID\",\n \"columnComment\": \"主键ID\",\n \"columnType\": \"bigint(20)\",\n \"isPk\": \"1\",\n \"isIncrement\": \"1\",\n \"isRequired\": \"1\",\n \"javaType\": \"Long\",\n \"htmlType\": \"input\"\n },\n {\n \"columnName\": \"user_id\",\n \"columnLabel\": \"账号ID\",\n \"columnComment\": \"关联读者账号表的ID\",\n \"columnType\": \"bigint(20)\",\n \"isPk\": \"0\",\n \"isIncrement\": \"0\",\n \"isRequired\": \"1\",\n \"javaType\": \"Long\",\n \"htmlType\": \"select\",\n \"dictType\": \"remote:reader_account:reader_id:username\"\n },\n {\n \"columnName\": \"real_name\",\n \"columnLabel\": \"真实姓名\",\n \"columnComment\": \"读者的真实姓名\",\n \"columnType\": \"varchar(50)\",\n \"isPk\": \"0\",\n \"isIncrement\": \"0\",\n \"isRequired\": \"1\",\n \"javaType\": \"String\",\n \"htmlType\": \"input\"\n },\n {\n \"columnName\": \"phone\",\n \"columnLabel\": \"手机号\",\n \"columnComment\": \"读者联系电话\",\n \"columnType\": \"varchar(20)\",\n \"isPk\": \"0\",\n \"isIncrement\": \"0\",\n \"isRequired\": \"0\",\n \"javaType\": \"String\",\n \"htmlType\": \"input\"\n },\n {\n \"columnName\": \"email\",\n \"columnLabel\": \"邮箱\",\n \"columnComment\": \"读者电子邮箱\",\n \"columnType\": \"varchar(100)\",\n \"isPk\": \"0\",\n \"isIncrement\": \"0\",\n \"isRequired\": \"0\",\n \"javaType\": \"String\",\n \"htmlType\": \"input\"\n },\n {\n \"columnName\": \"gender\",\n \"columnLabel\": \"性别\",\n \"columnComment\": \"读者性别\",\n \"columnType\": \"varchar(10)\",\n \"isPk\": \"0\",\n \"isIncrement\": \"0\",\n \"isRequired\": \"0\",\n \"javaType\": \"String\",\n \"htmlType\": \"radio\",\n \"dictOptions\": [\"男\", \"女\"]\n },\n {\n \"columnName\": \"avatar\",\n \"columnLabel\": \"头像\",\n \"columnComment\": \"读者头像图片URL\",\n \"columnType\": \"varchar(500)\",\n \"isPk\": \"0\",\n \"isIncrement\": \"0\",\n \"isRequired\": \"0\",\n \"javaType\": \"String\",\n \"htmlType\": \"imageUpload\"\n },\n {\n \"columnName\": \"status\",\n \"columnLabel\": \"状态\",\n \"columnComment\": \"读者状态active-正常inactive-禁用\",\n \"columnType\": \"varchar(20)\",\n \"isPk\": \"0\",\n \"isIncrement\": \"0\",\n \"isRequired\": \"1\",\n \"javaType\": \"String\",\n \"htmlType\": \"select\",\n \"dictOptions\": [\"active\", \"inactive\"]\n },\n {\n \"columnName\": \"create_time\",\n \"columnLabel\": \"创建时间\",\n \"columnComment\": \"记录创建时间\",\n \"columnType\": \"datetime\",\n \"isPk\": \"0\",\n \"isIncrement\": \"0\",\n \"isRequired\": \"0\",\n \"javaType\": \"Date\",\n \"htmlType\": \"datetime\"\n },\n {\n \"columnName\": \"update_time\",\n \"columnLabel\": \"更新时间\",\n \"columnComment\": \"记录最后更新时间\",\n \"columnType\": \"datetime\",\n \"isPk\": \"0\",\n \"isIncrement\": \"0\",\n \"isRequired\": \"0\",\n \"javaType\": \"Date\",\n \"htmlType\": \"datetime\"\n }\n ]\n },\n {\n \"tableName\": \"carousel\",\n \"tableComment\": \"轮播图表\",\n \"adminMenuName\": \"轮播图管理\",\n \"operations\": {\n \"add\": true,\n \"edit\": true,\n \"remove\": true,\n \"removeType\": \"physical\",\n \"reason\": \"\"\n },\n \"columns\": [\n {\n \"columnName\": \"id\",\n \"columnLabel\": \"ID\",\n \"columnComment\": \"主键ID\",\n \"columnType\": \"bigint(20)\",\n \"isPk\": \"1\",\n \"isIncrement\": \"1\",\n \"isRequired\": \"1\",\n \"javaType\": \"Long\",\n \"htmlType\": \"input\"\n },\n {\n \"columnName\": \"image_url\",\n \"columnLabel\": \"图片URL\",\n \"columnComment\": \"轮播图片URL\",\n \"columnType\": \"varchar(500)\",\n \"isPk\": \"0\",\n \"isIncrement\": \"0\",\n \"isRequired\": \"1\",\n \"javaType\": \"String\",\n \"htmlType\": \"imageUpload\"\n },\n {\n \"columnName\": \"link_url\",\n \"columnLabel\": \"链接URL\",\n \"columnComment\": \"点击轮播图跳转的链接\",\n \"columnType\": \"varchar(500)\",\n \"isPk\": \"0\",\n \"isIncrement\": \"0\",\n \"isRequired\": \"0\",\n \"javaType\": \"String\",\n \"htmlType\": \"input\"\n },\n {\n \"columnName\": \"title\",\n \"columnLabel\": \"标题\",\n \"columnComment\": \"轮播图标题\",\n \"columnType\": \"varchar(200)\",\n \"isPk\": \"0\",\n \"isIncrement\": \"0\",\n \"isRequired\": \"0\",\n \"javaType\": \"String\",\n \"htmlType\": \"input\"\n },\n {\n \"columnName\": \"sort_order\",\n \"columnLabel\": \"排序\",\n \"columnComment\": \"显示排序,数字越小越靠前\",\n \"columnType\": \"int(11)\",\n \"isPk\": \"0\",\n \"isIncrement\": \"0\",\n \"isRequired\": \"0\",\n \"javaType\": \"Integer\",\n \"htmlType\": \"input\"\n },\n {\n \"columnName\": \"status\",\n \"columnLabel\": \"状态\",\n \"columnComment\": \"轮播图状态active-启用inactive-禁用\",\n \"columnType\": \"varchar(20)\",\n \"isPk\": \"0\",\n \"isIncrement\": \"0\",\n \"isRequired\": \"1\",\n \"javaType\": \"String\",\n \"htmlType\": \"select\",\n \"dictOptions\": [\"active\", \"inactive\"]\n },\n {\n \"columnName\": \"create_time\",\n \"columnLabel\": \"创建时间\",\n \"columnComment\": \"记录创建时间\",\n \"columnType\": \"datetime\",\n \"isPk\": \"0\",\n \"isIncrement\": \"0\",\n \"isRequired\": \"0\",\n \"javaType\": \"Date\",\n \"htmlType\": \"datetime\"\n },\n {\n \"columnName\": \"update_time\",\n \"columnLabel\": \"更新时间\",\n \"columnComment\": \"记录最后更新时间\",\n \"columnType\": \"datetime\",\n \"isPk\": \"0\",\n \"isIncrement\": \"0\",\n \"isRequired\": \"0\",\n \"javaType\": \"Date\",\n \"htmlType\": \"datetime\"\n }\n ]\n },\n {\n \"tableName\": \"announcement\",\n \"tableComment\": \"公告表\",\n \"adminMenuName\": \"公告管理\",\n \"operations\": {\n \"add\": true,\n \"edit\": true,\n \"remove\": true,\n \"removeType\": \"physical\",\n \"reason\": \"\"\n },\n \"columns\": [\n {\n \"columnName\": \"id\",\n \"columnLabel\": \"ID\",\n \"columnComment\": \"主键ID\",\n \"columnType\": \"bigint(20)\",\n \"isPk\": \"1\",\n \"isIncrement\": \"1\",\n \"isRequired\": \"1\",\n \"javaType\": \"Long\",\n \"htmlType\": \"input\"\n },\n {\n \"columnName\": \"title\",\n \"columnLabel\": \"标题\",\n \"columnComment\": \"公告标题\",\n \"columnType\": \"varchar(200)\",\n \"isPk\": \"0\",\n \"isIncrement\": \"0\",\n \"isRequired\": \"1\",\n \"javaType\": \"String\",\n \"htmlType\": \"input\"\n },\n {\n \"columnName\": \"content\",\n \"columnLabel\": \"内容\",\n \"columnComment\": \"公告正文内容\",\n \"columnType\": \"longtext\",\n \"isPk\": \"0\",\n \"isIncrement\": \"0\",\n \"isRequired\": \"1\",\n \"javaType\": \"String\",\n \"htmlType\": \"editor\"\n },\n {\n \"columnName\": \"status\",\n \"columnLabel\": \"状态\",\n \"columnComment\": \"公告状态draft-草稿published-已发布\",\n \"columnType\": \"varchar(20)\",\n \"isPk\": \"0\",\n \"isIncrement\": \"0\",\n \"isRequired\": \"1\",\n \"javaType\": \"String\",\n \"htmlType\": \"select\",\n \"dictOptions\": [\"draft\", \"published\"]\n },\n {\n \"columnName\": \"publish_time\",\n \"columnLabel\": \"发布时间\",\n \"columnComment\": \"公告正式发布时间\",\n \"columnType\": \"datetime\",\n \"isPk\": \"0\",\n \"isIncrement\": \"0\",\n \"isRequired\": \"0\",\n \"javaType\": \"Date\",\n \"htmlType\": \"datetime\"\n },\n {\n \"columnName\": \"create_time\",\n \"columnLabel\": \"创建时间\",\n \"columnComment\": \"记录创建时间\",\n \"columnType\": \"datetime\",\n \"isPk\": \"0\",\n \"isIncrement\": \"0\",\n \"isRequired\": \"0\",\n \"javaType\": \"Date\",\n \"htmlType\": \"datetime\"\n },\n {\n \"columnName\": \"update_time\",\n \"columnLabel\": \"更新时间\",\n \"columnComment\": \"记录最后更新时间\",\n \"columnType\": \"datetime\",\n \"isPk\": \"0\",\n \"isIncrement\": \"0\",\n \"isRequired\": \"0\",\n \"javaType\": \"Date\",\n \"htmlType\": \"datetime\"\n }\n ]\n },\n {\n \"tableName\": \"news\",\n \"tableComment\": \"新闻表\",\n \"adminMenuName\": \"新闻管理\",\n \"operations\": {\n \"add\": true,\n \"edit\": true,\n \"remove\": true,\n \"removeType\": \"physical\",\n \"reason\": \"\"\n },\n \"columns\": [\n {\n \"columnName\": \"id\",\n \"columnLabel\": \"ID\",\n \"columnComment\": \"主键ID\",\n \"columnType\": \"bigint(20)\",\n \"isPk\": \"1\",\n \"isIncrement\": \"1\",\n \"isRequired\": \"1\",\n \"javaType\": \"Long\",\n \"htmlType\": \"input\"\n },\n {\n \"columnName\": \"title\",\n \"columnLabel\": \"标题\",\n \"columnComment\": \"新闻标题\",\n \"columnType\": \"varchar(200)\",\n \"isPk\": \"0\",\n \"isIncrement\": \"0\",\n \"isRequired\": \"1\",\n \"javaType\": \"String\",\n \"htmlType\": \"input\"\n },\n {\n \"columnName\": \"summary\",\n \"columnLabel\": \"摘要\",\n \"columnComment\": \"新闻摘要简介\",\n \"columnType\": \"varchar(500)\",\n \"isPk\": \"0\",\n \"isIncrement\": \"0\",\n \"isRequired\": \"0\",\n \"javaType\": \"String\",\n \"htmlType\": \"input\"\n },\n {\n \"columnName\": \"content\",\n \"columnLabel\": \"内容\",\n \"columnComment\": \"新闻正文内容\",\n \"columnType\": \"longtext\",\n \"isPk\": \"0\",\n \"isIncrement\": \"0\",\n \"isRequired\": \"1\",\n \"javaType\": \"String\",\n \"htmlType\": \"editor\"\n },\n {\n \"columnName\": \"cover_image\",\n \"columnLabel\": \"封面图片\",\n \"columnComment\": \"新闻封面图片URL\",\n \"columnType\": \"varchar(500)\",\n \"isPk\": \"0\",\n \"isIncrement\": \"0\",\n \"isRequired\": \"0\",\n \"javaType\": \"String\",\n \"htmlType\": \"imageUpload\"\n },\n {\n \"columnName\": \"publish_time\",\n \"columnLabel\": \"发布时间\",\n \"columnComment\": \"新闻正式发布时间\",\n \"columnType\": \"datetime\",\n \"isPk\": \"0\",\n \"isIncrement\": \"0\",\n \"isRequired\": \"0\",\n \"javaType\": \"Date\",\n \"htmlType\": \"datetime\"\n },\n {\n \"columnName\": \"status\",\n \"columnLabel\": \"状态\",\n \"columnComment\": \"新闻状态draft-草稿published-已发布\",\n \"columnType\": \"varchar(20)\",\n \"isPk\": \"0\",\n \"isIncrement\": \"0\",\n \"isRequired\": \"1\",\n \"javaType\": \"String\",\n \"htmlType\": \"select\",\n \"dictOptions\": [\"draft\", \"published\"]\n },\n {\n \"columnName\": \"create_time\",\n \"columnLabel\": \"创建时间\",\n \"columnComment\": \"记录创建时间\",\n \"columnType\": \"datetime\",\n \"isPk\": \"0\",\n \"isIncrement\": \"0\",\n \"isRequired\": \"0\",\n \"javaType\": \"Date\",\n \"htmlType\": \"datetime\"\n },\n {\n \"columnName\": \"update_time\",\n \"columnLabel\": \"更新时间\",\n \"columnComment\": \"记录最后更新时间\",\n \"columnType\": \"datetime\",\n \"isPk\": \"0\",\n \"isIncrement\": \"0\",\n \"isRequired\": \"0\",\n \"javaType\": \"Date\",\n \"htmlType\": \"datetime\"\n }\n ]\n },\n {\n \"tableName\": \"admin_account\",\n \"tableComment\": \"管理员账号表\",\n \"adminMenuName\": \"管理员账号\",\n \"operations\": {\n \"add\": true,\n \"edit\": true,\n \"remove\": true,\n \"removeType\": \"physical\",\n \"reason\": \"\"\n },\n \"columns\": [\n {\n \"columnName\": \"admin_id\",\n \"columnLabel\": \"管理员ID\",\n \"columnComment\": \"主键ID\",\n \"columnType\": \"bigint(20)\",\n \"isPk\": \"1\",\n \"isIncrement\": \"1\",\n \"isRequired\": \"1\",\n \"javaType\": \"Long\",\n \"htmlType\": \"input\"\n },\n {\n \"columnName\": \"username\",\n \"columnLabel\": \"用户名\",\n \"columnComment\": \"管理员登录用户名\",\n \"columnType\": \"varchar(50)\",\n \"isPk\": \"0\",\n \"isIncrement\": \"0\",\n \"isRequired\": \"1\",\n \"javaType\": \"String\",\n \"htmlType\": \"input\"\n },\n {\n \"columnName\": \"password_hash\",\n \"columnLabel\": \"密码哈希\",\n \"columnComment\": \"经过哈希处理的密码\",\n \"columnType\": \"varchar(200)\",\n \"isPk\": \"0\",\n \"isIncrement\": \"0\",\n \"isRequired\": \"1\",\n \"javaType\": \"String\",\n \"htmlType\": \"input\"\n },\n {\n \"columnName\": \"nickname\",\n \"columnLabel\": \"昵称\",\n \"columnComment\": \"管理员显示昵称\",\n \"columnType\": \"varchar(100)\",\n \"isPk\": \"0\",\n \"isIncrement\": \"0\",\n \"isRequired\": \"0\",\n \"javaType\": \"String\",\n \"htmlType\": \"input\"\n },\n {\n \"columnName\": \"status\",\n \"columnLabel\": \"状态\",\n \"columnComment\": \"账号状态active-正常inactive-禁用\",\n \"columnType\": \"varchar(20)\",\n \"isPk\": \"0\",\n \"isIncrement\": \"0\",\n \"isRequired\": \"1\",\n \"javaType\": \"String\",\n \"htmlType\": \"select\",\n \"dictOptions\": [\"active\", \"inactive\"]\n },\n {\n \"columnName\": \"create_time\",\n \"columnLabel\": \"创建时间\",\n \"columnComment\": \"记录创建时间\",\n \"columnType\": \"datetime\",\n \"isPk\": \"0\",\n \"isIncrement\": \"0\",\n \"isRequired\": \"0\",\n \"javaType\": \"Date\",\n \"htmlType\": \"datetime\"\n }\n ]\n },\n {\n \"tableName\": \"reader_account\",\n \"tableComment\": \"读者账号表\",\n \"adminMenuName\": \"读者账号\",\n \"operations\": {\n \"add\": true,\n \"edit\": true,\n \"remove\": true,\n \"removeType\": \"physical\",\n \"reason\": \"\"\n },\n \"columns\": [\n {\n \"columnName\": \"reader_id\",\n \"columnLabel\": \"读者ID\",\n \"columnComment\": \"主键ID\",\n \"columnType\": \"bigint(20)\",\n \"isPk\": \"1\",\n \"isIncrement\": \"1\",\n \"isRequired\": \"1\",\n \"javaType\": \"Long\",\n \"htmlType\": \"input\"\n },\n {\n \"columnName\": \"username\",\n \"columnLabel\": \"用户名\",\n \"columnComment\": \"读者登录用户名\",\n \"columnType\": \"varchar(50)\",\n \"isPk\": \"0\",\n \"isIncrement\": \"0\",\n \"isRequired\": \"1\",\n \"javaType\": \"String\",\n \"htmlType\": \"input\"\n },\n {\n \"columnName\": \"password_hash\",\n \"columnLabel\": \"密码哈希\",\n \"columnComment\": \"经过哈希处理的密码\",\n \"columnType\": \"varchar(200)\",\n \"isPk\": \"0\",\n \"isIncrement\": \"0\",\n \"isRequired\": \"1\",\n \"javaType\": \"String\",\n \"htmlType\": \"input\"\n },\n {\n \"columnName\": \"nickname\",\n \"columnLabel\": \"昵称\",\n \"columnComment\": \"读者显示昵称\",\n \"columnType\": \"varchar(100)\",\n \"isPk\": \"0\",\n \"isIncrement\": \"0\",\n \"isRequired\": \"0\",\n \"javaType\": \"String\",\n \"htmlType\": \"input\"\n },\n {\n \"columnName\": \"status\",\n \"columnLabel\": \"状态\",\n \"columnComment\": \"账号状态active-正常inactive-禁用\",\n \"columnType\": \"varchar(20)\",\n \"isPk\": \"0\",\n \"isIncrement\": \"0\",\n \"isRequired\": \"1\",\n \"javaType\": \"String\",\n \"htmlType\": \"select\",\n \"dictOptions\": [\"active\", \"inactive\"]\n },\n {\n \"columnName\": \"create_time\",\n \"columnLabel\": \"创建时间\",\n \"columnComment\": \"记录创建时间\",\n \"columnType\": \"datetime\",\n \"isPk\": \"0\",\n \"isIncrement\": \"0\",\n \"isRequired\": \"0\",\n \"javaType\": \"Date\",\n \"htmlType\": \"datetime\"\n }\n ]\n }\n ]\n}', '1', NULL, 72109, '2026-07-14 17:26:38');
INSERT INTO `factory_ai_stage_output` VALUES (118, 108, 106, 100, 'app_blueprint', '{\"projectName\":\"图书管理系统\",\"projectDescription\":\"功能:借书、还书、预约、取消预约\\n角色用户、管理员\\n其他模块轮播图、公告、新闻\",\"industryTemplate\":\"\",\"stylePreset\":\"dark-tech\",\"extraRequirements\":\"\"}', '{\n \"roles\": [\n {\n \"code\": \"admin\",\n \"name\": \"管理员\",\n \"description\": \"系统管理员,负责图书、借阅、预约、用户、轮播图、公告、新闻等管理\"\n },\n {\n \"code\": \"reader\",\n \"name\": \"读者\",\n \"description\": \"普通用户,可借书、还书、预约图书、取消预约、查看公告和新闻\"\n }\n ],\n \"frontendMenus\": [\n {\n \"code\": \"book_catalog\",\n \"name\": \"图书目录\",\n \"path\": \"/books\",\n \"pageCode\": \"book_catalog_page\",\n \"requiresLogin\": false,\n \"visibleRoles\": [],\n \"dataScope\": \"PUBLIC\"\n },\n {\n \"code\": \"my_borrows\",\n \"name\": \"我的借阅\",\n \"path\": \"/my-borrows\",\n \"pageCode\": \"my_borrows_page\",\n \"requiresLogin\": true,\n \"visibleRoles\": [\"reader\"],\n \"dataScope\": \"CURRENT_USER\"\n },\n {\n \"code\": \"my_reservations\",\n \"name\": \"我的预约\",\n \"path\": \"/my-reservations\",\n \"pageCode\": \"my_reservation_page\",\n \"requiresLogin\": true,\n \"visibleRoles\": [\"reader\"],\n \"dataScope\": \"CURRENT_USER\"\n },\n {\n \"code\": \"reader_profile\",\n \"name\": \"个人资料\",\n \"path\": \"/profile\",\n \"pageCode\": \"reader_profile_page\",\n \"requiresLogin\": true,\n \"visibleRoles\": [\"reader\"],\n \"dataScope\": \"CURRENT_USER\"\n },\n {\n \"code\": \"notices\",\n \"name\": \"公告\",\n \"path\": \"/notices\",\n \"pageCode\": \"notice_list_page\",\n \"requiresLogin\": false,\n \"visibleRoles\": [],\n \"dataScope\": \"PUBLIC\"\n },\n {\n \"code\": \"news\",\n \"name\": \"新闻\",\n \"path\": \"/news\",\n \"pageCode\": \"news_list_page\",\n \"requiresLogin\": false,\n \"visibleRoles\": [],\n \"dataScope\": \"PUBLIC\"\n }\n ],\n \"frontendPages\": [\n {\n \"code\": \"book_catalog_page\",\n \"name\": \"图书目录\",\n \"menuCode\": \"book_catalog\",\n \"path\": \"/books\",\n \"pageType\": \"list\",\n \"tableName\": \"book_info\"\n },\n {\n \"code\": \"my_borrows_page\",\n \"name\": \"我的借阅\",\n \"menuCode\": \"my_borrows\",\n \"path\": \"/my-borrows\",\n \"pageType\": \"current_user_list\",\n \"tableName\": \"borrow_record\"\n },\n {\n \"code\": \"my_reservation_page\",\n \"name\": \"我的预约\",\n \"menuCode\": \"my_reservations\",\n \"path\": \"/my-reservations\",\n \"pageType\": \"current_user_list\",\n \"tableName\": \"reservation\"\n },\n {\n \"code\": \"reader_profile_page\",\n \"name\": \"个人资料\",\n \"menuCode\": \"reader_profile\",\n \"path\": \"/profile\",\n \"pageType\": \"form\",\n \"tableName\": \"reader\"\n },\n {\n \"code\": \"notice_list_page\",\n \"name\": \"公告列表\",\n \"menuCode\": \"notices\",\n \"path\": \"/notices\",\n \"pageType\": \"list\",\n \"tableName\": \"notice\"\n },\n {\n \"code\": \"news_list_page\",\n \"name\": \"新闻列表\",\n \"menuCode\": \"news\",\n \"path\": \"/news\",\n \"pageType\": \"list\",\n \"tableName\": \"news\"\n }\n ],\n \"adminMenus\": [\n {\n \"code\": \"book_admin\",\n \"name\": \"图书管理\",\n \"path\": \"/admin/books\",\n \"pageCode\": \"book_admin_page\",\n \"tableName\": \"book_info\",\n \"pageType\": \"list\",\n \"requiresLogin\": true,\n \"visibleRoles\": [\"admin\"],\n \"dataScope\": \"ROLE\"\n },\n {\n \"code\": \"borrow_admin\",\n \"name\": \"借阅管理\",\n \"path\": \"/admin/borrows\",\n \"pageCode\": \"borrow_admin_page\",\n \"tableName\": \"borrow_record\",\n \"pageType\": \"list\",\n \"requiresLogin\": true,\n \"visibleRoles\": [\"admin\"],\n \"dataScope\": \"ROLE\"\n },\n {\n \"code\": \"reservation_admin\",\n \"name\": \"预约管理\",\n \"path\": \"/admin/reservations\",\n \"pageCode\": \"reservation_admin_page\",\n \"tableName\": \"reservation\",\n \"pageType\": \"list\",\n \"requiresLogin\": true,\n \"visibleRoles\": [\"admin\"],\n \"dataScope\": \"ROLE\"\n },\n {\n \"code\": \"reader_admin\",\n \"name\": \"读者管理\",\n \"path\": \"/admin/readers\",\n \"pageCode\": \"reader_admin_page\",\n \"tableName\": \"reader\",\n \"pageType\": \"list\",\n \"requiresLogin\": true,\n \"visibleRoles\": [\"admin\"],\n \"dataScope\": \"ROLE\"\n },\n {\n \"code\": \"carousel_admin\",\n \"name\": \"轮播图管理\",\n \"path\": \"/admin/carousels\",\n \"pageCode\": \"carousel_admin_page\",\n \"tableName\": \"carousel\",\n \"pageType\": \"list\",\n \"requiresLogin\": true,\n \"visibleRoles\": [\"admin\"],\n \"dataScope\": \"ROLE\"\n },\n {\n \"code\": \"notice_admin\",\n \"name\": \"公告管理\",\n \"path\": \"/admin/notices\",\n \"pageCode\": \"notice_admin_page\",\n \"tableName\": \"notice\",\n \"pageType\": \"list\",\n \"requiresLogin\": true,\n \"visibleRoles\": [\"admin\"],\n \"dataScope\": \"ROLE\"\n },\n {\n \"code\": \"news_admin\",\n \"name\": \"新闻管理\",\n \"path\": \"/admin/news\",\n \"pageCode\": \"news_admin_page\",\n \"tableName\": \"news\",\n \"pageType\": \"list\",\n \"requiresLogin\": true,\n \"visibleRoles\": [\"admin\"],\n \"dataScope\": \"ROLE\"\n },\n {\n \"code\": \"admin_profile\",\n \"name\": \"个人资料\",\n \"path\": \"/admin/profile\",\n \"pageCode\": \"admin_profile_page\",\n \"tableName\": \"admin\",\n \"pageType\": \"form\",\n \"requiresLogin\": true,\n \"visibleRoles\": [\"admin\"],\n \"dataScope\": \"ROLE\"\n }\n ],\n \"adminHomeDashboard\": {\n \"title\": \"运营总览\",\n \"description\": \"核心业务数据\",\n \"metrics\": [\n {\n \"label\": \"总图书数\",\n \"valueKey\": \"totalBooks\",\n \"semantic\": \"inventory\"\n },\n {\n \"label\": \"总借阅次数\",\n \"valueKey\": \"totalBorrows\",\n \"semantic\": \"order\"\n },\n {\n \"label\": \"当前借出\",\n \"valueKey\": \"currentBorrows\",\n \"semantic\": \"inventory\"\n },\n {\n \"label\": \"待处理预约\",\n \"valueKey\": \"pendingReservations\",\n \"semantic\": \"task\"\n }\n ],\n \"charts\": [\n {\n \"title\": \"借阅趋势\",\n \"type\": \"line\",\n \"dataSource\": {\n \"tableName\": \"borrow_record\",\n \"metricField\": \"count\",\n \"groupField\": \"month\"\n },\n \"semantic\": \"order\"\n },\n {\n \"title\": \"图书分类分布\",\n \"type\": \"pie\",\n \"dataSource\": {\n \"tableName\": \"book_info\",\n \"metricField\": \"count\",\n \"groupField\": \"category\"\n },\n \"semantic\": \"content\"\n }\n ]\n }\n}', '1', NULL, 30341, '2026-07-14 17:55:28');
INSERT INTO `factory_ai_stage_output` VALUES (119, 108, 106, 100, 'flow_config', '{\"mode\":\"generate\",\"projectName\":\"图书管理系统\",\"projectDescription\":\"功能:借书、还书、预约、取消预约\\n角色用户、管理员\\n其他模块轮播图、公告、新闻\",\"industryTemplate\":\"\",\"stylePreset\":\"dark-tech\",\"extraRequirements\":\"\",\"confirmedAppBlueprint\":{\"adminHomeDashboard\":{\"charts\":[{\"filters\":[],\"metrics\":[{\"aggregate\":\"count\",\"label\":\"借阅趋势\"}],\"semantic\":\"order\",\"title\":\"借阅趋势\",\"type\":\"line\"},{\"filters\":[],\"metrics\":[{\"aggregate\":\"count\",\"label\":\"图书分类分布\"}],\"semantic\":\"content\",\"title\":\"图书分类分布\",\"type\":\"pie\"}],\"description\":\"核心业务数据\",\"metrics\":[{\"aggregate\":\"count\",\"code\":\"totalBooks\",\"filters\":[],\"semantic\":\"inventory\"},{\"aggregate\":\"count\",\"code\":\"totalBorrows\",\"filters\":[],\"semantic\":\"order\"},{\"aggregate\":\"count\",\"code\":\"currentBorrows\",\"filters\":[],\"semantic\":\"inventory\"},{\"aggregate\":\"count\",\"code\":\"pendingReservations\",\"filters\":[],\"semantic\":\"task\"}],\"title\":\"运营总览\"},\"adminMenus\":[{\"code\":\"book_admin\",\"dataScope\":\"ROLE\",\"name\":\"图书管理\",\"pageCode\":\"book_admin_page\",\"pageType\":\"list\",\"path\":\"/admin/books\",\"requiresLogin\":true,\"tableName\":\"book_info\",\"visibleRoles\":[\"admin\"]},{\"code\":\"borrow_admin\",\"dataScope\":\"ROLE\",\"name\":\"借阅管理\",\"pageCode\":\"borrow_admin_page\",\"pageType\":\"list\",\"path\":\"/admin/borrows\",\"requiresLogin\":true,\"tableName\":\"borrow_record\",\"visibleRoles\":[\"admin\"]},{\"code\":\"reservation_admin\",\"dataScope\":\"ROLE\",\"name\":\"预约管理\",\"pageCode\":\"reservation_admin_page\",\"pageType\":\"list\",\"path\":\"/admin/reservations\",\"requiresLogin\":true,\"tableName\":\"reservation\",\"visibleRoles\":[\"admin\"]},{\"code\":\"reader_admin\",\"dataScope\":\"ROLE\",\"name\":\"读者管理\",\"pageCode\":\"reader_admin_page\",\"pageType\":\"list\",\"path\":\"/admin/readers\",\"requiresLogin\":true,\"tableName\":\"reader\",\"visibleRoles\":[\"admin\"]},{\"code\":\"carousel_admin\",\"dataScope\":\"ROLE\",\"name\":\"轮播图管理\",\"pageCode\":\"carousel_admin_page\",\"pageType\":\"list\",\"path\":\"/admin/carousels\",\"requiresLogin\":true,\"tableName\":\"carousel\",\"visibleRoles\":[\"admin\"]},{\"code\":\"notice_admin\",\"dataScope\":\"ROLE\",\"name\":\"公告管理\",\"pageCode\":\"notice_admin_page\",\"pageType\":\"list\",\"path\":\"/admin/notices\",\"requiresLogin\":true,\"tableName\":\"notice\",\"visibleRoles\":[\"admin\"]},{\"code\":\"news_admin\",\"dataScope\":\"ROLE\",\"name\":\"新闻管理\",\"pageCode\":\"news_admin_page\",\"pageType\":\"list\",\"path\":\"/admin/news\",\"requiresLogin\":true,\"tableName\":\"news\",\"visibleRoles\":[\"admin\"]},{\"code\":\"admin_profile\",\"dataScope\":\"ROLE\",\"name\":\"个人资料\",\"pageCode\":\"admin_profile_page\",\"pageType\":\"form\",\"path\":\"/admin/profile\",\"requiresLogin\":true,\"tableName\":\"admin\",\"visibleRoles\":[\"admin\"]}],\"frontendMenus\":[{\"code\":\"book_catalog\",\"dataScope\":\"PUBLIC\",\"name\":\"图书目录\",\"pageCode\":\"book_catalog_page\",\"pageType\":\"\",\"path\":\"/books\",\"requiresLogin\":false,\"tableName\":\"\",\"visibleRoles\":[]},{\"code\":\"my_borrows\",\"dataScope\":\"CURRENT_USER\",\"name\":\"我的借阅\",\"pageCode\":\"my_borrows_page\",\"pageType\":\"\",\"path\":\"/my-borrows\",\"requiresLogin\":true,\"tableName\":\"\",\"visibleRoles\":[\"reader\"]},{\"code\":\"my_reservations\",\"dataScope\":\"CURRENT_USER\",\"name\":\"我的预约\",\"pageCode\":\"my_reservation_page\",\"pageType\":\"\",\"path\":\"/my-reservations\",\"requiresLogin\":true,\"tableName\":\"\",\"visibleRoles\":[\"reader\"]},{\"code\":\"reader_profile\",\"dataScope\":\"CURRENT_USER\",\"name\":\"个人资料\",\"pageCode\":\"reader_profile_page\",\"pageType\":\"\",\"path\":\"/profile\",\"requiresLogin\":true,\"tableName\":\"\",\"visibleRoles\":[\"reader\"]},{\"code\":\"notices\",\"dataScope\":\"PUBLIC\",\"name\":\"公告\",\"pageCode\":\"notice_list_page\",\"pageType\":\"\",\"path\":\"/notices\",\"requiresLogin\":false,\"tableName\":\"\",\"visibleRoles\":[]},{\"code\":\"news\",\"dataScope\":\"PUBLIC\",\"name\":\"新闻\",\"pageCode\":\"news_list_page\",\"pageType\":\"\",\"path\":\"/news\",\"requiresLogin\":false,\"tableName\":\"\",\"visibleRoles\":[]}],\"frontendPages\":[{\"code\":\"book_catalog_page\",\"menuCode\":\"book_catalog\",\"name\":\"图书目录\",\"pageType\":\"list\",\"parentPageCode\":\"\",\"path\":\"/books\",\"tableName\":\"book_info\"},{\"code\":\"my_borrows_page\",\"menuCode\":\"my_borrows\",\"name\":\"我的借阅\",\"pageType\":\"current_user_list\",\"parentPageCode\":\"\",\"path\":\"/my-borrows\",\"tableName\":\"borrow_record\"},{\"code\":\"my_reservation_page\",\"menuCode\":\"my_reservations\",\"name\":\"我的预约\",\"pageType\":\"current_user_list\",\"parentPageCode\":\"\",\"path\":\"/my-reservations\",\"tableName\":\"reservation\"},{\"code\":\"reader_profile_page\",\"menuCode\":\"reader_profile\",\"name\":\"个人资料\",\"pageType\":\"form\",\"parentPageCode\":\"\",\"path\":\"/profile\",\"tableName\":\"reader\"},{\"code\":\"notice_list_page\",\"menuCode\":\"notices\",\"name\":\"公告列表\",\"pageType\":\"list\",\"parentPageCode\":\"\",\"path\":\"/notices\",\"tableName\":\"notice\"},{\"code\":\"news_list_page\",\"menuCode\":\"news\",\"name\":\"新闻列表\",\"pageType\":\"list\",\"parentPageCode\":\"\",\"path\":\"/news\",\"tableName\":\"news\"}],\"roles\":[{\"code\":\"admin\",\"description\":\"系统管理员,负责图书、借阅、预约、用户、轮播图、公告、新闻等管理\",\"name\":\"管理员\"},{\"code\":\"reader\",\"description\":\"普通用户,可借书、还书、预约图书、取消预约、查看公告和新闻\",\"name\":\"读者\"}]}}', '{\n \"version\": \"1.0\",\n \"code\": \"borrow_record_flow\",\n \"name\": \"借阅管理流程\",\n \"mainTable\": \"borrow_record\",\n \"statusField\": \"status\",\n \"notFoundMessage\": \"借阅记录不存在\",\n \"states\": [\n {\"code\": \"pending\", \"label\": \"待审核\"},\n {\"code\": \"borrowing\", \"label\": \"借阅中\"},\n {\"code\": \"returned\", \"label\": \"已归还\"},\n {\"code\": \"rejected\", \"label\": \"已拒绝\"}\n ],\n \"actions\": [\n {\n \"code\": \"approve\",\n \"name\": \"审核通过\",\n \"from\": \"pending\",\n \"to\": \"borrowing\",\n \"actor\": \"admin\",\n \"method\": \"POST\",\n \"path\": \"/borrow-record/approve\",\n \"invalidStateMessage\": \"当前状态不能审核\",\n \"successMessage\": \"审核成功\",\n \"audit\": {\"userField\": \"approve_user_id\", \"timeField\": \"approve_time\"},\n \"effects\": [\n {\n \"type\": \"decrease\",\n \"table\": \"book_info\",\n \"relationField\": \"book_id\",\n \"field\": \"stock\",\n \"amount\": \"1\",\n \"min\": \"0\",\n \"notFoundMessage\": \"图书不存在\",\n \"errorMessage\": \"图书库存不足\"\n }\n ],\n \"button\": {\n \"scope\": \"admin\",\n \"pageCode\": \"borrow_admin_page\",\n \"slot\": \"list.rowActions\",\n \"type\": \"success\",\n \"confirm\": \"确认审核通过吗?\",\n \"order\": 10\n }\n },\n {\n \"code\": \"reject\",\n \"name\": \"拒绝\",\n \"from\": \"pending\",\n \"to\": \"rejected\",\n \"actor\": \"admin\",\n \"method\": \"POST\",\n \"path\": \"/borrow-record/reject\",\n \"invalidStateMessage\": \"当前状态不能拒绝\",\n \"successMessage\": \"已拒绝\",\n \"audit\": {\"userField\": \"reject_user_id\", \"timeField\": \"reject_time\"},\n \"button\": {\n \"scope\": \"admin\",\n \"pageCode\": \"borrow_admin_page\",\n \"slot\": \"list.rowActions\",\n \"type\": \"danger\",\n \"confirm\": \"确认拒绝吗?\",\n \"order\": 20\n }\n },\n {\n \"code\": \"return\",\n \"name\": \"还书\",\n \"from\": \"borrowing\",\n \"to\": \"returned\",\n \"actor\": \"admin\",\n \"method\": \"POST\",\n \"path\": \"/borrow-record/return\",\n \"invalidStateMessage\": \"当前状态不能还书\",\n \"successMessage\": \"还书成功\",\n \"audit\": {\"userField\": \"return_user_id\", \"timeField\": \"return_time\"},\n \"effects\": [\n {\n \"type\": \"increase\",\n \"table\": \"book_info\",\n \"relationField\": \"book_id\",\n \"field\": \"stock\",\n \"amount\": \"1\",\n \"notFoundMessage\": \"图书不存在\"\n }\n ],\n \"button\": {\n \"scope\": \"admin\",\n \"pageCode\": \"borrow_admin_page\",\n \"slot\": \"list.rowActions\",\n \"type\": \"primary\",\n \"confirm\": \"确认还书吗?\",\n \"order\": 30\n }\n }\n ],\n \"metrics\": [\n {\"code\": \"total_borrows\", \"name\": \"总借阅数\", \"table\": \"borrow_record\", \"aggregate\": \"count\", \"field\": \"id\", \"unit\": \"条\"},\n {\"code\": \"current_borrows\", \"name\": \"当前借阅数\", \"table\": \"borrow_record\", \"aggregate\": \"count\", \"field\": \"id\", \"status\": \"borrowing\", \"unit\": \"条\"}\n ]\n}', '1', NULL, 61023, '2026-07-14 17:56:29');
INSERT INTO `factory_ai_stage_output` VALUES (120, 108, 106, 100, 'database', '{\"mode\":\"generate\",\"projectName\":\"图书管理系统\",\"projectDescription\":\"功能:借书、还书、预约、取消预约\\n角色用户、管理员\\n其他模块轮播图、公告、新闻\",\"industryTemplate\":\"\",\"stylePreset\":\"dark-tech\",\"extraRequirements\":\"\",\"confirmedAppBlueprint\":{\"adminHomeDashboard\":{\"charts\":[{\"filters\":[],\"metrics\":[{\"aggregate\":\"count\",\"label\":\"借阅趋势\"}],\"semantic\":\"order\",\"title\":\"借阅趋势\",\"type\":\"line\"},{\"filters\":[],\"metrics\":[{\"aggregate\":\"count\",\"label\":\"图书分类分布\"}],\"semantic\":\"content\",\"title\":\"图书分类分布\",\"type\":\"pie\"}],\"description\":\"核心业务数据\",\"metrics\":[{\"aggregate\":\"count\",\"code\":\"totalBooks\",\"filters\":[],\"semantic\":\"inventory\"},{\"aggregate\":\"count\",\"code\":\"totalBorrows\",\"filters\":[],\"semantic\":\"order\"},{\"aggregate\":\"count\",\"code\":\"currentBorrows\",\"filters\":[],\"semantic\":\"inventory\"},{\"aggregate\":\"count\",\"code\":\"pendingReservations\",\"filters\":[],\"semantic\":\"task\"}],\"title\":\"运营总览\"},\"adminMenus\":[{\"code\":\"book_admin\",\"dataScope\":\"ROLE\",\"name\":\"图书管理\",\"pageCode\":\"book_admin_page\",\"pageType\":\"list\",\"path\":\"/admin/books\",\"requiresLogin\":true,\"tableName\":\"book_info\",\"visibleRoles\":[\"admin\"]},{\"code\":\"borrow_admin\",\"dataScope\":\"ROLE\",\"name\":\"借阅管理\",\"pageCode\":\"borrow_admin_page\",\"pageType\":\"list\",\"path\":\"/admin/borrows\",\"requiresLogin\":true,\"tableName\":\"borrow_record\",\"visibleRoles\":[\"admin\"]},{\"code\":\"reservation_admin\",\"dataScope\":\"ROLE\",\"name\":\"预约管理\",\"pageCode\":\"reservation_admin_page\",\"pageType\":\"list\",\"path\":\"/admin/reservations\",\"requiresLogin\":true,\"tableName\":\"reservation\",\"visibleRoles\":[\"admin\"]},{\"code\":\"reader_admin\",\"dataScope\":\"ROLE\",\"name\":\"读者管理\",\"pageCode\":\"reader_admin_page\",\"pageType\":\"list\",\"path\":\"/admin/readers\",\"requiresLogin\":true,\"tableName\":\"reader\",\"visibleRoles\":[\"admin\"]},{\"code\":\"carousel_admin\",\"dataScope\":\"ROLE\",\"name\":\"轮播图管理\",\"pageCode\":\"carousel_admin_page\",\"pageType\":\"list\",\"path\":\"/admin/carousels\",\"requiresLogin\":true,\"tableName\":\"carousel\",\"visibleRoles\":[\"admin\"]},{\"code\":\"notice_admin\",\"dataScope\":\"ROLE\",\"name\":\"公告管理\",\"pageCode\":\"notice_admin_page\",\"pageType\":\"list\",\"path\":\"/admin/notices\",\"requiresLogin\":true,\"tableName\":\"notice\",\"visibleRoles\":[\"admin\"]},{\"code\":\"news_admin\",\"dataScope\":\"ROLE\",\"name\":\"新闻管理\",\"pageCode\":\"news_admin_page\",\"pageType\":\"list\",\"path\":\"/admin/news\",\"requiresLogin\":true,\"tableName\":\"news\",\"visibleRoles\":[\"admin\"]},{\"code\":\"admin_profile\",\"dataScope\":\"ROLE\",\"name\":\"个人资料\",\"pageCode\":\"admin_profile_page\",\"pageType\":\"form\",\"path\":\"/admin/profile\",\"requiresLogin\":true,\"tableName\":\"admin\",\"visibleRoles\":[\"admin\"]}],\"frontendMenus\":[{\"code\":\"book_catalog\",\"dataScope\":\"PUBLIC\",\"name\":\"图书目录\",\"pageCode\":\"book_catalog_page\",\"pageType\":\"\",\"path\":\"/books\",\"requiresLogin\":false,\"tableName\":\"\",\"visibleRoles\":[]},{\"code\":\"my_borrows\",\"dataScope\":\"CURRENT_USER\",\"name\":\"我的借阅\",\"pageCode\":\"my_borrows_page\",\"pageType\":\"\",\"path\":\"/my-borrows\",\"requiresLogin\":true,\"tableName\":\"\",\"visibleRoles\":[\"reader\"]},{\"code\":\"my_reservations\",\"dataScope\":\"CURRENT_USER\",\"name\":\"我的预约\",\"pageCode\":\"my_reservation_page\",\"pageType\":\"\",\"path\":\"/my-reservations\",\"requiresLogin\":true,\"tableName\":\"\",\"visibleRoles\":[\"reader\"]},{\"code\":\"reader_profile\",\"dataScope\":\"CURRENT_USER\",\"name\":\"个人资料\",\"pageCode\":\"reader_profile_page\",\"pageType\":\"\",\"path\":\"/profile\",\"requiresLogin\":true,\"tableName\":\"\",\"visibleRoles\":[\"reader\"]},{\"code\":\"notices\",\"dataScope\":\"PUBLIC\",\"name\":\"公告\",\"pageCode\":\"notice_list_page\",\"pageType\":\"\",\"path\":\"/notices\",\"requiresLogin\":false,\"tableName\":\"\",\"visibleRoles\":[]},{\"code\":\"news\",\"dataScope\":\"PUBLIC\",\"name\":\"新闻\",\"pageCode\":\"news_list_page\",\"pageType\":\"\",\"path\":\"/news\",\"requiresLogin\":false,\"tableName\":\"\",\"visibleRoles\":[]}],\"frontendPages\":[{\"code\":\"book_catalog_page\",\"menuCode\":\"book_catalog\",\"name\":\"图书目录\",\"pageType\":\"list\",\"parentPageCode\":\"\",\"path\":\"/books\",\"tableName\":\"book_info\"},{\"code\":\"my_borrows_page\",\"menuCode\":\"my_borrows\",\"name\":\"我的借阅\",\"pageType\":\"current_user_list\",\"parentPageCode\":\"\",\"path\":\"/my-borrows\",\"tableName\":\"borrow_record\"},{\"code\":\"my_reservation_page\",\"menuCode\":\"my_reservations\",\"name\":\"我的预约\",\"pageType\":\"current_user_list\",\"parentPageCode\":\"\",\"path\":\"/my-reservations\",\"tableName\":\"reservation\"},{\"code\":\"reader_profile_page\",\"menuCode\":\"reader_profile\",\"name\":\"个人资料\",\"pageType\":\"form\",\"parentPageCode\":\"\",\"path\":\"/profile\",\"tableName\":\"reader\"},{\"code\":\"notice_list_page\",\"menuCode\":\"notices\",\"name\":\"公告列表\",\"pageType\":\"list\",\"parentPageCode\":\"\",\"path\":\"/notices\",\"tableName\":\"notice\"},{\"code\":\"news_list_page\",\"menuCode\":\"news\",\"name\":\"新闻列表\",\"pageType\":\"list\",\"parentPageCode\":\"\",\"path\":\"/news\",\"tableName\":\"news\"}],\"roles\":[{\"code\":\"admin\",\"description\":\"系统管理员,负责图书、借阅、预约、用户、轮播图、公告、新闻等管理\",\"name\":\"管理员\"},{\"code\":\"reader\",\"description\":\"普通用户,可借书、还书、预约图书、取消预约、查看公告和新闻\",\"name\":\"读者\"}]},\"flowConfig\":{\"actions\":[{\"actor\":\"admin\",\"audit\":{\"timeField\":\"approve_time\",\"userField\":\"approve_user_id\"},\"button\":{\"confirm\":\"确认审核通过吗?\",\"order\":10,\"pageCode\":\"borrow_admin_page\",\"scope\":\"admin\",\"slot\":\"list.rowActions\",\"type\":\"success\"},\"code\":\"approve\",\"effects\":[{\"amount\":\"1\",\"errorMessage\":\"图书库存不足\",\"field\":\"stock\",\"min\":\"0\",\"notFoundMessage\":\"图书不存在\",\"relationField\":\"book_id\",\"table\":\"book_info\",\"type\":\"decrease\",\"values\":{}}],\"from\":\"pending\",\"invalidStateMessage\":\"当前状态不能审核\",\"method\":\"POST\",\"name\":\"审核通过\",\"path\":\"/borrow-record/approve\",\"successMessage\":\"审核成功\",\"to\":\"borrowing\"},{\"actor\":\"admin\",\"audit\":{\"timeField\":\"reject_time\",\"userField\":\"reject_user_id\"},\"button\":{\"confirm\":\"确认拒绝吗?\",\"order\":20,\"pageCode\":\"borrow_admin_page\",\"scope\":\"admin\",\"slot\":\"list.rowActions\",\"type\":\"danger\"},\"code\":\"reject\",\"effects\":[],\"from\":\"pending\",\"invalidStateMessage\":\"当前状态不能拒绝\",\"method\":\"POST\",\"name\":\"拒绝\",\"path\":\"/borrow-record/reject\",\"successMessage\":\"已拒绝\",\"to\":\"rejected\"},{\"actor\":\"admin\",\"audit\":{\"timeField\":\"return_time\",\"userField\":\"return_user_id\"},\"button\":{\"confirm\":\"确认还书吗?\",\"order\":30,\"pageCode\":\"borrow_admin_page\",\"scope\":\"admin\",\"slot\":\"list.rowActions\",\"type\":\"primary\"},\"code\":\"return\",\"effects\":[{\"amount\":\"1\",\"field\":\"stock\",\"min\":\"0\",\"notFoundMessage\":\"图书不存在\",\"relationField\":\"book_id\",\"table\":\"book_info\",\"type\":\"increase\",\"values\":{}}],\"from\":\"borrowing\",\"invalidStateMessage\":\"当前状态不能还书\",\"method\":\"POST\",\"name\":\"还书\",\"path\":\"/borrow-record/return\",\"successMessage\":\"还书成功\",\"to\":\"returned\"}],\"code\":\"borrow_record_flow\",\"mainTable\":\"borrow_record\",\"metrics\":[{\"aggregate\":\"count\",\"code\":\"total_borrows\",\"field\":\"id\",\"name\":\"总借阅数\",\"table\":\"borrow_record\",\"unit\":\"条\"},{\"aggregate\":\"count\",\"code\":\"current_borrows\",\"field\":\"id\",\"name\":\"当前借阅数\",\"status\":\"borrowing\",\"table\":\"borrow_record\",\"unit\":\"条\"}],\"name\":\"借阅管理流程\",\"notFoundMessage\":\"借阅记录不存在\",\"states\":[{\"code\":\"pending\",\"label\":\"待审核\"},{\"code\":\"borrowing\",\"label\":\"借阅中\"},{\"code\":\"returned\",\"label\":\"已归还\"},{\"code\":\"rejected\",\"label\":\"已拒绝\"}],\"statusField\":\"status\",\"version\":\"1.0\"},\"compiledFlowContract\":{\"acceptanceScenarios\":[],\"actions\":[{\"actor\":\"admin\",\"code\":\"approve\",\"name\":\"审核通过\",\"ownerObject\":\"borrow_record\",\"ownerTable\":\"borrow_record\",\"preconditions\":[],\"quantityEffects\":[{\"actionCode\":\"approve\",\"amount\":\"1\",\"effectType\":\"decrease\",\"objectCode\":\"book_info\",\"quantityField\":\"stock\",\"tableName\":\"book_info\"}],\"recordEffects\":[],\"required\":true,\"stateTransitions\":[{\"actionCode\":\"approve\",\"fromState\":\"pending\",\"toState\":\"borrowing\"}]},{\"actor\":\"admin\",\"code\":\"reject\",\"name\":\"拒绝\",\"ownerObject\":\"borrow_record\",\"ownerTable\":\"borrow_record\",\"preconditions\":[],\"quantityEffects\":[],\"recordEffects\":[],\"required\":true,\"stateTransitions\":[{\"actionCode\":\"reject\",\"fromState\":\"pending\",\"toState\":\"rejected\"}]},{\"actor\":\"admin\",\"code\":\"return\",\"name\":\"还书\",\"ownerObject\":\"borrow_record\",\"ownerTable\":\"borrow_record\",\"preconditions\":[],\"quantityEffects\":[{\"actionCode\":\"return\",\"amount\":\"1\",\"effectType\":\"increase\",\"objectCode\":\"book_info\",\"quantityField\":\"stock\",\"tableName\":\"book_info\"}],\"recordEffects\":[],\"required\":true,\"stateTransitions\":[{\"actionCode\":\"return\",\"fromState\":\"borrowing\",\"toState\":\"returned\"}]}],\"businessPolicies\":[],\"coreObjects\":[{\"code\":\"borrow_record\",\"name\":\"借阅管理流程\",\"objectType\":\"main\",\"tableName\":\"borrow_record\"},{\"code\":\"book_info\",\"name\":\"book_info\",\"objectType\":\"related\",\"tableName\":\"book_info\"}],\"domainName\":\"借阅管理流程\",\"metrics\":[{\"aggregate\":\"count\",\"code\":\"total_borrows\",\"field\":\"id\",\"filters\":[],\"name\":\"总借阅数\",\"relatedActionCodes\":[],\"required\":true,\"tableName\":\"borrow_record\",\"unit\":\"条\"},{\"aggregate\":\"count\",\"code\":\"current_borrows\",\"field\":\"id\",\"filters\":[{\"field\":\"status\",\"operator\":\"eq\",\"values\":[\"borrowing\"]}],\"name\":\"当前借阅数\",\"relatedActionCodes\":[],\"required\":true,\"tableName\":\"borrow_record\",\"unit\":\"条\"}],\"pageBindings\":[{\"actionCode\":\"approve\",\"pageCode\":\"borrow_admin_page\",\"slot\":\"list.rowActions\",\"tableName\":\"borrow_record\",\"target\":\"admin\"},{\"actionCode\":\"reject\",\"pageCode\":\"borrow_admin_page\",\"slot\":\"list.rowActions\",\"tableName\":\"borrow_record\",\"target\":\"admin\"},{\"actionCode\":\"return\",\"pageCode\":\"borrow_admin_page\",\"slot\":\"list.rowActions\",\"tableName\":\"borrow_record\",\"target\":\"admin\"}],\"quantityRules\":[{\"actionCode\":\"approve\",\"amount\":\"1\",\"effectType\":\"decrease\",\"objectCode\":\"book_info\",\"quantityField\":\"stock\",\"tableName\":\"book_info\"},{\"actionCode\":\"return\",\"amount\":\"1\",\"effectType\":\"increase\",\"objectCode\":\"book_info\",\"quantityField\":\"stock\",\"tableName\":\"book_info\"}],\"recordRules\":[],\"stateMachines\":[{\"objectCode\":\"borrow_record\",\"states\":[\"pending\",\"borrowing\",\"returned\",\"rejected\"],\"statusField\":\"status\",\"tableName\":\"borrow_record\",\"transitions\":[{\"actionCode\":\"approve\",\"fromState\":\"pending\",\"toState\":\"borrowing\"},{\"actionCode\":\"reject\",\"fromState\":\"pending\",\"toState\":\"rejected\"},{\"actionCode\":\"return\",\"fromState\":\"borrowing\",\"toState\":\"returned\"}]}]},\"canonicalTableRegistry\":[\"book_info\",\"borrow_record\",\"reservation\",\"reader\",\"notice\",\"news\",\"carousel\",\"admin\"],\"limits\":{\"maxTables\":12,\"maxColumnsPerTable\":30}}', '{\n \"tables\": [\n {\n \"tableName\": \"book_info\",\n \"tableComment\": \"图书管理\",\n \"adminMenuName\": \"图书管理\",\n \"operations\": {\n \"add\": true,\n \"edit\": true,\n \"remove\": true,\n \"removeType\": \"physical\",\n \"reason\": \"\"\n },\n \"columns\": [\n {\n \"columnName\": \"id\",\n \"columnLabel\": \"ID\",\n \"columnComment\": \"主键ID\",\n \"columnType\": \"bigint(20)\",\n \"isPk\": \"1\",\n \"isIncrement\": \"1\",\n \"isRequired\": \"1\",\n \"javaType\": \"Long\",\n \"htmlType\": \"input\"\n },\n {\n \"columnName\": \"title\",\n \"columnLabel\": \"书名\",\n \"columnComment\": \"图书书名\",\n \"columnType\": \"varchar(200)\",\n \"isPk\": \"0\",\n \"isIncrement\": \"0\",\n \"isRequired\": \"1\",\n \"javaType\": \"String\",\n \"htmlType\": \"input\"\n },\n {\n \"columnName\": \"author\",\n \"columnLabel\": \"作者\",\n \"columnComment\": \"作者姓名\",\n \"columnType\": \"varchar(100)\",\n \"isPk\": \"0\",\n \"isIncrement\": \"0\",\n \"isRequired\": \"1\",\n \"javaType\": \"String\",\n \"htmlType\": \"input\"\n },\n {\n \"columnName\": \"isbn\",\n \"columnLabel\": \"ISBN\",\n \"columnComment\": \"国际标准书号\",\n \"columnType\": \"varchar(20)\",\n \"isPk\": \"0\",\n \"isIncrement\": \"0\",\n \"isRequired\": \"1\",\n \"javaType\": \"String\",\n \"htmlType\": \"input\"\n },\n {\n \"columnName\": \"publisher\",\n \"columnLabel\": \"出版社\",\n \"columnComment\": \"出版社名称\",\n \"columnType\": \"varchar(100)\",\n \"isPk\": \"0\",\n \"isIncrement\": \"0\",\n \"isRequired\": \"1\",\n \"javaType\": \"String\",\n \"htmlType\": \"input\"\n },\n {\n \"columnName\": \"publish_date\",\n \"columnLabel\": \"出版日期\",\n \"columnComment\": \"出版时间\",\n \"columnType\": \"date\",\n \"isPk\": \"0\",\n \"isIncrement\": \"0\",\n \"isRequired\": \"0\",\n \"javaType\": \"LocalDate\",\n \"htmlType\": \"datetime\"\n },\n {\n \"columnName\": \"category\",\n \"columnLabel\": \"分类\",\n \"columnComment\": \"图书分类,如文学、科技等\",\n \"columnType\": \"varchar(50)\",\n \"isPk\": \"0\",\n \"isIncrement\": \"0\",\n \"isRequired\": \"0\",\n \"javaType\": \"String\",\n \"htmlType\": \"select\",\n \"dictType\": \"local\",\n \"dictOptions\": [\n {\"label\": \"文学\", \"value\": \"literature\"},\n {\"label\": \"科技\", \"value\": \"technology\"},\n {\"label\": \"历史\", \"value\": \"history\"},\n {\"label\": \"哲学\", \"value\": \"philosophy\"},\n {\"label\": \"艺术\", \"value\": \"art\"}\n ]\n },\n {\n \"columnName\": \"stock\",\n \"columnLabel\": \"库存\",\n \"columnComment\": \"当前库存数量默认0\",\n \"columnType\": \"int(11)\",\n \"isPk\": \"0\",\n \"isIncrement\": \"0\",\n \"isRequired\": \"1\",\n \"javaType\": \"Integer\",\n \"htmlType\": \"input\",\n \"defaultValue\": \"0\"\n },\n {\n \"columnName\": \"description\",\n \"columnLabel\": \"简介\",\n \"columnComment\": \"图书简介\",\n \"columnType\": \"text\",\n \"isPk\": \"0\",\n \"isIncrement\": \"0\",\n \"isRequired\": \"0\",\n \"javaType\": \"String\",\n \"htmlType\": \"editor\"\n },\n {\n \"columnName\": \"cover_url\",\n \"columnLabel\": \"封面\",\n \"columnComment\": \"封面图片URL\",\n \"columnType\": \"varchar(500)\",\n \"isPk\": \"0\",\n \"isIncrement\": \"0\",\n \"isRequired\": \"0\",\n \"javaType\": \"String\",\n \"htmlType\": \"imageUpload\"\n },\n {\n \"columnName\": \"status\",\n \"columnLabel\": \"状态\",\n \"columnComment\": \"上架/下架\",\n \"columnType\": \"varchar(20)\",\n \"isPk\": \"0\",\n \"isIncrement\": \"0\",\n \"isRequired\": \"1\",\n \"javaType\": \"String\",\n \"htmlType\": \"select\",\n \"dictType\": \"local\",\n \"dictOptions\": [\n {\"label\": \"上架\", \"value\": \"active\"},\n {\"label\": \"下架\", \"value\": \"inactive\"}\n ],\n \"defaultValue\": \"active\"\n },\n {\n \"columnName\": \"create_time\",\n \"columnLabel\": \"创建时间\",\n \"columnComment\": \"记录创建时间\",\n \"columnType\": \"datetime\",\n \"isPk\": \"0\",\n \"isIncrement\": \"0\",\n \"isRequired\": \"0\",\n \"javaType\": \"LocalDateTime\",\n \"htmlType\": \"datetime\"\n },\n {\n \"columnName\": \"update_time\",\n \"columnLabel\": \"更新时间\",\n \"columnComment\": \"记录更新时间\",\n \"columnType\": \"datetime\",\n \"isPk\": \"0\",\n \"isIncrement\": \"0\",\n \"isRequired\": \"0\",\n \"javaType\": \"LocalDateTime\",\n \"htmlType\": \"datetime\"\n }\n ]\n },\n {\n \"tableName\": \"borrow_record\",\n \"tableComment\": \"借阅管理\",\n \"adminMenuName\": \"借阅管理\",\n \"operations\": {\n \"add\": true,\n \"edit\": false,\n \"remove\": false,\n \"removeType\": \"physical\",\n \"reason\": \"借阅记录不可编辑或删除\"\n },\n \"columns\": [\n {\n \"columnName\": \"id\",\n \"columnLabel\": \"ID\",\n \"columnComment\": \"主键ID\",\n \"columnType\": \"bigint(20)\",\n \"isPk\": \"1\",\n \"isIncrement\": \"1\",\n \"isRequired\": \"1\",\n \"javaType\": \"Long\",\n \"htmlType\": \"input\"\n },\n {\n \"columnName\": \"book_id\",\n \"columnLabel\": \"图书\",\n \"columnComment\": \"关联图书ID\",\n \"columnType\": \"bigint(20)\",\n \"isPk\": \"0\",\n \"isIncrement\": \"0\",\n \"isRequired\": \"1\",\n \"javaType\": \"Long\",\n \"htmlType\": \"select\",\n \"dictType\": \"remote:book_info:id:title\"\n },\n {\n \"columnName\": \"reader_id\",\n \"columnLabel\": \"读者\",\n \"columnComment\": \"关联读者ID\",\n \"columnType\": \"bigint(20)\",\n \"isPk\": \"0\",\n \"isIncrement\": \"0\",\n \"isRequired\": \"1\",\n \"javaType\": \"Long\",\n \"htmlType\": \"select\",\n \"dictType\": \"remote:reader:reader_id:username\"\n },\n {\n \"columnName\": \"borrow_date\",\n \"columnLabel\": \"借书日期\",\n \"columnComment\": \"借书时间\",\n \"columnType\": \"datetime\",\n \"isPk\": \"0\",\n \"isIncrement\": \"0\",\n \"isRequired\": \"1\",\n \"javaType\": \"LocalDateTime\",\n \"htmlType\": \"datetime\"\n },\n {\n \"columnName\": \"due_date\",\n \"columnLabel\": \"应还日期\",\n \"columnComment\": \"应还书时间\",\n \"columnType\": \"datetime\",\n \"isPk\": \"0\",\n \"isIncrement\": \"0\",\n \"isRequired\": \"1\",\n \"javaType\": \"LocalDateTime\",\n \"htmlType\": \"datetime\"\n },\n {\n \"columnName\": \"return_date\",\n \"columnLabel\": \"实际归还\",\n \"columnComment\": \"实际归还日期,空表示未还\",\n \"columnType\": \"datetime\",\n \"isPk\": \"0\",\n \"isIncrement\": \"0\",\n \"isRequired\": \"0\",\n \"javaType\": \"LocalDateTime\",\n \"htmlType\": \"datetime\"\n },\n {\n \"columnName\": \"status\",\n \"columnLabel\": \"状态\",\n \"columnComment\": \"借阅状态pending, borrowing, returned, rejected\",\n \"columnType\": \"varchar(20)\",\n \"isPk\": \"0\",\n \"isIncrement\": \"0\",\n \"isRequired\": \"1\",\n \"javaType\": \"String\",\n \"htmlType\": \"select\",\n \"dictType\": \"local\",\n \"dictOptions\": [\n {\"label\": \"待审核\", \"value\": \"pending\"},\n {\"label\": \"借阅中\", \"value\": \"borrowing\"},\n {\"label\": \"已归还\", \"value\": \"returned\"},\n {\"label\": \"已拒绝\", \"value\": \"rejected\"}\n ],\n \"defaultValue\": \"pending\"\n },\n {\n \"columnName\": \"approve_time\",\n \"columnLabel\": \"审核时间\",\n \"columnComment\": \"管理员审核通过时间\",\n \"columnType\": \"datetime\",\n \"isPk\": \"0\",\n \"isIncrement\": \"0\",\n \"isRequired\": \"0\",\n \"javaType\": \"LocalDateTime\",\n \"htmlType\": \"datetime\"\n },\n {\n \"columnName\": \"approve_user_id\",\n \"columnLabel\": \"审核人\",\n \"columnComment\": \"审核管理员ID\",\n \"columnType\": \"bigint(20)\",\n \"isPk\": \"0\",\n \"isIncrement\": \"0\",\n \"isRequired\": \"0\",\n \"javaType\": \"Long\",\n \"htmlType\": \"select\",\n \"dictType\": \"remote:admin:admin_id:username\"\n },\n {\n \"columnName\": \"reject_time\",\n \"columnLabel\": \"拒绝时间\",\n \"columnComment\": \"管理员拒绝时间\",\n \"columnType\": \"datetime\",\n \"isPk\": \"0\",\n \"isIncrement\": \"0\",\n \"isRequired\": \"0\",\n \"javaType\": \"LocalDateTime\",\n \"htmlType\": \"datetime\"\n },\n {\n \"columnName\": \"reject_user_id\",\n \"columnLabel\": \"拒绝人\",\n \"columnComment\": \"拒绝管理员ID\",\n \"columnType\": \"bigint(20)\",\n \"isPk\": \"0\",\n \"isIncrement\": \"0\",\n \"isRequired\": \"0\",\n \"javaType\": \"Long\",\n \"htmlType\": \"select\",\n \"dictType\": \"remote:admin:admin_id:username\"\n },\n {\n \"columnName\": \"return_time\",\n \"columnLabel\": \"还书操作时间\",\n \"columnComment\": \"管理员执行还书操作的时间\",\n \"columnType\": \"datetime\",\n \"isPk\": \"0\",\n \"isIncrement\": \"0\",\n \"isRequired\": \"0\",\n \"javaType\": \"LocalDateTime\",\n \"htmlType\": \"datetime\"\n },\n {\n \"columnName\": \"return_user_id\",\n \"columnLabel\": \"还书经办人\",\n \"columnComment\": \"执行还书操作的管理员ID\",\n \"columnType\": \"bigint(20)\",\n \"isPk\": \"0\",\n \"isIncrement\": \"0\",\n \"isRequired\": \"0\",\n \"javaType\": \"Long\",\n \"htmlType\": \"select\",\n \"dictType\": \"remote:admin:admin_id:username\"\n },\n {\n \"columnName\": \"create_time\",\n \"columnLabel\": \"创建时间\",\n \"columnComment\": \"记录创建时间\",\n \"columnType\": \"datetime\",\n \"isPk\": \"0\",\n \"isIncrement\": \"0\",\n \"isRequired\": \"0\",\n \"javaType\": \"LocalDateTime\",\n \"htmlType\": \"datetime\"\n },\n {\n \"columnName\": \"update_time\",\n \"columnLabel\": \"更新时间\",\n \"columnComment\": \"记录更新时间\",\n \"columnType\": \"datetime\",\n \"isPk\": \"0\",\n \"isIncrement\": \"0\",\n \"isRequired\": \"0\",\n \"javaType\": \"LocalDateTime\",\n \"htmlType\": \"datetime\"\n }\n ]\n },\n {\n \"tableName\": \"reservation\",\n \"tableComment\": \"预约管理\",\n \"adminMenuName\": \"预约管理\",\n \"operations\": {\n \"add\": true,\n \"edit\": false,\n \"remove\": false,\n \"removeType\": \"physical\",\n \"reason\": \"预约记录不可编辑或删除\"\n },\n \"columns\": [\n {\n \"columnName\": \"id\",\n \"columnLabel\": \"ID\",\n \"columnComment\": \"主键ID\",\n \"columnType\": \"bigint(20)\",\n \"isPk\": \"1\",\n \"isIncrement\": \"1\",\n \"isRequired\": \"1\",\n \"javaType\": \"Long\",\n \"htmlType\": \"input\"\n },\n {\n \"columnName\": \"book_id\",\n \"columnLabel\": \"图书\",\n \"columnComment\": \"关联图书ID\",\n \"columnType\": \"bigint(20)\",\n \"isPk\": \"0\",\n \"isIncrement\": \"0\",\n \"isRequired\": \"1\",\n \"javaType\": \"Long\",\n \"htmlType\": \"select\",\n \"dictType\": \"remote:book_info:id:title\"\n },\n {\n \"columnName\": \"reader_id\",\n \"columnLabel\": \"读者\",\n \"columnComment\": \"关联读者ID\",\n \"columnType\": \"bigint(20)\",\n \"isPk\": \"0\",\n \"isIncrement\": \"0\",\n \"isRequired\": \"1\",\n \"javaType\": \"Long\",\n \"htmlType\": \"select\",\n \"dictType\": \"remote:reader:reader_id:username\"\n },\n {\n \"columnName\": \"reservation_date\",\n \"columnLabel\": \"预约时间\",\n \"columnComment\": \"读者预约时间\",\n \"columnType\": \"datetime\",\n \"isPk\": \"0\",\n \"isIncrement\": \"0\",\n \"isRequired\": \"1\",\n \"javaType\": \"LocalDateTime\",\n \"htmlType\": \"datetime\"\n },\n {\n \"columnName\": \"status\",\n \"columnLabel\": \"状态\",\n \"columnComment\": \"预约状态pending(待取书), fulfilled(已借出), cancelled(已取消)\",\n \"columnType\": \"varchar(20)\",\n \"isPk\": \"0\",\n \"isIncrement\": \"0\",\n \"isRequired\": \"1\",\n \"javaType\": \"String\",\n \"htmlType\": \"select\",\n \"dictType\": \"local\",\n \"dictOptions\": [\n {\"label\": \"待取书\", \"value\": \"pending\"},\n {\"label\": \"已借出\", \"value\": \"fulfilled\"},\n {\"label\": \"已取消\", \"value\": \"cancelled\"}\n ],\n \"defaultValue\": \"pending\"\n },\n {\n \"columnName\": \"create_time\",\n \"columnLabel\": \"创建时间\",\n \"columnComment\": \"记录创建时间\",\n \"columnType\": \"datetime\",\n \"isPk\": \"0\",\n \"isIncrement\": \"0\",\n \"isRequired\": \"0\",\n \"javaType\": \"LocalDateTime\",\n \"htmlType\": \"datetime\"\n },\n {\n \"columnName\": \"update_time\",\n \"columnLabel\": \"更新时间\",\n \"columnComment\": \"记录更新时间\",\n \"columnType\": \"datetime\",\n \"isPk\": \"0\",\n \"isIncrement\": \"0\",\n \"isRequired\": \"0\",\n \"javaType\": \"LocalDateTime\",\n \"htmlType\": \"datetime\"\n }\n ]\n },\n {\n \"tableName\": \"reader\",\n \"tableComment\": \"读者管理\",\n \"adminMenuName\": \"读者管理\",\n \"operations\": {\n \"add\": true,\n \"edit\": true,\n \"remove\": true,\n \"removeType\": \"physical\",\n \"reason\": \"\"\n },\n \"columns\": [\n {\n \"columnName\": \"reader_id\",\n \"columnLabel\": \"读者ID\",\n \"columnComment\": \"主键ID读者账号标识\",\n \"columnType\": \"bigint(20)\",\n \"isPk\": \"1\",\n \"isIncrement\": \"1\",\n \"isRequired\": \"1\",\n \"javaType\": \"Long\",\n \"htmlType\": \"input\"\n },\n {\n \"columnName\": \"username\",\n \"columnLabel\": \"用户名\",\n \"columnComment\": \"登录用户名\",\n \"columnType\": \"varchar(50)\",\n \"isPk\": \"0\",\n \"isIncrement\": \"0\",\n \"isRequired\": \"1\",\n \"javaType\": \"String\",\n \"htmlType\": \"input\"\n },\n {\n \"columnName\": \"password_hash\",\n \"columnLabel\": \"密码\",\n \"columnComment\": \"经过哈希加密的密码\",\n \"columnType\": \"varchar(255)\",\n \"isPk\": \"0\",\n \"isIncrement\": \"0\",\n \"isRequired\": \"1\",\n \"javaType\": \"String\",\n \"htmlType\": \"input\"\n },\n {\n \"columnName\": \"nickname\",\n \"columnLabel\": \"昵称\",\n \"columnComment\": \"显示昵称\",\n \"columnType\": \"varchar(100)\",\n \"isPk\": \"0\",\n \"isIncrement\": \"0\",\n \"isRequired\": \"1\",\n \"javaType\": \"String\",\n \"htmlType\": \"input\"\n },\n {\n \"columnName\": \"email\",\n \"columnLabel\": \"邮箱\",\n \"columnComment\": \"电子邮箱\",\n \"columnType\": \"varchar(100)\",\n \"isPk\": \"0\",\n \"isIncrement\": \"0\",\n \"isRequired\": \"0\",\n \"javaType\": \"String\",\n \"htmlType\": \"input\"\n },\n {\n \"columnName\": \"phone\",\n \"columnLabel\": \"手机号\",\n \"columnComment\": \"手机号码\",\n \"columnType\": \"varchar(20)\",\n \"isPk\": \"0\",\n \"isIncrement\": \"0\",\n \"isRequired\": \"0\",\n \"javaType\": \"String\",\n \"htmlType\": \"input\"\n },\n {\n \"columnName\": \"gender\",\n \"columnLabel\": \"性别\",\n \"columnComment\": \"性别male/female/unknown\",\n \"columnType\": \"varchar(10)\",\n \"isPk\": \"0\",\n \"isIncrement\": \"0\",\n \"isRequired\": \"0\",\n \"javaType\": \"String\",\n \"htmlType\": \"select\",\n \"dictType\": \"local\",\n \"dictOptions\": [\n {\"label\": \"男\", \"value\": \"male\"},\n {\"label\": \"女\", \"value\": \"female\"},\n {\"label\": \"保密\", \"value\": \"unknown\"}\n ]\n },\n {\n \"columnName\": \"status\",\n \"columnLabel\": \"状态\",\n \"columnComment\": \"账号状态active正常disabled禁用\",\n \"columnType\": \"varchar(20)\",\n \"isPk\": \"0\",\n \"isIncrement\": \"0\",\n \"isRequired\": \"1\",\n \"javaType\": \"String\",\n \"htmlType\": \"select\",\n \"dictType\": \"local\",\n \"dictOptions\": [\n {\"label\": \"正常\", \"value\": \"active\"},\n {\"label\": \"禁用\", \"value\": \"disabled\"}\n ],\n \"defaultValue\": \"active\"\n },\n {\n \"columnName\": \"create_time\",\n \"columnLabel\": \"创建时间\",\n \"columnComment\": \"记录创建时间\",\n \"columnType\": \"datetime\",\n \"isPk\": \"0\",\n \"isIncrement\": \"0\",\n \"isRequired\": \"0\",\n \"javaType\": \"LocalDateTime\",\n \"htmlType\": \"datetime\"\n },\n {\n \"columnName\": \"update_time\",\n \"columnLabel\": \"更新时间\",\n \"columnComment\": \"记录更新时间\",\n \"columnType\": \"datetime\",\n \"isPk\": \"0\",\n \"isIncrement\": \"0\",\n \"isRequired\": \"0\",\n \"javaType\": \"LocalDateTime\",\n \"htmlType\": \"datetime\"\n }\n ]\n },\n {\n \"tableName\": \"notice\",\n \"tableComment\": \"公告管理\",\n \"adminMenuName\": \"公告管理\",\n \"operations\": {\n \"add\": true,\n \"edit\": true,\n \"remove\": true,\n \"removeType\": \"physical\",\n \"reason\": \"\"\n },\n \"columns\": [\n {\n \"columnName\": \"id\",\n \"columnLabel\": \"ID\",\n \"columnComment\": \"主键ID\",\n \"columnType\": \"bigint(20)\",\n \"isPk\": \"1\",\n \"isIncrement\": \"1\",\n \"isRequired\": \"1\",\n \"javaType\": \"Long\",\n \"htmlType\": \"input\"\n },\n {\n \"columnName\": \"title\",\n \"columnLabel\": \"标题\",\n \"columnComment\": \"公告标题\",\n \"columnType\": \"varchar(200)\",\n \"isPk\": \"0\",\n \"isIncrement\": \"0\",\n \"isRequired\": \"1\",\n \"javaType\": \"String\",\n \"htmlType\": \"input\"\n },\n {\n \"columnName\": \"content\",\n \"columnLabel\": \"内容\",\n \"columnComment\": \"公告正文\",\n \"columnType\": \"text\",\n \"isPk\": \"0\",\n \"isIncrement\": \"0\",\n \"isRequired\": \"1\",\n \"javaType\": \"String\",\n \"htmlType\": \"editor\"\n },\n {\n \"columnName\": \"publish_date\",\n \"columnLabel\": \"发布日期\",\n \"columnComment\": \"公告发布日期\",\n \"columnType\": \"datetime\",\n \"isPk\": \"0\",\n \"isIncrement\": \"0\",\n \"isRequired\": \"1\",\n \"javaType\": \"LocalDateTime\",\n \"htmlType\": \"datetime\"\n },\n {\n \"columnName\": \"status\",\n \"columnLabel\": \"状态\",\n \"columnComment\": \"发布状态published已发布draft草稿\",\n \"columnType\": \"varchar(20)\",\n \"isPk\": \"0\",\n \"isIncrement\": \"0\",\n \"isRequired\": \"1\",\n \"javaType\": \"String\",\n \"htmlType\": \"select\",\n \"dictType\": \"local\",\n \"dictOptions\": [\n {\"label\": \"已发布\", \"value\": \"published\"},\n {\"label\": \"草稿\", \"value\": \"draft\"}\n ],\n \"defaultValue\": \"published\"\n },\n {\n \"columnName\": \"create_time\",\n \"columnLabel\": \"创建时间\",\n \"columnComment\": \"记录创建时间\",\n \"columnType\": \"datetime\",\n \"isPk\": \"0\",\n \"isIncrement\": \"0\",\n \"isRequired\": \"0\",\n \"javaType\": \"LocalDateTime\",\n \"htmlType\": \"datetime\"\n },\n {\n \"columnName\": \"update_time\",\n \"columnLabel\": \"更新时间\",\n \"columnComment\": \"记录更新时间\",\n \"columnType\": \"datetime\",\n \"isPk\": \"0\",\n \"isIncrement\": \"0\",\n \"isRequired\": \"0\",\n \"javaType\": \"LocalDateTime\",\n \"htmlType\": \"datetime\"\n }\n ]\n },\n {\n \"tableName\": \"news\",\n \"tableComment\": \"新闻管理\",\n \"adminMenuName\": \"新闻管理\",\n \"operations\": {\n \"add\": true,\n \"edit\": true,\n \"remove\": true,\n \"removeType\": \"physical\",\n \"reason\": \"\"\n },\n \"columns\": [\n {\n \"columnName\": \"id\",\n \"columnLabel\": \"ID\",\n \"columnComment\": \"主键ID\",\n \"columnType\": \"bigint(20)\",\n \"isPk\": \"1\",\n \"isIncrement\": \"1\",\n \"isRequired\": \"1\",\n \"javaType\": \"Long\",\n \"htmlType\": \"input\"\n },\n {\n \"columnName\": \"title\",\n \"columnLabel\": \"标题\",\n \"columnComment\": \"新闻标题\",\n \"columnType\": \"varchar(200)\",\n \"isPk\": \"0\",\n \"isIncrement\": \"0\",\n \"isRequired\": \"1\",\n \"javaType\": \"String\",\n \"htmlType\": \"input\"\n },\n {\n \"columnName\": \"content\",\n \"columnLabel\": \"内容\",\n \"columnComment\": \"新闻正文\",\n \"columnType\": \"text\",\n \"isPk\": \"0\",\n \"isIncrement\": \"0\",\n \"isRequired\": \"1\",\n \"javaType\": \"String\",\n \"htmlType\": \"editor\"\n },\n {\n \"columnName\": \"publish_date\",\n \"columnLabel\": \"发布日期\",\n \"columnComment\": \"新闻发布日期\",\n \"columnType\": \"datetime\",\n \"isPk\": \"0\",\n \"isIncrement\": \"0\",\n \"isRequired\": \"1\",\n \"javaType\": \"LocalDateTime\",\n \"htmlType\": \"datetime\"\n },\n {\n \"columnName\": \"source\",\n \"columnLabel\": \"来源\",\n \"columnComment\": \"新闻来源\",\n \"columnType\": \"varchar(100)\",\n \"isPk\": \"0\",\n \"isIncrement\": \"0\",\n \"isRequired\": \"0\",\n \"javaType\": \"String\",\n \"htmlType\": \"input\"\n },\n {\n \"columnName\": \"author\",\n \"columnLabel\": \"作者\",\n \"columnComment\": \"新闻作者\",\n \"columnType\": \"varchar(100)\",\n \"isPk\": \"0\",\n \"isIncrement\": \"0\",\n \"isRequired\": \"0\",\n \"javaType\": \"String\",\n \"htmlType\": \"input\"\n },\n {\n \"columnName\": \"status\",\n \"columnLabel\": \"状态\",\n \"columnComment\": \"发布状态published已发布draft草稿\",\n \"columnType\": \"varchar(20)\",\n \"isPk\": \"0\",\n \"isIncrement\": \"0\",\n \"isRequired\": \"1\",\n \"javaType\": \"String\",\n \"htmlType\": \"select\",\n \"dictType\": \"local\",\n \"dictOptions\": [\n {\"label\": \"已发布\", \"value\": \"published\"},\n {\"label\": \"草稿\", \"value\": \"draft\"}\n ],\n \"defaultValue\": \"published\"\n },\n {\n \"columnName\": \"create_time\",\n \"columnLabel\": \"创建时间\",\n \"columnComment\": \"记录创建时间\",\n \"columnType\": \"datetime\",\n \"isPk\": \"0\",\n \"isIncrement\": \"0\",\n \"isRequired\": \"0\",\n \"javaType\": \"LocalDateTime\",\n \"htmlType\": \"datetime\"\n },\n {\n \"columnName\": \"update_time\",\n \"columnLabel\": \"更新时间\",\n \"columnComment\": \"记录更新时间\",\n \"columnType\": \"datetime\",\n \"isPk\": \"0\",\n \"isIncrement\": \"0\",\n \"isRequired\": \"0\",\n \"javaType\": \"LocalDateTime\",\n \"htmlType\": \"datetime\"\n }\n ]\n },\n {\n \"tableName\": \"carousel\",\n \"tableComment\": \"轮播图管理\",\n \"adminMenuName\": \"轮播图管理\",\n \"operations\": {\n \"add\": true,\n \"edit\": true,\n \"remove\": true,\n \"removeType\": \"physical\",\n \"reason\": \"\"\n },\n \"columns\": [\n {\n \"columnName\": \"id\",\n \"columnLabel\": \"ID\",\n \"columnComment\": \"主键ID\",\n \"columnType\": \"bigint(20)\",\n \"isPk\": \"1\",\n \"isIncrement\": \"1\",\n \"isRequired\": \"1\",\n \"javaType\": \"Long\",\n \"htmlType\": \"input\"\n },\n {\n \"columnName\": \"image_url\",\n \"columnLabel\": \"图片\",\n \"columnComment\": \"轮播图片URL\",\n \"columnType\": \"varchar(500)\",\n \"isPk\": \"0\",\n \"isIncrement\": \"0\",\n \"isRequired\": \"1\",\n \"javaType\": \"String\",\n \"htmlType\": \"imageUpload\"\n },\n {\n \"columnName\": \"link_url\",\n \"columnLabel\": \"链接\",\n \"columnComment\": \"点击跳转链接\",\n \"columnType\": \"varchar(500)\",\n \"isPk\": \"0\",\n \"isIncrement\": \"0\",\n \"isRequired\": \"0\",\n \"javaType\": \"String\",\n \"htmlType\": \"input\"\n },\n {\n \"columnName\": \"sort_order\",\n \"columnLabel\": \"排序\",\n \"columnComment\": \"显示顺序,数字越小越靠前\",\n \"columnType\": \"int(11)\",\n \"isPk\": \"0\",\n \"isIncrement\": \"0\",\n \"isRequired\": \"1\",\n \"javaType\": \"Integer\",\n \"htmlType\": \"input\",\n \"defaultValue\": \"0\"\n },\n {\n \"columnName\": \"title\",\n \"columnLabel\": \"标题\",\n \"columnComment\": \"轮播图标题(可选)\",\n \"columnType\": \"varchar(200)\",\n \"isPk\": \"0\",\n \"isIncrement\": \"0\",\n \"isRequired\": \"0\",\n \"javaType\": \"String\",\n \"htmlType\": \"input\"\n },\n {\n \"columnName\": \"status\",\n \"columnLabel\": \"状态\",\n \"columnComment\": \"显示状态show显示hide隐藏\",\n \"columnType\": \"varchar(20)\",\n \"isPk\": \"0\",\n \"isIncrement\": \"0\",\n \"isRequired\": \"1\",\n \"javaType\": \"String\",\n \"htmlType\": \"select\",\n \"dictType\": \"local\",\n \"dictOptions\": [\n {\"label\": \"显示\", \"value\": \"show\"},\n {\"label\": \"隐藏\", \"value\": \"hide\"}\n ],\n \"defaultValue\": \"show\"\n },\n {\n \"columnName\": \"create_time\",\n \"columnLabel\": \"创建时间\",\n \"columnComment\": \"记录创建时间\",\n \"columnType\": \"datetime\",\n \"isPk\": \"0\",\n \"isIncrement\": \"0\",\n \"isRequired\": \"0\",\n \"javaType\": \"LocalDateTime\",\n \"htmlType\": \"datetime\"\n },\n {\n \"columnName\": \"update_time\",\n \"columnLabel\": \"更新时间\",\n \"columnComment\": \"记录更新时间\",\n \"columnType\": \"datetime\",\n \"isPk\": \"0\",\n \"isIncrement\": \"0\",\n \"isRequired\": \"0\",\n \"javaType\": \"LocalDateTime\",\n \"htmlType\": \"datetime\"\n }\n ]\n },\n {\n \"tableName\": \"admin\",\n \"tableComment\": \"管理员账号\",\n \"adminMenuName\": \"管理员账号\",\n \"operations\": {\n \"add\": false,\n \"edit\": true,\n \"remove\": false,\n \"removeType\": \"physical\",\n \"reason\": \"管理员账号仅可编辑\"\n },\n \"columns\": [\n {\n \"columnName\": \"admin_id\",\n \"columnLabel\": \"管理员ID\",\n \"columnComment\": \"主键ID\",\n \"columnType\": \"bigint(20)\",\n \"isPk\": \"1\",\n \"isIncrement\": \"1\",\n \"isRequired\": \"1\",\n \"javaType\": \"Long\",\n \"htmlType\": \"input\"\n },\n {\n \"columnName\": \"username\",\n \"columnLabel\": \"用户名\",\n \"columnComment\": \"登录用户名\",\n \"columnType\": \"varchar(50)\",\n \"isPk\": \"0\",\n \"isIncrement\": \"0\",\n \"isRequired\": \"1\",\n \"javaType\": \"String\",\n \"htmlType\": \"input\"\n },\n {\n \"columnName\": \"password_hash\",\n \"columnLabel\": \"密码\",\n \"columnComment\": \"加密后的密码\",\n \"columnType\": \"varchar(255)\",\n \"isPk\": \"0\",\n \"isIncrement\": \"0\",\n \"isRequired\": \"1\",\n \"javaType\": \"String\",\n \"htmlType\": \"input\"\n },\n {\n \"columnName\": \"nickname\",\n \"columnLabel\": \"昵称\",\n \"columnComment\": \"管理员显示名称\",\n \"columnType\": \"varchar(100)\",\n \"isPk\": \"0\",\n \"isIncrement\": \"0\",\n \"isRequired\": \"1\",\n \"javaType\": \"String\",\n \"htmlType\": \"input\"\n },\n {\n \"columnName\": \"email\",\n \"columnLabel\": \"邮箱\",\n \"columnComment\": \"电子邮箱\",\n \"columnType\": \"varchar(100)\",\n \"isPk\": \"0\",\n \"isIncrement\": \"0\",\n \"isRequired\": \"0\",\n \"javaType\": \"String\",\n \"htmlType\": \"input\"\n },\n {\n \"columnName\": \"status\",\n \"columnLabel\": \"状态\",\n \"columnComment\": \"账号状态active正常disabled禁用\",\n \"columnType\": \"varchar(20)\",\n \"isPk\": \"0\",\n \"isIncrement\": \"0\",\n \"isRequired\": \"1\",\n \"javaType\": \"String\",\n \"htmlType\": \"select\",\n \"dictType\": \"local\",\n \"dictOptions\": [\n {\"label\": \"正常\", \"value\": \"active\"},\n {\"label\": \"禁用\", \"value\": \"disabled\"}\n ],\n \"defaultValue\": \"active\"\n },\n {\n \"columnName\": \"create_time\",\n \"columnLabel\": \"创建时间\",\n \"columnComment\": \"记录创建时间\",\n \"columnType\": \"datetime\",\n \"isPk\": \"0\",\n \"isIncrement\": \"0\",\n \"isRequired\": \"0\",\n \"javaType\": \"LocalDateTime\",\n \"htmlType\": \"datetime\"\n },\n {\n \"columnName\": \"update_time\",\n \"columnLabel\": \"更新时间\",\n \"columnComment\": \"记录更新时间\",\n \"columnType\": \"datetime\",\n \"isPk\": \"0\",\n \"isIncrement\": \"0\",\n \"isRequired\": \"0\",\n \"javaType\": \"LocalDateTime\",\n \"htmlType\": \"datetime\"\n }\n ]\n }\n ]\n}', '1', NULL, 65571, '2026-07-14 17:57:35');
INSERT INTO `factory_ai_stage_output` VALUES (121, 109, 106, 100, 'app_blueprint', '{\"projectName\":\"图书管理系统\",\"projectDescription\":\"功能:借书、还书、预约、取消预约\\n角色用户、管理员\\n其他模块轮播图、公告、新闻\",\"industryTemplate\":\"\",\"stylePreset\":\"dark-tech\",\"extraRequirements\":\"\"}', '{\n \"roles\": [\n {\n \"code\": \"admin\",\n \"name\": \"管理员\",\n \"description\": \"系统管理员,拥有所有后台管理权限\"\n },\n {\n \"code\": \"reader\",\n \"name\": \"读者\",\n \"description\": \"普通用户,可以借书、还书、预约、取消预约\"\n }\n ],\n \"frontendMenus\": [\n {\n \"code\": \"home\",\n \"name\": \"首页\",\n \"path\": \"/home\",\n \"pageCode\": \"home_page\",\n \"requiresLogin\": false,\n \"visibleRoles\": [],\n \"dataScope\": \"PUBLIC\"\n },\n {\n \"code\": \"book_catalog\",\n \"name\": \"图书目录\",\n \"path\": \"/books\",\n \"pageCode\": \"book_catalog_page\",\n \"requiresLogin\": false,\n \"visibleRoles\": [],\n \"dataScope\": \"PUBLIC\"\n },\n {\n \"code\": \"my_borrows\",\n \"name\": \"我的借阅\",\n \"path\": \"/my-borrows\",\n \"pageCode\": \"my_borrows_page\",\n \"requiresLogin\": true,\n \"visibleRoles\": [\"reader\"],\n \"dataScope\": \"CURRENT_USER\"\n },\n {\n \"code\": \"my_profile\",\n \"name\": \"个人资料\",\n \"path\": \"/my-profile\",\n \"pageCode\": \"my_profile_page\",\n \"requiresLogin\": true,\n \"visibleRoles\": [\"reader\"],\n \"dataScope\": \"CURRENT_USER\"\n }\n ],\n \"frontendPages\": [\n {\n \"code\": \"home_page\",\n \"name\": \"首页\",\n \"menuCode\": \"home\",\n \"path\": \"/home\",\n \"pageType\": \"list\",\n \"tableName\": \"banner\"\n },\n {\n \"code\": \"book_catalog_page\",\n \"name\": \"图书目录\",\n \"menuCode\": \"book_catalog\",\n \"path\": \"/books\",\n \"pageType\": \"list\",\n \"tableName\": \"book_info\"\n },\n {\n \"code\": \"book_detail_page\",\n \"name\": \"图书详情\",\n \"menuCode\": \"book_catalog\",\n \"path\": \"/books/:id\",\n \"pageType\": \"detail\",\n \"tableName\": \"book_info\"\n },\n {\n \"code\": \"my_borrows_page\",\n \"name\": \"我的借阅\",\n \"menuCode\": \"my_borrows\",\n \"path\": \"/my-borrows\",\n \"pageType\": \"current_user_list\",\n \"tableName\": \"borrow_record\"\n },\n {\n \"code\": \"my_profile_page\",\n \"name\": \"个人资料\",\n \"menuCode\": \"my_profile\",\n \"path\": \"/my-profile\",\n \"pageType\": \"form\",\n \"tableName\": \"reader\"\n }\n ],\n \"adminMenus\": [\n {\n \"code\": \"book_admin\",\n \"name\": \"图书管理\",\n \"path\": \"/admin/books\",\n \"pageCode\": \"book_admin_page\",\n \"tableName\": \"book_info\",\n \"pageType\": \"list\",\n \"requiresLogin\": true,\n \"visibleRoles\": [\"admin\"],\n \"dataScope\": \"ROLE\"\n },\n {\n \"code\": \"borrow_admin\",\n \"name\": \"借阅管理\",\n \"path\": \"/admin/borrows\",\n \"pageCode\": \"borrow_admin_page\",\n \"tableName\": \"borrow_record\",\n \"pageType\": \"list\",\n \"requiresLogin\": true,\n \"visibleRoles\": [\"admin\"],\n \"dataScope\": \"ROLE\"\n },\n {\n \"code\": \"banner_admin\",\n \"name\": \"轮播图管理\",\n \"path\": \"/admin/banners\",\n \"pageCode\": \"banner_admin_page\",\n \"tableName\": \"banner\",\n \"pageType\": \"list\",\n \"requiresLogin\": true,\n \"visibleRoles\": [\"admin\"],\n \"dataScope\": \"ROLE\"\n },\n {\n \"code\": \"notice_admin\",\n \"name\": \"公告管理\",\n \"path\": \"/admin/notices\",\n \"pageCode\": \"notice_admin_page\",\n \"tableName\": \"notice\",\n \"pageType\": \"list\",\n \"requiresLogin\": true,\n \"visibleRoles\": [\"admin\"],\n \"dataScope\": \"ROLE\"\n },\n {\n \"code\": \"news_admin\",\n \"name\": \"新闻管理\",\n \"path\": \"/admin/news\",\n \"pageCode\": \"news_admin_page\",\n \"tableName\": \"news\",\n \"pageType\": \"list\",\n \"requiresLogin\": true,\n \"visibleRoles\": [\"admin\"],\n \"dataScope\": \"ROLE\"\n }\n ],\n \"adminHomeDashboard\": {\n \"title\": \"运营总览\",\n \"description\": \"核心业务数据\",\n \"metrics\": [\n {\n \"label\": \"总图书数\",\n \"semantic\": \"inventory\",\n \"description\": \"馆藏图书总量\"\n },\n {\n \"label\": \"总借出数\",\n \"semantic\": \"order\",\n \"description\": \"当前正在借出的图书数量\"\n },\n {\n \"label\": \"总读者数\",\n \"semantic\": \"user\",\n \"description\": \"注册读者总数\"\n },\n {\n \"label\": \"待归还数\",\n \"semantic\": \"warning\",\n \"description\": \"已超期未归还的图书数量\"\n }\n ],\n \"charts\": [\n {\n \"title\": \"借阅趋势\",\n \"type\": \"line\",\n \"semantic\": \"order\",\n \"description\": \"每日借阅量变化趋势\"\n },\n {\n \"title\": \"图书分类分布\",\n \"type\": \"pie\",\n \"semantic\": \"content\",\n \"description\": \"各分类图书数量占比\"\n }\n ]\n }\n}', '1', NULL, 44529, '2026-07-14 19:48:57');
INSERT INTO `factory_ai_stage_output` VALUES (122, 109, 106, 100, 'flow_config', '{\"mode\":\"generate\",\"projectName\":\"图书管理系统\",\"projectDescription\":\"功能:借书、还书、预约、取消预约\\n角色用户、管理员\\n其他模块轮播图、公告、新闻\",\"industryTemplate\":\"\",\"stylePreset\":\"dark-tech\",\"extraRequirements\":\"\",\"confirmedAppBlueprint\":{\"adminHomeDashboard\":{\"charts\":[{\"filters\":[],\"metrics\":[{\"aggregate\":\"count\",\"label\":\"借阅趋势\"}],\"semantic\":\"order\",\"title\":\"借阅趋势\",\"type\":\"line\"},{\"filters\":[],\"metrics\":[{\"aggregate\":\"count\",\"label\":\"图书分类分布\"}],\"semantic\":\"content\",\"title\":\"图书分类分布\",\"type\":\"pie\"}],\"description\":\"核心业务数据\",\"metrics\":[{\"aggregate\":\"count\",\"filters\":[],\"semantic\":\"inventory\"},{\"aggregate\":\"count\",\"filters\":[],\"semantic\":\"order\"},{\"aggregate\":\"count\",\"filters\":[],\"semantic\":\"user\"},{\"aggregate\":\"count\",\"filters\":[],\"semantic\":\"warning\"}],\"title\":\"运营总览\"},\"adminMenus\":[{\"code\":\"book_admin\",\"dataScope\":\"ROLE\",\"name\":\"图书管理\",\"pageCode\":\"book_admin_page\",\"pageType\":\"list\",\"path\":\"/admin/books\",\"requiresLogin\":true,\"tableName\":\"book_info\",\"visibleRoles\":[\"admin\"]},{\"code\":\"borrow_admin\",\"dataScope\":\"ROLE\",\"name\":\"借阅管理\",\"pageCode\":\"borrow_admin_page\",\"pageType\":\"list\",\"path\":\"/admin/borrows\",\"requiresLogin\":true,\"tableName\":\"borrow_record\",\"visibleRoles\":[\"admin\"]},{\"code\":\"banner_admin\",\"dataScope\":\"ROLE\",\"name\":\"轮播图管理\",\"pageCode\":\"banner_admin_page\",\"pageType\":\"list\",\"path\":\"/admin/banners\",\"requiresLogin\":true,\"tableName\":\"banner\",\"visibleRoles\":[\"admin\"]},{\"code\":\"notice_admin\",\"dataScope\":\"ROLE\",\"name\":\"公告管理\",\"pageCode\":\"notice_admin_page\",\"pageType\":\"list\",\"path\":\"/admin/notices\",\"requiresLogin\":true,\"tableName\":\"notice\",\"visibleRoles\":[\"admin\"]},{\"code\":\"news_admin\",\"dataScope\":\"ROLE\",\"name\":\"新闻管理\",\"pageCode\":\"news_admin_page\",\"pageType\":\"list\",\"path\":\"/admin/news\",\"requiresLogin\":true,\"tableName\":\"news\",\"visibleRoles\":[\"admin\"]}],\"frontendMenus\":[{\"code\":\"home\",\"dataScope\":\"PUBLIC\",\"name\":\"首页\",\"pageCode\":\"home_page\",\"pageType\":\"\",\"path\":\"/home\",\"requiresLogin\":false,\"tableName\":\"\",\"visibleRoles\":[]},{\"code\":\"book_catalog\",\"dataScope\":\"PUBLIC\",\"name\":\"图书目录\",\"pageCode\":\"book_catalog_page\",\"pageType\":\"\",\"path\":\"/books\",\"requiresLogin\":false,\"tableName\":\"\",\"visibleRoles\":[]},{\"code\":\"my_borrows\",\"dataScope\":\"CURRENT_USER\",\"name\":\"我的借阅\",\"pageCode\":\"my_borrows_page\",\"pageType\":\"\",\"path\":\"/my-borrows\",\"requiresLogin\":true,\"tableName\":\"\",\"visibleRoles\":[\"reader\"]},{\"code\":\"my_profile\",\"dataScope\":\"CURRENT_USER\",\"name\":\"个人资料\",\"pageCode\":\"my_profile_page\",\"pageType\":\"\",\"path\":\"/my-profile\",\"requiresLogin\":true,\"tableName\":\"\",\"visibleRoles\":[\"reader\"]}],\"frontendPages\":[{\"code\":\"home_page\",\"menuCode\":\"home\",\"name\":\"首页\",\"pageType\":\"list\",\"parentPageCode\":\"\",\"path\":\"/home\",\"tableName\":\"banner\"},{\"code\":\"book_catalog_page\",\"menuCode\":\"book_catalog\",\"name\":\"图书目录\",\"pageType\":\"list\",\"parentPageCode\":\"\",\"path\":\"/books\",\"tableName\":\"book_info\"},{\"code\":\"book_detail_page\",\"menuCode\":\"book_catalog\",\"name\":\"图书详情\",\"pageType\":\"detail\",\"parentPageCode\":\"\",\"path\":\"/books/:id\",\"tableName\":\"book_info\"},{\"code\":\"my_borrows_page\",\"menuCode\":\"my_borrows\",\"name\":\"我的借阅\",\"pageType\":\"current_user_list\",\"parentPageCode\":\"\",\"path\":\"/my-borrows\",\"tableName\":\"borrow_record\"},{\"code\":\"my_profile_page\",\"menuCode\":\"my_profile\",\"name\":\"个人资料\",\"pageType\":\"form\",\"parentPageCode\":\"\",\"path\":\"/my-profile\",\"tableName\":\"reader\"}],\"roles\":[{\"code\":\"admin\",\"description\":\"系统管理员,拥有所有后台管理权限\",\"name\":\"管理员\"},{\"code\":\"reader\",\"description\":\"普通用户,可以借书、还书、预约、取消预约\",\"name\":\"读者\"}]}}', '{\n \"version\": \"1.0\",\n \"code\": \"borrow_flow\",\n \"name\": \"借阅流程\",\n \"mainTable\": \"borrow_record\",\n \"statusField\": \"status\",\n \"notFoundMessage\": \"借阅记录不存在\",\n \"states\": [\n {\"code\": \"init\", \"label\": \"初始\"},\n {\"code\": \"reserved\", \"label\": \"已预约\"},\n {\"code\": \"borrowing\", \"label\": \"借阅中\"},\n {\"code\": \"returned\", \"label\": \"已归还\"},\n {\"code\": \"cancelled\", \"label\": \"已取消\"}\n ],\n \"actions\": [\n {\n \"code\": \"reserve\",\n \"name\": \"预约图书\",\n \"from\": \"init\",\n \"to\": \"reserved\",\n \"actor\": \"reader\",\n \"method\": \"POST\",\n \"path\": \"/borrow-record/reserve\",\n \"invalidStateMessage\": \"该图书不可预约\",\n \"successMessage\": \"预约成功\",\n \"effects\": [\n {\n \"type\": \"create_record\",\n \"table\": \"borrow_record\",\n \"values\": {\n \"status\": \"reserved\",\n \"reader_id\": \"currentUserId\",\n \"book_id\": \"record.book_id\",\n \"borrow_date\": \"now\"\n }\n }\n ],\n \"button\": {\n \"scope\": \"reader\",\n \"pageCode\": \"book_detail_page\",\n \"slot\": \"page.actions\",\n \"type\": \"primary\",\n \"confirm\": \"确认预约该书?\",\n \"order\": 10\n }\n },\n {\n \"code\": \"cancel_reserve\",\n \"name\": \"取消预约\",\n \"from\": \"reserved\",\n \"to\": \"cancelled\",\n \"actor\": \"reader\",\n \"method\": \"POST\",\n \"path\": \"/borrow-record/cancel-reserve\",\n \"invalidStateMessage\": \"当前状态不能取消\",\n \"successMessage\": \"取消预约成功\",\n \"button\": {\n \"scope\": \"reader\",\n \"pageCode\": \"my_borrows_page\",\n \"slot\": \"list.rowActions\",\n \"type\": \"warning\",\n \"confirm\": \"确认取消预约?\",\n \"order\": 10\n }\n },\n {\n \"code\": \"lend\",\n \"name\": \"借出\",\n \"from\": \"reserved\",\n \"to\": \"borrowing\",\n \"actor\": \"admin\",\n \"method\": \"POST\",\n \"path\": \"/borrow-record/lend\",\n \"invalidStateMessage\": \"该记录已借出或已取消\",\n \"successMessage\": \"借出成功\",\n \"audit\": {\n \"userField\": \"approve_user_id\",\n \"timeField\": \"approve_time\"\n },\n \"effects\": [\n {\n \"type\": \"decrease\",\n \"table\": \"book_info\",\n \"relationField\": \"book_id\",\n \"field\": \"stock\",\n \"amount\": \"1\",\n \"min\": \"0\",\n \"notFoundMessage\": \"图书不存在\",\n \"errorMessage\": \"图书库存不足\"\n }\n ],\n \"button\": {\n \"scope\": \"admin\",\n \"pageCode\": \"borrow_admin_page\",\n \"slot\": \"list.rowActions\",\n \"type\": \"success\",\n \"confirm\": \"确认借出该书?\",\n \"order\": 10\n }\n },\n {\n \"code\": \"return_book\",\n \"name\": \"归还\",\n \"from\": \"borrowing\",\n \"to\": \"returned\",\n \"actor\": \"admin\",\n \"method\": \"POST\",\n \"path\": \"/borrow-record/return\",\n \"invalidStateMessage\": \"当前状态不能归还\",\n \"successMessage\": \"归还成功\",\n \"audit\": {\n \"userField\": \"return_user_id\",\n \"timeField\": \"return_time\"\n },\n \"effects\": [\n {\n \"type\": \"increase\",\n \"table\": \"book_info\",\n \"relationField\": \"book_id\",\n \"field\": \"stock\",\n \"amount\": \"1\",\n \"notFoundMessage\": \"图书不存在\"\n }\n ],\n \"button\": {\n \"scope\": \"admin\",\n \"pageCode\": \"borrow_admin_page\",\n \"slot\": \"list.rowActions\",\n \"type\": \"primary\",\n \"confirm\": \"确认归还该书?\",\n \"order\": 20\n }\n }\n ],\n \"metrics\": [\n {\n \"code\": \"borrowing_count\",\n \"name\": \"借阅中数量\",\n \"table\": \"borrow_record\",\n \"aggregate\": \"count\",\n \"field\": \"id\",\n \"status\": \"borrowing\",\n \"unit\": \"条\"\n },\n {\n \"code\": \"reserved_count\",\n \"name\": \"预约中数量\",\n \"table\": \"borrow_record\",\n \"aggregate\": \"count\",\n \"field\": \"id\",\n \"status\": \"reserved\",\n \"unit\": \"条\"\n },\n {\n \"code\": \"returned_count\",\n \"name\": \"已归还数量\",\n \"table\": \"borrow_record\",\n \"aggregate\": \"count\",\n \"field\": \"id\",\n \"status\": \"returned\",\n \"unit\": \"条\"\n },\n {\n \"code\": \"cancelled_count\",\n \"name\": \"已取消数量\",\n \"table\": \"borrow_record\",\n \"aggregate\": \"count\",\n \"field\": \"id\",\n \"status\": \"cancelled\",\n \"unit\": \"条\"\n },\n {\n \"code\": \"book_total\",\n \"name\": \"图书总数\",\n \"table\": \"book_info\",\n \"aggregate\": \"count\",\n \"field\": \"id\",\n \"unit\": \"本\"\n },\n {\n \"code\": \"book_stock_sum\",\n \"name\": \"总库存\",\n \"table\": \"book_info\",\n \"aggregate\": \"sum\",\n \"field\": \"stock\",\n \"unit\": \"本\"\n }\n ]\n}', '1', NULL, 68325, '2026-07-14 19:50:05');
INSERT INTO `factory_ai_stage_output` VALUES (123, 109, 106, 100, 'database', '{\"mode\":\"generate\",\"projectName\":\"图书管理系统\",\"projectDescription\":\"功能:借书、还书、预约、取消预约\\n角色用户、管理员\\n其他模块轮播图、公告、新闻\",\"industryTemplate\":\"\",\"stylePreset\":\"dark-tech\",\"extraRequirements\":\"\",\"confirmedAppBlueprint\":{\"adminHomeDashboard\":{\"charts\":[{\"filters\":[],\"metrics\":[{\"aggregate\":\"count\",\"label\":\"借阅趋势\"}],\"semantic\":\"order\",\"title\":\"借阅趋势\",\"type\":\"line\"},{\"filters\":[],\"metrics\":[{\"aggregate\":\"count\",\"label\":\"图书分类分布\"}],\"semantic\":\"content\",\"title\":\"图书分类分布\",\"type\":\"pie\"}],\"description\":\"核心业务数据\",\"metrics\":[{\"aggregate\":\"count\",\"filters\":[],\"semantic\":\"inventory\"},{\"aggregate\":\"count\",\"filters\":[],\"semantic\":\"order\"},{\"aggregate\":\"count\",\"filters\":[],\"semantic\":\"user\"},{\"aggregate\":\"count\",\"filters\":[],\"semantic\":\"warning\"}],\"title\":\"运营总览\"},\"adminMenus\":[{\"code\":\"book_admin\",\"dataScope\":\"ROLE\",\"name\":\"图书管理\",\"pageCode\":\"book_admin_page\",\"pageType\":\"list\",\"path\":\"/admin/books\",\"requiresLogin\":true,\"tableName\":\"book_info\",\"visibleRoles\":[\"admin\"]},{\"code\":\"borrow_admin\",\"dataScope\":\"ROLE\",\"name\":\"借阅管理\",\"pageCode\":\"borrow_admin_page\",\"pageType\":\"list\",\"path\":\"/admin/borrows\",\"requiresLogin\":true,\"tableName\":\"borrow_record\",\"visibleRoles\":[\"admin\"]},{\"code\":\"banner_admin\",\"dataScope\":\"ROLE\",\"name\":\"轮播图管理\",\"pageCode\":\"banner_admin_page\",\"pageType\":\"list\",\"path\":\"/admin/banners\",\"requiresLogin\":true,\"tableName\":\"banner\",\"visibleRoles\":[\"admin\"]},{\"code\":\"notice_admin\",\"dataScope\":\"ROLE\",\"name\":\"公告管理\",\"pageCode\":\"notice_admin_page\",\"pageType\":\"list\",\"path\":\"/admin/notices\",\"requiresLogin\":true,\"tableName\":\"notice\",\"visibleRoles\":[\"admin\"]},{\"code\":\"news_admin\",\"dataScope\":\"ROLE\",\"name\":\"新闻管理\",\"pageCode\":\"news_admin_page\",\"pageType\":\"list\",\"path\":\"/admin/news\",\"requiresLogin\":true,\"tableName\":\"news\",\"visibleRoles\":[\"admin\"]}],\"frontendMenus\":[{\"code\":\"home\",\"dataScope\":\"PUBLIC\",\"name\":\"首页\",\"pageCode\":\"home_page\",\"pageType\":\"\",\"path\":\"/home\",\"requiresLogin\":false,\"tableName\":\"\",\"visibleRoles\":[]},{\"code\":\"book_catalog\",\"dataScope\":\"PUBLIC\",\"name\":\"图书目录\",\"pageCode\":\"book_catalog_page\",\"pageType\":\"\",\"path\":\"/books\",\"requiresLogin\":false,\"tableName\":\"\",\"visibleRoles\":[]},{\"code\":\"my_borrows\",\"dataScope\":\"CURRENT_USER\",\"name\":\"我的借阅\",\"pageCode\":\"my_borrows_page\",\"pageType\":\"\",\"path\":\"/my-borrows\",\"requiresLogin\":true,\"tableName\":\"\",\"visibleRoles\":[\"reader\"]},{\"code\":\"my_profile\",\"dataScope\":\"CURRENT_USER\",\"name\":\"个人资料\",\"pageCode\":\"my_profile_page\",\"pageType\":\"\",\"path\":\"/my-profile\",\"requiresLogin\":true,\"tableName\":\"\",\"visibleRoles\":[\"reader\"]}],\"frontendPages\":[{\"code\":\"home_page\",\"menuCode\":\"home\",\"name\":\"首页\",\"pageType\":\"list\",\"parentPageCode\":\"\",\"path\":\"/home\",\"tableName\":\"banner\"},{\"code\":\"book_catalog_page\",\"menuCode\":\"book_catalog\",\"name\":\"图书目录\",\"pageType\":\"list\",\"parentPageCode\":\"\",\"path\":\"/books\",\"tableName\":\"book_info\"},{\"code\":\"book_detail_page\",\"menuCode\":\"book_catalog\",\"name\":\"图书详情\",\"pageType\":\"detail\",\"parentPageCode\":\"\",\"path\":\"/books/:id\",\"tableName\":\"book_info\"},{\"code\":\"my_borrows_page\",\"menuCode\":\"my_borrows\",\"name\":\"我的借阅\",\"pageType\":\"current_user_list\",\"parentPageCode\":\"\",\"path\":\"/my-borrows\",\"tableName\":\"borrow_record\"},{\"code\":\"my_profile_page\",\"menuCode\":\"my_profile\",\"name\":\"个人资料\",\"pageType\":\"form\",\"parentPageCode\":\"\",\"path\":\"/my-profile\",\"tableName\":\"reader\"}],\"roles\":[{\"code\":\"admin\",\"description\":\"系统管理员,拥有所有后台管理权限\",\"name\":\"管理员\"},{\"code\":\"reader\",\"description\":\"普通用户,可以借书、还书、预约、取消预约\",\"name\":\"读者\"}]},\"flowConfig\":{\"actions\":[{\"actor\":\"reader\",\"button\":{\"confirm\":\"确认预约该书?\",\"order\":10,\"pageCode\":\"book_detail_page\",\"scope\":\"reader\",\"slot\":\"page.actions\",\"type\":\"primary\"},\"code\":\"reserve\",\"effects\":[{\"amount\":\"1\",\"min\":\"0\",\"table\":\"borrow_record\",\"type\":\"create_record\",\"values\":{\"reader_id\":\"currentUserId\",\"borrow_date\":\"now\",\"book_id\":\"record.book_id\",\"status\":\"reserved\"}}],\"from\":\"init\",\"invalidStateMessage\":\"该图书不可预约\",\"method\":\"POST\",\"name\":\"预约图书\",\"path\":\"/borrow-record/reserve\",\"successMessage\":\"预约成功\",\"to\":\"reserved\"},{\"actor\":\"reader\",\"button\":{\"confirm\":\"确认取消预约?\",\"order\":10,\"pageCode\":\"my_borrows_page\",\"scope\":\"reader\",\"slot\":\"list.rowActions\",\"type\":\"warning\"},\"code\":\"cancel_reserve\",\"effects\":[],\"from\":\"reserved\",\"invalidStateMessage\":\"当前状态不能取消\",\"method\":\"POST\",\"name\":\"取消预约\",\"path\":\"/borrow-record/cancel-reserve\",\"successMessage\":\"取消预约成功\",\"to\":\"cancelled\"},{\"actor\":\"admin\",\"audit\":{\"timeField\":\"approve_time\",\"userField\":\"approve_user_id\"},\"button\":{\"confirm\":\"确认借出该书?\",\"order\":10,\"pageCode\":\"borrow_admin_page\",\"scope\":\"admin\",\"slot\":\"list.rowActions\",\"type\":\"success\"},\"code\":\"lend\",\"effects\":[{\"amount\":\"1\",\"errorMessage\":\"图书库存不足\",\"field\":\"stock\",\"min\":\"0\",\"notFoundMessage\":\"图书不存在\",\"relationField\":\"book_id\",\"table\":\"book_info\",\"type\":\"decrease\",\"values\":{}}],\"from\":\"reserved\",\"invalidStateMessage\":\"该记录已借出或已取消\",\"method\":\"POST\",\"name\":\"借出\",\"path\":\"/borrow-record/lend\",\"successMessage\":\"借出成功\",\"to\":\"borrowing\"},{\"actor\":\"admin\",\"audit\":{\"timeField\":\"return_time\",\"userField\":\"return_user_id\"},\"button\":{\"confirm\":\"确认归还该书?\",\"order\":20,\"pageCode\":\"borrow_admin_page\",\"scope\":\"admin\",\"slot\":\"list.rowActions\",\"type\":\"primary\"},\"code\":\"return_book\",\"effects\":[{\"amount\":\"1\",\"field\":\"stock\",\"min\":\"0\",\"notFoundMessage\":\"图书不存在\",\"relationField\":\"book_id\",\"table\":\"book_info\",\"type\":\"increase\",\"values\":{}}],\"from\":\"borrowing\",\"invalidStateMessage\":\"当前状态不能归还\",\"method\":\"POST\",\"name\":\"归还\",\"path\":\"/borrow-record/return\",\"successMessage\":\"归还成功\",\"to\":\"returned\"}],\"code\":\"borrow_flow\",\"mainTable\":\"borrow_record\",\"metrics\":[{\"aggregate\":\"count\",\"code\":\"borrowing_count\",\"field\":\"id\",\"name\":\"借阅中数量\",\"status\":\"borrowing\",\"table\":\"borrow_record\",\"unit\":\"条\"},{\"aggregate\":\"count\",\"code\":\"reserved_count\",\"field\":\"id\",\"name\":\"预约中数量\",\"status\":\"reserved\",\"table\":\"borrow_record\",\"unit\":\"条\"},{\"aggregate\":\"count\",\"code\":\"returned_count\",\"field\":\"id\",\"name\":\"已归还数量\",\"status\":\"returned\",\"table\":\"borrow_record\",\"unit\":\"条\"},{\"aggregate\":\"count\",\"code\":\"cancelled_count\",\"field\":\"id\",\"name\":\"已取消数量\",\"status\":\"cancelled\",\"table\":\"borrow_record\",\"unit\":\"条\"},{\"aggregate\":\"count\",\"code\":\"book_total\",\"field\":\"id\",\"name\":\"图书总数\",\"table\":\"book_info\",\"unit\":\"本\"},{\"aggregate\":\"sum\",\"code\":\"book_stock_sum\",\"field\":\"stock\",\"name\":\"总库存\",\"table\":\"book_info\",\"unit\":\"本\"}],\"name\":\"借阅流程\",\"notFoundMessage\":\"借阅记录不存在\",\"states\":[{\"code\":\"init\",\"label\":\"初始\"},{\"code\":\"reserved\",\"label\":\"已预约\"},{\"code\":\"borrowing\",\"label\":\"借阅中\"},{\"code\":\"returned\",\"label\":\"已归还\"},{\"code\":\"cancelled\",\"label\":\"已取消\"}],\"statusField\":\"status\",\"version\":\"1.0\"},\"compiledFlowContract\":{\"acceptanceScenarios\":[],\"actions\":[{\"actor\":\"reader\",\"code\":\"reserve\",\"name\":\"预约图书\",\"ownerObject\":\"borrow_record\",\"ownerTable\":\"borrow_record\",\"preconditions\":[],\"quantityEffects\":[],\"recordEffects\":[],\"required\":true,\"stateTransitions\":[{\"actionCode\":\"reserve\",\"fromState\":\"init\",\"toState\":\"reserved\"}]},{\"actor\":\"reader\",\"code\":\"cancel_reserve\",\"name\":\"取消预约\",\"ownerObject\":\"borrow_record\",\"ownerTable\":\"borrow_record\",\"preconditions\":[],\"quantityEffects\":[],\"recordEffects\":[],\"required\":true,\"stateTransitions\":[{\"actionCode\":\"cancel_reserve\",\"fromState\":\"reserved\",\"toState\":\"cancelled\"}]},{\"actor\":\"admin\",\"code\":\"lend\",\"name\":\"借出\",\"ownerObject\":\"borrow_record\",\"ownerTable\":\"borrow_record\",\"preconditions\":[],\"quantityEffects\":[{\"actionCode\":\"lend\",\"amount\":\"1\",\"effectType\":\"decrease\",\"objectCode\":\"book_info\",\"quantityField\":\"stock\",\"tableName\":\"book_info\"}],\"recordEffects\":[],\"required\":true,\"stateTransitions\":[{\"actionCode\":\"lend\",\"fromState\":\"reserved\",\"toState\":\"borrowing\"}]},{\"actor\":\"admin\",\"code\":\"return_book\",\"name\":\"归还\",\"ownerObject\":\"borrow_record\",\"ownerTable\":\"borrow_record\",\"preconditions\":[],\"quantityEffects\":[{\"actionCode\":\"return_book\",\"amount\":\"1\",\"effectType\":\"increase\",\"objectCode\":\"book_info\",\"quantityField\":\"stock\",\"tableName\":\"book_info\"}],\"recordEffects\":[],\"required\":true,\"stateTransitions\":[{\"actionCode\":\"return_book\",\"fromState\":\"borrowing\",\"toState\":\"returned\"}]}],\"businessPolicies\":[],\"coreObjects\":[{\"code\":\"borrow_record\",\"name\":\"借阅流程\",\"objectType\":\"main\",\"tableName\":\"borrow_record\"},{\"code\":\"book_info\",\"name\":\"book_info\",\"objectType\":\"related\",\"tableName\":\"book_info\"}],\"domainName\":\"借阅流程\",\"metrics\":[{\"aggregate\":\"count\",\"code\":\"borrowing_count\",\"field\":\"id\",\"filters\":[{\"field\":\"status\",\"operator\":\"eq\",\"values\":[\"borrowing\"]}],\"name\":\"借阅中数量\",\"relatedActionCodes\":[],\"required\":true,\"tableName\":\"borrow_record\",\"unit\":\"条\"},{\"aggregate\":\"count\",\"code\":\"reserved_count\",\"field\":\"id\",\"filters\":[{\"field\":\"status\",\"operator\":\"eq\",\"values\":[\"reserved\"]}],\"name\":\"预约中数量\",\"relatedActionCodes\":[],\"required\":true,\"tableName\":\"borrow_record\",\"unit\":\"条\"},{\"aggregate\":\"count\",\"code\":\"returned_count\",\"field\":\"id\",\"filters\":[{\"field\":\"status\",\"operator\":\"eq\",\"values\":[\"returned\"]}],\"name\":\"已归还数量\",\"relatedActionCodes\":[],\"required\":true,\"tableName\":\"borrow_record\",\"unit\":\"条\"},{\"aggregate\":\"count\",\"code\":\"cancelled_count\",\"field\":\"id\",\"filters\":[{\"field\":\"status\",\"operator\":\"eq\",\"values\":[\"cancelled\"]}],\"name\":\"已取消数量\",\"relatedActionCodes\":[],\"required\":true,\"tableName\":\"borrow_record\",\"unit\":\"条\"},{\"aggregate\":\"count\",\"code\":\"book_total\",\"field\":\"id\",\"filters\":[],\"name\":\"图书总数\",\"relatedActionCodes\":[],\"required\":true,\"tableName\":\"book_info\",\"unit\":\"本\"},{\"aggregate\":\"sum\",\"code\":\"book_stock_sum\",\"field\":\"stock\",\"filters\":[],\"name\":\"总库存\",\"relatedActionCodes\":[],\"required\":true,\"tableName\":\"book_info\",\"unit\":\"本\"}],\"pageBindings\":[{\"actionCode\":\"reserve\",\"pageCode\":\"book_detail_page\",\"slot\":\"page.actions\",\"tableName\":\"borrow_record\",\"target\":\"frontend\"},{\"actionCode\":\"cancel_reserve\",\"pageCode\":\"my_borrows_page\",\"slot\":\"list.rowActions\",\"tableName\":\"borrow_record\",\"target\":\"frontend\"},{\"actionCode\":\"lend\",\"pageCode\":\"borrow_admin_page\",\"slot\":\"list.rowActions\",\"tableName\":\"borrow_record\",\"target\":\"admin\"},{\"actionCode\":\"return_book\",\"pageCode\":\"borrow_admin_page\",\"slot\":\"list.rowActions\",\"tableName\":\"borrow_record\",\"target\":\"admin\"}],\"quantityRules\":[{\"actionCode\":\"lend\",\"amount\":\"1\",\"effectType\":\"decrease\",\"objectCode\":\"book_info\",\"quantityField\":\"stock\",\"tableName\":\"book_info\"},{\"actionCode\":\"return_book\",\"amount\":\"1\",\"effectType\":\"increase\",\"objectCode\":\"book_info\",\"quantityField\":\"stock\",\"tableName\":\"book_info\"}],\"recordRules\":[],\"stateMachines\":[{\"objectCode\":\"borrow_record\",\"states\":[\"init\",\"reserved\",\"borrowing\",\"returned\",\"cancelled\"],\"statusField\":\"status\",\"tableName\":\"borrow_record\",\"transitions\":[{\"actionCode\":\"reserve\",\"fromState\":\"init\",\"toState\":\"reserved\"},{\"actionCode\":\"cancel_reserve\",\"fromState\":\"reserved\",\"toState\":\"cancelled\"},{\"actionCode\":\"lend\",\"fromState\":\"reserved\",\"toState\":\"borrowing\"},{\"actionCode\":\"return_book\",\"fromState\":\"borrowing\",\"toState\":\"returned\"}]}]},\"canonicalTableRegistry\":[\"banner\",\"book_info\",\"borrow_record\",\"reader\",\"notice\",\"news\"],\"limits\":{\"maxTables\":12,\"maxColumnsPerTable\":30}}', '{\n \"tables\": [\n {\n \"tableName\": \"banner\",\n \"tableComment\": \"轮播图\",\n \"adminMenuName\": \"轮播图\",\n \"operations\": {\n \"add\": true,\n \"edit\": true,\n \"remove\": true,\n \"removeType\": \"physical\",\n \"reason\": \"\"\n },\n \"columns\": [\n {\n \"columnName\": \"id\",\n \"columnLabel\": \"ID\",\n \"columnComment\": \"主键ID\",\n \"columnType\": \"bigint(20)\",\n \"isPk\": \"1\",\n \"isIncrement\": \"1\",\n \"isRequired\": \"1\"\n },\n {\n \"columnName\": \"title\",\n \"columnLabel\": \"标题\",\n \"columnComment\": \"轮播图标题\",\n \"columnType\": \"varchar(100)\",\n \"isPk\": \"0\",\n \"isIncrement\": \"0\",\n \"isRequired\": \"1\"\n },\n {\n \"columnName\": \"image_url\",\n \"columnLabel\": \"图片URL\",\n \"columnComment\": \"轮播图图片地址\",\n \"columnType\": \"varchar(500)\",\n \"isPk\": \"0\",\n \"isIncrement\": \"0\",\n \"isRequired\": \"1\"\n },\n {\n \"columnName\": \"link_url\",\n \"columnLabel\": \"链接URL\",\n \"columnComment\": \"点击轮播图跳转地址\",\n \"columnType\": \"varchar(500)\",\n \"isPk\": \"0\",\n \"isIncrement\": \"0\",\n \"isRequired\": \"0\"\n },\n {\n \"columnName\": \"sort_order\",\n \"columnLabel\": \"排序\",\n \"columnComment\": \"显示顺序,越小越靠前\",\n \"columnType\": \"int(11)\",\n \"isPk\": \"0\",\n \"isIncrement\": \"0\",\n \"isRequired\": \"1\"\n },\n {\n \"columnName\": \"status\",\n \"columnLabel\": \"状态\",\n \"columnComment\": \"启用状态 0禁用 1启用\",\n \"columnType\": \"char(1)\",\n \"isPk\": \"0\",\n \"isIncrement\": \"0\",\n \"isRequired\": \"1\",\n \"htmlType\": \"radio\",\n \"dictType\": \"banner_status\",\n \"dictOptions\": [\n {\"value\": \"0\", \"label\": \"禁用\"},\n {\"value\": \"1\", \"label\": \"启用\"}\n ]\n },\n {\n \"columnName\": \"create_time\",\n \"columnLabel\": \"创建时间\",\n \"columnComment\": \"记录创建时间\",\n \"columnType\": \"datetime\",\n \"isPk\": \"0\",\n \"isIncrement\": \"0\",\n \"isRequired\": \"1\"\n }\n ]\n },\n {\n \"tableName\": \"book_info\",\n \"tableComment\": \"图书信息\",\n \"adminMenuName\": \"图书\",\n \"operations\": {\n \"add\": true,\n \"edit\": true,\n \"remove\": true,\n \"removeType\": \"physical\",\n \"reason\": \"\"\n },\n \"columns\": [\n {\n \"columnName\": \"id\",\n \"columnLabel\": \"ID\",\n \"columnComment\": \"主键ID\",\n \"columnType\": \"bigint(20)\",\n \"isPk\": \"1\",\n \"isIncrement\": \"1\",\n \"isRequired\": \"1\"\n },\n {\n \"columnName\": \"title\",\n \"columnLabel\": \"书名\",\n \"columnComment\": \"图书名称\",\n \"columnType\": \"varchar(200)\",\n \"isPk\": \"0\",\n \"isIncrement\": \"0\",\n \"isRequired\": \"1\"\n },\n {\n \"columnName\": \"author\",\n \"columnLabel\": \"作者\",\n \"columnComment\": \"图书作者\",\n \"columnType\": \"varchar(100)\",\n \"isPk\": \"0\",\n \"isIncrement\": \"0\",\n \"isRequired\": \"1\"\n },\n {\n \"columnName\": \"isbn\",\n \"columnLabel\": \"ISBN\",\n \"columnComment\": \"国际标准书号\",\n \"columnType\": \"varchar(20)\",\n \"isPk\": \"0\",\n \"isIncrement\": \"0\",\n \"isRequired\": \"1\"\n },\n {\n \"columnName\": \"stock\",\n \"columnLabel\": \"库存\",\n \"columnComment\": \"当前库存数量默认0\",\n \"columnType\": \"int(11)\",\n \"isPk\": \"0\",\n \"isIncrement\": \"0\",\n \"isRequired\": \"1\",\n \"defaultValue\": 0\n },\n {\n \"columnName\": \"category\",\n \"columnLabel\": \"分类\",\n \"columnComment\": \"图书分类,如文学、科技\",\n \"columnType\": \"varchar(50)\",\n \"isPk\": \"0\",\n \"isIncrement\": \"0\",\n \"isRequired\": \"1\"\n },\n {\n \"columnName\": \"cover_image\",\n \"columnLabel\": \"封面图片\",\n \"columnComment\": \"图书封面图片URL\",\n \"columnType\": \"varchar(500)\",\n \"isPk\": \"0\",\n \"isIncrement\": \"0\",\n \"isRequired\": \"0\"\n },\n {\n \"columnName\": \"description\",\n \"columnLabel\": \"简介\",\n \"columnComment\": \"图书简介\",\n \"columnType\": \"text\",\n \"isPk\": \"0\",\n \"isIncrement\": \"0\",\n \"isRequired\": \"0\"\n },\n {\n \"columnName\": \"status\",\n \"columnLabel\": \"状态\",\n \"columnComment\": \"上架状态 0下架 1上架\",\n \"columnType\": \"char(1)\",\n \"isPk\": \"0\",\n \"isIncrement\": \"0\",\n \"isRequired\": \"1\",\n \"htmlType\": \"radio\",\n \"dictType\": \"book_status\",\n \"dictOptions\": [\n {\"value\": \"0\", \"label\": \"下架\"},\n {\"value\": \"1\", \"label\": \"上架\"}\n ]\n },\n {\n \"columnName\": \"create_time\",\n \"columnLabel\": \"创建时间\",\n \"columnComment\": \"记录创建时间\",\n \"columnType\": \"datetime\",\n \"isPk\": \"0\",\n \"isIncrement\": \"0\",\n \"isRequired\": \"1\"\n },\n {\n \"columnName\": \"update_time\",\n \"columnLabel\": \"更新时间\",\n \"columnComment\": \"最后修改时间\",\n \"columnType\": \"datetime\",\n \"isPk\": \"0\",\n \"isIncrement\": \"0\",\n \"isRequired\": \"0\"\n }\n ]\n },\n {\n \"tableName\": \"borrow_record\",\n \"tableComment\": \"借阅记录\",\n \"adminMenuName\": \"借阅\",\n \"operations\": {\n \"add\": true,\n \"edit\": false,\n \"remove\": false,\n \"removeType\": \"physical\",\n \"reason\": \"借阅记录仅允许新增,不允许修改或删除\"\n },\n \"columns\": [\n {\n \"columnName\": \"id\",\n \"columnLabel\": \"ID\",\n \"columnComment\": \"主键ID\",\n \"columnType\": \"bigint(20)\",\n \"isPk\": \"1\",\n \"isIncrement\": \"1\",\n \"isRequired\": \"1\"\n },\n {\n \"columnName\": \"reader_id\",\n \"columnLabel\": \"读者\",\n \"columnComment\": \"关联读者账号ID\",\n \"columnType\": \"bigint(20)\",\n \"isPk\": \"0\",\n \"isIncrement\": \"0\",\n \"isRequired\": \"1\",\n \"htmlType\": \"select\",\n \"dictType\": \"remote:reader:reader_id:nickname\"\n },\n {\n \"columnName\": \"book_id\",\n \"columnLabel\": \"图书\",\n \"columnComment\": \"关联图书ID\",\n \"columnType\": \"bigint(20)\",\n \"isPk\": \"0\",\n \"isIncrement\": \"0\",\n \"isRequired\": \"1\",\n \"htmlType\": \"select\",\n \"dictType\": \"remote:book_info:id:title\"\n },\n {\n \"columnName\": \"borrow_date\",\n \"columnLabel\": \"借阅日期\",\n \"columnComment\": \"预约或借阅日期datetime类型\",\n \"columnType\": \"datetime\",\n \"isPk\": \"0\",\n \"isIncrement\": \"0\",\n \"isRequired\": \"1\"\n },\n {\n \"columnName\": \"return_time\",\n \"columnLabel\": \"归还时间\",\n \"columnComment\": \"实际归还时间(由管理员操作时记录)\",\n \"columnType\": \"datetime\",\n \"isPk\": \"0\",\n \"isIncrement\": \"0\",\n \"isRequired\": \"0\"\n },\n {\n \"columnName\": \"approve_time\",\n \"columnLabel\": \"审核时间\",\n \"columnComment\": \"管理员借出审核时间\",\n \"columnType\": \"datetime\",\n \"isPk\": \"0\",\n \"isIncrement\": \"0\",\n \"isRequired\": \"0\"\n },\n {\n \"columnName\": \"approve_user_id\",\n \"columnLabel\": \"审核人\",\n \"columnComment\": \"执行借出操作的管理员ID\",\n \"columnType\": \"bigint(20)\",\n \"isPk\": \"0\",\n \"isIncrement\": \"0\",\n \"isRequired\": \"0\",\n \"htmlType\": \"select\",\n \"dictType\": \"remote:admin:admin_id:nickname\"\n },\n {\n \"columnName\": \"return_user_id\",\n \"columnLabel\": \"归还操作人\",\n \"columnComment\": \"执行归还操作的管理员ID\",\n \"columnType\": \"bigint(20)\",\n \"isPk\": \"0\",\n \"isIncrement\": \"0\",\n \"isRequired\": \"0\",\n \"htmlType\": \"select\",\n \"dictType\": \"remote:admin:admin_id:nickname\"\n },\n {\n \"columnName\": \"status\",\n \"columnLabel\": \"状态\",\n \"columnComment\": \"借阅流程状态init-初始,reserved-已预约,borrowing-借阅中,returned-已归还,cancelled-已取消\",\n \"columnType\": \"varchar(20)\",\n \"isPk\": \"0\",\n \"isIncrement\": \"0\",\n \"isRequired\": \"1\",\n \"htmlType\": \"select\",\n \"dictType\": \"borrow_status\",\n \"dictOptions\": [\n {\"value\": \"init\", \"label\": \"初始\"},\n {\"value\": \"reserved\", \"label\": \"已预约\"},\n {\"value\": \"borrowing\", \"label\": \"借阅中\"},\n {\"value\": \"returned\", \"label\": \"已归还\"},\n {\"value\": \"cancelled\", \"label\": \"已取消\"}\n ]\n },\n {\n \"columnName\": \"create_time\",\n \"columnLabel\": \"创建时间\",\n \"columnComment\": \"记录创建时间\",\n \"columnType\": \"datetime\",\n \"isPk\": \"0\",\n \"isIncrement\": \"0\",\n \"isRequired\": \"1\"\n }\n ]\n },\n {\n \"tableName\": \"reader\",\n \"tableComment\": \"读者账号\",\n \"adminMenuName\": \"读者\",\n \"operations\": {\n \"add\": true,\n \"edit\": true,\n \"remove\": true,\n \"removeType\": \"physical\",\n \"reason\": \"\"\n },\n \"columns\": [\n {\n \"columnName\": \"reader_id\",\n \"columnLabel\": \"读者ID\",\n \"columnComment\": \"主键ID自增\",\n \"columnType\": \"bigint(20)\",\n \"isPk\": \"1\",\n \"isIncrement\": \"1\",\n \"isRequired\": \"1\"\n },\n {\n \"columnName\": \"username\",\n \"columnLabel\": \"用户名\",\n \"columnComment\": \"登录用户名,唯一\",\n \"columnType\": \"varchar(50)\",\n \"isPk\": \"0\",\n \"isIncrement\": \"0\",\n \"isRequired\": \"1\"\n },\n {\n \"columnName\": \"password_hash\",\n \"columnLabel\": \"密码哈希\",\n \"columnComment\": \"加密后的密码\",\n \"columnType\": \"varchar(255)\",\n \"isPk\": \"0\",\n \"isIncrement\": \"0\",\n \"isRequired\": \"1\"\n },\n {\n \"columnName\": \"nickname\",\n \"columnLabel\": \"昵称\",\n \"columnComment\": \"用户昵称,用于显示\",\n \"columnType\": \"varchar(50)\",\n \"isPk\": \"0\",\n \"isIncrement\": \"0\",\n \"isRequired\": \"1\"\n },\n {\n \"columnName\": \"status\",\n \"columnLabel\": \"状态\",\n \"columnComment\": \"账号状态 0禁用 1启用\",\n \"columnType\": \"char(1)\",\n \"isPk\": \"0\",\n \"isIncrement\": \"0\",\n \"isRequired\": \"1\",\n \"htmlType\": \"radio\",\n \"dictType\": \"account_status\",\n \"dictOptions\": [\n {\"value\": \"0\", \"label\": \"禁用\"},\n {\"value\": \"1\", \"label\": \"启用\"}\n ]\n },\n {\n \"columnName\": \"create_time\",\n \"columnLabel\": \"创建时间\",\n \"columnComment\": \"账号创建时间\",\n \"columnType\": \"datetime\",\n \"isPk\": \"0\",\n \"isIncrement\": \"0\",\n \"isRequired\": \"1\"\n }\n ]\n },\n {\n \"tableName\": \"notice\",\n \"tableComment\": \"公告\",\n \"adminMenuName\": \"公告\",\n \"operations\": {\n \"add\": true,\n \"edit\": true,\n \"remove\": true,\n \"removeType\": \"physical\",\n \"reason\": \"\"\n },\n \"columns\": [\n {\n \"columnName\": \"id\",\n \"columnLabel\": \"ID\",\n \"columnComment\": \"主键ID\",\n \"columnType\": \"bigint(20)\",\n \"isPk\": \"1\",\n \"isIncrement\": \"1\",\n \"isRequired\": \"1\"\n },\n {\n \"columnName\": \"title\",\n \"columnLabel\": \"标题\",\n \"columnComment\": \"公告标题\",\n \"columnType\": \"varchar(200)\",\n \"isPk\": \"0\",\n \"isIncrement\": \"0\",\n \"isRequired\": \"1\"\n },\n {\n \"columnName\": \"content\",\n \"columnLabel\": \"内容\",\n \"columnComment\": \"公告正文\",\n \"columnType\": \"longtext\",\n \"isPk\": \"0\",\n \"isIncrement\": \"0\",\n \"isRequired\": \"1\"\n },\n {\n \"columnName\": \"publish_time\",\n \"columnLabel\": \"发布时间\",\n \"columnComment\": \"公告发布时间\",\n \"columnType\": \"datetime\",\n \"isPk\": \"0\",\n \"isIncrement\": \"0\",\n \"isRequired\": \"1\"\n },\n {\n \"columnName\": \"status\",\n \"columnLabel\": \"状态\",\n \"columnComment\": \"发布状态 0草稿 1已发布\",\n \"columnType\": \"char(1)\",\n \"isPk\": \"0\",\n \"isIncrement\": \"0\",\n \"isRequired\": \"1\",\n \"htmlType\": \"radio\",\n \"dictType\": \"publish_status\",\n \"dictOptions\": [\n {\"value\": \"0\", \"label\": \"草稿\"},\n {\"value\": \"1\", \"label\": \"已发布\"}\n ]\n },\n {\n \"columnName\": \"create_time\",\n \"columnLabel\": \"创建时间\",\n \"columnComment\": \"记录创建时间\",\n \"columnType\": \"datetime\",\n \"isPk\": \"0\",\n \"isIncrement\": \"0\",\n \"isRequired\": \"1\"\n }\n ]\n },\n {\n \"tableName\": \"news\",\n \"tableComment\": \"新闻\",\n \"adminMenuName\": \"新闻\",\n \"operations\": {\n \"add\": true,\n \"edit\": true,\n \"remove\": true,\n \"removeType\": \"physical\",\n \"reason\": \"\"\n },\n \"columns\": [\n {\n \"columnName\": \"id\",\n \"columnLabel\": \"ID\",\n \"columnComment\": \"主键ID\",\n \"columnType\": \"bigint(20)\",\n \"isPk\": \"1\",\n \"isIncrement\": \"1\",\n \"isRequired\": \"1\"\n },\n {\n \"columnName\": \"title\",\n \"columnLabel\": \"标题\",\n \"columnComment\": \"新闻标题\",\n \"columnType\": \"varchar(200)\",\n \"isPk\": \"0\",\n \"isIncrement\": \"0\",\n \"isRequired\": \"1\"\n },\n {\n \"columnName\": \"content\",\n \"columnLabel\": \"内容\",\n \"columnComment\": \"新闻正文\",\n \"columnType\": \"longtext\",\n \"isPk\": \"0\",\n \"isIncrement\": \"0\",\n \"isRequired\": \"1\"\n },\n {\n \"columnName\": \"publish_time\",\n \"columnLabel\": \"发布时间\",\n \"columnComment\": \"新闻发布时间\",\n \"columnType\": \"datetime\",\n \"isPk\": \"0\",\n \"isIncrement\": \"0\",\n \"isRequired\": \"1\"\n },\n {\n \"columnName\": \"status\",\n \"columnLabel\": \"状态\",\n \"columnComment\": \"发布状态 0草稿 1已发布\",\n \"columnType\": \"char(1)\",\n \"isPk\": \"0\",\n \"isIncrement\": \"0\",\n \"isRequired\": \"1\",\n \"htmlType\": \"radio\",\n \"dictType\": \"publish_status\",\n \"dictOptions\": [\n {\"value\": \"0\", \"label\": \"草稿\"},\n {\"value\": \"1\", \"label\": \"已发布\"}\n ]\n },\n {\n \"columnName\": \"create_time\",\n \"columnLabel\": \"创建时间\",\n \"columnComment\": \"记录创建时间\",\n \"columnType\": \"datetime\",\n \"isPk\": \"0\",\n \"isIncrement\": \"0\",\n \"isRequired\": \"1\"\n }\n ]\n },\n {\n \"tableName\": \"admin\",\n \"tableComment\": \"管理员账号\",\n \"adminMenuName\": \"管理员\",\n \"operations\": {\n \"add\": true,\n \"edit\": true,\n \"remove\": true,\n \"removeType\": \"physical\",\n \"reason\": \"\"\n },\n \"columns\": [\n {\n \"columnName\": \"admin_id\",\n \"columnLabel\": \"管理员ID\",\n \"columnComment\": \"主键ID自增\",\n \"columnType\": \"bigint(20)\",\n \"isPk\": \"1\",\n \"isIncrement\": \"1\",\n \"isRequired\": \"1\"\n },\n {\n \"columnName\": \"username\",\n \"columnLabel\": \"用户名\",\n \"columnComment\": \"登录用户名,唯一\",\n \"columnType\": \"varchar(50)\",\n \"isPk\": \"0\",\n \"isIncrement\": \"0\",\n \"isRequired\": \"1\"\n },\n {\n \"columnName\": \"password_hash\",\n \"columnLabel\": \"密码哈希\",\n \"columnComment\": \"加密后的密码\",\n \"columnType\": \"varchar(255)\",\n \"isPk\": \"0\",\n \"isIncrement\": \"0\",\n \"isRequired\": \"1\"\n },\n {\n \"columnName\": \"nickname\",\n \"columnLabel\": \"昵称\",\n \"columnComment\": \"管理员昵称\",\n \"columnType\": \"varchar(50)\",\n \"isPk\": \"0\",\n \"isIncrement\": \"0\",\n \"isRequired\": \"1\"\n },\n {\n \"columnName\": \"status\",\n \"columnLabel\": \"状态\",\n \"columnComment\": \"账号状态 0禁用 1启用\",\n \"columnType\": \"char(1)\",\n \"isPk\": \"0\",\n \"isIncrement\": \"0\",\n \"isRequired\": \"1\",\n \"htmlType\": \"radio\",\n \"dictType\": \"account_status\",\n \"dictOptions\": [\n {\"value\": \"0\", \"label\": \"禁用\"},\n {\"value\": \"1\", \"label\": \"启用\"}\n ]\n },\n {\n \"columnName\": \"create_time\",\n \"columnLabel\": \"创建时间\",\n \"columnComment\": \"账号创建时间\",\n \"columnType\": \"datetime\",\n \"isPk\": \"0\",\n \"isIncrement\": \"0\",\n \"isRequired\": \"1\"\n }\n ]\n }\n ]\n}', '1', NULL, 61572, '2026-07-14 19:51:07');
INSERT INTO `factory_ai_stage_output` VALUES (124, 110, 106, 100, 'app_blueprint', '{\"projectName\":\"图书管理系统\",\"projectDescription\":\"功能:借书、还书、预约、取消预约\\n角色用户、管理员\\n其他模块轮播图、公告、新闻\",\"industryTemplate\":\"\",\"stylePreset\":\"dark-tech\",\"extraRequirements\":\"\"}', '{\n \"roles\": [\n {\n \"code\": \"admin\",\n \"name\": \"管理员\",\n \"description\": \"系统管理员,管理图书、用户、借阅等所有后台业务\"\n },\n {\n \"code\": \"user\",\n \"name\": \"用户\",\n \"description\": \"普通用户,可借书、还书、预约、取消预约\"\n }\n ],\n \"frontendMenus\": [\n {\n \"code\": \"book_catalog\",\n \"name\": \"图书目录\",\n \"path\": \"/books\",\n \"pageCode\": \"book_catalog_page\",\n \"requiresLogin\": false,\n \"visibleRoles\": [],\n \"dataScope\": \"PUBLIC\"\n },\n {\n \"code\": \"my_borrowings\",\n \"name\": \"我的借阅\",\n \"path\": \"/my/borrowings\",\n \"pageCode\": \"my_borrowings_page\",\n \"requiresLogin\": true,\n \"visibleRoles\": [\"user\"],\n \"dataScope\": \"CURRENT_USER\"\n },\n {\n \"code\": \"my_reservations\",\n \"name\": \"我的预约\",\n \"path\": \"/my/reservations\",\n \"pageCode\": \"my_reservations_page\",\n \"requiresLogin\": true,\n \"visibleRoles\": [\"user\"],\n \"dataScope\": \"CURRENT_USER\"\n },\n {\n \"code\": \"user_profile\",\n \"name\": \"个人资料\",\n \"path\": \"/my/profile\",\n \"pageCode\": \"user_profile_page\",\n \"requiresLogin\": true,\n \"visibleRoles\": [\"user\"],\n \"dataScope\": \"CURRENT_USER\"\n }\n ],\n \"frontendPages\": [\n {\n \"code\": \"book_catalog_page\",\n \"name\": \"图书目录\",\n \"menuCode\": \"book_catalog\",\n \"path\": \"/books\",\n \"pageType\": \"list\",\n \"tableName\": \"book_info\"\n },\n {\n \"code\": \"book_detail_page\",\n \"name\": \"图书详情\",\n \"menuCode\": \"book_catalog\",\n \"path\": \"/books/:id\",\n \"pageType\": \"detail\",\n \"tableName\": \"book_info\"\n },\n {\n \"code\": \"my_borrowings_page\",\n \"name\": \"我的借阅\",\n \"menuCode\": \"my_borrowings\",\n \"path\": \"/my/borrowings\",\n \"pageType\": \"current_user_list\",\n \"tableName\": \"borrowing_record\"\n },\n {\n \"code\": \"my_reservations_page\",\n \"name\": \"我的预约\",\n \"menuCode\": \"my_reservations\",\n \"path\": \"/my/reservations\",\n \"pageType\": \"current_user_list\",\n \"tableName\": \"reservation\"\n },\n {\n \"code\": \"user_profile_page\",\n \"name\": \"个人资料\",\n \"menuCode\": \"user_profile\",\n \"path\": \"/my/profile\",\n \"pageType\": \"form\",\n \"tableName\": \"user\"\n }\n ],\n \"adminMenus\": [\n {\n \"code\": \"book_admin\",\n \"name\": \"图书管理\",\n \"path\": \"/admin/books\",\n \"pageCode\": \"book_admin_page\",\n \"tableName\": \"book_info\",\n \"pageType\": \"list\",\n \"requiresLogin\": true,\n \"visibleRoles\": [\"admin\"],\n \"dataScope\": \"ROLE\"\n },\n {\n \"code\": \"user_admin\",\n \"name\": \"用户管理\",\n \"path\": \"/admin/users\",\n \"pageCode\": \"user_admin_page\",\n \"tableName\": \"user\",\n \"pageType\": \"list\",\n \"requiresLogin\": true,\n \"visibleRoles\": [\"admin\"],\n \"dataScope\": \"ROLE\"\n },\n {\n \"code\": \"borrowing_admin\",\n \"name\": \"借阅管理\",\n \"path\": \"/admin/borrowings\",\n \"pageCode\": \"borrowing_admin_page\",\n \"tableName\": \"borrowing_record\",\n \"pageType\": \"list\",\n \"requiresLogin\": true,\n \"visibleRoles\": [\"admin\"],\n \"dataScope\": \"ROLE\"\n },\n {\n \"code\": \"reservation_admin\",\n \"name\": \"预约管理\",\n \"path\": \"/admin/reservations\",\n \"pageCode\": \"reservation_admin_page\",\n \"tableName\": \"reservation\",\n \"pageType\": \"list\",\n \"requiresLogin\": true,\n \"visibleRoles\": [\"admin\"],\n \"dataScope\": \"ROLE\"\n },\n {\n \"code\": \"carousel_admin\",\n \"name\": \"轮播图管理\",\n \"path\": \"/admin/carousels\",\n \"pageCode\": \"carousel_admin_page\",\n \"tableName\": \"carousel\",\n \"pageType\": \"list\",\n \"requiresLogin\": true,\n \"visibleRoles\": [\"admin\"],\n \"dataScope\": \"ROLE\"\n },\n {\n \"code\": \"announcement_admin\",\n \"name\": \"公告管理\",\n \"path\": \"/admin/announcements\",\n \"pageCode\": \"announcement_admin_page\",\n \"tableName\": \"announcement\",\n \"pageType\": \"list\",\n \"requiresLogin\": true,\n \"visibleRoles\": [\"admin\"],\n \"dataScope\": \"ROLE\"\n },\n {\n \"code\": \"news_admin\",\n \"name\": \"新闻管理\",\n \"path\": \"/admin/news\",\n \"pageCode\": \"news_admin_page\",\n \"tableName\": \"news\",\n \"pageType\": \"list\",\n \"requiresLogin\": true,\n \"visibleRoles\": [\"admin\"],\n \"dataScope\": \"ROLE\"\n },\n {\n \"code\": \"admin_profile\",\n \"name\": \"管理员个人资料\",\n \"path\": \"/admin/profile\",\n \"pageCode\": \"admin_profile_page\",\n \"tableName\": \"admin\",\n \"pageType\": \"form\",\n \"requiresLogin\": true,\n \"visibleRoles\": [\"admin\"],\n \"dataScope\": \"ROLE\"\n }\n ],\n \"adminHomeDashboard\": {\n \"title\": \"运营总览\",\n \"description\": \"核心业务数据\",\n \"metrics\": [\n {\n \"code\": \"metric_book_total\",\n \"name\": \"图书总量\",\n \"tableName\": \"book_info\",\n \"semantic\": \"content\",\n \"aggregation\": \"COUNT\"\n },\n {\n \"code\": \"metric_user_total\",\n \"name\": \"用户总量\",\n \"tableName\": \"user\",\n \"semantic\": \"user\",\n \"aggregation\": \"COUNT\"\n },\n {\n \"code\": \"metric_borrow_total\",\n \"name\": \"借出总量\",\n \"tableName\": \"borrowing_record\",\n \"semantic\": \"order\",\n \"aggregation\": \"COUNT\"\n },\n {\n \"code\": \"metric_pending_reservation\",\n \"name\": \"待处理预约\",\n \"tableName\": \"reservation\",\n \"semantic\": \"task\",\n \"aggregation\": \"COUNT\",\n \"filter\": \"status=\'pending\'\"\n }\n ],\n \"charts\": [\n {\n \"code\": \"chart_borrow_trend\",\n \"name\": \"借阅趋势\",\n \"chartType\": \"trend\",\n \"tableName\": \"borrowing_record\",\n \"semantic\": \"order\",\n \"dimension\": \"date\",\n \"measure\": \"count\"\n },\n {\n \"code\": \"chart_category_distribution\",\n \"name\": \"图书分类分布\",\n \"chartType\": \"distribution\",\n \"tableName\": \"book_info\",\n \"semantic\": \"content\",\n \"dimension\": \"category\",\n \"measure\": \"count\"\n }\n ]\n }\n}', '1', NULL, 33208, '2026-07-14 21:22:58');
INSERT INTO `factory_ai_stage_output` VALUES (125, 110, 106, 100, 'flow_config', '{\"mode\":\"generate\",\"projectName\":\"图书管理系统\",\"projectDescription\":\"功能:借书、还书、预约、取消预约\\n角色用户、管理员\\n其他模块轮播图、公告、新闻\",\"industryTemplate\":\"\",\"stylePreset\":\"dark-tech\",\"extraRequirements\":\"\",\"confirmedAppBlueprint\":{\"adminHomeDashboard\":{\"charts\":[{\"code\":\"chart_borrow_trend\",\"dimension\":{\"field\":\"date\"},\"filters\":[],\"metrics\":[{\"aggregate\":\"count\"}],\"semantic\":\"order\",\"tableName\":\"borrowing_record\"},{\"code\":\"chart_category_distribution\",\"dimension\":{\"field\":\"category\"},\"filters\":[],\"metrics\":[{\"aggregate\":\"count\"}],\"semantic\":\"content\",\"tableName\":\"book_info\"}],\"description\":\"核心业务数据\",\"metrics\":[{\"aggregate\":\"count\",\"code\":\"metric_book_total\",\"filters\":[],\"semantic\":\"content\",\"tableName\":\"book_info\",\"title\":\"图书总量\"},{\"aggregate\":\"count\",\"code\":\"metric_user_total\",\"filters\":[],\"semantic\":\"user\",\"tableName\":\"user\",\"title\":\"用户总量\"},{\"aggregate\":\"count\",\"code\":\"metric_borrow_total\",\"filters\":[],\"semantic\":\"order\",\"tableName\":\"borrowing_record\",\"title\":\"借出总量\"},{\"aggregate\":\"count\",\"code\":\"metric_pending_reservation\",\"filters\":[],\"semantic\":\"task\",\"tableName\":\"reservation\",\"title\":\"待处理预约\"}],\"title\":\"运营总览\"},\"adminMenus\":[{\"code\":\"book_admin\",\"dataScope\":\"ROLE\",\"name\":\"图书管理\",\"pageCode\":\"book_admin_page\",\"pageType\":\"list\",\"path\":\"/admin/books\",\"requiresLogin\":true,\"tableName\":\"book_info\",\"visibleRoles\":[\"admin\"]},{\"code\":\"user_admin\",\"dataScope\":\"ROLE\",\"name\":\"用户管理\",\"pageCode\":\"user_admin_page\",\"pageType\":\"list\",\"path\":\"/admin/users\",\"requiresLogin\":true,\"tableName\":\"user\",\"visibleRoles\":[\"admin\"]},{\"code\":\"borrowing_admin\",\"dataScope\":\"ROLE\",\"name\":\"借阅管理\",\"pageCode\":\"borrowing_admin_page\",\"pageType\":\"list\",\"path\":\"/admin/borrowings\",\"requiresLogin\":true,\"tableName\":\"borrowing_record\",\"visibleRoles\":[\"admin\"]},{\"code\":\"reservation_admin\",\"dataScope\":\"ROLE\",\"name\":\"预约管理\",\"pageCode\":\"reservation_admin_page\",\"pageType\":\"list\",\"path\":\"/admin/reservations\",\"requiresLogin\":true,\"tableName\":\"reservation\",\"visibleRoles\":[\"admin\"]},{\"code\":\"carousel_admin\",\"dataScope\":\"ROLE\",\"name\":\"轮播图管理\",\"pageCode\":\"carousel_admin_page\",\"pageType\":\"list\",\"path\":\"/admin/carousels\",\"requiresLogin\":true,\"tableName\":\"carousel\",\"visibleRoles\":[\"admin\"]},{\"code\":\"announcement_admin\",\"dataScope\":\"ROLE\",\"name\":\"公告管理\",\"pageCode\":\"announcement_admin_page\",\"pageType\":\"list\",\"path\":\"/admin/announcements\",\"requiresLogin\":true,\"tableName\":\"announcement\",\"visibleRoles\":[\"admin\"]},{\"code\":\"news_admin\",\"dataScope\":\"ROLE\",\"name\":\"新闻管理\",\"pageCode\":\"news_admin_page\",\"pageType\":\"list\",\"path\":\"/admin/news\",\"requiresLogin\":true,\"tableName\":\"news\",\"visibleRoles\":[\"admin\"]},{\"code\":\"admin_profile\",\"dataScope\":\"ROLE\",\"name\":\"管理员个人资料\",\"pageCode\":\"admin_profile_page\",\"pageType\":\"form\",\"path\":\"/admin/profile\",\"requiresLogin\":true,\"tableName\":\"admin\",\"visibleRoles\":[\"admin\"]}],\"frontendMenus\":[{\"code\":\"book_catalog\",\"dataScope\":\"PUBLIC\",\"name\":\"图书目录\",\"pageCode\":\"book_catalog_page\",\"pageType\":\"\",\"path\":\"/books\",\"requiresLogin\":false,\"tableName\":\"\",\"visibleRoles\":[]},{\"code\":\"my_borrowings\",\"dataScope\":\"CURRENT_USER\",\"name\":\"我的借阅\",\"pageCode\":\"my_borrowings_page\",\"pageType\":\"\",\"path\":\"/my/borrowings\",\"requiresLogin\":true,\"tableName\":\"\",\"visibleRoles\":[\"user\"]},{\"code\":\"my_reservations\",\"dataScope\":\"CURRENT_USER\",\"name\":\"我的预约\",\"pageCode\":\"my_reservations_page\",\"pageType\":\"\",\"path\":\"/my/reservations\",\"requiresLogin\":true,\"tableName\":\"\",\"visibleRoles\":[\"user\"]},{\"code\":\"user_profile\",\"dataScope\":\"CURRENT_USER\",\"name\":\"个人资料\",\"pageCode\":\"user_profile_page\",\"pageType\":\"\",\"path\":\"/my/profile\",\"requiresLogin\":true,\"tableName\":\"\",\"visibleRoles\":[\"user\"]}],\"frontendPages\":[{\"code\":\"book_catalog_page\",\"menuCode\":\"book_catalog\",\"name\":\"图书目录\",\"pageType\":\"list\",\"parentPageCode\":\"\",\"path\":\"/books\",\"tableName\":\"book_info\"},{\"code\":\"book_detail_page\",\"menuCode\":\"book_catalog\",\"name\":\"图书详情\",\"pageType\":\"detail\",\"parentPageCode\":\"\",\"path\":\"/books/:id\",\"tableName\":\"book_info\"},{\"code\":\"my_borrowings_page\",\"menuCode\":\"my_borrowings\",\"name\":\"我的借阅\",\"pageType\":\"current_user_list\",\"parentPageCode\":\"\",\"path\":\"/my/borrowings\",\"tableName\":\"borrowing_record\"},{\"code\":\"my_reservations_page\",\"menuCode\":\"my_reservations\",\"name\":\"我的预约\",\"pageType\":\"current_user_list\",\"parentPageCode\":\"\",\"path\":\"/my/reservations\",\"tableName\":\"reservation\"},{\"code\":\"user_profile_page\",\"menuCode\":\"user_profile\",\"name\":\"个人资料\",\"pageType\":\"form\",\"parentPageCode\":\"\",\"path\":\"/my/profile\",\"tableName\":\"user\"}],\"roles\":[{\"code\":\"admin\",\"description\":\"系统管理员,管理图书、用户、借阅等所有后台业务\",\"name\":\"管理员\"},{\"code\":\"user\",\"description\":\"普通用户,可借书、还书、预约、取消预约\",\"name\":\"用户\"}]}}', '{\n \"version\": \"1.0\",\n \"code\": \"borrowing_flow\",\n \"name\": \"借阅管理流程\",\n \"mainTable\": \"borrowing_record\",\n \"statusField\": \"status\",\n \"notFoundMessage\": \"借阅记录不存在\",\n \"states\": [\n { \"code\": \"pending\", \"label\": \"待借出\" },\n { \"code\": \"borrowing\", \"label\": \"借阅中\" },\n { \"code\": \"returned\", \"label\": \"已归还\" },\n { \"code\": \"overdue\", \"label\": \"逾期\" }\n ],\n \"actions\": [\n {\n \"code\": \"lend_out\",\n \"name\": \"借出\",\n \"from\": \"pending\",\n \"to\": \"borrowing\",\n \"actor\": \"admin\",\n \"method\": \"POST\",\n \"path\": \"/borrowing-record/lend-out\",\n \"invalidStateMessage\": \"当前状态不能借出\",\n \"successMessage\": \"借出成功\",\n \"audit\": { \"userField\": \"lend_user_id\", \"timeField\": \"lend_time\" },\n \"effects\": [\n {\n \"type\": \"decrease\",\n \"table\": \"book_info\",\n \"relationField\": \"book_id\",\n \"field\": \"stock\",\n \"amount\": \"1\",\n \"min\": \"0\",\n \"notFoundMessage\": \"图书不存在\",\n \"errorMessage\": \"图书库存不足\"\n }\n ],\n \"button\": {\n \"scope\": \"admin\",\n \"pageCode\": \"borrowing_admin_page\",\n \"slot\": \"list.rowActions\",\n \"type\": \"primary\",\n \"confirm\": \"确认借出该图书给用户吗?\",\n \"order\": 10\n }\n },\n {\n \"code\": \"return_book\",\n \"name\": \"归还\",\n \"from\": \"borrowing\",\n \"to\": \"returned\",\n \"actor\": \"admin\",\n \"method\": \"POST\",\n \"path\": \"/borrowing-record/return\",\n \"invalidStateMessage\": \"当前状态不能归还\",\n \"successMessage\": \"归还成功\",\n \"audit\": { \"userField\": \"return_user_id\", \"timeField\": \"return_time\" },\n \"effects\": [\n {\n \"type\": \"increase\",\n \"table\": \"book_info\",\n \"relationField\": \"book_id\",\n \"field\": \"stock\",\n \"amount\": \"1\",\n \"notFoundMessage\": \"图书不存在\"\n }\n ],\n \"button\": {\n \"scope\": \"admin\",\n \"pageCode\": \"borrowing_admin_page\",\n \"slot\": \"list.rowActions\",\n \"type\": \"success\",\n \"confirm\": \"确认归还吗?\",\n \"order\": 20\n }\n }\n ],\n \"metrics\": [\n {\n \"code\": \"borrowing_count\",\n \"name\": \"借阅中数量\",\n \"table\": \"borrowing_record\",\n \"aggregate\": \"count\",\n \"field\": \"id\",\n \"status\": \"borrowing\",\n \"unit\": \"条\"\n },\n {\n \"code\": \"overdue_count\",\n \"name\": \"逾期未还数量\",\n \"table\": \"borrowing_record\",\n \"aggregate\": \"count\",\n \"field\": \"id\",\n \"status\": \"overdue\",\n \"unit\": \"条\"\n }\n ]\n}', '1', NULL, 59548, '2026-07-14 21:23:57');
INSERT INTO `factory_ai_stage_output` VALUES (126, 110, 106, 100, 'database', '{\"mode\":\"generate\",\"projectName\":\"图书管理系统\",\"projectDescription\":\"功能:借书、还书、预约、取消预约\\n角色用户、管理员\\n其他模块轮播图、公告、新闻\",\"industryTemplate\":\"\",\"stylePreset\":\"dark-tech\",\"extraRequirements\":\"\",\"confirmedAppBlueprint\":{\"adminHomeDashboard\":{\"charts\":[{\"code\":\"chart_borrow_trend\",\"dimension\":{\"field\":\"date\"},\"filters\":[],\"metrics\":[{\"aggregate\":\"count\"}],\"semantic\":\"order\",\"tableName\":\"borrowing_record\"},{\"code\":\"chart_category_distribution\",\"dimension\":{\"field\":\"category\"},\"filters\":[],\"metrics\":[{\"aggregate\":\"count\"}],\"semantic\":\"content\",\"tableName\":\"book_info\"}],\"description\":\"核心业务数据\",\"metrics\":[{\"aggregate\":\"count\",\"code\":\"metric_book_total\",\"filters\":[],\"semantic\":\"content\",\"tableName\":\"book_info\",\"title\":\"图书总量\"},{\"aggregate\":\"count\",\"code\":\"metric_user_total\",\"filters\":[],\"semantic\":\"user\",\"tableName\":\"user\",\"title\":\"用户总量\"},{\"aggregate\":\"count\",\"code\":\"metric_borrow_total\",\"filters\":[],\"semantic\":\"order\",\"tableName\":\"borrowing_record\",\"title\":\"借出总量\"},{\"aggregate\":\"count\",\"code\":\"metric_pending_reservation\",\"filters\":[],\"semantic\":\"task\",\"tableName\":\"reservation\",\"title\":\"待处理预约\"}],\"title\":\"运营总览\"},\"adminMenus\":[{\"code\":\"book_admin\",\"dataScope\":\"ROLE\",\"name\":\"图书管理\",\"pageCode\":\"book_admin_page\",\"pageType\":\"list\",\"path\":\"/admin/books\",\"requiresLogin\":true,\"tableName\":\"book_info\",\"visibleRoles\":[\"admin\"]},{\"code\":\"user_admin\",\"dataScope\":\"ROLE\",\"name\":\"用户管理\",\"pageCode\":\"user_admin_page\",\"pageType\":\"list\",\"path\":\"/admin/users\",\"requiresLogin\":true,\"tableName\":\"user\",\"visibleRoles\":[\"admin\"]},{\"code\":\"borrowing_admin\",\"dataScope\":\"ROLE\",\"name\":\"借阅管理\",\"pageCode\":\"borrowing_admin_page\",\"pageType\":\"list\",\"path\":\"/admin/borrowings\",\"requiresLogin\":true,\"tableName\":\"borrowing_record\",\"visibleRoles\":[\"admin\"]},{\"code\":\"reservation_admin\",\"dataScope\":\"ROLE\",\"name\":\"预约管理\",\"pageCode\":\"reservation_admin_page\",\"pageType\":\"list\",\"path\":\"/admin/reservations\",\"requiresLogin\":true,\"tableName\":\"reservation\",\"visibleRoles\":[\"admin\"]},{\"code\":\"carousel_admin\",\"dataScope\":\"ROLE\",\"name\":\"轮播图管理\",\"pageCode\":\"carousel_admin_page\",\"pageType\":\"list\",\"path\":\"/admin/carousels\",\"requiresLogin\":true,\"tableName\":\"carousel\",\"visibleRoles\":[\"admin\"]},{\"code\":\"announcement_admin\",\"dataScope\":\"ROLE\",\"name\":\"公告管理\",\"pageCode\":\"announcement_admin_page\",\"pageType\":\"list\",\"path\":\"/admin/announcements\",\"requiresLogin\":true,\"tableName\":\"announcement\",\"visibleRoles\":[\"admin\"]},{\"code\":\"news_admin\",\"dataScope\":\"ROLE\",\"name\":\"新闻管理\",\"pageCode\":\"news_admin_page\",\"pageType\":\"list\",\"path\":\"/admin/news\",\"requiresLogin\":true,\"tableName\":\"news\",\"visibleRoles\":[\"admin\"]},{\"code\":\"admin_profile\",\"dataScope\":\"ROLE\",\"name\":\"管理员个人资料\",\"pageCode\":\"admin_profile_page\",\"pageType\":\"form\",\"path\":\"/admin/profile\",\"requiresLogin\":true,\"tableName\":\"admin\",\"visibleRoles\":[\"admin\"]}],\"frontendMenus\":[{\"code\":\"book_catalog\",\"dataScope\":\"PUBLIC\",\"name\":\"图书目录\",\"pageCode\":\"book_catalog_page\",\"pageType\":\"\",\"path\":\"/books\",\"requiresLogin\":false,\"tableName\":\"\",\"visibleRoles\":[]},{\"code\":\"my_borrowings\",\"dataScope\":\"CURRENT_USER\",\"name\":\"我的借阅\",\"pageCode\":\"my_borrowings_page\",\"pageType\":\"\",\"path\":\"/my/borrowings\",\"requiresLogin\":true,\"tableName\":\"\",\"visibleRoles\":[\"user\"]},{\"code\":\"my_reservations\",\"dataScope\":\"CURRENT_USER\",\"name\":\"我的预约\",\"pageCode\":\"my_reservations_page\",\"pageType\":\"\",\"path\":\"/my/reservations\",\"requiresLogin\":true,\"tableName\":\"\",\"visibleRoles\":[\"user\"]},{\"code\":\"user_profile\",\"dataScope\":\"CURRENT_USER\",\"name\":\"个人资料\",\"pageCode\":\"user_profile_page\",\"pageType\":\"\",\"path\":\"/my/profile\",\"requiresLogin\":true,\"tableName\":\"\",\"visibleRoles\":[\"user\"]}],\"frontendPages\":[{\"code\":\"book_catalog_page\",\"menuCode\":\"book_catalog\",\"name\":\"图书目录\",\"pageType\":\"list\",\"parentPageCode\":\"\",\"path\":\"/books\",\"tableName\":\"book_info\"},{\"code\":\"book_detail_page\",\"menuCode\":\"book_catalog\",\"name\":\"图书详情\",\"pageType\":\"detail\",\"parentPageCode\":\"\",\"path\":\"/books/:id\",\"tableName\":\"book_info\"},{\"code\":\"my_borrowings_page\",\"menuCode\":\"my_borrowings\",\"name\":\"我的借阅\",\"pageType\":\"current_user_list\",\"parentPageCode\":\"\",\"path\":\"/my/borrowings\",\"tableName\":\"borrowing_record\"},{\"code\":\"my_reservations_page\",\"menuCode\":\"my_reservations\",\"name\":\"我的预约\",\"pageType\":\"current_user_list\",\"parentPageCode\":\"\",\"path\":\"/my/reservations\",\"tableName\":\"reservation\"},{\"code\":\"user_profile_page\",\"menuCode\":\"user_profile\",\"name\":\"个人资料\",\"pageType\":\"form\",\"parentPageCode\":\"\",\"path\":\"/my/profile\",\"tableName\":\"user\"}],\"roles\":[{\"code\":\"admin\",\"description\":\"系统管理员,管理图书、用户、借阅等所有后台业务\",\"name\":\"管理员\"},{\"code\":\"user\",\"description\":\"普通用户,可借书、还书、预约、取消预约\",\"name\":\"用户\"}]},\"flowConfig\":{\"actions\":[{\"actor\":\"admin\",\"audit\":{\"timeField\":\"lend_time\",\"userField\":\"lend_user_id\"},\"button\":{\"confirm\":\"确认借出该图书给用户吗?\",\"order\":10,\"pageCode\":\"borrowing_admin_page\",\"scope\":\"admin\",\"slot\":\"list.rowActions\",\"type\":\"primary\"},\"code\":\"lend_out\",\"effects\":[{\"amount\":\"1\",\"errorMessage\":\"图书库存不足\",\"field\":\"stock\",\"min\":\"0\",\"notFoundMessage\":\"图书不存在\",\"relationField\":\"book_id\",\"table\":\"book_info\",\"type\":\"decrease\",\"values\":{}}],\"from\":\"pending\",\"invalidStateMessage\":\"当前状态不能借出\",\"method\":\"POST\",\"name\":\"借出\",\"path\":\"/borrowing-record/lend-out\",\"successMessage\":\"借出成功\",\"to\":\"borrowing\"},{\"actor\":\"admin\",\"audit\":{\"timeField\":\"return_time\",\"userField\":\"return_user_id\"},\"button\":{\"confirm\":\"确认归还吗?\",\"order\":20,\"pageCode\":\"borrowing_admin_page\",\"scope\":\"admin\",\"slot\":\"list.rowActions\",\"type\":\"success\"},\"code\":\"return_book\",\"effects\":[{\"amount\":\"1\",\"field\":\"stock\",\"min\":\"0\",\"notFoundMessage\":\"图书不存在\",\"relationField\":\"book_id\",\"table\":\"book_info\",\"type\":\"increase\",\"values\":{}}],\"from\":\"borrowing\",\"invalidStateMessage\":\"当前状态不能归还\",\"method\":\"POST\",\"name\":\"归还\",\"path\":\"/borrowing-record/return\",\"successMessage\":\"归还成功\",\"to\":\"returned\"}],\"code\":\"borrowing_flow\",\"mainTable\":\"borrowing_record\",\"metrics\":[{\"aggregate\":\"count\",\"code\":\"borrowing_count\",\"field\":\"id\",\"name\":\"借阅中数量\",\"status\":\"borrowing\",\"table\":\"borrowing_record\",\"unit\":\"条\"},{\"aggregate\":\"count\",\"code\":\"overdue_count\",\"field\":\"id\",\"name\":\"逾期未还数量\",\"status\":\"overdue\",\"table\":\"borrowing_record\",\"unit\":\"条\"}],\"name\":\"借阅管理流程\",\"notFoundMessage\":\"借阅记录不存在\",\"states\":[{\"code\":\"pending\",\"label\":\"待借出\"},{\"code\":\"borrowing\",\"label\":\"借阅中\"},{\"code\":\"returned\",\"label\":\"已归还\"},{\"code\":\"overdue\",\"label\":\"逾期\"}],\"statusField\":\"status\",\"version\":\"1.0\"},\"compiledFlowContract\":{\"acceptanceScenarios\":[],\"actions\":[{\"actor\":\"admin\",\"code\":\"lend_out\",\"name\":\"借出\",\"ownerObject\":\"borrowing_record\",\"ownerTable\":\"borrowing_record\",\"preconditions\":[],\"quantityEffects\":[{\"actionCode\":\"lend_out\",\"amount\":\"1\",\"effectType\":\"decrease\",\"objectCode\":\"book_info\",\"quantityField\":\"stock\",\"tableName\":\"book_info\"}],\"recordEffects\":[],\"required\":true,\"stateTransitions\":[{\"actionCode\":\"lend_out\",\"fromState\":\"pending\",\"toState\":\"borrowing\"}]},{\"actor\":\"admin\",\"code\":\"return_book\",\"name\":\"归还\",\"ownerObject\":\"borrowing_record\",\"ownerTable\":\"borrowing_record\",\"preconditions\":[],\"quantityEffects\":[{\"actionCode\":\"return_book\",\"amount\":\"1\",\"effectType\":\"increase\",\"objectCode\":\"book_info\",\"quantityField\":\"stock\",\"tableName\":\"book_info\"}],\"recordEffects\":[],\"required\":true,\"stateTransitions\":[{\"actionCode\":\"return_book\",\"fromState\":\"borrowing\",\"toState\":\"returned\"}]}],\"businessPolicies\":[],\"coreObjects\":[{\"code\":\"borrowing_record\",\"name\":\"借阅管理流程\",\"objectType\":\"main\",\"tableName\":\"borrowing_record\"},{\"code\":\"book_info\",\"name\":\"book_info\",\"objectType\":\"related\",\"tableName\":\"book_info\"}],\"domainName\":\"借阅管理流程\",\"metrics\":[{\"aggregate\":\"count\",\"code\":\"borrowing_count\",\"field\":\"id\",\"filters\":[{\"field\":\"status\",\"operator\":\"eq\",\"values\":[\"borrowing\"]}],\"name\":\"借阅中数量\",\"relatedActionCodes\":[],\"required\":true,\"tableName\":\"borrowing_record\",\"unit\":\"条\"},{\"aggregate\":\"count\",\"code\":\"overdue_count\",\"field\":\"id\",\"filters\":[{\"field\":\"status\",\"operator\":\"eq\",\"values\":[\"overdue\"]}],\"name\":\"逾期未还数量\",\"relatedActionCodes\":[],\"required\":true,\"tableName\":\"borrowing_record\",\"unit\":\"条\"}],\"pageBindings\":[{\"actionCode\":\"lend_out\",\"pageCode\":\"borrowing_admin_page\",\"slot\":\"list.rowActions\",\"tableName\":\"borrowing_record\",\"target\":\"admin\"},{\"actionCode\":\"return_book\",\"pageCode\":\"borrowing_admin_page\",\"slot\":\"list.rowActions\",\"tableName\":\"borrowing_record\",\"target\":\"admin\"}],\"quantityRules\":[{\"actionCode\":\"lend_out\",\"amount\":\"1\",\"effectType\":\"decrease\",\"objectCode\":\"book_info\",\"quantityField\":\"stock\",\"tableName\":\"book_info\"},{\"actionCode\":\"return_book\",\"amount\":\"1\",\"effectType\":\"increase\",\"objectCode\":\"book_info\",\"quantityField\":\"stock\",\"tableName\":\"book_info\"}],\"recordRules\":[],\"stateMachines\":[{\"objectCode\":\"borrowing_record\",\"states\":[\"pending\",\"borrowing\",\"returned\",\"overdue\"],\"statusField\":\"status\",\"tableName\":\"borrowing_record\",\"transitions\":[{\"actionCode\":\"lend_out\",\"fromState\":\"pending\",\"toState\":\"borrowing\"},{\"actionCode\":\"return_book\",\"fromState\":\"borrowing\",\"toState\":\"returned\"}]}]},\"canonicalTableRegistry\":[\"book_info\",\"borrowing_record\",\"reservation\",\"user\",\"carousel\",\"announcement\",\"news\",\"admin\"],\"limits\":{\"maxTables\":12,\"maxColumnsPerTable\":30}}', '{\"attemptCount\":2,\"responses\":[\"{\\n \\\"tables\\\": [\\n {\\n \\\"tableName\\\": \\\"book_info\\\",\\n \\\"tableComment\\\": \\\"图书信息表\\\",\\n \\\"adminMenuName\\\": \\\"图书管理\\\",\\n \\\"operations\\\": {\\n \\\"add\\\": true,\\n \\\"edit\\\": true,\\n \\\"remove\\\": true,\\n \\\"removeType\\\": \\\"physical\\\",\\n \\\"reason\\\": \\\"\\\"\\n },\\n \\\"columns\\\": [\\n {\\n \\\"columnName\\\": \\\"id\\\",\\n \\\"columnLabel\\\": \\\"ID\\\",\\n \\\"columnComment\\\": \\\"主键ID\\\",\\n \\\"columnType\\\": \\\"bigint(20)\\\",\\n \\\"isPk\\\": \\\"1\\\",\\n \\\"isIncrement\\\": \\\"1\\\",\\n \\\"isRequired\\\": \\\"1\\\"\\n },\\n {\\n \\\"columnName\\\": \\\"title\\\",\\n \\\"columnLabel\\\": \\\"书名\\\",\\n \\\"columnComment\\\": \\\"图书名称\\\",\\n \\\"columnType\\\": \\\"varchar(200)\\\",\\n \\\"isPk\\\": \\\"0\\\",\\n \\\"isIncrement\\\": \\\"0\\\",\\n \\\"isRequired\\\": \\\"1\\\"\\n },\\n {\\n \\\"columnName\\\": \\\"author\\\",\\n \\\"columnLabel\\\": \\\"作者\\\",\\n \\\"columnComment\\\": \\\"图书作者\\\",\\n \\\"columnType\\\": \\\"varchar(100)\\\",\\n \\\"isPk\\\": \\\"0\\\",\\n \\\"isIncrement\\\": \\\"0\\\",\\n \\\"isRequired\\\": \\\"1\\\"\\n },\\n {\\n \\\"columnName\\\": \\\"isbn\\\",\\n \\\"columnLabel\\\": \\\"ISBN\\\",\\n \\\"columnComment\\\": \\\"国际标准书号\\\",\\n \\\"columnType\\\": \\\"varchar(20)\\\",\\n \\\"isPk\\\": \\\"0\\\",\\n \\\"isIncrement\\\": \\\"0\\\",\\n \\\"isRequired\\\": \\\"1\\\"\\n },\\n {\\n \\\"columnName\\\": \\\"category\\\",\\n \\\"columnLabel\\\": \\\"分类\\\",\\n \\\"columnComment\\\": \\\"图书分类\\\",\\n \\\"columnType\\\": \\\"varchar(50)\\\",\\n \\\"isPk\\\": \\\"0\\\",\\n \\\"isIncrement\\\": \\\"0\\\",\\n \\\"isRequired\\\": \\\"0\\\",\\n \\\"htmlType\\\": \\\"select\\\",\\n \\\"dictType\\\": \\\"book_category\\\",\\n \\\"dictOptions\\\": [\\\"文学\\\", \\\"科技\\\", \\\"历史\\\", \\\"艺术\\\", \\\"教育\\\"]\\n },\\n {\\n \\\"columnName\\\": \\\"description\\\",\\n \\\"columnLabel\\\": \\\"描述\\\",\\n \\\"columnComment\\\": \\\"图书简介\\\",\\n \\\"columnType\\\": \\\"text\\\",\\n \\\"isPk\\\": \\\"0\\\",\\n \\\"isIncrement\\\": \\\"0\\\",\\n \\\"isRequired\\\": \\\"0\\\"\\n },\\n {\\n \\\"columnName\\\": \\\"publisher\\\",\\n \\\"columnLabel\\\": \\\"出版社\\\",\\n \\\"columnComment\\\": \\\"出版社名称\\\",\\n \\\"columnType\\\": \\\"varchar(100)\\\",\\n \\\"isPk\\\": \\\"0\\\",\\n \\\"isIncrement\\\": \\\"0\\\",\\n \\\"isRequired\\\": \\\"0\\\"\\n },\\n {\\n \\\"columnName\\\": \\\"publish_date\\\",\\n \\\"columnLabel\\\": \\\"出版日期\\\",\\n \\\"columnComment\\\": \\\"出版日期\\\",\\n \\\"columnType\\\": \\\"date\\\",\\n \\\"isPk\\\": \\\"0\\\",\\n \\\"isIncrement\\\": \\\"0\\\",\\n \\\"isRequired\\\": \\\"0\\\"\\n },\\n {\\n \\\"columnName\\\": \\\"stock\\\",\\n \\\"columnLabel\\\": \\\"库存\\\",\\n \\\"columnComment\\\": \\\"当前库存数量\\\",\\n \\\"columnType\\\": \\\"int(11)\\\",\\n \\\"isPk\\\": \\\"0\\\",\\n \\\"isIncrement\\\": \\\"0\\\",\\n \\\"isRequired\\\": \\\"1\\\",\\n \\\"defaultValue\\\": \\\"0\\\"\\n },\\n {\\n \\\"columnName\\\": \\\"cover_image\\\",\\n \\\"columnLabel\\\": \\\"封面图片\\\",\\n \\\"columnComment\\\": \\\"图书封面图片URL\\\",\\n \\\"columnType\\\": \\\"varchar(255)\\\",\\n \\\"isPk\\\": \\\"0\\\",\\n \\\"isIncrement\\\": \\\"0\\\",\\n \\\"isRequired\\\": \\\"0\\\",\\n \\\"htmlType\\\": \\\"imageUpload\\\"\\n },\\n {\\n \\\"columnName\\\": \\\"status\\\",\\n \\\"columnLabel\\\": \\\"状态\\\",\\n \\\"columnComment\\\": \\\"图书状态enabled=上架disabled=下架\\\",\\n \\\"columnType\\\": \\\"varchar(20)\\\",\\n \\\"isPk\\\": \\\"0\\\",\\n \\\"isIncrement\\\": \\\"0\\\",\\n \\\"isRequired\\\": \\\"1\\\",\\n \\\"htmlType\\\": \\\"radio\\\",\\n \\\"dictType\\\": \\\"book_status\\\",\\n \\\"dictOptions\\\": [\\\"enabled\\\", \\\"disabled\\\"]\\n },\\n {\\n \\\"columnName\\\": \\\"create_time\\\",\\n \\\"columnLabel\\\": \\\"创建时间\\\",\\n \\\"columnComment\\\": \\\"记录创建时间\\\",\\n \\\"columnType\\\": \\\"datetime\\\",\\n \\\"isPk\\\": \\\"0\\\",\\n \\\"isIncrement\\\": \\\"0\\\",\\n \\\"isRequired\\\": \\\"0\\\"\\n },\\n {\\n \\\"columnName\\\": \\\"update_time\\\",\\n \\\"columnLabel\\\": \\\"更新时间\\\",\\n \\\"columnComment\\\": \\\"记录更新时间\\\",\\n \\\"columnType\\\": \\\"datetime\\\",\\n \\\"isPk\\\": \\\"0\\\",\\n \\\"isIncrement\\\": \\\"0\\\",\\n \\\"isRequired\\\": \\\"0\\\"\\n }\\n ]\\n },\\n {\\n \\\"tableName\\\": \\\"borrowing_record\\\",\\n \\\"tableComment\\\": \\\"借阅记录表\\\",\\n \\\"adminMenuName\\\": \\\"借阅管理\\\",\\n \\\"operations\\\": {\\n \\\"add\\\": true,\\n \\\"edit\\\": false,\\n \\\"remove\\\": false,\\n \\\"removeType\\\": \\\"physical\\\",\\n \\\"reason\\\": \\\"借阅记录仅可新增,不可编辑删除\\\"\\n },\\n \\\"columns\\\": [\\n {\\n \\\"columnName\\\": \\\"id\\\",\\n \\\"columnLabel\\\": \\\"ID\\\",\\n \\\"columnComment\\\": \\\"主键ID\\\",\\n \\\"columnType\\\": \\\"bigint(20)\\\",\\n \\\"isPk\\\": \\\"1\\\",\\n \\\"isIncrement\\\": \\\"1\\\",\\n \\\"isRequired\\\": \\\"1\\\"\\n },\\n {\\n \\\"columnName\\\": \\\"user_id\\\",\\n \\\"columnLabel\\\": \\\"借阅用户\\\",\\n \\\"columnComment\\\": \\\"借阅用户ID关联user表\\\",\\n \\\"columnType\\\": \\\"bigint(20)\\\",\\n \\\"isPk\\\": \\\"0\\\",\\n \\\"isIncrement\\\": \\\"0\\\",\\n \\\"isRequired\\\": \\\"1\\\",\\n \\\"htmlType\\\": \\\"select\\\",\\n \\\"dictType\\\": \\\"remote:user:user_id:username\\\"\\n },\\n {\\n \\\"columnName\\\": \\\"book_id\\\",\\n \\\"columnLabel\\\": \\\"借阅图书\\\",\\n \\\"columnComment\\\": \\\"借阅图书ID关联book_info表\\\",\\n \\\"columnType\\\": \\\"bigint(20)\\\",\\n \\\"isPk\\\": \\\"0\\\",\\n \\\"isIncrement\\\": \\\"0\\\",\\n \\\"isRequired\\\": \\\"1\\\",\\n \\\"htmlType\\\": \\\"select\\\",\\n \\\"dictType\\\": \\\"remote:book_info:book_id:title\\\"\\n },\\n {\\n \\\"columnName\\\": \\\"status\\\",\\n \\\"columnLabel\\\": \\\"状态\\\",\\n \\\"columnComment\\\": \\\"借阅状态pending=待借出borrowing=借阅中returned=已归还overdue=逾期\\\",\\n \\\"columnType\\\": \\\"varchar(20)\\\",\\n \\\"isPk\\\": \\\"0\\\",\\n \\\"isIncrement\\\": \\\"0\\\",\\n \\\"isRequired\\\": \\\"1\\\",\\n \\\"htmlType\\\": \\\"select\\\",\\n \\\"dictType\\\": \\\"borrowing_status\\\",\\n \\\"dictOptions\\\": [\\\"pending\\\", \\\"borrowing\\\", \\\"returned\\\", \\\"overdue\\\"]\\n },\\n {\\n \\\"columnName\\\": \\\"borrow_time\\\",\\n \\\"columnLabel\\\": \\\"借出时间\\\",\\n \\\"columnComment\\\": \\\"管理员借出操作时间\\\",\\n \\\"columnType\\\": \\\"datetime\\\",\\n \\\"isPk\\\": \\\"0\\\",\\n \\\"isIncrement\\\": \\\"0\\\",\\n \\\"isRequired\\\": \\\"0\\\"\\n },\\n {\\n \\\"columnName\\\": \\\"due_time\\\",\\n \\\"columnLabel\\\": \\\"应还时间\\\",\\n \\\"columnComment\\\": \\\"预计归还时间\\\",\\n \\\"columnType\\\": \\\"datetime\\\",\\n \\\"isPk\\\": \\\"0\\\",\\n \\\"isIncrement\\\": \\\"0\\\",\\n \\\"isRequired\\\": \\\"0\\\"\\n },\\n {\\n \\\"columnName\\\": \\\"return_time\\\",\\n \\\"columnLabel\\\": \\\"归还时间\\\",\\n \\\"columnComment\\\": \\\"实际归还时间\\\",\\n \\\"columnType\\\": \\\"datetime\\\",\\n \\\"isPk\\\": \\\"0\\\",\\n \\\"isIncrement\\\": \\\"0\\\",\\n \\\"isRequired\\\": \\\"0\\\"\\n },\\n {\\n \\\"columnName\\\": \\\"lend_admin_id\\\",\\n \\\"columnLabel\\\": \\\"借出管理员\\\",\\n \\\"columnComment\\\": \\\"执行借出操作的管理员ID关联admin表\\\",\\n \\\"columnType\\\": \\\"bigint(20)\\\",\\n \\\"isPk\\\": \\\"0\\\",\\n \\\"isIncrement\\\": \\\"0\\\",\\n \\\"isRequired\\\": \\\"0\\\",\\n \\\"htmlType\\\": \\\"select\\\",\\n \\\"dictType\\\": \\\"remote:admin:admin_id:username\\\"\\n },\\n {\\n \\\"columnName\\\": \\\"return_admin_id\\\",\\n \\\"columnLabel\\\": \\\"归还管理员\\\",\\n \\\"columnComment\\\": \\\"执行归还操作的管理员ID关联admin表\\\",\\n \\\"columnType\\\": \\\"bigint(20)\\\",\\n \\\"isPk\\\": \\\"0\\\",\\n \\\"isIncrement\\\": \\\"0\\\",\\n \\\"isRequired\\\": \\\"0\\\",\\n \\\"htmlType\\\": \\\"select\\\",\\n \\\"dictType\\\": \\\"remote:admin:admin_id:username\\\"\\n },\\n {\\n \\\"columnName\\\": \\\"create_time\\\",\\n \\\"columnLabel\\\": \\\"创建时间\\\",\\n \\\"columnComment\\\": \\\"记录创建时间\\\",\\n \\\"columnType\\\": \\\"datetime\\\",\\n \\\"isPk\\\": \\\"0\\\",\\n \\\"isIncrement\\\": \\\"0\\\",\\n \\\"isRequired\\\": \\\"0\\\"\\n },\\n {\\n \\\"columnName\\\": \\\"update_time\\\",\\n \\\"columnLabel\\\": \\\"更新时间\\\",\\n \\\"columnComment\\\": \\\"记录更新时间\\\",\\n \\\"columnType\\\": \\\"datetime\\\",\\n \\\"isPk\\\": \\\"0\\\",\\n \\\"isIncrement\\\": \\\"0\\\",\\n \\\"isRequired\\\": \\\"0\\\"\\n }\\n ]\\n },\\n {\\n \\\"tableName\\\": \\\"reservation\\\",\\n \\\"tableComment\\\": \\\"预约记录表\\\",\\n \\\"adminMenuName\\\": \\\"预约管理\\\",\\n \\\"operations\\\": {\\n \\\"add\\\": true,\\n \\\"edit\\\": false,\\n \\\"remove\\\": false,\\n \\\"removeType\\\": \\\"physical\\\",\\n \\\"reason\\\": \\\"预约记录仅可新增,不可编辑删除\\\"\\n },\\n \\\"columns\\\": [\\n {\\n \\\"columnName\\\": \\\"id\\\",\\n \\\"columnLabel\\\": \\\"ID\\\",\\n \\\"columnComment\\\": \\\"主键ID\\\",\\n \\\"columnType\\\": \\\"bigint(20)\\\",\\n \\\"isPk\\\": \\\"1\\\",\\n \\\"isIncrement\\\": \\\"1\\\",\\n \\\"isRequired\\\": \\\"1\\\"\\n },\\n {\\n \\\"columnName\\\": \\\"user_id\\\",\\n \\\"columnLabel\\\": \\\"预约用户\\\",\\n \\\"columnComment\\\": \\\"预约用户ID关联user表\\\",\\n \\\"columnType\\\": \\\"bigint(20)\\\",\\n \\\"isPk\\\": \\\"0\\\",\\n \\\"isIncrement\\\": \\\"0\\\",\\n \\\"isRequired\\\": \\\"1\\\",\\n \\\"htmlType\\\": \\\"select\\\",\\n \\\"dictType\\\": \\\"remote:user:user_id:username\\\"\\n },\\n {\\n \\\"columnName\\\": \\\"book_id\\\",\\n \\\"columnLabel\\\": \\\"预约图书\\\",\\n \\\"columnComment\\\": \\\"预约图书ID关联book_info表\\\",\\n \\\"columnType\\\": \\\"bigint(20)\\\",\\n \\\"isPk\\\": \\\"0\\\",\\n \\\"isIncrement\\\": \\\"0\\\",\\n \\\"isRequired\\\": \\\"1\\\",\\n \\\"htmlType\\\": \\\"select\\\",\\n \\\"dictType\\\": \\\"remote:book_info:book_id:title\\\"\\n },\\n {\\n \\\"columnName\\\": \\\"status\\\",\\n \\\"columnLabel\\\": \\\"状态\\\",\\n \\\"columnComment\\\": \\\"预约状态pending=待处理confirmed=已确认cancelled=已取消\\\",\\n \\\"columnType\\\": \\\"varchar(20)\\\",\\n \\\"isPk\\\": \\\"0\\\",\\n \\\"isIncrement\\\": \\\"0\\\",\\n \\\"isRequired\\\": \\\"1\\\",\\n \\\"htmlType\\\": \\\"select\\\",\\n \\\"dictType\\\": \\\"reservation_status\\\",\\n \\\"dictOptions\\\": [\\\"pending\\\", \\\"confirmed\\\", \\\"cancelled\\\"]\\n },\\n {\\n \\\"columnName\\\": \\\"reserve_time\\\",\\n \\\"columnLabel\\\": \\\"预约时间\\\",\\n \\\"columnComment\\\": \\\"用户预约时间\\\",\\n \\\"columnType\\\": \\\"datetime\\\",\\n \\\"isPk\\\": \\\"0\\\",\\n \\\"isIncrement\\\": \\\"0\\\",\\n \\\"isRequired\\\": \\\"1\\\"\\n },\\n {\\n \\\"columnName\\\": \\\"expire_time\\\",\\n \\\"columnLabel\\\": \\\"过期时间\\\",\\n \\\"columnComment\\\": \\\"预约自动过期时间\\\",\\n \\\"columnType\\\": \\\"datetime\\\",\\n \\\"isPk\\\": \\\"0\\\",\\n \\\"isIncrement\\\": \\\"0\\\",\\n \\\"isRequired\\\": \\\"0\\\"\\n },\\n {\\n \\\"columnName\\\": \\\"create_time\\\",\\n \\\"columnLabel\\\": \\\"创建时间\\\",\\n \\\"columnComment\\\": \\\"记录创建时间\\\",\\n \\\"columnType\\\": \\\"datetime\\\",\\n \\\"isPk\\\": \\\"0\\\",\\n \\\"isIncrement\\\": \\\"0\\\",\\n \\\"isRequired\\\": \\\"0\\\"\\n },\\n {\\n \\\"columnName\\\": \\\"update_time\\\",\\n \\\"columnLabel\\\": \\\"更新时间\\\",\\n \\\"columnComment\\\": \\\"记录更新时间\\\",\\n \\\"columnType\\\": \\\"datetime\\\",\\n \\\"isPk\\\": \\\"0\\\",\\n \\\"isIncrement\\\": \\\"0\\\",\\n \\\"isRequired\\\": \\\"0\\\"\\n }\\n ]\\n },\\n {\\n \\\"tableName\\\": \\\"user\\\",\\n \\\"tableComment\\\": \\\"用户账号表\\\",\\n \\\"adminMenuName\\\": \\\"用户管理\\\",\\n \\\"operations\\\": {\\n \\\"add\\\": true,\\n \\\"edit\\\": true,\\n \\\"remove\\\": true,\\n \\\"removeType\\\": \\\"physical\\\",\\n \\\"reason\\\": \\\"删除用户会同时删除其借阅和预约记录(级联注意)\\\"\\n },\\n \\\"columns\\\": [\\n {\\n \\\"columnName\\\": \\\"user_id\\\",\\n \\\"columnLabel\\\": \\\"用户ID\\\",\\n \\\"columnComment\\\": \\\"主键自增用户ID\\\",\\n \\\"columnType\\\": \\\"bigint(20)\\\",\\n \\\"isPk\\\": \\\"1\\\",\\n \\\"isIncrement\\\": \\\"1\\\",\\n \\\"isRequired\\\": \\\"1\\\"\\n },\\n {\\n \\\"columnName\\\": \\\"username\\\",\\n \\\"columnLabel\\\": \\\"用户名\\\",\\n \\\"columnComment\\\": \\\"登录用户名,唯一\\\",\\n \\\"columnType\\\": \\\"varchar(50)\\\",\\n \\\"isPk\\\": \\\"0\\\",\\n \\\"isIncrement\\\": \\\"0\\\",\\n \\\"isRequired\\\": \\\"1\\\"\\n },\\n {\\n \\\"columnName\\\": \\\"password_hash\\\",\\n \\\"columnLabel\\\": \\\"密码哈希\\\",\\n \\\"columnComment\\\": \\\"经过哈希处理的密码\\\",\\n \\\"columnType\\\": \\\"varchar(255)\\\",\\n \\\"isPk\\\": \\\"0\\\",\\n \\\"isIncrement\\\": \\\"0\\\",\\n \\\"isRequired\\\": \\\"1\\\"\\n },\\n {\\n \\\"columnName\\\": \\\"nickname\\\",\\n \\\"columnLabel\\\": \\\"昵称\\\",\\n \\\"columnComment\\\": \\\"用户显示名称\\\",\\n \\\"columnType\\\": \\\"varchar(50)\\\",\\n \\\"isPk\\\": \\\"0\\\",\\n \\\"isIncrement\\\": \\\"0\\\",\\n \\\"isRequired\\\": \\\"0\\\"\\n },\\n {\\n \\\"columnName\\\": \\\"email\\\",\\n \\\"columnLabel\\\": \\\"邮箱\\\",\\n \\\"columnComment\\\": \\\"用户邮箱\\\",\\n \\\"columnType\\\": \\\"varchar(100)\\\",\\n \\\"isPk\\\": \\\"0\\\",\\n \\\"isIncrement\\\": \\\"0\\\",\\n \\\"isRequired\\\": \\\"0\\\"\\n },\\n {\\n \\\"columnName\\\": \\\"phone\\\",\\n \\\"columnLabel\\\": \\\"手机号\\\",\\n \\\"columnComment\\\": \\\"用户手机号码\\\",\\n \\\"columnType\\\": \\\"varchar(20)\\\",\\n \\\"isPk\\\": \\\"0\\\",\\n \\\"isIncrement\\\": \\\"0\\\",\\n \\\"isRequired\\\": \\\"0\\\"\\n },\\n {\\n \\\"columnName\\\": \\\"avatar\\\",\\n \\\"columnLabel\\\": \\\"头像\\\",\\n \\\"columnComment\\\": \\\"用户头像URL\\\",\\n \\\"columnType\\\": \\\"varchar(255)\\\",\\n \\\"isPk\\\": \\\"0\\\",\\n \\\"isIncrement\\\": \\\"0\\\",\\n \\\"isRequired\\\": \\\"0\\\",\\n \\\"htmlType\\\": \\\"imageUpload\\\"\\n },\\n {\\n \\\"columnName\\\": \\\"status\\\",\\n \\\"columnLabel\\\": \\\"状态\\\",\\n \\\"columnComment\\\": \\\"用户状态active=正常inactive=禁用\\\",\\n \\\"columnType\\\": \\\"varchar(20)\\\",\\n \\\"isPk\\\": \\\"0\\\",\\n \\\"isIncrement\\\": \\\"0\\\",\\n \\\"isRequired\\\": \\\"1\\\",\\n \\\"htmlType\\\": \\\"radio\\\",\\n \\\"dictType\\\": \\\"user_status\\\",\\n \\\"dictOptions\\\": [\\\"active\\\", \\\"inactive\\\"]\\n },\\n {\\n \\\"columnName\\\": \\\"create_time\\\",\\n \\\"columnLabel\\\": \\\"创建时间\\\",\\n \\\"columnComment\\\": \\\"记录创建时间\\\",\\n \\\"columnType\\\": \\\"datetime\\\",\\n \\\"isPk\\\": \\\"0\\\",\\n \\\"isIncrement\\\": \\\"0\\\",\\n \\\"isRequired\\\": \\\"0\\\"\\n },\\n {\\n \\\"columnName\\\": \\\"update_time\\\",\\n \\\"columnLabel\\\": \\\"更新时间\\\",\\n \\\"columnComment\\\": \\\"记录更新时间\\\",\\n \\\"columnType\\\": \\\"datetime\\\",\\n \\\"isPk\\\": \\\"0\\\",\\n \\\"isIncrement\\\": \\\"0\\\",\\n \\\"isRequired\\\": \\\"0\\\"\\n }\\n ]\\n },\\n {\\n \\\"tableName\\\": \\\"admin\\\",\\n \\\"tableComment\\\": \\\"管理员账号表\\\",\\n \\\"adminMenuName\\\": \\\"管理员个人资料\\\",\\n \\\"operations\\\": {\\n \\\"add\\\": false,\\n \\\"edit\\\": true,\\n \\\"remove\\\": false,\\n \\\"removeType\\\": \\\"physical\\\",\\n \\\"reason\\\": \\\"管理员账号由系统初始化,不支持新增和删除\\\"\\n },\\n \\\"columns\\\": [\\n {\\n \\\"columnName\\\": \\\"admin_id\\\",\\n \\\"columnLabel\\\": \\\"管理员ID\\\",\\n \\\"columnComment\\\": \\\"主键自增管理员ID\\\",\\n \\\"columnType\\\": \\\"bigint(20)\\\",\\n \\\"isPk\\\": \\\"1\\\",\\n \\\"isIncrement\\\": \\\"1\\\",\\n \\\"isRequired\\\": \\\"1\\\"\\n },\\n {\\n \\\"columnName\\\": \\\"username\\\",\\n \\\"columnLabel\\\": \\\"用户名\\\",\\n \\\"columnComment\\\": \\\"登录用户名,唯一\\\",\\n \\\"columnType\\\": \\\"varchar(50)\\\",\\n \\\"isPk\\\": \\\"0\\\",\\n \\\"isIncrement\\\": \\\"0\\\",\\n \\\"isRequired\\\": \\\"1\\\"\\n },\\n {\\n \\\"columnName\\\": \\\"password_hash\\\",\\n \\\"columnLabel\\\": \\\"密码哈希\\\",\\n \\\"columnComment\\\": \\\"经过哈希处理的密码\\\",\\n \\\"columnType\\\": \\\"varchar(255)\\\",\\n \\\"isPk\\\": \\\"0\\\",\\n \\\"isIncrement\\\": \\\"0\\\",\\n \\\"isRequired\\\": \\\"1\\\"\\n },\\n {\\n \\\"columnName\\\": \\\"nickname\\\",\\n \\\"columnLabel\\\": \\\"昵称\\\",\\n \\\"columnComment\\\": \\\"管理员显示名称\\\",\\n \\\"columnType\\\": \\\"varchar(50)\\\",\\n \\\"isPk\\\": \\\"0\\\",\\n \\\"isIncrement\\\": \\\"0\\\",\\n \\\"isRequired\\\": \\\"0\\\"\\n },\\n {\\n \\\"columnName\\\": \\\"email\\\",\\n \\\"columnLabel\\\": \\\"邮箱\\\",\\n \\\"columnComment\\\": \\\"管理员邮箱\\\",\\n \\\"columnType\\\": \\\"varchar(100)\\\",\\n \\\"isPk\\\": \\\"0\\\",\\n \\\"isIncrement\\\": \\\"0\\\",\\n \\\"isRequired\\\": \\\"0\\\"\\n },\\n {\\n \\\"columnName\\\": \\\"status\\\",\\n \\\"columnLabel\\\": \\\"状态\\\",\\n \\\"columnComment\\\": \\\"管理员状态active=正常inactive=禁用\\\",\\n \\\"columnType\\\": \\\"varchar(20)\\\",\\n \\\"isPk\\\": \\\"0\\\",\\n \\\"isIncrement\\\": \\\"0\\\",\\n \\\"isRequired\\\": \\\"1\\\",\\n \\\"htmlType\\\": \\\"radio\\\",\\n \\\"dictType\\\": \\\"admin_status\\\",\\n \\\"dictOptions\\\": [\\\"active\\\", \\\"inactive\\\"]\\n },\\n {\\n \\\"columnName\\\": \\\"create_time\\\",\\n \\\"columnLabel\\\": \\\"创建时间\\\",\\n \\\"columnComment\\\": \\\"记录创建时间\\\",\\n \\\"columnType\\\": \\\"datetime\\\",\\n \\\"isPk\\\": \\\"0\\\",\\n \\\"isIncrement\\\": \\\"0\\\",\\n \\\"isRequired\\\": \\\"0\\\"\\n },\\n {\\n \\\"columnName\\\": \\\"update_time\\\",\\n \\\"columnLabel\\\": \\\"更新时间\\\",\\n \\\"columnComment\\\": \\\"记录更新时间\\\",\\n \\\"columnType\\\": \\\"datetime\\\",\\n \\\"isPk\\\": \\\"0\\\",\\n \\\"isIncrement\\\": \\\"0\\\",\\n \\\"isRequired\\\": \\\"0\\\"\\n }\\n ]\\n },\\n {\\n \\\"tableName\\\": \\\"carousel\\\",\\n \\\"tableComment\\\": \\\"轮播图表\\\",\\n \\\"adminMenuName\\\": \\\"轮播图管理\\\",\\n \\\"operations\\\": {\\n \\\"add\\\": true,\\n \\\"edit\\\": true,\\n \\\"remove\\\": true,\\n \\\"removeType\\\": \\\"physical\\\",\\n \\\"reason\\\": \\\"\\\"\\n },\\n \\\"columns\\\": [\\n {\\n \\\"columnName\\\": \\\"id\\\",\\n \\\"columnLabel\\\": \\\"ID\\\",\\n \\\"columnComment\\\": \\\"主键ID\\\",\\n \\\"columnType\\\": \\\"bigint(20)\\\",\\n \\\"isPk\\\": \\\"1\\\",\\n \\\"isIncrement\\\": \\\"1\\\",\\n \\\"isRequired\\\": \\\"1\\\"\\n },\\n {\\n \\\"columnName\\\": \\\"title\\\",\\n \\\"columnLabel\\\": \\\"标题\\\",\\n \\\"columnComment\\\": \\\"轮播图标题\\\",\\n \\\"columnType\\\": \\\"varchar(100)\\\",\\n \\\"isPk\\\": \\\"0\\\",\\n \\\"isIncrement\\\": \\\"0\\\",\\n \\\"isRequired\\\": \\\"0\\\"\\n },\\n {\\n \\\"columnName\\\": \\\"image_url\\\",\\n \\\"columnLabel\\\": \\\"图片地址\\\",\\n \\\"columnComment\\\": \\\"轮播图图片URL\\\",\\n \\\"columnType\\\": \\\"varchar(255)\\\",\\n \\\"isPk\\\": \\\"0\\\",\\n \\\"isIncrement\\\": \\\"0\\\",\\n \\\"isRequired\\\": \\\"1\\\",\\n \\\"htmlType\\\": \\\"imageUpload\\\"\\n },\\n {\\n \\\"columnName\\\": \\\"link_url\\\",\\n \\\"columnLabel\\\": \\\"链接地址\\\",\\n \\\"columnComment\\\": \\\"点击跳转链接\\\",\\n \\\"columnType\\\": \\\"varchar(255)\\\",\\n \\\"isPk\\\": \\\"0\\\",\\n \\\"isIncrement\\\": \\\"0\\\",\\n \\\"isRequired\\\": \\\"0\\\"\\n },\\n {\\n \\\"columnName\\\": \\\"sort_order\\\",\\n \\\"columnLabel\\\": \\\"排序\\\",\\n \\\"columnComment\\\": \\\"显示顺序,数值越小越靠前\\\",\\n \\\"columnType\\\": \\\"int(11)\\\",\\n \\\"isPk\\\": \\\"0\\\",\\n \\\"isIncrement\\\": \\\"0\\\",\\n \\\"isRequired\\\": \\\"0\\\",\\n \\\"defaultValue\\\": \\\"0\\\"\\n },\\n {\\n \\\"columnName\\\": \\\"status\\\",\\n \\\"columnLabel\\\": \\\"状态\\\",\\n \\\"columnComment\\\": \\\"状态enabled=启用disabled=禁用\\\",\\n \\\"columnType\\\": \\\"varchar(20)\\\",\\n \\\"isPk\\\": \\\"0\\\",\\n \\\"isIncrement\\\": \\\"0\\\",\\n \\\"isRequired\\\": \\\"1\\\",\\n \\\"htmlType\\\": \\\"radio\\\",\\n \\\"dictType\\\": \\\"carousel_status\\\",\\n \\\"dictOptions\\\": [\\\"enabled\\\", \\\"disabled\\\"]\\n },\\n {\\n \\\"columnName\\\": \\\"create_time\\\",\\n \\\"columnLabel\\\": \\\"创建时间\\\",\\n \\\"columnComment\\\": \\\"记录创建时间\\\",\\n \\\"columnType\\\": \\\"datetime\\\",\\n \\\"isPk\\\": \\\"0\\\",\\n \\\"isIncrement\\\": \\\"0\\\",\\n \\\"isRequired\\\": \\\"0\\\"\\n },\\n {\\n \\\"columnName\\\": \\\"update_time\\\",\\n \\\"columnLabel\\\": \\\"更新时间\\\",\\n \\\"columnComment\\\": \\\"记录更新时间\\\",\\n \\\"columnType\\\": \\\"datetime\\\",\\n \\\"isPk\\\": \\\"0\\\",\\n \\\"isIncrement\\\": \\\"0\\\",\\n \\\"isRequired\\\": \\\"0\\\"\\n }\\n ]\\n },\\n {\\n \\\"tableName\\\": \\\"announcement\\\",\\n \\\"tableComment\\\": \\\"公告表\\\",\\n \\\"adminMenuName\\\": \\\"公告管理\\\",\\n \\\"operations\\\": {\\n \\\"add\\\": true,\\n \\\"edit\\\": true,\\n \\\"remove\\\": true,\\n \\\"removeType\\\": \\\"physical\\\",\\n \\\"reason\\\": \\\"\\\"\\n },\\n \\\"columns\\\": [\\n {\\n \\\"columnName\\\": \\\"id\\\",\\n \\\"columnLabel\\\": \\\"ID\\\",\\n \\\"columnComment\\\": \\\"主键ID\\\",\\n \\\"columnType\\\": \\\"bigint(20)\\\",\\n \\\"isPk\\\": \\\"1\\\",\\n \\\"isIncrement\\\": \\\"1\\\",\\n \\\"isRequired\\\": \\\"1\\\"\\n },\\n {\\n \\\"columnName\\\": \\\"title\\\",\\n \\\"columnLabel\\\": \\\"标题\\\",\\n \\\"columnComment\\\": \\\"公告标题\\\",\\n \\\"columnType\\\": \\\"varchar(200)\\\",\\n \\\"isPk\\\": \\\"0\\\",\\n \\\"isIncrement\\\": \\\"0\\\",\\n \\\"isRequired\\\": \\\"1\\\"\\n },\\n {\\n \\\"columnName\\\": \\\"content\\\",\\n \\\"columnLabel\\\": \\\"内容\\\",\\n \\\"columnComment\\\": \\\"公告正文\\\",\\n \\\"columnType\\\": \\\"longtext\\\",\\n \\\"isPk\\\": \\\"0\\\",\\n \\\"isIncrement\\\": \\\"0\\\",\\n \\\"isRequired\\\": \\\"1\\\",\\n \\\"htmlType\\\": \\\"editor\\\"\\n },\\n {\\n \\\"columnName\\\": \\\"publish_user\\\",\\n \\\"columnLabel\\\": \\\"发布人\\\",\\n \\\"columnComment\\\": \\\"发布公告的管理员用户名\\\",\\n \\\"columnType\\\": \\\"varchar(50)\\\",\\n \\\"isPk\\\": \\\"0\\\",\\n \\\"isIncrement\\\": \\\"0\\\",\\n \\\"isRequired\\\": \\\"0\\\"\\n },\\n {\\n \\\"columnName\\\": \\\"publish_time\\\",\\n \\\"columnLabel\\\": \\\"发布时间\\\",\\n \\\"columnComment\\\": \\\"公告正式发布时间\\\",\\n \\\"columnType\\\": \\\"datetime\\\",\\n \\\"isPk\\\": \\\"0\\\",\\n \\\"isIncrement\\\": \\\"0\\\",\\n \\\"isRequired\\\": \\\"0\\\"\\n },\\n {\\n \\\"columnName\\\": \\\"status\\\",\\n \\\"columnLabel\\\": \\\"状态\\\",\\n \\\"columnComment\\\": \\\"状态published=已发布draft=草稿\\\",\\n \\\"columnType\\\": \\\"varchar(20)\\\",\\n \\\"isPk\\\": \\\"0\\\",\\n \\\"isIncrement\\\": \\\"0\\\",\\n \\\"isRequired\\\": \\\"1\\\",\\n \\\"htmlType\\\": \\\"radio\\\",\\n \\\"dictType\\\": \\\"announcement_status\\\",\\n \\\"dictOptions\\\": [\\\"published\\\", \\\"draft\\\"]\\n },\\n {\\n \\\"columnName\\\": \\\"create_time\\\",\\n \\\"columnLabel\\\": \\\"创建时间\\\",\\n \\\"columnComment\\\": \\\"记录创建时间\\\",\\n \\\"columnType\\\": \\\"datetime\\\",\\n \\\"isPk\\\": \\\"0\\\",\\n \\\"isIncrement\\\": \\\"0\\\",\\n \\\"isRequired\\\": \\\"0\\\"\\n },\\n {\\n \\\"columnName\\\": \\\"update_time\\\",\\n \\\"columnLabel\\\": \\\"更新时间\\\",\\n \\\"columnComment\\\": \\\"记录更新时间\\\",\\n \\\"columnType\\\": \\\"datetime\\\",\\n \\\"isPk\\\": \\\"0\\\",\\n \\\"isIncrement\\\": \\\"0\\\",\\n \\\"isRequired\\\": \\\"0\\\"\\n }\\n ]\\n },\\n {\\n \\\"tableName\\\": \\\"news\\\",\\n \\\"tableComment\\\": \\\"新闻表\\\",\\n \\\"adminMenuName\\\": \\\"新闻管理\\\",\\n \\\"operations\\\": {\\n \\\"add\\\": true,\\n \\\"edit\\\": true,\\n \\\"remove\\\": true,\\n \\\"removeType\\\": \\\"physical\\\",\\n \\\"reason\\\": \\\"\\\"\\n },\\n \\\"columns\\\": [\\n {\\n \\\"columnName\\\": \\\"id\\\",\\n \\\"columnLabel\\\": \\\"ID\\\",\\n \\\"columnComment\\\": \\\"主键ID\\\",\\n \\\"columnType\\\": \\\"bigint(20)\\\",\\n \\\"isPk\\\": \\\"1\\\",\\n \\\"isIncrement\\\": \\\"1\\\",\\n \\\"isRequired\\\": \\\"1\\\"\\n },\\n {\\n \\\"columnName\\\": \\\"title\\\",\\n \\\"columnLabel\\\": \\\"标题\\\",\\n \\\"columnComment\\\": \\\"新闻标题\\\",\\n \\\"columnType\\\": \\\"varchar(200)\\\",\\n \\\"isPk\\\": \\\"0\\\",\\n \\\"isIncrement\\\": \\\"0\\\",\\n \\\"isRequired\\\": \\\"1\\\"\\n },\\n {\\n \\\"columnName\\\": \\\"content\\\",\\n \\\"columnLabel\\\": \\\"内容\\\",\\n \\\"columnComment\\\": \\\"新闻正文\\\",\\n \\\"columnType\\\": \\\"longtext\\\",\\n \\\"isPk\\\": \\\"0\\\",\\n \\\"isIncrement\\\": \\\"0\\\",\\n \\\"isRequired\\\": \\\"1\\\",\\n \\\"htmlType\\\": \\\"editor\\\"\\n },\\n {\\n \\\"columnName\\\": \\\"author\\\",\\n \\\"columnLabel\\\": \\\"作者\\\",\\n \\\"columnComment\\\": \\\"新闻作者\\\",\\n \\\"columnType\\\": \\\"varchar(50)\\\",\\n \\\"isPk\\\": \\\"0\\\",\\n \\\"isIncrement\\\": \\\"0\\\",\\n \\\"isRequired\\\": \\\"0\\\"\\n },\\n {\\n \\\"columnName\\\": \\\"publish_time\\\",\\n \\\"columnLabel\\\": \\\"发布时间\\\",\\n \\\"columnComment\\\": \\\"新闻发布时间\\\",\\n \\\"columnType\\\": \\\"datetime\\\",\\n \\\"isPk\\\": \\\"0\\\",\\n \\\"isIncrement\\\": \\\"0\\\",\\n \\\"isRequired\\\": \\\"0\\\"\\n },\\n {\\n \\\"columnName\\\": \\\"status\\\",\\n \\\"columnLabel\\\": \\\"状态\\\",\\n \\\"columnComment\\\": \\\"状态published=已发布draft=草稿\\\",\\n \\\"columnType\\\": \\\"varchar(20)\\\",\\n \\\"isPk\\\": \\\"0\\\",\\n \\\"isIncrement\\\": \\\"0\\\",\\n \\\"isRequired\\\": \\\"1\\\",\\n \\\"htmlType\\\": \\\"radio\\\",\\n \\\"dictType\\\": \\\"news_status\\\",\\n \\\"dictOptions\\\": [\\\"published\\\", \\\"draft\\\"]\\n },\\n {\\n \\\"columnName\\\": \\\"cover_image\\\",\\n \\\"columnLabel\\\": \\\"封面图片\\\",\\n \\\"columnComment\\\": \\\"新闻封面图片URL\\\",\\n \\\"columnType\\\": \\\"varchar(255)\\\",\\n \\\"isPk\\\": \\\"0\\\",\\n \\\"isIncrement\\\": \\\"0\\\",\\n \\\"isRequired\\\": \\\"0\\\",\\n \\\"htmlType\\\": \\\"imageUpload\\\"\\n },\\n {\\n \\\"columnName\\\": \\\"create_time\\\",\\n \\\"columnLabel\\\": \\\"创建时间\\\",\\n \\\"columnComment\\\": \\\"记录创建时间\\\",\\n \\\"columnType\\\": \\\"datetime\\\",\\n \\\"isPk\\\": \\\"0\\\",\\n \\\"isIncrement\\\": \\\"0\\\",\\n \\\"isRequired\\\": \\\"0\\\"\\n },\\n {\\n \\\"columnName\\\": \\\"update_time\\\",\\n \\\"columnLabel\\\": \\\"更新时间\\\",\\n \\\"columnComment\\\": \\\"记录更新时间\\\",\\n \\\"columnType\\\": \\\"datetime\\\",\\n \\\"isPk\\\": \\\"0\\\",\\n \\\"isIncrement\\\": \\\"0\\\",\\n \\\"isRequired\\\": \\\"0\\\"\\n }\\n ]\\n }\\n ]\\n}\",\"{\\n \\\"tables\\\": [\\n {\\n \\\"tableName\\\": \\\"book_info\\\",\\n \\\"tableComment\\\": \\\"图书信息表\\\",\\n \\\"adminMenuName\\\": \\\"图书管理\\\",\\n \\\"operations\\\": {\\n \\\"add\\\": true,\\n \\\"edit\\\": true,\\n \\\"remove\\\": true,\\n \\\"removeType\\\": \\\"physical\\\",\\n \\\"reason\\\": \\\"\\\"\\n },\\n \\\"columns\\\": [\\n {\\n \\\"columnName\\\": \\\"id\\\",\\n \\\"columnLabel\\\": \\\"ID\\\",\\n \\\"columnComment\\\": \\\"主键ID\\\",\\n \\\"columnType\\\": \\\"bigint(20)\\\",\\n \\\"isPk\\\": \\\"1\\\",\\n \\\"isIncrement\\\": \\\"1\\\",\\n \\\"isRequired\\\": \\\"1\\\"\\n },\\n {\\n \\\"columnName\\\": \\\"title\\\",\\n \\\"columnLabel\\\": \\\"书名\\\",\\n \\\"columnComment\\\": \\\"图书名称\\\",\\n \\\"columnType\\\": \\\"varchar(200)\\\",\\n \\\"isPk\\\": \\\"0\\\",\\n \\\"isIncrement\\\": \\\"0\\\",\\n \\\"isRequired\\\": \\\"1\\\"\\n },\\n {\\n \\\"columnName\\\": \\\"author\\\",\\n \\\"columnLabel\\\": \\\"作者\\\",\\n \\\"columnComment\\\": \\\"图书作者\\\",\\n \\\"columnType\\\": \\\"varchar(100)\\\",\\n \\\"isPk\\\": \\\"0\\\",\\n \\\"isIncrement\\\": \\\"0\\\",\\n \\\"isRequired\\\": \\\"1\\\"\\n },\\n {\\n \\\"columnName\\\": \\\"isbn\\\",\\n \\\"columnLabel\\\": \\\"ISBN\\\",\\n \\\"columnComment\\\": \\\"国际标准书号\\\",\\n \\\"columnType\\\": \\\"varchar(20)\\\",\\n \\\"isPk\\\": \\\"0\\\",\\n \\\"isIncrement\\\": \\\"0\\\",\\n \\\"isRequired\\\": \\\"1\\\"\\n },\\n {\\n \\\"columnName\\\": \\\"category\\\",\\n \\\"columnLabel\\\": \\\"分类\\\",\\n \\\"columnComment\\\": \\\"图书分类\\\",\\n \\\"columnType\\\": \\\"varchar(50)\\\",\\n \\\"isPk\\\": \\\"0\\\",\\n \\\"isIncrement\\\": \\\"0\\\",\\n \\\"isRequired\\\": \\\"0\\\",\\n \\\"htmlType\\\": \\\"select\\\",\\n \\\"dictType\\\": \\\"book_category\\\",\\n \\\"dictOptions\\\": [\\\"文学\\\", \\\"科技\\\", \\\"历史\\\", \\\"艺术\\\", \\\"教育\\\"]\\n },\\n {\\n \\\"columnName\\\": \\\"description\\\",\\n \\\"columnLabel\\\": \\\"描述\\\",\\n \\\"columnComment\\\": \\\"图书简介\\\",\\n \\\"columnType\\\": \\\"text\\\",\\n \\\"isPk\\\": \\\"0\\\",\\n \\\"isIncrement\\\": \\\"0\\\",\\n \\\"isRequired\\\": \\\"0\\\"\\n },\\n {\\n \\\"columnName\\\": \\\"publisher\\\",\\n \\\"columnLabel\\\": \\\"出版社\\\",\\n \\\"columnComment\\\": \\\"出版社名称\\\",\\n \\\"columnType\\\": \\\"varchar(100)\\\",\\n \\\"isPk\\\": \\\"0\\\",\\n \\\"isIncrement\\\": \\\"0\\\",\\n \\\"isRequired\\\": \\\"0\\\"\\n },\\n {\\n \\\"columnName\\\": \\\"publish_date\\\",\\n \\\"columnLabel\\\": \\\"出版日期\\\",\\n \\\"columnComment\\\": \\\"出版日期\\\",\\n \\\"columnType\\\": \\\"date\\\",\\n \\\"isPk\\\": \\\"0\\\",\\n \\\"isIncrement\\\": \\\"0\\\",\\n \\\"isRequired\\\": \\\"0\\\"\\n },\\n {\\n \\\"columnName\\\": \\\"stock\\\",\\n \\\"columnLabel\\\": \\\"库存\\\",\\n \\\"columnComment\\\": \\\"当前库存数量\\\",\\n \\\"columnType\\\": \\\"int(11)\\\",\\n \\\"isPk\\\": \\\"0\\\",\\n \\\"isIncrement\\\": \\\"0\\\",\\n \\\"isRequired\\\": \\\"1\\\",\\n \\\"defaultValue\\\": \\\"0\\\"\\n },\\n {\\n \\\"columnName\\\": \\\"cover_image\\\",\\n \\\"columnLabel\\\": \\\"封面图片\\\",\\n \\\"columnComment\\\": \\\"图书封面图片URL\\\",\\n \\\"columnType\\\": \\\"varchar(255)\\\",\\n \\\"isPk\\\": \\\"0\\\",\\n \\\"isIncrement\\\": \\\"0\\\",\\n \\\"isRequired\\\": \\\"0\\\",\\n \\\"htmlType\\\": \\\"imageUpload\\\"\\n },\\n {\\n \\\"columnName\\\": \\\"status\\\",\\n \\\"columnLabel\\\": \\\"状态\\\",\\n \\\"columnComment\\\": \\\"图书状态enabled=上架disabled=下架\\\",\\n \\\"columnType\\\": \\\"varchar(20)\\\",\\n \\\"isPk\\\": \\\"0\\\",\\n \\\"isIncrement\\\": \\\"0\\\",\\n \\\"isRequired\\\": \\\"1\\\",\\n \\\"htmlType\\\": \\\"radio\\\",\\n \\\"dictType\\\": \\\"book_status\\\",\\n \\\"dictOptions\\\": [\\\"enabled\\\", \\\"disabled\\\"]\\n },\\n {\\n \\\"columnName\\\": \\\"create_time\\\",\\n \\\"columnLabel\\\": \\\"创建时间\\\",\\n \\\"columnComment\\\": \\\"记录创建时间\\\",\\n \\\"columnType\\\": \\\"datetime\\\",\\n \\\"isPk\\\": \\\"0\\\",\\n \\\"isIncrement\\\": \\\"0\\\",\\n \\\"isRequired\\\": \\\"0\\\"\\n },\\n {\\n \\\"columnName\\\": \\\"update_time\\\",\\n \\\"columnLabel\\\": \\\"更新时间\\\",\\n \\\"columnComment\\\": \\\"记录更新时间\\\",\\n \\\"columnType\\\": \\\"datetime\\\",\\n \\\"isPk\\\": \\\"0\\\",\\n \\\"isIncrement\\\": \\\"0\\\",\\n \\\"isRequired\\\": \\\"0\\\"\\n }\\n ]\\n },\\n {\\n \\\"tableName\\\": \\\"borrowing_record\\\",\\n \\\"tableComment\\\": \\\"借阅记录表\\\",\\n \\\"adminMenuName\\\": \\\"借阅管理\\\",\\n \\\"operations\\\": {\\n \\\"add\\\": true,\\n \\\"edit\\\": false,\\n \\\"remove\\\": false,\\n \\\"removeType\\\": \\\"physical\\\",\\n \\\"reason\\\": \\\"借阅记录仅可新增,不可编辑删除\\\"\\n },\\n \\\"columns\\\": [\\n {\\n \\\"columnName\\\": \\\"id\\\",\\n \\\"columnLabel\\\": \\\"ID\\\",\\n \\\"columnComment\\\": \\\"主键ID\\\",\\n \\\"columnType\\\": \\\"bigint(20)\\\",\\n \\\"isPk\\\": \\\"1\\\",\\n \\\"isIncrement\\\": \\\"1\\\",\\n \\\"isRequired\\\": \\\"1\\\"\\n },\\n {\\n \\\"columnName\\\": \\\"user_id\\\",\\n \\\"columnLabel\\\": \\\"借阅用户\\\",\\n \\\"columnComment\\\": \\\"借阅用户ID关联user表\\\",\\n \\\"columnType\\\": \\\"bigint(20)\\\",\\n \\\"isPk\\\": \\\"0\\\",\\n \\\"isIncrement\\\": \\\"0\\\",\\n \\\"isRequired\\\": \\\"1\\\",\\n \\\"htmlType\\\": \\\"select\\\",\\n \\\"dictType\\\": \\\"remote:user:user_id:username\\\"\\n },\\n {\\n \\\"columnName\\\": \\\"book_id\\\",\\n \\\"columnLabel\\\": \\\"借阅图书\\\",\\n \\\"columnComment\\\": \\\"借阅图书ID关联book_info表\\\",\\n \\\"columnType\\\": \\\"bigint(20)\\\",\\n \\\"isPk\\\": \\\"0\\\",\\n \\\"isIncrement\\\": \\\"0\\\",\\n \\\"isRequired\\\": \\\"1\\\",\\n \\\"htmlType\\\": \\\"select\\\",\\n \\\"dictType\\\": \\\"remote:book_info:book_id:title\\\"\\n },\\n {\\n \\\"columnName\\\": \\\"status\\\",\\n \\\"columnLabel\\\": \\\"状态\\\",\\n \\\"columnComment\\\": \\\"借阅状态pending=待借出borrowing=借阅中returned=已归还overdue=逾期\\\",\\n \\\"columnType\\\": \\\"varchar(20)\\\",\\n \\\"isPk\\\": \\\"0\\\",\\n \\\"isIncrement\\\": \\\"0\\\",\\n \\\"isRequired\\\": \\\"1\\\",\\n \\\"htmlType\\\": \\\"select\\\",\\n \\\"dictType\\\": \\\"borrowing_status\\\",\\n \\\"dictOptions\\\": [\\\"pending\\\", \\\"borrowing\\\", \\\"returned\\\", \\\"overdue\\\"]\\n },\\n {\\n \\\"columnName\\\": \\\"borrow_time\\\",\\n \\\"columnLabel\\\": \\\"借出时间\\\",\\n \\\"columnComment\\\": \\\"管理员借出操作时间\\\",\\n \\\"columnType\\\": \\\"datetime\\\",\\n \\\"isPk\\\": \\\"0\\\",\\n \\\"isIncrement\\\": \\\"0\\\",\\n \\\"isRequired\\\": \\\"0\\\"\\n },\\n {\\n \\\"columnName\\\": \\\"due_time\\\",\\n \\\"columnLabel\\\": \\\"应还时间\\\",\\n \\\"columnComment\\\": \\\"预计归还时间\\\",\\n \\\"columnType\\\": \\\"datetime\\\",\\n \\\"isPk\\\": \\\"0\\\",\\n \\\"isIncrement\\\": \\\"0\\\",\\n \\\"isRequired\\\": \\\"0\\\"\\n },\\n {\\n \\\"columnName\\\": \\\"return_time\\\",\\n \\\"columnLabel\\\": \\\"归还时间\\\",\\n \\\"columnComment\\\": \\\"实际归还时间\\\",\\n \\\"columnType\\\": \\\"datetime\\\",\\n \\\"isPk\\\": \\\"0\\\",\\n \\\"isIncrement\\\": \\\"0\\\",\\n \\\"isRequired\\\": \\\"0\\\"\\n },\\n {\\n \\\"columnName\\\": \\\"lend_admin_id\\\",\\n \\\"columnLabel\\\": \\\"借出管理员ID\\\",\\n \\\"columnComment\\\": \\\"执行借出操作的管理员ID关联admin表\\\",\\n \\\"columnType\\\": \\\"bigint(20)\\\",\\n \\\"isPk\\\": \\\"0\\\",\\n \\\"isIncrement\\\": \\\"0\\\",\\n \\\"isRequired\\\": \\\"0\\\",\\n \\\"htmlType\\\": \\\"select\\\",\\n \\\"dictType\\\": \\\"remote:admin:admin_id:username\\\"\\n },\\n {\\n \\\"columnName\\\": \\\"lend_user_id\\\",\\n \\\"columnLabel\\\": \\\"借出用户ID\\\",\\n \\\"columnComment\\\": \\\"执行借出操作的用户ID关联admin表\\\",\\n \\\"columnType\\\": \\\"bigint(20)\\\",\\n \\\"isPk\\\": \\\"0\\\",\\n \\\"isIncrement\\\": \\\"0\\\",\\n \\\"isRequired\\\": \\\"0\\\",\\n \\\"htmlType\\\": \\\"select\\\",\\n \\\"dictType\\\": \\\"remote:admin:admin_id:username\\\"\\n },\\n {\\n \\\"columnName\\\": \\\"return_admin_id\\\",\\n \\\"columnLabel\\\": \\\"归还管理员ID\\\",\\n \\\"columnComment\\\": \\\"执行归还操作的管理员ID关联admin表\\\",\\n \\\"columnType\\\": \\\"bigint(20)\\\",\\n \\\"isPk\\\": \\\"0\\\",\\n \\\"isIncrement\\\": \\\"0\\\",\\n \\\"isRequired\\\": \\\"0\\\",\\n \\\"htmlType\\\": \\\"select\\\",\\n \\\"dictType\\\": \\\"remote:admin:admin_id:username\\\"\\n },\\n {\\n \\\"columnName\\\": \\\"create_time\\\",\\n \\\"columnLabel\\\": \\\"创建时间\\\",\\n \\\"columnComment\\\": \\\"记录创建时间\\\",\\n \\\"columnType\\\": \\\"datetime\\\",\\n \\\"isPk\\\": \\\"0\\\",\\n \\\"isIncrement\\\": \\\"0\\\",\\n \\\"isRequired\\\": \\\"0\\\"\\n },\\n {\\n \\\"columnName\\\": \\\"update_time\\\",\\n \\\"columnLabel\\\": \\\"更新时间\\\",\\n \\\"columnComment\\\": \\\"记录更新时间\\\",\\n \\\"columnType\\\": \\\"datetime\\\",\\n \\\"isPk\\\": \\\"0\\\",\\n \\\"isIncrement\\\": \\\"0\\\",\\n \\\"isRequired\\\": \\\"0\\\"\\n }\\n ]\\n },\\n {\\n \\\"tableName\\\": \\\"reservation\\\",\\n \\\"tableComment\\\": \\\"预约记录表\\\",\\n \\\"adminMenuName\\\": \\\"预约管理\\\",\\n \\\"operations\\\": {\\n \\\"add\\\": true,\\n \\\"edit\\\": false,\\n \\\"remove\\\": false,\\n \\\"removeType\\\": \\\"physical\\\",\\n \\\"reason\\\": \\\"预约记录仅可新增,不可编辑删除\\\"\\n },\\n \\\"columns\\\": [\\n {\\n \\\"columnName\\\": \\\"id\\\",\\n \\\"columnLabel\\\": \\\"ID\\\",\\n \\\"columnComment\\\": \\\"主键ID\\\",\\n \\\"columnType\\\": \\\"bigint(20)\\\",\\n \\\"isPk\\\": \\\"1\\\",\\n \\\"isIncrement\\\": \\\"1\\\",\\n \\\"isRequired\\\": \\\"1\\\"\\n },\\n {\\n \\\"columnName\\\": \\\"user_id\\\",\\n \\\"columnLabel\\\": \\\"预约用户\\\",\\n \\\"columnComment\\\": \\\"预约用户ID关联user表\\\",\\n \\\"columnType\\\": \\\"bigint(20)\\\",\\n \\\"isPk\\\": \\\"0\\\",\\n \\\"isIncrement\\\": \\\"0\\\",\\n \\\"isRequired\\\": \\\"1\\\",\\n \\\"htmlType\\\": \\\"select\\\",\\n \\\"dictType\\\": \\\"remote:user:user_id:username\\\"\\n },\\n {\\n \\\"columnName\\\": \\\"book_id\\\",\\n \\\"columnLabel\\\": \\\"预约图书\\\",\\n \\\"columnComment\\\": \\\"预约图书ID关联book_info表\\\",\\n \\\"columnType\\\": \\\"bigint(20)\\\",\\n \\\"isPk\\\": \\\"0\\\",\\n \\\"isIncrement\\\": \\\"0\\\",\\n \\\"isRequired\\\": \\\"1\\\",\\n \\\"htmlType\\\": \\\"select\\\",\\n \\\"dictType\\\": \\\"remote:book_info:book_id:title\\\"\\n },\\n {\\n \\\"columnName\\\": \\\"status\\\",\\n \\\"columnLabel\\\": \\\"状态\\\",\\n \\\"columnComment\\\": \\\"预约状态pending=待处理confirmed=已确认cancelled=已取消\\\",\\n \\\"columnType\\\": \\\"varchar(20)\\\",\\n \\\"isPk\\\": \\\"0\\\",\\n \\\"isIncrement\\\": \\\"0\\\",\\n \\\"isRequired\\\": \\\"1\\\",\\n \\\"htmlType\\\": \\\"select\\\",\\n \\\"dictType\\\": \\\"reservation_status\\\",\\n \\\"dictOptions\\\": [\\\"pending\\\", \\\"confirmed\\\", \\\"cancelled\\\"]\\n },\\n {\\n \\\"columnName\\\": \\\"reserve_time\\\",\\n \\\"columnLabel\\\": \\\"预约时间\\\",\\n \\\"columnComment\\\": \\\"用户预约时间\\\",\\n \\\"columnType\\\": \\\"datetime\\\",\\n \\\"isPk\\\": \\\"0\\\",\\n \\\"isIncrement\\\": \\\"0\\\",\\n \\\"isRequired\\\": \\\"1\\\"\\n },\\n {\\n \\\"columnName\\\": \\\"expire_time\\\",\\n \\\"columnLabel\\\": \\\"过期时间\\\",\\n \\\"columnComment\\\": \\\"预约自动过期时间\\\",\\n \\\"columnType\\\": \\\"datetime\\\",\\n \\\"isPk\\\": \\\"0\\\",\\n \\\"isIncrement\\\": \\\"0\\\",\\n \\\"isRequired\\\": \\\"0\\\"\\n },\\n {\\n \\\"columnName\\\": \\\"create_time\\\",\\n \\\"columnLabel\\\": \\\"创建时间\\\",\\n \\\"columnComment\\\": \\\"记录创建时间\\\",\\n \\\"columnType\\\": \\\"datetime\\\",\\n \\\"isPk\\\": \\\"0\\\",\\n \\\"isIncrement\\\": \\\"0\\\",\\n \\\"isRequired\\\": \\\"0\\\"\\n },\\n {\\n \\\"columnName\\\": \\\"update_time\\\",\\n \\\"columnLabel\\\": \\\"更新时间\\\",\\n \\\"columnComment\\\": \\\"记录更新时间\\\",\\n \\\"columnType\\\": \\\"datetime\\\",\\n \\\"isPk\\\": \\\"0\\\",\\n \\\"isIncrement\\\": \\\"0\\\",\\n \\\"isRequired\\\": \\\"0\\\"\\n }\\n ]\\n },\\n {\\n \\\"tableName\\\": \\\"user\\\",\\n \\\"tableComment\\\": \\\"用户账号表\\\",\\n \\\"adminMenuName\\\": \\\"用户管理\\\",\\n \\\"operations\\\": {\\n \\\"add\\\": true,\\n \\\"edit\\\": true,\\n \\\"remove\\\": true,\\n \\\"removeType\\\": \\\"physical\\\",\\n \\\"reason\\\": \\\"删除用户会同时删除其借阅和预约记录(级联注意)\\\"\\n },\\n \\\"columns\\\": [\\n {\\n \\\"columnName\\\": \\\"user_id\\\",\\n \\\"columnLabel\\\": \\\"用户ID\\\",\\n \\\"columnComment\\\": \\\"主键自增用户ID\\\",\\n \\\"columnType\\\": \\\"bigint(20)\\\",\\n \\\"isPk\\\": \\\"1\\\",\\n \\\"isIncrement\\\": \\\"1\\\",\\n \\\"isRequired\\\": \\\"1\\\"\\n },\\n {\\n \\\"columnName\\\": \\\"username\\\",\\n \\\"columnLabel\\\": \\\"用户名\\\",\\n \\\"columnComment\\\": \\\"登录用户名,唯一\\\",\\n \\\"columnType\\\": \\\"varchar(50)\\\",\\n \\\"isPk\\\": \\\"0\\\",\\n \\\"isIncrement\\\": \\\"0\\\",\\n \\\"isRequired\\\": \\\"1\\\"\\n },\\n {\\n \\\"columnName\\\": \\\"password_hash\\\",\\n \\\"columnLabel\\\": \\\"密码哈希\\\",\\n \\\"columnComment\\\": \\\"经过哈希处理的密码\\\",\\n \\\"columnType\\\": \\\"varchar(255)\\\",\\n \\\"isPk\\\": \\\"0\\\",\\n \\\"isIncrement\\\": \\\"0\\\",\\n \\\"isRequired\\\": \\\"1\\\"\\n },\\n {\\n \\\"columnName\\\": \\\"nickname\\\",\\n \\\"columnLabel\\\": \\\"昵称\\\",\\n \\\"columnComment\\\": \\\"用户显示名称\\\",\\n \\\"columnType\\\": \\\"varchar(50)\\\",\\n \\\"isPk\\\": \\\"0\\\",\\n \\\"isIncrement\\\": \\\"0\\\",\\n \\\"isRequired\\\": \\\"0\\\"\\n },\\n {\\n \\\"columnName\\\": \\\"email\\\",\\n \\\"columnLabel\\\": \\\"邮箱\\\",\\n \\\"columnComment\\\": \\\"用户邮箱\\\",\\n \\\"columnType\\\": \\\"varchar(100)\\\",\\n \\\"isPk\\\": \\\"0\\\",\\n \\\"isIncrement\\\": \\\"0\\\",\\n \\\"isRequired\\\": \\\"0\\\"\\n },\\n {\\n \\\"columnName\\\": \\\"phone\\\",\\n \\\"columnLabel\\\": \\\"手机号\\\",\\n \\\"columnComment\\\": \\\"用户手机号码\\\",\\n \\\"columnType\\\": \\\"varchar(20)\\\",\\n \\\"isPk\\\": \\\"0\\\",\\n \\\"isIncrement\\\": \\\"0\\\",\\n \\\"isRequired\\\": \\\"0\\\"\\n },\\n {\\n \\\"columnName\\\": \\\"avatar\\\",\\n \\\"columnLabel\\\": \\\"头像\\\",\\n \\\"columnComment\\\": \\\"用户头像URL\\\",\\n \\\"columnType\\\": \\\"varchar(255)\\\",\\n \\\"isPk\\\": \\\"0\\\",\\n \\\"isIncrement\\\": \\\"0\\\",\\n \\\"isRequired\\\": \\\"0\\\",\\n \\\"htmlType\\\": \\\"imageUpload\\\"\\n },\\n {\\n \\\"columnName\\\": \\\"status\\\",\\n \\\"columnLabel\\\": \\\"状态\\\",\\n \\\"columnComment\\\": \\\"用户状态active=正常inactive=禁用\\\",\\n \\\"columnType\\\": \\\"varchar(20)\\\",\\n \\\"isPk\\\": \\\"0\\\",\\n \\\"isIncrement\\\": \\\"0\\\",\\n \\\"isRequired\\\": \\\"1\\\",\\n \\\"htmlType\\\": \\\"radio\\\",\\n \\\"dictType\\\": \\\"user_status\\\",\\n \\\"dictOptions\\\": [\\\"active\\\", \\\"inactive\\\"]\\n },\\n {\\n \\\"columnName\\\": \\\"create_time\\\",\\n \\\"columnLabel\\\": \\\"创建时间\\\",\\n \\\"columnComment\\\": \\\"记录创建时间\\\",\\n \\\"columnType\\\": \\\"datetime\\\",\\n \\\"isPk\\\": \\\"0\\\",\\n \\\"isIncrement\\\": \\\"0\\\",\\n \\\"isRequired\\\": \\\"0\\\"\\n },\\n {\\n \\\"columnName\\\": \\\"update_time\\\",\\n \\\"columnLabel\\\": \\\"更新时间\\\",\\n \\\"columnComment\\\": \\\"记录更新时间\\\",\\n \\\"columnType\\\": \\\"datetime\\\",\\n \\\"isPk\\\": \\\"0\\\",\\n \\\"isIncrement\\\": \\\"0\\\",\\n \\\"isRequired\\\": \\\"0\\\"\\n }\\n ]\\n },\\n {\\n \\\"tableName\\\": \\\"admin\\\",\\n \\\"tableComment\\\": \\\"管理员账号表\\\",\\n \\\"adminMenuName\\\": \\\"管理员个人资料\\\",\\n \\\"operations\\\": {\\n \\\"add\\\": false,\\n \\\"edit\\\": true,\\n \\\"remove\\\": false,\\n \\\"removeType\\\": \\\"physical\\\",\\n \\\"reason\\\": \\\"管理员账号由系统初始化,不支持新增和删除\\\"\\n },\\n \\\"columns\\\": [\\n {\\n \\\"columnName\\\": \\\"admin_id\\\",\\n \\\"columnLabel\\\": \\\"管理员ID\\\",\\n \\\"columnComment\\\": \\\"主键自增管理员ID\\\",\\n \\\"columnType\\\": \\\"bigint(20)\\\",\\n \\\"isPk\\\": \\\"1\\\",\\n \\\"isIncrement\\\": \\\"1\\\",\\n \\\"isRequired\\\": \\\"1\\\"\\n },\\n {\\n \\\"columnName\\\": \\\"username\\\",\\n \\\"columnLabel\\\": \\\"用户名\\\",\\n \\\"columnComment\\\": \\\"登录用户名,唯一\\\",\\n \\\"columnType\\\": \\\"varchar(50)\\\",\\n \\\"isPk\\\": \\\"0\\\",\\n \\\"isIncrement\\\": \\\"0\\\",\\n \\\"isRequired\\\": \\\"1\\\"\\n },\\n {\\n \\\"columnName\\\": \\\"password_hash\\\",\\n \\\"columnLabel\\\": \\\"密码哈希\\\",\\n \\\"columnComment\\\": \\\"经过哈希处理的密码\\\",\\n \\\"columnType\\\": \\\"varchar(255)\\\",\\n \\\"isPk\\\": \\\"0\\\",\\n \\\"isIncrement\\\": \\\"0\\\",\\n \\\"isRequired\\\": \\\"1\\\"\\n },\\n {\\n \\\"columnName\\\": \\\"nickname\\\",\\n \\\"columnLabel\\\": \\\"昵称\\\",\\n \\\"columnComment\\\": \\\"管理员显示名称\\\",\\n \\\"columnType\\\": \\\"varchar(50)\\\",\\n \\\"isPk\\\": \\\"0\\\",\\n \\\"isIncrement\\\": \\\"0\\\",\\n \\\"isRequired\\\": \\\"0\\\"\\n },\\n {\\n \\\"columnName\\\": \\\"email\\\",\\n \\\"columnLabel\\\": \\\"邮箱\\\",\\n \\\"columnComment\\\": \\\"管理员邮箱\\\",\\n \\\"columnType\\\": \\\"varchar(100)\\\",\\n \\\"isPk\\\": \\\"0\\\",\\n \\\"isIncrement\\\": \\\"0\\\",\\n \\\"isRequired\\\": \\\"0\\\"\\n },\\n {\\n \\\"columnName\\\": \\\"status\\\",\\n \\\"columnLabel\\\": \\\"状态\\\",\\n \\\"columnComment\\\": \\\"管理员状态active=正常inactive=禁用\\\",\\n \\\"columnType\\\": \\\"varchar(20)\\\",\\n \\\"isPk\\\": \\\"0\\\",\\n \\\"isIncrement\\\": \\\"0\\\",\\n \\\"isRequired\\\": \\\"1\\\",\\n \\\"htmlType\\\": \\\"radio\\\",\\n \\\"dictType\\\": \\\"admin_status\\\",\\n \\\"dictOptions\\\": [\\\"active\\\", \\\"inactive\\\"]\\n },\\n {\\n \\\"columnName\\\": \\\"create_time\\\",\\n \\\"columnLabel\\\": \\\"创建时间\\\",\\n \\\"columnComment\\\": \\\"记录创建时间\\\",\\n \\\"columnType\\\": \\\"datetime\\\",\\n \\\"isPk\\\": \\\"0\\\",\\n \\\"isIncrement\\\": \\\"0\\\",\\n \\\"isRequired\\\": \\\"0\\\"\\n },\\n {\\n \\\"columnName\\\": \\\"update_time\\\",\\n \\\"columnLabel\\\": \\\"更新时间\\\",\\n \\\"columnComment\\\": \\\"记录更新时间\\\",\\n \\\"columnType\\\": \\\"datetime\\\",\\n \\\"isPk\\\": \\\"0\\\",\\n \\\"isIncrement\\\": \\\"0\\\",\\n \\\"isRequired\\\": \\\"0\\\"\\n }\\n ]\\n },\\n {\\n \\\"tableName\\\": \\\"carousel\\\",\\n \\\"tableComment\\\": \\\"轮播图表\\\",\\n \\\"adminMenuName\\\": \\\"轮播图管理\\\",\\n \\\"operations\\\": {\\n \\\"add\\\": true,\\n \\\"edit\\\": true,\\n \\\"remove\\\": true,\\n \\\"removeType\\\": \\\"physical\\\",\\n \\\"reason\\\": \\\"\\\"\\n },\\n \\\"columns\\\": [\\n {\\n \\\"columnName\\\": \\\"id\\\",\\n \\\"columnLabel\\\": \\\"ID\\\",\\n \\\"columnComment\\\": \\\"主键ID\\\",\\n \\\"columnType\\\": \\\"bigint(20)\\\",\\n \\\"isPk\\\": \\\"1\\\",\\n \\\"isIncrement\\\": \\\"1\\\",\\n \\\"isRequired\\\": \\\"1\\\"\\n },\\n {\\n \\\"columnName\\\": \\\"title\\\",\\n \\\"columnLabel\\\": \\\"标题\\\",\\n \\\"columnComment\\\": \\\"轮播图标题\\\",\\n \\\"columnType\\\": \\\"varchar(100)\\\",\\n \\\"isPk\\\": \\\"0\\\",\\n \\\"isIncrement\\\": \\\"0\\\",\\n \\\"isRequired\\\": \\\"0\\\"\\n },\\n {\\n \\\"columnName\\\": \\\"image_url\\\",\\n \\\"columnLabel\\\": \\\"图片地址\\\",\\n \\\"columnComment\\\": \\\"轮播图图片URL\\\",\\n \\\"columnType\\\": \\\"varchar(255)\\\",\\n \\\"isPk\\\": \\\"0\\\",\\n \\\"isIncrement\\\": \\\"0\\\",\\n \\\"isRequired\\\": \\\"1\\\",\\n \\\"htmlType\\\": \\\"imageUpload\\\"\\n },\\n {\\n \\\"columnName\\\": \\\"link_url\\\",\\n \\\"columnLabel\\\": \\\"链接地址\\\",\\n \\\"columnComment\\\": \\\"点击跳转链接\\\",\\n \\\"columnType\\\": \\\"varchar(255)\\\",\\n \\\"isPk\\\": \\\"0\\\",\\n \\\"isIncrement\\\": \\\"0\\\",\\n \\\"isRequired\\\": \\\"0\\\"\\n },\\n {\\n \\\"columnName\\\": \\\"sort_order\\\",\\n \\\"columnLabel\\\": \\\"排序\\\",\\n \\\"columnComment\\\": \\\"显示顺序,数值越小越靠前\\\",\\n \\\"columnType\\\": \\\"int(11)\\\",\\n \\\"isPk\\\": \\\"0\\\",\\n \\\"isIncrement\\\": \\\"0\\\",\\n \\\"isRequired\\\": \\\"0\\\",\\n \\\"defaultValue\\\": \\\"0\\\"\\n },\\n {\\n \\\"columnName\\\": \\\"status\\\",\\n \\\"columnLabel\\\": \\\"状态\\\",\\n \\\"columnComment\\\": \\\"状态enabled=启用disabled=禁用\\\",\\n \\\"columnType\\\": \\\"varchar(20)\\\",\\n \\\"isPk\\\": \\\"0\\\",\\n \\\"isIncrement\\\": \\\"0\\\",\\n \\\"isRequired\\\": \\\"1\\\",\\n \\\"htmlType\\\": \\\"radio\\\",\\n \\\"dictType\\\": \\\"carousel_status\\\",\\n \\\"dictOptions\\\": [\\\"enabled\\\", \\\"disabled\\\"]\\n },\\n {\\n \\\"columnName\\\": \\\"create_time\\\",\\n \\\"columnLabel\\\": \\\"创建时间\\\",\\n \\\"columnComment\\\": \\\"记录创建时间\\\",\\n \\\"columnType\\\": \\\"datetime\\\",\\n \\\"isPk\\\": \\\"0\\\",\\n \\\"isIncrement\\\": \\\"0\\\",\\n \\\"isRequired\\\": \\\"0\\\"\\n },\\n {\\n \\\"columnName\\\": \\\"update_time\\\",\\n \\\"columnLabel\\\": \\\"更新时间\\\",\\n \\\"columnComment\\\": \\\"记录更新时间\\\",\\n \\\"columnType\\\": \\\"datetime\\\",\\n \\\"isPk\\\": \\\"0\\\",\\n \\\"isIncrement\\\": \\\"0\\\",\\n \\\"isRequired\\\": \\\"0\\\"\\n }\\n ]\\n },\\n {\\n \\\"tableName\\\": \\\"announcement\\\",\\n \\\"tableComment\\\": \\\"公告表\\\",\\n \\\"adminMenuName\\\": \\\"公告管理\\\",\\n \\\"operations\\\": {\\n \\\"add\\\": true,\\n \\\"edit\\\": true,\\n \\\"remove\\\": true,\\n \\\"removeType\\\": \\\"physical\\\",\\n \\\"reason\\\": \\\"\\\"\\n },\\n \\\"columns\\\": [\\n {\\n \\\"columnName\\\": \\\"id\\\",\\n \\\"columnLabel\\\": \\\"ID\\\",\\n \\\"columnComment\\\": \\\"主键ID\\\",\\n \\\"columnType\\\": \\\"bigint(20)\\\",\\n \\\"isPk\\\": \\\"1\\\",\\n \\\"isIncrement\\\": \\\"1\\\",\\n \\\"isRequired\\\": \\\"1\\\"\\n },\\n {\\n \\\"columnName\\\": \\\"title\\\",\\n \\\"columnLabel\\\": \\\"标题\\\",\\n \\\"columnComment\\\": \\\"公告标题\\\",\\n \\\"columnType\\\": \\\"varchar(200)\\\",\\n \\\"isPk\\\": \\\"0\\\",\\n \\\"isIncrement\\\": \\\"0\\\",\\n \\\"isRequired\\\": \\\"1\\\"\\n },\\n {\\n \\\"columnName\\\": \\\"content\\\",\\n \\\"columnLabel\\\": \\\"内容\\\",\\n \\\"columnComment\\\": \\\"公告正文\\\",\\n \\\"columnType\\\": \\\"longtext\\\",\\n \\\"isPk\\\": \\\"0\\\",\\n \\\"isIncrement\\\": \\\"0\\\",\\n \\\"isRequired\\\": \\\"1\\\",\\n \\\"htmlType\\\": \\\"editor\\\"\\n },\\n {\\n \\\"columnName\\\": \\\"publish_user\\\",\\n \\\"columnLabel\\\": \\\"发布人\\\",\\n \\\"columnComment\\\": \\\"发布公告的管理员用户名\\\",\\n \\\"columnType\\\": \\\"varchar(50)\\\",\\n \\\"isPk\\\": \\\"0\\\",\\n \\\"isIncrement\\\": \\\"0\\\",\\n \\\"isRequired\\\": \\\"0\\\"\\n },\\n {\\n \\\"columnName\\\": \\\"publish_time\\\",\\n \\\"columnLabel\\\": \\\"发布时间\\\",\\n \\\"columnComment\\\": \\\"公告正式发布时间\\\",\\n \\\"columnType\\\": \\\"datetime\\\",\\n \\\"isPk\\\": \\\"0\\\",\\n \\\"isIncrement\\\": \\\"0\\\",\\n \\\"isRequired\\\": \\\"0\\\"\\n },\\n {\\n \\\"columnName\\\": \\\"status\\\",\\n \\\"columnLabel\\\": \\\"状态\\\",\\n \\\"columnComment\\\": \\\"状态published=已发布draft=草稿\\\",\\n \\\"columnType\\\": \\\"varchar(20)\\\",\\n \\\"isPk\\\": \\\"0\\\",\\n \\\"isIncrement\\\": \\\"0\\\",\\n \\\"isRequired\\\": \\\"1\\\",\\n \\\"htmlType\\\": \\\"radio\\\",\\n \\\"dictType\\\": \\\"announcement_status\\\",\\n \\\"dictOptions\\\": [\\\"published\\\", \\\"draft\\\"]\\n },\\n {\\n \\\"columnName\\\": \\\"create_time\\\",\\n \\\"columnLabel\\\": \\\"创建时间\\\",\\n \\\"columnComment\\\": \\\"记录创建时间\\\",\\n \\\"columnType\\\": \\\"datetime\\\",\\n \\\"isPk\\\": \\\"0\\\",\\n \\\"isIncrement\\\": \\\"0\\\",\\n \\\"isRequired\\\": \\\"0\\\"\\n },\\n {\\n \\\"columnName\\\": \\\"update_time\\\",\\n \\\"columnLabel\\\": \\\"更新时间\\\",\\n \\\"columnComment\\\": \\\"记录更新时间\\\",\\n \\\"columnType\\\": \\\"datetime\\\",\\n \\\"isPk\\\": \\\"0\\\",\\n \\\"isIncrement\\\": \\\"0\\\",\\n \\\"isRequired\\\": \\\"0\\\"\\n }\\n ]\\n },\\n {\\n \\\"tableName\\\": \\\"news\\\",\\n \\\"tableComment\\\": \\\"新闻表\\\",\\n \\\"adminMenuName\\\": \\\"新闻管理\\\",\\n \\\"operations\\\": {\\n \\\"add\\\": true,\\n \\\"edit\\\": true,\\n \\\"remove\\\": true,\\n \\\"removeType\\\": \\\"physical\\\",\\n \\\"reason\\\": \\\"\\\"\\n },\\n \\\"columns\\\": [\\n {\\n \\\"columnName\\\": \\\"id\\\",\\n \\\"columnLabel\\\": \\\"ID\\\",\\n \\\"columnComment\\\": \\\"主键ID\\\",\\n \\\"columnType\\\": \\\"bigint(20)\\\",\\n \\\"isPk\\\": \\\"1\\\",\\n \\\"isIncrement\\\": \\\"1\\\",\\n \\\"isRequired\\\": \\\"1\\\"\\n },\\n {\\n \\\"columnName\\\": \\\"title\\\",\\n \\\"columnLabel\\\": \\\"标题\\\",\\n \\\"columnComment\\\": \\\"新闻标题\\\",\\n \\\"columnType\\\": \\\"varchar(200)\\\",\\n \\\"isPk\\\": \\\"0\\\",\\n \\\"isIncrement\\\": \\\"0\\\",\\n \\\"isRequired\\\": \\\"1\\\"\\n },\\n {\\n \\\"columnName\\\": \\\"content\\\",\\n \\\"columnLabel\\\": \\\"内容\\\",\\n \\\"columnComment\\\": \\\"新闻正文\\\",\\n \\\"columnType\\\": \\\"longtext\\\",\\n \\\"isPk\\\": \\\"0\\\",\\n \\\"isIncrement\\\": \\\"0\\\",\\n \\\"isRequired\\\": \\\"1\\\",\\n \\\"htmlType\\\": \\\"editor\\\"\\n },\\n {\\n \\\"columnName\\\": \\\"author\\\",\\n \\\"columnLabel\\\": \\\"作者\\\",\\n \\\"columnComment\\\": \\\"新闻作者\\\",\\n \\\"columnType\\\": \\\"varchar(50)\\\",\\n \\\"isPk\\\": \\\"0\\\",\\n \\\"isIncrement\\\": \\\"0\\\",\\n \\\"isRequired\\\": \\\"0\\\"\\n },\\n {\\n \\\"columnName\\\": \\\"publish_time\\\",\\n \\\"columnLabel\\\": \\\"发布时间\\\",\\n \\\"columnComment\\\": \\\"新闻发布时间\\\",\\n \\\"columnType\\\": \\\"datetime\\\",\\n \\\"isPk\\\": \\\"0\\\",\\n \\\"isIncrement\\\": \\\"0\\\",\\n \\\"isRequired\\\": \\\"0\\\"\\n },\\n {\\n \\\"columnName\\\": \\\"status\\\",\\n \\\"columnLabel\\\": \\\"状态\\\",\\n \\\"columnComment\\\": \\\"状态published=已发布draft=草稿\\\",\\n \\\"columnType\\\": \\\"varchar(20)\\\",\\n \\\"isPk\\\": \\\"0\\\",\\n \\\"isIncrement\\\": \\\"0\\\",\\n \\\"isRequired\\\": \\\"1\\\",\\n \\\"htmlType\\\": \\\"radio\\\",\\n \\\"dictType\\\": \\\"news_status\\\",\\n \\\"dictOptions\\\": [\\\"published\\\", \\\"draft\\\"]\\n },\\n {\\n \\\"columnName\\\": \\\"cover_image\\\",\\n \\\"columnLabel\\\": \\\"封面图片\\\",\\n \\\"columnComment\\\": \\\"新闻封面图片URL\\\",\\n \\\"columnType\\\": \\\"varchar(255)\\\",\\n \\\"isPk\\\": \\\"0\\\",\\n \\\"isIncrement\\\": \\\"0\\\",\\n \\\"isRequired\\\": \\\"0\\\",\\n \\\"htmlType\\\": \\\"imageUpload\\\"\\n },\\n {\\n \\\"columnName\\\": \\\"create_time\\\",\\n \\\"columnLabel\\\": \\\"创建时间\\\",\\n \\\"columnComment\\\": \\\"记录创建时间\\\",\\n \\\"columnType\\\": \\\"datetime\\\",\\n \\\"isPk\\\": \\\"0\\\",\\n \\\"isIncrement\\\": \\\"0\\\",\\n \\\"isRequired\\\": \\\"0\\\"\\n },\\n {\\n \\\"columnName\\\": \\\"update_time\\\",\\n \\\"columnLabel\\\": \\\"更新时间\\\",\\n \\\"columnComment\\\": \\\"记录更新时间\\\",\\n \\\"columnType\\\": \\\"datetime\\\",\\n \\\"isPk\\\": \\\"0\\\",\\n \\\"isIncrement\\\": \\\"0\\\",\\n \\\"isRequired\\\": \\\"0\\\"\\n }\\n ]\\n }\\n ]\\n}\"]}', '0', 'Flow config audit field does not exist: borrowing_record.lend_time', 117808, '2026-07-14 21:25:55');
INSERT INTO `factory_ai_stage_output` VALUES (127, 111, 107, 100, 'app_blueprint', '{\"projectName\":\"图书管理系统\",\"projectDescription\":\"功能:借书、还书、预约、取消预约\\n角色用户、管理员\\n其他模块轮播图、公告、新闻\",\"industryTemplate\":\"\",\"stylePreset\":\"dark-tech\",\"extraRequirements\":\"\"}', '{\"roles\":[{\"code\":\"admin\",\"name\":\"管理员\",\"description\":\"系统管理员,管理图书、借阅、预约及内容维护\"},{\"code\":\"reader\",\"name\":\"读者\",\"description\":\"普通用户,可浏览图书、借阅、预约\"}],\"frontendMenus\":[{\"code\":\"book_catalog\",\"name\":\"图书目录\",\"path\":\"/books\",\"pageCode\":\"book_catalog_page\",\"requiresLogin\":false,\"visibleRoles\":[],\"dataScope\":\"PUBLIC\"},{\"code\":\"reader_profile\",\"name\":\"个人资料\",\"path\":\"/reader/profile\",\"pageCode\":\"reader_profile_page\",\"requiresLogin\":true,\"visibleRoles\":[\"reader\"],\"dataScope\":\"CURRENT_USER\"},{\"code\":\"my_borrows\",\"name\":\"我的借阅\",\"path\":\"/reader/borrows\",\"pageCode\":\"my_borrows_page\",\"requiresLogin\":true,\"visibleRoles\":[\"reader\"],\"dataScope\":\"CURRENT_USER\"},{\"code\":\"my_reservations\",\"name\":\"我的预约\",\"path\":\"/reader/reservations\",\"pageCode\":\"my_reservations_page\",\"requiresLogin\":true,\"visibleRoles\":[\"reader\"],\"dataScope\":\"CURRENT_USER\"}],\"frontendPages\":[{\"code\":\"book_catalog_page\",\"name\":\"图书目录\",\"menuCode\":\"book_catalog\",\"path\":\"/books\",\"pageType\":\"list\",\"tableName\":\"book_info\"},{\"code\":\"reader_profile_page\",\"name\":\"个人资料\",\"menuCode\":\"reader_profile\",\"path\":\"/reader/profile\",\"pageType\":\"form\",\"tableName\":\"reader\"},{\"code\":\"my_borrows_page\",\"name\":\"我的借阅\",\"menuCode\":\"my_borrows\",\"path\":\"/reader/borrows\",\"pageType\":\"current_user_list\",\"tableName\":\"borrow_record\"},{\"code\":\"my_reservations_page\",\"name\":\"我的预约\",\"menuCode\":\"my_reservations\",\"path\":\"/reader/reservations\",\"pageType\":\"current_user_list\",\"tableName\":\"reservation\"}],\"adminMenus\":[{\"code\":\"book_admin\",\"name\":\"图书管理\",\"path\":\"/admin/books\",\"pageCode\":\"book_admin_page\",\"tableName\":\"book_info\",\"pageType\":\"list\",\"requiresLogin\":true,\"visibleRoles\":[\"admin\"],\"dataScope\":\"ROLE\"},{\"code\":\"borrow_admin\",\"name\":\"借阅管理\",\"path\":\"/admin/borrows\",\"pageCode\":\"borrow_admin_page\",\"tableName\":\"borrow_record\",\"pageType\":\"list\",\"requiresLogin\":true,\"visibleRoles\":[\"admin\"],\"dataScope\":\"ROLE\"},{\"code\":\"reservation_admin\",\"name\":\"预约管理\",\"path\":\"/admin/reservations\",\"pageCode\":\"reservation_admin_page\",\"tableName\":\"reservation\",\"pageType\":\"list\",\"requiresLogin\":true,\"visibleRoles\":[\"admin\"],\"dataScope\":\"ROLE\"},{\"code\":\"carousel_admin\",\"name\":\"轮播图管理\",\"path\":\"/admin/carousels\",\"pageCode\":\"carousel_admin_page\",\"tableName\":\"carousel\",\"pageType\":\"list\",\"requiresLogin\":true,\"visibleRoles\":[\"admin\"],\"dataScope\":\"ROLE\"},{\"code\":\"announcement_admin\",\"name\":\"公告管理\",\"path\":\"/admin/announcements\",\"pageCode\":\"announcement_admin_page\",\"tableName\":\"announcement\",\"pageType\":\"list\",\"requiresLogin\":true,\"visibleRoles\":[\"admin\"],\"dataScope\":\"ROLE\"},{\"code\":\"news_admin\",\"name\":\"新闻管理\",\"path\":\"/admin/news\",\"pageCode\":\"news_admin_page\",\"tableName\":\"news\",\"pageType\":\"list\",\"requiresLogin\":true,\"visibleRoles\":[\"admin\"],\"dataScope\":\"ROLE\"}],\"adminHomeDashboard\":{\"title\":\"运营总览\",\"description\":\"核心业务数据\",\"metrics\":[{\"label\":\"总图书数\",\"valueKey\":\"total_books\",\"tableName\":\"book_info\",\"aggregation\":\"COUNT\",\"semantic\":\"content\"},{\"label\":\"总借阅次数\",\"valueKey\":\"total_borrows\",\"tableName\":\"borrow_record\",\"aggregation\":\"COUNT\",\"semantic\":\"order\"},{\"label\":\"总预约次数\",\"valueKey\":\"total_reservations\",\"tableName\":\"reservation\",\"aggregation\":\"COUNT\",\"semantic\":\"task\"},{\"label\":\"活跃读者数\",\"valueKey\":\"active_readers\",\"tableName\":\"reader\",\"aggregation\":\"COUNT\",\"semantic\":\"user\"}],\"charts\":[{\"title\":\"借阅趋势\",\"type\":\"line\",\"dataSource\":{\"tableName\":\"borrow_record\",\"xField\":\"borrow_date\",\"yField\":\"count\",\"aggregation\":\"COUNT\",\"semantic\":\"order\"},\"description\":\"每日借阅数量变化\"},{\"title\":\"预约状态分布\",\"type\":\"pie\",\"dataSource\":{\"tableName\":\"reservation\",\"xField\":\"status\",\"yField\":\"count\",\"aggregation\":\"COUNT\",\"semantic\":\"task\"},\"description\":\"预约各状态占比\"}]}}', '1', NULL, 24124, '2026-07-14 22:03:21');
INSERT INTO `factory_ai_stage_output` VALUES (128, 111, 107, 100, 'flow_config', '{\"mode\":\"generate\",\"projectName\":\"图书管理系统\",\"projectDescription\":\"功能:借书、还书、预约、取消预约\\n角色用户、管理员\\n其他模块轮播图、公告、新闻\",\"industryTemplate\":\"\",\"stylePreset\":\"dark-tech\",\"extraRequirements\":\"\",\"confirmedAppBlueprint\":{\"adminHomeDashboard\":{\"charts\":[{\"filters\":[],\"metrics\":[{\"aggregate\":\"count\",\"label\":\"借阅趋势\"}],\"title\":\"借阅趋势\",\"type\":\"line\"},{\"filters\":[],\"metrics\":[{\"aggregate\":\"count\",\"label\":\"预约状态分布\"}],\"title\":\"预约状态分布\",\"type\":\"pie\"}],\"description\":\"核心业务数据\",\"metrics\":[{\"aggregate\":\"count\",\"code\":\"total_books\",\"filters\":[],\"semantic\":\"content\",\"tableName\":\"book_info\"},{\"aggregate\":\"count\",\"code\":\"total_borrows\",\"filters\":[],\"semantic\":\"order\",\"tableName\":\"borrow_record\"},{\"aggregate\":\"count\",\"code\":\"total_reservations\",\"filters\":[],\"semantic\":\"task\",\"tableName\":\"reservation\"},{\"aggregate\":\"count\",\"code\":\"active_readers\",\"filters\":[],\"semantic\":\"user\",\"tableName\":\"reader\"}],\"title\":\"运营总览\"},\"adminMenus\":[{\"code\":\"book_admin\",\"dataScope\":\"ROLE\",\"name\":\"图书管理\",\"pageCode\":\"book_admin_page\",\"pageType\":\"list\",\"path\":\"/admin/books\",\"requiresLogin\":true,\"tableName\":\"book_info\",\"visibleRoles\":[\"admin\"]},{\"code\":\"borrow_admin\",\"dataScope\":\"ROLE\",\"name\":\"借阅管理\",\"pageCode\":\"borrow_admin_page\",\"pageType\":\"list\",\"path\":\"/admin/borrows\",\"requiresLogin\":true,\"tableName\":\"borrow_record\",\"visibleRoles\":[\"admin\"]},{\"code\":\"reservation_admin\",\"dataScope\":\"ROLE\",\"name\":\"预约管理\",\"pageCode\":\"reservation_admin_page\",\"pageType\":\"list\",\"path\":\"/admin/reservations\",\"requiresLogin\":true,\"tableName\":\"reservation\",\"visibleRoles\":[\"admin\"]},{\"code\":\"carousel_admin\",\"dataScope\":\"ROLE\",\"name\":\"轮播图管理\",\"pageCode\":\"carousel_admin_page\",\"pageType\":\"list\",\"path\":\"/admin/carousels\",\"requiresLogin\":true,\"tableName\":\"carousel\",\"visibleRoles\":[\"admin\"]},{\"code\":\"announcement_admin\",\"dataScope\":\"ROLE\",\"name\":\"公告管理\",\"pageCode\":\"announcement_admin_page\",\"pageType\":\"list\",\"path\":\"/admin/announcements\",\"requiresLogin\":true,\"tableName\":\"announcement\",\"visibleRoles\":[\"admin\"]},{\"code\":\"news_admin\",\"dataScope\":\"ROLE\",\"name\":\"新闻管理\",\"pageCode\":\"news_admin_page\",\"pageType\":\"list\",\"path\":\"/admin/news\",\"requiresLogin\":true,\"tableName\":\"news\",\"visibleRoles\":[\"admin\"]}],\"frontendMenus\":[{\"code\":\"book_catalog\",\"dataScope\":\"PUBLIC\",\"name\":\"图书目录\",\"pageCode\":\"book_catalog_page\",\"pageType\":\"\",\"path\":\"/books\",\"requiresLogin\":false,\"tableName\":\"\",\"visibleRoles\":[]},{\"code\":\"reader_profile\",\"dataScope\":\"CURRENT_USER\",\"name\":\"个人资料\",\"pageCode\":\"reader_profile_page\",\"pageType\":\"\",\"path\":\"/reader/profile\",\"requiresLogin\":true,\"tableName\":\"\",\"visibleRoles\":[\"reader\"]},{\"code\":\"my_borrows\",\"dataScope\":\"CURRENT_USER\",\"name\":\"我的借阅\",\"pageCode\":\"my_borrows_page\",\"pageType\":\"\",\"path\":\"/reader/borrows\",\"requiresLogin\":true,\"tableName\":\"\",\"visibleRoles\":[\"reader\"]},{\"code\":\"my_reservations\",\"dataScope\":\"CURRENT_USER\",\"name\":\"我的预约\",\"pageCode\":\"my_reservations_page\",\"pageType\":\"\",\"path\":\"/reader/reservations\",\"requiresLogin\":true,\"tableName\":\"\",\"visibleRoles\":[\"reader\"]}],\"frontendPages\":[{\"code\":\"book_catalog_page\",\"menuCode\":\"book_catalog\",\"name\":\"图书目录\",\"pageType\":\"list\",\"parentPageCode\":\"\",\"path\":\"/books\",\"tableName\":\"book_info\"},{\"code\":\"reader_profile_page\",\"menuCode\":\"reader_profile\",\"name\":\"个人资料\",\"pageType\":\"form\",\"parentPageCode\":\"\",\"path\":\"/reader/profile\",\"tableName\":\"reader\"},{\"code\":\"my_borrows_page\",\"menuCode\":\"my_borrows\",\"name\":\"我的借阅\",\"pageType\":\"current_user_list\",\"parentPageCode\":\"\",\"path\":\"/reader/borrows\",\"tableName\":\"borrow_record\"},{\"code\":\"my_reservations_page\",\"menuCode\":\"my_reservations\",\"name\":\"我的预约\",\"pageType\":\"current_user_list\",\"parentPageCode\":\"\",\"path\":\"/reader/reservations\",\"tableName\":\"reservation\"}],\"roles\":[{\"code\":\"admin\",\"description\":\"系统管理员,管理图书、借阅、预约及内容维护\",\"name\":\"管理员\"},{\"code\":\"reader\",\"description\":\"普通用户,可浏览图书、借阅、预约\",\"name\":\"读者\"}]}}', '{\n \"version\": \"1.0\",\n \"code\": \"borrow_flow\",\n \"name\": \"借阅流程\",\n \"mainTable\": \"borrow_record\",\n \"statusField\": \"status\",\n \"notFoundMessage\": \"借阅记录不存在\",\n \"states\": [\n {\"code\": \"pending\", \"label\": \"待审核\"},\n {\"code\": \"borrowing\", \"label\": \"借阅中\"},\n {\"code\": \"returned\", \"label\": \"已归还\"},\n {\"code\": \"rejected\", \"label\": \"已拒绝\"}\n ],\n \"actions\": [\n {\n \"code\": \"approve\",\n \"name\": \"审核通过\",\n \"from\": \"pending\",\n \"to\": \"borrowing\",\n \"actor\": \"admin\",\n \"method\": \"POST\",\n \"path\": \"/borrow-record/approve\",\n \"invalidStateMessage\": \"当前状态不能审核\",\n \"successMessage\": \"审核成功\",\n \"audit\": {\"userField\": \"approve_user_id\", \"timeField\": \"approve_time\"},\n \"effects\": [\n {\n \"type\": \"decrease\",\n \"table\": \"book_info\",\n \"relationField\": \"book_id\",\n \"field\": \"stock\",\n \"amount\": \"1\",\n \"min\": \"0\",\n \"notFoundMessage\": \"图书不存在\",\n \"errorMessage\": \"图书库存不足\"\n }\n ],\n \"button\": {\n \"scope\": \"admin\",\n \"pageCode\": \"borrow_admin_page\",\n \"slot\": \"list.rowActions\",\n \"type\": \"success\",\n \"confirm\": \"确认审核通过?\",\n \"order\": 10\n }\n },\n {\n \"code\": \"reject\",\n \"name\": \"审核拒绝\",\n \"from\": \"pending\",\n \"to\": \"rejected\",\n \"actor\": \"admin\",\n \"method\": \"POST\",\n \"path\": \"/borrow-record/reject\",\n \"invalidStateMessage\": \"当前状态不能拒绝\",\n \"successMessage\": \"已拒绝\",\n \"audit\": {\"userField\": \"reject_user_id\", \"timeField\": \"reject_time\"},\n \"effects\": [],\n \"button\": {\n \"scope\": \"admin\",\n \"pageCode\": \"borrow_admin_page\",\n \"slot\": \"list.rowActions\",\n \"type\": \"danger\",\n \"confirm\": \"确认拒绝?\",\n \"order\": 20\n }\n },\n {\n \"code\": \"return\",\n \"name\": \"确认还书\",\n \"from\": \"borrowing\",\n \"to\": \"returned\",\n \"actor\": \"admin\",\n \"method\": \"POST\",\n \"path\": \"/borrow-record/return\",\n \"invalidStateMessage\": \"当前状态不能还书\",\n \"successMessage\": \"还书成功\",\n \"audit\": {\"userField\": \"return_user_id\", \"timeField\": \"return_time\"},\n \"effects\": [\n {\n \"type\": \"increase\",\n \"table\": \"book_info\",\n \"relationField\": \"book_id\",\n \"field\": \"stock\",\n \"amount\": \"1\",\n \"notFoundMessage\": \"图书不存在\"\n }\n ],\n \"button\": {\n \"scope\": \"admin\",\n \"pageCode\": \"borrow_admin_page\",\n \"slot\": \"list.rowActions\",\n \"type\": \"primary\",\n \"confirm\": \"确认还书?\",\n \"order\": 30\n }\n }\n ],\n \"metrics\": [\n {\n \"code\": \"borrowing_count\",\n \"name\": \"借阅中数量\",\n \"table\": \"borrow_record\",\n \"aggregate\": \"count\",\n \"field\": \"id\",\n \"status\": \"borrowing\",\n \"unit\": \"条\"\n },\n {\n \"code\": \"total_borrowed\",\n \"name\": \"总借阅次数\",\n \"table\": \"borrow_record\",\n \"aggregate\": \"count\",\n \"field\": \"id\",\n \"unit\": \"次\"\n },\n {\n \"code\": \"reserved_count\",\n \"name\": \"预约中数量\",\n \"table\": \"reservation\",\n \"aggregate\": \"count\",\n \"field\": \"id\",\n \"status\": \"reserved\",\n \"unit\": \"条\"\n }\n ]\n}', '1', NULL, 44816, '2026-07-14 22:04:06');
INSERT INTO `factory_ai_stage_output` VALUES (129, 111, 107, 100, 'database', '{\"mode\":\"generate\",\"projectName\":\"图书管理系统\",\"projectDescription\":\"功能:借书、还书、预约、取消预约\\n角色用户、管理员\\n其他模块轮播图、公告、新闻\",\"industryTemplate\":\"\",\"stylePreset\":\"dark-tech\",\"extraRequirements\":\"\",\"confirmedAppBlueprint\":{\"adminHomeDashboard\":{\"charts\":[{\"filters\":[],\"metrics\":[{\"aggregate\":\"count\",\"label\":\"借阅趋势\"}],\"title\":\"借阅趋势\",\"type\":\"line\"},{\"filters\":[],\"metrics\":[{\"aggregate\":\"count\",\"label\":\"预约状态分布\"}],\"title\":\"预约状态分布\",\"type\":\"pie\"}],\"description\":\"核心业务数据\",\"metrics\":[{\"aggregate\":\"count\",\"code\":\"total_books\",\"filters\":[],\"semantic\":\"content\",\"tableName\":\"book_info\"},{\"aggregate\":\"count\",\"code\":\"total_borrows\",\"filters\":[],\"semantic\":\"order\",\"tableName\":\"borrow_record\"},{\"aggregate\":\"count\",\"code\":\"total_reservations\",\"filters\":[],\"semantic\":\"task\",\"tableName\":\"reservation\"},{\"aggregate\":\"count\",\"code\":\"active_readers\",\"filters\":[],\"semantic\":\"user\",\"tableName\":\"reader\"}],\"title\":\"运营总览\"},\"adminMenus\":[{\"code\":\"book_admin\",\"dataScope\":\"ROLE\",\"name\":\"图书管理\",\"pageCode\":\"book_admin_page\",\"pageType\":\"list\",\"path\":\"/admin/books\",\"requiresLogin\":true,\"tableName\":\"book_info\",\"visibleRoles\":[\"admin\"]},{\"code\":\"borrow_admin\",\"dataScope\":\"ROLE\",\"name\":\"借阅管理\",\"pageCode\":\"borrow_admin_page\",\"pageType\":\"list\",\"path\":\"/admin/borrows\",\"requiresLogin\":true,\"tableName\":\"borrow_record\",\"visibleRoles\":[\"admin\"]},{\"code\":\"reservation_admin\",\"dataScope\":\"ROLE\",\"name\":\"预约管理\",\"pageCode\":\"reservation_admin_page\",\"pageType\":\"list\",\"path\":\"/admin/reservations\",\"requiresLogin\":true,\"tableName\":\"reservation\",\"visibleRoles\":[\"admin\"]},{\"code\":\"carousel_admin\",\"dataScope\":\"ROLE\",\"name\":\"轮播图管理\",\"pageCode\":\"carousel_admin_page\",\"pageType\":\"list\",\"path\":\"/admin/carousels\",\"requiresLogin\":true,\"tableName\":\"carousel\",\"visibleRoles\":[\"admin\"]},{\"code\":\"announcement_admin\",\"dataScope\":\"ROLE\",\"name\":\"公告管理\",\"pageCode\":\"announcement_admin_page\",\"pageType\":\"list\",\"path\":\"/admin/announcements\",\"requiresLogin\":true,\"tableName\":\"announcement\",\"visibleRoles\":[\"admin\"]},{\"code\":\"news_admin\",\"dataScope\":\"ROLE\",\"name\":\"新闻管理\",\"pageCode\":\"news_admin_page\",\"pageType\":\"list\",\"path\":\"/admin/news\",\"requiresLogin\":true,\"tableName\":\"news\",\"visibleRoles\":[\"admin\"]}],\"frontendMenus\":[{\"code\":\"book_catalog\",\"dataScope\":\"PUBLIC\",\"name\":\"图书目录\",\"pageCode\":\"book_catalog_page\",\"pageType\":\"\",\"path\":\"/books\",\"requiresLogin\":false,\"tableName\":\"\",\"visibleRoles\":[]},{\"code\":\"reader_profile\",\"dataScope\":\"CURRENT_USER\",\"name\":\"个人资料\",\"pageCode\":\"reader_profile_page\",\"pageType\":\"\",\"path\":\"/reader/profile\",\"requiresLogin\":true,\"tableName\":\"\",\"visibleRoles\":[\"reader\"]},{\"code\":\"my_borrows\",\"dataScope\":\"CURRENT_USER\",\"name\":\"我的借阅\",\"pageCode\":\"my_borrows_page\",\"pageType\":\"\",\"path\":\"/reader/borrows\",\"requiresLogin\":true,\"tableName\":\"\",\"visibleRoles\":[\"reader\"]},{\"code\":\"my_reservations\",\"dataScope\":\"CURRENT_USER\",\"name\":\"我的预约\",\"pageCode\":\"my_reservations_page\",\"pageType\":\"\",\"path\":\"/reader/reservations\",\"requiresLogin\":true,\"tableName\":\"\",\"visibleRoles\":[\"reader\"]}],\"frontendPages\":[{\"code\":\"book_catalog_page\",\"menuCode\":\"book_catalog\",\"name\":\"图书目录\",\"pageType\":\"list\",\"parentPageCode\":\"\",\"path\":\"/books\",\"tableName\":\"book_info\"},{\"code\":\"reader_profile_page\",\"menuCode\":\"reader_profile\",\"name\":\"个人资料\",\"pageType\":\"form\",\"parentPageCode\":\"\",\"path\":\"/reader/profile\",\"tableName\":\"reader\"},{\"code\":\"my_borrows_page\",\"menuCode\":\"my_borrows\",\"name\":\"我的借阅\",\"pageType\":\"current_user_list\",\"parentPageCode\":\"\",\"path\":\"/reader/borrows\",\"tableName\":\"borrow_record\"},{\"code\":\"my_reservations_page\",\"menuCode\":\"my_reservations\",\"name\":\"我的预约\",\"pageType\":\"current_user_list\",\"parentPageCode\":\"\",\"path\":\"/reader/reservations\",\"tableName\":\"reservation\"}],\"roles\":[{\"code\":\"admin\",\"description\":\"系统管理员,管理图书、借阅、预约及内容维护\",\"name\":\"管理员\"},{\"code\":\"reader\",\"description\":\"普通用户,可浏览图书、借阅、预约\",\"name\":\"读者\"}]},\"flowConfig\":{\"actions\":[{\"actor\":\"admin\",\"audit\":{\"timeField\":\"approve_time\",\"userField\":\"approve_user_id\"},\"button\":{\"confirm\":\"确认审核通过?\",\"order\":10,\"pageCode\":\"borrow_admin_page\",\"scope\":\"admin\",\"slot\":\"list.rowActions\",\"type\":\"success\"},\"code\":\"approve\",\"effects\":[{\"amount\":\"1\",\"errorMessage\":\"图书库存不足\",\"field\":\"stock\",\"min\":\"0\",\"notFoundMessage\":\"图书不存在\",\"relationField\":\"book_id\",\"table\":\"book_info\",\"type\":\"decrease\",\"values\":{}}],\"from\":\"pending\",\"invalidStateMessage\":\"当前状态不能审核\",\"method\":\"POST\",\"name\":\"审核通过\",\"path\":\"/borrow-record/approve\",\"successMessage\":\"审核成功\",\"to\":\"borrowing\"},{\"actor\":\"admin\",\"audit\":{\"timeField\":\"reject_time\",\"userField\":\"reject_user_id\"},\"button\":{\"confirm\":\"确认拒绝?\",\"order\":20,\"pageCode\":\"borrow_admin_page\",\"scope\":\"admin\",\"slot\":\"list.rowActions\",\"type\":\"danger\"},\"code\":\"reject\",\"effects\":[],\"from\":\"pending\",\"invalidStateMessage\":\"当前状态不能拒绝\",\"method\":\"POST\",\"name\":\"审核拒绝\",\"path\":\"/borrow-record/reject\",\"successMessage\":\"已拒绝\",\"to\":\"rejected\"},{\"actor\":\"admin\",\"audit\":{\"timeField\":\"return_time\",\"userField\":\"return_user_id\"},\"button\":{\"confirm\":\"确认还书?\",\"order\":30,\"pageCode\":\"borrow_admin_page\",\"scope\":\"admin\",\"slot\":\"list.rowActions\",\"type\":\"primary\"},\"code\":\"return\",\"effects\":[{\"amount\":\"1\",\"field\":\"stock\",\"min\":\"0\",\"notFoundMessage\":\"图书不存在\",\"relationField\":\"book_id\",\"table\":\"book_info\",\"type\":\"increase\",\"values\":{}}],\"from\":\"borrowing\",\"invalidStateMessage\":\"当前状态不能还书\",\"method\":\"POST\",\"name\":\"确认还书\",\"path\":\"/borrow-record/return\",\"successMessage\":\"还书成功\",\"to\":\"returned\"}],\"code\":\"borrow_flow\",\"mainTable\":\"borrow_record\",\"metrics\":[{\"aggregate\":\"count\",\"code\":\"borrowing_count\",\"field\":\"id\",\"name\":\"借阅中数量\",\"status\":\"borrowing\",\"table\":\"borrow_record\",\"unit\":\"条\"},{\"aggregate\":\"count\",\"code\":\"total_borrowed\",\"field\":\"id\",\"name\":\"总借阅次数\",\"table\":\"borrow_record\",\"unit\":\"次\"},{\"aggregate\":\"count\",\"code\":\"reserved_count\",\"field\":\"id\",\"name\":\"预约中数量\",\"table\":\"reservation\",\"unit\":\"条\"}],\"name\":\"借阅流程\",\"notFoundMessage\":\"借阅记录不存在\",\"states\":[{\"code\":\"pending\",\"label\":\"待审核\"},{\"code\":\"borrowing\",\"label\":\"借阅中\"},{\"code\":\"returned\",\"label\":\"已归还\"},{\"code\":\"rejected\",\"label\":\"已拒绝\"}],\"statusField\":\"status\",\"version\":\"1.0\"},\"compiledFlowContract\":{\"acceptanceScenarios\":[],\"actions\":[{\"actor\":\"admin\",\"code\":\"approve\",\"name\":\"审核通过\",\"ownerObject\":\"borrow_record\",\"ownerTable\":\"borrow_record\",\"preconditions\":[],\"quantityEffects\":[{\"actionCode\":\"approve\",\"amount\":\"1\",\"effectType\":\"decrease\",\"objectCode\":\"book_info\",\"quantityField\":\"stock\",\"tableName\":\"book_info\"}],\"recordEffects\":[],\"required\":true,\"stateTransitions\":[{\"actionCode\":\"approve\",\"fromState\":\"pending\",\"toState\":\"borrowing\"}]},{\"actor\":\"admin\",\"code\":\"reject\",\"name\":\"审核拒绝\",\"ownerObject\":\"borrow_record\",\"ownerTable\":\"borrow_record\",\"preconditions\":[],\"quantityEffects\":[],\"recordEffects\":[],\"required\":true,\"stateTransitions\":[{\"actionCode\":\"reject\",\"fromState\":\"pending\",\"toState\":\"rejected\"}]},{\"actor\":\"admin\",\"code\":\"return\",\"name\":\"确认还书\",\"ownerObject\":\"borrow_record\",\"ownerTable\":\"borrow_record\",\"preconditions\":[],\"quantityEffects\":[{\"actionCode\":\"return\",\"amount\":\"1\",\"effectType\":\"increase\",\"objectCode\":\"book_info\",\"quantityField\":\"stock\",\"tableName\":\"book_info\"}],\"recordEffects\":[],\"required\":true,\"stateTransitions\":[{\"actionCode\":\"return\",\"fromState\":\"borrowing\",\"toState\":\"returned\"}]}],\"businessPolicies\":[],\"coreObjects\":[{\"code\":\"borrow_record\",\"name\":\"借阅流程\",\"objectType\":\"main\",\"tableName\":\"borrow_record\"},{\"code\":\"book_info\",\"name\":\"book_info\",\"objectType\":\"related\",\"tableName\":\"book_info\"}],\"domainName\":\"借阅流程\",\"metrics\":[{\"aggregate\":\"count\",\"code\":\"borrowing_count\",\"field\":\"id\",\"filters\":[{\"field\":\"status\",\"operator\":\"eq\",\"values\":[\"borrowing\"]}],\"name\":\"借阅中数量\",\"relatedActionCodes\":[],\"required\":true,\"tableName\":\"borrow_record\",\"unit\":\"条\"},{\"aggregate\":\"count\",\"code\":\"total_borrowed\",\"field\":\"id\",\"filters\":[],\"name\":\"总借阅次数\",\"relatedActionCodes\":[],\"required\":true,\"tableName\":\"borrow_record\",\"unit\":\"次\"},{\"aggregate\":\"count\",\"code\":\"reserved_count\",\"field\":\"id\",\"filters\":[],\"name\":\"预约中数量\",\"relatedActionCodes\":[],\"required\":true,\"tableName\":\"reservation\",\"unit\":\"条\"}],\"pageBindings\":[{\"actionCode\":\"approve\",\"pageCode\":\"borrow_admin_page\",\"slot\":\"list.rowActions\",\"tableName\":\"borrow_record\",\"target\":\"admin\"},{\"actionCode\":\"reject\",\"pageCode\":\"borrow_admin_page\",\"slot\":\"list.rowActions\",\"tableName\":\"borrow_record\",\"target\":\"admin\"},{\"actionCode\":\"return\",\"pageCode\":\"borrow_admin_page\",\"slot\":\"list.rowActions\",\"tableName\":\"borrow_record\",\"target\":\"admin\"}],\"quantityRules\":[{\"actionCode\":\"approve\",\"amount\":\"1\",\"effectType\":\"decrease\",\"objectCode\":\"book_info\",\"quantityField\":\"stock\",\"tableName\":\"book_info\"},{\"actionCode\":\"return\",\"amount\":\"1\",\"effectType\":\"increase\",\"objectCode\":\"book_info\",\"quantityField\":\"stock\",\"tableName\":\"book_info\"}],\"recordRules\":[],\"stateMachines\":[{\"objectCode\":\"borrow_record\",\"states\":[\"pending\",\"borrowing\",\"returned\",\"rejected\"],\"statusField\":\"status\",\"tableName\":\"borrow_record\",\"transitions\":[{\"actionCode\":\"approve\",\"fromState\":\"pending\",\"toState\":\"borrowing\"},{\"actionCode\":\"reject\",\"fromState\":\"pending\",\"toState\":\"rejected\"},{\"actionCode\":\"return\",\"fromState\":\"borrowing\",\"toState\":\"returned\"}]}]},\"canonicalTableRegistry\":[\"book_info\",\"reader\",\"borrow_record\",\"reservation\",\"carousel\",\"announcement\",\"news\"],\"limits\":{\"maxTables\":12,\"maxColumnsPerTable\":30}}', '{\n \"tables\": [\n {\n \"tableName\": \"admin\",\n \"tableComment\": \"管理员账号表\",\n \"adminMenuName\": \"管理员管理\",\n \"operations\": {\n \"add\": true,\n \"edit\": true,\n \"remove\": true,\n \"removeType\": \"physical\",\n \"reason\": \"\"\n },\n \"columns\": [\n {\n \"columnName\": \"admin_id\",\n \"columnLabel\": \"管理员ID\",\n \"columnComment\": \"主键ID\",\n \"columnType\": \"bigint(20)\",\n \"isPk\": \"1\",\n \"isIncrement\": \"1\",\n \"isRequired\": \"1\"\n },\n {\n \"columnName\": \"username\",\n \"columnLabel\": \"用户名\",\n \"columnComment\": \"登录用户名\",\n \"columnType\": \"varchar(50)\",\n \"isPk\": \"0\",\n \"isIncrement\": \"0\",\n \"isRequired\": \"1\"\n },\n {\n \"columnName\": \"password_hash\",\n \"columnLabel\": \"密码哈希\",\n \"columnComment\": \"加密后的密码\",\n \"columnType\": \"varchar(255)\",\n \"isPk\": \"0\",\n \"isIncrement\": \"0\",\n \"isRequired\": \"1\"\n },\n {\n \"columnName\": \"nickname\",\n \"columnLabel\": \"昵称\",\n \"columnComment\": \"管理员显示名称\",\n \"columnType\": \"varchar(50)\",\n \"isPk\": \"0\",\n \"isIncrement\": \"0\",\n \"isRequired\": \"1\"\n },\n {\n \"columnName\": \"status\",\n \"columnLabel\": \"状态\",\n \"columnComment\": \"账号状态1启用 0禁用\",\n \"columnType\": \"char(1)\",\n \"isPk\": \"0\",\n \"isIncrement\": \"0\",\n \"isRequired\": \"1\",\n \"htmlType\": \"radio\",\n \"dictOptions\": [\n {\n \"label\": \"启用\",\n \"value\": \"1\"\n },\n {\n \"label\": \"禁用\",\n \"value\": \"0\"\n }\n ]\n },\n {\n \"columnName\": \"create_time\",\n \"columnLabel\": \"创建时间\",\n \"columnComment\": \"账号创建时间\",\n \"columnType\": \"datetime\",\n \"isPk\": \"0\",\n \"isIncrement\": \"0\",\n \"isRequired\": \"1\"\n }\n ]\n },\n {\n \"tableName\": \"reader\",\n \"tableComment\": \"读者账号表\",\n \"adminMenuName\": \"读者管理\",\n \"operations\": {\n \"add\": true,\n \"edit\": true,\n \"remove\": true,\n \"removeType\": \"physical\",\n \"reason\": \"\"\n },\n \"columns\": [\n {\n \"columnName\": \"reader_id\",\n \"columnLabel\": \"读者ID\",\n \"columnComment\": \"主键ID\",\n \"columnType\": \"bigint(20)\",\n \"isPk\": \"1\",\n \"isIncrement\": \"1\",\n \"isRequired\": \"1\"\n },\n {\n \"columnName\": \"username\",\n \"columnLabel\": \"用户名\",\n \"columnComment\": \"登录用户名\",\n \"columnType\": \"varchar(50)\",\n \"isPk\": \"0\",\n \"isIncrement\": \"0\",\n \"isRequired\": \"1\"\n },\n {\n \"columnName\": \"password_hash\",\n \"columnLabel\": \"密码哈希\",\n \"columnComment\": \"加密后的密码\",\n \"columnType\": \"varchar(255)\",\n \"isPk\": \"0\",\n \"isIncrement\": \"0\",\n \"isRequired\": \"1\"\n },\n {\n \"columnName\": \"nickname\",\n \"columnLabel\": \"昵称\",\n \"columnComment\": \"读者显示名称\",\n \"columnType\": \"varchar(50)\",\n \"isPk\": \"0\",\n \"isIncrement\": \"0\",\n \"isRequired\": \"1\"\n },\n {\n \"columnName\": \"email\",\n \"columnLabel\": \"邮箱\",\n \"columnComment\": \"电子邮箱\",\n \"columnType\": \"varchar(100)\",\n \"isPk\": \"0\",\n \"isIncrement\": \"0\",\n \"isRequired\": \"0\"\n },\n {\n \"columnName\": \"phone\",\n \"columnLabel\": \"手机号\",\n \"columnComment\": \"手机号码\",\n \"columnType\": \"varchar(20)\",\n \"isPk\": \"0\",\n \"isIncrement\": \"0\",\n \"isRequired\": \"0\"\n },\n {\n \"columnName\": \"avatar\",\n \"columnLabel\": \"头像\",\n \"columnComment\": \"头像图片URL\",\n \"columnType\": \"varchar(255)\",\n \"isPk\": \"0\",\n \"isIncrement\": \"0\",\n \"isRequired\": \"0\"\n },\n {\n \"columnName\": \"status\",\n \"columnLabel\": \"状态\",\n \"columnComment\": \"账号状态1启用 0禁用\",\n \"columnType\": \"char(1)\",\n \"isPk\": \"0\",\n \"isIncrement\": \"0\",\n \"isRequired\": \"1\",\n \"htmlType\": \"radio\",\n \"dictOptions\": [\n {\n \"label\": \"启用\",\n \"value\": \"1\"\n },\n {\n \"label\": \"禁用\",\n \"value\": \"0\"\n }\n ]\n },\n {\n \"columnName\": \"create_time\",\n \"columnLabel\": \"创建时间\",\n \"columnComment\": \"账号创建时间\",\n \"columnType\": \"datetime\",\n \"isPk\": \"0\",\n \"isIncrement\": \"0\",\n \"isRequired\": \"1\"\n }\n ]\n },\n {\n \"tableName\": \"book_info\",\n \"tableComment\": \"图书信息表\",\n \"adminMenuName\": \"图书管理\",\n \"operations\": {\n \"add\": true,\n \"edit\": true,\n \"remove\": true,\n \"removeType\": \"physical\",\n \"reason\": \"\"\n },\n \"columns\": [\n {\n \"columnName\": \"id\",\n \"columnLabel\": \"图书ID\",\n \"columnComment\": \"主键ID\",\n \"columnType\": \"bigint(20)\",\n \"isPk\": \"1\",\n \"isIncrement\": \"1\",\n \"isRequired\": \"1\"\n },\n {\n \"columnName\": \"isbn\",\n \"columnLabel\": \"ISBN\",\n \"columnComment\": \"国际标准书号\",\n \"columnType\": \"varchar(20)\",\n \"isPk\": \"0\",\n \"isIncrement\": \"0\",\n \"isRequired\": \"1\"\n },\n {\n \"columnName\": \"title\",\n \"columnLabel\": \"书名\",\n \"columnComment\": \"图书标题\",\n \"columnType\": \"varchar(200)\",\n \"isPk\": \"0\",\n \"isIncrement\": \"0\",\n \"isRequired\": \"1\"\n },\n {\n \"columnName\": \"author\",\n \"columnLabel\": \"作者\",\n \"columnComment\": \"图书作者\",\n \"columnType\": \"varchar(100)\",\n \"isPk\": \"0\",\n \"isIncrement\": \"0\",\n \"isRequired\": \"1\"\n },\n {\n \"columnName\": \"publisher\",\n \"columnLabel\": \"出版社\",\n \"columnComment\": \"出版机构\",\n \"columnType\": \"varchar(100)\",\n \"isPk\": \"0\",\n \"isIncrement\": \"0\",\n \"isRequired\": \"0\"\n },\n {\n \"columnName\": \"publish_year\",\n \"columnLabel\": \"出版年份\",\n \"columnComment\": \"出版年份\",\n \"columnType\": \"varchar(10)\",\n \"isPk\": \"0\",\n \"isIncrement\": \"0\",\n \"isRequired\": \"0\"\n },\n {\n \"columnName\": \"category\",\n \"columnLabel\": \"分类\",\n \"columnComment\": \"图书分类\",\n \"columnType\": \"varchar(50)\",\n \"isPk\": \"0\",\n \"isIncrement\": \"0\",\n \"isRequired\": \"0\",\n \"htmlType\": \"select\",\n \"dictOptions\": [\n {\n \"label\": \"文学\",\n \"value\": \"literature\"\n },\n {\n \"label\": \"科技\",\n \"value\": \"technology\"\n },\n {\n \"label\": \"历史\",\n \"value\": \"history\"\n },\n {\n \"label\": \"艺术\",\n \"value\": \"art\"\n },\n {\n \"label\": \"其他\",\n \"value\": \"other\"\n }\n ]\n },\n {\n \"columnName\": \"stock\",\n \"columnLabel\": \"库存\",\n \"columnComment\": \"当前可借数量\",\n \"columnType\": \"int(11)\",\n \"isPk\": \"0\",\n \"isIncrement\": \"0\",\n \"isRequired\": \"1\"\n },\n {\n \"columnName\": \"description\",\n \"columnLabel\": \"简介\",\n \"columnComment\": \"图书内容简介\",\n \"columnType\": \"text\",\n \"isPk\": \"0\",\n \"isIncrement\": \"0\",\n \"isRequired\": \"0\"\n },\n {\n \"columnName\": \"cover_image\",\n \"columnLabel\": \"封面图片\",\n \"columnComment\": \"封面图片URL\",\n \"columnType\": \"varchar(255)\",\n \"isPk\": \"0\",\n \"isIncrement\": \"0\",\n \"isRequired\": \"0\"\n },\n {\n \"columnName\": \"status\",\n \"columnLabel\": \"状态\",\n \"columnComment\": \"上架状态1上架 0下架\",\n \"columnType\": \"char(1)\",\n \"isPk\": \"0\",\n \"isIncrement\": \"0\",\n \"isRequired\": \"1\",\n \"htmlType\": \"radio\",\n \"dictOptions\": [\n {\n \"label\": \"上架\",\n \"value\": \"1\"\n },\n {\n \"label\": \"下架\",\n \"value\": \"0\"\n }\n ]\n },\n {\n \"columnName\": \"create_time\",\n \"columnLabel\": \"创建时间\",\n \"columnComment\": \"记录创建时间\",\n \"columnType\": \"datetime\",\n \"isPk\": \"0\",\n \"isIncrement\": \"0\",\n \"isRequired\": \"1\"\n },\n {\n \"columnName\": \"update_time\",\n \"columnLabel\": \"更新时间\",\n \"columnComment\": \"记录更新时间\",\n \"columnType\": \"datetime\",\n \"isPk\": \"0\",\n \"isIncrement\": \"0\",\n \"isRequired\": \"0\"\n }\n ]\n },\n {\n \"tableName\": \"borrow_record\",\n \"tableComment\": \"借阅记录表\",\n \"adminMenuName\": \"借阅管理\",\n \"operations\": {\n \"add\": true,\n \"edit\": false,\n \"remove\": false,\n \"removeType\": \"physical\",\n \"reason\": \"借阅记录仅可新增,不可编辑或删除\"\n },\n \"columns\": [\n {\n \"columnName\": \"id\",\n \"columnLabel\": \"记录ID\",\n \"columnComment\": \"主键ID\",\n \"columnType\": \"bigint(20)\",\n \"isPk\": \"1\",\n \"isIncrement\": \"1\",\n \"isRequired\": \"1\"\n },\n {\n \"columnName\": \"reader_id\",\n \"columnLabel\": \"读者ID\",\n \"columnComment\": \"借阅者关联reader表\",\n \"columnType\": \"bigint(20)\",\n \"isPk\": \"0\",\n \"isIncrement\": \"0\",\n \"isRequired\": \"1\",\n \"htmlType\": \"select\",\n \"dictType\": \"remote:reader:reader_id:nickname\"\n },\n {\n \"columnName\": \"book_id\",\n \"columnLabel\": \"图书ID\",\n \"columnComment\": \"被借图书关联book_info表\",\n \"columnType\": \"bigint(20)\",\n \"isPk\": \"0\",\n \"isIncrement\": \"0\",\n \"isRequired\": \"1\",\n \"htmlType\": \"select\",\n \"dictType\": \"remote:book_info:id:title\"\n },\n {\n \"columnName\": \"status\",\n \"columnLabel\": \"状态\",\n \"columnComment\": \"借阅状态pending待审核, borrowing借阅中, returned已归还, rejected已拒绝\",\n \"columnType\": \"varchar(20)\",\n \"isPk\": \"0\",\n \"isIncrement\": \"0\",\n \"isRequired\": \"1\",\n \"htmlType\": \"select\",\n \"dictOptions\": [\n {\n \"label\": \"待审核\",\n \"value\": \"pending\"\n },\n {\n \"label\": \"借阅中\",\n \"value\": \"borrowing\"\n },\n {\n \"label\": \"已归还\",\n \"value\": \"returned\"\n },\n {\n \"label\": \"已拒绝\",\n \"value\": \"rejected\"\n }\n ]\n },\n {\n \"columnName\": \"borrow_date\",\n \"columnLabel\": \"借阅日期\",\n \"columnComment\": \"开始借阅时间\",\n \"columnType\": \"datetime\",\n \"isPk\": \"0\",\n \"isIncrement\": \"0\",\n \"isRequired\": \"1\"\n },\n {\n \"columnName\": \"due_date\",\n \"columnLabel\": \"应还日期\",\n \"columnComment\": \"应归还时间\",\n \"columnType\": \"datetime\",\n \"isPk\": \"0\",\n \"isIncrement\": \"0\",\n \"isRequired\": \"1\"\n },\n {\n \"columnName\": \"return_date\",\n \"columnLabel\": \"实际归还日期\",\n \"columnComment\": \"实际归还时间\",\n \"columnType\": \"datetime\",\n \"isPk\": \"0\",\n \"isIncrement\": \"0\",\n \"isRequired\": \"0\"\n },\n {\n \"columnName\": \"approve_time\",\n \"columnLabel\": \"审核时间\",\n \"columnComment\": \"管理员审核通过的时间\",\n \"columnType\": \"datetime\",\n \"isPk\": \"0\",\n \"isIncrement\": \"0\",\n \"isRequired\": \"0\"\n },\n {\n \"columnName\": \"approve_user_id\",\n \"columnLabel\": \"审核人ID\",\n \"columnComment\": \"审核通过的管理员关联admin表\",\n \"columnType\": \"bigint(20)\",\n \"isPk\": \"0\",\n \"isIncrement\": \"0\",\n \"isRequired\": \"0\",\n \"htmlType\": \"select\",\n \"dictType\": \"remote:admin:admin_id:username\"\n },\n {\n \"columnName\": \"reject_time\",\n \"columnLabel\": \"拒绝时间\",\n \"columnComment\": \"管理员拒绝的时间\",\n \"columnType\": \"datetime\",\n \"isPk\": \"0\",\n \"isIncrement\": \"0\",\n \"isRequired\": \"0\"\n },\n {\n \"columnName\": \"reject_user_id\",\n \"columnLabel\": \"拒绝人ID\",\n \"columnComment\": \"拒绝的管理员关联admin表\",\n \"columnType\": \"bigint(20)\",\n \"isPk\": \"0\",\n \"isIncrement\": \"0\",\n \"isRequired\": \"0\",\n \"htmlType\": \"select\",\n \"dictType\": \"remote:admin:admin_id:username\"\n },\n {\n \"columnName\": \"return_time\",\n \"columnLabel\": \"归还确认时间\",\n \"columnComment\": \"管理员确认归还的时间\",\n \"columnType\": \"datetime\",\n \"isPk\": \"0\",\n \"isIncrement\": \"0\",\n \"isRequired\": \"0\"\n },\n {\n \"columnName\": \"return_user_id\",\n \"columnLabel\": \"归还确认人ID\",\n \"columnComment\": \"确认归还的管理员关联admin表\",\n \"columnType\": \"bigint(20)\",\n \"isPk\": \"0\",\n \"isIncrement\": \"0\",\n \"isRequired\": \"0\",\n \"htmlType\": \"select\",\n \"dictType\": \"remote:admin:admin_id:username\"\n },\n {\n \"columnName\": \"create_time\",\n \"columnLabel\": \"创建时间\",\n \"columnComment\": \"记录创建时间\",\n \"columnType\": \"datetime\",\n \"isPk\": \"0\",\n \"isIncrement\": \"0\",\n \"isRequired\": \"1\"\n }\n ]\n },\n {\n \"tableName\": \"reservation\",\n \"tableComment\": \"预约记录表\",\n \"adminMenuName\": \"预约管理\",\n \"operations\": {\n \"add\": true,\n \"edit\": false,\n \"remove\": false,\n \"removeType\": \"physical\",\n \"reason\": \"预约记录仅可新增,不可编辑或删除\"\n },\n \"columns\": [\n {\n \"columnName\": \"id\",\n \"columnLabel\": \"预约ID\",\n \"columnComment\": \"主键ID\",\n \"columnType\": \"bigint(20)\",\n \"isPk\": \"1\",\n \"isIncrement\": \"1\",\n \"isRequired\": \"1\"\n },\n {\n \"columnName\": \"reader_id\",\n \"columnLabel\": \"读者ID\",\n \"columnComment\": \"预约者关联reader表\",\n \"columnType\": \"bigint(20)\",\n \"isPk\": \"0\",\n \"isIncrement\": \"0\",\n \"isRequired\": \"1\",\n \"htmlType\": \"select\",\n \"dictType\": \"remote:reader:reader_id:nickname\"\n },\n {\n \"columnName\": \"book_id\",\n \"columnLabel\": \"图书ID\",\n \"columnComment\": \"被预约图书关联book_info表\",\n \"columnType\": \"bigint(20)\",\n \"isPk\": \"0\",\n \"isIncrement\": \"0\",\n \"isRequired\": \"1\",\n \"htmlType\": \"select\",\n \"dictType\": \"remote:book_info:id:title\"\n },\n {\n \"columnName\": \"status\",\n \"columnLabel\": \"状态\",\n \"columnComment\": \"预约状态active预约中, fulfilled已借出, cancelled已取消\",\n \"columnType\": \"varchar(20)\",\n \"isPk\": \"0\",\n \"isIncrement\": \"0\",\n \"isRequired\": \"1\",\n \"htmlType\": \"select\",\n \"dictOptions\": [\n {\n \"label\": \"预约中\",\n \"value\": \"active\"\n },\n {\n \"label\": \"已借出\",\n \"value\": \"fulfilled\"\n },\n {\n \"label\": \"已取消\",\n \"value\": \"cancelled\"\n }\n ]\n },\n {\n \"columnName\": \"reserve_time\",\n \"columnLabel\": \"预约时间\",\n \"columnComment\": \"发起预约的时间\",\n \"columnType\": \"datetime\",\n \"isPk\": \"0\",\n \"isIncrement\": \"0\",\n \"isRequired\": \"1\"\n },\n {\n \"columnName\": \"expire_time\",\n \"columnLabel\": \"过期时间\",\n \"columnComment\": \"预约有效期截止时间\",\n \"columnType\": \"datetime\",\n \"isPk\": \"0\",\n \"isIncrement\": \"0\",\n \"isRequired\": \"0\"\n },\n {\n \"columnName\": \"create_time\",\n \"columnLabel\": \"创建时间\",\n \"columnComment\": \"记录创建时间\",\n \"columnType\": \"datetime\",\n \"isPk\": \"0\",\n \"isIncrement\": \"0\",\n \"isRequired\": \"1\"\n }\n ]\n },\n {\n \"tableName\": \"carousel\",\n \"tableComment\": \"轮播图表\",\n \"adminMenuName\": \"轮播图管理\",\n \"operations\": {\n \"add\": true,\n \"edit\": true,\n \"remove\": true,\n \"removeType\": \"physical\",\n \"reason\": \"\"\n },\n \"columns\": [\n {\n \"columnName\": \"id\",\n \"columnLabel\": \"轮播图ID\",\n \"columnComment\": \"主键ID\",\n \"columnType\": \"bigint(20)\",\n \"isPk\": \"1\",\n \"isIncrement\": \"1\",\n \"isRequired\": \"1\"\n },\n {\n \"columnName\": \"title\",\n \"columnLabel\": \"标题\",\n \"columnComment\": \"轮播图标题\",\n \"columnType\": \"varchar(200)\",\n \"isPk\": \"0\",\n \"isIncrement\": \"0\",\n \"isRequired\": \"1\"\n },\n {\n \"columnName\": \"image_url\",\n \"columnLabel\": \"图片URL\",\n \"columnComment\": \"图片地址\",\n \"columnType\": \"varchar(500)\",\n \"isPk\": \"0\",\n \"isIncrement\": \"0\",\n \"isRequired\": \"1\"\n },\n {\n \"columnName\": \"link_url\",\n \"columnLabel\": \"链接URL\",\n \"columnComment\": \"点击跳转链接\",\n \"columnType\": \"varchar(500)\",\n \"isPk\": \"0\",\n \"isIncrement\": \"0\",\n \"isRequired\": \"0\"\n },\n {\n \"columnName\": \"sort_order\",\n \"columnLabel\": \"排序\",\n \"columnComment\": \"显示顺序,数值越小越靠前\",\n \"columnType\": \"int(11)\",\n \"isPk\": \"0\",\n \"isIncrement\": \"0\",\n \"isRequired\": \"0\"\n },\n {\n \"columnName\": \"status\",\n \"columnLabel\": \"状态\",\n \"columnComment\": \"启用状态1启用 0禁用\",\n \"columnType\": \"char(1)\",\n \"isPk\": \"0\",\n \"isIncrement\": \"0\",\n \"isRequired\": \"1\",\n \"htmlType\": \"radio\",\n \"dictOptions\": [\n {\n \"label\": \"启用\",\n \"value\": \"1\"\n },\n {\n \"label\": \"禁用\",\n \"value\": \"0\"\n }\n ]\n },\n {\n \"columnName\": \"create_time\",\n \"columnLabel\": \"创建时间\",\n \"columnComment\": \"记录创建时间\",\n \"columnType\": \"datetime\",\n \"isPk\": \"0\",\n \"isIncrement\": \"0\",\n \"isRequired\": \"1\"\n },\n {\n \"columnName\": \"update_time\",\n \"columnLabel\": \"更新时间\",\n \"columnComment\": \"记录更新时间\",\n \"columnType\": \"datetime\",\n \"isPk\": \"0\",\n \"isIncrement\": \"0\",\n \"isRequired\": \"0\"\n }\n ]\n },\n {\n \"tableName\": \"announcement\",\n \"tableComment\": \"公告表\",\n \"adminMenuName\": \"公告管理\",\n \"operations\": {\n \"add\": true,\n \"edit\": true,\n \"remove\": true,\n \"removeType\": \"physical\",\n \"reason\": \"\"\n },\n \"columns\": [\n {\n \"columnName\": \"id\",\n \"columnLabel\": \"公告ID\",\n \"columnComment\": \"主键ID\",\n \"columnType\": \"bigint(20)\",\n \"isPk\": \"1\",\n \"isIncrement\": \"1\",\n \"isRequired\": \"1\"\n },\n {\n \"columnName\": \"title\",\n \"columnLabel\": \"标题\",\n \"columnComment\": \"公告标题\",\n \"columnType\": \"varchar(200)\",\n \"isPk\": \"0\",\n \"isIncrement\": \"0\",\n \"isRequired\": \"1\"\n },\n {\n \"columnName\": \"content\",\n \"columnLabel\": \"内容\",\n \"columnComment\": \"公告正文\",\n \"columnType\": \"text\",\n \"isPk\": \"0\",\n \"isIncrement\": \"0\",\n \"isRequired\": \"1\"\n },\n {\n \"columnName\": \"publish_time\",\n \"columnLabel\": \"发布时间\",\n \"columnComment\": \"公告发布时间\",\n \"columnType\": \"datetime\",\n \"isPk\": \"0\",\n \"isIncrement\": \"0\",\n \"isRequired\": \"0\"\n },\n {\n \"columnName\": \"status\",\n \"columnLabel\": \"状态\",\n \"columnComment\": \"发布状态1发布 0草稿\",\n \"columnType\": \"char(1)\",\n \"isPk\": \"0\",\n \"isIncrement\": \"0\",\n \"isRequired\": \"1\",\n \"htmlType\": \"radio\",\n \"dictOptions\": [\n {\n \"label\": \"发布\",\n \"value\": \"1\"\n },\n {\n \"label\": \"草稿\",\n \"value\": \"0\"\n }\n ]\n },\n {\n \"columnName\": \"create_time\",\n \"columnLabel\": \"创建时间\",\n \"columnComment\": \"记录创建时间\",\n \"columnType\": \"datetime\",\n \"isPk\": \"0\",\n \"isIncrement\": \"0\",\n \"isRequired\": \"1\"\n },\n {\n \"columnName\": \"update_time\",\n \"columnLabel\": \"更新时间\",\n \"columnComment\": \"记录更新时间\",\n \"columnType\": \"datetime\",\n \"isPk\": \"0\",\n \"isIncrement\": \"0\",\n \"isRequired\": \"0\"\n }\n ]\n },\n {\n \"tableName\": \"news\",\n \"tableComment\": \"新闻表\",\n \"adminMenuName\": \"新闻管理\",\n \"operations\": {\n \"add\": true,\n \"edit\": true,\n \"remove\": true,\n \"removeType\": \"physical\",\n \"reason\": \"\"\n },\n \"columns\": [\n {\n \"columnName\": \"id\",\n \"columnLabel\": \"新闻ID\",\n \"columnComment\": \"主键ID\",\n \"columnType\": \"bigint(20)\",\n \"isPk\": \"1\",\n \"isIncrement\": \"1\",\n \"isRequired\": \"1\"\n },\n {\n \"columnName\": \"title\",\n \"columnLabel\": \"标题\",\n \"columnComment\": \"新闻标题\",\n \"columnType\": \"varchar(200)\",\n \"isPk\": \"0\",\n \"isIncrement\": \"0\",\n \"isRequired\": \"1\"\n },\n {\n \"columnName\": \"content\",\n \"columnLabel\": \"内容\",\n \"columnComment\": \"新闻正文\",\n \"columnType\": \"text\",\n \"isPk\": \"0\",\n \"isIncrement\": \"0\",\n \"isRequired\": \"1\"\n },\n {\n \"columnName\": \"source\",\n \"columnLabel\": \"来源\",\n \"columnComment\": \"新闻来源\",\n \"columnType\": \"varchar(100)\",\n \"isPk\": \"0\",\n \"isIncrement\": \"0\",\n \"isRequired\": \"0\"\n },\n {\n \"columnName\": \"publish_time\",\n \"columnLabel\": \"发布时间\",\n \"columnComment\": \"新闻发布时间\",\n \"columnType\": \"datetime\",\n \"isPk\": \"0\",\n \"isIncrement\": \"0\",\n \"isRequired\": \"0\"\n },\n {\n \"columnName\": \"status\",\n \"columnLabel\": \"状态\",\n \"columnComment\": \"发布状态1发布 0草稿\",\n \"columnType\": \"char(1)\",\n \"isPk\": \"0\",\n \"isIncrement\": \"0\",\n \"isRequired\": \"1\",\n \"htmlType\": \"radio\",\n \"dictOptions\": [\n {\n \"label\": \"发布\",\n \"value\": \"1\"\n },\n {\n \"label\": \"草稿\",\n \"value\": \"0\"\n }\n ]\n },\n {\n \"columnName\": \"create_time\",\n \"columnLabel\": \"创建时间\",\n \"columnComment\": \"记录创建时间\",\n \"columnType\": \"datetime\",\n \"isPk\": \"0\",\n \"isIncrement\": \"0\",\n \"isRequired\": \"1\"\n },\n {\n \"columnName\": \"update_time\",\n \"columnLabel\": \"更新时间\",\n \"columnComment\": \"记录更新时间\",\n \"columnType\": \"datetime\",\n \"isPk\": \"0\",\n \"isIncrement\": \"0\",\n \"isRequired\": \"0\"\n }\n ]\n }\n ]\n}', '1', NULL, 55667, '2026-07-14 22:05:02');
INSERT INTO `factory_ai_stage_output` VALUES (130, 112, 108, 100, 'app_blueprint', '{\"projectName\":\"图书管理系统\",\"projectDescription\":\"功能:借书、还书、预约、取消预约\\n角色用户、管理员\\n其他模块轮播图、公告、新闻\",\"industryTemplate\":\"\",\"stylePreset\":\"business_clean\",\"extraRequirements\":\"\"}', '{\n \"roles\": [\n {\n \"code\": \"admin\",\n \"name\": \"管理员\",\n \"description\": \"系统管理员,管理图书、借阅、公告等\"\n },\n {\n \"code\": \"reader\",\n \"name\": \"读者\",\n \"description\": \"普通用户,借书、还书、预约图书\"\n }\n ],\n \"frontendMenus\": [\n {\n \"code\": \"book_catalog\",\n \"name\": \"图书目录\",\n \"path\": \"/books\",\n \"pageCode\": \"book_catalog_page\",\n \"requiresLogin\": false,\n \"visibleRoles\": [],\n \"dataScope\": \"PUBLIC\"\n },\n {\n \"code\": \"announcements\",\n \"name\": \"公告\",\n \"path\": \"/announcements\",\n \"pageCode\": \"announcement_list_page\",\n \"requiresLogin\": false,\n \"visibleRoles\": [],\n \"dataScope\": \"PUBLIC\"\n },\n {\n \"code\": \"news\",\n \"name\": \"新闻\",\n \"path\": \"/news\",\n \"pageCode\": \"news_list_page\",\n \"requiresLogin\": false,\n \"visibleRoles\": [],\n \"dataScope\": \"PUBLIC\"\n },\n {\n \"code\": \"my_borrows\",\n \"name\": \"我的借阅\",\n \"path\": \"/my-borrows\",\n \"pageCode\": \"my_borrows_page\",\n \"requiresLogin\": true,\n \"visibleRoles\": [\"reader\"],\n \"dataScope\": \"CURRENT_USER\"\n },\n {\n \"code\": \"my_reservations\",\n \"name\": \"我的预约\",\n \"path\": \"/my-reservations\",\n \"pageCode\": \"my_reservations_page\",\n \"requiresLogin\": true,\n \"visibleRoles\": [\"reader\"],\n \"dataScope\": \"CURRENT_USER\"\n },\n {\n \"code\": \"reader_profile\",\n \"name\": \"个人中心\",\n \"path\": \"/reader/profile\",\n \"pageCode\": \"reader_profile_page\",\n \"requiresLogin\": true,\n \"visibleRoles\": [\"reader\"],\n \"dataScope\": \"CURRENT_USER\"\n }\n ],\n \"frontendPages\": [\n {\n \"code\": \"book_catalog_page\",\n \"name\": \"图书目录\",\n \"menuCode\": \"book_catalog\",\n \"path\": \"/books\",\n \"pageType\": \"list\",\n \"tableName\": \"book_info\"\n },\n {\n \"code\": \"book_detail_page\",\n \"name\": \"图书详情\",\n \"menuCode\": \"book_catalog\",\n \"path\": \"/books/:id\",\n \"pageType\": \"detail\",\n \"tableName\": \"book_info\"\n },\n {\n \"code\": \"announcement_list_page\",\n \"name\": \"公告列表\",\n \"menuCode\": \"announcements\",\n \"path\": \"/announcements\",\n \"pageType\": \"list\",\n \"tableName\": \"announcement\"\n },\n {\n \"code\": \"news_list_page\",\n \"name\": \"新闻列表\",\n \"menuCode\": \"news\",\n \"path\": \"/news\",\n \"pageType\": \"list\",\n \"tableName\": \"news\"\n },\n {\n \"code\": \"my_borrows_page\",\n \"name\": \"我的借阅\",\n \"menuCode\": \"my_borrows\",\n \"path\": \"/my-borrows\",\n \"pageType\": \"current_user_list\",\n \"tableName\": \"borrow_record\"\n },\n {\n \"code\": \"my_reservations_page\",\n \"name\": \"我的预约\",\n \"menuCode\": \"my_reservations\",\n \"path\": \"/my-reservations\",\n \"pageType\": \"current_user_list\",\n \"tableName\": \"reservation\"\n },\n {\n \"code\": \"reader_profile_page\",\n \"name\": \"个人资料\",\n \"menuCode\": \"reader_profile\",\n \"path\": \"/reader/profile\",\n \"pageType\": \"form\",\n \"tableName\": \"reader\"\n }\n ],\n \"adminMenus\": [\n {\n \"code\": \"book_admin\",\n \"name\": \"图书管理\",\n \"path\": \"/admin/books\",\n \"pageCode\": \"book_admin_page\",\n \"tableName\": \"book_info\",\n \"pageType\": \"list\",\n \"requiresLogin\": true,\n \"visibleRoles\": [\"admin\"],\n \"dataScope\": \"ROLE\"\n },\n {\n \"code\": \"borrow_admin\",\n \"name\": \"借阅管理\",\n \"path\": \"/admin/borrows\",\n \"pageCode\": \"borrow_admin_page\",\n \"tableName\": \"borrow_record\",\n \"pageType\": \"list\",\n \"requiresLogin\": true,\n \"visibleRoles\": [\"admin\"],\n \"dataScope\": \"ROLE\"\n },\n {\n \"code\": \"reservation_admin\",\n \"name\": \"预约管理\",\n \"path\": \"/admin/reservations\",\n \"pageCode\": \"reservation_admin_page\",\n \"tableName\": \"reservation\",\n \"pageType\": \"list\",\n \"requiresLogin\": true,\n \"visibleRoles\": [\"admin\"],\n \"dataScope\": \"ROLE\"\n },\n {\n \"code\": \"announcement_admin\",\n \"name\": \"公告管理\",\n \"path\": \"/admin/announcements\",\n \"pageCode\": \"announcement_admin_page\",\n \"tableName\": \"announcement\",\n \"pageType\": \"list\",\n \"requiresLogin\": true,\n \"visibleRoles\": [\"admin\"],\n \"dataScope\": \"ROLE\"\n },\n {\n \"code\": \"news_admin\",\n \"name\": \"新闻管理\",\n \"path\": \"/admin/news\",\n \"pageCode\": \"news_admin_page\",\n \"tableName\": \"news\",\n \"pageType\": \"list\",\n \"requiresLogin\": true,\n \"visibleRoles\": [\"admin\"],\n \"dataScope\": \"ROLE\"\n },\n {\n \"code\": \"carousel_admin\",\n \"name\": \"轮播图管理\",\n \"path\": \"/admin/carousels\",\n \"pageCode\": \"carousel_admin_page\",\n \"tableName\": \"carousel\",\n \"pageType\": \"list\",\n \"requiresLogin\": true,\n \"visibleRoles\": [\"admin\"],\n \"dataScope\": \"ROLE\"\n },\n {\n \"code\": \"admin_profile\",\n \"name\": \"个人资料\",\n \"path\": \"/admin/profile\",\n \"pageCode\": \"admin_profile_page\",\n \"tableName\": \"admin\",\n \"pageType\": \"form\",\n \"requiresLogin\": true,\n \"visibleRoles\": [\"admin\"],\n \"dataScope\": \"ROLE\"\n }\n ],\n \"adminHomeDashboard\": {\n \"title\": \"运营总览\",\n \"description\": \"核心业务数据\",\n \"metrics\": [\n {\n \"label\": \"总图书数\",\n \"value\": null,\n \"fieldName\": \"id\",\n \"tableName\": \"book_info\",\n \"aggregate\": \"COUNT\",\n \"filter\": null,\n \"semantic\": \"inventory\"\n },\n {\n \"label\": \"总借阅次数\",\n \"value\": null,\n \"fieldName\": \"id\",\n \"tableName\": \"borrow_record\",\n \"aggregate\": \"COUNT\",\n \"filter\": null,\n \"semantic\": \"order\"\n },\n {\n \"label\": \"当前借出\",\n \"value\": null,\n \"fieldName\": \"id\",\n \"tableName\": \"borrow_record\",\n \"aggregate\": \"COUNT\",\n \"filter\": \"return_date IS NULL\",\n \"semantic\": \"task\"\n },\n {\n \"label\": \"待处理预约\",\n \"value\": null,\n \"fieldName\": \"id\",\n \"tableName\": \"reservation\",\n \"aggregate\": \"COUNT\",\n \"filter\": \"status=\'pending\'\",\n \"semantic\": \"warning\"\n }\n ],\n \"charts\": [\n {\n \"type\": \"line\",\n \"title\": \"近7天借阅趋势\",\n \"tableName\": \"borrow_record\",\n \"fieldName\": \"borrow_date\",\n \"aggregate\": \"COUNT\",\n \"timeRange\": \"last7days\",\n \"semantic\": \"order\"\n },\n {\n \"type\": \"pie\",\n \"title\": \"图书分类分布\",\n \"tableName\": \"book_info\",\n \"fieldName\": \"category\",\n \"aggregate\": \"COUNT\",\n \"timeRange\": null,\n \"semantic\": \"content\"\n }\n ]\n }\n}', '1', NULL, 44227, '2026-07-14 22:23:07');
INSERT INTO `factory_ai_stage_output` VALUES (131, 112, 108, 100, 'flow_config', '{\"mode\":\"generate\",\"projectName\":\"图书管理系统\",\"projectDescription\":\"功能:借书、还书、预约、取消预约\\n角色用户、管理员\\n其他模块轮播图、公告、新闻\",\"industryTemplate\":\"\",\"stylePreset\":\"business_clean\",\"extraRequirements\":\"\",\"confirmedAppBlueprint\":{\"adminHomeDashboard\":{\"charts\":[{\"filters\":[],\"metrics\":[{\"aggregate\":\"count\",\"label\":\"近7天借阅趋势\"}],\"semantic\":\"order\",\"tableName\":\"borrow_record\",\"title\":\"近7天借阅趋势\",\"type\":\"line\"},{\"filters\":[],\"metrics\":[{\"aggregate\":\"count\",\"label\":\"图书分类分布\"}],\"semantic\":\"content\",\"tableName\":\"book_info\",\"title\":\"图书分类分布\",\"type\":\"pie\"}],\"description\":\"核心业务数据\",\"metrics\":[{\"aggregate\":\"COUNT\",\"filters\":[],\"semantic\":\"inventory\",\"tableName\":\"book_info\"},{\"aggregate\":\"COUNT\",\"filters\":[],\"semantic\":\"order\",\"tableName\":\"borrow_record\"},{\"aggregate\":\"COUNT\",\"filters\":[],\"semantic\":\"task\",\"tableName\":\"borrow_record\"},{\"aggregate\":\"COUNT\",\"filters\":[],\"semantic\":\"warning\",\"tableName\":\"reservation\"}],\"title\":\"运营总览\"},\"adminMenus\":[{\"code\":\"book_admin\",\"dataScope\":\"ROLE\",\"name\":\"图书管理\",\"pageCode\":\"book_admin_page\",\"pageType\":\"list\",\"path\":\"/admin/books\",\"requiresLogin\":true,\"tableName\":\"book_info\",\"visibleRoles\":[\"admin\"]},{\"code\":\"borrow_admin\",\"dataScope\":\"ROLE\",\"name\":\"借阅管理\",\"pageCode\":\"borrow_admin_page\",\"pageType\":\"list\",\"path\":\"/admin/borrows\",\"requiresLogin\":true,\"tableName\":\"borrow_record\",\"visibleRoles\":[\"admin\"]},{\"code\":\"reservation_admin\",\"dataScope\":\"ROLE\",\"name\":\"预约管理\",\"pageCode\":\"reservation_admin_page\",\"pageType\":\"list\",\"path\":\"/admin/reservations\",\"requiresLogin\":true,\"tableName\":\"reservation\",\"visibleRoles\":[\"admin\"]},{\"code\":\"announcement_admin\",\"dataScope\":\"ROLE\",\"name\":\"公告管理\",\"pageCode\":\"announcement_admin_page\",\"pageType\":\"list\",\"path\":\"/admin/announcements\",\"requiresLogin\":true,\"tableName\":\"announcement\",\"visibleRoles\":[\"admin\"]},{\"code\":\"news_admin\",\"dataScope\":\"ROLE\",\"name\":\"新闻管理\",\"pageCode\":\"news_admin_page\",\"pageType\":\"list\",\"path\":\"/admin/news\",\"requiresLogin\":true,\"tableName\":\"news\",\"visibleRoles\":[\"admin\"]},{\"code\":\"carousel_admin\",\"dataScope\":\"ROLE\",\"name\":\"轮播图管理\",\"pageCode\":\"carousel_admin_page\",\"pageType\":\"list\",\"path\":\"/admin/carousels\",\"requiresLogin\":true,\"tableName\":\"carousel\",\"visibleRoles\":[\"admin\"]},{\"code\":\"admin_profile\",\"dataScope\":\"ROLE\",\"name\":\"个人资料\",\"pageCode\":\"admin_profile_page\",\"pageType\":\"form\",\"path\":\"/admin/profile\",\"requiresLogin\":true,\"tableName\":\"admin\",\"visibleRoles\":[\"admin\"]}],\"frontendMenus\":[{\"code\":\"book_catalog\",\"dataScope\":\"PUBLIC\",\"name\":\"图书目录\",\"pageCode\":\"book_catalog_page\",\"pageType\":\"\",\"path\":\"/books\",\"requiresLogin\":false,\"tableName\":\"\",\"visibleRoles\":[]},{\"code\":\"announcements\",\"dataScope\":\"PUBLIC\",\"name\":\"公告\",\"pageCode\":\"announcement_list_page\",\"pageType\":\"\",\"path\":\"/announcements\",\"requiresLogin\":false,\"tableName\":\"\",\"visibleRoles\":[]},{\"code\":\"news\",\"dataScope\":\"PUBLIC\",\"name\":\"新闻\",\"pageCode\":\"news_list_page\",\"pageType\":\"\",\"path\":\"/news\",\"requiresLogin\":false,\"tableName\":\"\",\"visibleRoles\":[]},{\"code\":\"my_borrows\",\"dataScope\":\"CURRENT_USER\",\"name\":\"我的借阅\",\"pageCode\":\"my_borrows_page\",\"pageType\":\"\",\"path\":\"/my-borrows\",\"requiresLogin\":true,\"tableName\":\"\",\"visibleRoles\":[\"reader\"]},{\"code\":\"my_reservations\",\"dataScope\":\"CURRENT_USER\",\"name\":\"我的预约\",\"pageCode\":\"my_reservations_page\",\"pageType\":\"\",\"path\":\"/my-reservations\",\"requiresLogin\":true,\"tableName\":\"\",\"visibleRoles\":[\"reader\"]},{\"code\":\"reader_profile\",\"dataScope\":\"CURRENT_USER\",\"name\":\"个人中心\",\"pageCode\":\"reader_profile_page\",\"pageType\":\"\",\"path\":\"/reader/profile\",\"requiresLogin\":true,\"tableName\":\"\",\"visibleRoles\":[\"reader\"]}],\"frontendPages\":[{\"code\":\"book_catalog_page\",\"menuCode\":\"book_catalog\",\"name\":\"图书目录\",\"pageType\":\"list\",\"parentPageCode\":\"\",\"path\":\"/books\",\"tableName\":\"book_info\"},{\"code\":\"book_detail_page\",\"menuCode\":\"book_catalog\",\"name\":\"图书详情\",\"pageType\":\"detail\",\"parentPageCode\":\"\",\"path\":\"/books/:id\",\"tableName\":\"book_info\"},{\"code\":\"announcement_list_page\",\"menuCode\":\"announcements\",\"name\":\"公告列表\",\"pageType\":\"list\",\"parentPageCode\":\"\",\"path\":\"/announcements\",\"tableName\":\"announcement\"},{\"code\":\"news_list_page\",\"menuCode\":\"news\",\"name\":\"新闻列表\",\"pageType\":\"list\",\"parentPageCode\":\"\",\"path\":\"/news\",\"tableName\":\"news\"},{\"code\":\"my_borrows_page\",\"menuCode\":\"my_borrows\",\"name\":\"我的借阅\",\"pageType\":\"current_user_list\",\"parentPageCode\":\"\",\"path\":\"/my-borrows\",\"tableName\":\"borrow_record\"},{\"code\":\"my_reservations_page\",\"menuCode\":\"my_reservations\",\"name\":\"我的预约\",\"pageType\":\"current_user_list\",\"parentPageCode\":\"\",\"path\":\"/my-reservations\",\"tableName\":\"reservation\"},{\"code\":\"reader_profile_page\",\"menuCode\":\"reader_profile\",\"name\":\"个人资料\",\"pageType\":\"form\",\"parentPageCode\":\"\",\"path\":\"/reader/profile\",\"tableName\":\"reader\"}],\"roles\":[{\"code\":\"admin\",\"description\":\"系统管理员,管理图书、借阅、公告等\",\"name\":\"管理员\"},{\"code\":\"reader\",\"description\":\"普通用户,借书、还书、预约图书\",\"name\":\"读者\"}]}}', '{\n \"version\": \"1.0\",\n \"code\": \"borrow_record_flow\",\n \"name\": \"借阅管理流程\",\n \"mainTable\": \"borrow_record\",\n \"statusField\": \"status\",\n \"notFoundMessage\": \"借阅记录不存在\",\n \"states\": [\n {\"code\": \"pending\", \"label\": \"待审核\"},\n {\"code\": \"borrowing\", \"label\": \"借阅中\"},\n {\"code\": \"returned\", \"label\": \"已归还\"},\n {\"code\": \"rejected\", \"label\": \"已拒绝\"}\n ],\n \"actions\": [\n {\n \"code\": \"approve_borrow\",\n \"name\": \"审核通过\",\n \"from\": \"pending\",\n \"to\": \"borrowing\",\n \"actor\": \"admin\",\n \"method\": \"POST\",\n \"path\": \"/borrow-record/approve\",\n \"invalidStateMessage\": \"当前状态不能审核\",\n \"successMessage\": \"借书审核通过\",\n \"audit\": {\"userField\": \"approve_user_id\", \"timeField\": \"approve_time\"},\n \"effects\": [\n {\n \"type\": \"decrease\",\n \"table\": \"book_info\",\n \"relationField\": \"book_id\",\n \"field\": \"stock\",\n \"amount\": \"1\",\n \"min\": \"0\",\n \"notFoundMessage\": \"图书不存在\",\n \"errorMessage\": \"图书库存不足\"\n }\n ],\n \"button\": {\n \"scope\": \"admin\",\n \"pageCode\": \"borrow_admin_page\",\n \"slot\": \"list.rowActions\",\n \"type\": \"primary\",\n \"confirm\": \"确认审核通过吗?\",\n \"order\": 10\n }\n },\n {\n \"code\": \"reject_borrow\",\n \"name\": \"拒绝借书\",\n \"from\": \"pending\",\n \"to\": \"rejected\",\n \"actor\": \"admin\",\n \"method\": \"POST\",\n \"path\": \"/borrow-record/reject\",\n \"invalidStateMessage\": \"当前状态不能拒绝\",\n \"successMessage\": \"已拒绝借书申请\",\n \"audit\": {\"userField\": \"approve_user_id\", \"timeField\": \"approve_time\"},\n \"effects\": [],\n \"button\": {\n \"scope\": \"admin\",\n \"pageCode\": \"borrow_admin_page\",\n \"slot\": \"list.rowActions\",\n \"type\": \"danger\",\n \"confirm\": \"确认拒绝吗?\",\n \"order\": 20\n }\n },\n {\n \"code\": \"return_book\",\n \"name\": \"归还图书\",\n \"from\": \"borrowing\",\n \"to\": \"returned\",\n \"actor\": \"admin\",\n \"method\": \"POST\",\n \"path\": \"/borrow-record/return\",\n \"invalidStateMessage\": \"当前状态不能归还\",\n \"successMessage\": \"归还成功\",\n \"audit\": {\"userField\": \"return_user_id\", \"timeField\": \"return_time\"},\n \"effects\": [\n {\n \"type\": \"increase\",\n \"table\": \"book_info\",\n \"relationField\": \"book_id\",\n \"field\": \"stock\",\n \"amount\": \"1\",\n \"notFoundMessage\": \"图书不存在\",\n \"errorMessage\": \"归还失败\"\n }\n ],\n \"button\": {\n \"scope\": \"admin\",\n \"pageCode\": \"borrow_admin_page\",\n \"slot\": \"list.rowActions\",\n \"type\": \"success\",\n \"confirm\": \"确认归还吗?\",\n \"order\": 30\n }\n }\n ],\n \"metrics\": [\n {\n \"code\": \"borrowing_count\",\n \"name\": \"借阅中数量\",\n \"table\": \"borrow_record\",\n \"aggregate\": \"count\",\n \"field\": \"id\",\n \"status\": \"borrowing\",\n \"unit\": \"条\"\n },\n {\n \"code\": \"pending_count\",\n \"name\": \"待审核数量\",\n \"table\": \"borrow_record\",\n \"aggregate\": \"count\",\n \"field\": \"id\",\n \"status\": \"pending\",\n \"unit\": \"条\"\n }\n ]\n}', '1', NULL, 103059, '2026-07-14 22:24:50');
INSERT INTO `factory_ai_stage_output` VALUES (132, 112, 108, 100, 'database', '{\"mode\":\"generate\",\"projectName\":\"图书管理系统\",\"projectDescription\":\"功能:借书、还书、预约、取消预约\\n角色用户、管理员\\n其他模块轮播图、公告、新闻\",\"industryTemplate\":\"\",\"stylePreset\":\"business_clean\",\"extraRequirements\":\"\",\"confirmedAppBlueprint\":{\"adminHomeDashboard\":{\"charts\":[{\"filters\":[],\"metrics\":[{\"aggregate\":\"count\",\"label\":\"近7天借阅趋势\"}],\"semantic\":\"order\",\"tableName\":\"borrow_record\",\"title\":\"近7天借阅趋势\",\"type\":\"line\"},{\"filters\":[],\"metrics\":[{\"aggregate\":\"count\",\"label\":\"图书分类分布\"}],\"semantic\":\"content\",\"tableName\":\"book_info\",\"title\":\"图书分类分布\",\"type\":\"pie\"}],\"description\":\"核心业务数据\",\"metrics\":[{\"aggregate\":\"COUNT\",\"filters\":[],\"semantic\":\"inventory\",\"tableName\":\"book_info\"},{\"aggregate\":\"COUNT\",\"filters\":[],\"semantic\":\"order\",\"tableName\":\"borrow_record\"},{\"aggregate\":\"COUNT\",\"filters\":[],\"semantic\":\"task\",\"tableName\":\"borrow_record\"},{\"aggregate\":\"COUNT\",\"filters\":[],\"semantic\":\"warning\",\"tableName\":\"reservation\"}],\"title\":\"运营总览\"},\"adminMenus\":[{\"code\":\"book_admin\",\"dataScope\":\"ROLE\",\"name\":\"图书管理\",\"pageCode\":\"book_admin_page\",\"pageType\":\"list\",\"path\":\"/admin/books\",\"requiresLogin\":true,\"tableName\":\"book_info\",\"visibleRoles\":[\"admin\"]},{\"code\":\"borrow_admin\",\"dataScope\":\"ROLE\",\"name\":\"借阅管理\",\"pageCode\":\"borrow_admin_page\",\"pageType\":\"list\",\"path\":\"/admin/borrows\",\"requiresLogin\":true,\"tableName\":\"borrow_record\",\"visibleRoles\":[\"admin\"]},{\"code\":\"reservation_admin\",\"dataScope\":\"ROLE\",\"name\":\"预约管理\",\"pageCode\":\"reservation_admin_page\",\"pageType\":\"list\",\"path\":\"/admin/reservations\",\"requiresLogin\":true,\"tableName\":\"reservation\",\"visibleRoles\":[\"admin\"]},{\"code\":\"announcement_admin\",\"dataScope\":\"ROLE\",\"name\":\"公告管理\",\"pageCode\":\"announcement_admin_page\",\"pageType\":\"list\",\"path\":\"/admin/announcements\",\"requiresLogin\":true,\"tableName\":\"announcement\",\"visibleRoles\":[\"admin\"]},{\"code\":\"news_admin\",\"dataScope\":\"ROLE\",\"name\":\"新闻管理\",\"pageCode\":\"news_admin_page\",\"pageType\":\"list\",\"path\":\"/admin/news\",\"requiresLogin\":true,\"tableName\":\"news\",\"visibleRoles\":[\"admin\"]},{\"code\":\"carousel_admin\",\"dataScope\":\"ROLE\",\"name\":\"轮播图管理\",\"pageCode\":\"carousel_admin_page\",\"pageType\":\"list\",\"path\":\"/admin/carousels\",\"requiresLogin\":true,\"tableName\":\"carousel\",\"visibleRoles\":[\"admin\"]},{\"code\":\"admin_profile\",\"dataScope\":\"ROLE\",\"name\":\"个人资料\",\"pageCode\":\"admin_profile_page\",\"pageType\":\"form\",\"path\":\"/admin/profile\",\"requiresLogin\":true,\"tableName\":\"admin\",\"visibleRoles\":[\"admin\"]}],\"frontendMenus\":[{\"code\":\"book_catalog\",\"dataScope\":\"PUBLIC\",\"name\":\"图书目录\",\"pageCode\":\"book_catalog_page\",\"pageType\":\"\",\"path\":\"/books\",\"requiresLogin\":false,\"tableName\":\"\",\"visibleRoles\":[]},{\"code\":\"announcements\",\"dataScope\":\"PUBLIC\",\"name\":\"公告\",\"pageCode\":\"announcement_list_page\",\"pageType\":\"\",\"path\":\"/announcements\",\"requiresLogin\":false,\"tableName\":\"\",\"visibleRoles\":[]},{\"code\":\"news\",\"dataScope\":\"PUBLIC\",\"name\":\"新闻\",\"pageCode\":\"news_list_page\",\"pageType\":\"\",\"path\":\"/news\",\"requiresLogin\":false,\"tableName\":\"\",\"visibleRoles\":[]},{\"code\":\"my_borrows\",\"dataScope\":\"CURRENT_USER\",\"name\":\"我的借阅\",\"pageCode\":\"my_borrows_page\",\"pageType\":\"\",\"path\":\"/my-borrows\",\"requiresLogin\":true,\"tableName\":\"\",\"visibleRoles\":[\"reader\"]},{\"code\":\"my_reservations\",\"dataScope\":\"CURRENT_USER\",\"name\":\"我的预约\",\"pageCode\":\"my_reservations_page\",\"pageType\":\"\",\"path\":\"/my-reservations\",\"requiresLogin\":true,\"tableName\":\"\",\"visibleRoles\":[\"reader\"]},{\"code\":\"reader_profile\",\"dataScope\":\"CURRENT_USER\",\"name\":\"个人中心\",\"pageCode\":\"reader_profile_page\",\"pageType\":\"\",\"path\":\"/reader/profile\",\"requiresLogin\":true,\"tableName\":\"\",\"visibleRoles\":[\"reader\"]}],\"frontendPages\":[{\"code\":\"book_catalog_page\",\"menuCode\":\"book_catalog\",\"name\":\"图书目录\",\"pageType\":\"list\",\"parentPageCode\":\"\",\"path\":\"/books\",\"tableName\":\"book_info\"},{\"code\":\"book_detail_page\",\"menuCode\":\"book_catalog\",\"name\":\"图书详情\",\"pageType\":\"detail\",\"parentPageCode\":\"\",\"path\":\"/books/:id\",\"tableName\":\"book_info\"},{\"code\":\"announcement_list_page\",\"menuCode\":\"announcements\",\"name\":\"公告列表\",\"pageType\":\"list\",\"parentPageCode\":\"\",\"path\":\"/announcements\",\"tableName\":\"announcement\"},{\"code\":\"news_list_page\",\"menuCode\":\"news\",\"name\":\"新闻列表\",\"pageType\":\"list\",\"parentPageCode\":\"\",\"path\":\"/news\",\"tableName\":\"news\"},{\"code\":\"my_borrows_page\",\"menuCode\":\"my_borrows\",\"name\":\"我的借阅\",\"pageType\":\"current_user_list\",\"parentPageCode\":\"\",\"path\":\"/my-borrows\",\"tableName\":\"borrow_record\"},{\"code\":\"my_reservations_page\",\"menuCode\":\"my_reservations\",\"name\":\"我的预约\",\"pageType\":\"current_user_list\",\"parentPageCode\":\"\",\"path\":\"/my-reservations\",\"tableName\":\"reservation\"},{\"code\":\"reader_profile_page\",\"menuCode\":\"reader_profile\",\"name\":\"个人资料\",\"pageType\":\"form\",\"parentPageCode\":\"\",\"path\":\"/reader/profile\",\"tableName\":\"reader\"}],\"roles\":[{\"code\":\"admin\",\"description\":\"系统管理员,管理图书、借阅、公告等\",\"name\":\"管理员\"},{\"code\":\"reader\",\"description\":\"普通用户,借书、还书、预约图书\",\"name\":\"读者\"}]},\"flowConfig\":{\"actions\":[{\"actor\":\"admin\",\"audit\":{\"timeField\":\"approve_time\",\"userField\":\"approve_user_id\"},\"button\":{\"confirm\":\"确认审核通过吗?\",\"order\":10,\"pageCode\":\"borrow_admin_page\",\"scope\":\"admin\",\"slot\":\"list.rowActions\",\"type\":\"primary\"},\"code\":\"approve_borrow\",\"effects\":[{\"amount\":\"1\",\"errorMessage\":\"图书库存不足\",\"field\":\"stock\",\"min\":\"0\",\"notFoundMessage\":\"图书不存在\",\"relationField\":\"book_id\",\"table\":\"book_info\",\"type\":\"decrease\",\"values\":{}}],\"from\":\"pending\",\"invalidStateMessage\":\"当前状态不能审核\",\"method\":\"POST\",\"name\":\"审核通过\",\"path\":\"/borrow-record/approve\",\"successMessage\":\"借书审核通过\",\"to\":\"borrowing\"},{\"actor\":\"admin\",\"audit\":{\"timeField\":\"approve_time\",\"userField\":\"approve_user_id\"},\"button\":{\"confirm\":\"确认拒绝吗?\",\"order\":20,\"pageCode\":\"borrow_admin_page\",\"scope\":\"admin\",\"slot\":\"list.rowActions\",\"type\":\"danger\"},\"code\":\"reject_borrow\",\"effects\":[],\"from\":\"pending\",\"invalidStateMessage\":\"当前状态不能拒绝\",\"method\":\"POST\",\"name\":\"拒绝借书\",\"path\":\"/borrow-record/reject\",\"successMessage\":\"已拒绝借书申请\",\"to\":\"rejected\"},{\"actor\":\"admin\",\"audit\":{\"timeField\":\"return_time\",\"userField\":\"return_user_id\"},\"button\":{\"confirm\":\"确认归还吗?\",\"order\":30,\"pageCode\":\"borrow_admin_page\",\"scope\":\"admin\",\"slot\":\"list.rowActions\",\"type\":\"success\"},\"code\":\"return_book\",\"effects\":[{\"amount\":\"1\",\"errorMessage\":\"归还失败\",\"field\":\"stock\",\"min\":\"0\",\"notFoundMessage\":\"图书不存在\",\"relationField\":\"book_id\",\"table\":\"book_info\",\"type\":\"increase\",\"values\":{}}],\"from\":\"borrowing\",\"invalidStateMessage\":\"当前状态不能归还\",\"method\":\"POST\",\"name\":\"归还图书\",\"path\":\"/borrow-record/return\",\"successMessage\":\"归还成功\",\"to\":\"returned\"}],\"code\":\"borrow_record_flow\",\"mainTable\":\"borrow_record\",\"metrics\":[{\"aggregate\":\"count\",\"code\":\"borrowing_count\",\"field\":\"id\",\"name\":\"借阅中数量\",\"status\":\"borrowing\",\"table\":\"borrow_record\",\"unit\":\"条\"},{\"aggregate\":\"count\",\"code\":\"pending_count\",\"field\":\"id\",\"name\":\"待审核数量\",\"status\":\"pending\",\"table\":\"borrow_record\",\"unit\":\"条\"}],\"name\":\"借阅管理流程\",\"notFoundMessage\":\"借阅记录不存在\",\"states\":[{\"code\":\"pending\",\"label\":\"待审核\"},{\"code\":\"borrowing\",\"label\":\"借阅中\"},{\"code\":\"returned\",\"label\":\"已归还\"},{\"code\":\"rejected\",\"label\":\"已拒绝\"}],\"statusField\":\"status\",\"version\":\"1.0\"},\"compiledFlowContract\":{\"acceptanceScenarios\":[],\"actions\":[{\"actor\":\"admin\",\"code\":\"approve_borrow\",\"name\":\"审核通过\",\"ownerObject\":\"borrow_record\",\"ownerTable\":\"borrow_record\",\"preconditions\":[],\"quantityEffects\":[{\"actionCode\":\"approve_borrow\",\"amount\":\"1\",\"effectType\":\"decrease\",\"objectCode\":\"book_info\",\"quantityField\":\"stock\",\"tableName\":\"book_info\"}],\"recordEffects\":[],\"required\":true,\"stateTransitions\":[{\"actionCode\":\"approve_borrow\",\"fromState\":\"pending\",\"toState\":\"borrowing\"}]},{\"actor\":\"admin\",\"code\":\"reject_borrow\",\"name\":\"拒绝借书\",\"ownerObject\":\"borrow_record\",\"ownerTable\":\"borrow_record\",\"preconditions\":[],\"quantityEffects\":[],\"recordEffects\":[],\"required\":true,\"stateTransitions\":[{\"actionCode\":\"reject_borrow\",\"fromState\":\"pending\",\"toState\":\"rejected\"}]},{\"actor\":\"admin\",\"code\":\"return_book\",\"name\":\"归还图书\",\"ownerObject\":\"borrow_record\",\"ownerTable\":\"borrow_record\",\"preconditions\":[],\"quantityEffects\":[{\"actionCode\":\"return_book\",\"amount\":\"1\",\"effectType\":\"increase\",\"objectCode\":\"book_info\",\"quantityField\":\"stock\",\"tableName\":\"book_info\"}],\"recordEffects\":[],\"required\":true,\"stateTransitions\":[{\"actionCode\":\"return_book\",\"fromState\":\"borrowing\",\"toState\":\"returned\"}]}],\"businessPolicies\":[],\"coreObjects\":[{\"code\":\"borrow_record\",\"name\":\"借阅管理流程\",\"objectType\":\"main\",\"tableName\":\"borrow_record\"},{\"code\":\"book_info\",\"name\":\"book_info\",\"objectType\":\"related\",\"tableName\":\"book_info\"}],\"domainName\":\"借阅管理流程\",\"metrics\":[{\"aggregate\":\"count\",\"code\":\"borrowing_count\",\"field\":\"id\",\"filters\":[{\"field\":\"status\",\"operator\":\"eq\",\"values\":[\"borrowing\"]}],\"name\":\"借阅中数量\",\"relatedActionCodes\":[],\"required\":true,\"tableName\":\"borrow_record\",\"unit\":\"条\"},{\"aggregate\":\"count\",\"code\":\"pending_count\",\"field\":\"id\",\"filters\":[{\"field\":\"status\",\"operator\":\"eq\",\"values\":[\"pending\"]}],\"name\":\"待审核数量\",\"relatedActionCodes\":[],\"required\":true,\"tableName\":\"borrow_record\",\"unit\":\"条\"}],\"pageBindings\":[{\"actionCode\":\"approve_borrow\",\"pageCode\":\"borrow_admin_page\",\"slot\":\"list.rowActions\",\"tableName\":\"borrow_record\",\"target\":\"admin\"},{\"actionCode\":\"reject_borrow\",\"pageCode\":\"borrow_admin_page\",\"slot\":\"list.rowActions\",\"tableName\":\"borrow_record\",\"target\":\"admin\"},{\"actionCode\":\"return_book\",\"pageCode\":\"borrow_admin_page\",\"slot\":\"list.rowActions\",\"tableName\":\"borrow_record\",\"target\":\"admin\"}],\"quantityRules\":[{\"actionCode\":\"approve_borrow\",\"amount\":\"1\",\"effectType\":\"decrease\",\"objectCode\":\"book_info\",\"quantityField\":\"stock\",\"tableName\":\"book_info\"},{\"actionCode\":\"return_book\",\"amount\":\"1\",\"effectType\":\"increase\",\"objectCode\":\"book_info\",\"quantityField\":\"stock\",\"tableName\":\"book_info\"}],\"recordRules\":[],\"stateMachines\":[{\"objectCode\":\"borrow_record\",\"states\":[\"pending\",\"borrowing\",\"returned\",\"rejected\"],\"statusField\":\"status\",\"tableName\":\"borrow_record\",\"transitions\":[{\"actionCode\":\"approve_borrow\",\"fromState\":\"pending\",\"toState\":\"borrowing\"},{\"actionCode\":\"reject_borrow\",\"fromState\":\"pending\",\"toState\":\"rejected\"},{\"actionCode\":\"return_book\",\"fromState\":\"borrowing\",\"toState\":\"returned\"}]}]},\"canonicalTableRegistry\":[\"book_info\",\"announcement\",\"news\",\"borrow_record\",\"reservation\",\"reader\",\"carousel\",\"admin\"],\"limits\":{\"maxTables\":12,\"maxColumnsPerTable\":30}}', '{\n \"tables\": [\n {\n \"tableName\": \"book_info\",\n \"tableComment\": \"图书信息表\",\n \"adminMenuName\": \"图书管理\",\n \"operations\": {\n \"add\": true,\n \"edit\": true,\n \"remove\": true,\n \"removeType\": \"physical\",\n \"reason\": \"\"\n },\n \"columns\": [\n {\n \"columnName\": \"id\",\n \"columnLabel\": \"ID\",\n \"columnComment\": \"主键ID\",\n \"columnType\": \"bigint(20)\",\n \"isPk\": \"1\",\n \"isIncrement\": \"1\",\n \"isRequired\": \"1\"\n },\n {\n \"columnName\": \"title\",\n \"columnLabel\": \"书名\",\n \"columnComment\": \"图书名称\",\n \"columnType\": \"varchar(200)\",\n \"isPk\": \"0\",\n \"isIncrement\": \"0\",\n \"isRequired\": \"1\"\n },\n {\n \"columnName\": \"author\",\n \"columnLabel\": \"作者\",\n \"columnComment\": \"图书作者\",\n \"columnType\": \"varchar(100)\",\n \"isPk\": \"0\",\n \"isIncrement\": \"0\",\n \"isRequired\": \"1\"\n },\n {\n \"columnName\": \"isbn\",\n \"columnLabel\": \"ISBN\",\n \"columnComment\": \"国际标准书号\",\n \"columnType\": \"varchar(20)\",\n \"isPk\": \"0\",\n \"isIncrement\": \"0\",\n \"isRequired\": \"1\"\n },\n {\n \"columnName\": \"publisher\",\n \"columnLabel\": \"出版社\",\n \"columnComment\": \"图书出版社\",\n \"columnType\": \"varchar(100)\",\n \"isPk\": \"0\",\n \"isIncrement\": \"0\",\n \"isRequired\": \"0\"\n },\n {\n \"columnName\": \"publish_date\",\n \"columnLabel\": \"出版日期\",\n \"columnComment\": \"图书出版日期\",\n \"columnType\": \"date\",\n \"isPk\": \"0\",\n \"isIncrement\": \"0\",\n \"isRequired\": \"0\"\n },\n {\n \"columnName\": \"category\",\n \"columnLabel\": \"分类\",\n \"columnComment\": \"图书分类\",\n \"columnType\": \"varchar(50)\",\n \"isPk\": \"0\",\n \"isIncrement\": \"0\",\n \"isRequired\": \"0\",\n \"javaType\": \"String\",\n \"htmlType\": \"select\",\n \"dictType\": \"book_category\",\n \"dictOptions\": [\n {\n \"value\": \"文学\",\n \"label\": \"文学\"\n },\n {\n \"value\": \"科技\",\n \"label\": \"科技\"\n },\n {\n \"value\": \"历史\",\n \"label\": \"历史\"\n },\n {\n \"value\": \"教育\",\n \"label\": \"教育\"\n },\n {\n \"value\": \"其他\",\n \"label\": \"其他\"\n }\n ]\n },\n {\n \"columnName\": \"stock\",\n \"columnLabel\": \"库存\",\n \"columnComment\": \"当前库存数量\",\n \"columnType\": \"int(11)\",\n \"isPk\": \"0\",\n \"isIncrement\": \"0\",\n \"isRequired\": \"1\"\n },\n {\n \"columnName\": \"description\",\n \"columnLabel\": \"描述\",\n \"columnComment\": \"图书简介\",\n \"columnType\": \"text\",\n \"isPk\": \"0\",\n \"isIncrement\": \"0\",\n \"isRequired\": \"0\"\n },\n {\n \"columnName\": \"cover_image\",\n \"columnLabel\": \"封面图片\",\n \"columnComment\": \"图书封面图片URL\",\n \"columnType\": \"varchar(500)\",\n \"isPk\": \"0\",\n \"isIncrement\": \"0\",\n \"isRequired\": \"0\",\n \"javaType\": \"String\",\n \"htmlType\": \"imageUpload\"\n }\n ]\n },\n {\n \"tableName\": \"borrow_record\",\n \"tableComment\": \"借阅记录表\",\n \"adminMenuName\": \"借阅管理\",\n \"operations\": {\n \"add\": true,\n \"edit\": false,\n \"remove\": false,\n \"removeType\": \"physical\",\n \"reason\": \"借阅记录通过业务操作生成,不允许直接编辑或删除\"\n },\n \"columns\": [\n {\n \"columnName\": \"id\",\n \"columnLabel\": \"ID\",\n \"columnComment\": \"主键ID\",\n \"columnType\": \"bigint(20)\",\n \"isPk\": \"1\",\n \"isIncrement\": \"1\",\n \"isRequired\": \"1\"\n },\n {\n \"columnName\": \"book_id\",\n \"columnLabel\": \"图书\",\n \"columnComment\": \"借阅图书ID\",\n \"columnType\": \"bigint(20)\",\n \"isPk\": \"0\",\n \"isIncrement\": \"0\",\n \"isRequired\": \"1\",\n \"javaType\": \"Long\",\n \"htmlType\": \"select\",\n \"dictType\": \"remote:book_info:id:title\"\n },\n {\n \"columnName\": \"reader_id\",\n \"columnLabel\": \"读者\",\n \"columnComment\": \"借阅读者ID\",\n \"columnType\": \"bigint(20)\",\n \"isPk\": \"0\",\n \"isIncrement\": \"0\",\n \"isRequired\": \"1\",\n \"javaType\": \"Long\",\n \"htmlType\": \"select\",\n \"dictType\": \"remote:reader:reader_id:nickname\"\n },\n {\n \"columnName\": \"borrow_date\",\n \"columnLabel\": \"借书日期\",\n \"columnComment\": \"借阅开始日期\",\n \"columnType\": \"datetime\",\n \"isPk\": \"0\",\n \"isIncrement\": \"0\",\n \"isRequired\": \"1\"\n },\n {\n \"columnName\": \"due_date\",\n \"columnLabel\": \"应还日期\",\n \"columnComment\": \"应归还日期\",\n \"columnType\": \"datetime\",\n \"isPk\": \"0\",\n \"isIncrement\": \"0\",\n \"isRequired\": \"1\"\n },\n {\n \"columnName\": \"return_date\",\n \"columnLabel\": \"实际归还日期\",\n \"columnComment\": \"实际归还日期未归还为NULL\",\n \"columnType\": \"datetime\",\n \"isPk\": \"0\",\n \"isIncrement\": \"0\",\n \"isRequired\": \"0\"\n },\n {\n \"columnName\": \"status\",\n \"columnLabel\": \"状态\",\n \"columnComment\": \"借阅状态pending待审核/borrowing借阅中/returned已归还/rejected已拒绝\",\n \"columnType\": \"varchar(20)\",\n \"isPk\": \"0\",\n \"isIncrement\": \"0\",\n \"isRequired\": \"1\",\n \"javaType\": \"String\",\n \"htmlType\": \"select\",\n \"dictType\": \"borrow_status\",\n \"dictOptions\": [\n {\n \"value\": \"pending\",\n \"label\": \"待审核\"\n },\n {\n \"value\": \"borrowing\",\n \"label\": \"借阅中\"\n },\n {\n \"value\": \"returned\",\n \"label\": \"已归还\"\n },\n {\n \"value\": \"rejected\",\n \"label\": \"已拒绝\"\n }\n ]\n },\n {\n \"columnName\": \"approve_user_id\",\n \"columnLabel\": \"审核人\",\n \"columnComment\": \"借书审核管理员ID\",\n \"columnType\": \"bigint(20)\",\n \"isPk\": \"0\",\n \"isIncrement\": \"0\",\n \"isRequired\": \"0\",\n \"javaType\": \"Long\",\n \"htmlType\": \"select\",\n \"dictType\": \"remote:admin:admin_id:username\"\n },\n {\n \"columnName\": \"approve_time\",\n \"columnLabel\": \"审核时间\",\n \"columnComment\": \"审核通过/拒绝时间\",\n \"columnType\": \"datetime\",\n \"isPk\": \"0\",\n \"isIncrement\": \"0\",\n \"isRequired\": \"0\"\n },\n {\n \"columnName\": \"return_user_id\",\n \"columnLabel\": \"归还操作人\",\n \"columnComment\": \"归还操作管理员ID\",\n \"columnType\": \"bigint(20)\",\n \"isPk\": \"0\",\n \"isIncrement\": \"0\",\n \"isRequired\": \"0\",\n \"javaType\": \"Long\",\n \"htmlType\": \"select\",\n \"dictType\": \"remote:admin:admin_id:username\"\n },\n {\n \"columnName\": \"return_time\",\n \"columnLabel\": \"归还时间\",\n \"columnComment\": \"归还操作时间\",\n \"columnType\": \"datetime\",\n \"isPk\": \"0\",\n \"isIncrement\": \"0\",\n \"isRequired\": \"0\"\n },\n {\n \"columnName\": \"create_time\",\n \"columnLabel\": \"创建时间\",\n \"columnComment\": \"记录创建时间\",\n \"columnType\": \"datetime\",\n \"isPk\": \"0\",\n \"isIncrement\": \"0\",\n \"isRequired\": \"1\"\n }\n ]\n },\n {\n \"tableName\": \"reservation\",\n \"tableComment\": \"预约记录表\",\n \"adminMenuName\": \"预约管理\",\n \"operations\": {\n \"add\": true,\n \"edit\": false,\n \"remove\": false,\n \"removeType\": \"physical\",\n \"reason\": \"预约记录通过业务操作生成,不允许直接编辑或删除\"\n },\n \"columns\": [\n {\n \"columnName\": \"id\",\n \"columnLabel\": \"ID\",\n \"columnComment\": \"主键ID\",\n \"columnType\": \"bigint(20)\",\n \"isPk\": \"1\",\n \"isIncrement\": \"1\",\n \"isRequired\": \"1\"\n },\n {\n \"columnName\": \"book_id\",\n \"columnLabel\": \"图书\",\n \"columnComment\": \"预约图书ID\",\n \"columnType\": \"bigint(20)\",\n \"isPk\": \"0\",\n \"isIncrement\": \"0\",\n \"isRequired\": \"1\",\n \"javaType\": \"Long\",\n \"htmlType\": \"select\",\n \"dictType\": \"remote:book_info:id:title\"\n },\n {\n \"columnName\": \"reader_id\",\n \"columnLabel\": \"读者\",\n \"columnComment\": \"预约读者ID\",\n \"columnType\": \"bigint(20)\",\n \"isPk\": \"0\",\n \"isIncrement\": \"0\",\n \"isRequired\": \"1\",\n \"javaType\": \"Long\",\n \"htmlType\": \"select\",\n \"dictType\": \"remote:reader:reader_id:nickname\"\n },\n {\n \"columnName\": \"reserve_date\",\n \"columnLabel\": \"预约日期\",\n \"columnComment\": \"预约时间\",\n \"columnType\": \"datetime\",\n \"isPk\": \"0\",\n \"isIncrement\": \"0\",\n \"isRequired\": \"1\"\n },\n {\n \"columnName\": \"expire_date\",\n \"columnLabel\": \"过期日期\",\n \"columnComment\": \"预约过期日期\",\n \"columnType\": \"datetime\",\n \"isPk\": \"0\",\n \"isIncrement\": \"0\",\n \"isRequired\": \"0\"\n },\n {\n \"columnName\": \"status\",\n \"columnLabel\": \"状态\",\n \"columnComment\": \"预约状态pending待确认/confirmed已确认/cancelled已取消/completed已完成\",\n \"columnType\": \"varchar(20)\",\n \"isPk\": \"0\",\n \"isIncrement\": \"0\",\n \"isRequired\": \"1\",\n \"javaType\": \"String\",\n \"htmlType\": \"select\",\n \"dictType\": \"reservation_status\",\n \"dictOptions\": [\n {\n \"value\": \"pending\",\n \"label\": \"待确认\"\n },\n {\n \"value\": \"confirmed\",\n \"label\": \"已确认\"\n },\n {\n \"value\": \"cancelled\",\n \"label\": \"已取消\"\n },\n {\n \"value\": \"completed\",\n \"label\": \"已完成\"\n }\n ]\n },\n {\n \"columnName\": \"create_time\",\n \"columnLabel\": \"创建时间\",\n \"columnComment\": \"记录创建时间\",\n \"columnType\": \"datetime\",\n \"isPk\": \"0\",\n \"isIncrement\": \"0\",\n \"isRequired\": \"1\"\n }\n ]\n },\n {\n \"tableName\": \"announcement\",\n \"tableComment\": \"公告表\",\n \"adminMenuName\": \"公告管理\",\n \"operations\": {\n \"add\": true,\n \"edit\": true,\n \"remove\": true,\n \"removeType\": \"physical\",\n \"reason\": \"\"\n },\n \"columns\": [\n {\n \"columnName\": \"id\",\n \"columnLabel\": \"ID\",\n \"columnComment\": \"主键ID\",\n \"columnType\": \"bigint(20)\",\n \"isPk\": \"1\",\n \"isIncrement\": \"1\",\n \"isRequired\": \"1\"\n },\n {\n \"columnName\": \"title\",\n \"columnLabel\": \"标题\",\n \"columnComment\": \"公告标题\",\n \"columnType\": \"varchar(200)\",\n \"isPk\": \"0\",\n \"isIncrement\": \"0\",\n \"isRequired\": \"1\"\n },\n {\n \"columnName\": \"content\",\n \"columnLabel\": \"内容\",\n \"columnComment\": \"公告正文\",\n \"columnType\": \"text\",\n \"isPk\": \"0\",\n \"isIncrement\": \"0\",\n \"isRequired\": \"1\"\n },\n {\n \"columnName\": \"publish_date\",\n \"columnLabel\": \"发布日期\",\n \"columnComment\": \"公告发布时间\",\n \"columnType\": \"datetime\",\n \"isPk\": \"0\",\n \"isIncrement\": \"0\",\n \"isRequired\": \"1\"\n },\n {\n \"columnName\": \"author\",\n \"columnLabel\": \"作者\",\n \"columnComment\": \"公告发布人\",\n \"columnType\": \"varchar(100)\",\n \"isPk\": \"0\",\n \"isIncrement\": \"0\",\n \"isRequired\": \"0\"\n },\n {\n \"columnName\": \"is_top\",\n \"columnLabel\": \"是否置顶\",\n \"columnComment\": \"是否置顶1是0否\",\n \"columnType\": \"char(1)\",\n \"isPk\": \"0\",\n \"isIncrement\": \"0\",\n \"isRequired\": \"0\"\n },\n {\n \"columnName\": \"status\",\n \"columnLabel\": \"状态\",\n \"columnComment\": \"发布状态published/draft\",\n \"columnType\": \"varchar(10)\",\n \"isPk\": \"0\",\n \"isIncrement\": \"0\",\n \"isRequired\": \"1\",\n \"javaType\": \"String\",\n \"htmlType\": \"select\",\n \"dictType\": \"publish_status\",\n \"dictOptions\": [\n {\n \"value\": \"published\",\n \"label\": \"已发布\"\n },\n {\n \"value\": \"draft\",\n \"label\": \"草稿\"\n }\n ]\n }\n ]\n },\n {\n \"tableName\": \"news\",\n \"tableComment\": \"新闻表\",\n \"adminMenuName\": \"新闻管理\",\n \"operations\": {\n \"add\": true,\n \"edit\": true,\n \"remove\": true,\n \"removeType\": \"physical\",\n \"reason\": \"\"\n },\n \"columns\": [\n {\n \"columnName\": \"id\",\n \"columnLabel\": \"ID\",\n \"columnComment\": \"主键ID\",\n \"columnType\": \"bigint(20)\",\n \"isPk\": \"1\",\n \"isIncrement\": \"1\",\n \"isRequired\": \"1\"\n },\n {\n \"columnName\": \"title\",\n \"columnLabel\": \"标题\",\n \"columnComment\": \"新闻标题\",\n \"columnType\": \"varchar(200)\",\n \"isPk\": \"0\",\n \"isIncrement\": \"0\",\n \"isRequired\": \"1\"\n },\n {\n \"columnName\": \"content\",\n \"columnLabel\": \"内容\",\n \"columnComment\": \"新闻正文\",\n \"columnType\": \"text\",\n \"isPk\": \"0\",\n \"isIncrement\": \"0\",\n \"isRequired\": \"1\"\n },\n {\n \"columnName\": \"publish_date\",\n \"columnLabel\": \"发布日期\",\n \"columnComment\": \"新闻发布时间\",\n \"columnType\": \"datetime\",\n \"isPk\": \"0\",\n \"isIncrement\": \"0\",\n \"isRequired\": \"1\"\n },\n {\n \"columnName\": \"author\",\n \"columnLabel\": \"作者\",\n \"columnComment\": \"新闻发布人\",\n \"columnType\": \"varchar(100)\",\n \"isPk\": \"0\",\n \"isIncrement\": \"0\",\n \"isRequired\": \"0\"\n },\n {\n \"columnName\": \"cover_image\",\n \"columnLabel\": \"封面图片\",\n \"columnComment\": \"新闻封面图片URL\",\n \"columnType\": \"varchar(500)\",\n \"isPk\": \"0\",\n \"isIncrement\": \"0\",\n \"isRequired\": \"0\",\n \"javaType\": \"String\",\n \"htmlType\": \"imageUpload\"\n },\n {\n \"columnName\": \"is_top\",\n \"columnLabel\": \"是否置顶\",\n \"columnComment\": \"是否置顶1是0否\",\n \"columnType\": \"char(1)\",\n \"isPk\": \"0\",\n \"isIncrement\": \"0\",\n \"isRequired\": \"0\"\n },\n {\n \"columnName\": \"status\",\n \"columnLabel\": \"状态\",\n \"columnComment\": \"发布状态published/draft\",\n \"columnType\": \"varchar(10)\",\n \"isPk\": \"0\",\n \"isIncrement\": \"0\",\n \"isRequired\": \"1\",\n \"javaType\": \"String\",\n \"htmlType\": \"select\",\n \"dictType\": \"publish_status\",\n \"dictOptions\": [\n {\n \"value\": \"published\",\n \"label\": \"已发布\"\n },\n {\n \"value\": \"draft\",\n \"label\": \"草稿\"\n }\n ]\n }\n ]\n },\n {\n \"tableName\": \"carousel\",\n \"tableComment\": \"轮播图表\",\n \"adminMenuName\": \"轮播图管理\",\n \"operations\": {\n \"add\": true,\n \"edit\": true,\n \"remove\": true,\n \"removeType\": \"physical\",\n \"reason\": \"\"\n },\n \"columns\": [\n {\n \"columnName\": \"id\",\n \"columnLabel\": \"ID\",\n \"columnComment\": \"主键ID\",\n \"columnType\": \"bigint(20)\",\n \"isPk\": \"1\",\n \"isIncrement\": \"1\",\n \"isRequired\": \"1\"\n },\n {\n \"columnName\": \"image_url\",\n \"columnLabel\": \"图片URL\",\n \"columnComment\": \"轮播图片地址\",\n \"columnType\": \"varchar(500)\",\n \"isPk\": \"0\",\n \"isIncrement\": \"0\",\n \"isRequired\": \"1\",\n \"javaType\": \"String\",\n \"htmlType\": \"imageUpload\"\n },\n {\n \"columnName\": \"link_url\",\n \"columnLabel\": \"链接URL\",\n \"columnComment\": \"点击跳转地址\",\n \"columnType\": \"varchar(500)\",\n \"isPk\": \"0\",\n \"isIncrement\": \"0\",\n \"isRequired\": \"0\"\n },\n {\n \"columnName\": \"title\",\n \"columnLabel\": \"标题\",\n \"columnComment\": \"轮播标题\",\n \"columnType\": \"varchar(200)\",\n \"isPk\": \"0\",\n \"isIncrement\": \"0\",\n \"isRequired\": \"0\"\n },\n {\n \"columnName\": \"sort_order\",\n \"columnLabel\": \"排序\",\n \"columnComment\": \"显示顺序,数字越小越靠前\",\n \"columnType\": \"int(11)\",\n \"isPk\": \"0\",\n \"isIncrement\": \"0\",\n \"isRequired\": \"0\"\n },\n {\n \"columnName\": \"status\",\n \"columnLabel\": \"状态\",\n \"columnComment\": \"启用状态enabled/disabled\",\n \"columnType\": \"varchar(10)\",\n \"isPk\": \"0\",\n \"isIncrement\": \"0\",\n \"isRequired\": \"1\",\n \"javaType\": \"String\",\n \"htmlType\": \"select\",\n \"dictType\": \"enable_status\",\n \"dictOptions\": [\n {\n \"value\": \"enabled\",\n \"label\": \"启用\"\n },\n {\n \"value\": \"disabled\",\n \"label\": \"禁用\"\n }\n ]\n }\n ]\n },\n {\n \"tableName\": \"admin\",\n \"tableComment\": \"管理员账号表\",\n \"adminMenuName\": \"管理员账号\",\n \"operations\": {\n \"add\": false,\n \"edit\": true,\n \"remove\": false,\n \"removeType\": \"physical\",\n \"reason\": \"管理员账号由系统初始化,不允许前台新增或删除\"\n },\n \"columns\": [\n {\n \"columnName\": \"admin_id\",\n \"columnLabel\": \"管理员ID\",\n \"columnComment\": \"主键ID\",\n \"columnType\": \"bigint(20)\",\n \"isPk\": \"1\",\n \"isIncrement\": \"1\",\n \"isRequired\": \"1\"\n },\n {\n \"columnName\": \"username\",\n \"columnLabel\": \"用户名\",\n \"columnComment\": \"登录用户名\",\n \"columnType\": \"varchar(50)\",\n \"isPk\": \"0\",\n \"isIncrement\": \"0\",\n \"isRequired\": \"1\"\n },\n {\n \"columnName\": \"password_hash\",\n \"columnLabel\": \"密码哈希\",\n \"columnComment\": \"加密后的密码\",\n \"columnType\": \"varchar(255)\",\n \"isPk\": \"0\",\n \"isIncrement\": \"0\",\n \"isRequired\": \"1\"\n },\n {\n \"columnName\": \"nickname\",\n \"columnLabel\": \"昵称\",\n \"columnComment\": \"显示名称\",\n \"columnType\": \"varchar(100)\",\n \"isPk\": \"0\",\n \"isIncrement\": \"0\",\n \"isRequired\": \"0\"\n },\n {\n \"columnName\": \"status\",\n \"columnLabel\": \"状态\",\n \"columnComment\": \"账号状态enabled/disabled\",\n \"columnType\": \"varchar(10)\",\n \"isPk\": \"0\",\n \"isIncrement\": \"0\",\n \"isRequired\": \"1\",\n \"javaType\": \"String\",\n \"htmlType\": \"select\",\n \"dictType\": \"account_status\",\n \"dictOptions\": [\n {\n \"value\": \"enabled\",\n \"label\": \"启用\"\n },\n {\n \"value\": \"disabled\",\n \"label\": \"禁用\"\n }\n ]\n },\n {\n \"columnName\": \"create_time\",\n \"columnLabel\": \"创建时间\",\n \"columnComment\": \"账号创建时间\",\n \"columnType\": \"datetime\",\n \"isPk\": \"0\",\n \"isIncrement\": \"0\",\n \"isRequired\": \"1\"\n }\n ]\n },\n {\n \"tableName\": \"reader\",\n \"tableComment\": \"读者账号表\",\n \"adminMenuName\": \"读者账号\",\n \"operations\": {\n \"add\": false,\n \"edit\": true,\n \"remove\": false,\n \"removeType\": \"physical\",\n \"reason\": \"读者账号由注册或导入生成,不允许后台直接新增或删除\"\n },\n \"columns\": [\n {\n \"columnName\": \"reader_id\",\n \"columnLabel\": \"读者ID\",\n \"columnComment\": \"主键ID\",\n \"columnType\": \"bigint(20)\",\n \"isPk\": \"1\",\n \"isIncrement\": \"1\",\n \"isRequired\": \"1\"\n },\n {\n \"columnName\": \"username\",\n \"columnLabel\": \"用户名\",\n \"columnComment\": \"登录用户名\",\n \"columnType\": \"varchar(50)\",\n \"isPk\": \"0\",\n \"isIncrement\": \"0\",\n \"isRequired\": \"1\"\n },\n {\n \"columnName\": \"password_hash\",\n \"columnLabel\": \"密码哈希\",\n \"columnComment\": \"加密后的密码\",\n \"columnType\": \"varchar(255)\",\n \"isPk\": \"0\",\n \"isIncrement\": \"0\",\n \"isRequired\": \"1\"\n },\n {\n \"columnName\": \"nickname\",\n \"columnLabel\": \"昵称\",\n \"columnComment\": \"显示名称\",\n \"columnType\": \"varchar(100)\",\n \"isPk\": \"0\",\n \"isIncrement\": \"0\",\n \"isRequired\": \"0\"\n },\n {\n \"columnName\": \"status\",\n \"columnLabel\": \"状态\",\n \"columnComment\": \"账号状态enabled/disabled\",\n \"columnType\": \"varchar(10)\",\n \"isPk\": \"0\",\n \"isIncrement\": \"0\",\n \"isRequired\": \"1\",\n \"javaType\": \"String\",\n \"htmlType\": \"select\",\n \"dictType\": \"account_status\",\n \"dictOptions\": [\n {\n \"value\": \"enabled\",\n \"label\": \"启用\"\n },\n {\n \"value\": \"disabled\",\n \"label\": \"禁用\"\n }\n ]\n },\n {\n \"columnName\": \"create_time\",\n \"columnLabel\": \"创建时间\",\n \"columnComment\": \"账号创建时间\",\n \"columnType\": \"datetime\",\n \"isPk\": \"0\",\n \"isIncrement\": \"0\",\n \"isRequired\": \"1\"\n }\n ]\n }\n ]\n}', '1', NULL, 64450, '2026-07-14 22:25:55');
INSERT INTO `factory_ai_stage_output` VALUES (133, 113, 109, 100, 'app_blueprint', '{\"projectName\":\"图书管理系统\",\"projectDescription\":\"功能:借书、还书、预约、取消预约\\n角色用户、管理员\\n其他模块轮播图、公告、新闻\",\"industryTemplate\":\"\",\"stylePreset\":\"dark-tech\",\"extraRequirements\":\"\"}', '{\"roles\":[{\"code\":\"admin\",\"name\":\"管理员\",\"description\":\"系统管理员,管理所有业务数据\"},{\"code\":\"user\",\"name\":\"用户\",\"description\":\"普通读者,可借书、还书、预约\"}],\"frontendMenus\":[{\"code\":\"book_catalog\",\"name\":\"图书目录\",\"path\":\"/books\",\"pageCode\":\"book_catalog_page\",\"requiresLogin\":false,\"visibleRoles\":[],\"dataScope\":\"PUBLIC\"},{\"code\":\"borrow_history\",\"name\":\"借阅记录\",\"path\":\"/borrow-history\",\"pageCode\":\"borrow_history_page\",\"requiresLogin\":true,\"visibleRoles\":[\"user\"],\"dataScope\":\"CURRENT_USER\"},{\"code\":\"reservation_history\",\"name\":\"预约记录\",\"path\":\"/reservation-history\",\"pageCode\":\"reservation_history_page\",\"requiresLogin\":true,\"visibleRoles\":[\"user\"],\"dataScope\":\"CURRENT_USER\"},{\"code\":\"user_profile\",\"name\":\"个人资料\",\"path\":\"/profile\",\"pageCode\":\"user_profile_page\",\"requiresLogin\":true,\"visibleRoles\":[\"user\"],\"dataScope\":\"CURRENT_USER\"}],\"frontendPages\":[{\"code\":\"book_catalog_page\",\"name\":\"图书目录\",\"menuCode\":\"book_catalog\",\"path\":\"/books\",\"pageType\":\"list\",\"tableName\":\"book_info\"},{\"code\":\"borrow_history_page\",\"name\":\"借阅记录\",\"menuCode\":\"borrow_history\",\"path\":\"/borrow-history\",\"pageType\":\"current_user_list\",\"tableName\":\"borrow_record\"},{\"code\":\"reservation_history_page\",\"name\":\"预约记录\",\"menuCode\":\"reservation_history\",\"path\":\"/reservation-history\",\"pageType\":\"current_user_list\",\"tableName\":\"reservation\"},{\"code\":\"user_profile_page\",\"name\":\"个人资料\",\"menuCode\":\"user_profile\",\"path\":\"/profile\",\"pageType\":\"form\",\"tableName\":\"user\"}],\"adminMenus\":[{\"code\":\"book_admin\",\"name\":\"图书管理\",\"path\":\"/admin/books\",\"pageCode\":\"book_admin_page\",\"tableName\":\"book_info\",\"pageType\":\"list\",\"requiresLogin\":true,\"visibleRoles\":[\"admin\"],\"dataScope\":\"ROLE\"},{\"code\":\"borrow_admin\",\"name\":\"借阅管理\",\"path\":\"/admin/borrows\",\"pageCode\":\"borrow_admin_page\",\"tableName\":\"borrow_record\",\"pageType\":\"list\",\"requiresLogin\":true,\"visibleRoles\":[\"admin\"],\"dataScope\":\"ROLE\"},{\"code\":\"reservation_admin\",\"name\":\"预约管理\",\"path\":\"/admin/reservations\",\"pageCode\":\"reservation_admin_page\",\"tableName\":\"reservation\",\"pageType\":\"list\",\"requiresLogin\":true,\"visibleRoles\":[\"admin\"],\"dataScope\":\"ROLE\"},{\"code\":\"carousel_admin\",\"name\":\"轮播图管理\",\"path\":\"/admin/carousels\",\"pageCode\":\"carousel_admin_page\",\"tableName\":\"carousel\",\"pageType\":\"list\",\"requiresLogin\":true,\"visibleRoles\":[\"admin\"],\"dataScope\":\"ROLE\"},{\"code\":\"announcement_admin\",\"name\":\"公告管理\",\"path\":\"/admin/announcements\",\"pageCode\":\"announcement_admin_page\",\"tableName\":\"announcement\",\"pageType\":\"list\",\"requiresLogin\":true,\"visibleRoles\":[\"admin\"],\"dataScope\":\"ROLE\"},{\"code\":\"news_admin\",\"name\":\"新闻管理\",\"path\":\"/admin/news\",\"pageCode\":\"news_admin_page\",\"tableName\":\"news\",\"pageType\":\"list\",\"requiresLogin\":true,\"visibleRoles\":[\"admin\"],\"dataScope\":\"ROLE\"},{\"code\":\"user_admin\",\"name\":\"用户管理\",\"path\":\"/admin/users\",\"pageCode\":\"user_admin_page\",\"tableName\":\"user\",\"pageType\":\"list\",\"requiresLogin\":true,\"visibleRoles\":[\"admin\"],\"dataScope\":\"ROLE\"},{\"code\":\"admin_profile\",\"name\":\"管理员资料\",\"path\":\"/admin/profile\",\"pageCode\":\"admin_profile_page\",\"tableName\":\"admin\",\"pageType\":\"form\",\"requiresLogin\":true,\"visibleRoles\":[\"admin\"],\"dataScope\":\"CURRENT_USER\"}],\"adminHomeDashboard\":{\"title\":\"运营总览\",\"description\":\"核心业务数据\",\"metrics\":[{\"label\":\"总图书\",\"value\":0,\"semantic\":\"content\"},{\"label\":\"总借阅\",\"value\":0,\"semantic\":\"order\"},{\"label\":\"总预约\",\"value\":0,\"semantic\":\"task\"},{\"label\":\"总用户\",\"value\":0,\"semantic\":\"user\"}],\"charts\":[{\"type\":\"line\",\"title\":\"借阅趋势\",\"description\":\"月度借阅数量\"},{\"type\":\"pie\",\"title\":\"图书分类分布\",\"description\":\"各分类图书占比\"}]}}', '1', NULL, 41041, '2026-07-15 08:51:23');
INSERT INTO `factory_ai_stage_output` VALUES (134, 113, 109, 100, 'flow_config', '{\"mode\":\"generate\",\"projectName\":\"图书管理系统\",\"projectDescription\":\"功能:借书、还书、预约、取消预约\\n角色用户、管理员\\n其他模块轮播图、公告、新闻\",\"industryTemplate\":\"\",\"stylePreset\":\"dark-tech\",\"extraRequirements\":\"\",\"confirmedAppBlueprint\":{\"adminHomeDashboard\":{\"charts\":[{\"filters\":[],\"metrics\":[{\"aggregate\":\"count\",\"label\":\"借阅趋势\"}],\"title\":\"借阅趋势\",\"type\":\"line\"},{\"filters\":[],\"metrics\":[{\"aggregate\":\"count\",\"label\":\"图书分类分布\"}],\"title\":\"图书分类分布\",\"type\":\"pie\"}],\"description\":\"核心业务数据\",\"metrics\":[{\"aggregate\":\"count\",\"filters\":[],\"semantic\":\"content\"},{\"aggregate\":\"count\",\"filters\":[],\"semantic\":\"order\"},{\"aggregate\":\"count\",\"filters\":[],\"semantic\":\"task\"},{\"aggregate\":\"count\",\"filters\":[],\"semantic\":\"user\"}],\"title\":\"运营总览\"},\"adminMenus\":[{\"code\":\"book_admin\",\"dataScope\":\"ROLE\",\"name\":\"图书管理\",\"pageCode\":\"book_admin_page\",\"pageType\":\"list\",\"path\":\"/admin/books\",\"requiresLogin\":true,\"tableName\":\"book_info\",\"visibleRoles\":[\"admin\"]},{\"code\":\"borrow_admin\",\"dataScope\":\"ROLE\",\"name\":\"借阅管理\",\"pageCode\":\"borrow_admin_page\",\"pageType\":\"list\",\"path\":\"/admin/borrows\",\"requiresLogin\":true,\"tableName\":\"borrow_record\",\"visibleRoles\":[\"admin\"]},{\"code\":\"reservation_admin\",\"dataScope\":\"ROLE\",\"name\":\"预约管理\",\"pageCode\":\"reservation_admin_page\",\"pageType\":\"list\",\"path\":\"/admin/reservations\",\"requiresLogin\":true,\"tableName\":\"reservation\",\"visibleRoles\":[\"admin\"]},{\"code\":\"carousel_admin\",\"dataScope\":\"ROLE\",\"name\":\"轮播图管理\",\"pageCode\":\"carousel_admin_page\",\"pageType\":\"list\",\"path\":\"/admin/carousels\",\"requiresLogin\":true,\"tableName\":\"carousel\",\"visibleRoles\":[\"admin\"]},{\"code\":\"announcement_admin\",\"dataScope\":\"ROLE\",\"name\":\"公告管理\",\"pageCode\":\"announcement_admin_page\",\"pageType\":\"list\",\"path\":\"/admin/announcements\",\"requiresLogin\":true,\"tableName\":\"announcement\",\"visibleRoles\":[\"admin\"]},{\"code\":\"news_admin\",\"dataScope\":\"ROLE\",\"name\":\"新闻管理\",\"pageCode\":\"news_admin_page\",\"pageType\":\"list\",\"path\":\"/admin/news\",\"requiresLogin\":true,\"tableName\":\"news\",\"visibleRoles\":[\"admin\"]},{\"code\":\"user_admin\",\"dataScope\":\"ROLE\",\"name\":\"用户管理\",\"pageCode\":\"user_admin_page\",\"pageType\":\"list\",\"path\":\"/admin/users\",\"requiresLogin\":true,\"tableName\":\"user\",\"visibleRoles\":[\"admin\"]},{\"code\":\"admin_profile\",\"dataScope\":\"CURRENT_USER\",\"name\":\"管理员资料\",\"pageCode\":\"admin_profile_page\",\"pageType\":\"form\",\"path\":\"/admin/profile\",\"requiresLogin\":true,\"tableName\":\"admin\",\"visibleRoles\":[\"admin\"]}],\"frontendMenus\":[{\"code\":\"book_catalog\",\"dataScope\":\"PUBLIC\",\"name\":\"图书目录\",\"pageCode\":\"book_catalog_page\",\"pageType\":\"\",\"path\":\"/books\",\"requiresLogin\":false,\"tableName\":\"\",\"visibleRoles\":[]},{\"code\":\"borrow_history\",\"dataScope\":\"CURRENT_USER\",\"name\":\"借阅记录\",\"pageCode\":\"borrow_history_page\",\"pageType\":\"\",\"path\":\"/borrow-history\",\"requiresLogin\":true,\"tableName\":\"\",\"visibleRoles\":[\"user\"]},{\"code\":\"reservation_history\",\"dataScope\":\"CURRENT_USER\",\"name\":\"预约记录\",\"pageCode\":\"reservation_history_page\",\"pageType\":\"\",\"path\":\"/reservation-history\",\"requiresLogin\":true,\"tableName\":\"\",\"visibleRoles\":[\"user\"]},{\"code\":\"user_profile\",\"dataScope\":\"CURRENT_USER\",\"name\":\"个人资料\",\"pageCode\":\"user_profile_page\",\"pageType\":\"\",\"path\":\"/profile\",\"requiresLogin\":true,\"tableName\":\"\",\"visibleRoles\":[\"user\"]}],\"frontendPages\":[{\"code\":\"book_catalog_page\",\"menuCode\":\"book_catalog\",\"name\":\"图书目录\",\"pageType\":\"list\",\"parentPageCode\":\"\",\"path\":\"/books\",\"tableName\":\"book_info\"},{\"code\":\"borrow_history_page\",\"menuCode\":\"borrow_history\",\"name\":\"借阅记录\",\"pageType\":\"current_user_list\",\"parentPageCode\":\"\",\"path\":\"/borrow-history\",\"tableName\":\"borrow_record\"},{\"code\":\"reservation_history_page\",\"menuCode\":\"reservation_history\",\"name\":\"预约记录\",\"pageType\":\"current_user_list\",\"parentPageCode\":\"\",\"path\":\"/reservation-history\",\"tableName\":\"reservation\"},{\"code\":\"user_profile_page\",\"menuCode\":\"user_profile\",\"name\":\"个人资料\",\"pageType\":\"form\",\"parentPageCode\":\"\",\"path\":\"/profile\",\"tableName\":\"user\"}],\"roles\":[{\"code\":\"admin\",\"description\":\"系统管理员,管理所有业务数据\",\"name\":\"管理员\"},{\"code\":\"user\",\"description\":\"普通读者,可借书、还书、预约\",\"name\":\"用户\"}]}}', '{\n \"version\": \"1.0\",\n \"code\": \"borrow_and_reservation\",\n \"name\": \"借阅与预约管理\",\n \"mainTable\": \"borrow_record\",\n \"statusField\": \"status\",\n \"notFoundMessage\": \"借阅记录不存在\",\n \"states\": [\n {\"code\": \"pending\", \"label\": \"待审核\"},\n {\"code\": \"borrowing\", \"label\": \"借阅中\"},\n {\"code\": \"returned\", \"label\": \"已归还\"},\n {\"code\": \"rejected\", \"label\": \"已拒绝\"},\n {\"code\": \"reserved\", \"label\": \"已预约\"},\n {\"code\": \"cancelled\", \"label\": \"已取消\"}\n ],\n \"actions\": [\n {\n \"code\": \"approve\",\n \"name\": \"审核通过\",\n \"from\": \"pending\",\n \"to\": \"borrowing\",\n \"actor\": \"admin\",\n \"method\": \"POST\",\n \"path\": \"/borrow-record/approve\",\n \"invalidStateMessage\": \"当前状态不能审核\",\n \"successMessage\": \"借阅审核通过\",\n \"audit\": {\"userField\": \"approve_user_id\", \"timeField\": \"approve_time\"},\n \"effects\": [\n {\n \"type\": \"decrease\",\n \"table\": \"book_info\",\n \"relationField\": \"book_id\",\n \"field\": \"stock\",\n \"amount\": \"1\",\n \"min\": \"0\",\n \"notFoundMessage\": \"图书不存在\",\n \"errorMessage\": \"图书库存不足\"\n }\n ],\n \"button\": {\n \"scope\": \"admin\",\n \"pageCode\": \"borrow_admin_page\",\n \"slot\": \"list.rowActions\",\n \"type\": \"success\",\n \"confirm\": \"确认审核通过并借出图书吗?\",\n \"order\": 10\n }\n },\n {\n \"code\": \"reject\",\n \"name\": \"审核拒绝\",\n \"from\": \"pending\",\n \"to\": \"rejected\",\n \"actor\": \"admin\",\n \"method\": \"POST\",\n \"path\": \"/borrow-record/reject\",\n \"invalidStateMessage\": \"当前状态不能拒绝\",\n \"successMessage\": \"借阅申请已拒绝\",\n \"audit\": {\"userField\": \"reject_user_id\", \"timeField\": \"reject_time\"},\n \"effects\": [],\n \"button\": {\n \"scope\": \"admin\",\n \"pageCode\": \"borrow_admin_page\",\n \"slot\": \"list.rowActions\",\n \"type\": \"danger\",\n \"confirm\": \"确认拒绝该借阅申请吗?\",\n \"order\": 20\n }\n },\n {\n \"code\": \"return_book\",\n \"name\": \"还书\",\n \"from\": \"borrowing\",\n \"to\": \"returned\",\n \"actor\": \"user\",\n \"method\": \"POST\",\n \"path\": \"/borrow-record/return\",\n \"invalidStateMessage\": \"当前状态不能还书\",\n \"successMessage\": \"还书成功\",\n \"audit\": {},\n \"effects\": [\n {\n \"type\": \"increase\",\n \"table\": \"book_info\",\n \"relationField\": \"book_id\",\n \"field\": \"stock\",\n \"amount\": \"1\",\n \"notFoundMessage\": \"图书不存在\",\n \"errorMessage\": \"库存增加失败\"\n },\n {\n \"type\": \"update_related\",\n \"table\": \"borrow_record\",\n \"relationField\": \"id\",\n \"values\": {\n \"return_time\": \"now\",\n \"return_user_id\": \"currentUserId\"\n }\n }\n ],\n \"button\": {\n \"scope\": \"user\",\n \"pageCode\": \"borrow_history_page\",\n \"slot\": \"list.rowActions\",\n \"type\": \"primary\",\n \"confirm\": \"确认还书吗?\",\n \"order\": 10\n }\n },\n {\n \"code\": \"cancel_reservation\",\n \"name\": \"取消预约\",\n \"from\": \"reserved\",\n \"to\": \"cancelled\",\n \"actor\": \"user\",\n \"method\": \"POST\",\n \"path\": \"/reservation/cancel\",\n \"invalidStateMessage\": \"预约已处理不能取消\",\n \"successMessage\": \"预约已取消\",\n \"audit\": {},\n \"effects\": [\n {\n \"type\": \"update_related\",\n \"table\": \"reservation\",\n \"relationField\": \"id\",\n \"values\": {\n \"cancel_time\": \"now\",\n \"cancel_user_id\": \"currentUserId\"\n }\n }\n ],\n \"button\": {\n \"scope\": \"user\",\n \"pageCode\": \"reservation_history_page\",\n \"slot\": \"list.rowActions\",\n \"type\": \"default\",\n \"confirm\": \"确认取消预约吗?\",\n \"order\": 10\n }\n },\n {\n \"code\": \"confirm_reservation\",\n \"name\": \"确认预约借出\",\n \"from\": \"reserved\",\n \"to\": \"borrowing\",\n \"actor\": \"admin\",\n \"method\": \"POST\",\n \"path\": \"/reservation/confirm\",\n \"invalidStateMessage\": \"预约已取消或已借出\",\n \"successMessage\": \"预约已确认,图书已借出\",\n \"audit\": {\"userField\": \"confirm_user_id\", \"timeField\": \"confirm_time\"},\n \"effects\": [\n {\n \"type\": \"decrease\",\n \"table\": \"book_info\",\n \"relationField\": \"book_id\",\n \"field\": \"stock\",\n \"amount\": \"1\",\n \"min\": \"0\",\n \"notFoundMessage\": \"图书不存在\",\n \"errorMessage\": \"图书库存不足\"\n }\n ],\n \"button\": {\n \"scope\": \"admin\",\n \"pageCode\": \"reservation_admin_page\",\n \"slot\": \"list.rowActions\",\n \"type\": \"primary\",\n \"confirm\": \"确认将预约转为借出?\",\n \"order\": 10\n }\n },\n {\n \"code\": \"reject_reservation\",\n \"name\": \"拒绝预约\",\n \"from\": \"reserved\",\n \"to\": \"cancelled\",\n \"actor\": \"admin\",\n \"method\": \"POST\",\n \"path\": \"/reservation/reject\",\n \"invalidStateMessage\": \"预约已取消或已借出\",\n \"successMessage\": \"预约已被拒绝\",\n \"audit\": {\"userField\": \"reject_user_id\", \"timeField\": \"reject_time\"},\n \"effects\": [],\n \"button\": {\n \"scope\": \"admin\",\n \"pageCode\": \"reservation_admin_page\",\n \"slot\": \"list.rowActions\",\n \"type\": \"danger\",\n \"confirm\": \"确认拒绝该预约吗?\",\n \"order\": 20\n }\n }\n ],\n \"metrics\": [\n {\"code\": \"borrowing_count\", \"name\": \"借阅中数量\", \"table\": \"borrow_record\", \"aggregate\": \"count\", \"field\": \"id\", \"status\": \"borrowing\", \"unit\": \"条\"},\n {\"code\": \"pending_count\", \"name\": \"待审核数量\", \"table\": \"borrow_record\", \"aggregate\": \"count\", \"field\": \"id\", \"status\": \"pending\", \"unit\": \"条\"},\n {\"code\": \"returned_count\", \"name\": \"已归还数量\", \"table\": \"borrow_record\", \"aggregate\": \"count\", \"field\": \"id\", \"status\": \"returned\", \"unit\": \"条\"},\n {\"code\": \"reserved_count\", \"name\": \"预约数量\", \"table\": \"borrow_record\", \"aggregate\": \"count\", \"field\": \"id\", \"status\": \"reserved\", \"unit\": \"条\"}\n ]\n}', '1', NULL, 87898, '2026-07-15 08:52:51');
INSERT INTO `factory_ai_stage_output` VALUES (135, 113, 109, 100, 'database', '{\"mode\":\"generate\",\"projectName\":\"图书管理系统\",\"projectDescription\":\"功能:借书、还书、预约、取消预约\\n角色用户、管理员\\n其他模块轮播图、公告、新闻\",\"industryTemplate\":\"\",\"stylePreset\":\"dark-tech\",\"extraRequirements\":\"\",\"confirmedAppBlueprint\":{\"adminHomeDashboard\":{\"charts\":[{\"filters\":[],\"metrics\":[{\"aggregate\":\"count\",\"label\":\"借阅趋势\"}],\"title\":\"借阅趋势\",\"type\":\"line\"},{\"filters\":[],\"metrics\":[{\"aggregate\":\"count\",\"label\":\"图书分类分布\"}],\"title\":\"图书分类分布\",\"type\":\"pie\"}],\"description\":\"核心业务数据\",\"metrics\":[{\"aggregate\":\"count\",\"filters\":[],\"semantic\":\"content\"},{\"aggregate\":\"count\",\"filters\":[],\"semantic\":\"order\"},{\"aggregate\":\"count\",\"filters\":[],\"semantic\":\"task\"},{\"aggregate\":\"count\",\"filters\":[],\"semantic\":\"user\"}],\"title\":\"运营总览\"},\"adminMenus\":[{\"code\":\"book_admin\",\"dataScope\":\"ROLE\",\"name\":\"图书管理\",\"pageCode\":\"book_admin_page\",\"pageType\":\"list\",\"path\":\"/admin/books\",\"requiresLogin\":true,\"tableName\":\"book_info\",\"visibleRoles\":[\"admin\"]},{\"code\":\"borrow_admin\",\"dataScope\":\"ROLE\",\"name\":\"借阅管理\",\"pageCode\":\"borrow_admin_page\",\"pageType\":\"list\",\"path\":\"/admin/borrows\",\"requiresLogin\":true,\"tableName\":\"borrow_record\",\"visibleRoles\":[\"admin\"]},{\"code\":\"reservation_admin\",\"dataScope\":\"ROLE\",\"name\":\"预约管理\",\"pageCode\":\"reservation_admin_page\",\"pageType\":\"list\",\"path\":\"/admin/reservations\",\"requiresLogin\":true,\"tableName\":\"reservation\",\"visibleRoles\":[\"admin\"]},{\"code\":\"carousel_admin\",\"dataScope\":\"ROLE\",\"name\":\"轮播图管理\",\"pageCode\":\"carousel_admin_page\",\"pageType\":\"list\",\"path\":\"/admin/carousels\",\"requiresLogin\":true,\"tableName\":\"carousel\",\"visibleRoles\":[\"admin\"]},{\"code\":\"announcement_admin\",\"dataScope\":\"ROLE\",\"name\":\"公告管理\",\"pageCode\":\"announcement_admin_page\",\"pageType\":\"list\",\"path\":\"/admin/announcements\",\"requiresLogin\":true,\"tableName\":\"announcement\",\"visibleRoles\":[\"admin\"]},{\"code\":\"news_admin\",\"dataScope\":\"ROLE\",\"name\":\"新闻管理\",\"pageCode\":\"news_admin_page\",\"pageType\":\"list\",\"path\":\"/admin/news\",\"requiresLogin\":true,\"tableName\":\"news\",\"visibleRoles\":[\"admin\"]},{\"code\":\"user_admin\",\"dataScope\":\"ROLE\",\"name\":\"用户管理\",\"pageCode\":\"user_admin_page\",\"pageType\":\"list\",\"path\":\"/admin/users\",\"requiresLogin\":true,\"tableName\":\"user\",\"visibleRoles\":[\"admin\"]},{\"code\":\"admin_profile\",\"dataScope\":\"CURRENT_USER\",\"name\":\"管理员资料\",\"pageCode\":\"admin_profile_page\",\"pageType\":\"form\",\"path\":\"/admin/profile\",\"requiresLogin\":true,\"tableName\":\"admin\",\"visibleRoles\":[\"admin\"]}],\"frontendMenus\":[{\"code\":\"book_catalog\",\"dataScope\":\"PUBLIC\",\"name\":\"图书目录\",\"pageCode\":\"book_catalog_page\",\"pageType\":\"\",\"path\":\"/books\",\"requiresLogin\":false,\"tableName\":\"\",\"visibleRoles\":[]},{\"code\":\"borrow_history\",\"dataScope\":\"CURRENT_USER\",\"name\":\"借阅记录\",\"pageCode\":\"borrow_history_page\",\"pageType\":\"\",\"path\":\"/borrow-history\",\"requiresLogin\":true,\"tableName\":\"\",\"visibleRoles\":[\"user\"]},{\"code\":\"reservation_history\",\"dataScope\":\"CURRENT_USER\",\"name\":\"预约记录\",\"pageCode\":\"reservation_history_page\",\"pageType\":\"\",\"path\":\"/reservation-history\",\"requiresLogin\":true,\"tableName\":\"\",\"visibleRoles\":[\"user\"]},{\"code\":\"user_profile\",\"dataScope\":\"CURRENT_USER\",\"name\":\"个人资料\",\"pageCode\":\"user_profile_page\",\"pageType\":\"\",\"path\":\"/profile\",\"requiresLogin\":true,\"tableName\":\"\",\"visibleRoles\":[\"user\"]}],\"frontendPages\":[{\"code\":\"book_catalog_page\",\"menuCode\":\"book_catalog\",\"name\":\"图书目录\",\"pageType\":\"list\",\"parentPageCode\":\"\",\"path\":\"/books\",\"tableName\":\"book_info\"},{\"code\":\"borrow_history_page\",\"menuCode\":\"borrow_history\",\"name\":\"借阅记录\",\"pageType\":\"current_user_list\",\"parentPageCode\":\"\",\"path\":\"/borrow-history\",\"tableName\":\"borrow_record\"},{\"code\":\"reservation_history_page\",\"menuCode\":\"reservation_history\",\"name\":\"预约记录\",\"pageType\":\"current_user_list\",\"parentPageCode\":\"\",\"path\":\"/reservation-history\",\"tableName\":\"reservation\"},{\"code\":\"user_profile_page\",\"menuCode\":\"user_profile\",\"name\":\"个人资料\",\"pageType\":\"form\",\"parentPageCode\":\"\",\"path\":\"/profile\",\"tableName\":\"user\"}],\"roles\":[{\"code\":\"admin\",\"description\":\"系统管理员,管理所有业务数据\",\"name\":\"管理员\"},{\"code\":\"user\",\"description\":\"普通读者,可借书、还书、预约\",\"name\":\"用户\"}]},\"flowConfig\":{\"actions\":[{\"actor\":\"admin\",\"audit\":{\"timeField\":\"approve_time\",\"userField\":\"approve_user_id\"},\"button\":{\"confirm\":\"确认审核通过并借出图书吗?\",\"order\":10,\"pageCode\":\"borrow_admin_page\",\"scope\":\"admin\",\"slot\":\"list.rowActions\",\"type\":\"success\"},\"code\":\"approve\",\"effects\":[{\"amount\":\"1\",\"errorMessage\":\"图书库存不足\",\"field\":\"stock\",\"min\":\"0\",\"notFoundMessage\":\"图书不存在\",\"relationField\":\"book_id\",\"table\":\"book_info\",\"type\":\"decrease\",\"values\":{}}],\"from\":\"pending\",\"invalidStateMessage\":\"当前状态不能审核\",\"method\":\"POST\",\"name\":\"审核通过\",\"path\":\"/borrow-record/approve\",\"requestFields\":[],\"successMessage\":\"借阅审核通过\",\"to\":\"borrowing\"},{\"actor\":\"admin\",\"audit\":{\"timeField\":\"reject_time\",\"userField\":\"reject_user_id\"},\"button\":{\"confirm\":\"确认拒绝该借阅申请吗?\",\"order\":20,\"pageCode\":\"borrow_admin_page\",\"scope\":\"admin\",\"slot\":\"list.rowActions\",\"type\":\"danger\"},\"code\":\"reject\",\"effects\":[],\"from\":\"pending\",\"invalidStateMessage\":\"当前状态不能拒绝\",\"method\":\"POST\",\"name\":\"审核拒绝\",\"path\":\"/borrow-record/reject\",\"requestFields\":[],\"successMessage\":\"借阅申请已拒绝\",\"to\":\"rejected\"},{\"actor\":\"user\",\"audit\":{},\"button\":{\"confirm\":\"确认还书吗?\",\"order\":10,\"pageCode\":\"borrow_history_page\",\"scope\":\"user\",\"slot\":\"list.rowActions\",\"type\":\"primary\"},\"code\":\"return_book\",\"effects\":[{\"amount\":\"1\",\"errorMessage\":\"库存增加失败\",\"field\":\"stock\",\"min\":\"0\",\"notFoundMessage\":\"图书不存在\",\"relationField\":\"book_id\",\"table\":\"book_info\",\"type\":\"increase\",\"values\":{}},{\"amount\":\"1\",\"min\":\"0\",\"relationField\":\"id\",\"table\":\"borrow_record\",\"type\":\"update_related\",\"values\":{\"return_user_id\":\"currentUserId\",\"return_time\":\"now\"}}],\"from\":\"borrowing\",\"invalidStateMessage\":\"当前状态不能还书\",\"method\":\"POST\",\"name\":\"还书\",\"path\":\"/borrow-record/return\",\"requestFields\":[],\"successMessage\":\"还书成功\",\"to\":\"returned\"},{\"actor\":\"user\",\"audit\":{},\"button\":{\"confirm\":\"确认取消预约吗?\",\"order\":10,\"pageCode\":\"reservation_history_page\",\"scope\":\"user\",\"slot\":\"list.rowActions\",\"type\":\"default\"},\"code\":\"cancel_reservation\",\"effects\":[{\"amount\":\"1\",\"min\":\"0\",\"relationField\":\"id\",\"table\":\"reservation\",\"type\":\"update_related\",\"values\":{\"cancel_time\":\"now\",\"cancel_user_id\":\"currentUserId\"}}],\"from\":\"reserved\",\"invalidStateMessage\":\"预约已处理不能取消\",\"method\":\"POST\",\"name\":\"取消预约\",\"path\":\"/reservation/cancel\",\"requestFields\":[],\"successMessage\":\"预约已取消\",\"to\":\"cancelled\"},{\"actor\":\"admin\",\"audit\":{\"timeField\":\"confirm_time\",\"userField\":\"confirm_user_id\"},\"button\":{\"confirm\":\"确认将预约转为借出?\",\"order\":10,\"pageCode\":\"reservation_admin_page\",\"scope\":\"admin\",\"slot\":\"list.rowActions\",\"type\":\"primary\"},\"code\":\"confirm_reservation\",\"effects\":[{\"amount\":\"1\",\"errorMessage\":\"图书库存不足\",\"field\":\"stock\",\"min\":\"0\",\"notFoundMessage\":\"图书不存在\",\"relationField\":\"book_id\",\"table\":\"book_info\",\"type\":\"decrease\",\"values\":{}}],\"from\":\"reserved\",\"invalidStateMessage\":\"预约已取消或已借出\",\"method\":\"POST\",\"name\":\"确认预约借出\",\"path\":\"/reservation/confirm\",\"requestFields\":[],\"successMessage\":\"预约已确认,图书已借出\",\"to\":\"borrowing\"},{\"actor\":\"admin\",\"audit\":{\"timeField\":\"reject_time\",\"userField\":\"reject_user_id\"},\"button\":{\"confirm\":\"确认拒绝该预约吗?\",\"order\":20,\"pageCode\":\"reservation_admin_page\",\"scope\":\"admin\",\"slot\":\"list.rowActions\",\"type\":\"danger\"},\"code\":\"reject_reservation\",\"effects\":[],\"from\":\"reserved\",\"invalidStateMessage\":\"预约已取消或已借出\",\"method\":\"POST\",\"name\":\"拒绝预约\",\"path\":\"/reservation/reject\",\"requestFields\":[],\"successMessage\":\"预约已被拒绝\",\"to\":\"cancelled\"}],\"code\":\"borrow_and_reservation\",\"mainTable\":\"borrow_record\",\"metrics\":[{\"aggregate\":\"count\",\"code\":\"borrowing_count\",\"field\":\"id\",\"name\":\"借阅中数量\",\"status\":\"borrowing\",\"table\":\"borrow_record\",\"unit\":\"条\"},{\"aggregate\":\"count\",\"code\":\"pending_count\",\"field\":\"id\",\"name\":\"待审核数量\",\"status\":\"pending\",\"table\":\"borrow_record\",\"unit\":\"条\"},{\"aggregate\":\"count\",\"code\":\"returned_count\",\"field\":\"id\",\"name\":\"已归还数量\",\"status\":\"returned\",\"table\":\"borrow_record\",\"unit\":\"条\"},{\"aggregate\":\"count\",\"code\":\"reserved_count\",\"field\":\"id\",\"name\":\"预约数量\",\"status\":\"reserved\",\"table\":\"borrow_record\",\"unit\":\"条\"}],\"name\":\"借阅与预约管理\",\"notFoundMessage\":\"借阅记录不存在\",\"states\":[{\"code\":\"pending\",\"label\":\"待审核\"},{\"code\":\"borrowing\",\"label\":\"借阅中\"},{\"code\":\"returned\",\"label\":\"已归还\"},{\"code\":\"rejected\",\"label\":\"已拒绝\"},{\"code\":\"reserved\",\"label\":\"已预约\"},{\"code\":\"cancelled\",\"label\":\"已取消\"}],\"statusField\":\"status\",\"version\":\"1.0\"},\"compiledFlowContract\":{\"acceptanceScenarios\":[],\"actions\":[{\"actor\":\"admin\",\"code\":\"approve\",\"name\":\"审核通过\",\"ownerObject\":\"borrow_record\",\"ownerTable\":\"borrow_record\",\"preconditions\":[],\"quantityEffects\":[{\"actionCode\":\"approve\",\"amount\":\"1\",\"effectType\":\"decrease\",\"objectCode\":\"book_info\",\"quantityField\":\"stock\",\"tableName\":\"book_info\"}],\"recordEffects\":[],\"required\":true,\"stateTransitions\":[{\"actionCode\":\"approve\",\"fromState\":\"pending\",\"toState\":\"borrowing\"}]},{\"actor\":\"admin\",\"code\":\"reject\",\"name\":\"审核拒绝\",\"ownerObject\":\"borrow_record\",\"ownerTable\":\"borrow_record\",\"preconditions\":[],\"quantityEffects\":[],\"recordEffects\":[],\"required\":true,\"stateTransitions\":[{\"actionCode\":\"reject\",\"fromState\":\"pending\",\"toState\":\"rejected\"}]},{\"actor\":\"user\",\"code\":\"return_book\",\"name\":\"还书\",\"ownerObject\":\"borrow_record\",\"ownerTable\":\"borrow_record\",\"preconditions\":[],\"quantityEffects\":[{\"actionCode\":\"return_book\",\"amount\":\"1\",\"effectType\":\"increase\",\"objectCode\":\"book_info\",\"quantityField\":\"stock\",\"tableName\":\"book_info\"}],\"recordEffects\":[{\"actionCode\":\"return_book\",\"objectCode\":\"borrow_record\",\"operation\":\"UPDATE_FIELDS\",\"tableName\":\"borrow_record\"}],\"required\":true,\"stateTransitions\":[{\"actionCode\":\"return_book\",\"fromState\":\"borrowing\",\"toState\":\"returned\"}]},{\"actor\":\"user\",\"code\":\"cancel_reservation\",\"name\":\"取消预约\",\"ownerObject\":\"borrow_record\",\"ownerTable\":\"borrow_record\",\"preconditions\":[],\"quantityEffects\":[],\"recordEffects\":[{\"actionCode\":\"cancel_reservation\",\"objectCode\":\"reservation\",\"operation\":\"UPDATE_FIELDS\",\"tableName\":\"reservation\"}],\"required\":true,\"stateTransitions\":[{\"actionCode\":\"cancel_reservation\",\"fromState\":\"reserved\",\"toState\":\"cancelled\"}]},{\"actor\":\"admin\",\"code\":\"confirm_reservation\",\"name\":\"确认预约借出\",\"ownerObject\":\"borrow_record\",\"ownerTable\":\"borrow_record\",\"preconditions\":[],\"quantityEffects\":[{\"actionCode\":\"confirm_reservation\",\"amount\":\"1\",\"effectType\":\"decrease\",\"objectCode\":\"book_info\",\"quantityField\":\"stock\",\"tableName\":\"book_info\"}],\"recordEffects\":[],\"required\":true,\"stateTransitions\":[{\"actionCode\":\"confirm_reservation\",\"fromState\":\"reserved\",\"toState\":\"borrowing\"}]},{\"actor\":\"admin\",\"code\":\"reject_reservation\",\"name\":\"拒绝预约\",\"ownerObject\":\"borrow_record\",\"ownerTable\":\"borrow_record\",\"preconditions\":[],\"quantityEffects\":[],\"recordEffects\":[],\"required\":true,\"stateTransitions\":[{\"actionCode\":\"reject_reservation\",\"fromState\":\"reserved\",\"toState\":\"cancelled\"}]}],\"businessPolicies\":[],\"coreObjects\":[{\"code\":\"borrow_record\",\"name\":\"借阅与预约管理\",\"objectType\":\"main\",\"tableName\":\"borrow_record\"},{\"code\":\"book_info\",\"name\":\"book_info\",\"objectType\":\"related\",\"tableName\":\"book_info\"},{\"code\":\"reservation\",\"name\":\"reservation\",\"objectType\":\"related\",\"tableName\":\"reservation\"}],\"domainName\":\"借阅与预约管理\",\"metrics\":[{\"aggregate\":\"count\",\"code\":\"borrowing_count\",\"field\":\"id\",\"filters\":[{\"field\":\"status\",\"operator\":\"eq\",\"values\":[\"borrowing\"]}],\"name\":\"借阅中数量\",\"relatedActionCodes\":[],\"required\":true,\"tableName\":\"borrow_record\",\"unit\":\"条\"},{\"aggregate\":\"count\",\"code\":\"pending_count\",\"field\":\"id\",\"filters\":[{\"field\":\"status\",\"operator\":\"eq\",\"values\":[\"pending\"]}],\"name\":\"待审核数量\",\"relatedActionCodes\":[],\"required\":true,\"tableName\":\"borrow_record\",\"unit\":\"条\"},{\"aggregate\":\"count\",\"code\":\"returned_count\",\"field\":\"id\",\"filters\":[{\"field\":\"status\",\"operator\":\"eq\",\"values\":[\"returned\"]}],\"name\":\"已归还数量\",\"relatedActionCodes\":[],\"required\":true,\"tableName\":\"borrow_record\",\"unit\":\"条\"},{\"aggregate\":\"count\",\"code\":\"reserved_count\",\"field\":\"id\",\"filters\":[{\"field\":\"status\",\"operator\":\"eq\",\"values\":[\"reserved\"]}],\"name\":\"预约数量\",\"relatedActionCodes\":[],\"required\":true,\"tableName\":\"borrow_record\",\"unit\":\"条\"}],\"pageBindings\":[{\"actionCode\":\"approve\",\"pageCode\":\"borrow_admin_page\",\"slot\":\"list.rowActions\",\"tableName\":\"borrow_record\",\"target\":\"admin\"},{\"actionCode\":\"reject\",\"pageCode\":\"borrow_admin_page\",\"slot\":\"list.rowActions\",\"tableName\":\"borrow_record\",\"target\":\"admin\"},{\"actionCode\":\"return_book\",\"pageCode\":\"borrow_history_page\",\"slot\":\"list.rowActions\",\"tableName\":\"borrow_record\",\"target\":\"frontend\"},{\"actionCode\":\"cancel_reservation\",\"pageCode\":\"reservation_history_page\",\"slot\":\"list.rowActions\",\"tableName\":\"borrow_record\",\"target\":\"frontend\"},{\"actionCode\":\"confirm_reservation\",\"pageCode\":\"reservation_admin_page\",\"slot\":\"list.rowActions\",\"tableName\":\"borrow_record\",\"target\":\"admin\"},{\"actionCode\":\"reject_reservation\",\"pageCode\":\"reservation_admin_page\",\"slot\":\"list.rowActions\",\"tableName\":\"borrow_record\",\"target\":\"admin\"}],\"quantityRules\":[{\"actionCode\":\"approve\",\"amount\":\"1\",\"effectType\":\"decrease\",\"objectCode\":\"book_info\",\"quantityField\":\"stock\",\"tableName\":\"book_info\"},{\"actionCode\":\"return_book\",\"amount\":\"1\",\"effectType\":\"increase\",\"objectCode\":\"book_info\",\"quantityField\":\"stock\",\"tableName\":\"book_info\"},{\"actionCode\":\"confirm_reservation\",\"amount\":\"1\",\"effectType\":\"decrease\",\"objectCode\":\"book_info\",\"quantityField\":\"stock\",\"tableName\":\"book_info\"}],\"recordRules\":[{\"actionCode\":\"return_book\",\"objectCode\":\"borrow_record\",\"operation\":\"UPDATE_FIELDS\",\"tableName\":\"borrow_record\"},{\"actionCode\":\"cancel_reservation\",\"objectCode\":\"reservation\",\"operation\":\"UPDATE_FIELDS\",\"tableName\":\"reservation\"}],\"stateMachines\":[{\"objectCode\":\"borrow_record\",\"states\":[\"pending\",\"borrowing\",\"returned\",\"rejected\",\"reserved\",\"cancelled\"],\"statusField\":\"status\",\"tableName\":\"borrow_record\",\"transitions\":[{\"actionCode\":\"approve\",\"fromState\":\"pending\",\"toState\":\"borrowing\"},{\"actionCode\":\"reject\",\"fromState\":\"pending\",\"toState\":\"rejected\"},{\"actionCode\":\"return_book\",\"fromState\":\"borrowing\",\"toState\":\"returned\"},{\"actionCode\":\"cancel_reservation\",\"fromState\":\"reserved\",\"toState\":\"cancelled\"},{\"actionCode\":\"confirm_reservation\",\"fromState\":\"reserved\",\"toState\":\"borrowing\"},{\"actionCode\":\"reject_reservation\",\"fromState\":\"reserved\",\"toState\":\"cancelled\"}]}]},\"canonicalTableRegistry\":[\"book_info\",\"borrow_record\",\"reservation\",\"user\",\"carousel\",\"announcement\",\"news\",\"admin\"],\"limits\":{\"maxTables\":12,\"maxColumnsPerTable\":30}}', '{\"tables\":[{\"tableName\":\"book_info\",\"tableComment\":\"图书信息表\",\"adminMenuName\":\"图书管理\",\"operations\":{\"add\":true,\"edit\":true,\"remove\":true,\"removeType\":\"physical\",\"reason\":\"\"},\"columns\":[{\"columnName\":\"id\",\"columnLabel\":\"ID\",\"columnComment\":\"主键ID\",\"columnType\":\"bigint(20)\",\"isPk\":\"1\",\"isIncrement\":\"1\",\"isRequired\":\"1\",\"javaType\":\"Long\",\"htmlType\":\"input\"},{\"columnName\":\"title\",\"columnLabel\":\"书名\",\"columnComment\":\"图书名称\",\"columnType\":\"varchar(200)\",\"isPk\":\"0\",\"isIncrement\":\"0\",\"isRequired\":\"1\",\"javaType\":\"String\",\"htmlType\":\"input\"},{\"columnName\":\"author\",\"columnLabel\":\"作者\",\"columnComment\":\"图书作者\",\"columnType\":\"varchar(100)\",\"isPk\":\"0\",\"isIncrement\":\"0\",\"isRequired\":\"1\",\"javaType\":\"String\",\"htmlType\":\"input\"},{\"columnName\":\"publisher\",\"columnLabel\":\"出版社\",\"columnComment\":\"出版社名称\",\"columnType\":\"varchar(200)\",\"isPk\":\"0\",\"isIncrement\":\"0\",\"isRequired\":\"0\",\"javaType\":\"String\",\"htmlType\":\"input\"},{\"columnName\":\"isbn\",\"columnLabel\":\"ISBN\",\"columnComment\":\"国际标准书号\",\"columnType\":\"varchar(20)\",\"isPk\":\"0\",\"isIncrement\":\"0\",\"isRequired\":\"0\",\"javaType\":\"String\",\"htmlType\":\"input\"},{\"columnName\":\"stock\",\"columnLabel\":\"库存\",\"columnComment\":\"当前可借库存数量\",\"columnType\":\"int(11)\",\"isPk\":\"0\",\"isIncrement\":\"0\",\"isRequired\":\"1\",\"javaType\":\"Integer\",\"htmlType\":\"input\"},{\"columnName\":\"description\",\"columnLabel\":\"简介\",\"columnComment\":\"图书内容简介\",\"columnType\":\"text\",\"isPk\":\"0\",\"isIncrement\":\"0\",\"isRequired\":\"0\",\"javaType\":\"String\",\"htmlType\":\"textarea\"},{\"columnName\":\"cover_image\",\"columnLabel\":\"封面图片\",\"columnComment\":\"图书封面图片URL\",\"columnType\":\"varchar(500)\",\"isPk\":\"0\",\"isIncrement\":\"0\",\"isRequired\":\"0\",\"javaType\":\"String\",\"htmlType\":\"imageUpload\"},{\"columnName\":\"create_time\",\"columnLabel\":\"创建时间\",\"columnComment\":\"记录创建时间\",\"columnType\":\"datetime\",\"isPk\":\"0\",\"isIncrement\":\"0\",\"isRequired\":\"1\",\"javaType\":\"Date\",\"htmlType\":\"datetime\"},{\"columnName\":\"update_time\",\"columnLabel\":\"更新时间\",\"columnComment\":\"记录更新时间\",\"columnType\":\"datetime\",\"isPk\":\"0\",\"isIncrement\":\"0\",\"isRequired\":\"0\",\"javaType\":\"Date\",\"htmlType\":\"datetime\"}]},{\"tableName\":\"borrow_record\",\"tableComment\":\"借阅与预约记录表\",\"adminMenuName\":\"借阅管理\",\"operations\":{\"add\":true,\"edit\":false,\"remove\":false,\"removeType\":\"physical\",\"reason\":\"仅新增动作记录\"},\"columns\":[{\"columnName\":\"id\",\"columnLabel\":\"ID\",\"columnComment\":\"主键ID\",\"columnType\":\"bigint(20)\",\"isPk\":\"1\",\"isIncrement\":\"1\",\"isRequired\":\"1\",\"javaType\":\"Long\",\"htmlType\":\"input\"},{\"columnName\":\"book_id\",\"columnLabel\":\"图书\",\"columnComment\":\"关联图书ID\",\"columnType\":\"bigint(20)\",\"isPk\":\"0\",\"isIncrement\":\"0\",\"isRequired\":\"1\",\"javaType\":\"Long\",\"htmlType\":\"select\",\"dictType\":\"remote:book_info:id:title\"},{\"columnName\":\"user_id\",\"columnLabel\":\"用户\",\"columnComment\":\"关联读者用户ID\",\"columnType\":\"bigint(20)\",\"isPk\":\"0\",\"isIncrement\":\"0\",\"isRequired\":\"1\",\"javaType\":\"Long\",\"htmlType\":\"select\",\"dictType\":\"remote:user:user_id:username\"},{\"columnName\":\"borrow_time\",\"columnLabel\":\"借书时间\",\"columnComment\":\"借出时间\",\"columnType\":\"datetime\",\"isPk\":\"0\",\"isIncrement\":\"0\",\"isRequired\":\"0\",\"javaType\":\"Date\",\"htmlType\":\"datetime\"},{\"columnName\":\"return_time\",\"columnLabel\":\"还书时间\",\"columnComment\":\"实际归还时间\",\"columnType\":\"datetime\",\"isPk\":\"0\",\"isIncrement\":\"0\",\"isRequired\":\"0\",\"javaType\":\"Date\",\"htmlType\":\"datetime\"},{\"columnName\":\"status\",\"columnLabel\":\"状态\",\"columnComment\":\"记录状态pending-待审核 borrowing-借阅中 returned-已归还 rejected-已拒绝 reserved-已预约 cancelled-已取消\",\"columnType\":\"varchar(20)\",\"isPk\":\"0\",\"isIncrement\":\"0\",\"isRequired\":\"1\",\"javaType\":\"String\",\"htmlType\":\"select\",\"dictType\":\"borrow_status\",\"dictOptions\":[{\"label\":\"待审核\",\"value\":\"pending\"},{\"label\":\"借阅中\",\"value\":\"borrowing\"},{\"label\":\"已归还\",\"value\":\"returned\"},{\"label\":\"已拒绝\",\"value\":\"rejected\"},{\"label\":\"已预约\",\"value\":\"reserved\"},{\"label\":\"已取消\",\"value\":\"cancelled\"}]},{\"columnName\":\"approve_user_id\",\"columnLabel\":\"审核人\",\"columnComment\":\"通过借阅审核的管理员ID\",\"columnType\":\"bigint(20)\",\"isPk\":\"0\",\"isIncrement\":\"0\",\"isRequired\":\"0\",\"javaType\":\"Long\",\"htmlType\":\"select\",\"dictType\":\"remote:admin:admin_id:username\"},{\"columnName\":\"approve_time\",\"columnLabel\":\"审核时间\",\"columnComment\":\"借阅通过审核的时间\",\"columnType\":\"datetime\",\"isPk\":\"0\",\"isIncrement\":\"0\",\"isRequired\":\"0\",\"javaType\":\"Date\",\"htmlType\":\"datetime\"},{\"columnName\":\"reject_user_id\",\"columnLabel\":\"拒绝人\",\"columnComment\":\"拒绝借阅或预约的管理员ID\",\"columnType\":\"bigint(20)\",\"isPk\":\"0\",\"isIncrement\":\"0\",\"isRequired\":\"0\",\"javaType\":\"Long\",\"htmlType\":\"select\",\"dictType\":\"remote:admin:admin_id:username\"},{\"columnName\":\"reject_time\",\"columnLabel\":\"拒绝时间\",\"columnComment\":\"拒绝操作的时间\",\"columnType\":\"datetime\",\"isPk\":\"0\",\"isIncrement\":\"0\",\"isRequired\":\"0\",\"javaType\":\"Date\",\"htmlType\":\"datetime\"},{\"columnName\":\"confirm_user_id\",\"columnLabel\":\"确认人\",\"columnComment\":\"确认预约借出的管理员ID\",\"columnType\":\"bigint(20)\",\"isPk\":\"0\",\"isIncrement\":\"0\",\"isRequired\":\"0\",\"javaType\":\"Long\",\"htmlType\":\"select\",\"dictType\":\"remote:admin:admin_id:username\"},{\"columnName\":\"confirm_time\",\"columnLabel\":\"确认时间\",\"columnComment\":\"确认预约借出的时间\",\"columnType\":\"datetime\",\"isPk\":\"0\",\"isIncrement\":\"0\",\"isRequired\":\"0\",\"javaType\":\"Date\",\"htmlType\":\"datetime\"},{\"columnName\":\"return_user_id\",\"columnLabel\":\"还书人\",\"columnComment\":\"执行还书操作的用户ID\",\"columnType\":\"bigint(20)\",\"isPk\":\"0\",\"isIncrement\":\"0\",\"isRequired\":\"0\",\"javaType\":\"Long\",\"htmlType\":\"select\",\"dictType\":\"remote:user:user_id:username\"},{\"columnName\":\"create_time\",\"columnLabel\":\"创建时间\",\"columnComment\":\"记录创建时间\",\"columnType\":\"datetime\",\"isPk\":\"0\",\"isIncrement\":\"0\",\"isRequired\":\"1\",\"javaType\":\"Date\",\"htmlType\":\"datetime\"}]},{\"tableName\":\"reservation\",\"tableComment\":\"预约记录表\",\"adminMenuName\":\"预约管理\",\"operations\":{\"add\":true,\"edit\":false,\"remove\":false,\"removeType\":\"physical\",\"reason\":\"仅新增动作记录\"},\"columns\":[{\"columnName\":\"id\",\"columnLabel\":\"ID\",\"columnComment\":\"主键ID\",\"columnType\":\"bigint(20)\",\"isPk\":\"1\",\"isIncrement\":\"1\",\"isRequired\":\"1\",\"javaType\":\"Long\",\"htmlType\":\"input\"},{\"columnName\":\"book_id\",\"columnLabel\":\"图书\",\"columnComment\":\"关联图书ID\",\"columnType\":\"bigint(20)\",\"isPk\":\"0\",\"isIncrement\":\"0\",\"isRequired\":\"1\",\"javaType\":\"Long\",\"htmlType\":\"select\",\"dictType\":\"remote:book_info:id:title\"},{\"columnName\":\"user_id\",\"columnLabel\":\"用户\",\"columnComment\":\"关联读者用户ID\",\"columnType\":\"bigint(20)\",\"isPk\":\"0\",\"isIncrement\":\"0\",\"isRequired\":\"1\",\"javaType\":\"Long\",\"htmlType\":\"select\",\"dictType\":\"remote:user:user_id:username\"},{\"columnName\":\"status\",\"columnLabel\":\"状态\",\"columnComment\":\"预约状态reserved-已预约 cancelled-已取消\",\"columnType\":\"varchar(20)\",\"isPk\":\"0\",\"isIncrement\":\"0\",\"isRequired\":\"1\",\"javaType\":\"String\",\"htmlType\":\"select\",\"dictType\":\"reservation_status\",\"dictOptions\":[{\"label\":\"已预约\",\"value\":\"reserved\"},{\"label\":\"已取消\",\"value\":\"cancelled\"}]},{\"columnName\":\"cancel_user_id\",\"columnLabel\":\"取消人\",\"columnComment\":\"取消预约的用户ID\",\"columnType\":\"bigint(20)\",\"isPk\":\"0\",\"isIncrement\":\"0\",\"isRequired\":\"0\",\"javaType\":\"Long\",\"htmlType\":\"select\",\"dictType\":\"remote:user:user_id:username\"},{\"columnName\":\"cancel_time\",\"columnLabel\":\"取消时间\",\"columnComment\":\"取消预约的时间\",\"columnType\":\"datetime\",\"isPk\":\"0\",\"isIncrement\":\"0\",\"isRequired\":\"0\",\"javaType\":\"Date\",\"htmlType\":\"datetime\"},{\"columnName\":\"create_time\",\"columnLabel\":\"创建时间\",\"columnComment\":\"预约创建时间\",\"columnType\":\"datetime\",\"isPk\":\"0\",\"isIncrement\":\"0\",\"isRequired\":\"1\",\"javaType\":\"Date\",\"htmlType\":\"datetime\"}]},{\"tableName\":\"user\",\"tableComment\":\"用户账号表\",\"adminMenuName\":\"用户管理\",\"operations\":{\"add\":true,\"edit\":true,\"remove\":true,\"removeType\":\"physical\",\"reason\":\"\"},\"columns\":[{\"columnName\":\"user_id\",\"columnLabel\":\"用户ID\",\"columnComment\":\"自增主键\",\"columnType\":\"bigint(20)\",\"isPk\":\"1\",\"isIncrement\":\"1\",\"isRequired\":\"1\",\"javaType\":\"Long\",\"htmlType\":\"input\"},{\"columnName\":\"username\",\"columnLabel\":\"用户名\",\"columnComment\":\"登录用户名,唯一\",\"columnType\":\"varchar(50)\",\"isPk\":\"0\",\"isIncrement\":\"0\",\"isRequired\":\"1\",\"javaType\":\"String\",\"htmlType\":\"input\"},{\"columnName\":\"password_hash\",\"columnLabel\":\"密码哈希\",\"columnComment\":\"加密后的密码\",\"columnType\":\"varchar(255)\",\"isPk\":\"0\",\"isIncrement\":\"0\",\"isRequired\":\"1\",\"javaType\":\"String\",\"htmlType\":\"input\"},{\"columnName\":\"nickname\",\"columnLabel\":\"昵称\",\"columnComment\":\"用户显示名称\",\"columnType\":\"varchar(50)\",\"isPk\":\"0\",\"isIncrement\":\"0\",\"isRequired\":\"0\",\"javaType\":\"String\",\"htmlType\":\"input\"},{\"columnName\":\"status\",\"columnLabel\":\"状态\",\"columnComment\":\"账号状态1-启用 0-禁用\",\"columnType\":\"int(11)\",\"isPk\":\"0\",\"isIncrement\":\"0\",\"isRequired\":\"1\",\"javaType\":\"Integer\",\"htmlType\":\"select\",\"dictType\":\"user_status\",\"dictOptions\":[{\"label\":\"启用\",\"value\":1},{\"label\":\"禁用\",\"value\":0}]},{\"columnName\":\"create_time\",\"columnLabel\":\"创建时间\",\"columnComment\":\"账号创建时间\",\"columnType\":\"datetime\",\"isPk\":\"0\",\"isIncrement\":\"0\",\"isRequired\":\"1\",\"javaType\":\"Date\",\"htmlType\":\"datetime\"}]},{\"tableName\":\"admin\",\"tableComment\":\"管理员账号表\",\"adminMenuName\":\"管理员资料\",\"operations\":{\"add\":true,\"edit\":true,\"remove\":true,\"removeType\":\"physical\",\"reason\":\"\"},\"columns\":[{\"columnName\":\"admin_id\",\"columnLabel\":\"管理员ID\",\"columnComment\":\"自增主键\",\"columnType\":\"bigint(20)\",\"isPk\":\"1\",\"isIncrement\":\"1\",\"isRequired\":\"1\",\"javaType\":\"Long\",\"htmlType\":\"input\"},{\"columnName\":\"username\",\"columnLabel\":\"用户名\",\"columnComment\":\"登录用户名\",\"columnType\":\"varchar(50)\",\"isPk\":\"0\",\"isIncrement\":\"0\",\"isRequired\":\"1\",\"javaType\":\"String\",\"htmlType\":\"input\"},{\"columnName\":\"password_hash\",\"columnLabel\":\"密码哈希\",\"columnComment\":\"加密后的密码\",\"columnType\":\"varchar(255)\",\"isPk\":\"0\",\"isIncrement\":\"0\",\"isRequired\":\"1\",\"javaType\":\"String\",\"htmlType\":\"input\"},{\"columnName\":\"nickname\",\"columnLabel\":\"昵称\",\"columnComment\":\"管理员显示名称\",\"columnType\":\"varchar(50)\",\"isPk\":\"0\",\"isIncrement\":\"0\",\"isRequired\":\"0\",\"javaType\":\"String\",\"htmlType\":\"input\"},{\"columnName\":\"status\",\"columnLabel\":\"状态\",\"columnComment\":\"账号状态1-启用 0-禁用\",\"columnType\":\"int(11)\",\"isPk\":\"0\",\"isIncrement\":\"0\",\"isRequired\":\"1\",\"javaType\":\"Integer\",\"htmlType\":\"select\",\"dictType\":\"admin_status\",\"dictOptions\":[{\"label\":\"启用\",\"value\":1},{\"label\":\"禁用\",\"value\":0}]},{\"columnName\":\"create_time\",\"columnLabel\":\"创建时间\",\"columnComment\":\"账号创建时间\",\"columnType\":\"datetime\",\"isPk\":\"0\",\"isIncrement\":\"0\",\"isRequired\":\"1\",\"javaType\":\"Date\",\"htmlType\":\"datetime\"}]},{\"tableName\":\"carousel\",\"tableComment\":\"轮播图表\",\"adminMenuName\":\"轮播图管理\",\"operations\":{\"add\":true,\"edit\":true,\"remove\":true,\"removeType\":\"physical\",\"reason\":\"\"},\"columns\":[{\"columnName\":\"id\",\"columnLabel\":\"ID\",\"columnComment\":\"主键ID\",\"columnType\":\"bigint(20)\",\"isPk\":\"1\",\"isIncrement\":\"1\",\"isRequired\":\"1\",\"javaType\":\"Long\",\"htmlType\":\"input\"},{\"columnName\":\"title\",\"columnLabel\":\"标题\",\"columnComment\":\"轮播图标题\",\"columnType\":\"varchar(200)\",\"isPk\":\"0\",\"isIncrement\":\"0\",\"isRequired\":\"0\",\"javaType\":\"String\",\"htmlType\":\"input\"},{\"columnName\":\"image_url\",\"columnLabel\":\"图片地址\",\"columnComment\":\"轮播图片URL\",\"columnType\":\"varchar(500)\",\"isPk\":\"0\",\"isIncrement\":\"0\",\"isRequired\":\"1\",\"javaType\":\"String\",\"htmlType\":\"imageUpload\"},{\"columnName\":\"link_url\",\"columnLabel\":\"链接地址\",\"columnComment\":\"点击跳转链接\",\"columnType\":\"varchar(500)\",\"isPk\":\"0\",\"isIncrement\":\"0\",\"isRequired\":\"0\",\"javaType\":\"String\",\"htmlType\":\"input\"},{\"columnName\":\"sort_order\",\"columnLabel\":\"排序\",\"columnComment\":\"显示顺序\",\"columnType\":\"int(11)\",\"isPk\":\"0\",\"isIncrement\":\"0\",\"isRequired\":\"0\",\"javaType\":\"Integer\",\"htmlType\":\"input\"},{\"columnName\":\"status\",\"columnLabel\":\"状态\",\"columnComment\":\"启用状态1-启用 0-禁用\",\"columnType\":\"int(11)\",\"isPk\":\"0\",\"isIncrement\":\"0\",\"isRequired\":\"1\",\"javaType\":\"Integer\",\"htmlType\":\"select\",\"dictType\":\"carousel_status\",\"dictOptions\":[{\"label\":\"启用\",\"value\":1},{\"label\":\"禁用\",\"value\":0}]},{\"columnName\":\"create_time\",\"columnLabel\":\"创建时间\",\"columnComment\":\"记录创建时间\",\"columnType\":\"datetime\",\"isPk\":\"0\",\"isIncrement\":\"0\",\"isRequired\":\"1\",\"javaType\":\"Date\",\"htmlType\":\"datetime\"},{\"columnName\":\"update_time\",\"columnLabel\":\"更新时间\",\"columnComment\":\"记录更新时间\",\"columnType\":\"datetime\",\"isPk\":\"0\",\"isIncrement\":\"0\",\"isRequired\":\"0\",\"javaType\":\"Date\",\"htmlType\":\"datetime\"}]},{\"tableName\":\"announcement\",\"tableComment\":\"公告表\",\"adminMenuName\":\"公告管理\",\"operations\":{\"add\":true,\"edit\":true,\"remove\":true,\"removeType\":\"physical\",\"reason\":\"\"},\"columns\":[{\"columnName\":\"id\",\"columnLabel\":\"ID\",\"columnComment\":\"主键ID\",\"columnType\":\"bigint(20)\",\"isPk\":\"1\",\"isIncrement\":\"1\",\"isRequired\":\"1\",\"javaType\":\"Long\",\"htmlType\":\"input\"},{\"columnName\":\"title\",\"columnLabel\":\"标题\",\"columnComment\":\"公告标题\",\"columnType\":\"varchar(200)\",\"isPk\":\"0\",\"isIncrement\":\"0\",\"isRequired\":\"1\",\"javaType\":\"String\",\"htmlType\":\"input\"},{\"columnName\":\"content\",\"columnLabel\":\"内容\",\"columnComment\":\"公告详细内容\",\"columnType\":\"text\",\"isPk\":\"0\",\"isIncrement\":\"0\",\"isRequired\":\"1\",\"javaType\":\"String\",\"htmlType\":\"editor\"},{\"columnName\":\"publish_time\",\"columnLabel\":\"发布时间\",\"columnComment\":\"公告正式发布时间\",\"columnType\":\"datetime\",\"isPk\":\"0\",\"isIncrement\":\"0\",\"isRequired\":\"0\",\"javaType\":\"Date\",\"htmlType\":\"datetime\"},{\"columnName\":\"status\",\"columnLabel\":\"状态\",\"columnComment\":\"发布状态draft-草稿 published-已发布\",\"columnType\":\"varchar(20)\",\"isPk\":\"0\",\"isIncrement\":\"0\",\"isRequired\":\"1\",\"javaType\":\"String\",\"htmlType\":\"select\",\"dictType\":\"announcement_status\",\"dictOptions\":[{\"label\":\"草稿\",\"value\":\"draft\"},{\"label\":\"已发布\",\"value\":\"published\"}]},{\"columnName\":\"create_time\",\"columnLabel\":\"创建时间\",\"columnComment\":\"记录创建时间\",\"columnType\":\"datetime\",\"isPk\":\"0\",\"isIncrement\":\"0\",\"isRequired\":\"1\",\"javaType\":\"Date\",\"htmlType\":\"datetime\"},{\"columnName\":\"update_time\",\"columnLabel\":\"更新时间\",\"columnComment\":\"记录更新时间\",\"columnType\":\"datetime\",\"isPk\":\"0\",\"isIncrement\":\"0\",\"isRequired\":\"0\",\"javaType\":\"Date\",\"htmlType\":\"datetime\"}]},{\"tableName\":\"news\",\"tableComment\":\"新闻表\",\"adminMenuName\":\"新闻管理\",\"operations\":{\"add\":true,\"edit\":true,\"remove\":true,\"removeType\":\"physical\",\"reason\":\"\"},\"columns\":[{\"columnName\":\"id\",\"columnLabel\":\"ID\",\"columnComment\":\"主键ID\",\"columnType\":\"bigint(20)\",\"isPk\":\"1\",\"isIncrement\":\"1\",\"isRequired\":\"1\",\"javaType\":\"Long\",\"htmlType\":\"input\"},{\"columnName\":\"title\",\"columnLabel\":\"标题\",\"columnComment\":\"新闻标题\",\"columnType\":\"varchar(200)\",\"isPk\":\"0\",\"isIncrement\":\"0\",\"isRequired\":\"1\",\"javaType\":\"String\",\"htmlType\":\"input\"},{\"columnName\":\"summary\",\"columnLabel\":\"摘要\",\"columnComment\":\"新闻摘要\",\"columnType\":\"varchar(500)\",\"isPk\":\"0\",\"isIncrement\":\"0\",\"isRequired\":\"0\",\"javaType\":\"String\",\"htmlType\":\"textarea\"},{\"columnName\":\"content\",\"columnLabel\":\"内容\",\"columnComment\":\"新闻详细内容\",\"columnType\":\"text\",\"isPk\":\"0\",\"isIncrement\":\"0\",\"isRequired\":\"1\",\"javaType\":\"String\",\"htmlType\":\"editor\"},{\"columnName\":\"author\",\"columnLabel\":\"作者\",\"columnComment\":\"新闻作者\",\"columnType\":\"varchar(100)\",\"isPk\":\"0\",\"isIncrement\":\"0\",\"isRequired\":\"0\",\"javaType\":\"String\",\"htmlType\":\"input\"},{\"columnName\":\"publish_time\",\"columnLabel\":\"发布时间\",\"columnComment\":\"新闻正式发布时间\",\"columnType\":\"datetime\",\"isPk\":\"0\",\"isIncrement\":\"0\",\"isRequired\":\"0\",\"javaType\":\"Date\",\"htmlType\":\"datetime\"},{\"columnName\":\"status\",\"columnLabel\":\"状态\",\"columnComment\":\"发布状态draft-草稿 published-已发布\",\"columnType\":\"varchar(20)\",\"isPk\":\"0\",\"isIncrement\":\"0\",\"isRequired\":\"1\",\"javaType\":\"String\",\"htmlType\":\"select\",\"dictType\":\"news_status\",\"dictOptions\":[{\"label\":\"草稿\",\"value\":\"draft\"},{\"label\":\"已发布\",\"value\":\"published\"}]},{\"columnName\":\"create_time\",\"columnLabel\":\"创建时间\",\"columnComment\":\"记录创建时间\",\"columnType\":\"datetime\",\"isPk\":\"0\",\"isIncrement\":\"0\",\"isRequired\":\"1\",\"javaType\":\"Date\",\"htmlType\":\"datetime\"},{\"columnName\":\"update_time\",\"columnLabel\":\"更新时间\",\"columnComment\":\"记录更新时间\",\"columnType\":\"datetime\",\"isPk\":\"0\",\"isIncrement\":\"0\",\"isRequired\":\"0\",\"javaType\":\"Date\",\"htmlType\":\"datetime\"}]}]}', '1', NULL, 89721, '2026-07-15 08:54:21');
INSERT INTO `factory_ai_stage_output` VALUES (136, 114, 110, 100, 'app_blueprint', '{\"projectName\":\"图书管理系统\",\"projectDescription\":\"功能:借书、还书、预约、取消预约\\n角色用户、管理员\\n其他模块轮播图、公告、新闻\",\"industryTemplate\":\"\",\"stylePreset\":\"campus-orange\",\"extraRequirements\":\"\"}', '{\n \"roles\": [\n {\n \"code\": \"admin\",\n \"name\": \"系统管理员\",\n \"description\": \"系统管理员,拥有所有后台管理权限\"\n },\n {\n \"code\": \"reader\",\n \"name\": \"读者\",\n \"description\": \"普通读者,可浏览图书、借书、还书、预约\"\n }\n ],\n \"frontendMenus\": [\n {\n \"code\": \"book_catalog\",\n \"name\": \"图书目录\",\n \"path\": \"/books\",\n \"pageCode\": \"book_catalog_page\",\n \"requiresLogin\": false,\n \"visibleRoles\": [],\n \"dataScope\": \"PUBLIC\"\n },\n {\n \"code\": \"my_borrowings\",\n \"name\": \"我的借阅\",\n \"path\": \"/my-borrowings\",\n \"pageCode\": \"my_borrowings_page\",\n \"requiresLogin\": true,\n \"visibleRoles\": [\"reader\"],\n \"dataScope\": \"CURRENT_USER\"\n },\n {\n \"code\": \"my_reservations\",\n \"name\": \"我的预约\",\n \"path\": \"/my-reservations\",\n \"pageCode\": \"my_reservations_page\",\n \"requiresLogin\": true,\n \"visibleRoles\": [\"reader\"],\n \"dataScope\": \"CURRENT_USER\"\n },\n {\n \"code\": \"reader_profile\",\n \"name\": \"个人中心\",\n \"path\": \"/reader/profile\",\n \"pageCode\": \"reader_profile_page\",\n \"requiresLogin\": true,\n \"visibleRoles\": [\"reader\"],\n \"dataScope\": \"CURRENT_USER\"\n }\n ],\n \"frontendPages\": [\n {\n \"code\": \"book_catalog_page\",\n \"name\": \"图书目录\",\n \"menuCode\": \"book_catalog\",\n \"path\": \"/books\",\n \"pageType\": \"list\",\n \"tableName\": \"book_info\"\n },\n {\n \"code\": \"book_detail_page\",\n \"name\": \"图书详情\",\n \"menuCode\": null,\n \"path\": \"/books/:id\",\n \"pageType\": \"detail\",\n \"tableName\": \"book_info\"\n },\n {\n \"code\": \"my_borrowings_page\",\n \"name\": \"我的借阅\",\n \"menuCode\": \"my_borrowings\",\n \"path\": \"/my-borrowings\",\n \"pageType\": \"list\",\n \"tableName\": \"borrowing\"\n },\n {\n \"code\": \"my_reservations_page\",\n \"name\": \"我的预约\",\n \"menuCode\": \"my_reservations\",\n \"path\": \"/my-reservations\",\n \"pageType\": \"list\",\n \"tableName\": \"reservation\"\n },\n {\n \"code\": \"reader_profile_page\",\n \"name\": \"个人资料\",\n \"menuCode\": \"reader_profile\",\n \"path\": \"/reader/profile\",\n \"pageType\": \"form\",\n \"tableName\": \"reader\"\n }\n ],\n \"adminMenus\": [\n {\n \"code\": \"book_admin\",\n \"name\": \"图书管理\",\n \"path\": \"/admin/books\",\n \"pageCode\": \"book_admin_page\",\n \"tableName\": \"book_info\",\n \"pageType\": \"list\",\n \"requiresLogin\": true,\n \"visibleRoles\": [\"admin\"],\n \"dataScope\": \"ROLE\"\n },\n {\n \"code\": \"borrowing_admin\",\n \"name\": \"借阅管理\",\n \"path\": \"/admin/borrowings\",\n \"pageCode\": \"borrowing_admin_page\",\n \"tableName\": \"borrowing\",\n \"pageType\": \"list\",\n \"requiresLogin\": true,\n \"visibleRoles\": [\"admin\"],\n \"dataScope\": \"ROLE\"\n },\n {\n \"code\": \"reservation_admin\",\n \"name\": \"预约管理\",\n \"path\": \"/admin/reservations\",\n \"pageCode\": \"reservation_admin_page\",\n \"tableName\": \"reservation\",\n \"pageType\": \"list\",\n \"requiresLogin\": true,\n \"visibleRoles\": [\"admin\"],\n \"dataScope\": \"ROLE\"\n },\n {\n \"code\": \"carousel_admin\",\n \"name\": \"轮播图管理\",\n \"path\": \"/admin/carousels\",\n \"pageCode\": \"carousel_admin_page\",\n \"tableName\": \"carousel\",\n \"pageType\": \"list\",\n \"requiresLogin\": true,\n \"visibleRoles\": [\"admin\"],\n \"dataScope\": \"ROLE\"\n },\n {\n \"code\": \"announcement_admin\",\n \"name\": \"公告管理\",\n \"path\": \"/admin/announcements\",\n \"pageCode\": \"announcement_admin_page\",\n \"tableName\": \"announcement\",\n \"pageType\": \"list\",\n \"requiresLogin\": true,\n \"visibleRoles\": [\"admin\"],\n \"dataScope\": \"ROLE\"\n },\n {\n \"code\": \"news_admin\",\n \"name\": \"新闻管理\",\n \"path\": \"/admin/news\",\n \"pageCode\": \"news_admin_page\",\n \"tableName\": \"news\",\n \"pageType\": \"list\",\n \"requiresLogin\": true,\n \"visibleRoles\": [\"admin\"],\n \"dataScope\": \"ROLE\"\n },\n {\n \"code\": \"reader_admin\",\n \"name\": \"读者管理\",\n \"path\": \"/admin/readers\",\n \"pageCode\": \"reader_admin_page\",\n \"tableName\": \"reader\",\n \"pageType\": \"list\",\n \"requiresLogin\": true,\n \"visibleRoles\": [\"admin\"],\n \"dataScope\": \"ROLE\"\n },\n {\n \"code\": \"admin_profile\",\n \"name\": \"个人资料\",\n \"path\": \"/admin/profile\",\n \"pageCode\": \"admin_profile_page\",\n \"tableName\": \"admin\",\n \"pageType\": \"form\",\n \"requiresLogin\": true,\n \"visibleRoles\": [\"admin\"],\n \"dataScope\": \"CURRENT_USER\"\n }\n ],\n \"adminHomeDashboard\": {\n \"title\": \"运营总览\",\n \"description\": \"核心业务数据\",\n \"metrics\": [\n {\n \"label\": \"图书总量\",\n \"value\": 0,\n \"semantic\": \"inventory\",\n \"tableName\": \"book_info\",\n \"field\": \"count\"\n },\n {\n \"label\": \"借阅总量\",\n \"value\": 0,\n \"semantic\": \"order\",\n \"tableName\": \"borrowing\",\n \"field\": \"count\"\n },\n {\n \"label\": \"预约总量\",\n \"value\": 0,\n \"semantic\": \"task\",\n \"tableName\": \"reservation\",\n \"field\": \"count\"\n },\n {\n \"label\": \"读者总量\",\n \"value\": 0,\n \"semantic\": \"user\",\n \"tableName\": \"reader\",\n \"field\": \"count\"\n }\n ],\n \"charts\": [\n {\n \"type\": \"line\",\n \"title\": \"借阅趋势\",\n \"metric\": \"count\",\n \"dimension\": \"date\",\n \"tableName\": \"borrowing\"\n },\n {\n \"type\": \"pie\",\n \"title\": \"图书分类分布\",\n \"metric\": \"count\",\n \"dimension\": \"category\",\n \"tableName\": \"book_info\"\n }\n ]\n }\n}', '1', NULL, 31067, '2026-07-15 09:26:20');
INSERT INTO `factory_ai_stage_output` VALUES (137, 114, 110, 100, 'flow_config', '{\"mode\":\"generate\",\"projectName\":\"图书管理系统\",\"projectDescription\":\"功能:借书、还书、预约、取消预约\\n角色用户、管理员\\n其他模块轮播图、公告、新闻\",\"industryTemplate\":\"\",\"stylePreset\":\"campus-orange\",\"extraRequirements\":\"\",\"confirmedAppBlueprint\":{\"adminHomeDashboard\":{\"charts\":[{\"dimension\":{\"field\":\"date\"},\"filters\":[],\"metrics\":[{\"aggregate\":\"count\",\"label\":\"借阅趋势\"}],\"tableName\":\"borrowing\",\"title\":\"借阅趋势\",\"type\":\"line\"},{\"dimension\":{\"field\":\"category\"},\"filters\":[],\"metrics\":[{\"aggregate\":\"count\",\"label\":\"图书分类分布\"}],\"tableName\":\"book_info\",\"title\":\"图书分类分布\",\"type\":\"pie\"}],\"description\":\"核心业务数据\",\"metrics\":[{\"aggregate\":\"count\",\"field\":\"count\",\"filters\":[],\"semantic\":\"inventory\",\"tableName\":\"book_info\"},{\"aggregate\":\"count\",\"field\":\"count\",\"filters\":[],\"semantic\":\"order\",\"tableName\":\"borrowing\"},{\"aggregate\":\"count\",\"field\":\"count\",\"filters\":[],\"semantic\":\"task\",\"tableName\":\"reservation\"},{\"aggregate\":\"count\",\"field\":\"count\",\"filters\":[],\"semantic\":\"user\",\"tableName\":\"reader\"}],\"title\":\"运营总览\"},\"adminMenus\":[{\"code\":\"book_admin\",\"dataScope\":\"ROLE\",\"name\":\"图书管理\",\"pageCode\":\"book_admin_page\",\"pageType\":\"list\",\"path\":\"/admin/books\",\"requiresLogin\":true,\"tableName\":\"book_info\",\"visibleRoles\":[\"admin\"]},{\"code\":\"borrowing_admin\",\"dataScope\":\"ROLE\",\"name\":\"借阅管理\",\"pageCode\":\"borrowing_admin_page\",\"pageType\":\"list\",\"path\":\"/admin/borrowings\",\"requiresLogin\":true,\"tableName\":\"borrowing\",\"visibleRoles\":[\"admin\"]},{\"code\":\"reservation_admin\",\"dataScope\":\"ROLE\",\"name\":\"预约管理\",\"pageCode\":\"reservation_admin_page\",\"pageType\":\"list\",\"path\":\"/admin/reservations\",\"requiresLogin\":true,\"tableName\":\"reservation\",\"visibleRoles\":[\"admin\"]},{\"code\":\"carousel_admin\",\"dataScope\":\"ROLE\",\"name\":\"轮播图管理\",\"pageCode\":\"carousel_admin_page\",\"pageType\":\"list\",\"path\":\"/admin/carousels\",\"requiresLogin\":true,\"tableName\":\"carousel\",\"visibleRoles\":[\"admin\"]},{\"code\":\"announcement_admin\",\"dataScope\":\"ROLE\",\"name\":\"公告管理\",\"pageCode\":\"announcement_admin_page\",\"pageType\":\"list\",\"path\":\"/admin/announcements\",\"requiresLogin\":true,\"tableName\":\"announcement\",\"visibleRoles\":[\"admin\"]},{\"code\":\"news_admin\",\"dataScope\":\"ROLE\",\"name\":\"新闻管理\",\"pageCode\":\"news_admin_page\",\"pageType\":\"list\",\"path\":\"/admin/news\",\"requiresLogin\":true,\"tableName\":\"news\",\"visibleRoles\":[\"admin\"]},{\"code\":\"reader_admin\",\"dataScope\":\"ROLE\",\"name\":\"读者管理\",\"pageCode\":\"reader_admin_page\",\"pageType\":\"list\",\"path\":\"/admin/readers\",\"requiresLogin\":true,\"tableName\":\"reader\",\"visibleRoles\":[\"admin\"]},{\"code\":\"admin_profile\",\"dataScope\":\"CURRENT_USER\",\"name\":\"个人资料\",\"pageCode\":\"admin_profile_page\",\"pageType\":\"form\",\"path\":\"/admin/profile\",\"requiresLogin\":true,\"tableName\":\"admin\",\"visibleRoles\":[\"admin\"]}],\"frontendMenus\":[{\"code\":\"book_catalog\",\"dataScope\":\"PUBLIC\",\"name\":\"图书目录\",\"pageCode\":\"book_catalog_page\",\"pageType\":\"\",\"path\":\"/books\",\"requiresLogin\":false,\"tableName\":\"\",\"visibleRoles\":[]},{\"code\":\"my_borrowings\",\"dataScope\":\"CURRENT_USER\",\"name\":\"我的借阅\",\"pageCode\":\"my_borrowings_page\",\"pageType\":\"\",\"path\":\"/my-borrowings\",\"requiresLogin\":true,\"tableName\":\"\",\"visibleRoles\":[\"reader\"]},{\"code\":\"my_reservations\",\"dataScope\":\"CURRENT_USER\",\"name\":\"我的预约\",\"pageCode\":\"my_reservations_page\",\"pageType\":\"\",\"path\":\"/my-reservations\",\"requiresLogin\":true,\"tableName\":\"\",\"visibleRoles\":[\"reader\"]},{\"code\":\"reader_profile\",\"dataScope\":\"CURRENT_USER\",\"name\":\"个人中心\",\"pageCode\":\"reader_profile_page\",\"pageType\":\"\",\"path\":\"/reader/profile\",\"requiresLogin\":true,\"tableName\":\"\",\"visibleRoles\":[\"reader\"]}],\"frontendPages\":[{\"code\":\"book_catalog_page\",\"menuCode\":\"book_catalog\",\"name\":\"图书目录\",\"pageType\":\"list\",\"parentPageCode\":\"\",\"path\":\"/books\",\"tableName\":\"book_info\"},{\"code\":\"book_detail_page\",\"menuCode\":\"\",\"name\":\"图书详情\",\"pageType\":\"detail\",\"parentPageCode\":\"\",\"path\":\"/books/:id\",\"tableName\":\"book_info\"},{\"code\":\"my_borrowings_page\",\"menuCode\":\"my_borrowings\",\"name\":\"我的借阅\",\"pageType\":\"list\",\"parentPageCode\":\"\",\"path\":\"/my-borrowings\",\"tableName\":\"borrowing\"},{\"code\":\"my_reservations_page\",\"menuCode\":\"my_reservations\",\"name\":\"我的预约\",\"pageType\":\"list\",\"parentPageCode\":\"\",\"path\":\"/my-reservations\",\"tableName\":\"reservation\"},{\"code\":\"reader_profile_page\",\"menuCode\":\"reader_profile\",\"name\":\"个人资料\",\"pageType\":\"form\",\"parentPageCode\":\"\",\"path\":\"/reader/profile\",\"tableName\":\"reader\"}],\"roles\":[{\"code\":\"admin\",\"description\":\"系统管理员,拥有所有后台管理权限\",\"name\":\"系统管理员\"},{\"code\":\"reader\",\"description\":\"普通读者,可浏览图书、借书、还书、预约\",\"name\":\"读者\"}]}}', '{\n \"version\": \"1.0\",\n \"code\": \"reservation_management\",\n \"name\": \"预约管理\",\n \"mainTable\": \"reservation\",\n \"statusField\": \"status\",\n \"notFoundMessage\": \"预约记录不存在\",\n \"states\": [\n {\"code\": \"pending\", \"label\": \"待处理\"},\n {\"code\": \"cancelled\", \"label\": \"已取消\"},\n {\"code\": \"fulfilled\", \"label\": \"已借出\"}\n ],\n \"actions\": [\n {\n \"code\": \"cancel_reservation\",\n \"name\": \"取消预约\",\n \"from\": \"pending\",\n \"to\": \"cancelled\",\n \"actor\": \"reader\",\n \"method\": \"POST\",\n \"path\": \"/reservation/cancel\",\n \"invalidStateMessage\": \"当前状态不可取消预约\",\n \"successMessage\": \"预约已取消\",\n \"button\": {\n \"scope\": \"reader\",\n \"pageCode\": \"my_reservations_page\",\n \"slot\": \"list.rowActions\",\n \"type\": \"danger\",\n \"confirm\": \"确认取消该预约吗?\",\n \"order\": 10\n }\n },\n {\n \"code\": \"admin_cancel_reservation\",\n \"name\": \"取消预约\",\n \"from\": \"pending\",\n \"to\": \"cancelled\",\n \"actor\": \"admin\",\n \"method\": \"POST\",\n \"path\": \"/reservation/admin-cancel\",\n \"invalidStateMessage\": \"当前状态不可取消预约\",\n \"successMessage\": \"预约已取消\",\n \"audit\": {\"userField\": \"cancel_user_id\", \"timeField\": \"cancel_time\"},\n \"button\": {\n \"scope\": \"admin\",\n \"pageCode\": \"reservation_admin_page\",\n \"slot\": \"list.rowActions\",\n \"type\": \"danger\",\n \"confirm\": \"确认取消该预约吗?\",\n \"order\": 10\n }\n },\n {\n \"code\": \"fulfill_reservation\",\n \"name\": \"确认借出\",\n \"from\": \"pending\",\n \"to\": \"fulfilled\",\n \"actor\": \"admin\",\n \"method\": \"POST\",\n \"path\": \"/reservation/fulfill\",\n \"invalidStateMessage\": \"当前状态不可确认借出\",\n \"successMessage\": \"借出成功\",\n \"audit\": {\"userField\": \"fulfill_user_id\", \"timeField\": \"fulfill_time\"},\n \"effects\": [\n {\n \"type\": \"create_record\",\n \"table\": \"borrowing\",\n \"values\": {\n \"book_id\": \"record.book_id\",\n \"reader_id\": \"record.reader_id\",\n \"status\": \"\'borrowing\'\",\n \"borrow_date\": \"now\",\n \"due_date\": \"now + 30\"\n }\n },\n {\n \"type\": \"decrease\",\n \"table\": \"book_info\",\n \"relationField\": \"book_id\",\n \"field\": \"stock\",\n \"amount\": \"1\",\n \"min\": \"0\",\n \"notFoundMessage\": \"图书不存在\",\n \"errorMessage\": \"图书库存不足\"\n }\n ],\n \"button\": {\n \"scope\": \"admin\",\n \"pageCode\": \"reservation_admin_page\",\n \"slot\": \"list.rowActions\",\n \"type\": \"primary\",\n \"confirm\": \"确认借出此预约的图书?\",\n \"order\": 20\n }\n }\n ],\n \"metrics\": [\n {\"code\": \"pending_count\", \"name\": \"待处理预约数\", \"table\": \"reservation\", \"aggregate\": \"count\", \"field\": \"id\", \"status\": \"pending\", \"unit\": \"条\"},\n {\"code\": \"cancelled_count\", \"name\": \"已取消预约数\", \"table\": \"reservation\", \"aggregate\": \"count\", \"field\": \"id\", \"status\": \"cancelled\", \"unit\": \"条\"},\n {\"code\": \"fulfilled_count\", \"name\": \"已借出预约数\", \"table\": \"reservation\", \"aggregate\": \"count\", \"field\": \"id\", \"status\": \"fulfilled\", \"unit\": \"条\"},\n {\"code\": \"total_reservations\", \"name\": \"预约总数\", \"table\": \"reservation\", \"aggregate\": \"count\", \"field\": \"id\", \"unit\": \"条\"}\n ]\n}', '1', NULL, 38175, '2026-07-15 09:26:58');
INSERT INTO `factory_ai_stage_output` VALUES (138, 114, 110, 100, 'database', '{\"mode\":\"generate\",\"projectName\":\"图书管理系统\",\"projectDescription\":\"功能:借书、还书、预约、取消预约\\n角色用户、管理员\\n其他模块轮播图、公告、新闻\",\"industryTemplate\":\"\",\"stylePreset\":\"campus-orange\",\"extraRequirements\":\"\",\"confirmedAppBlueprint\":{\"adminHomeDashboard\":{\"charts\":[{\"dimension\":{\"field\":\"date\"},\"filters\":[],\"metrics\":[{\"aggregate\":\"count\",\"label\":\"借阅趋势\"}],\"tableName\":\"borrowing\",\"title\":\"借阅趋势\",\"type\":\"line\"},{\"dimension\":{\"field\":\"category\"},\"filters\":[],\"metrics\":[{\"aggregate\":\"count\",\"label\":\"图书分类分布\"}],\"tableName\":\"book_info\",\"title\":\"图书分类分布\",\"type\":\"pie\"}],\"description\":\"核心业务数据\",\"metrics\":[{\"aggregate\":\"count\",\"field\":\"count\",\"filters\":[],\"semantic\":\"inventory\",\"tableName\":\"book_info\"},{\"aggregate\":\"count\",\"field\":\"count\",\"filters\":[],\"semantic\":\"order\",\"tableName\":\"borrowing\"},{\"aggregate\":\"count\",\"field\":\"count\",\"filters\":[],\"semantic\":\"task\",\"tableName\":\"reservation\"},{\"aggregate\":\"count\",\"field\":\"count\",\"filters\":[],\"semantic\":\"user\",\"tableName\":\"reader\"}],\"title\":\"运营总览\"},\"adminMenus\":[{\"code\":\"book_admin\",\"dataScope\":\"ROLE\",\"name\":\"图书管理\",\"pageCode\":\"book_admin_page\",\"pageType\":\"list\",\"path\":\"/admin/books\",\"requiresLogin\":true,\"tableName\":\"book_info\",\"visibleRoles\":[\"admin\"]},{\"code\":\"borrowing_admin\",\"dataScope\":\"ROLE\",\"name\":\"借阅管理\",\"pageCode\":\"borrowing_admin_page\",\"pageType\":\"list\",\"path\":\"/admin/borrowings\",\"requiresLogin\":true,\"tableName\":\"borrowing\",\"visibleRoles\":[\"admin\"]},{\"code\":\"reservation_admin\",\"dataScope\":\"ROLE\",\"name\":\"预约管理\",\"pageCode\":\"reservation_admin_page\",\"pageType\":\"list\",\"path\":\"/admin/reservations\",\"requiresLogin\":true,\"tableName\":\"reservation\",\"visibleRoles\":[\"admin\"]},{\"code\":\"carousel_admin\",\"dataScope\":\"ROLE\",\"name\":\"轮播图管理\",\"pageCode\":\"carousel_admin_page\",\"pageType\":\"list\",\"path\":\"/admin/carousels\",\"requiresLogin\":true,\"tableName\":\"carousel\",\"visibleRoles\":[\"admin\"]},{\"code\":\"announcement_admin\",\"dataScope\":\"ROLE\",\"name\":\"公告管理\",\"pageCode\":\"announcement_admin_page\",\"pageType\":\"list\",\"path\":\"/admin/announcements\",\"requiresLogin\":true,\"tableName\":\"announcement\",\"visibleRoles\":[\"admin\"]},{\"code\":\"news_admin\",\"dataScope\":\"ROLE\",\"name\":\"新闻管理\",\"pageCode\":\"news_admin_page\",\"pageType\":\"list\",\"path\":\"/admin/news\",\"requiresLogin\":true,\"tableName\":\"news\",\"visibleRoles\":[\"admin\"]},{\"code\":\"reader_admin\",\"dataScope\":\"ROLE\",\"name\":\"读者管理\",\"pageCode\":\"reader_admin_page\",\"pageType\":\"list\",\"path\":\"/admin/readers\",\"requiresLogin\":true,\"tableName\":\"reader\",\"visibleRoles\":[\"admin\"]},{\"code\":\"admin_profile\",\"dataScope\":\"CURRENT_USER\",\"name\":\"个人资料\",\"pageCode\":\"admin_profile_page\",\"pageType\":\"form\",\"path\":\"/admin/profile\",\"requiresLogin\":true,\"tableName\":\"admin\",\"visibleRoles\":[\"admin\"]}],\"frontendMenus\":[{\"code\":\"book_catalog\",\"dataScope\":\"PUBLIC\",\"name\":\"图书目录\",\"pageCode\":\"book_catalog_page\",\"pageType\":\"\",\"path\":\"/books\",\"requiresLogin\":false,\"tableName\":\"\",\"visibleRoles\":[]},{\"code\":\"my_borrowings\",\"dataScope\":\"CURRENT_USER\",\"name\":\"我的借阅\",\"pageCode\":\"my_borrowings_page\",\"pageType\":\"\",\"path\":\"/my-borrowings\",\"requiresLogin\":true,\"tableName\":\"\",\"visibleRoles\":[\"reader\"]},{\"code\":\"my_reservations\",\"dataScope\":\"CURRENT_USER\",\"name\":\"我的预约\",\"pageCode\":\"my_reservations_page\",\"pageType\":\"\",\"path\":\"/my-reservations\",\"requiresLogin\":true,\"tableName\":\"\",\"visibleRoles\":[\"reader\"]},{\"code\":\"reader_profile\",\"dataScope\":\"CURRENT_USER\",\"name\":\"个人中心\",\"pageCode\":\"reader_profile_page\",\"pageType\":\"\",\"path\":\"/reader/profile\",\"requiresLogin\":true,\"tableName\":\"\",\"visibleRoles\":[\"reader\"]}],\"frontendPages\":[{\"code\":\"book_catalog_page\",\"menuCode\":\"book_catalog\",\"name\":\"图书目录\",\"pageType\":\"list\",\"parentPageCode\":\"\",\"path\":\"/books\",\"tableName\":\"book_info\"},{\"code\":\"book_detail_page\",\"menuCode\":\"\",\"name\":\"图书详情\",\"pageType\":\"detail\",\"parentPageCode\":\"\",\"path\":\"/books/:id\",\"tableName\":\"book_info\"},{\"code\":\"my_borrowings_page\",\"menuCode\":\"my_borrowings\",\"name\":\"我的借阅\",\"pageType\":\"list\",\"parentPageCode\":\"\",\"path\":\"/my-borrowings\",\"tableName\":\"borrowing\"},{\"code\":\"my_reservations_page\",\"menuCode\":\"my_reservations\",\"name\":\"我的预约\",\"pageType\":\"list\",\"parentPageCode\":\"\",\"path\":\"/my-reservations\",\"tableName\":\"reservation\"},{\"code\":\"reader_profile_page\",\"menuCode\":\"reader_profile\",\"name\":\"个人资料\",\"pageType\":\"form\",\"parentPageCode\":\"\",\"path\":\"/reader/profile\",\"tableName\":\"reader\"}],\"roles\":[{\"code\":\"admin\",\"description\":\"系统管理员,拥有所有后台管理权限\",\"name\":\"系统管理员\"},{\"code\":\"reader\",\"description\":\"普通读者,可浏览图书、借书、还书、预约\",\"name\":\"读者\"}]},\"flowConfig\":{\"actions\":[{\"actor\":\"reader\",\"button\":{\"confirm\":\"确认取消该预约吗?\",\"order\":10,\"pageCode\":\"my_reservations_page\",\"scope\":\"reader\",\"slot\":\"list.rowActions\",\"type\":\"danger\"},\"code\":\"cancel_reservation\",\"effects\":[],\"from\":\"pending\",\"invalidStateMessage\":\"当前状态不可取消预约\",\"method\":\"POST\",\"name\":\"取消预约\",\"path\":\"/reservation/cancel\",\"requestFields\":[],\"successMessage\":\"预约已取消\",\"to\":\"cancelled\"},{\"actor\":\"admin\",\"audit\":{\"timeField\":\"cancel_time\",\"userField\":\"cancel_user_id\"},\"button\":{\"confirm\":\"确认取消该预约吗?\",\"order\":10,\"pageCode\":\"reservation_admin_page\",\"scope\":\"admin\",\"slot\":\"list.rowActions\",\"type\":\"danger\"},\"code\":\"admin_cancel_reservation\",\"effects\":[],\"from\":\"pending\",\"invalidStateMessage\":\"当前状态不可取消预约\",\"method\":\"POST\",\"name\":\"取消预约\",\"path\":\"/reservation/admin-cancel\",\"requestFields\":[],\"successMessage\":\"预约已取消\",\"to\":\"cancelled\"},{\"actor\":\"admin\",\"audit\":{\"timeField\":\"fulfill_time\",\"userField\":\"fulfill_user_id\"},\"button\":{\"confirm\":\"确认借出此预约的图书?\",\"order\":20,\"pageCode\":\"reservation_admin_page\",\"scope\":\"admin\",\"slot\":\"list.rowActions\",\"type\":\"primary\"},\"code\":\"fulfill_reservation\",\"effects\":[{\"amount\":\"1\",\"min\":\"0\",\"table\":\"borrowing\",\"type\":\"create_record\",\"values\":{\"reader_id\":\"record.reader_id\",\"due_date\":\"now + 30\",\"borrow_date\":\"now\",\"book_id\":\"record.book_id\",\"status\":\"\'borrowing\'\"}},{\"amount\":\"1\",\"errorMessage\":\"图书库存不足\",\"field\":\"stock\",\"min\":\"0\",\"notFoundMessage\":\"图书不存在\",\"relationField\":\"book_id\",\"table\":\"book_info\",\"type\":\"decrease\",\"values\":{}}],\"from\":\"pending\",\"invalidStateMessage\":\"当前状态不可确认借出\",\"method\":\"POST\",\"name\":\"确认借出\",\"path\":\"/reservation/fulfill\",\"requestFields\":[],\"successMessage\":\"借出成功\",\"to\":\"fulfilled\"}],\"code\":\"reservation_management\",\"mainTable\":\"reservation\",\"metrics\":[{\"aggregate\":\"count\",\"code\":\"pending_count\",\"field\":\"id\",\"name\":\"待处理预约数\",\"status\":\"pending\",\"table\":\"reservation\",\"unit\":\"条\"},{\"aggregate\":\"count\",\"code\":\"cancelled_count\",\"field\":\"id\",\"name\":\"已取消预约数\",\"status\":\"cancelled\",\"table\":\"reservation\",\"unit\":\"条\"},{\"aggregate\":\"count\",\"code\":\"fulfilled_count\",\"field\":\"id\",\"name\":\"已借出预约数\",\"status\":\"fulfilled\",\"table\":\"reservation\",\"unit\":\"条\"},{\"aggregate\":\"count\",\"code\":\"total_reservations\",\"field\":\"id\",\"name\":\"预约总数\",\"table\":\"reservation\",\"unit\":\"条\"}],\"name\":\"预约管理\",\"notFoundMessage\":\"预约记录不存在\",\"states\":[{\"code\":\"pending\",\"label\":\"待处理\"},{\"code\":\"cancelled\",\"label\":\"已取消\"},{\"code\":\"fulfilled\",\"label\":\"已借出\"}],\"statusField\":\"status\",\"version\":\"1.0\"},\"compiledFlowContract\":{\"acceptanceScenarios\":[],\"actions\":[{\"actor\":\"reader\",\"code\":\"cancel_reservation\",\"name\":\"取消预约\",\"ownerObject\":\"reservation\",\"ownerTable\":\"reservation\",\"preconditions\":[],\"quantityEffects\":[],\"recordEffects\":[],\"required\":true,\"stateTransitions\":[{\"actionCode\":\"cancel_reservation\",\"fromState\":\"pending\",\"toState\":\"cancelled\"}]},{\"actor\":\"admin\",\"code\":\"admin_cancel_reservation\",\"name\":\"取消预约\",\"ownerObject\":\"reservation\",\"ownerTable\":\"reservation\",\"preconditions\":[],\"quantityEffects\":[],\"recordEffects\":[],\"required\":true,\"stateTransitions\":[{\"actionCode\":\"admin_cancel_reservation\",\"fromState\":\"pending\",\"toState\":\"cancelled\"}]},{\"actor\":\"admin\",\"code\":\"fulfill_reservation\",\"name\":\"确认借出\",\"ownerObject\":\"reservation\",\"ownerTable\":\"reservation\",\"preconditions\":[],\"quantityEffects\":[{\"actionCode\":\"fulfill_reservation\",\"amount\":\"1\",\"effectType\":\"decrease\",\"objectCode\":\"book_info\",\"quantityField\":\"stock\",\"tableName\":\"book_info\"}],\"recordEffects\":[{\"actionCode\":\"fulfill_reservation\",\"objectCode\":\"borrowing\",\"operation\":\"INSERT_ROW\",\"tableName\":\"borrowing\"}],\"required\":true,\"stateTransitions\":[{\"actionCode\":\"fulfill_reservation\",\"fromState\":\"pending\",\"toState\":\"fulfilled\"}]}],\"businessPolicies\":[],\"coreObjects\":[{\"code\":\"reservation\",\"name\":\"预约管理\",\"objectType\":\"main\",\"tableName\":\"reservation\"},{\"code\":\"borrowing\",\"name\":\"borrowing\",\"objectType\":\"related\",\"tableName\":\"borrowing\"},{\"code\":\"book_info\",\"name\":\"book_info\",\"objectType\":\"related\",\"tableName\":\"book_info\"}],\"domainName\":\"预约管理\",\"metrics\":[{\"aggregate\":\"count\",\"code\":\"pending_count\",\"field\":\"id\",\"filters\":[{\"field\":\"status\",\"operator\":\"eq\",\"values\":[\"pending\"]}],\"name\":\"待处理预约数\",\"relatedActionCodes\":[],\"required\":true,\"tableName\":\"reservation\",\"unit\":\"条\"},{\"aggregate\":\"count\",\"code\":\"cancelled_count\",\"field\":\"id\",\"filters\":[{\"field\":\"status\",\"operator\":\"eq\",\"values\":[\"cancelled\"]}],\"name\":\"已取消预约数\",\"relatedActionCodes\":[],\"required\":true,\"tableName\":\"reservation\",\"unit\":\"条\"},{\"aggregate\":\"count\",\"code\":\"fulfilled_count\",\"field\":\"id\",\"filters\":[{\"field\":\"status\",\"operator\":\"eq\",\"values\":[\"fulfilled\"]}],\"name\":\"已借出预约数\",\"relatedActionCodes\":[],\"required\":true,\"tableName\":\"reservation\",\"unit\":\"条\"},{\"aggregate\":\"count\",\"code\":\"total_reservations\",\"field\":\"id\",\"filters\":[],\"name\":\"预约总数\",\"relatedActionCodes\":[],\"required\":true,\"tableName\":\"reservation\",\"unit\":\"条\"}],\"pageBindings\":[{\"actionCode\":\"cancel_reservation\",\"pageCode\":\"my_reservations_page\",\"slot\":\"list.rowActions\",\"tableName\":\"reservation\",\"target\":\"frontend\"},{\"actionCode\":\"admin_cancel_reservation\",\"pageCode\":\"reservation_admin_page\",\"slot\":\"list.rowActions\",\"tableName\":\"reservation\",\"target\":\"admin\"},{\"actionCode\":\"fulfill_reservation\",\"pageCode\":\"reservation_admin_page\",\"slot\":\"list.rowActions\",\"tableName\":\"reservation\",\"target\":\"admin\"}],\"quantityRules\":[{\"actionCode\":\"fulfill_reservation\",\"amount\":\"1\",\"effectType\":\"decrease\",\"objectCode\":\"book_info\",\"quantityField\":\"stock\",\"tableName\":\"book_info\"}],\"recordRules\":[{\"actionCode\":\"fulfill_reservation\",\"objectCode\":\"borrowing\",\"operation\":\"INSERT_ROW\",\"tableName\":\"borrowing\"}],\"stateMachines\":[{\"objectCode\":\"reservation\",\"states\":[\"pending\",\"cancelled\",\"fulfilled\"],\"statusField\":\"status\",\"tableName\":\"reservation\",\"transitions\":[{\"actionCode\":\"cancel_reservation\",\"fromState\":\"pending\",\"toState\":\"cancelled\"},{\"actionCode\":\"admin_cancel_reservation\",\"fromState\":\"pending\",\"toState\":\"cancelled\"},{\"actionCode\":\"fulfill_reservation\",\"fromState\":\"pending\",\"toState\":\"fulfilled\"}]}]},\"canonicalTableRegistry\":[\"book_info\",\"borrowing\",\"reservation\",\"reader\",\"carousel\",\"announcement\",\"news\",\"admin\"],\"limits\":{\"maxTables\":12,\"maxColumnsPerTable\":30}}', '{\n \"tables\": [\n {\n \"tableName\": \"book_info\",\n \"tableComment\": \"图书信息表\",\n \"adminMenuName\": \"图书管理\",\n \"operations\": {\n \"add\": true,\n \"edit\": true,\n \"remove\": true,\n \"removeType\": \"physical\",\n \"reason\": \"\"\n },\n \"columns\": [\n {\n \"columnName\": \"id\",\n \"columnLabel\": \"ID\",\n \"columnComment\": \"主键ID\",\n \"columnType\": \"bigint(20)\",\n \"isPk\": \"1\",\n \"isIncrement\": \"1\",\n \"isRequired\": \"1\"\n },\n {\n \"columnName\": \"book_name\",\n \"columnLabel\": \"书名\",\n \"columnComment\": \"图书名称\",\n \"columnType\": \"varchar(200)\",\n \"isPk\": \"0\",\n \"isIncrement\": \"0\",\n \"isRequired\": \"1\",\n \"htmlType\": \"input\"\n },\n {\n \"columnName\": \"author\",\n \"columnLabel\": \"作者\",\n \"columnComment\": \"图书作者\",\n \"columnType\": \"varchar(100)\",\n \"isPk\": \"0\",\n \"isIncrement\": \"0\",\n \"isRequired\": \"0\",\n \"htmlType\": \"input\"\n },\n {\n \"columnName\": \"publisher\",\n \"columnLabel\": \"出版社\",\n \"columnComment\": \"出版社\",\n \"columnType\": \"varchar(100)\",\n \"isPk\": \"0\",\n \"isIncrement\": \"0\",\n \"isRequired\": \"0\",\n \"htmlType\": \"input\"\n },\n {\n \"columnName\": \"isbn\",\n \"columnLabel\": \"ISBN\",\n \"columnComment\": \"国际标准书号\",\n \"columnType\": \"varchar(20)\",\n \"isPk\": \"0\",\n \"isIncrement\": \"0\",\n \"isRequired\": \"0\",\n \"htmlType\": \"input\"\n },\n {\n \"columnName\": \"category\",\n \"columnLabel\": \"分类\",\n \"columnComment\": \"图书分类\",\n \"columnType\": \"varchar(50)\",\n \"isPk\": \"0\",\n \"isIncrement\": \"0\",\n \"isRequired\": \"0\",\n \"htmlType\": \"select\",\n \"dictType\": \"\",\n \"dictOptions\": [\n {\n \"label\": \"文学\",\n \"value\": \"literature\"\n },\n {\n \"label\": \"科学\",\n \"value\": \"science\"\n },\n {\n \"label\": \"历史\",\n \"value\": \"history\"\n },\n {\n \"label\": \"其他\",\n \"value\": \"other\"\n }\n ]\n },\n {\n \"columnName\": \"stock\",\n \"columnLabel\": \"库存\",\n \"columnComment\": \"当前库存数量\",\n \"columnType\": \"int(11)\",\n \"isPk\": \"0\",\n \"isIncrement\": \"0\",\n \"isRequired\": \"1\",\n \"htmlType\": \"input\"\n },\n {\n \"columnName\": \"cover_image\",\n \"columnLabel\": \"封面图片\",\n \"columnComment\": \"图书封面图片URL\",\n \"columnType\": \"varchar(500)\",\n \"isPk\": \"0\",\n \"isIncrement\": \"0\",\n \"isRequired\": \"0\",\n \"htmlType\": \"imageUpload\"\n },\n {\n \"columnName\": \"description\",\n \"columnLabel\": \"描述\",\n \"columnComment\": \"图书简介\",\n \"columnType\": \"text\",\n \"isPk\": \"0\",\n \"isIncrement\": \"0\",\n \"isRequired\": \"0\",\n \"htmlType\": \"editor\"\n },\n {\n \"columnName\": \"create_time\",\n \"columnLabel\": \"创建时间\",\n \"columnComment\": \"创建时间\",\n \"columnType\": \"datetime\",\n \"isPk\": \"0\",\n \"isIncrement\": \"0\",\n \"isRequired\": \"0\",\n \"htmlType\": \"datetime\"\n },\n {\n \"columnName\": \"update_time\",\n \"columnLabel\": \"更新时间\",\n \"columnComment\": \"更新时间\",\n \"columnType\": \"datetime\",\n \"isPk\": \"0\",\n \"isIncrement\": \"0\",\n \"isRequired\": \"0\",\n \"htmlType\": \"datetime\"\n }\n ]\n },\n {\n \"tableName\": \"borrowing\",\n \"tableComment\": \"借阅记录表\",\n \"adminMenuName\": \"借阅管理\",\n \"operations\": {\n \"add\": true,\n \"edit\": false,\n \"remove\": false,\n \"removeType\": \"physical\",\n \"reason\": \"借阅记录仅允许新增\"\n },\n \"columns\": [\n {\n \"columnName\": \"id\",\n \"columnLabel\": \"ID\",\n \"columnComment\": \"主键ID\",\n \"columnType\": \"bigint(20)\",\n \"isPk\": \"1\",\n \"isIncrement\": \"1\",\n \"isRequired\": \"1\"\n },\n {\n \"columnName\": \"reader_id\",\n \"columnLabel\": \"读者\",\n \"columnComment\": \"借阅读者ID\",\n \"columnType\": \"bigint(20)\",\n \"isPk\": \"0\",\n \"isIncrement\": \"0\",\n \"isRequired\": \"1\",\n \"htmlType\": \"select\",\n \"dictType\": \"remote:reader:reader_id:nickname\"\n },\n {\n \"columnName\": \"book_id\",\n \"columnLabel\": \"图书\",\n \"columnComment\": \"借阅图书ID\",\n \"columnType\": \"bigint(20)\",\n \"isPk\": \"0\",\n \"isIncrement\": \"0\",\n \"isRequired\": \"1\",\n \"htmlType\": \"select\",\n \"dictType\": \"remote:book_info:id:book_name\"\n },\n {\n \"columnName\": \"borrow_date\",\n \"columnLabel\": \"借书日期\",\n \"columnComment\": \"借书日期\",\n \"columnType\": \"datetime\",\n \"isPk\": \"0\",\n \"isIncrement\": \"0\",\n \"isRequired\": \"1\",\n \"htmlType\": \"datetime\"\n },\n {\n \"columnName\": \"due_date\",\n \"columnLabel\": \"应还日期\",\n \"columnComment\": \"应还日期\",\n \"columnType\": \"datetime\",\n \"isPk\": \"0\",\n \"isIncrement\": \"0\",\n \"isRequired\": \"1\",\n \"htmlType\": \"datetime\"\n },\n {\n \"columnName\": \"return_date\",\n \"columnLabel\": \"实际归还日期\",\n \"columnComment\": \"实际归还日期\",\n \"columnType\": \"datetime\",\n \"isPk\": \"0\",\n \"isIncrement\": \"0\",\n \"isRequired\": \"0\",\n \"htmlType\": \"datetime\"\n },\n {\n \"columnName\": \"status\",\n \"columnLabel\": \"状态\",\n \"columnComment\": \"借阅状态borrowing-借阅中returned-已归还overdue-逾期\",\n \"columnType\": \"varchar(20)\",\n \"isPk\": \"0\",\n \"isIncrement\": \"0\",\n \"isRequired\": \"1\",\n \"htmlType\": \"select\",\n \"dictType\": \"\",\n \"dictOptions\": [\n {\n \"label\": \"借阅中\",\n \"value\": \"borrowing\"\n },\n {\n \"label\": \"已归还\",\n \"value\": \"returned\"\n },\n {\n \"label\": \"逾期\",\n \"value\": \"overdue\"\n }\n ]\n },\n {\n \"columnName\": \"renew_count\",\n \"columnLabel\": \"续借次数\",\n \"columnComment\": \"续借次数\",\n \"columnType\": \"int(11)\",\n \"isPk\": \"0\",\n \"isIncrement\": \"0\",\n \"isRequired\": \"0\",\n \"htmlType\": \"input\"\n },\n {\n \"columnName\": \"create_time\",\n \"columnLabel\": \"创建时间\",\n \"columnComment\": \"创建时间\",\n \"columnType\": \"datetime\",\n \"isPk\": \"0\",\n \"isIncrement\": \"0\",\n \"isRequired\": \"0\",\n \"htmlType\": \"datetime\"\n },\n {\n \"columnName\": \"update_time\",\n \"columnLabel\": \"更新时间\",\n \"columnComment\": \"更新时间\",\n \"columnType\": \"datetime\",\n \"isPk\": \"0\",\n \"isIncrement\": \"0\",\n \"isRequired\": \"0\",\n \"htmlType\": \"datetime\"\n }\n ]\n },\n {\n \"tableName\": \"reservation\",\n \"tableComment\": \"预约记录表\",\n \"adminMenuName\": \"预约管理\",\n \"operations\": {\n \"add\": true,\n \"edit\": false,\n \"remove\": false,\n \"removeType\": \"physical\",\n \"reason\": \"预约记录仅允许新增\"\n },\n \"columns\": [\n {\n \"columnName\": \"id\",\n \"columnLabel\": \"ID\",\n \"columnComment\": \"主键ID\",\n \"columnType\": \"bigint(20)\",\n \"isPk\": \"1\",\n \"isIncrement\": \"1\",\n \"isRequired\": \"1\"\n },\n {\n \"columnName\": \"reader_id\",\n \"columnLabel\": \"读者\",\n \"columnComment\": \"预约读者ID\",\n \"columnType\": \"bigint(20)\",\n \"isPk\": \"0\",\n \"isIncrement\": \"0\",\n \"isRequired\": \"1\",\n \"htmlType\": \"select\",\n \"dictType\": \"remote:reader:reader_id:nickname\"\n },\n {\n \"columnName\": \"book_id\",\n \"columnLabel\": \"图书\",\n \"columnComment\": \"预约图书ID\",\n \"columnType\": \"bigint(20)\",\n \"isPk\": \"0\",\n \"isIncrement\": \"0\",\n \"isRequired\": \"1\",\n \"htmlType\": \"select\",\n \"dictType\": \"remote:book_info:id:book_name\"\n },\n {\n \"columnName\": \"reserve_date\",\n \"columnLabel\": \"预约时间\",\n \"columnComment\": \"预约发起时间\",\n \"columnType\": \"datetime\",\n \"isPk\": \"0\",\n \"isIncrement\": \"0\",\n \"isRequired\": \"1\",\n \"htmlType\": \"datetime\"\n },\n {\n \"columnName\": \"status\",\n \"columnLabel\": \"状态\",\n \"columnComment\": \"预约状态pending-待处理cancelled-已取消fulfilled-已借出\",\n \"columnType\": \"varchar(20)\",\n \"isPk\": \"0\",\n \"isIncrement\": \"0\",\n \"isRequired\": \"1\",\n \"htmlType\": \"select\",\n \"dictType\": \"\",\n \"dictOptions\": [\n {\n \"label\": \"待处理\",\n \"value\": \"pending\"\n },\n {\n \"label\": \"已取消\",\n \"value\": \"cancelled\"\n },\n {\n \"label\": \"已借出\",\n \"value\": \"fulfilled\"\n }\n ]\n },\n {\n \"columnName\": \"cancel_user_id\",\n \"columnLabel\": \"取消操作人\",\n \"columnComment\": \"取消预约的管理员ID\",\n \"columnType\": \"bigint(20)\",\n \"isPk\": \"0\",\n \"isIncrement\": \"0\",\n \"isRequired\": \"0\",\n \"htmlType\": \"select\",\n \"dictType\": \"remote:admin:admin_id:username\"\n },\n {\n \"columnName\": \"cancel_time\",\n \"columnLabel\": \"取消时间\",\n \"columnComment\": \"取消预约的时间\",\n \"columnType\": \"datetime\",\n \"isPk\": \"0\",\n \"isIncrement\": \"0\",\n \"isRequired\": \"0\",\n \"htmlType\": \"datetime\"\n },\n {\n \"columnName\": \"fulfill_user_id\",\n \"columnLabel\": \"确认借出操作人\",\n \"columnComment\": \"确认借出的管理员ID\",\n \"columnType\": \"bigint(20)\",\n \"isPk\": \"0\",\n \"isIncrement\": \"0\",\n \"isRequired\": \"0\",\n \"htmlType\": \"select\",\n \"dictType\": \"remote:admin:admin_id:username\"\n },\n {\n \"columnName\": \"fulfill_time\",\n \"columnLabel\": \"借出时间\",\n \"columnComment\": \"确认借出的时间\",\n \"columnType\": \"datetime\",\n \"isPk\": \"0\",\n \"isIncrement\": \"0\",\n \"isRequired\": \"0\",\n \"htmlType\": \"datetime\"\n },\n {\n \"columnName\": \"create_time\",\n \"columnLabel\": \"创建时间\",\n \"columnComment\": \"创建时间\",\n \"columnType\": \"datetime\",\n \"isPk\": \"0\",\n \"isIncrement\": \"0\",\n \"isRequired\": \"0\",\n \"htmlType\": \"datetime\"\n },\n {\n \"columnName\": \"update_time\",\n \"columnLabel\": \"更新时间\",\n \"columnComment\": \"更新时间\",\n \"columnType\": \"datetime\",\n \"isPk\": \"0\",\n \"isIncrement\": \"0\",\n \"isRequired\": \"0\",\n \"htmlType\": \"datetime\"\n }\n ]\n },\n {\n \"tableName\": \"reader\",\n \"tableComment\": \"读者信息表\",\n \"adminMenuName\": \"读者管理\",\n \"operations\": {\n \"add\": true,\n \"edit\": true,\n \"remove\": true,\n \"removeType\": \"physical\",\n \"reason\": \"读者信息可物理删除\"\n },\n \"columns\": [\n {\n \"columnName\": \"reader_id\",\n \"columnLabel\": \"读者ID\",\n \"columnComment\": \"主键ID\",\n \"columnType\": \"bigint(20)\",\n \"isPk\": \"1\",\n \"isIncrement\": \"1\",\n \"isRequired\": \"1\"\n },\n {\n \"columnName\": \"username\",\n \"columnLabel\": \"用户名\",\n \"columnComment\": \"登录用户名(唯一)\",\n \"columnType\": \"varchar(50)\",\n \"isPk\": \"0\",\n \"isIncrement\": \"0\",\n \"isRequired\": \"1\",\n \"htmlType\": \"input\"\n },\n {\n \"columnName\": \"password_hash\",\n \"columnLabel\": \"密码哈希\",\n \"columnComment\": \"加密后的密码\",\n \"columnType\": \"varchar(255)\",\n \"isPk\": \"0\",\n \"isIncrement\": \"0\",\n \"isRequired\": \"1\",\n \"htmlType\": \"input\"\n },\n {\n \"columnName\": \"nickname\",\n \"columnLabel\": \"昵称\",\n \"columnComment\": \"显示昵称\",\n \"columnType\": \"varchar(100)\",\n \"isPk\": \"0\",\n \"isIncrement\": \"0\",\n \"isRequired\": \"1\",\n \"htmlType\": \"input\"\n },\n {\n \"columnName\": \"real_name\",\n \"columnLabel\": \"真实姓名\",\n \"columnComment\": \"真实姓名\",\n \"columnType\": \"varchar(100)\",\n \"isPk\": \"0\",\n \"isIncrement\": \"0\",\n \"isRequired\": \"0\",\n \"htmlType\": \"input\"\n },\n {\n \"columnName\": \"phone\",\n \"columnLabel\": \"电话\",\n \"columnComment\": \"联系电话\",\n \"columnType\": \"varchar(20)\",\n \"isPk\": \"0\",\n \"isIncrement\": \"0\",\n \"isRequired\": \"0\",\n \"htmlType\": \"input\"\n },\n {\n \"columnName\": \"email\",\n \"columnLabel\": \"邮箱\",\n \"columnComment\": \"电子邮箱\",\n \"columnType\": \"varchar(100)\",\n \"isPk\": \"0\",\n \"isIncrement\": \"0\",\n \"isRequired\": \"0\",\n \"htmlType\": \"input\"\n },\n {\n \"columnName\": \"status\",\n \"columnLabel\": \"状态\",\n \"columnComment\": \"账号状态active-正常inactive-禁用\",\n \"columnType\": \"varchar(20)\",\n \"isPk\": \"0\",\n \"isIncrement\": \"0\",\n \"isRequired\": \"1\",\n \"htmlType\": \"select\",\n \"dictType\": \"\",\n \"dictOptions\": [\n {\n \"label\": \"正常\",\n \"value\": \"active\"\n },\n {\n \"label\": \"禁用\",\n \"value\": \"inactive\"\n }\n ]\n },\n {\n \"columnName\": \"create_time\",\n \"columnLabel\": \"创建时间\",\n \"columnComment\": \"创建时间\",\n \"columnType\": \"datetime\",\n \"isPk\": \"0\",\n \"isIncrement\": \"0\",\n \"isRequired\": \"0\",\n \"htmlType\": \"datetime\"\n },\n {\n \"columnName\": \"update_time\",\n \"columnLabel\": \"更新时间\",\n \"columnComment\": \"更新时间\",\n \"columnType\": \"datetime\",\n \"isPk\": \"0\",\n \"isIncrement\": \"0\",\n \"isRequired\": \"0\",\n \"htmlType\": \"datetime\"\n }\n ]\n },\n {\n \"tableName\": \"carousel\",\n \"tableComment\": \"轮播图表\",\n \"adminMenuName\": \"轮播图管理\",\n \"operations\": {\n \"add\": true,\n \"edit\": true,\n \"remove\": true,\n \"removeType\": \"physical\",\n \"reason\": \"\"\n },\n \"columns\": [\n {\n \"columnName\": \"id\",\n \"columnLabel\": \"ID\",\n \"columnComment\": \"主键ID\",\n \"columnType\": \"bigint(20)\",\n \"isPk\": \"1\",\n \"isIncrement\": \"1\",\n \"isRequired\": \"1\"\n },\n {\n \"columnName\": \"image_url\",\n \"columnLabel\": \"图片URL\",\n \"columnComment\": \"轮播图片地址\",\n \"columnType\": \"varchar(500)\",\n \"isPk\": \"0\",\n \"isIncrement\": \"0\",\n \"isRequired\": \"1\",\n \"htmlType\": \"imageUpload\"\n },\n {\n \"columnName\": \"link_url\",\n \"columnLabel\": \"链接URL\",\n \"columnComment\": \"点击跳转链接\",\n \"columnType\": \"varchar(500)\",\n \"isPk\": \"0\",\n \"isIncrement\": \"0\",\n \"isRequired\": \"0\",\n \"htmlType\": \"input\"\n },\n {\n \"columnName\": \"sort_order\",\n \"columnLabel\": \"排序\",\n \"columnComment\": \"显示顺序,数字越小越靠前\",\n \"columnType\": \"int(11)\",\n \"isPk\": \"0\",\n \"isIncrement\": \"0\",\n \"isRequired\": \"0\",\n \"htmlType\": \"input\"\n },\n {\n \"columnName\": \"status\",\n \"columnLabel\": \"状态\",\n \"columnComment\": \"启用状态active-启用inactive-禁用\",\n \"columnType\": \"varchar(20)\",\n \"isPk\": \"0\",\n \"isIncrement\": \"0\",\n \"isRequired\": \"1\",\n \"htmlType\": \"select\",\n \"dictType\": \"\",\n \"dictOptions\": [\n {\n \"label\": \"启用\",\n \"value\": \"active\"\n },\n {\n \"label\": \"禁用\",\n \"value\": \"inactive\"\n }\n ]\n },\n {\n \"columnName\": \"create_time\",\n \"columnLabel\": \"创建时间\",\n \"columnComment\": \"创建时间\",\n \"columnType\": \"datetime\",\n \"isPk\": \"0\",\n \"isIncrement\": \"0\",\n \"isRequired\": \"0\",\n \"htmlType\": \"datetime\"\n },\n {\n \"columnName\": \"update_time\",\n \"columnLabel\": \"更新时间\",\n \"columnComment\": \"更新时间\",\n \"columnType\": \"datetime\",\n \"isPk\": \"0\",\n \"isIncrement\": \"0\",\n \"isRequired\": \"0\",\n \"htmlType\": \"datetime\"\n }\n ]\n },\n {\n \"tableName\": \"announcement\",\n \"tableComment\": \"公告表\",\n \"adminMenuName\": \"公告管理\",\n \"operations\": {\n \"add\": true,\n \"edit\": true,\n \"remove\": true,\n \"removeType\": \"physical\",\n \"reason\": \"\"\n },\n \"columns\": [\n {\n \"columnName\": \"id\",\n \"columnLabel\": \"ID\",\n \"columnComment\": \"主键ID\",\n \"columnType\": \"bigint(20)\",\n \"isPk\": \"1\",\n \"isIncrement\": \"1\",\n \"isRequired\": \"1\"\n },\n {\n \"columnName\": \"title\",\n \"columnLabel\": \"标题\",\n \"columnComment\": \"公告标题\",\n \"columnType\": \"varchar(200)\",\n \"isPk\": \"0\",\n \"isIncrement\": \"0\",\n \"isRequired\": \"1\",\n \"htmlType\": \"input\"\n },\n {\n \"columnName\": \"content\",\n \"columnLabel\": \"内容\",\n \"columnComment\": \"公告正文\",\n \"columnType\": \"text\",\n \"isPk\": \"0\",\n \"isIncrement\": \"0\",\n \"isRequired\": \"1\",\n \"htmlType\": \"editor\"\n },\n {\n \"columnName\": \"publish_time\",\n \"columnLabel\": \"发布时间\",\n \"columnComment\": \"公告发布时间\",\n \"columnType\": \"datetime\",\n \"isPk\": \"0\",\n \"isIncrement\": \"0\",\n \"isRequired\": \"0\",\n \"htmlType\": \"datetime\"\n },\n {\n \"columnName\": \"status\",\n \"columnLabel\": \"状态\",\n \"columnComment\": \"状态draft-草稿published-已发布\",\n \"columnType\": \"varchar(20)\",\n \"isPk\": \"0\",\n \"isIncrement\": \"0\",\n \"isRequired\": \"1\",\n \"htmlType\": \"select\",\n \"dictType\": \"\",\n \"dictOptions\": [\n {\n \"label\": \"草稿\",\n \"value\": \"draft\"\n },\n {\n \"label\": \"已发布\",\n \"value\": \"published\"\n }\n ]\n },\n {\n \"columnName\": \"create_time\",\n \"columnLabel\": \"创建时间\",\n \"columnComment\": \"创建时间\",\n \"columnType\": \"datetime\",\n \"isPk\": \"0\",\n \"isIncrement\": \"0\",\n \"isRequired\": \"0\",\n \"htmlType\": \"datetime\"\n },\n {\n \"columnName\": \"update_time\",\n \"columnLabel\": \"更新时间\",\n \"columnComment\": \"更新时间\",\n \"columnType\": \"datetime\",\n \"isPk\": \"0\",\n \"isIncrement\": \"0\",\n \"isRequired\": \"0\",\n \"htmlType\": \"datetime\"\n }\n ]\n },\n {\n \"tableName\": \"news\",\n \"tableComment\": \"新闻表\",\n \"adminMenuName\": \"新闻管理\",\n \"operations\": {\n \"add\": true,\n \"edit\": true,\n \"remove\": true,\n \"removeType\": \"physical\",\n \"reason\": \"\"\n },\n \"columns\": [\n {\n \"columnName\": \"id\",\n \"columnLabel\": \"ID\",\n \"columnComment\": \"主键ID\",\n \"columnType\": \"bigint(20)\",\n \"isPk\": \"1\",\n \"isIncrement\": \"1\",\n \"isRequired\": \"1\"\n },\n {\n \"columnName\": \"title\",\n \"columnLabel\": \"标题\",\n \"columnComment\": \"新闻标题\",\n \"columnType\": \"varchar(200)\",\n \"isPk\": \"0\",\n \"isIncrement\": \"0\",\n \"isRequired\": \"1\",\n \"htmlType\": \"input\"\n },\n {\n \"columnName\": \"content\",\n \"columnLabel\": \"内容\",\n \"columnComment\": \"新闻正文\",\n \"columnType\": \"text\",\n \"isPk\": \"0\",\n \"isIncrement\": \"0\",\n \"isRequired\": \"1\",\n \"htmlType\": \"editor\"\n },\n {\n \"columnName\": \"publish_time\",\n \"columnLabel\": \"发布时间\",\n \"columnComment\": \"新闻发布时间\",\n \"columnType\": \"datetime\",\n \"isPk\": \"0\",\n \"isIncrement\": \"0\",\n \"isRequired\": \"0\",\n \"htmlType\": \"datetime\"\n },\n {\n \"columnName\": \"status\",\n \"columnLabel\": \"状态\",\n \"columnComment\": \"状态draft-草稿published-已发布\",\n \"columnType\": \"varchar(20)\",\n \"isPk\": \"0\",\n \"isIncrement\": \"0\",\n \"isRequired\": \"1\",\n \"htmlType\": \"select\",\n \"dictType\": \"\",\n \"dictOptions\": [\n {\n \"label\": \"草稿\",\n \"value\": \"draft\"\n },\n {\n \"label\": \"已发布\",\n \"value\": \"published\"\n }\n ]\n },\n {\n \"columnName\": \"cover_image\",\n \"columnLabel\": \"封面图片\",\n \"columnComment\": \"新闻封面图片URL\",\n \"columnType\": \"varchar(500)\",\n \"isPk\": \"0\",\n \"isIncrement\": \"0\",\n \"isRequired\": \"0\",\n \"htmlType\": \"imageUpload\"\n },\n {\n \"columnName\": \"create_time\",\n \"columnLabel\": \"创建时间\",\n \"columnComment\": \"创建时间\",\n \"columnType\": \"datetime\",\n \"isPk\": \"0\",\n \"isIncrement\": \"0\",\n \"isRequired\": \"0\",\n \"htmlType\": \"datetime\"\n },\n {\n \"columnName\": \"update_time\",\n \"columnLabel\": \"更新时间\",\n \"columnComment\": \"更新时间\",\n \"columnType\": \"datetime\",\n \"isPk\": \"0\",\n \"isIncrement\": \"0\",\n \"isRequired\": \"0\",\n \"htmlType\": \"datetime\"\n }\n ]\n },\n {\n \"tableName\": \"admin\",\n \"tableComment\": \"管理员表\",\n \"adminMenuName\": \"管理员\",\n \"operations\": {\n \"add\": false,\n \"edit\": true,\n \"remove\": false,\n \"removeType\": \"\",\n \"reason\": \"管理员账号仅支持个人编辑\"\n },\n \"columns\": [\n {\n \"columnName\": \"admin_id\",\n \"columnLabel\": \"管理员ID\",\n \"columnComment\": \"主键ID\",\n \"columnType\": \"bigint(20)\",\n \"isPk\": \"1\",\n \"isIncrement\": \"1\",\n \"isRequired\": \"1\"\n },\n {\n \"columnName\": \"username\",\n \"columnLabel\": \"用户名\",\n \"columnComment\": \"登录用户名(唯一)\",\n \"columnType\": \"varchar(50)\",\n \"isPk\": \"0\",\n \"isIncrement\": \"0\",\n \"isRequired\": \"1\",\n \"htmlType\": \"input\"\n },\n {\n \"columnName\": \"password_hash\",\n \"columnLabel\": \"密码哈希\",\n \"columnComment\": \"加密后的密码\",\n \"columnType\": \"varchar(255)\",\n \"isPk\": \"0\",\n \"isIncrement\": \"0\",\n \"isRequired\": \"1\",\n \"htmlType\": \"input\"\n },\n {\n \"columnName\": \"nickname\",\n \"columnLabel\": \"昵称\",\n \"columnComment\": \"显示昵称\",\n \"columnType\": \"varchar(100)\",\n \"isPk\": \"0\",\n \"isIncrement\": \"0\",\n \"isRequired\": \"1\",\n \"htmlType\": \"input\"\n },\n {\n \"columnName\": \"status\",\n \"columnLabel\": \"状态\",\n \"columnComment\": \"账号状态active-正常inactive-禁用\",\n \"columnType\": \"varchar(20)\",\n \"isPk\": \"0\",\n \"isIncrement\": \"0\",\n \"isRequired\": \"1\",\n \"htmlType\": \"select\",\n \"dictType\": \"\",\n \"dictOptions\": [\n {\n \"label\": \"正常\",\n \"value\": \"active\"\n },\n {\n \"label\": \"禁用\",\n \"value\": \"inactive\"\n }\n ]\n },\n {\n \"columnName\": \"create_time\",\n \"columnLabel\": \"创建时间\",\n \"columnComment\": \"创建时间\",\n \"columnType\": \"datetime\",\n \"isPk\": \"0\",\n \"isIncrement\": \"0\",\n \"isRequired\": \"0\",\n \"htmlType\": \"datetime\"\n },\n {\n \"columnName\": \"update_time\",\n \"columnLabel\": \"更新时间\",\n \"columnComment\": \"更新时间\",\n \"columnType\": \"datetime\",\n \"isPk\": \"0\",\n \"isIncrement\": \"0\",\n \"isRequired\": \"0\",\n \"htmlType\": \"datetime\"\n }\n ]\n }\n ]\n}', '1', NULL, 148121, '2026-07-15 09:29:27');
INSERT INTO `factory_ai_stage_output` VALUES (139, 115, 110, 100, 'flow_config', '{\"mode\":\"generate\",\"projectName\":\"图书管理系统\",\"projectDescription\":\"功能:借书、还书、预约、取消预约\\n角色用户、管理员\\n其他模块轮播图、公告、新闻\",\"industryTemplate\":\"\",\"stylePreset\":\"campus-orange\",\"extraRequirements\":\"\",\"confirmedAppBlueprint\":{\"roles\":[{\"code\":\"admin\",\"description\":\"系统管理员,拥有所有后台管理权限\",\"name\":\"系统管理员\"},{\"code\":\"reader\",\"description\":\"普通读者,可浏览图书、借书、还书、预约\",\"name\":\"读者\"}],\"frontendMenus\":[{\"code\":\"book_catalog\",\"dataScope\":\"PUBLIC\",\"name\":\"图书目录\",\"pageCode\":\"book_catalog_page\",\"pageType\":\"\",\"path\":\"/books\",\"requiresLogin\":false,\"tableName\":\"\",\"visibleRoles\":[]},{\"code\":\"my_borrowings\",\"dataScope\":\"CURRENT_USER\",\"name\":\"我的借阅\",\"pageCode\":\"my_borrowings_page\",\"pageType\":\"\",\"path\":\"/my-borrowings\",\"requiresLogin\":true,\"tableName\":\"\",\"visibleRoles\":[\"reader\"]},{\"code\":\"my_reservations\",\"dataScope\":\"CURRENT_USER\",\"name\":\"我的预约\",\"pageCode\":\"my_reservations_page\",\"pageType\":\"\",\"path\":\"/my-reservations\",\"requiresLogin\":true,\"tableName\":\"\",\"visibleRoles\":[\"reader\"]},{\"code\":\"reader_profile\",\"dataScope\":\"CURRENT_USER\",\"name\":\"个人中心\",\"pageCode\":\"reader_profile_page\",\"pageType\":\"\",\"path\":\"/reader/profile\",\"requiresLogin\":true,\"tableName\":\"\",\"visibleRoles\":[\"reader\"]}],\"adminMenus\":[{\"code\":\"book_admin\",\"dataScope\":\"ROLE\",\"name\":\"图书管理\",\"pageCode\":\"book_admin_page\",\"pageType\":\"list\",\"path\":\"/admin/books\",\"requiresLogin\":true,\"tableName\":\"book_info\",\"visibleRoles\":[\"admin\"]},{\"code\":\"borrowing_admin\",\"dataScope\":\"ROLE\",\"name\":\"借阅管理\",\"pageCode\":\"borrowing_admin_page\",\"pageType\":\"list\",\"path\":\"/admin/borrowings\",\"requiresLogin\":true,\"tableName\":\"borrowing\",\"visibleRoles\":[\"admin\"]},{\"code\":\"reservation_admin\",\"dataScope\":\"ROLE\",\"name\":\"预约管理\",\"pageCode\":\"reservation_admin_page\",\"pageType\":\"list\",\"path\":\"/admin/reservations\",\"requiresLogin\":true,\"tableName\":\"reservation\",\"visibleRoles\":[\"admin\"]},{\"code\":\"carousel_admin\",\"dataScope\":\"ROLE\",\"name\":\"轮播图管理\",\"pageCode\":\"carousel_admin_page\",\"pageType\":\"list\",\"path\":\"/admin/carousels\",\"requiresLogin\":true,\"tableName\":\"carousel\",\"visibleRoles\":[\"admin\"]},{\"code\":\"announcement_admin\",\"dataScope\":\"ROLE\",\"name\":\"公告管理\",\"pageCode\":\"announcement_admin_page\",\"pageType\":\"list\",\"path\":\"/admin/announcements\",\"requiresLogin\":true,\"tableName\":\"announcement\",\"visibleRoles\":[\"admin\"]},{\"code\":\"news_admin\",\"dataScope\":\"ROLE\",\"name\":\"新闻管理\",\"pageCode\":\"news_admin_page\",\"pageType\":\"list\",\"path\":\"/admin/news\",\"requiresLogin\":true,\"tableName\":\"news\",\"visibleRoles\":[\"admin\"]},{\"code\":\"reader_admin\",\"dataScope\":\"ROLE\",\"name\":\"读者管理\",\"pageCode\":\"reader_admin_page\",\"pageType\":\"list\",\"path\":\"/admin/readers\",\"requiresLogin\":true,\"tableName\":\"reader\",\"visibleRoles\":[\"admin\"]},{\"code\":\"admin_profile\",\"dataScope\":\"CURRENT_USER\",\"name\":\"个人资料\",\"pageCode\":\"admin_profile_page\",\"pageType\":\"form\",\"path\":\"/admin/profile\",\"requiresLogin\":true,\"tableName\":\"admin\",\"visibleRoles\":[\"admin\"]}],\"frontendPages\":[{\"code\":\"book_catalog_page\",\"menuCode\":\"book_catalog\",\"name\":\"图书目录\",\"pageType\":\"list\",\"parentPageCode\":\"\",\"path\":\"/books\",\"tableName\":\"book_info\"},{\"code\":\"book_detail_page\",\"menuCode\":\"\",\"name\":\"图书详情\",\"pageType\":\"detail\",\"parentPageCode\":\"\",\"path\":\"/books/:id\",\"tableName\":\"book_info\"},{\"code\":\"my_borrowings_page\",\"menuCode\":\"my_borrowings\",\"name\":\"我的借阅\",\"pageType\":\"list\",\"parentPageCode\":\"\",\"path\":\"/my-borrowings\",\"tableName\":\"borrowing\"},{\"code\":\"my_reservations_page\",\"menuCode\":\"my_reservations\",\"name\":\"我的预约\",\"pageType\":\"list\",\"parentPageCode\":\"\",\"path\":\"/my-reservations\",\"tableName\":\"reservation\"},{\"code\":\"reader_profile_page\",\"menuCode\":\"reader_profile\",\"name\":\"个人资料\",\"pageType\":\"form\",\"parentPageCode\":\"\",\"path\":\"/reader/profile\",\"tableName\":\"reader\"}]},\"existingDatabase\":\"[{\\\"adminMenuName\\\":\\\"图书管理\\\",\\\"allowAdd\\\":\\\"1\\\",\\\"allowEdit\\\":\\\"1\\\",\\\"allowRemove\\\":\\\"1\\\",\\\"businessName\\\":\\\"book_info\\\",\\\"className\\\":\\\"BookInfo\\\",\\\"columns\\\":[{\\\"columnComment\\\":\\\"主键ID\\\",\\\"columnId\\\":786,\\\"columnLabel\\\":\\\"ID\\\",\\\"columnName\\\":\\\"id\\\",\\\"columnType\\\":\\\"bigint(20)\\\",\\\"dictOptions\\\":\\\"\\\",\\\"dictType\\\":\\\"\\\",\\\"htmlType\\\":\\\"input\\\",\\\"isEdit\\\":\\\"1\\\",\\\"isIncrement\\\":\\\"1\\\",\\\"isInsert\\\":\\\"1\\\",\\\"isList\\\":\\\"1\\\",\\\"isPk\\\":\\\"1\\\",\\\"isQuery\\\":\\\"0\\\",\\\"isRequired\\\":\\\"1\\\",\\\"javaField\\\":\\\"id\\\",\\\"javaType\\\":\\\"Long\\\",\\\"queryType\\\":\\\"EQ\\\",\\\"sort\\\":1,\\\"tableId\\\":178},{\\\"columnComment\\\":\\\"图书名称\\\",\\\"columnId\\\":787,\\\"columnLabel\\\":\\\"书名\\\",\\\"columnName\\\":\\\"book_name\\\",\\\"columnType\\\":\\\"varchar(200)\\\",\\\"dictOptions\\\":\\\"\\\",\\\"dictType\\\":\\\"\\\",\\\"htmlType\\\":\\\"input\\\",\\\"isEdit\\\":\\\"1\\\",\\\"isIncrement\\\":\\\"0\\\",\\\"isInsert\\\":\\\"1\\\",\\\"isList\\\":\\\"1\\\",\\\"isPk\\\":\\\"0\\\",\\\"isQuery\\\":\\\"1\\\",\\\"isRequired\\\":\\\"1\\\",\\\"javaField\\\":\\\"bookName\\\",\\\"javaType\\\":\\\"String\\\",\\\"queryType\\\":\\\"LIKE\\\",\\\"sort\\\":2,\\\"tableId\\\":178},{\\\"columnComment\\\":\\\"图书作者\\\",\\\"columnId\\\":788,\\\"columnLabel\\\":\\\"作者\\\",\\\"columnName\\\":\\\"author\\\",\\\"columnType\\\":\\\"varchar(100)\\\",\\\"dictOptions\\\":\\\"\\\",\\\"dictType\\\":\\\"\\\",\\\"htmlType\\\":\\\"input\\\",\\\"isEdit\\\":\\\"1\\\",\\\"isIncrement\\\":\\\"0\\\",\\\"isInsert\\\":\\\"1\\\",\\\"isList\\\":\\\"1\\\",\\\"isPk\\\":\\\"0\\\",\\\"isQuery\\\":\\\"1\\\",\\\"isRequired\\\":\\\"0\\\",\\\"javaField\\\":\\\"author\\\",\\\"javaType\\\":\\\"String\\\",\\\"queryType\\\":\\\"EQ\\\",\\\"sort\\\":3,\\\"tableId\\\":178},{\\\"columnComment\\\":\\\"出版社\\\",\\\"columnId\\\":789,\\\"columnLabel\\\":\\\"出版社\\\",\\\"columnName\\\":\\\"publisher\\\",\\\"columnType\\\":\\\"varchar(100)\\\",\\\"dictOptions\\\":\\\"\\\",\\\"dictType\\\":\\\"\\\",\\\"htmlType\\\":\\\"input\\\",\\\"isEdit\\\":\\\"1\\\",\\\"isIncrement\\\":\\\"0\\\",\\\"isInsert\\\":\\\"1\\\",\\\"isList\\\":\\\"1\\\",\\\"isPk\\\":\\\"0\\\",\\\"isQuery\\\":\\\"0\\\",\\\"isRequired\\\":\\\"0\\\",\\\"javaField\\\":\\\"publisher\\\",\\\"javaType\\\":\\\"String\\\",\\\"queryType\\\":\\\"EQ\\\",\\\"sort\\\":4,\\\"tableId\\\":178},{\\\"columnComment\\\":\\\"国际标准书号\\\",\\\"columnId\\\":790,\\\"columnLabel\\\":\\\"ISBN\\\",\\\"columnName\\\":\\\"isbn\\\",\\\"columnType\\\":\\\"varchar(20)\\\",\\\"dictOptions\\\":\\\"\\\",\\\"dictType\\\":\\\"\\\",\\\"htmlType\\\":\\\"input\\\",\\\"isEdit\\\":\\\"1\\\",\\\"isIncrement\\\":\\\"0\\\",\\\"isInsert\\\":\\\"1\\\",\\\"isList\\\":\\\"1\\\",\\\"isPk\\\":\\\"0\\\",\\\"isQuery\\\":\\\"0\\\",\\\"isRequired\\\":\\\"0\\\",\\\"javaField\\\":\\\"isbn\\\",\\\"javaType\\\":\\\"String\\\",\\\"queryType\\\":\\\"EQ\\\",\\\"sort\\\":5,\\\"tableId\\\":178},{\\\"columnComment\\\":\\\"图书分类\\\",\\\"columnId\\\":791,\\\"columnLabel\\\":\\\"分类\\\",\\\"columnName\\\":\\\"category\\\",\\\"columnType\\\":\\\"varchar(50)\\\",\\\"dictOptions\\\":\\\"[{\\\\\\\"label\\\\\\\":\\\\\\\"文学\\\\\\\",\\\\\\\"value\\\\\\\":\\\\\\\"literature\\\\\\\"},{\\\\\\\"label\\\\\\\":\\\\\\\"科学\\\\\\\",\\\\\\\"value\\\\\\\":\\\\\\\"science\\\\\\\"},{\\\\\\\"label\\\\\\\":\\\\\\\"历史\\\\\\\",\\\\\\\"value\\\\\\\":\\\\\\\"history\\\\\\\"},{\\\\\\\"label\\\\\\\":\\\\\\\"其他\\\\\\\",\\\\\\\"value\\\\\\\":\\\\\\\"other\\\\\\\"}]\\\",\\\"dictType\\\":\\\"book_info_category\\\",\\\"htmlType\\\":\\\"select\\\",\\\"isEdit\\\":\\\"1\\\",\\\"isIncrement\\\":\\\"0\\\",\\\"isInsert\\\":\\\"1\\\",\\\"isList\\\":\\\"1\\\",\\\"isPk\\\":\\\"0\\\",\\\"isQuery\\\":\\\"1\\\",\\\"isRequired\\\":\\\"0\\\",\\\"javaField\\\":\\\"category\\\",\\\"javaType\\\":\\\"String\\\",\\\"queryType\\\":\\\"EQ\\\",\\\"sort\\\":6,\\\"tableId\\\":178},{\\\"columnComment\\\":\\\"当前库存数量\\\",\\\"columnId\\\":792,\\\"columnLabel\\\":\\\"库存\\\",\\\"columnName\\\":\\\"stock\\\",\\\"columnType\\\":\\\"int(11)\\\",\\\"dictOptions\\\":\\\"\\\",\\\"dictType\\\":\\\"\\\",\\\"htmlType\\\":\\\"input\\\",\\\"isEdit\\\":\\\"1\\\",\\\"isIncrement\\\":\\\"0\\\",\\\"isInsert\\\":\\\"1\\\",\\\"isList\\\":\\\"1\\\",\\\"isPk\\\":\\\"0\\\",\\\"isQuery\\\":\\\"0\\\",\\\"isRequired\\\":\\\"1\\\",\\\"javaField\\\":\\\"stock\\\",\\\"javaType\\\":\\\"Long\\\",\\\"queryType\\\":\\\"EQ\\\",\\\"sort\\\":7,\\\"tableId\\\":178},{\\\"columnComment\\\":\\\"图书封面图片URL\\\",\\\"columnId\\\":793,\\\"columnLabel\\\":\\\"封面图片\\\",\\\"columnName\\\":\\\"cover_image\\\",\\\"columnType\\\":\\\"varchar(500)\\\",\\\"dictOptions\\\":\\\"\\\",\\\"dictType\\\":\\\"\\\",\\\"htmlType\\\":\\\"imageUpload\\\",\\\"isEdit\\\":\\\"1\\\",\\\"isIncrement\\\":\\\"0\\\",\\\"isInsert\\\":\\\"1\\\",\\\"isList\\\":\\\"1\\\",\\\"isPk\\\":\\\"0\\\",\\\"isQuery\\\":\\\"0\\\",\\\"isRequired\\\":\\\"0\\\",\\\"javaField\\\":\\\"coverImage\\\",\\\"javaType\\\":\\\"String\\\",\\\"queryType\\\":\\\"EQ\\\",\\\"sort\\\":8,\\\"tableId\\\":178},{\\\"columnComment\\\":\\\"图书简介\\\",\\\"columnId\\\":794,\\\"columnLabel\\\":\\\"描述\\\",\\\"columnName\\\":\\\"description\\\",\\\"columnType\\\":\\\"text\\\",\\\"dictOptions\\\":\\\"\\\",\\\"dictType\\\":\\\"\\\",\\\"htmlType\\\":\\\"editor\\\",\\\"isEdit\\\":\\\"1\\\",\\\"isIncrement\\\":\\\"0\\\",\\\"isInsert\\\":\\\"1\\\",\\\"isList\\\":\\\"1\\\",\\\"isPk\\\":\\\"0\\\",\\\"isQuery\\\":\\\"0\\\",\\\"isRequired\\\":\\\"0\\\",\\\"javaField\\\":\\\"description\\\",\\\"javaType\\\":\\\"String\\\",\\\"queryType\\\":\\\"EQ\\\",\\\"sort\\\":9,\\\"tableId\\\":178},{\\\"columnComment\\\":\\\"创建时间\\\",\\\"columnId\\\":795,\\\"columnLabel\\\":\\\"创建时间\\\",\\\"columnName\\\":\\\"create_time\\\",\\\"columnType\\\":\\\"datetime\\\",\\\"dictOptions\\\":\\\"\\\",\\\"dictType\\\":\\\"\\\",\\\"htmlType\\\":\\\"datetime\\\",\\\"isEdit\\\":\\\"1\\\",\\\"isIncrement\\\":\\\"0\\\",\\\"isInsert\\\":\\\"1\\\",\\\"isList\\\":\\\"1\\\",\\\"isPk\\\":\\\"0\\\",\\\"isQuery\\\":\\\"1\\\",\\\"isRequired\\\":\\\"0\\\",\\\"javaField\\\":\\\"createTime\\\",\\\"javaType\\\":\\\"Date\\\",\\\"queryType\\\":\\\"EQ\\\",\\\"sort\\\":10,\\\"tableId\\\":178},{\\\"columnComment\\\":\\\"更新时间\\\",\\\"columnId\\\":796,\\\"columnLabel\\\":\\\"更新时间\\\",\\\"columnName\\\":\\\"update_time\\\",\\\"columnType\\\":\\\"datetime\\\",\\\"dictOptions\\\":\\\"\\\",\\\"dictType\\\":\\\"\\\",\\\"htmlType\\\":\\\"datetime\\\",\\\"isEdit\\\":\\\"1\\\",\\\"isIncrement\\\":\\\"0\\\",\\\"isInsert\\\":\\\"1\\\",\\\"isList\\\":\\\"1\\\",\\\"isPk\\\":\\\"0\\\",\\\"isQuery\\\":\\\"1\\\",\\\"isRequired\\\":\\\"0\\\",\\\"javaField\\\":\\\"updateTime\\\",\\\"javaType\\\":\\\"Date\\\",\\\"queryType\\\":\\\"EQ\\\",\\\"sort\\\":11,\\\"tableId\\\":178}],\\\"createTableSql\\\":\\\"CREATE TABLE `book_info` (\\\\n `id` bigint(20) NOT NULL AUTO_INCREMENT COMMENT \'主键ID\',\\\\n `book_name` varchar(200) NOT NULL COMMENT \'图书名称\',\\\\n `author` varchar(100) DEFAULT NULL COMMENT \'图书作者\',\\\\n `publisher` varchar(100) DEFAULT NULL COMMENT \'出版社\',\\\\n `isbn` varchar(20) DEFAULT NULL COMMENT \'国际标准书号\',\\\\n `category` varchar(50) DEFAULT NULL COMMENT \'图书分类\',\\\\n `stock` int(11) NOT NULL COMMENT \'当前库存数量\',\\\\n `cover_image` varchar(500) DEFAULT NULL COMMENT \'图书封面图片URL\',\\\\n `description` text DEFAULT NULL COMMENT \'图书简介\',\\\\n `create_time` datetime DEFAULT NULL COMMENT \'创建时间\',\\\\n `update_time` datetime DEFAULT NULL COMMENT \'更新时间\',\\\\n PRIMARY KEY (`id`)\\\\n) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT=\'图书信息表\';\\\\n\\\\ninsert into `book_info` (`book_name`, `author`, `publisher`, `isbn`, `category`, `stock`, `cover_image`, `description`, `create_time`, `update_time`)\\\\nselect * from (\\\\n select \'书名1\' as `book_name`, \'作者1\' as `author`, \'草稿\' as `publisher`, \'示例1\' as `isbn`, \'literature\' as `category`, 1 as `stock`, \'/files/mock/image-01.png\' as `cover_image`, \'描述1\' as `description`, DATE_ADD(DATE_SUB(CURRENT_DATE, INTERVAL 0 DAY), INTERVAL 9 HOUR) as `create_time`, DATE_ADD(DATE_SUB(CURRENT_DATE, INTERVAL 0 DAY), INTERVAL 9 HOUR) as `update_time`\\\\n union all\\\\n select \'书名2\', \'作者2\', \'已发布\', \'示例2\', \'science\', 2, \'/files/mock/image-02.png\', \'描述2\', DATE_ADD(DATE_SUB(CURRENT_DATE, INTERVAL 1 DAY), INTERVAL 9 HOUR), DATE_ADD(DATE_SUB(CURRENT_DATE, INTERVAL 1 DAY), INTERVAL 9 HOUR)\\\\n union all\\\\n select \'书名3\', \'作者3\', \'已下架\', \'示例3\', \'history\', 3, \'/files/mock/image-03.png\', \'描述3\', DATE_ADD(DATE_SUB(CURRENT_DATE, INTERVAL 2 DAY), INTERVAL 9 HOUR), DATE_ADD(DATE_SUB(CURRENT_DATE, INTERVAL 2 DAY), INTERVAL 9 HOUR)\\\\n union all\\\\n select \'书名4\', \'作者4\', \'草稿\', \'示例4\', \'other\', 4, \'/files/mock/image-04.png\', \'描述4\', DATE_ADD(DATE_SUB(CURRENT_DATE, INTERVAL 3 DAY), INTERVAL 9 HOUR), DATE_ADD(DATE_SUB(CURRENT_DATE, INTERVAL 3 DAY), INTERVAL 9 HOUR)\\\\n union all\\\\n select \'书名5\', \'作者5\', \'已发布\', \'示例5\', \'literature\', 5, \'/files/mock/image-05.png\', \'描述5\', DATE_ADD(DATE_SUB(CURRENT_DATE, INTERVAL 4 DAY), INTERVAL 9 HOUR), DATE_ADD(DATE_SUB(CURRENT_DATE, INTERVAL 4 DAY), INTERVAL 9 HOUR)\\\\n union all\\\\n select \'书名6\', \'作者6\', \'已下架\', \'示例6\', \'science\', 6, \'/files/mock/image-06.png\', \'描述6\', DATE_ADD(DATE_SUB(CURRENT_DATE, INTERVAL 5 DAY), INTERVAL 9 HOUR), DATE_ADD(DATE_SUB(CURRENT_DATE, INTERVAL 5 DAY), INTERVAL 9 HOUR)\\\\n union all\\\\n select \'书名7\', \'作者7\', \'草稿\', \'示例7\', \'history\', 7, \'/files/mock/image-07.png\', \'描述7\', DATE_ADD(DATE_SUB(CURRENT_DATE, INTERVAL 6 DAY), INTERVAL 9 HOUR), DATE_ADD(DATE_SUB(CURRENT_DATE, INTERVAL 6 DAY), INTERVAL 9 HOUR)\\\\n union all\\\\n select \'书名8\', \'作者8\', \'已发布\', \'示例8\', \'other\', 8, \'/files/mock/image-08.png\', \'描述8\', DATE_ADD(DATE_SUB(CURRENT_DATE, INTERVAL 7 DAY), INTERVAL 9 HOUR), DATE_ADD(DATE_SUB(CURRENT_DATE, INTERVAL 7 DAY), INTERVAL 9 HOUR)\\\\n union all\\\\n select \'书名9\', \'作者9\', \'已下架\', \'示例9\', \'literature\', 9, \'/files/mock/image-09.png\', \'描述9\', DATE_ADD(DATE_SUB(CURRENT_DATE, INTERVAL 8 DAY), INTERVAL 9 HOUR), DATE_ADD(DATE_SUB(CURRENT_DATE, INTERVAL 8 DAY), INTERVAL 9 HOUR)\\\\n union all\\\\n select \'书名10\', \'作者10\', \'草稿\', \'示例10\', \'science\', 10, \'/files/mock/image-10.png\', \'描述10\', DATE_ADD(DATE_SUB(CURRENT_DATE, INTERVAL 9 DAY), INTERVAL 9 HOUR), DATE_ADD(DATE_SUB(CURRENT_DATE, INTERVAL 9 DAY), INTERVAL 9 HOUR)\\\\n) mock_seed\\\\nwhere not exists (select 1 from `book_info`);\\\",\\\"functionName\\\":\\\"图书信息表\\\",\\\"moduleName\\\":\\\"\\\",\\\"operationNote\\\":\\\"default CRUD table\\\",\\\"operations\\\":{\\\"add\\\":true,\\\"edit\\\":true,\\\"reason\\\":\\\"default CRUD table\\\",\\\"remove\\\":true,\\\"removeType\\\":\\\"physical\\\"},\\\"options\\\":\\\"\\\",\\\"removeType\\\":\\\"physical\\\",\\\"sort\\\":1,\\\"tableComment\\\":\\\"图书信息表\\\",\\\"tableId\\\":178,\\\"tableName\\\":\\\"book_info\\\",\\\"tplCategory\\\":\\\"crud\\\",\\\"tplWebType\\\":\\\"element-plus\\\"},{\\\"adminMenuName\\\":\\\"借阅管理\\\",\\\"allowAdd\\\":\\\"1\\\",\\\"allowEdit\\\":\\\"0\\\",\\\"allowRemove\\\":\\\"0\\\",\\\"businessName\\\":\\\"borrowing\\\",\\\"className\\\":\\\"Borrowing\\\",\\\"columns\\\":[{\\\"columnComment\\\":\\\"主键ID\\\",\\\"columnId\\\":797,\\\"columnLabel\\\":\\\"ID\\\",\\\"columnName\\\":\\\"id\\\",\\\"columnType\\\":\\\"bigint(20)\\\",\\\"dictOptions\\\":\\\"\\\",\\\"dictType\\\":\\\"\\\",\\\"htmlType\\\":\\\"input\\\",\\\"isEdit\\\":\\\"1\\\",\\\"isIncrement\\\":\\\"1\\\",\\\"isInsert\\\":\\\"1\\\",\\\"isList\\\":\\\"1\\\",\\\"isPk\\\":\\\"1\\\",\\\"isQuery\\\":\\\"0\\\",\\\"isRequired\\\":\\\"1\\\",\\\"javaField\\\":\\\"id\\\",\\\"javaType\\\":\\\"Long\\\",\\\"queryType\\\":\\\"EQ\\\",\\\"sort\\\":1,\\\"tableId\\\":179},{\\\"columnComment\\\":\\\"借阅读者ID\\\",\\\"columnId\\\":798,\\\"columnLabel\\\":\\\"读者\\\",\\\"columnName\\\":\\\"reader_id\\\",\\\"columnType\\\":\\\"bigint(20)\\\",\\\"dictOptions\\\":\\\"\\\",\\\"dictType\\\":\\\"remote:reader:reader_id:nickname\\\",\\\"htmlType\\\":\\\"select\\\",\\\"isEdit\\\":\\\"1\\\",\\\"isIncrement\\\":\\\"0\\\",\\\"isInsert\\\":\\\"1\\\",\\\"isList\\\":\\\"1\\\",\\\"isPk\\\":\\\"0\\\",\\\"isQuery\\\":\\\"0\\\",\\\"isRequired\\\":\\\"1\\\",\\\"javaField\\\":\\\"readerId\\\",\\\"javaType\\\":\\\"Long\\\",\\\"queryType\\\":\\\"EQ\\\",\\\"sort\\\":2,\\\"tableId\\\":179},{\\\"columnComment\\\":\\\"借阅图书ID\\\",\\\"columnId\\\":799,\\\"columnLabel\\\":\\\"图书\\\",\\\"columnName\\\":\\\"book_id\\\",\\\"columnType\\\":\\\"bigint(20)\\\",\\\"dictOptions\\\":\\\"\\\",\\\"dictType\\\":\\\"remote:book_info:id:book_name\\\",\\\"htmlType\\\":\\\"select\\\",\\\"isEdit\\\":\\\"1\\\",\\\"isIncrement\\\":\\\"0\\\",\\\"isInsert\\\":\\\"1\\\",\\\"isList\\\":\\\"1\\\",\\\"isPk\\\":\\\"0\\\",\\\"isQuery\\\":\\\"0\\\",\\\"isRequired\\\":\\\"1\\\",\\\"javaField\\\":\\\"bookId\\\",\\\"javaType\\\":\\\"Long\\\",\\\"queryType\\\":\\\"EQ\\\",\\\"sort\\\":3,\\\"tableId\\\":179},{\\\"columnComment\\\":\\\"借书日期\\\",\\\"columnId\\\":800,\\\"columnLabel\\\":\\\"借书日期\\\",\\\"columnName\\\":\\\"borrow_date\\\",\\\"columnType\\\":\\\"datetime\\\",\\\"dictOptions\\\":\\\"\\\",\\\"dictType\\\":\\\"\\\",\\\"htmlType\\\":\\\"datetime\\\",\\\"isEdit\\\":\\\"1\\\",\\\"isIncrement\\\":\\\"0\\\",\\\"isInsert\\\":\\\"1\\\",\\\"isList\\\":\\\"1\\\",\\\"isPk\\\":\\\"0\\\",\\\"isQuery\\\":\\\"1\\\",\\\"isRequired\\\":\\\"1\\\",\\\"javaField\\\":\\\"borrowDate\\\",\\\"javaType\\\":\\\"Date\\\",\\\"queryType\\\":\\\"EQ\\\",\\\"sort\\\":4,\\\"tableId\\\":179},{\\\"columnComment\\\":\\\"应还日期\\\",\\\"columnId\\\":801,\\\"columnLabel\\\":\\\"应还日期\\\",\\\"columnName\\\":\\\"due_date\\\",\\\"columnType\\\":\\\"varchar(255)\\\",\\\"dictOptions\\\":\\\"\\\",\\\"dictType\\\":\\\"\\\",\\\"htmlType\\\":\\\"datetime\\\",\\\"isEdit\\\":\\\"1\\\",\\\"isIncrement\\\":\\\"0\\\",\\\"isInsert\\\":\\\"1\\\",\\\"isList\\\":\\\"1\\\",\\\"isPk\\\":\\\"0\\\",\\\"isQuery\\\":\\\"1\\\",\\\"isRequired\\\":\\\"1\\\",\\\"javaField\\\":\\\"dueDate\\\",\\\"javaType\\\":\\\"String\\\",\\\"queryType\\\":\\\"EQ\\\",\\\"sort\\\":5,\\\"tableId\\\":179},{\\\"columnComment\\\":\\\"实际归还日期\\\",\\\"columnId\\\":802,\\\"columnLabel\\\":\\\"实际归还日期\\\",\\\"columnName\\\":\\\"return_date\\\",\\\"columnType\\\":\\\"datetime\\\",\\\"dictOptions\\\":\\\"\\\",\\\"dictType\\\":\\\"\\\",\\\"htmlType\\\":\\\"datetime\\\",\\\"isEdit\\\":\\\"1\\\",\\\"isIncrement\\\":\\\"0\\\",\\\"isInsert\\\":\\\"1\\\",\\\"isList\\\":\\\"1\\\",\\\"isPk\\\":\\\"0\\\",\\\"isQuery\\\":\\\"1\\\",\\\"isRequired\\\":\\\"0\\\",\\\"javaField\\\":\\\"returnDate\\\",\\\"javaType\\\":\\\"Date\\\",\\\"queryType\\\":\\\"EQ\\\",\\\"sort\\\":6,\\\"tableId\\\":179},{\\\"columnComment\\\":\\\"借阅状态borrowing-借阅中returned-已归还overdue-逾期\\\",\\\"columnId\\\":803,\\\"columnLabel\\\":\\\"状态\\\",\\\"columnName\\\":\\\"status\\\",\\\"columnType\\\":\\\"varchar(20)\\\",\\\"dictOptions\\\":\\\"[{\\\\\\\"label\\\\\\\":\\\\\\\"借阅中\\\\\\\",\\\\\\\"value\\\\\\\":\\\\\\\"borrowing\\\\\\\"},{\\\\\\\"label\\\\\\\":\\\\\\\"已归还\\\\\\\",\\\\\\\"value\\\\\\\":\\\\\\\"returned\\\\\\\"},{\\\\\\\"label\\\\\\\":\\\\\\\"逾期\\\\\\\",\\\\\\\"value\\\\\\\":\\\\\\\"overdue\\\\\\\"}]\\\",\\\"dictType\\\":\\\"borrowing_status\\\",\\\"htmlType\\\":\\\"select\\\",\\\"isEdit\\\":\\\"1\\\",\\\"isIncrement\\\":\\\"0\\\",\\\"isInsert\\\":\\\"1\\\",\\\"isList\\\":\\\"1\\\",\\\"isPk\\\":\\\"0\\\",\\\"isQuery\\\":\\\"1\\\",\\\"isRequired\\\":\\\"1\\\",\\\"javaField\\\":\\\"status\\\",\\\"javaType\\\":\\\"String\\\",\\\"queryType\\\":\\\"EQ\\\",\\\"sort\\\":7,\\\"tableId\\\":179},{\\\"columnComment\\\":\\\"续借次数\\\",\\\"columnId\\\":804,\\\"columnLabel\\\":\\\"续借次数\\\",\\\"columnName\\\":\\\"renew_count\\\",\\\"columnType\\\":\\\"int(11)\\\",\\\"dictOptions\\\":\\\"\\\",\\\"dictType\\\":\\\"\\\",\\\"htmlType\\\":\\\"input\\\",\\\"isEdit\\\":\\\"1\\\",\\\"isIncrement\\\":\\\"0\\\",\\\"isInsert\\\":\\\"1\\\",\\\"isList\\\":\\\"1\\\",\\\"isPk\\\":\\\"0\\\",\\\"isQuery\\\":\\\"0\\\",\\\"isRequired\\\":\\\"0\\\",\\\"javaField\\\":\\\"renewCount\\\",\\\"javaType\\\":\\\"Long\\\",\\\"queryType\\\":\\\"EQ\\\",\\\"sort\\\":8,\\\"tableId\\\":179},{\\\"columnComment\\\":\\\"创建时间\\\",\\\"columnId\\\":805,\\\"columnLabel\\\":\\\"创建时间\\\",\\\"columnName\\\":\\\"create_time\\\",\\\"columnType\\\":\\\"datetime\\\",\\\"dictOptions\\\":\\\"\\\",\\\"dictType\\\":\\\"\\\",\\\"htmlType\\\":\\\"datetime\\\",\\\"isEdit\\\":\\\"1\\\",\\\"isIncrement\\\":\\\"0\\\",\\\"isInsert\\\":\\\"1\\\",\\\"isList\\\":\\\"1\\\",\\\"isPk\\\":\\\"0\\\",\\\"isQuery\\\":\\\"1\\\",\\\"isRequired\\\":\\\"0\\\",\\\"javaField\\\":\\\"createTime\\\",\\\"javaType\\\":\\\"Date\\\",\\\"queryType\\\":\\\"EQ\\\",\\\"sort\\\":9,\\\"tableId\\\":179},{\\\"columnComment\\\":\\\"更新时间\\\",\\\"columnId\\\":806,\\\"columnLabel\\\":\\\"更新时间\\\",\\\"columnName\\\":\\\"update_time\\\",\\\"columnType\\\":\\\"datetime\\\",\\\"dictOptions\\\":\\\"\\\",\\\"dictType\\\":\\\"\\\",\\\"htmlType\\\":\\\"datetime\\\",\\\"isEdit\\\":\\\"1\\\",\\\"isIncrement\\\":\\\"0\\\",\\\"isInsert\\\":\\\"1\\\",\\\"isList\\\":\\\"1\\\",\\\"isPk\\\":\\\"0\\\",\\\"isQuery\\\":\\\"0\\\",\\\"isRequired\\\":\\\"0\\\",\\\"javaField\\\":\\\"updateTime\\\",\\\"javaType\\\":\\\"Date\\\",\\\"queryType\\\":\\\"EQ\\\",\\\"sort\\\":10,\\\"tableId\\\":179}],\\\"createTableSql\\\":\\\"CREATE TABLE `borrowing` (\\\\n `id` bigint(20) NOT NULL AUTO_INCREMENT COMMENT \'主键ID\',\\\\n `reader_id` bigint(20) NOT NULL COMMENT \'借阅读者ID\',\\\\n `book_id` bigint(20) NOT NULL COMMENT \'借阅图书ID\',\\\\n `borrow_date` datetime NOT NULL COMMENT \'借书日期\',\\\\n `due_date` varchar(255) NOT NULL COMMENT \'应还日期\',\\\\n `return_date` datetime DEFAULT NULL COMMENT \'实际归还日期\',\\\\n `status` varchar(20) NOT NULL COMMENT \'借阅状态borrowing-借阅中returned-已归还overdue-逾期\',\\\\n `renew_count` int(11) DEFAULT NULL COMMENT \'续借次数\',\\\\n `create_time` datetime DEFAULT NULL COMMENT \'创建时间\',\\\\n `update_time` datetime DEFAULT NULL COMMENT \'更新时间\',\\\\n PRIMARY KEY (`id`)\\\\n) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT=\'借阅记录表\';\\\\n\\\\ninsert into `borrowing` (`reader_id`, `book_id`, `borrow_date`, `due_date`, `return_date`, `status`, `renew_count`, `create_time`, `update_time`)\\\\nselect * from (\\\\n select 1 as `reader_id`, 1 as `book_id`, DATE_ADD(DATE_SUB(CURRENT_DATE, INTERVAL 0 DAY), INTERVAL 9 HOUR) as `borrow_date`, \'应还日期1\' as `due_date`, DATE_ADD(DATE_SUB(CURRENT_DATE, INTERVAL 0 DAY), INTERVAL 9 HOUR) as `return_date`, \'borrowing\' as `status`, 1 as `renew_count`, DATE_ADD(DATE_SUB(CURRENT_DATE, INTERVAL 0 DAY), INTERVAL 9 HOUR) as `create_time`, DATE_ADD(DATE_SUB(CURRENT_DATE, INTERVAL 0 DAY), INTERVAL 9 HOUR) as `update_time`\\\\n union all\\\\n select 2, 2, DATE_ADD(DATE_SUB(CURRENT_DATE, INTERVAL 1 DAY), INTERVAL 9 HOUR), \'应还日期2\', DATE_ADD(DATE_SUB(CURRENT_DATE, INTERVAL 1 DAY), INTERVAL 9 HOUR), \'returned\', 2, DATE_ADD(DATE_SUB(CURRENT_DATE, INTERVAL 1 DAY), INTERVAL 9 HOUR), DATE_ADD(DATE_SUB(CURRENT_DATE, INTERVAL 1 DAY), INTERVAL 9 HOUR)\\\\n union all\\\\n select 3, 3, DATE_ADD(DATE_SUB(CURRENT_DATE, INTERVAL 2 DAY), INTERVAL 9 HOUR), \'应还日期3\', DATE_ADD(DATE_SUB(CURRENT_DATE, INTERVAL 2 DAY), INTERVAL 9 HOUR), \'overdue\', 3, DATE_ADD(DATE_SUB(CURRENT_DATE, INTERVAL 2 DAY), INTERVAL 9 HOUR), DATE_ADD(DATE_SUB(CURRENT_DATE, INTERVAL 2 DAY), INTERVAL 9 HOUR)\\\\n union all\\\\n select 4, 4, DATE_ADD(DATE_SUB(CURRENT_DATE, INTERVAL 3 DAY), INTERVAL 9 HOUR), \'应还日期4\', DATE_ADD(DATE_SUB(CURRENT_DATE, INTERVAL 3 DAY), INTERVAL 9 HOUR), \'borrowing\', 4, DATE_ADD(DATE_SUB(CURRENT_DATE, INTERVAL 3 DAY), INTERVAL 9 HOUR), DATE_ADD(DATE_SUB(CURRENT_DATE, INTERVAL 3 DAY), INTERVAL 9 HOUR)\\\\n union all\\\\n select 5, 5, DATE_ADD(DATE_SUB(CURRENT_DATE, INTERVAL 4 DAY), INTERVAL 9 HOUR), \'应还日期5\', DATE_ADD(DATE_SUB(CURRENT_DATE, INTERVAL 4 DAY), INTERVAL 9 HOUR), \'returned\', 5, DATE_ADD(DATE_SUB(CURRENT_DATE, INTERVAL 4 DAY), INTERVAL 9 HOUR), DATE_ADD(DATE_SUB(CURRENT_DATE, INTERVAL 4 DAY), INTERVAL 9 HOUR)\\\\n union all\\\\n select 6, 6, DATE_ADD(DATE_SUB(CURRENT_DATE, INTERVAL 5 DAY), INTERVAL 9 HOUR), \'应还日期6\', DATE_ADD(DATE_SUB(CURRENT_DATE, INTERVAL 5 DAY), INTERVAL 9 HOUR), \'overdue\', 6, DATE_ADD(DATE_SUB(CURRENT_DATE, INTERVAL 5 DAY), INTERVAL 9 HOUR), DATE_ADD(DATE_SUB(CURRENT_DATE, INTERVAL 5 DAY), INTERVAL 9 HOUR)\\\\n union all\\\\n select 7, 7, DATE_ADD(DATE_SUB(CURRENT_DATE, INTERVAL 6 DAY), INTERVAL 9 HOUR), \'应还日期7\', DATE_ADD(DATE_SUB(CURRENT_DATE, INTERVAL 6 DAY), INTERVAL 9 HOUR), \'borrowing\', 7, DATE_ADD(DATE_SUB(CURRENT_DATE, INTERVAL 6 DAY), INTERVAL 9 HOUR), DATE_ADD(DATE_SUB(CURRENT_DATE, INTERVAL 6 DAY), INTERVAL 9 HOUR)\\\\n union all\\\\n select 8, 8, DATE_ADD(DATE_SUB(CURRENT_DATE, INTERVAL 7 DAY), INTERVAL 9 HOUR), \'应还日期8\', DATE_ADD(DATE_SUB(CURRENT_DATE, INTERVAL 7 DAY), INTERVAL 9 HOUR), \'returned\', 8, DATE_ADD(DATE_SUB(CURRENT_DATE, INTERVAL 7 DAY), INTERVAL 9 HOUR), DATE_ADD(DATE_SUB(CURRENT_DATE, INTERVAL 7 DAY), INTERVAL 9 HOUR)\\\\n union all\\\\n select 9, 9, DATE_ADD(DATE_SUB(CURRENT_DATE, INTERVAL 8 DAY), INTERVAL 9 HOUR), \'应还日期9\', DATE_ADD(DATE_SUB(CURRENT_DATE, INTERVAL 8 DAY), INTERVAL 9 HOUR), \'overdue\', 9, DATE_ADD(DATE_SUB(CURRENT_DATE, INTERVAL 8 DAY), INTERVAL 9 HOUR), DATE_ADD(DATE_SUB(CURRENT_DATE, INTERVAL 8 DAY), INTERVAL 9 HOUR)\\\\n union all\\\\n select 10, 10, DATE_ADD(DATE_SUB(CURRENT_DATE, INTERVAL 9 DAY), INTERVAL 9 HOUR), \'应还日期10\', DATE_ADD(DATE_SUB(CURRENT_DATE, INTERVAL 9 DAY), INTERVAL 9 HOUR), \'borrowing\', 10, DATE_ADD(DATE_SUB(CURRENT_DATE, INTERVAL 9 DAY), INTERVAL 9 HOUR), DATE_ADD(DATE_SUB(CURRENT_DATE, INTERVAL 9 DAY), INTERVAL 9 HOUR)\\\\n) mock_seed\\\\nwhere not exists (select 1 from `borrowing`);\\\",\\\"functionName\\\":\\\"借阅记录表\\\",\\\"moduleName\\\":\\\"\\\",\\\"operationNote\\\":\\\"借阅记录仅允许新增\\\",\\\"operations\\\":{\\\"add\\\":true,\\\"edit\\\":false,\\\"reason\\\":\\\"借阅记录仅允许新增\\\",\\\"remove\\\":false,\\\"removeType\\\":\\\"none\\\"},\\\"options\\\":\\\"\\\",\\\"removeType\\\":\\\"none\\\",\\\"sort\\\":2,\\\"tableComment\\\":\\\"借阅记录表\\\",\\\"tableId\\\":179,\\\"tableName\\\":\\\"borrowing\\\",\\\"tplCategory\\\":\\\"crud\\\",\\\"tplWebType\\\":\\\"element-plus\\\"},{\\\"adminMenuName\\\":\\\"预约管理\\\",\\\"allowAdd\\\":\\\"1\\\",\\\"allowEdit\\\":\\\"0\\\",\\\"allowRemove\\\":\\\"0\\\",\\\"businessName\\\":\\\"reservation\\\",\\\"className\\\":\\\"Reservation\\\",\\\"columns\\\":[{\\\"columnComment\\\":\\\"主键ID\\\",\\\"columnId\\\":807,\\\"columnLabel\\\":\\\"ID\\\",\\\"columnName\\\":\\\"id\\\",\\\"columnType\\\":\\\"bigint(20)\\\",\\\"dictOptions\\\":\\\"\\\",\\\"dictType\\\":\\\"\\\",\\\"htmlType\\\":\\\"input\\\",\\\"isEdit\\\":\\\"1\\\",\\\"isIncrement\\\":\\\"1\\\",\\\"isInsert\\\":\\\"1\\\",\\\"isList\\\":\\\"1\\\",\\\"isPk\\\":\\\"1\\\",\\\"isQuery\\\":\\\"0\\\",\\\"isRequired\\\":\\\"1\\\",\\\"javaField\\\":\\\"id\\\",\\\"javaType\\\":\\\"Long\\\",\\\"queryType\\\":\\\"EQ\\\",\\\"sort\\\":1,\\\"tableId\\\":180},{\\\"columnComment\\\":\\\"预约读者ID\\\",\\\"columnId\\\":808,\\\"columnLabel\\\":\\\"读者\\\",\\\"columnName\\\":\\\"reader_id\\\",\\\"columnType\\\":\\\"bigint(20)\\\",\\\"dictOptions\\\":\\\"\\\",\\\"dictType\\\":\\\"remote:reader:reader_id:nickname\\\",\\\"htmlType\\\":\\\"select\\\",\\\"isEdit\\\":\\\"1\\\",\\\"isIncrement\\\":\\\"0\\\",\\\"isInsert\\\":\\\"1\\\",\\\"isList\\\":\\\"1\\\",\\\"isPk\\\":\\\"0\\\",\\\"isQuery\\\":\\\"0\\\",\\\"isRequired\\\":\\\"1\\\",\\\"javaField\\\":\\\"readerId\\\",\\\"javaType\\\":\\\"Long\\\",\\\"queryType\\\":\\\"EQ\\\",\\\"sort\\\":2,\\\"tableId\\\":180},{\\\"columnComment\\\":\\\"预约图书ID\\\",\\\"columnId\\\":809,\\\"columnLabel\\\":\\\"图书\\\",\\\"columnName\\\":\\\"book_id\\\",\\\"columnType\\\":\\\"bigint(20)\\\",\\\"dictOptions\\\":\\\"\\\",\\\"dictType\\\":\\\"remote:book_info:id:book_name\\\",\\\"htmlType\\\":\\\"select\\\",\\\"isEdit\\\":\\\"1\\\",\\\"isIncrement\\\":\\\"0\\\",\\\"isInsert\\\":\\\"1\\\",\\\"isList\\\":\\\"1\\\",\\\"isPk\\\":\\\"0\\\",\\\"isQuery\\\":\\\"0\\\",\\\"isRequired\\\":\\\"1\\\",\\\"javaField\\\":\\\"bookId\\\",\\\"javaType\\\":\\\"Long\\\",\\\"queryType\\\":\\\"EQ\\\",\\\"sort\\\":3,\\\"tableId\\\":180},{\\\"columnComment\\\":\\\"预约发起时间\\\",\\\"columnId\\\":810,\\\"columnLabel\\\":\\\"预约时间\\\",\\\"columnName\\\":\\\"reserve_date\\\",\\\"columnType\\\":\\\"datetime\\\",\\\"dictOptions\\\":\\\"\\\",\\\"dictType\\\":\\\"\\\",\\\"htmlType\\\":\\\"datetime\\\",\\\"isEdit\\\":\\\"1\\\",\\\"isIncrement\\\":\\\"0\\\",\\\"isInsert\\\":\\\"1\\\",\\\"isList\\\":\\\"1\\\",\\\"isPk\\\":\\\"0\\\",\\\"isQuery\\\":\\\"1\\\",\\\"isRequired\\\":\\\"1\\\",\\\"javaField\\\":\\\"reserveDate\\\",\\\"javaType\\\":\\\"Date\\\",\\\"queryType\\\":\\\"EQ\\\",\\\"sort\\\":4,\\\"tableId\\\":180},{\\\"columnComment\\\":\\\"预约状态pending-待处理cancelled-已取消fulfilled-已借出\\\",\\\"columnId\\\":811,\\\"columnLabel\\\":\\\"状态\\\",\\\"columnName\\\":\\\"status\\\",\\\"columnType\\\":\\\"varchar(20)\\\",\\\"dictOptions\\\":\\\"[{\\\\\\\"label\\\\\\\":\\\\\\\"待处理\\\\\\\",\\\\\\\"value\\\\\\\":\\\\\\\"pending\\\\\\\"},{\\\\\\\"label\\\\\\\":\\\\\\\"已取消\\\\\\\",\\\\\\\"value\\\\\\\":\\\\\\\"cancelled\\\\\\\"},{\\\\\\\"label\\\\\\\":\\\\\\\"已借出\\\\\\\",\\\\\\\"value\\\\\\\":\\\\\\\"fulfilled\\\\\\\"}]\\\",\\\"dictType\\\":\\\"reservation_status\\\",\\\"htmlType\\\":\\\"select\\\",\\\"isEdit\\\":\\\"1\\\",\\\"isIncrement\\\":\\\"0\\\",\\\"isInsert\\\":\\\"1\\\",\\\"isList\\\":\\\"1\\\",\\\"isPk\\\":\\\"0\\\",\\\"isQuery\\\":\\\"1\\\",\\\"isRequired\\\":\\\"1\\\",\\\"javaField\\\":\\\"status\\\",\\\"javaType\\\":\\\"String\\\",\\\"queryType\\\":\\\"EQ\\\",\\\"sort\\\":5,\\\"tableId\\\":180},{\\\"columnComment\\\":\\\"取消预约的管理员ID\\\",\\\"columnId\\\":812,\\\"columnLabel\\\":\\\"取消操作人\\\",\\\"columnName\\\":\\\"cancel_user_id\\\",\\\"columnType\\\":\\\"bigint(20)\\\",\\\"dictOptions\\\":\\\"\\\",\\\"dictType\\\":\\\"remote:admin:admin_id:username\\\",\\\"htmlType\\\":\\\"select\\\",\\\"isEdit\\\":\\\"1\\\",\\\"isIncrement\\\":\\\"0\\\",\\\"isInsert\\\":\\\"1\\\",\\\"isList\\\":\\\"1\\\",\\\"isPk\\\":\\\"0\\\",\\\"isQuery\\\":\\\"0\\\",\\\"isRequired\\\":\\\"0\\\",\\\"javaField\\\":\\\"cancelUserId\\\",\\\"javaType\\\":\\\"Long\\\",\\\"queryType\\\":\\\"EQ\\\",\\\"sort\\\":6,\\\"tableId\\\":180},{\\\"columnComment\\\":\\\"取消预约的时间\\\",\\\"columnId\\\":813,\\\"columnLabel\\\":\\\"取消时间\\\",\\\"columnName\\\":\\\"cancel_time\\\",\\\"columnType\\\":\\\"datetime\\\",\\\"dictOptions\\\":\\\"\\\",\\\"dictType\\\":\\\"\\\",\\\"htmlType\\\":\\\"datetime\\\",\\\"isEdit\\\":\\\"1\\\",\\\"isIncrement\\\":\\\"0\\\",\\\"isInsert\\\":\\\"1\\\",\\\"isList\\\":\\\"1\\\",\\\"isPk\\\":\\\"0\\\",\\\"isQuery\\\":\\\"1\\\",\\\"isRequired\\\":\\\"0\\\",\\\"javaField\\\":\\\"cancelTime\\\",\\\"javaType\\\":\\\"Date\\\",\\\"queryType\\\":\\\"EQ\\\",\\\"sort\\\":7,\\\"tableId\\\":180},{\\\"columnComment\\\":\\\"确认借出的管理员ID\\\",\\\"columnId\\\":814,\\\"columnLabel\\\":\\\"确认借出操作人\\\",\\\"columnName\\\":\\\"fulfill_user_id\\\",\\\"columnType\\\":\\\"bigint(20)\\\",\\\"dictOptions\\\":\\\"\\\",\\\"dictType\\\":\\\"remote:admin:admin_id:username\\\",\\\"htmlType\\\":\\\"select\\\",\\\"isEdit\\\":\\\"1\\\",\\\"isIncrement\\\":\\\"0\\\",\\\"isInsert\\\":\\\"1\\\",\\\"isList\\\":\\\"1\\\",\\\"isPk\\\":\\\"0\\\",\\\"isQuery\\\":\\\"0\\\",\\\"isRequired\\\":\\\"0\\\",\\\"javaField\\\":\\\"fulfillUserId\\\",\\\"javaType\\\":\\\"Long\\\",\\\"queryType\\\":\\\"EQ\\\",\\\"sort\\\":8,\\\"tableId\\\":180},{\\\"columnComment\\\":\\\"确认借出的时间\\\",\\\"columnId\\\":815,\\\"columnLabel\\\":\\\"借出时间\\\",\\\"columnName\\\":\\\"fulfill_time\\\",\\\"columnType\\\":\\\"datetime\\\",\\\"dictOptions\\\":\\\"\\\",\\\"dictType\\\":\\\"\\\",\\\"htmlType\\\":\\\"datetime\\\",\\\"isEdit\\\":\\\"1\\\",\\\"isIncrement\\\":\\\"0\\\",\\\"isInsert\\\":\\\"1\\\",\\\"isList\\\":\\\"1\\\",\\\"isPk\\\":\\\"0\\\",\\\"isQuery\\\":\\\"1\\\",\\\"isRequired\\\":\\\"0\\\",\\\"javaField\\\":\\\"fulfillTime\\\",\\\"javaType\\\":\\\"Date\\\",\\\"queryType\\\":\\\"EQ\\\",\\\"sort\\\":9,\\\"tableId\\\":180},{\\\"columnComment\\\":\\\"创建时间\\\",\\\"columnId\\\":816,\\\"columnLabel\\\":\\\"创建时间\\\",\\\"columnName\\\":\\\"create_time\\\",\\\"columnType\\\":\\\"datetime\\\",\\\"dictOptions\\\":\\\"\\\",\\\"dictType\\\":\\\"\\\",\\\"htmlType\\\":\\\"datetime\\\",\\\"isEdit\\\":\\\"1\\\",\\\"isIncrement\\\":\\\"0\\\",\\\"isInsert\\\":\\\"1\\\",\\\"isList\\\":\\\"1\\\",\\\"isPk\\\":\\\"0\\\",\\\"isQuery\\\":\\\"1\\\",\\\"isRequired\\\":\\\"0\\\",\\\"javaField\\\":\\\"createTime\\\",\\\"javaType\\\":\\\"Date\\\",\\\"queryType\\\":\\\"EQ\\\",\\\"sort\\\":10,\\\"tableId\\\":180},{\\\"columnComment\\\":\\\"更新时间\\\",\\\"columnId\\\":817,\\\"columnLabel\\\":\\\"更新时间\\\",\\\"columnName\\\":\\\"update_time\\\",\\\"columnType\\\":\\\"datetime\\\",\\\"dictOptions\\\":\\\"\\\",\\\"dictType\\\":\\\"\\\",\\\"htmlType\\\":\\\"datetime\\\",\\\"isEdit\\\":\\\"1\\\",\\\"isIncrement\\\":\\\"0\\\",\\\"isInsert\\\":\\\"1\\\",\\\"isList\\\":\\\"1\\\",\\\"isPk\\\":\\\"0\\\",\\\"isQuery\\\":\\\"0\\\",\\\"isRequired\\\":\\\"0\\\",\\\"javaField\\\":\\\"updateTime\\\",\\\"javaType\\\":\\\"Date\\\",\\\"queryType\\\":\\\"EQ\\\",\\\"sort\\\":11,\\\"tableId\\\":180}],\\\"createTableSql\\\":\\\"CREATE TABLE `reservation` (\\\\n `id` bigint(20) NOT NULL AUTO_INCREMENT COMMENT \'主键ID\',\\\\n `reader_id` bigint(20) NOT NULL COMMENT \'预约读者ID\',\\\\n `book_id` bigint(20) NOT NULL COMMENT \'预约图书ID\',\\\\n `reserve_date` datetime NOT NULL COMMENT \'预约发起时间\',\\\\n `status` varchar(20) NOT NULL COMMENT \'预约状态pending-待处理cancelled-已取消fulfilled-已借出\',\\\\n `cancel_user_id` bigint(20) DEFAULT NULL COMMENT \'取消预约的管理员ID\',\\\\n `cancel_time` datetime DEFAULT NULL COMMENT \'取消预约的时间\',\\\\n `fulfill_user_id` bigint(20) DEFAULT NULL COMMENT \'确认借出的管理员ID\',\\\\n `fulfill_time` datetime DEFAULT NULL COMMENT \'确认借出的时间\',\\\\n `create_time` datetime DEFAULT NULL COMMENT \'创建时间\',\\\\n `update_time` datetime DEFAULT NULL COMMENT \'更新时间\',\\\\n PRIMARY KEY (`id`)\\\\n) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT=\'预约记录表\';\\\\n\\\\ninsert into `reservation` (`reader_id`, `book_id`, `reserve_date`, `status`, `cancel_user_id`, `cancel_time`, `fulfill_user_id`, `fulfill_time`, `create_time`, `update_time`)\\\\nselect * from (\\\\n select 1 as `reader_id`, 1 as `book_id`, DATE_ADD(DATE_SUB(CURRENT_DATE, INTERVAL 0 DAY), INTERVAL 9 HOUR) as `reserve_date`, \'pending\' as `status`, 1 as `cancel_user_id`, DATE_ADD(DATE_SUB(CURRENT_DATE, INTERVAL 0 DAY), INTERVAL 9 HOUR) as `cancel_time`, 1 as `fulfill_user_id`, DATE_ADD(DATE_SUB(CURRENT_DATE, INTERVAL 0 DAY), INTERVAL 9 HOUR) as `fulfill_time`, DATE_ADD(DATE_SUB(CURRENT_DATE, INTERVAL 0 DAY), INTERVAL 9 HOUR) as `create_time`, DATE_ADD(DATE_SUB(CURRENT_DATE, INTERVAL 0 DAY), INTERVAL 9 HOUR) as `update_time`\\\\n union all\\\\n select 2, 2, DATE_ADD(DATE_SUB(CURRENT_DATE, INTERVAL 1 DAY), INTERVAL 9 HOUR), \'cancelled\', 2, DATE_ADD(DATE_SUB(CURRENT_DATE, INTERVAL 1 DAY), INTERVAL 9 HOUR), 2, DATE_ADD(DATE_SUB(CURRENT_DATE, INTERVAL 1 DAY), INTERVAL 9 HOUR), DATE_ADD(DATE_SUB(CURRENT_DATE, INTERVAL 1 DAY), INTERVAL 9 HOUR), DATE_ADD(DATE_SUB(CURRENT_DATE, INTERVAL 1 DAY), INTERVAL 9 HOUR)\\\\n union all\\\\n select 3, 3, DATE_ADD(DATE_SUB(CURRENT_DATE, INTERVAL 2 DAY), INTERVAL 9 HOUR), \'fulfilled\', 3, DATE_ADD(DATE_SUB(CURRENT_DATE, INTERVAL 2 DAY), INTERVAL 9 HOUR), 3, DATE_ADD(DATE_SUB(CURRENT_DATE, INTERVAL 2 DAY), INTERVAL 9 HOUR), DATE_ADD(DATE_SUB(CURRENT_DATE, INTERVAL 2 DAY), INTERVAL 9 HOUR), DATE_ADD(DATE_SUB(CURRENT_DATE, INTERVAL 2 DAY), INTERVAL 9 HOUR)\\\\n union all\\\\n select 4, 4, DATE_ADD(DATE_SUB(CURRENT_DATE, INTERVAL 3 DAY), INTERVAL 9 HOUR), \'pending\', 4, DATE_ADD(DATE_SUB(CURRENT_DATE, INTERVAL 3 DAY), INTERVAL 9 HOUR), 4, DATE_ADD(DATE_SUB(CURRENT_DATE, INTERVAL 3 DAY), INTERVAL 9 HOUR), DATE_ADD(DATE_SUB(CURRENT_DATE, INTERVAL 3 DAY), INTERVAL 9 HOUR), DATE_ADD(DATE_SUB(CURRENT_DATE, INTERVAL 3 DAY), INTERVAL 9 HOUR)\\\\n union all\\\\n select 5, 5, DATE_ADD(DATE_SUB(CURRENT_DATE, INTERVAL 4 DAY), INTERVAL 9 HOUR), \'cancelled\', 5, DATE_ADD(DATE_SUB(CURRENT_DATE, INTERVAL 4 DAY), INTERVAL 9 HOUR), 5, DATE_ADD(DATE_SUB(CURRENT_DATE, INTERVAL 4 DAY), INTERVAL 9 HOUR), DATE_ADD(DATE_SUB(CURRENT_DATE, INTERVAL 4 DAY), INTERVAL 9 HOUR), DATE_ADD(DATE_SUB(CURRENT_DATE, INTERVAL 4 DAY), INTERVAL 9 HOUR)\\\\n union all\\\\n select 6, 6, DATE_ADD(DATE_SUB(CURRENT_DATE, INTERVAL 5 DAY), INTERVAL 9 HOUR), \'fulfilled\', 6, DATE_ADD(DATE_SUB(CURRENT_DATE, INTERVAL 5 DAY), INTERVAL 9 HOUR), 6, DATE_ADD(DATE_SUB(CURRENT_DATE, INTERVAL 5 DAY), INTERVAL 9 HOUR), DATE_ADD(DATE_SUB(CURRENT_DATE, INTERVAL 5 DAY), INTERVAL 9 HOUR), DATE_ADD(DATE_SUB(CURRENT_DATE, INTERVAL 5 DAY), INTERVAL 9 HOU...\"}', '{\"attemptCount\":2,\"responses\":[\"{\\n \\\"version\\\": \\\"1.0\\\",\\n \\\"code\\\": \\\"reservation_flow\\\",\\n \\\"name\\\": \\\"预约管理流程\\\",\\n \\\"mainTable\\\": \\\"reservation\\\",\\n \\\"statusField\\\": \\\"status\\\",\\n \\\"notFoundMessage\\\": \\\"预约记录不存在\\\",\\n \\\"states\\\": [\\n {\\n \\\"code\\\": \\\"pending\\\",\\n \\\"label\\\": \\\"待处理\\\"\\n },\\n {\\n \\\"code\\\": \\\"cancelled\\\",\\n \\\"label\\\": \\\"已取消\\\"\\n },\\n {\\n \\\"code\\\": \\\"fulfilled\\\",\\n \\\"label\\\": \\\"已借出\\\"\\n }\\n ],\\n \\\"actions\\\": [\\n {\\n \\\"code\\\": \\\"cancel_by_reader\\\",\\n \\\"name\\\": \\\"取消预约(读者)\\\",\\n \\\"from\\\": \\\"pending\\\",\\n \\\"to\\\": \\\"cancelled\\\",\\n \\\"actor\\\": \\\"reader\\\",\\n \\\"method\\\": \\\"POST\\\",\\n \\\"path\\\": \\\"/reservation/cancel\\\",\\n \\\"invalidStateMessage\\\": \\\"当前状态不能取消\\\",\\n \\\"successMessage\\\": \\\"预约已取消\\\",\\n \\\"audit\\\": {\\n \\\"userField\\\": \\\"cancel_user_id\\\",\\n \\\"timeField\\\": \\\"cancel_time\\\"\\n },\\n \\\"effects\\\": [],\\n \\\"button\\\": {\\n \\\"scope\\\": \\\"reader\\\",\\n \\\"pageCode\\\": \\\"my_reservations_page\\\",\\n \\\"slot\\\": \\\"list.rowActions\\\",\\n \\\"type\\\": \\\"danger\\\",\\n \\\"confirm\\\": \\\"确认取消预约吗?\\\",\\n \\\"order\\\": 10\\n }\\n },\\n {\\n \\\"code\\\": \\\"cancel_by_admin\\\",\\n \\\"name\\\": \\\"取消预约(管理员)\\\",\\n \\\"from\\\": \\\"pending\\\",\\n \\\"to\\\": \\\"cancelled\\\",\\n \\\"actor\\\": \\\"admin\\\",\\n \\\"method\\\": \\\"POST\\\",\\n \\\"path\\\": \\\"/reservation/cancel\\\",\\n \\\"invalidStateMessage\\\": \\\"当前状态不能取消\\\",\\n \\\"successMessage\\\": \\\"预约已取消\\\",\\n \\\"audit\\\": {\\n \\\"userField\\\": \\\"cancel_user_id\\\",\\n \\\"timeField\\\": \\\"cancel_time\\\"\\n },\\n \\\"effects\\\": [],\\n \\\"button\\\": {\\n \\\"scope\\\": \\\"admin\\\",\\n \\\"pageCode\\\": \\\"reservation_admin_page\\\",\\n \\\"slot\\\": \\\"list.rowActions\\\",\\n \\\"type\\\": \\\"danger\\\",\\n \\\"confirm\\\": \\\"确认取消预约吗?\\\",\\n \\\"order\\\": 10\\n }\\n },\\n {\\n \\\"code\\\": \\\"fulfill\\\",\\n \\\"name\\\": \\\"确认借出\\\",\\n \\\"from\\\": \\\"pending\\\",\\n \\\"to\\\": \\\"fulfilled\\\",\\n \\\"actor\\\": \\\"admin\\\",\\n \\\"method\\\": \\\"POST\\\",\\n \\\"path\\\": \\\"/reservation/fulfill\\\",\\n \\\"invalidStateMessage\\\": \\\"当前状态不能确认借出\\\",\\n \\\"successMessage\\\": \\\"借出成功,已创建借阅记录\\\",\\n \\\"audit\\\": {\\n \\\"userField\\\": \\\"fulfill_user_id\\\",\\n \\\"timeField\\\": \\\"fulfill_time\\\"\\n },\\n \\\"effects\\\": [\\n {\\n \\\"type\\\": \\\"decrease\\\",\\n \\\"table\\\": \\\"book_info\\\",\\n \\\"relationField\\\": \\\"book_id\\\",\\n \\\"field\\\": \\\"stock\\\",\\n \\\"amount\\\": \\\"1\\\",\\n \\\"min\\\": \\\"0\\\",\\n \\\"notFoundMessage\\\": \\\"图书不存在\\\",\\n \\\"errorMessage\\\": \\\"图书库存不足\\\"\\n },\\n {\\n \\\"type\\\": \\\"create_record\\\",\\n \\\"table\\\": \\\"borrowing\\\",\\n \\\"values\\\": {\\n \\\"reader_id\\\": \\\"record.reader_id\\\",\\n \\\"book_id\\\": \\\"record.book_id\\\",\\n \\\"borrow_date\\\": \\\"now\\\",\\n \\\"due_date\\\": \\\"30天后\\\",\\n \\\"return_date\\\": \\\"null\\\",\\n \\\"status\\\": \\\"borrowing\\\",\\n \\\"renew_count\\\": \\\"0\\\"\\n },\\n \\\"notFoundMessage\\\": \\\"创建借阅记录失败\\\",\\n \\\"errorMessage\\\": \\\"无法创建借阅记录\\\"\\n }\\n ],\\n \\\"button\\\": {\\n \\\"scope\\\": \\\"admin\\\",\\n \\\"pageCode\\\": \\\"reservation_admin_page\\\",\\n \\\"slot\\\": \\\"list.rowActions\\\",\\n \\\"type\\\": \\\"success\\\",\\n \\\"confirm\\\": \\\"确认借出并创建借阅记录?\\\",\\n \\\"order\\\": 20\\n }\\n }\\n ],\\n \\\"metrics\\\": [\\n {\\n \\\"code\\\": \\\"pending_reservations\\\",\\n \\\"name\\\": \\\"待处理预约\\\",\\n \\\"table\\\": \\\"reservation\\\",\\n \\\"aggregate\\\": \\\"count\\\",\\n \\\"field\\\": \\\"id\\\",\\n \\\"status\\\": \\\"pending\\\",\\n \\\"unit\\\": \\\"条\\\"\\n },\\n {\\n \\\"code\\\": \\\"fulfilled_reservations\\\",\\n \\\"name\\\": \\\"已借出预约\\\",\\n \\\"table\\\": \\\"reservation\\\",\\n \\\"aggregate\\\": \\\"count\\\",\\n \\\"field\\\": \\\"id\\\",\\n \\\"status\\\": \\\"fulfilled\\\",\\n \\\"unit\\\": \\\"条\\\"\\n },\\n {\\n \\\"code\\\": \\\"cancelled_reservations\\\",\\n \\\"name\\\": \\\"已取消预约\\\",\\n \\\"table\\\": \\\"reservation\\\",\\n \\\"aggregate\\\": \\\"count\\\",\\n \\\"field\\\": \\\"id\\\",\\n \\\"status\\\": \\\"cancelled\\\",\\n \\\"unit\\\": \\\"条\\\"\\n }\\n ]\\n}\",\"{\\n \\\"version\\\": \\\"1.0\\\",\\n \\\"code\\\": \\\"reservation_flow\\\",\\n \\\"name\\\": \\\"预约管理流程\\\",\\n \\\"mainTable\\\": \\\"reservation\\\",\\n \\\"statusField\\\": \\\"status\\\",\\n \\\"notFoundMessage\\\": \\\"预约记录不存在\\\",\\n \\\"states\\\": [\\n {\\\"code\\\": \\\"pending\\\", \\\"label\\\": \\\"待处理\\\"},\\n {\\\"code\\\": \\\"cancelled\\\", \\\"label\\\": \\\"已取消\\\"},\\n {\\\"code\\\": \\\"fulfilled\\\", \\\"label\\\": \\\"已借出\\\"}\\n ],\\n \\\"actions\\\": [\\n {\\n \\\"code\\\": \\\"cancel_by_reader\\\",\\n \\\"name\\\": \\\"取消预约(读者)\\\",\\n \\\"from\\\": \\\"pending\\\",\\n \\\"to\\\": \\\"cancelled\\\",\\n \\\"actor\\\": \\\"reader\\\",\\n \\\"method\\\": \\\"POST\\\",\\n \\\"path\\\": \\\"/reservation/cancel\\\",\\n \\\"invalidStateMessage\\\": \\\"当前状态不能取消\\\",\\n \\\"successMessage\\\": \\\"预约已取消\\\",\\n \\\"audit\\\": {\\\"userField\\\": \\\"cancel_user_id\\\", \\\"timeField\\\": \\\"cancel_time\\\"},\\n \\\"effects\\\": [],\\n \\\"button\\\": {\\n \\\"scope\\\": \\\"reader\\\",\\n \\\"pageCode\\\": \\\"my_reservations_page\\\",\\n \\\"slot\\\": \\\"list.rowActions\\\",\\n \\\"type\\\": \\\"danger\\\",\\n \\\"confirm\\\": \\\"确认取消预约吗?\\\",\\n \\\"order\\\": 10\\n }\\n },\\n {\\n \\\"code\\\": \\\"cancel_by_admin\\\",\\n \\\"name\\\": \\\"取消预约(管理员)\\\",\\n \\\"from\\\": \\\"pending\\\",\\n \\\"to\\\": \\\"cancelled\\\",\\n \\\"actor\\\": \\\"admin\\\",\\n \\\"method\\\": \\\"POST\\\",\\n \\\"path\\\": \\\"/reservation/cancel\\\",\\n \\\"invalidStateMessage\\\": \\\"当前状态不能取消\\\",\\n \\\"successMessage\\\": \\\"预约已取消\\\",\\n \\\"audit\\\": {\\\"userField\\\": \\\"cancel_user_id\\\", \\\"timeField\\\": \\\"cancel_time\\\"},\\n \\\"effects\\\": [],\\n \\\"button\\\": {\\n \\\"scope\\\": \\\"admin\\\",\\n \\\"pageCode\\\": \\\"reservation_admin_page\\\",\\n \\\"slot\\\": \\\"list.rowActions\\\",\\n \\\"type\\\": \\\"danger\\\",\\n \\\"confirm\\\": \\\"确认取消预约吗?\\\",\\n \\\"order\\\": 10\\n }\\n },\\n {\\n \\\"code\\\": \\\"fulfill\\\",\\n \\\"name\\\": \\\"确认借出\\\",\\n \\\"from\\\": \\\"pending\\\",\\n \\\"to\\\": \\\"fulfilled\\\",\\n \\\"actor\\\": \\\"admin\\\",\\n \\\"method\\\": \\\"POST\\\",\\n \\\"path\\\": \\\"/reservation/fulfill\\\",\\n \\\"invalidStateMessage\\\": \\\"当前状态不能确认借出\\\",\\n \\\"successMessage\\\": \\\"借出成功,已创建借阅记录\\\",\\n \\\"audit\\\": {\\\"userField\\\": \\\"fulfill_user_id\\\", \\\"timeField\\\": \\\"fulfill_time\\\"},\\n \\\"effects\\\": [\\n {\\n \\\"type\\\": \\\"decrease\\\",\\n \\\"table\\\": \\\"book_info\\\",\\n \\\"relationField\\\": \\\"book_id\\\",\\n \\\"field\\\": \\\"stock\\\",\\n \\\"amount\\\": \\\"1\\\",\\n \\\"min\\\": \\\"0\\\",\\n \\\"notFoundMessage\\\": \\\"图书不存在\\\",\\n \\\"errorMessage\\\": \\\"图书库存不足\\\"\\n },\\n {\\n \\\"type\\\": \\\"create_record\\\",\\n \\\"table\\\": \\\"borrowing\\\",\\n \\\"values\\\": {\\n \\\"reader_id\\\": \\\"record.reader_id\\\",\\n \\\"book_id\\\": \\\"record.book_id\\\",\\n \\\"borrow_date\\\": \\\"now\\\",\\n \\\"due_date\\\": \\\"2028-12-31 23:59:59\\\",\\n \\\"return_date\\\": null,\\n \\\"status\\\": \\\"borrowing\\\",\\n \\\"renew_count\\\": \\\"0\\\"\\n },\\n \\\"notFoundMessage\\\": \\\"创建借阅记录失败\\\",\\n \\\"errorMessage\\\": \\\"无法创建借阅记录\\\"\\n }\\n ],\\n \\\"button\\\": {\\n \\\"scope\\\": \\\"admin\\\",\\n \\\"pageCode\\\": \\\"reservation_admin_page\\\",\\n \\\"slot\\\": \\\"list.rowActions\\\",\\n \\\"type\\\": \\\"success\\\",\\n \\\"confirm\\\": \\\"确认借出并创建借阅记录?\\\",\\n \\\"order\\\": 20\\n }\\n }\\n ],\\n \\\"metrics\\\": [\\n {\\\"code\\\": \\\"pending_reservations\\\", \\\"name\\\": \\\"待处理预约\\\", \\\"table\\\": \\\"reservation\\\", \\\"aggregate\\\": \\\"count\\\", \\\"field\\\": \\\"id\\\", \\\"status\\\": \\\"pending\\\", \\\"unit\\\": \\\"条\\\"},\\n {\\\"code\\\": \\\"fulfilled_reservations\\\", \\\"name\\\": \\\"已借出预约\\\", \\\"table\\\": \\\"reservation\\\", \\\"aggregate\\\": \\\"count\\\", \\\"field\\\": \\\"id\\\", \\\"status\\\": \\\"fulfilled\\\", \\\"unit\\\": \\\"条\\\"},\\n {\\\"code\\\": \\\"cancelled_reservations\\\", \\\"name\\\": \\\"已取消预约\\\", \\\"table\\\": \\\"reservation\\\", \\\"aggregate\\\": \\\"count\\\", \\\"field\\\": \\\"id\\\", \\\"status\\\": \\\"cancelled\\\", \\\"unit\\\": \\\"条\\\"}\\n ]\\n}\"]}', '0', 'Flow config value type is invalid: borrowing.return_date=', 149707, '2026-07-15 09:46:54');
INSERT INTO `factory_ai_stage_output` VALUES (140, 116, 111, 100, 'app_blueprint', '{\"projectName\":\"图书管理系统\",\"projectDescription\":\"功能:借书、还书、预约、取消预约\\n角色用户、管理员\\n其他模块轮播图、公告、新闻\",\"industryTemplate\":\"\",\"stylePreset\":\"dark-tech\",\"extraRequirements\":\"\"}', '{\n \"roles\": [\n {\n \"code\": \"admin\",\n \"name\": \"管理员\",\n \"description\": \"系统管理员,负责图书、借阅、预约、轮播图、公告、新闻等模块的后台管理。\"\n },\n {\n \"code\": \"reader\",\n \"name\": \"读者\",\n \"description\": \"普通读者,可浏览图书、借书、还书、预约、取消预约,管理个人资料。\"\n }\n ],\n \"frontendMenus\": [\n {\n \"code\": \"book_catalog\",\n \"name\": \"图书目录\",\n \"path\": \"/books\",\n \"pageCode\": \"book_catalog_page\",\n \"requiresLogin\": false,\n \"visibleRoles\": [],\n \"dataScope\": \"PUBLIC\"\n },\n {\n \"code\": \"my_borrowings\",\n \"name\": \"我的借阅\",\n \"path\": \"/my/borrowings\",\n \"pageCode\": \"my_borrowings_page\",\n \"requiresLogin\": true,\n \"visibleRoles\": [\"reader\"],\n \"dataScope\": \"CURRENT_USER\"\n },\n {\n \"code\": \"my_reservations\",\n \"name\": \"我的预约\",\n \"path\": \"/my/reservations\",\n \"pageCode\": \"my_reservations_page\",\n \"requiresLogin\": true,\n \"visibleRoles\": [\"reader\"],\n \"dataScope\": \"CURRENT_USER\"\n },\n {\n \"code\": \"reader_profile\",\n \"name\": \"个人资料\",\n \"path\": \"/reader/profile\",\n \"pageCode\": \"reader_profile_page\",\n \"requiresLogin\": true,\n \"visibleRoles\": [\"reader\"],\n \"dataScope\": \"CURRENT_USER\"\n }\n ],\n \"frontendPages\": [\n {\n \"code\": \"book_catalog_page\",\n \"name\": \"图书目录\",\n \"menuCode\": \"book_catalog\",\n \"path\": \"/books\",\n \"pageType\": \"list\",\n \"tableName\": \"book_info\"\n },\n {\n \"code\": \"my_borrowings_page\",\n \"name\": \"我的借阅\",\n \"menuCode\": \"my_borrowings\",\n \"path\": \"/my/borrowings\",\n \"pageType\": \"current_user_list\",\n \"tableName\": \"borrowing\"\n },\n {\n \"code\": \"my_reservations_page\",\n \"name\": \"我的预约\",\n \"menuCode\": \"my_reservations\",\n \"path\": \"/my/reservations\",\n \"pageType\": \"current_user_list\",\n \"tableName\": \"reservation\"\n },\n {\n \"code\": \"reader_profile_page\",\n \"name\": \"个人资料\",\n \"menuCode\": \"reader_profile\",\n \"path\": \"/reader/profile\",\n \"pageType\": \"form\",\n \"tableName\": \"reader\"\n }\n ],\n \"adminMenus\": [\n {\n \"code\": \"book_admin\",\n \"name\": \"图书管理\",\n \"path\": \"/admin/books\",\n \"pageCode\": \"book_admin_page\",\n \"tableName\": \"book_info\",\n \"pageType\": \"list\",\n \"requiresLogin\": true,\n \"visibleRoles\": [\"admin\"],\n \"dataScope\": \"ROLE\"\n },\n {\n \"code\": \"borrowing_admin\",\n \"name\": \"借阅管理\",\n \"path\": \"/admin/borrowings\",\n \"pageCode\": \"borrowing_admin_page\",\n \"tableName\": \"borrowing\",\n \"pageType\": \"list\",\n \"requiresLogin\": true,\n \"visibleRoles\": [\"admin\"],\n \"dataScope\": \"ROLE\"\n },\n {\n \"code\": \"reservation_admin\",\n \"name\": \"预约管理\",\n \"path\": \"/admin/reservations\",\n \"pageCode\": \"reservation_admin_page\",\n \"tableName\": \"reservation\",\n \"pageType\": \"list\",\n \"requiresLogin\": true,\n \"visibleRoles\": [\"admin\"],\n \"dataScope\": \"ROLE\"\n },\n {\n \"code\": \"banner_admin\",\n \"name\": \"轮播图管理\",\n \"path\": \"/admin/banners\",\n \"pageCode\": \"banner_admin_page\",\n \"tableName\": \"banner\",\n \"pageType\": \"list\",\n \"requiresLogin\": true,\n \"visibleRoles\": [\"admin\"],\n \"dataScope\": \"ROLE\"\n },\n {\n \"code\": \"announcement_admin\",\n \"name\": \"公告管理\",\n \"path\": \"/admin/announcements\",\n \"pageCode\": \"announcement_admin_page\",\n \"tableName\": \"announcement\",\n \"pageType\": \"list\",\n \"requiresLogin\": true,\n \"visibleRoles\": [\"admin\"],\n \"dataScope\": \"ROLE\"\n },\n {\n \"code\": \"news_admin\",\n \"name\": \"新闻管理\",\n \"path\": \"/admin/news\",\n \"pageCode\": \"news_admin_page\",\n \"tableName\": \"news\",\n \"pageType\": \"list\",\n \"requiresLogin\": true,\n \"visibleRoles\": [\"admin\"],\n \"dataScope\": \"ROLE\"\n },\n {\n \"code\": \"admin_profile\",\n \"name\": \"个人资料\",\n \"path\": \"/admin/profile\",\n \"pageCode\": \"admin_profile_page\",\n \"tableName\": \"admin\",\n \"pageType\": \"form\",\n \"requiresLogin\": true,\n \"visibleRoles\": [\"admin\"],\n \"dataScope\": \"CURRENT_USER\"\n }\n ],\n \"adminHomeDashboard\": {\n \"title\": \"运营总览\",\n \"description\": \"核心业务数据\",\n \"metrics\": [\n {\n \"label\": \"总图书数\",\n \"value\": \"COUNT(book_info)\",\n \"semantic\": \"inventory\"\n },\n {\n \"label\": \"总借出数\",\n \"value\": \"COUNT(borrowing WHERE status=\'borrowed\')\",\n \"semantic\": \"order\"\n },\n {\n \"label\": \"今日借书数\",\n \"value\": \"COUNT(borrowing WHERE borrow_date=TODAY)\",\n \"semantic\": \"order\"\n },\n {\n \"label\": \"今日还书数\",\n \"value\": \"COUNT(borrowing WHERE return_date=TODAY)\",\n \"semantic\": \"order\"\n }\n ],\n \"charts\": [\n {\n \"name\": \"近7天借还趋势\",\n \"type\": \"line\",\n \"semantic\": \"order\"\n },\n {\n \"name\": \"图书分类分布\",\n \"type\": \"pie\",\n \"semantic\": \"inventory\"\n }\n ]\n }\n}', '1', NULL, 39612, '2026-07-15 10:58:35');
INSERT INTO `factory_ai_stage_output` VALUES (141, 116, 111, 100, 'flow_config', '{\"mode\":\"generate\",\"projectName\":\"图书管理系统\",\"projectDescription\":\"功能:借书、还书、预约、取消预约\\n角色用户、管理员\\n其他模块轮播图、公告、新闻\",\"industryTemplate\":\"\",\"stylePreset\":\"dark-tech\",\"extraRequirements\":\"\",\"requiredActionCodes\":[\"cancel_reservation\",\"reserve_book\",\"borrow_book\",\"return_book\"],\"confirmedAppBlueprint\":{\"adminHomeDashboard\":{\"charts\":[{\"filters\":[],\"metrics\":[{\"aggregate\":\"count\"}],\"semantic\":\"order\",\"type\":\"line\"},{\"filters\":[],\"metrics\":[{\"aggregate\":\"count\"}],\"semantic\":\"inventory\",\"type\":\"pie\"}],\"description\":\"核心业务数据\",\"metrics\":[{\"aggregate\":\"count\",\"filters\":[],\"semantic\":\"inventory\"},{\"aggregate\":\"count\",\"filters\":[],\"semantic\":\"order\"},{\"aggregate\":\"count\",\"filters\":[],\"semantic\":\"order\"},{\"aggregate\":\"count\",\"filters\":[],\"semantic\":\"order\"}],\"title\":\"运营总览\"},\"adminMenus\":[{\"code\":\"book_admin\",\"dataScope\":\"ROLE\",\"name\":\"图书管理\",\"pageCode\":\"book_admin_page\",\"pageType\":\"list\",\"path\":\"/admin/books\",\"requiresLogin\":true,\"tableName\":\"book_info\",\"visibleRoles\":[\"admin\"]},{\"code\":\"borrowing_admin\",\"dataScope\":\"ROLE\",\"name\":\"借阅管理\",\"pageCode\":\"borrowing_admin_page\",\"pageType\":\"list\",\"path\":\"/admin/borrowings\",\"requiresLogin\":true,\"tableName\":\"borrowing\",\"visibleRoles\":[\"admin\"]},{\"code\":\"reservation_admin\",\"dataScope\":\"ROLE\",\"name\":\"预约管理\",\"pageCode\":\"reservation_admin_page\",\"pageType\":\"list\",\"path\":\"/admin/reservations\",\"requiresLogin\":true,\"tableName\":\"reservation\",\"visibleRoles\":[\"admin\"]},{\"code\":\"banner_admin\",\"dataScope\":\"ROLE\",\"name\":\"轮播图管理\",\"pageCode\":\"banner_admin_page\",\"pageType\":\"list\",\"path\":\"/admin/banners\",\"requiresLogin\":true,\"tableName\":\"banner\",\"visibleRoles\":[\"admin\"]},{\"code\":\"announcement_admin\",\"dataScope\":\"ROLE\",\"name\":\"公告管理\",\"pageCode\":\"announcement_admin_page\",\"pageType\":\"list\",\"path\":\"/admin/announcements\",\"requiresLogin\":true,\"tableName\":\"announcement\",\"visibleRoles\":[\"admin\"]},{\"code\":\"news_admin\",\"dataScope\":\"ROLE\",\"name\":\"新闻管理\",\"pageCode\":\"news_admin_page\",\"pageType\":\"list\",\"path\":\"/admin/news\",\"requiresLogin\":true,\"tableName\":\"news\",\"visibleRoles\":[\"admin\"]},{\"code\":\"admin_profile\",\"dataScope\":\"CURRENT_USER\",\"name\":\"个人资料\",\"pageCode\":\"admin_profile_page\",\"pageType\":\"form\",\"path\":\"/admin/profile\",\"requiresLogin\":true,\"tableName\":\"admin\",\"visibleRoles\":[\"admin\"]}],\"frontendMenus\":[{\"code\":\"book_catalog\",\"dataScope\":\"PUBLIC\",\"name\":\"图书目录\",\"pageCode\":\"book_catalog_page\",\"pageType\":\"\",\"path\":\"/books\",\"requiresLogin\":false,\"tableName\":\"\",\"visibleRoles\":[]},{\"code\":\"my_borrowings\",\"dataScope\":\"CURRENT_USER\",\"name\":\"我的借阅\",\"pageCode\":\"my_borrowings_page\",\"pageType\":\"\",\"path\":\"/my/borrowings\",\"requiresLogin\":true,\"tableName\":\"\",\"visibleRoles\":[\"reader\"]},{\"code\":\"my_reservations\",\"dataScope\":\"CURRENT_USER\",\"name\":\"我的预约\",\"pageCode\":\"my_reservations_page\",\"pageType\":\"\",\"path\":\"/my/reservations\",\"requiresLogin\":true,\"tableName\":\"\",\"visibleRoles\":[\"reader\"]},{\"code\":\"reader_profile\",\"dataScope\":\"CURRENT_USER\",\"name\":\"个人资料\",\"pageCode\":\"reader_profile_page\",\"pageType\":\"\",\"path\":\"/reader/profile\",\"requiresLogin\":true,\"tableName\":\"\",\"visibleRoles\":[\"reader\"]}],\"frontendPages\":[{\"code\":\"book_catalog_page\",\"menuCode\":\"book_catalog\",\"name\":\"图书目录\",\"pageType\":\"list\",\"parentPageCode\":\"\",\"path\":\"/books\",\"tableName\":\"book_info\"},{\"code\":\"my_borrowings_page\",\"menuCode\":\"my_borrowings\",\"name\":\"我的借阅\",\"pageType\":\"current_user_list\",\"parentPageCode\":\"\",\"path\":\"/my/borrowings\",\"tableName\":\"borrowing\"},{\"code\":\"my_reservations_page\",\"menuCode\":\"my_reservations\",\"name\":\"我的预约\",\"pageType\":\"current_user_list\",\"parentPageCode\":\"\",\"path\":\"/my/reservations\",\"tableName\":\"reservation\"},{\"code\":\"reader_profile_page\",\"menuCode\":\"reader_profile\",\"name\":\"个人资料\",\"pageType\":\"form\",\"parentPageCode\":\"\",\"path\":\"/reader/profile\",\"tableName\":\"reader\"}],\"roles\":[{\"code\":\"admin\",\"description\":\"系统管理员,负责图书、借阅、预约、轮播图、公告、新闻等模块的后台管理。\",\"name\":\"管理员\"},{\"code\":\"reader\",\"description\":\"普通读者,可浏览图书、借书、还书、预约、取消预约,管理个人资料。\",\"name\":\"读者\"}]}}', '{\n \"version\": \"1.1\",\n \"code\": \"library_circulation\",\n \"name\": \"图书流通\",\n \"flows\": [\n {\n \"code\": \"reservation_flow\",\n \"name\": \"图书预约\",\n \"mainTable\": \"reservation\",\n \"statusField\": \"status\",\n \"notFoundMessage\": \"预约记录不存在\",\n \"states\": [\n { \"code\": \"pending\", \"label\": \"待处理\" },\n { \"code\": \"cancelled\", \"label\": \"已取消\" }\n ],\n \"actions\": [\n {\n \"code\": \"reserve_book\",\n \"name\": \"预约\",\n \"actor\": \"reader\",\n \"ownerTable\": \"book_info\",\n \"requestFields\": [\"id\"],\n \"method\": \"POST\",\n \"path\": \"/book-info/reserve\",\n \"successMessage\": \"预约成功\",\n \"effects\": [\n {\n \"type\": \"create_record\",\n \"table\": \"reservation\",\n \"values\": {\n \"book_id\": \"record.id\",\n \"reader_id\": \"currentUserId\",\n \"status\": \"pending\",\n \"reserve_date\": \"now\"\n }\n }\n ],\n \"button\": {\n \"scope\": \"reader\",\n \"pageCode\": \"book_catalog_page\",\n \"tableName\": \"book_info\",\n \"slot\": \"list.rowActions\",\n \"type\": \"primary\",\n \"confirm\": \"确认预约吗?\",\n \"order\": 10\n }\n },\n {\n \"code\": \"cancel_reservation\",\n \"name\": \"取消预约\",\n \"from\": \"pending\",\n \"to\": \"cancelled\",\n \"actor\": \"reader\",\n \"ownerTable\": \"reservation\",\n \"requestFields\": [\"id\"],\n \"method\": \"POST\",\n \"path\": \"/reservation/cancel\",\n \"button\": {\n \"scope\": \"reader\",\n \"pageCode\": \"my_reservations_page\",\n \"tableName\": \"reservation\",\n \"slot\": \"list.rowActions\",\n \"type\": \"danger\",\n \"confirm\": \"确认取消预约吗?\",\n \"order\": 10\n }\n }\n ],\n \"metrics\": []\n },\n {\n \"code\": \"borrowing_flow\",\n \"name\": \"图书借阅\",\n \"mainTable\": \"borrowing\",\n \"statusField\": \"status\",\n \"notFoundMessage\": \"借阅记录不存在\",\n \"states\": [\n { \"code\": \"borrowing\", \"label\": \"借阅中\" },\n { \"code\": \"returned\", \"label\": \"已归还\" }\n ],\n \"actions\": [\n {\n \"code\": \"borrow_book\",\n \"name\": \"借书\",\n \"actor\": \"reader\",\n \"ownerTable\": \"book_info\",\n \"requestFields\": [\"id\"],\n \"method\": \"POST\",\n \"path\": \"/book-info/borrow\",\n \"successMessage\": \"借书成功\",\n \"effects\": [\n {\n \"type\": \"create_record\",\n \"table\": \"borrowing\",\n \"values\": {\n \"book_id\": \"record.id\",\n \"reader_id\": \"currentUserId\",\n \"status\": \"borrowing\",\n \"borrow_date\": \"now\"\n }\n },\n {\n \"type\": \"decrease\",\n \"table\": \"book_info\",\n \"relationField\": \"id\",\n \"field\": \"stock\",\n \"amount\": \"1\",\n \"min\": \"0\",\n \"errorMessage\": \"图书库存不足\"\n }\n ],\n \"button\": {\n \"scope\": \"reader\",\n \"pageCode\": \"book_catalog_page\",\n \"tableName\": \"book_info\",\n \"slot\": \"list.rowActions\",\n \"type\": \"success\",\n \"confirm\": \"确认借书吗?\",\n \"order\": 20\n }\n },\n {\n \"code\": \"return_book\",\n \"name\": \"还书\",\n \"from\": \"borrowing\",\n \"to\": \"returned\",\n \"actor\": \"reader\",\n \"ownerTable\": \"borrowing\",\n \"requestFields\": [\"id\"],\n \"method\": \"POST\",\n \"path\": \"/borrowing/return\",\n \"effects\": [\n {\n \"type\": \"increase\",\n \"table\": \"book_info\",\n \"relationField\": \"book_id\",\n \"field\": \"stock\",\n \"amount\": \"1\"\n }\n ],\n \"button\": {\n \"scope\": \"reader\",\n \"pageCode\": \"my_borrowings_page\",\n \"tableName\": \"borrowing\",\n \"slot\": \"list.rowActions\",\n \"type\": \"primary\",\n \"confirm\": \"确认还书吗?\",\n \"order\": 10\n }\n }\n ],\n \"metrics\": [\n {\n \"code\": \"borrowing_count\",\n \"name\": \"借阅中数量\",\n \"table\": \"borrowing\",\n \"aggregate\": \"count\",\n \"field\": \"id\",\n \"status\": \"borrowing\",\n \"unit\": \"条\"\n }\n ]\n }\n ]\n}', '1', NULL, 15824, '2026-07-15 10:58:51');
INSERT INTO `factory_ai_stage_output` VALUES (142, 116, 111, 100, 'database', '{\"mode\":\"generate\",\"projectName\":\"图书管理系统\",\"projectDescription\":\"功能:借书、还书、预约、取消预约\\n角色用户、管理员\\n其他模块轮播图、公告、新闻\",\"industryTemplate\":\"\",\"stylePreset\":\"dark-tech\",\"extraRequirements\":\"\",\"confirmedAppBlueprint\":{\"adminHomeDashboard\":{\"charts\":[{\"filters\":[],\"metrics\":[{\"aggregate\":\"count\"}],\"semantic\":\"order\",\"type\":\"line\"},{\"filters\":[],\"metrics\":[{\"aggregate\":\"count\"}],\"semantic\":\"inventory\",\"type\":\"pie\"}],\"description\":\"核心业务数据\",\"metrics\":[{\"aggregate\":\"count\",\"filters\":[],\"semantic\":\"inventory\"},{\"aggregate\":\"count\",\"filters\":[],\"semantic\":\"order\"},{\"aggregate\":\"count\",\"filters\":[],\"semantic\":\"order\"},{\"aggregate\":\"count\",\"filters\":[],\"semantic\":\"order\"}],\"title\":\"运营总览\"},\"adminMenus\":[{\"code\":\"book_admin\",\"dataScope\":\"ROLE\",\"name\":\"图书管理\",\"pageCode\":\"book_admin_page\",\"pageType\":\"list\",\"path\":\"/admin/books\",\"requiresLogin\":true,\"tableName\":\"book_info\",\"visibleRoles\":[\"admin\"]},{\"code\":\"borrowing_admin\",\"dataScope\":\"ROLE\",\"name\":\"借阅管理\",\"pageCode\":\"borrowing_admin_page\",\"pageType\":\"list\",\"path\":\"/admin/borrowings\",\"requiresLogin\":true,\"tableName\":\"borrowing\",\"visibleRoles\":[\"admin\"]},{\"code\":\"reservation_admin\",\"dataScope\":\"ROLE\",\"name\":\"预约管理\",\"pageCode\":\"reservation_admin_page\",\"pageType\":\"list\",\"path\":\"/admin/reservations\",\"requiresLogin\":true,\"tableName\":\"reservation\",\"visibleRoles\":[\"admin\"]},{\"code\":\"banner_admin\",\"dataScope\":\"ROLE\",\"name\":\"轮播图管理\",\"pageCode\":\"banner_admin_page\",\"pageType\":\"list\",\"path\":\"/admin/banners\",\"requiresLogin\":true,\"tableName\":\"banner\",\"visibleRoles\":[\"admin\"]},{\"code\":\"announcement_admin\",\"dataScope\":\"ROLE\",\"name\":\"公告管理\",\"pageCode\":\"announcement_admin_page\",\"pageType\":\"list\",\"path\":\"/admin/announcements\",\"requiresLogin\":true,\"tableName\":\"announcement\",\"visibleRoles\":[\"admin\"]},{\"code\":\"news_admin\",\"dataScope\":\"ROLE\",\"name\":\"新闻管理\",\"pageCode\":\"news_admin_page\",\"pageType\":\"list\",\"path\":\"/admin/news\",\"requiresLogin\":true,\"tableName\":\"news\",\"visibleRoles\":[\"admin\"]},{\"code\":\"admin_profile\",\"dataScope\":\"CURRENT_USER\",\"name\":\"个人资料\",\"pageCode\":\"admin_profile_page\",\"pageType\":\"form\",\"path\":\"/admin/profile\",\"requiresLogin\":true,\"tableName\":\"admin\",\"visibleRoles\":[\"admin\"]}],\"frontendMenus\":[{\"code\":\"book_catalog\",\"dataScope\":\"PUBLIC\",\"name\":\"图书目录\",\"pageCode\":\"book_catalog_page\",\"pageType\":\"\",\"path\":\"/books\",\"requiresLogin\":false,\"tableName\":\"\",\"visibleRoles\":[]},{\"code\":\"my_borrowings\",\"dataScope\":\"CURRENT_USER\",\"name\":\"我的借阅\",\"pageCode\":\"my_borrowings_page\",\"pageType\":\"\",\"path\":\"/my/borrowings\",\"requiresLogin\":true,\"tableName\":\"\",\"visibleRoles\":[\"reader\"]},{\"code\":\"my_reservations\",\"dataScope\":\"CURRENT_USER\",\"name\":\"我的预约\",\"pageCode\":\"my_reservations_page\",\"pageType\":\"\",\"path\":\"/my/reservations\",\"requiresLogin\":true,\"tableName\":\"\",\"visibleRoles\":[\"reader\"]},{\"code\":\"reader_profile\",\"dataScope\":\"CURRENT_USER\",\"name\":\"个人资料\",\"pageCode\":\"reader_profile_page\",\"pageType\":\"\",\"path\":\"/reader/profile\",\"requiresLogin\":true,\"tableName\":\"\",\"visibleRoles\":[\"reader\"]}],\"frontendPages\":[{\"code\":\"book_catalog_page\",\"menuCode\":\"book_catalog\",\"name\":\"图书目录\",\"pageType\":\"list\",\"parentPageCode\":\"\",\"path\":\"/books\",\"tableName\":\"book_info\"},{\"code\":\"my_borrowings_page\",\"menuCode\":\"my_borrowings\",\"name\":\"我的借阅\",\"pageType\":\"current_user_list\",\"parentPageCode\":\"\",\"path\":\"/my/borrowings\",\"tableName\":\"borrowing\"},{\"code\":\"my_reservations_page\",\"menuCode\":\"my_reservations\",\"name\":\"我的预约\",\"pageType\":\"current_user_list\",\"parentPageCode\":\"\",\"path\":\"/my/reservations\",\"tableName\":\"reservation\"},{\"code\":\"reader_profile_page\",\"menuCode\":\"reader_profile\",\"name\":\"个人资料\",\"pageType\":\"form\",\"parentPageCode\":\"\",\"path\":\"/reader/profile\",\"tableName\":\"reader\"}],\"roles\":[{\"code\":\"admin\",\"description\":\"系统管理员,负责图书、借阅、预约、轮播图、公告、新闻等模块的后台管理。\",\"name\":\"管理员\"},{\"code\":\"reader\",\"description\":\"普通读者,可浏览图书、借书、还书、预约、取消预约,管理个人资料。\",\"name\":\"读者\"}]},\"flowConfig\":{\"actions\":[],\"code\":\"library_circulation\",\"flows\":[{\"actions\":[{\"actor\":\"reader\",\"button\":{\"confirm\":\"确认预约吗?\",\"order\":10,\"pageCode\":\"book_catalog_page\",\"scope\":\"reader\",\"slot\":\"list.rowActions\",\"tableName\":\"book_info\",\"type\":\"primary\"},\"code\":\"reserve_book\",\"effects\":[{\"amount\":\"1\",\"min\":\"0\",\"table\":\"reservation\",\"type\":\"create_record\",\"values\":{\"reader_id\":\"currentUserId\",\"book_id\":\"record.id\",\"reserve_date\":\"now\",\"status\":\"pending\"}}],\"method\":\"POST\",\"name\":\"预约\",\"ownerTable\":\"book_info\",\"path\":\"/book-info/reserve\",\"requestFields\":[\"id\"],\"successMessage\":\"预约成功\"},{\"actor\":\"reader\",\"button\":{\"confirm\":\"确认取消预约吗?\",\"order\":10,\"pageCode\":\"my_reservations_page\",\"scope\":\"reader\",\"slot\":\"list.rowActions\",\"tableName\":\"reservation\",\"type\":\"danger\"},\"code\":\"cancel_reservation\",\"effects\":[],\"from\":\"pending\",\"method\":\"POST\",\"name\":\"取消预约\",\"ownerTable\":\"reservation\",\"path\":\"/reservation/cancel\",\"requestFields\":[\"id\"],\"to\":\"cancelled\"}],\"code\":\"reservation_flow\",\"flows\":[],\"mainTable\":\"reservation\",\"metrics\":[],\"name\":\"图书预约\",\"notFoundMessage\":\"预约记录不存在\",\"states\":[{\"code\":\"pending\",\"label\":\"待处理\"},{\"code\":\"cancelled\",\"label\":\"已取消\"}],\"statusField\":\"status\",\"version\":\"1.1\"},{\"actions\":[{\"actor\":\"reader\",\"button\":{\"confirm\":\"确认借书吗?\",\"order\":20,\"pageCode\":\"book_catalog_page\",\"scope\":\"reader\",\"slot\":\"list.rowActions\",\"tableName\":\"book_info\",\"type\":\"success\"},\"code\":\"borrow_book\",\"effects\":[{\"amount\":\"1\",\"min\":\"0\",\"table\":\"borrowing\",\"type\":\"create_record\",\"values\":{\"reader_id\":\"currentUserId\",\"borrow_date\":\"now\",\"book_id\":\"record.id\",\"status\":\"borrowing\"}},{\"amount\":\"1\",\"errorMessage\":\"图书库存不足\",\"field\":\"stock\",\"min\":\"0\",\"relationField\":\"id\",\"table\":\"book_info\",\"type\":\"decrease\",\"values\":{}}],\"method\":\"POST\",\"name\":\"借书\",\"ownerTable\":\"book_info\",\"path\":\"/book-info/borrow\",\"requestFields\":[\"id\"],\"successMessage\":\"借书成功\"},{\"actor\":\"reader\",\"button\":{\"confirm\":\"确认还书吗?\",\"order\":10,\"pageCode\":\"my_borrowings_page\",\"scope\":\"reader\",\"slot\":\"list.rowActions\",\"tableName\":\"borrowing\",\"type\":\"primary\"},\"code\":\"return_book\",\"effects\":[{\"amount\":\"1\",\"field\":\"stock\",\"min\":\"0\",\"relationField\":\"book_id\",\"table\":\"book_info\",\"type\":\"increase\",\"values\":{}}],\"from\":\"borrowing\",\"method\":\"POST\",\"name\":\"还书\",\"ownerTable\":\"borrowing\",\"path\":\"/borrowing/return\",\"requestFields\":[\"id\"],\"to\":\"returned\"}],\"code\":\"borrowing_flow\",\"flows\":[],\"mainTable\":\"borrowing\",\"metrics\":[{\"aggregate\":\"count\",\"code\":\"borrowing_count\",\"field\":\"id\",\"name\":\"借阅中数量\",\"status\":\"borrowing\",\"table\":\"borrowing\",\"unit\":\"条\"}],\"name\":\"图书借阅\",\"notFoundMessage\":\"借阅记录不存在\",\"states\":[{\"code\":\"borrowing\",\"label\":\"借阅中\"},{\"code\":\"returned\",\"label\":\"已归还\"}],\"statusField\":\"status\",\"version\":\"1.1\"}],\"metrics\":[],\"name\":\"图书流通\",\"states\":[],\"statusField\":\"status\",\"version\":\"1.1\"},\"compiledFlowContract\":{\"acceptanceScenarios\":[],\"actions\":[{\"actor\":\"reader\",\"code\":\"reserve_book\",\"name\":\"预约\",\"ownerObject\":\"book_info\",\"ownerTable\":\"book_info\",\"preconditions\":[],\"quantityEffects\":[],\"recordEffects\":[{\"actionCode\":\"reserve_book\",\"objectCode\":\"reservation\",\"operation\":\"INSERT_ROW\",\"tableName\":\"reservation\"}],\"required\":true,\"stateTransitions\":[]},{\"actor\":\"reader\",\"code\":\"cancel_reservation\",\"name\":\"取消预约\",\"ownerObject\":\"reservation\",\"ownerTable\":\"reservation\",\"preconditions\":[],\"quantityEffects\":[],\"recordEffects\":[],\"required\":true,\"stateTransitions\":[{\"actionCode\":\"cancel_reservation\",\"fromState\":\"pending\",\"toState\":\"cancelled\"}]},{\"actor\":\"reader\",\"code\":\"borrow_book\",\"name\":\"借书\",\"ownerObject\":\"book_info\",\"ownerTable\":\"book_info\",\"preconditions\":[],\"quantityEffects\":[{\"actionCode\":\"borrow_book\",\"amount\":\"1\",\"effectType\":\"decrease\",\"objectCode\":\"book_info\",\"quantityField\":\"stock\",\"tableName\":\"book_info\"}],\"recordEffects\":[{\"actionCode\":\"borrow_book\",\"objectCode\":\"borrowing\",\"operation\":\"INSERT_ROW\",\"tableName\":\"borrowing\"}],\"required\":true,\"stateTransitions\":[]},{\"actor\":\"reader\",\"code\":\"return_book\",\"name\":\"还书\",\"ownerObject\":\"borrowing\",\"ownerTable\":\"borrowing\",\"preconditions\":[],\"quantityEffects\":[{\"actionCode\":\"return_book\",\"amount\":\"1\",\"effectType\":\"increase\",\"objectCode\":\"book_info\",\"quantityField\":\"stock\",\"tableName\":\"book_info\"}],\"recordEffects\":[],\"required\":true,\"stateTransitions\":[{\"actionCode\":\"return_book\",\"fromState\":\"borrowing\",\"toState\":\"returned\"}]}],\"businessPolicies\":[],\"coreObjects\":[{\"code\":\"reservation\",\"name\":\"图书预约\",\"objectType\":\"main\",\"tableName\":\"reservation\"},{\"code\":\"book_info\",\"name\":\"预约\",\"objectType\":\"related\",\"tableName\":\"book_info\"},{\"code\":\"borrowing\",\"name\":\"图书借阅\",\"objectType\":\"main\",\"tableName\":\"borrowing\"}],\"domainName\":\"图书流通\",\"metrics\":[{\"aggregate\":\"count\",\"code\":\"borrowing_count\",\"field\":\"id\",\"filters\":[{\"field\":\"status\",\"operator\":\"eq\",\"values\":[\"borrowing\"]}],\"name\":\"借阅中数量\",\"relatedActionCodes\":[],\"required\":true,\"tableName\":\"borrowing\",\"unit\":\"条\"}],\"pageBindings\":[{\"actionCode\":\"reserve_book\",\"pageCode\":\"book_catalog_page\",\"slot\":\"list.rowActions\",\"tableName\":\"book_info\",\"target\":\"frontend\"},{\"actionCode\":\"cancel_reservation\",\"pageCode\":\"my_reservations_page\",\"slot\":\"list.rowActions\",\"tableName\":\"reservation\",\"target\":\"frontend\"},{\"actionCode\":\"borrow_book\",\"pageCode\":\"book_catalog_page\",\"slot\":\"list.rowActions\",\"tableName\":\"book_info\",\"target\":\"frontend\"},{\"actionCode\":\"return_book\",\"pageCode\":\"my_borrowings_page\",\"slot\":\"list.rowActions\",\"tableName\":\"borrowing\",\"target\":\"frontend\"}],\"quantityRules\":[{\"actionCode\":\"borrow_book\",\"amount\":\"1\",\"effectType\":\"decrease\",\"objectCode\":\"book_info\",\"quantityField\":\"stock\",\"tableName\":\"book_info\"},{\"actionCode\":\"return_book\",\"amount\":\"1\",\"effectType\":\"increase\",\"objectCode\":\"book_info\",\"quantityField\":\"stock\",\"tableName\":\"book_info\"}],\"recordRules\":[{\"actionCode\":\"reserve_book\",\"objectCode\":\"reservation\",\"operation\":\"INSERT_ROW\",\"tableName\":\"reservation\"},{\"actionCode\":\"borrow_book\",\"objectCode\":\"borrowing\",\"operation\":\"INSERT_ROW\",\"tableName\":\"borrowing\"}],\"stateMachines\":[{\"objectCode\":\"reservation\",\"states\":[\"pending\",\"cancelled\"],\"statusField\":\"status\",\"tableName\":\"reservation\",\"transitions\":[{\"actionCode\":\"cancel_reservation\",\"fromState\":\"pending\",\"toState\":\"cancelled\"}]},{\"objectCode\":\"borrowing\",\"states\":[\"borrowing\",\"returned\"],\"statusField\":\"status\",\"tableName\":\"borrowing\",\"transitions\":[{\"actionCode\":\"return_book\",\"fromState\":\"borrowing\",\"toState\":\"returned\"}]}]},\"canonicalTableRegistry\":[\"book_info\",\"borrowing\",\"reservation\",\"reader\",\"banner\",\"announcement\",\"news\",\"admin\"],\"limits\":{\"maxTables\":12,\"maxColumnsPerTable\":30}}', '{\n \"tables\": [\n {\n \"tableName\": \"book_info\",\n \"tableComment\": \"图书信息表\",\n \"adminMenuName\": \"图书信息\",\n \"operations\": {\n \"add\": true,\n \"edit\": true,\n \"remove\": true,\n \"removeType\": \"physical\",\n \"reason\": \"\"\n },\n \"columns\": [\n {\n \"columnName\": \"id\",\n \"columnLabel\": \"ID\",\n \"columnComment\": \"主键ID\",\n \"columnType\": \"bigint(20)\",\n \"isPk\": \"1\",\n \"isIncrement\": \"1\",\n \"isRequired\": \"1\"\n },\n {\n \"columnName\": \"title\",\n \"columnLabel\": \"书名\",\n \"columnComment\": \"书名\",\n \"columnType\": \"varchar(200)\",\n \"isPk\": \"0\",\n \"isIncrement\": \"0\",\n \"isRequired\": \"1\",\n \"htmlType\": \"input\"\n },\n {\n \"columnName\": \"author\",\n \"columnLabel\": \"作者\",\n \"columnComment\": \"作者\",\n \"columnType\": \"varchar(100)\",\n \"isPk\": \"0\",\n \"isIncrement\": \"0\",\n \"isRequired\": \"1\",\n \"htmlType\": \"input\"\n },\n {\n \"columnName\": \"isbn\",\n \"columnLabel\": \"ISBN\",\n \"columnComment\": \"国际标准书号\",\n \"columnType\": \"varchar(20)\",\n \"isPk\": \"0\",\n \"isIncrement\": \"0\",\n \"isRequired\": \"1\",\n \"htmlType\": \"input\"\n },\n {\n \"columnName\": \"publisher\",\n \"columnLabel\": \"出版社\",\n \"columnComment\": \"出版社\",\n \"columnType\": \"varchar(100)\",\n \"isPk\": \"0\",\n \"isIncrement\": \"0\",\n \"isRequired\": \"0\",\n \"htmlType\": \"input\"\n },\n {\n \"columnName\": \"publish_date\",\n \"columnLabel\": \"出版日期\",\n \"columnComment\": \"出版日期\",\n \"columnType\": \"date\",\n \"isPk\": \"0\",\n \"isIncrement\": \"0\",\n \"isRequired\": \"0\",\n \"htmlType\": \"date\"\n },\n {\n \"columnName\": \"stock\",\n \"columnLabel\": \"库存\",\n \"columnComment\": \"当前库存数量(不能为负)\",\n \"columnType\": \"int(11)\",\n \"isPk\": \"0\",\n \"isIncrement\": \"0\",\n \"isRequired\": \"1\",\n \"htmlType\": \"input\",\n \"javaType\": \"Integer\"\n },\n {\n \"columnName\": \"description\",\n \"columnLabel\": \"简介\",\n \"columnComment\": \"图书简介\",\n \"columnType\": \"text\",\n \"isPk\": \"0\",\n \"isIncrement\": \"0\",\n \"isRequired\": \"0\",\n \"htmlType\": \"textarea\"\n },\n {\n \"columnName\": \"cover_url\",\n \"columnLabel\": \"封面图片\",\n \"columnComment\": \"封面图片URL\",\n \"columnType\": \"varchar(500)\",\n \"isPk\": \"0\",\n \"isIncrement\": \"0\",\n \"isRequired\": \"0\",\n \"htmlType\": \"imageUpload\"\n }\n ]\n },\n {\n \"tableName\": \"borrowing\",\n \"tableComment\": \"借阅记录表\",\n \"adminMenuName\": \"借阅记录\",\n \"operations\": {\n \"add\": true,\n \"edit\": false,\n \"remove\": false,\n \"removeType\": \"\",\n \"reason\": \"仅新增\"\n },\n \"columns\": [\n {\n \"columnName\": \"id\",\n \"columnLabel\": \"ID\",\n \"columnComment\": \"主键ID\",\n \"columnType\": \"bigint(20)\",\n \"isPk\": \"1\",\n \"isIncrement\": \"1\",\n \"isRequired\": \"1\"\n },\n {\n \"columnName\": \"reader_id\",\n \"columnLabel\": \"读者\",\n \"columnComment\": \"借书读者ID关联读者账号表\",\n \"columnType\": \"bigint(20)\",\n \"isPk\": \"0\",\n \"isIncrement\": \"0\",\n \"isRequired\": \"1\",\n \"htmlType\": \"select\",\n \"dictType\": \"remote:reader:reader_id:nickname\"\n },\n {\n \"columnName\": \"book_id\",\n \"columnLabel\": \"图书\",\n \"columnComment\": \"借阅图书ID关联图书信息表\",\n \"columnType\": \"bigint(20)\",\n \"isPk\": \"0\",\n \"isIncrement\": \"0\",\n \"isRequired\": \"1\",\n \"htmlType\": \"select\",\n \"dictType\": \"remote:book_info:id:title\"\n },\n {\n \"columnName\": \"borrow_date\",\n \"columnLabel\": \"借书日期\",\n \"columnComment\": \"借书日期\",\n \"columnType\": \"datetime\",\n \"isPk\": \"0\",\n \"isIncrement\": \"0\",\n \"isRequired\": \"1\",\n \"htmlType\": \"datetime\"\n },\n {\n \"columnName\": \"return_date\",\n \"columnLabel\": \"还书日期\",\n \"columnComment\": \"实际还书日期,可为空\",\n \"columnType\": \"datetime\",\n \"isPk\": \"0\",\n \"isIncrement\": \"0\",\n \"isRequired\": \"0\",\n \"htmlType\": \"datetime\"\n },\n {\n \"columnName\": \"status\",\n \"columnLabel\": \"状态\",\n \"columnComment\": \"借阅状态borrowing/returned\",\n \"columnType\": \"varchar(20)\",\n \"isPk\": \"0\",\n \"isIncrement\": \"0\",\n \"isRequired\": \"1\",\n \"htmlType\": \"select\",\n \"dictType\": \"borrowing_status\",\n \"dictOptions\": [\n {\n \"value\": \"borrowing\",\n \"label\": \"借阅中\"\n },\n {\n \"value\": \"returned\",\n \"label\": \"已归还\"\n }\n ]\n },\n {\n \"columnName\": \"create_time\",\n \"columnLabel\": \"创建时间\",\n \"columnComment\": \"记录创建时间\",\n \"columnType\": \"datetime\",\n \"isPk\": \"0\",\n \"isIncrement\": \"0\",\n \"isRequired\": \"1\",\n \"htmlType\": \"datetime\"\n }\n ]\n },\n {\n \"tableName\": \"reservation\",\n \"tableComment\": \"预约记录表\",\n \"adminMenuName\": \"预约记录\",\n \"operations\": {\n \"add\": true,\n \"edit\": false,\n \"remove\": false,\n \"removeType\": \"\",\n \"reason\": \"仅新增\"\n },\n \"columns\": [\n {\n \"columnName\": \"id\",\n \"columnLabel\": \"ID\",\n \"columnComment\": \"主键ID\",\n \"columnType\": \"bigint(20)\",\n \"isPk\": \"1\",\n \"isIncrement\": \"1\",\n \"isRequired\": \"1\"\n },\n {\n \"columnName\": \"reader_id\",\n \"columnLabel\": \"读者\",\n \"columnComment\": \"预约读者ID关联读者账号表\",\n \"columnType\": \"bigint(20)\",\n \"isPk\": \"0\",\n \"isIncrement\": \"0\",\n \"isRequired\": \"1\",\n \"htmlType\": \"select\",\n \"dictType\": \"remote:reader:reader_id:nickname\"\n },\n {\n \"columnName\": \"book_id\",\n \"columnLabel\": \"图书\",\n \"columnComment\": \"预约图书ID关联图书信息表\",\n \"columnType\": \"bigint(20)\",\n \"isPk\": \"0\",\n \"isIncrement\": \"0\",\n \"isRequired\": \"1\",\n \"htmlType\": \"select\",\n \"dictType\": \"remote:book_info:id:title\"\n },\n {\n \"columnName\": \"reserve_date\",\n \"columnLabel\": \"预约日期\",\n \"columnComment\": \"预约日期\",\n \"columnType\": \"datetime\",\n \"isPk\": \"0\",\n \"isIncrement\": \"0\",\n \"isRequired\": \"1\",\n \"htmlType\": \"datetime\"\n },\n {\n \"columnName\": \"cancel_date\",\n \"columnLabel\": \"取消日期\",\n \"columnComment\": \"取消预约日期,可为空\",\n \"columnType\": \"datetime\",\n \"isPk\": \"0\",\n \"isIncrement\": \"0\",\n \"isRequired\": \"0\",\n \"htmlType\": \"datetime\"\n },\n {\n \"columnName\": \"status\",\n \"columnLabel\": \"状态\",\n \"columnComment\": \"预约状态pending/cancelled\",\n \"columnType\": \"varchar(20)\",\n \"isPk\": \"0\",\n \"isIncrement\": \"0\",\n \"isRequired\": \"1\",\n \"htmlType\": \"select\",\n \"dictType\": \"reservation_status\",\n \"dictOptions\": [\n {\n \"value\": \"pending\",\n \"label\": \"待处理\"\n },\n {\n \"value\": \"cancelled\",\n \"label\": \"已取消\"\n }\n ]\n },\n {\n \"columnName\": \"create_time\",\n \"columnLabel\": \"创建时间\",\n \"columnComment\": \"记录创建时间\",\n \"columnType\": \"datetime\",\n \"isPk\": \"0\",\n \"isIncrement\": \"0\",\n \"isRequired\": \"1\",\n \"htmlType\": \"datetime\"\n }\n ]\n },\n {\n \"tableName\": \"reader\",\n \"tableComment\": \"读者账号表\",\n \"adminMenuName\": \"读者账号\",\n \"operations\": {\n \"add\": false,\n \"edit\": true,\n \"remove\": false,\n \"removeType\": \"\",\n \"reason\": \"读者账号由系统管理,不支持新增和删除\"\n },\n \"columns\": [\n {\n \"columnName\": \"reader_id\",\n \"columnLabel\": \"读者ID\",\n \"columnComment\": \"主键ID\",\n \"columnType\": \"bigint(20)\",\n \"isPk\": \"1\",\n \"isIncrement\": \"1\",\n \"isRequired\": \"1\"\n },\n {\n \"columnName\": \"username\",\n \"columnLabel\": \"用户名\",\n \"columnComment\": \"登录用户名,唯一\",\n \"columnType\": \"varchar(50)\",\n \"isPk\": \"0\",\n \"isIncrement\": \"0\",\n \"isRequired\": \"1\",\n \"htmlType\": \"input\"\n },\n {\n \"columnName\": \"password_hash\",\n \"columnLabel\": \"密码hash\",\n \"columnComment\": \"加密后的密码\",\n \"columnType\": \"varchar(255)\",\n \"isPk\": \"0\",\n \"isIncrement\": \"0\",\n \"isRequired\": \"1\",\n \"htmlType\": \"input\"\n },\n {\n \"columnName\": \"nickname\",\n \"columnLabel\": \"昵称\",\n \"columnComment\": \"显示昵称\",\n \"columnType\": \"varchar(100)\",\n \"isPk\": \"0\",\n \"isIncrement\": \"0\",\n \"isRequired\": \"1\",\n \"htmlType\": \"input\"\n },\n {\n \"columnName\": \"status\",\n \"columnLabel\": \"状态\",\n \"columnComment\": \"账号状态active/inactive\",\n \"columnType\": \"varchar(20)\",\n \"isPk\": \"0\",\n \"isIncrement\": \"0\",\n \"isRequired\": \"1\",\n \"htmlType\": \"select\",\n \"dictType\": \"account_status\",\n \"dictOptions\": [\n {\n \"value\": \"active\",\n \"label\": \"正常\"\n },\n {\n \"value\": \"inactive\",\n \"label\": \"停用\"\n }\n ]\n },\n {\n \"columnName\": \"create_time\",\n \"columnLabel\": \"创建时间\",\n \"columnComment\": \"账号创建时间\",\n \"columnType\": \"datetime\",\n \"isPk\": \"0\",\n \"isIncrement\": \"0\",\n \"isRequired\": \"1\",\n \"htmlType\": \"datetime\"\n }\n ]\n },\n {\n \"tableName\": \"admin\",\n \"tableComment\": \"管理员账号表\",\n \"adminMenuName\": \"管理员账号\",\n \"operations\": {\n \"add\": false,\n \"edit\": true,\n \"remove\": false,\n \"removeType\": \"\",\n \"reason\": \"管理员账号由系统初始化,不支持新增和删除\"\n },\n \"columns\": [\n {\n \"columnName\": \"admin_id\",\n \"columnLabel\": \"管理员ID\",\n \"columnComment\": \"主键ID\",\n \"columnType\": \"bigint(20)\",\n \"isPk\": \"1\",\n \"isIncrement\": \"1\",\n \"isRequired\": \"1\"\n },\n {\n \"columnName\": \"username\",\n \"columnLabel\": \"用户名\",\n \"columnComment\": \"登录用户名,唯一\",\n \"columnType\": \"varchar(50)\",\n \"isPk\": \"0\",\n \"isIncrement\": \"0\",\n \"isRequired\": \"1\",\n \"htmlType\": \"input\"\n },\n {\n \"columnName\": \"password_hash\",\n \"columnLabel\": \"密码hash\",\n \"columnComment\": \"加密后的密码\",\n \"columnType\": \"varchar(255)\",\n \"isPk\": \"0\",\n \"isIncrement\": \"0\",\n \"isRequired\": \"1\",\n \"htmlType\": \"input\"\n },\n {\n \"columnName\": \"nickname\",\n \"columnLabel\": \"昵称\",\n \"columnComment\": \"显示昵称\",\n \"columnType\": \"varchar(100)\",\n \"isPk\": \"0\",\n \"isIncrement\": \"0\",\n \"isRequired\": \"1\",\n \"htmlType\": \"input\"\n },\n {\n \"columnName\": \"status\",\n \"columnLabel\": \"状态\",\n \"columnComment\": \"账号状态active/inactive\",\n \"columnType\": \"varchar(20)\",\n \"isPk\": \"0\",\n \"isIncrement\": \"0\",\n \"isRequired\": \"1\",\n \"htmlType\": \"select\",\n \"dictType\": \"account_status\",\n \"dictOptions\": [\n {\n \"value\": \"active\",\n \"label\": \"正常\"\n },\n {\n \"value\": \"inactive\",\n \"label\": \"停用\"\n }\n ]\n },\n {\n \"columnName\": \"create_time\",\n \"columnLabel\": \"创建时间\",\n \"columnComment\": \"账号创建时间\",\n \"columnType\": \"datetime\",\n \"isPk\": \"0\",\n \"isIncrement\": \"0\",\n \"isRequired\": \"1\",\n \"htmlType\": \"datetime\"\n }\n ]\n },\n {\n \"tableName\": \"banner\",\n \"tableComment\": \"轮播图表\",\n \"adminMenuName\": \"轮播图\",\n \"operations\": {\n \"add\": true,\n \"edit\": true,\n \"remove\": true,\n \"removeType\": \"physical\",\n \"reason\": \"\"\n },\n \"columns\": [\n {\n \"columnName\": \"id\",\n \"columnLabel\": \"ID\",\n \"columnComment\": \"主键ID\",\n \"columnType\": \"bigint(20)\",\n \"isPk\": \"1\",\n \"isIncrement\": \"1\",\n \"isRequired\": \"1\"\n },\n {\n \"columnName\": \"title\",\n \"columnLabel\": \"标题\",\n \"columnComment\": \"轮播图标题\",\n \"columnType\": \"varchar(200)\",\n \"isPk\": \"0\",\n \"isIncrement\": \"0\",\n \"isRequired\": \"1\",\n \"htmlType\": \"input\"\n },\n {\n \"columnName\": \"image_url\",\n \"columnLabel\": \"图片地址\",\n \"columnComment\": \"图片URL\",\n \"columnType\": \"varchar(500)\",\n \"isPk\": \"0\",\n \"isIncrement\": \"0\",\n \"isRequired\": \"1\",\n \"htmlType\": \"imageUpload\"\n },\n {\n \"columnName\": \"link_url\",\n \"columnLabel\": \"链接地址\",\n \"columnComment\": \"点击跳转链接\",\n \"columnType\": \"varchar(500)\",\n \"isPk\": \"0\",\n \"isIncrement\": \"0\",\n \"isRequired\": \"0\",\n \"htmlType\": \"input\"\n },\n {\n \"columnName\": \"sort_order\",\n \"columnLabel\": \"排序\",\n \"columnComment\": \"排序序号,数值越小越靠前\",\n \"columnType\": \"int(11)\",\n \"isPk\": \"0\",\n \"isIncrement\": \"0\",\n \"isRequired\": \"0\",\n \"htmlType\": \"input\",\n \"javaType\": \"Integer\"\n },\n {\n \"columnName\": \"status\",\n \"columnLabel\": \"状态\",\n \"columnComment\": \"状态active/inactive\",\n \"columnType\": \"varchar(20)\",\n \"isPk\": \"0\",\n \"isIncrement\": \"0\",\n \"isRequired\": \"1\",\n \"htmlType\": \"select\",\n \"dictType\": \"banner_status\",\n \"dictOptions\": [\n {\n \"value\": \"active\",\n \"label\": \"启用\"\n },\n {\n \"value\": \"inactive\",\n \"label\": \"停用\"\n }\n ]\n },\n {\n \"columnName\": \"create_time\",\n \"columnLabel\": \"创建时间\",\n \"columnComment\": \"记录创建时间\",\n \"columnType\": \"datetime\",\n \"isPk\": \"0\",\n \"isIncrement\": \"0\",\n \"isRequired\": \"1\",\n \"htmlType\": \"datetime\"\n }\n ]\n },\n {\n \"tableName\": \"announcement\",\n \"tableComment\": \"公告表\",\n \"adminMenuName\": \"公告\",\n \"operations\": {\n \"add\": true,\n \"edit\": true,\n \"remove\": true,\n \"removeType\": \"physical\",\n \"reason\": \"\"\n },\n \"columns\": [\n {\n \"columnName\": \"id\",\n \"columnLabel\": \"ID\",\n \"columnComment\": \"主键ID\",\n \"columnType\": \"bigint(20)\",\n \"isPk\": \"1\",\n \"isIncrement\": \"1\",\n \"isRequired\": \"1\"\n },\n {\n \"columnName\": \"title\",\n \"columnLabel\": \"标题\",\n \"columnComment\": \"公告标题\",\n \"columnType\": \"varchar(200)\",\n \"isPk\": \"0\",\n \"isIncrement\": \"0\",\n \"isRequired\": \"1\",\n \"htmlType\": \"input\"\n },\n {\n \"columnName\": \"content\",\n \"columnLabel\": \"内容\",\n \"columnComment\": \"公告内容\",\n \"columnType\": \"text\",\n \"isPk\": \"0\",\n \"isIncrement\": \"0\",\n \"isRequired\": \"1\",\n \"htmlType\": \"textarea\"\n },\n {\n \"columnName\": \"publish_date\",\n \"columnLabel\": \"发布日期\",\n \"columnComment\": \"发布时间\",\n \"columnType\": \"datetime\",\n \"isPk\": \"0\",\n \"isIncrement\": \"0\",\n \"isRequired\": \"0\",\n \"htmlType\": \"datetime\"\n },\n {\n \"columnName\": \"status\",\n \"columnLabel\": \"状态\",\n \"columnComment\": \"状态active/inactive\",\n \"columnType\": \"varchar(20)\",\n \"isPk\": \"0\",\n \"isIncrement\": \"0\",\n \"isRequired\": \"1\",\n \"htmlType\": \"select\",\n \"dictType\": \"announcement_status\",\n \"dictOptions\": [\n {\n \"value\": \"active\",\n \"label\": \"发布\"\n },\n {\n \"value\": \"inactive\",\n \"label\": \"草稿\"\n }\n ]\n },\n {\n \"columnName\": \"create_time\",\n \"columnLabel\": \"创建时间\",\n \"columnComment\": \"记录创建时间\",\n \"columnType\": \"datetime\",\n \"isPk\": \"0\",\n \"isIncrement\": \"0\",\n \"isRequired\": \"1\",\n \"htmlType\": \"datetime\"\n }\n ]\n },\n {\n \"tableName\": \"news\",\n \"tableComment\": \"新闻表\",\n \"adminMenuName\": \"新闻\",\n \"operations\": {\n \"add\": true,\n \"edit\": true,\n \"remove\": true,\n \"removeType\": \"physical\",\n \"reason\": \"\"\n },\n \"columns\": [\n {\n \"columnName\": \"id\",\n \"columnLabel\": \"ID\",\n \"columnComment\": \"主键ID\",\n \"columnType\": \"bigint(20)\",\n \"isPk\": \"1\",\n \"isIncrement\": \"1\",\n \"isRequired\": \"1\"\n },\n {\n \"columnName\": \"title\",\n \"columnLabel\": \"标题\",\n \"columnComment\": \"新闻标题\",\n \"columnType\": \"varchar(200)\",\n \"isPk\": \"0\",\n \"isIncrement\": \"0\",\n \"isRequired\": \"1\",\n \"htmlType\": \"input\"\n },\n {\n \"columnName\": \"summary\",\n \"columnLabel\": \"摘要\",\n \"columnComment\": \"新闻摘要\",\n \"columnType\": \"varchar(500)\",\n \"isPk\": \"0\",\n \"isIncrement\": \"0\",\n \"isRequired\": \"0\",\n \"htmlType\": \"input\"\n },\n {\n \"columnName\": \"content\",\n \"columnLabel\": \"内容\",\n \"columnComment\": \"新闻正文\",\n \"columnType\": \"text\",\n \"isPk\": \"0\",\n \"isIncrement\": \"0\",\n \"isRequired\": \"1\",\n \"htmlType\": \"textarea\"\n },\n {\n \"columnName\": \"publish_date\",\n \"columnLabel\": \"发布日期\",\n \"columnComment\": \"发布时间\",\n \"columnType\": \"datetime\",\n \"isPk\": \"0\",\n \"isIncrement\": \"0\",\n \"isRequired\": \"0\",\n \"htmlType\": \"datetime\"\n },\n {\n \"columnName\": \"status\",\n \"columnLabel\": \"状态\",\n \"columnComment\": \"状态active/inactive\",\n \"columnType\": \"varchar(20)\",\n \"isPk\": \"0\",\n \"isIncrement\": \"0\",\n \"isRequired\": \"1\",\n \"htmlType\": \"select\",\n \"dictType\": \"news_status\",\n \"dictOptions\": [\n {\n \"value\": \"active\",\n \"label\": \"发布\"\n },\n {\n \"value\": \"inactive\",\n \"label\": \"草稿\"\n }\n ]\n },\n {\n \"columnName\": \"create_time\",\n \"columnLabel\": \"创建时间\",\n \"columnComment\": \"记录创建时间\",\n \"columnType\": \"datetime\",\n \"isPk\": \"0\",\n \"isIncrement\": \"0\",\n \"isRequired\": \"1\",\n \"htmlType\": \"datetime\"\n }\n ]\n }\n ]\n}', '1', NULL, 78403, '2026-07-15 11:00:09');
-- ----------------------------
-- Table structure for factory_ai_task_checkpoint
-- ----------------------------
DROP TABLE IF EXISTS `factory_ai_task_checkpoint`;
CREATE TABLE `factory_ai_task_checkpoint` (
`checkpoint_id` bigint(20) NOT NULL AUTO_INCREMENT COMMENT 'Checkpoint ID',
`task_id` bigint(20) NOT NULL COMMENT 'AI task ID',
`stage_code` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NOT NULL COMMENT 'Stable stage code',
`sequence_no` int(11) NOT NULL COMMENT 'Manifest sequence number',
`attempt_no` int(11) NOT NULL COMMENT 'Task attempt number',
`schema_version` varchar(20) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NOT NULL COMMENT 'Checkpoint payload schema',
`payload_json` longtext CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NOT NULL COMMENT 'Canonical checkpoint envelope JSON',
`content_hash` char(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NOT NULL COMMENT 'Checkpoint SHA-256',
`spec_version_id` bigint(20) NULL DEFAULT NULL COMMENT 'Pinned ProjectSpec version ID',
`generation_run_id` bigint(20) NULL DEFAULT NULL COMMENT 'Related source generation run ID',
`create_time` datetime(0) NULL DEFAULT NULL COMMENT 'Create time',
PRIMARY KEY (`checkpoint_id`) USING BTREE,
UNIQUE INDEX `uk_factory_ai_checkpoint_attempt`(`task_id`, `stage_code`, `attempt_no`) USING BTREE,
INDEX `idx_factory_ai_checkpoint_task`(`task_id`, `attempt_no`, `sequence_no`) USING BTREE,
INDEX `idx_factory_ai_checkpoint_spec`(`spec_version_id`) USING BTREE,
INDEX `idx_factory_ai_checkpoint_run`(`generation_run_id`) USING BTREE,
CONSTRAINT `fk_factory_ai_checkpoint_task` FOREIGN KEY (`task_id`) REFERENCES `front_ai_generation_task` (`task_id`) ON DELETE CASCADE ON UPDATE RESTRICT
) ENGINE = InnoDB AUTO_INCREMENT = 100 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_0900_ai_ci COMMENT = 'Immutable AI task stage checkpoint' ROW_FORMAT = Dynamic;
-- ----------------------------
-- Records of factory_ai_task_checkpoint
-- ----------------------------
INSERT INTO `factory_ai_task_checkpoint` VALUES (100, 100, 'DATABASE', 3, 1, '1.0', '{\"payload\":{\"appBlueprintJson\":\"{\\\"adminHomeDashboard\\\":{\\\"charts\\\":[{\\\"filters\\\":[],\\\"metrics\\\":[],\\\"semantic\\\":\\\"order\\\",\\\"title\\\":\\\"借阅趋势\\\",\\\"type\\\":\\\"trend\\\"},{\\\"filters\\\":[],\\\"metrics\\\":[],\\\"semantic\\\":\\\"content\\\",\\\"title\\\":\\\"图书分类分布\\\",\\\"type\\\":\\\"distribution\\\"}],\\\"description\\\":\\\"核心业务数据\\\",\\\"metrics\\\":[{\\\"filters\\\":[],\\\"semantic\\\":\\\"inventory\\\"},{\\\"filters\\\":[],\\\"semantic\\\":\\\"user\\\"},{\\\"filters\\\":[],\\\"semantic\\\":\\\"order\\\"},{\\\"filters\\\":[],\\\"semantic\\\":\\\"warning\\\"}],\\\"title\\\":\\\"运营总览\\\"},\\\"adminMenus\\\":[{\\\"code\\\":\\\"book_admin\\\",\\\"dataScope\\\":\\\"ROLE\\\",\\\"name\\\":\\\"图书管理\\\",\\\"pageCode\\\":\\\"book_admin_page\\\",\\\"pageType\\\":\\\"list\\\",\\\"path\\\":\\\"/admin/books\\\",\\\"requiresLogin\\\":true,\\\"tableName\\\":\\\"book_info\\\",\\\"visibleRoles\\\":[\\\"admin\\\"]},{\\\"code\\\":\\\"reader_admin\\\",\\\"dataScope\\\":\\\"ROLE\\\",\\\"name\\\":\\\"读者管理\\\",\\\"pageCode\\\":\\\"reader_admin_page\\\",\\\"pageType\\\":\\\"list\\\",\\\"path\\\":\\\"/admin/readers\\\",\\\"requiresLogin\\\":true,\\\"tableName\\\":\\\"reader\\\",\\\"visibleRoles\\\":[\\\"admin\\\"]},{\\\"code\\\":\\\"borrowing_admin\\\",\\\"dataScope\\\":\\\"ROLE\\\",\\\"name\\\":\\\"借阅记录管理\\\",\\\"pageCode\\\":\\\"borrowing_admin_page\\\",\\\"pageType\\\":\\\"list\\\",\\\"path\\\":\\\"/admin/borrowings\\\",\\\"requiresLogin\\\":true,\\\"tableName\\\":\\\"borrowing_record\\\",\\\"visibleRoles\\\":[\\\"admin\\\"]},{\\\"code\\\":\\\"category_admin\\\",\\\"dataScope\\\":\\\"ROLE\\\",\\\"name\\\":\\\"图书分类管理\\\",\\\"pageCode\\\":\\\"category_admin_page\\\",\\\"pageType\\\":\\\"list\\\",\\\"path\\\":\\\"/admin/categories\\\",\\\"requiresLogin\\\":true,\\\"tableName\\\":\\\"book_category\\\",\\\"visibleRoles\\\":[\\\"admin\\\"]},{\\\"code\\\":\\\"announcement_admin\\\",\\\"dataScope\\\":\\\"ROLE\\\",\\\"name\\\":\\\"公告管理\\\",\\\"pageCode\\\":\\\"announcement_admin_page\\\",\\\"pageType\\\":\\\"list\\\",\\\"path\\\":\\\"/admin/announcements\\\",\\\"requiresLogin\\\":true,\\\"tableName\\\":\\\"announcement\\\",\\\"visibleRoles\\\":[\\\"admin\\\"]},{\\\"code\\\":\\\"news_admin\\\",\\\"dataScope\\\":\\\"ROLE\\\",\\\"name\\\":\\\"新闻管理\\\",\\\"pageCode\\\":\\\"news_admin_page\\\",\\\"pageType\\\":\\\"list\\\",\\\"path\\\":\\\"/admin/news\\\",\\\"requiresLogin\\\":true,\\\"tableName\\\":\\\"news\\\",\\\"visibleRoles\\\":[\\\"admin\\\"]},{\\\"code\\\":\\\"friend_link_admin\\\",\\\"dataScope\\\":\\\"ROLE\\\",\\\"name\\\":\\\"友情链接管理\\\",\\\"pageCode\\\":\\\"friend_link_admin_page\\\",\\\"pageType\\\":\\\"list\\\",\\\"path\\\":\\\"/admin/friend-links\\\",\\\"requiresLogin\\\":true,\\\"tableName\\\":\\\"friend_link\\\",\\\"visibleRoles\\\":[\\\"admin\\\"]},{\\\"code\\\":\\\"help_admin\\\",\\\"dataScope\\\":\\\"ROLE\\\",\\\"name\\\":\\\"帮助中心管理\\\",\\\"pageCode\\\":\\\"help_admin_page\\\",\\\"pageType\\\":\\\"list\\\",\\\"path\\\":\\\"/admin/help\\\",\\\"requiresLogin\\\":true,\\\"tableName\\\":\\\"help_article\\\",\\\"visibleRoles\\\":[\\\"admin\\\"]},{\\\"code\\\":\\\"admin_profile\\\",\\\"dataScope\\\":\\\"ROLE\\\",\\\"name\\\":\\\"管理员个人资料\\\",\\\"pageCode\\\":\\\"admin_profile_page\\\",\\\"pageType\\\":\\\"form\\\",\\\"path\\\":\\\"/admin/profile\\\",\\\"requiresLogin\\\":true,\\\"tableName\\\":\\\"admin_info\\\",\\\"visibleRoles\\\":[\\\"admin\\\"]}],\\\"frontendMenus\\\":[{\\\"code\\\":\\\"book_catalog\\\",\\\"dataScope\\\":\\\"PUBLIC\\\",\\\"name\\\":\\\"图书目录\\\",\\\"pageCode\\\":\\\"book_catalog_page\\\",\\\"pageType\\\":\\\"\\\",\\\"path\\\":\\\"/books\\\",\\\"requiresLogin\\\":false,\\\"tableName\\\":\\\"\\\",\\\"visibleRoles\\\":[]},{\\\"code\\\":\\\"announcement_list\\\",\\\"dataScope\\\":\\\"PUBLIC\\\",\\\"name\\\":\\\"公告栏\\\",\\\"pageCode\\\":\\\"announcement_list_page\\\",\\\"pageType\\\":\\\"\\\",\\\"path\\\":\\\"/announcements\\\",\\\"requiresLogin\\\":false,\\\"tableName\\\":\\\"\\\",\\\"visibleRoles\\\":[]},{\\\"code\\\":\\\"news_list\\\",\\\"dataScope\\\":\\\"PUBLIC\\\",\\\"name\\\":\\\"新闻资讯\\\",\\\"pageCode\\\":\\\"news_list_page\\\",\\\"pageType\\\":\\\"\\\",\\\"path\\\":\\\"/news\\\",\\\"requiresLogin\\\":false,\\\"tableName\\\":\\\"\\\",\\\"visibleRoles\\\":[]},{\\\"code\\\":\\\"friend_link_list\\\",\\\"dataScope\\\":\\\"PUBLIC\\\",\\\"name\\\":\\\"友情链接\\\",\\\"pageCode\\\":\\\"friend_link_list_page\\\",\\\"pageType\\\":\\\"\\\",\\\"path\\\":\\\"/friend-links\\\",\\\"requiresLogin\\\":false,\\\"tableName\\\":\\\"\\\",\\\"visibleRoles\\\":[]},{\\\"code\\\":\\\"help_center\\\",\\\"dataScope\\\":\\\"PUBLIC\\\",\\\"name\\\":\\\"帮助中心\\\",\\\"pageCode\\\":\\\"help_center_page\\\",\\\"pageType\\\":\\\"\\\",\\\"path\\\":\\\"/help\\\",\\\"requiresLogin\\\":false,\\\"tableName\\\":\\\"\\\",\\\"visibleRoles\\\":[]},{\\\"code\\\":\\\"my_borrowing\\\",\\\"dataScope\\\":\\\"CURRENT_USER\\\",\\\"name\\\":\\\"我的借阅\\\",\\\"pageCode\\\":\\\"my_borrowing_page\\\",\\\"pageType\\\":\\\"\\\",\\\"path\\\":\\\"/my-borrowing\\\",\\\"requiresLogin\\\":true,\\\"tableName\\\":\\\"\\\",\\\"visibleRoles\\\":[\\\"reader\\\"]},{\\\"code\\\":\\\"reader_profile\\\",\\\"dataScope\\\":\\\"CURRENT_USER\\\",\\\"name\\\":\\\"个人资料\\\",\\\"pageCode\\\":\\\"reader_profile_page\\\",\\\"pageType\\\":\\\"\\\",\\\"path\\\":\\\"/reader/profile\\\",\\\"requiresLogin\\\":true,\\\"tableName\\\":\\\"\\\",\\\"visibleRoles\\\":[\\\"reader\\\"]}],\\\"frontendPages\\\":[{\\\"code\\\":\\\"book_catalog_page\\\",\\\"menuCode\\\":\\\"book_catalog\\\",\\\"name\\\":\\\"图书目录\\\",\\\"pageType\\\":\\\"list\\\",\\\"parentPageCode\\\":\\\"\\\",\\\"path\\\":\\\"/books\\\",\\\"tableName\\\":\\\"book_info\\\"},{\\\"code\\\":\\\"announcement_list_page\\\",\\\"menuCode\\\":\\\"announcement_list\\\",\\\"name\\\":\\\"公告栏\\\",\\\"pageType\\\":\\\"list\\\",\\\"parentPageCode\\\":\\\"\\\",\\\"path\\\":\\\"/announcements\\\",\\\"tableName\\\":\\\"announcement\\\"},{\\\"code\\\":\\\"news_list_page\\\",\\\"menuCode\\\":\\\"news_list\\\",\\\"name\\\":\\\"新闻资讯\\\",\\\"pageType\\\":\\\"list\\\",\\\"parentPageCode\\\":\\\"\\\",\\\"path\\\":\\\"/news\\\",\\\"tableName\\\":\\\"news\\\"},{\\\"code\\\":\\\"friend_link_list_page\\\",\\\"menuCode\\\":\\\"friend_link_list\\\",\\\"name\\\":\\\"友情链接\\\",\\\"pageType\\\":\\\"list\\\",\\\"parentPageCode\\\":\\\"\\\",\\\"path\\\":\\\"/friend-links\\\",\\\"tableName\\\":\\\"friend_link\\\"},{\\\"code\\\":\\\"help_center_page\\\",\\\"menuCode\\\":\\\"help_center\\\",\\\"name\\\":\\\"帮助中心\\\",\\\"pageType\\\":\\\"list\\\",\\\"parentPageCode\\\":\\\"\\\",\\\"path\\\":\\\"/help\\\",\\\"tableName\\\":\\\"help_article\\\"},{\\\"code\\\":\\\"my_borrowing_page\\\",\\\"menuCode\\\":\\\"my_borrowing\\\",\\\"name\\\":\\\"我的借阅\\\",\\\"pageType\\\":\\\"current_user_list\\\",\\\"parentPageCode\\\":\\\"\\\",\\\"path\\\":\\\"/my-borrowing\\\",\\\"tableName\\\":\\\"borrowing_record\\\"},{\\\"code\\\":\\\"reader_profile_page\\\",\\\"menuCode\\\":\\\"reader_profile\\\",\\\"name\\\":\\\"个人资料\\\",\\\"pageType\\\":\\\"form\\\",\\\"parentPageCode\\\":\\\"\\\",\\\"path\\\":\\\"/reader/profile\\\",\\\"tableName\\\":\\\"reader\\\"},{\\\"code\\\":\\\"book_detail_page\\\",\\\"menuCode\\\":\\\"\\\",\\\"name\\\":\\\"图书详情\\\",\\\"pageType\\\":\\\"detail\\\",\\\"parentPageCode\\\":\\\"\\\",\\\"path\\\":\\\"/books/:id\\\",\\\"tableName\\\":\\\"book_info\\\"},{\\\"code\\\":\\\"borrowing_detail_page\\\",\\\"menuCode\\\":\\\"\\\",\\\"name\\\":\\\"借阅详情\\\",\\\"pageType\\\":\\\"detail\\\",\\\"parentPageCode\\\":\\\"\\\",\\\"path\\\":\\\"/my-borrowing/:id\\\",\\\"tableName\\\":\\\"borrowing_record\\\"}],\\\"roles\\\":[{\\\"code\\\":\\\"admin\\\",\\\"description\\\":\\\"系统管理员,管理图书、读者、借阅记录等所有业务\\\",\\\"name\\\":\\\"管理员\\\"},{\\\"code\\\":\\\"reader\\\",\\\"description\\\":\\\"注册读者,可查询图书、借阅归还、管理个人信息\\\",\\\"name\\\":\\\"读者\\\"}]}\",\"flowConfigJson\":\"{\\\"actions\\\":[{\\\"actor\\\":\\\"admin\\\",\\\"audit\\\":{\\\"timeField\\\":\\\"approve_time\\\",\\\"userField\\\":\\\"approve_user_id\\\"},\\\"button\\\":{\\\"confirm\\\":\\\"确认通过该借阅请求吗?\\\",\\\"order\\\":10,\\\"pageCode\\\":\\\"borrowing_admin_page\\\",\\\"scope\\\":\\\"admin\\\",\\\"slot\\\":\\\"list.rowActions\\\",\\\"type\\\":\\\"success\\\"},\\\"code\\\":\\\"approve\\\",\\\"effects\\\":[{\\\"amount\\\":\\\"1\\\",\\\"errorMessage\\\":\\\"图书库存不足\\\",\\\"field\\\":\\\"stock\\\",\\\"min\\\":\\\"0\\\",\\\"notFoundMessage\\\":\\\"图书不存在\\\",\\\"relationField\\\":\\\"book_id\\\",\\\"table\\\":\\\"book_info\\\",\\\"type\\\":\\\"decrease\\\",\\\"values\\\":{}}],\\\"from\\\":\\\"pending_approval\\\",\\\"invalidStateMessage\\\":\\\"当前状态不能审核\\\",\\\"method\\\":\\\"POST\\\",\\\"name\\\":\\\"确认借阅\\\",\\\"path\\\":\\\"/borrow-record/approve\\\",\\\"successMessage\\\":\\\"借阅确认成功\\\",\\\"to\\\":\\\"borrowing\\\"},{\\\"actor\\\":\\\"admin\\\",\\\"button\\\":{\\\"confirm\\\":\\\"确认拒绝该借阅请求吗?\\\",\\\"order\\\":20,\\\"pageCode\\\":\\\"borrowing_admin_page\\\",\\\"scope\\\":\\\"admin\\\",\\\"slot\\\":\\\"list.rowActions\\\",\\\"type\\\":\\\"danger\\\"},\\\"code\\\":\\\"reject\\\",\\\"effects\\\":[],\\\"from\\\":\\\"pending_approval\\\",\\\"invalidStateMessage\\\":\\\"当前状态不能拒绝\\\",\\\"method\\\":\\\"POST\\\",\\\"name\\\":\\\"拒绝借阅\\\",\\\"path\\\":\\\"/borrow-record/reject\\\",\\\"successMessage\\\":\\\"已拒绝借阅请求\\\",\\\"to\\\":\\\"cancelled\\\"},{\\\"actor\\\":\\\"reader\\\",\\\"button\\\":{\\\"confirm\\\":\\\"确认取消该借阅请求吗?\\\",\\\"order\\\":10,\\\"pageCode\\\":\\\"my_borrowing_page\\\",\\\"scope\\\":\\\"reader\\\",\\\"slot\\\":\\\"list.rowActions\\\",\\\"type\\\":\\\"default\\\"},\\\"code\\\":\\\"cancel\\\",\\\"effects\\\":[],\\\"from\\\":\\\"pending_approval\\\",\\\"invalidStateMessage\\\":\\\"只能取消待审批的借阅\\\",\\\"method\\\":\\\"POST\\\",\\\"name\\\":\\\"取消借阅\\\",\\\"path\\\":\\\"/borrow-record/cancel\\\",\\\"successMessage\\\":\\\"借阅请求已取消\\\",\\\"to\\\":\\\"cancelled\\\"},{\\\"actor\\\":\\\"admin\\\",\\\"button\\\":{\\\"confirm\\\":\\\"确认正常归还?\\\",\\\"order\\\":30,\\\"pageCode\\\":\\\"borrowing_admin_page\\\",\\\"scope\\\":\\\"admin\\\",\\\"slot\\\":\\\"list.rowActions\\\",\\\"type\\\":\\\"primary\\\"},\\\"code\\\":\\\"return_no_overdue\\\",\\\"effects\\\":[{\\\"amount\\\":\\\"1\\\",\\\"errorMessage\\\":\\\"图书归还失败\\\",\\\"field\\\":\\\"stock\\\",\\\"min\\\":\\\"0\\\",\\\"notFoundMessage\\\":\\\"图书不存在\\\",\\\"relationField\\\":\\\"book_id\\\",\\\"table\\\":\\\"book_info\\\",\\\"type\\\":\\\"increase\\\",\\\"values\\\":{}}],\\\"from\\\":\\\"borrowing\\\",\\\"invalidStateMessage\\\":\\\"当前记录未在借出中\\\",\\\"method\\\":\\\"POST\\\",\\\"name\\\":\\\"归还(无逾期)\\\",\\\"path\\\":\\\"/borrow-record/return\\\",\\\"successMessage\\\":\\\"归还成功\\\",\\\"to\\\":\\\"returned\\\"},{\\\"actor\\\":\\\"admin\\\",\\\"button\\\":{\\\"confirm\\\":\\\"该借阅已超期,确认归还并生成逾期费用?\\\",\\\"order\\\":40,\\\"pageCode\\\":\\\"borrowing_admin_page\\\",\\\"scope\\\":\\\"admin\\\",\\\"slot\\\":\\\"list.rowActions\\\",\\\"type\\\":\\\"warning\\\"},\\\"code\\\":\\\"return_with_overdue\\\",\\\"effects\\\":[{\\\"amount\\\":\\\"1\\\",\\\"errorMessage\\\":\\\"图书归还失败\\\",\\\"field\\\":\\\"stock\\\",\\\"min\\\":\\\"0\\\",\\\"notFoundMessage\\\":\\\"图书不存在\\\",\\\"relationField\\\":\\\"book_id\\\",\\\"table\\\":\\\"book_info\\\",\\\"type\\\":\\\"increase\\\",\\\"values\\\":{}}],\\\"from\\\":\\\"borrowing\\\",\\\"invalidStateMessage\\\":\\\"当前记录未在借出中\\\",\\\"method\\\":\\\"POST\\\",\\\"name\\\":\\\"归还(有逾期)\\\",\\\"path\\\":\\\"/borrow-record/return-overdue\\\",\\\"successMessage\\\":\\\"归还成功,请支付逾期费用\\\",\\\"to\\\":\\\"waiting_payment\\\"},{\\\"actor\\\":\\\"reader\\\",\\\"button\\\":{\\\"confirm\\\":\\\"确认支付逾期费用?\\\",\\\"order\\\":20,\\\"pageCode\\\":\\\"my_borrowing_page\\\",\\\"scope\\\":\\\"reader\\\",\\\"slot\\\":\\\"list.rowActions\\\",\\\"type\\\":\\\"success\\\"},\\\"code\\\":\\\"pay_overdue\\\",\\\"effects\\\":[],\\\"from\\\":\\\"waiting_payment\\\",\\\"invalidStateMessage\\\":\\\"当前记录无需支付逾期费\\\",\\\"method\\\":\\\"POST\\\",\\\"name\\\":\\\"支付逾期费\\\",\\\"path\\\":\\\"/borrow-record/pay-overdue\\\",\\\"successMessage\\\":\\\"逾期费支付成功\\\",\\\"to\\\":\\\"returned\\\"},{\\\"actor\\\":\\\"admin\\\",\\\"button\\\":{\\\"confirm\\\":\\\"确认标记该图书为损坏?\\\",\\\"order\\\":50,\\\"pageCode\\\":\\\"borrowing_admin_page\\\",\\\"scope\\\":\\\"admin\\\",\\\"slot\\\":\\\"list.rowActions\\\",\\\"type\\\":\\\"danger\\\"},\\\"code\\\":\\\"mark_damaged\\\",\\\"effects\\\":[{\\\"amount\\\":\\\"1\\\",\\\"errorMessage\\\":\\\"库存不足\\\",\\\"field\\\":\\\"stock\\\",\\\"min\\\":\\\"0\\\",\\\"notFoundMessage\\\":\\\"图书不存在\\\",\\\"relationField\\\":\\\"book_id\\\",\\\"table\\\":\\\"book_info\\\",\\\"type\\\":\\\"decrease\\\",\\\"values\\\":{}}],\\\"from\\\":\\\"borrowing\\\",\\\"invalidStateMessage\\\":\\\"当前记录未在借出中\\\",\\\"method\\\":\\\"POST\\\",\\\"name\\\":\\\"标记损坏\\\",\\\"path\\\":\\\"/borrow-record/mark-damaged\\\",\\\"successMessage\\\":\\\"已标记为损坏\\\",\\\"to\\\":\\\"damaged\\\"},{\\\"actor\\\":\\\"admin\\\",\\\"button\\\":{\\\"confirm\\\":\\\"确认标记该图书为丢失?\\\",\\\"order\\\":60,\\\"pageCode\\\":\\\"borrowing_admin_page\\\",\\\"scope\\\":\\\"admin\\\",\\\"slot\\\":\\\"list.rowActions\\\",\\\"type\\\":\\\"danger\\\"},\\\"code\\\":\\\"mark_lost\\\",\\\"effects\\\":[{\\\"amount\\\":\\\"1\\\",\\\"errorMessage\\\":\\\"库存不足\\\",\\\"field\\\":\\\"stock\\\",\\\"min\\\":\\\"0\\\",\\\"notFoundMessage\\\":\\\"图书不存在\\\",\\\"relationField\\\":\\\"book_id\\\",\\\"table\\\":\\\"book_info\\\",\\\"type\\\":\\\"decrease\\\",\\\"values\\\":{}}],\\\"from\\\":\\\"borrowing\\\",\\\"invalidStateMessage\\\":\\\"当前记录未在借出中\\\",\\\"method\\\":\\\"POST\\\",\\\"name\\\":\\\"标记丢失\\\",\\\"path\\\":\\\"/borrow-record/mark-lost\\\",\\\"successMessage\\\":\\\"已标记为丢失\\\",\\\"to\\\":\\\"lost\\\"},{\\\"actor\\\":\\\"reader\\\",\\\"button\\\":{\\\"confirm\\\":\\\"确认支付损坏赔偿?\\\",\\\"order\\\":30,\\\"pageCode\\\":\\\"my_borrowing_page\\\",\\\"scope\\\":\\\"reader\\\",\\\"slot\\\":\\\"list.rowActions\\\",\\\"type\\\":\\\"primary\\\"},\\\"code\\\":\\\"pay_damage_compensation\\\",\\\"effects\\\":[],\\\"from\\\":\\\"damaged\\\",\\\"invalidStateMessage\\\":\\\"当前记录未标记为损坏\\\",\\\"method\\\":\\\"POST\\\",\\\"name\\\":\\\"支付损坏赔偿\\\",\\\"path\\\":\\\"/borrow-record/pay-damage\\\",\\\"successMessage\\\":\\\"赔偿支付成功\\\",\\\"to\\\":\\\"closed\\\"},{\\\"actor\\\":\\\"reader\\\",\\\"button\\\":{\\\"confirm\\\":\\\"确认支付丢失赔偿?\\\",\\\"order\\\":40,\\\"pageCode\\\":\\\"my_borrowing_page\\\",\\\"scope\\\":\\\"reader\\\",\\\"slot\\\":\\\"list.rowActions\\\",\\\"type\\\":\\\"primary\\\"},\\\"code\\\":\\\"pay_lost_compensation\\\",\\\"effects\\\":[],\\\"from\\\":\\\"lost\\\",\\\"invalidStateMessage\\\":\\\"当前记录未标记为丢失\\\",\\\"method\\\":\\\"POST\\\",\\\"name\\\":\\\"支付丢失赔偿\\\",\\\"path\\\":\\\"/borrow-record/pay-lost\\\",\\\"successMessage\\\":\\\"赔偿支付成功\\\",\\\"to\\\":\\\"closed\\\"},{\\\"actor\\\":\\\"admin\\\",\\\"button\\\":{\\\"confirm\\\":\\\"确认处理该损坏记录?\\\",\\\"order\\\":70,\\\"pageCode\\\":\\\"borrowing_admin_page\\\",\\\"scope\\\":\\\"admin\\\",\\\"slot\\\":\\\"list.rowActions\\\",\\\"type\\\":\\\"primary\\\"},\\\"code\\\":\\\"admin_close_damaged\\\",\\\"effects\\\":[],\\\"from\\\":\\\"damaged\\\",\\\"invalidStateMessage\\\":\\\"当前记录未标记为损坏\\\",\\\"method\\\":\\\"POST\\\",\\\"name\\\":\\\"管理员处理损坏\\\",\\\"path\\\":\\\"/borrow-record/close-damaged\\\",\\\"successMessage\\\":\\\"损坏记录已处理\\\",\\\"to\\\":\\\"closed\\\"},{\\\"actor\\\":\\\"admin\\\",\\\"button\\\":{\\\"confirm\\\":\\\"确认处理该丢失记录?\\\",\\\"order\\\":80,\\\"pageCode\\\":\\\"borrowing_admin_page\\\",\\\"scope\\\":\\\"admin\\\",\\\"slot\\\":\\\"list.rowActions\\\",\\\"type\\\":\\\"primary\\\"},\\\"code\\\":\\\"admin_close_lost\\\",\\\"effects\\\":[],\\\"from\\\":\\\"lost\\\",\\\"invalidStateMessage\\\":\\\"当前记录未标记为丢失\\\",\\\"method\\\":\\\"POST\\\",\\\"name\\\":\\\"管理员处理丢失\\\",\\\"path\\\":\\\"/borrow-record/close-lost\\\",\\\"successMessage\\\":\\\"丢失记录已处理\\\",\\\"to\\\":\\\"closed\\\"}],\\\"code\\\":\\\"borrowing_flow\\\",\\\"mainTable\\\":\\\"borrowing_record\\\",\\\"metrics\\\":[{\\\"aggregate\\\":\\\"count\\\",\\\"code\\\":\\\"pending_approval_count\\\",\\\"field\\\":\\\"id\\\",\\\"name\\\":\\\"待审批数量\\\",\\\"status\\\":\\\"pending_approval\\\",\\\"table\\\":\\\"borrowing_record\\\",\\\"unit\\\":\\\"条\\\"},{\\\"aggregate\\\":\\\"count\\\",\\\"code\\\":\\\"borrowing_count\\\",\\\"field\\\":\\\"id\\\",\\\"name\\\":\\\"借出中数量\\\",\\\"status\\\":\\\"borrowing\\\",\\\"table\\\":\\\"borrowing_record\\\",\\\"unit\\\":\\\"条\\\"},{\\\"aggregate\\\":\\\"count\\\",\\\"code\\\":\\\"waiting_payment_count\\\",\\\"field\\\":\\\"id\\\",\\\"name\\\":\\\"待支付逾期费数量\\\",\\\"status\\\":\\\"waiting_payment\\\",\\\"table\\\":\\\"borrowing_record\\\",\\\"unit\\\":\\\"条\\\"},{\\\"aggregate\\\":\\\"count\\\",\\\"code\\\":\\\"returned_count\\\",\\\"field\\\":\\\"id\\\",\\\"name\\\":\\\"已归还数量\\\",\\\"status\\\":\\\"returned\\\",\\\"table\\\":\\\"borrowing_record\\\",\\\"unit\\\":\\\"条\\\"},{\\\"aggregate\\\":\\\"count\\\",\\\"code\\\":\\\"damaged_lost_count\\\",\\\"field\\\":\\\"id\\\",\\\"name\\\":\\\"损坏丢失数量\\\",\\\"status\\\":\\\"damaged\\\",\\\"table\\\":\\\"borrowing_record\\\",\\\"unit\\\":\\\"条\\\"},{\\\"aggregate\\\":\\\"count\\\",\\\"code\\\":\\\"lost_count\\\",\\\"field\\\":\\\"id\\\",\\\"name\\\":\\\"丢失数量\\\",\\\"status\\\":\\\"lost\\\",\\\"table\\\":\\\"borrowing_record\\\",\\\"unit\\\":\\\"条\\\"},{\\\"aggregate\\\":\\\"count\\\",\\\"code\\\":\\\"total_borrowings\\\",\\\"field\\\":\\\"id\\\",\\\"name\\\":\\\"总借阅次数\\\",\\\"status\\\":\\\"\\\",\\\"table\\\":\\\"borrowing_record\\\",\\\"unit\\\":\\\"条\\\"}],\\\"name\\\":\\\"借阅记录状态流转\\\",\\\"notFoundMessage\\\":\\\"借阅记录不存在\\\",\\\"states\\\":[{\\\"code\\\":\\\"pending_approval\\\",\\\"label\\\":\\\"待审批\\\"},{\\\"code\\\":\\\"borrowing\\\",\\\"label\\\":\\\"借出中\\\"},{\\\"code\\\":\\\"waiting_payment\\\",\\\"label\\\":\\\"待支付逾期费\\\"},{\\\"code\\\":\\\"returned\\\",\\\"label\\\":\\\"已归还\\\"},{\\\"code\\\":\\\"damaged\\\",\\\"label\\\":\\\"损坏\\\"},{\\\"code\\\":\\\"lost\\\",\\\"label\\\":\\\"丢失\\\"},{\\\"code\\\":\\\"cancelled\\\",\\\"label\\\":\\\"已取消\\\"},{\\\"code\\\":\\\"closed\\\",\\\"label\\\":\\\"已处理\\\"}],\\\"statusField\\\":\\\"status\\\",\\\"version\\\":\\\"1.0\\\"}\",\"result\":{\"downloadReady\":false,\"projectId\":100,\"report\":{\"adminPageCount\":0,\"businessActionCount\":0,\"businessLoopComplete\":true,\"businessLoopWarnings\":[],\"frontendPageCount\":0,\"loopActions\":12,\"missingRequiredActions\":[],\"quantityRules\":0,\"recordRules\":0,\"stateTransitions\":0,\"tableCount\":10},\"stage\":\"DATABASE\",\"suggestedActions\":[]}},\"schemaVersion\":\"1.0\",\"stageCode\":\"DATABASE\"}', '328a7aba055ca6e87170fb344d15f10290f702ffff961ce8eb14b17630f075d7', NULL, NULL, '2026-07-14 15:21:08');
INSERT INTO `factory_ai_task_checkpoint` VALUES (101, 101, 'DATABASE', 3, 1, '1.0', '{\"payload\":{\"appBlueprintJson\":\"{\\\"adminHomeDashboard\\\":{\\\"charts\\\":[{\\\"filters\\\":[],\\\"metrics\\\":[],\\\"semantic\\\":\\\"order\\\",\\\"title\\\":\\\"借阅趋势\\\",\\\"type\\\":\\\"line\\\"},{\\\"filters\\\":[],\\\"metrics\\\":[],\\\"semantic\\\":\\\"content\\\",\\\"title\\\":\\\"图书分类分布\\\",\\\"type\\\":\\\"pie\\\"}],\\\"description\\\":\\\"核心业务数据\\\",\\\"metrics\\\":[{\\\"filters\\\":[],\\\"semantic\\\":\\\"content\\\"},{\\\"filters\\\":[],\\\"semantic\\\":\\\"user\\\"},{\\\"filters\\\":[],\\\"semantic\\\":\\\"order\\\"},{\\\"filters\\\":[],\\\"semantic\\\":\\\"money\\\"}],\\\"title\\\":\\\"运营总览\\\"},\\\"adminMenus\\\":[{\\\"code\\\":\\\"book_admin\\\",\\\"dataScope\\\":\\\"ROLE\\\",\\\"name\\\":\\\"图书管理\\\",\\\"pageCode\\\":\\\"book_admin_page\\\",\\\"pageType\\\":\\\"list\\\",\\\"path\\\":\\\"/admin/books\\\",\\\"requiresLogin\\\":true,\\\"tableName\\\":\\\"book_info\\\",\\\"visibleRoles\\\":[\\\"admin\\\"]},{\\\"code\\\":\\\"borrow_admin\\\",\\\"dataScope\\\":\\\"ROLE\\\",\\\"name\\\":\\\"借阅审核\\\",\\\"pageCode\\\":\\\"borrow_admin_page\\\",\\\"pageType\\\":\\\"list\\\",\\\"path\\\":\\\"/admin/borrows\\\",\\\"requiresLogin\\\":true,\\\"tableName\\\":\\\"borrow_record\\\",\\\"visibleRoles\\\":[\\\"admin\\\"]},{\\\"code\\\":\\\"reader_admin\\\",\\\"dataScope\\\":\\\"ROLE\\\",\\\"name\\\":\\\"读者管理\\\",\\\"pageCode\\\":\\\"reader_admin_page\\\",\\\"pageType\\\":\\\"list\\\",\\\"path\\\":\\\"/admin/readers\\\",\\\"requiresLogin\\\":true,\\\"tableName\\\":\\\"reader\\\",\\\"visibleRoles\\\":[\\\"admin\\\"]},{\\\"code\\\":\\\"fine_admin\\\",\\\"dataScope\\\":\\\"ROLE\\\",\\\"name\\\":\\\"罚款管理\\\",\\\"pageCode\\\":\\\"fine_admin_page\\\",\\\"pageType\\\":\\\"list\\\",\\\"path\\\":\\\"/admin/fines\\\",\\\"requiresLogin\\\":true,\\\"tableName\\\":\\\"fine_record\\\",\\\"visibleRoles\\\":[\\\"admin\\\"]},{\\\"code\\\":\\\"admin_profile\\\",\\\"dataScope\\\":\\\"CURRENT_USER\\\",\\\"name\\\":\\\"管理员资料\\\",\\\"pageCode\\\":\\\"admin_profile_page\\\",\\\"pageType\\\":\\\"form\\\",\\\"path\\\":\\\"/admin/profile\\\",\\\"requiresLogin\\\":true,\\\"tableName\\\":\\\"admin\\\",\\\"visibleRoles\\\":[\\\"admin\\\"]}],\\\"frontendMenus\\\":[{\\\"code\\\":\\\"book_catalog\\\",\\\"dataScope\\\":\\\"PUBLIC\\\",\\\"name\\\":\\\"图书目录\\\",\\\"pageCode\\\":\\\"book_catalog_page\\\",\\\"pageType\\\":\\\"\\\",\\\"path\\\":\\\"/books\\\",\\\"requiresLogin\\\":false,\\\"tableName\\\":\\\"\\\",\\\"visibleRoles\\\":[]},{\\\"code\\\":\\\"my_borrows\\\",\\\"dataScope\\\":\\\"CURRENT_USER\\\",\\\"name\\\":\\\"我的借阅\\\",\\\"pageCode\\\":\\\"my_borrows_page\\\",\\\"pageType\\\":\\\"\\\",\\\"path\\\":\\\"/my/borrows\\\",\\\"requiresLogin\\\":true,\\\"tableName\\\":\\\"\\\",\\\"visibleRoles\\\":[\\\"reader\\\"]},{\\\"code\\\":\\\"my_reservations\\\",\\\"dataScope\\\":\\\"CURRENT_USER\\\",\\\"name\\\":\\\"我的预约\\\",\\\"pageCode\\\":\\\"my_reservations_page\\\",\\\"pageType\\\":\\\"\\\",\\\"path\\\":\\\"/my/reservations\\\",\\\"requiresLogin\\\":true,\\\"tableName\\\":\\\"\\\",\\\"visibleRoles\\\":[\\\"reader\\\"]},{\\\"code\\\":\\\"my_fines\\\",\\\"dataScope\\\":\\\"CURRENT_USER\\\",\\\"name\\\":\\\"我的罚款\\\",\\\"pageCode\\\":\\\"my_fines_page\\\",\\\"pageType\\\":\\\"\\\",\\\"path\\\":\\\"/my/fines\\\",\\\"requiresLogin\\\":true,\\\"tableName\\\":\\\"\\\",\\\"visibleRoles\\\":[\\\"reader\\\"]},{\\\"code\\\":\\\"reader_profile\\\",\\\"dataScope\\\":\\\"CURRENT_USER\\\",\\\"name\\\":\\\"个人信息\\\",\\\"pageCode\\\":\\\"reader_profile_page\\\",\\\"pageType\\\":\\\"\\\",\\\"path\\\":\\\"/my/profile\\\",\\\"requiresLogin\\\":true,\\\"tableName\\\":\\\"\\\",\\\"visibleRoles\\\":[\\\"reader\\\"]}],\\\"frontendPages\\\":[{\\\"code\\\":\\\"book_catalog_page\\\",\\\"menuCode\\\":\\\"book_catalog\\\",\\\"name\\\":\\\"图书目录\\\",\\\"pageType\\\":\\\"list\\\",\\\"parentPageCode\\\":\\\"\\\",\\\"path\\\":\\\"/books\\\",\\\"tableName\\\":\\\"book_info\\\"},{\\\"code\\\":\\\"my_borrows_page\\\",\\\"menuCode\\\":\\\"my_borrows\\\",\\\"name\\\":\\\"我的借阅\\\",\\\"pageType\\\":\\\"current_user_list\\\",\\\"parentPageCode\\\":\\\"\\\",\\\"path\\\":\\\"/my/borrows\\\",\\\"tableName\\\":\\\"borrow_record\\\"},{\\\"code\\\":\\\"my_reservations_page\\\",\\\"menuCode\\\":\\\"my_reservations\\\",\\\"name\\\":\\\"我的预约\\\",\\\"pageType\\\":\\\"current_user_list\\\",\\\"parentPageCode\\\":\\\"\\\",\\\"path\\\":\\\"/my/reservations\\\",\\\"tableName\\\":\\\"reservation\\\"},{\\\"code\\\":\\\"my_fines_page\\\",\\\"menuCode\\\":\\\"my_fines\\\",\\\"name\\\":\\\"我的罚款\\\",\\\"pageType\\\":\\\"current_user_list\\\",\\\"parentPageCode\\\":\\\"\\\",\\\"path\\\":\\\"/my/fines\\\",\\\"tableName\\\":\\\"fine_record\\\"},{\\\"code\\\":\\\"reader_profile_page\\\",\\\"menuCode\\\":\\\"reader_profile\\\",\\\"name\\\":\\\"个人信息\\\",\\\"pageType\\\":\\\"form\\\",\\\"parentPageCode\\\":\\\"\\\",\\\"path\\\":\\\"/my/profile\\\",\\\"tableName\\\":\\\"reader\\\"}],\\\"roles\\\":[{\\\"code\\\":\\\"admin\\\",\\\"description\\\":\\\"系统管理员,负责图书管理、借阅审核等\\\",\\\"name\\\":\\\"管理员\\\"},{\\\"code\\\":\\\"reader\\\",\\\"description\\\":\\\"普通读者,可在线借书、预约、缴纳罚款\\\",\\\"name\\\":\\\"读者\\\"}]}\",\"flowConfigJson\":\"{\\\"actions\\\":[{\\\"actor\\\":\\\"admin\\\",\\\"audit\\\":{\\\"timeField\\\":\\\"approve_time\\\",\\\"userField\\\":\\\"approve_user_id\\\"},\\\"button\\\":{\\\"confirm\\\":\\\"确认审核通过吗?\\\",\\\"order\\\":10,\\\"pageCode\\\":\\\"borrow_admin_page\\\",\\\"scope\\\":\\\"admin\\\",\\\"slot\\\":\\\"list.rowActions\\\",\\\"type\\\":\\\"success\\\"},\\\"code\\\":\\\"approve\\\",\\\"effects\\\":[{\\\"amount\\\":\\\"1\\\",\\\"errorMessage\\\":\\\"图书库存不足\\\",\\\"field\\\":\\\"stock\\\",\\\"min\\\":\\\"0\\\",\\\"notFoundMessage\\\":\\\"图书不存在\\\",\\\"relationField\\\":\\\"book_id\\\",\\\"table\\\":\\\"book\\\",\\\"type\\\":\\\"decrease\\\",\\\"values\\\":{}}],\\\"from\\\":\\\"pending\\\",\\\"invalidStateMessage\\\":\\\"当前状态不能审核\\\",\\\"method\\\":\\\"POST\\\",\\\"name\\\":\\\"审核通过\\\",\\\"path\\\":\\\"/borrow-record/approve\\\",\\\"successMessage\\\":\\\"审核成功,图书已借出\\\",\\\"to\\\":\\\"borrowing\\\"},{\\\"actor\\\":\\\"admin\\\",\\\"audit\\\":{\\\"timeField\\\":\\\"approve_time\\\",\\\"userField\\\":\\\"approve_user_id\\\"},\\\"button\\\":{\\\"confirm\\\":\\\"确认拒绝吗?\\\",\\\"order\\\":20,\\\"pageCode\\\":\\\"borrow_admin_page\\\",\\\"scope\\\":\\\"admin\\\",\\\"slot\\\":\\\"list.rowActions\\\",\\\"type\\\":\\\"danger\\\"},\\\"code\\\":\\\"reject\\\",\\\"effects\\\":[],\\\"from\\\":\\\"pending\\\",\\\"invalidStateMessage\\\":\\\"当前状态不能拒绝\\\",\\\"method\\\":\\\"POST\\\",\\\"name\\\":\\\"审核拒绝\\\",\\\"path\\\":\\\"/borrow-record/reject\\\",\\\"successMessage\\\":\\\"已拒绝借书申请\\\",\\\"to\\\":\\\"cancelled\\\"},{\\\"actor\\\":\\\"reader\\\",\\\"audit\\\":{\\\"timeField\\\":\\\"return_apply_time\\\",\\\"userField\\\":\\\"return_applicant_id\\\"},\\\"button\\\":{\\\"confirm\\\":\\\"确认申请还书吗?\\\",\\\"order\\\":10,\\\"pageCode\\\":\\\"my_borrows_page\\\",\\\"scope\\\":\\\"reader\\\",\\\"slot\\\":\\\"list.rowActions\\\",\\\"type\\\":\\\"primary\\\"},\\\"code\\\":\\\"return_apply\\\",\\\"effects\\\":[],\\\"from\\\":\\\"borrowing\\\",\\\"invalidStateMessage\\\":\\\"当前借阅记录无法申请还书\\\",\\\"method\\\":\\\"POST\\\",\\\"name\\\":\\\"申请还书\\\",\\\"path\\\":\\\"/borrow-record/return-apply\\\",\\\"successMessage\\\":\\\"还书申请已提交,请等待管理员确认\\\",\\\"to\\\":\\\"returning\\\"},{\\\"actor\\\":\\\"reader\\\",\\\"audit\\\":{\\\"timeField\\\":\\\"return_apply_time\\\",\\\"userField\\\":\\\"return_applicant_id\\\"},\\\"button\\\":{\\\"confirm\\\":\\\"确认申请还书吗?\\\",\\\"order\\\":20,\\\"pageCode\\\":\\\"my_borrows_page\\\",\\\"scope\\\":\\\"reader\\\",\\\"slot\\\":\\\"list.rowActions\\\",\\\"type\\\":\\\"primary\\\"},\\\"code\\\":\\\"return_apply_overdue\\\",\\\"effects\\\":[],\\\"from\\\":\\\"overdue\\\",\\\"invalidStateMessage\\\":\\\"当前记录无法申请还书\\\",\\\"method\\\":\\\"POST\\\",\\\"name\\\":\\\"逾期还书申请\\\",\\\"path\\\":\\\"/borrow-record/return-apply-overdue\\\",\\\"successMessage\\\":\\\"还书申请已提交\\\",\\\"to\\\":\\\"returning\\\"},{\\\"actor\\\":\\\"admin\\\",\\\"audit\\\":{\\\"timeField\\\":\\\"confirm_return_time\\\",\\\"userField\\\":\\\"confirm_return_user_id\\\"},\\\"button\\\":{\\\"confirm\\\":\\\"确认归还吗?\\\",\\\"order\\\":30,\\\"pageCode\\\":\\\"borrow_admin_page\\\",\\\"scope\\\":\\\"admin\\\",\\\"slot\\\":\\\"list.rowActions\\\",\\\"type\\\":\\\"success\\\"},\\\"code\\\":\\\"confirm_return_normal\\\",\\\"effects\\\":[],\\\"from\\\":\\\"returning\\\",\\\"invalidStateMessage\\\":\\\"当前状态不能确认归还\\\",\\\"method\\\":\\\"POST\\\",\\\"name\\\":\\\"确认归还\\\",\\\"path\\\":\\\"/borrow-record/confirm-return\\\",\\\"successMessage\\\":\\\"归还确认成功\\\",\\\"to\\\":\\\"returned\\\"},{\\\"actor\\\":\\\"admin\\\",\\\"audit\\\":{\\\"timeField\\\":\\\"confirm_return_time\\\",\\\"userField\\\":\\\"confirm_return_user_id\\\"},\\\"button\\\":{\\\"confirm\\\":\\\"该记录已超期,确认归还并生成罚款吗?\\\",\\\"order\\\":40,\\\"pageCode\\\":\\\"borrow_admin_page\\\",\\\"scope\\\":\\\"admin\\\",\\\"slot\\\":\\\"list.rowActions\\\",\\\"type\\\":\\\"warning\\\"},\\\"code\\\":\\\"confirm_return_overdue\\\",\\\"effects\\\":[{\\\"amount\\\":\\\"1\\\",\\\"errorMessage\\\":\\\"罚款记录创建失败\\\",\\\"min\\\":\\\"0\\\",\\\"notFoundMessage\\\":\\\"\\\",\\\"table\\\":\\\"fine_record\\\",\\\"type\\\":\\\"create_record\\\",\\\"values\\\":{\\\"amount\\\":\\\"0.1\\\",\\\"user_id\\\":\\\"record.user_id\\\",\\\"created_at\\\":\\\"now\\\",\\\"borrow_record_id\\\":\\\"record.id\\\",\\\"status\\\":\\\"unpaid\\\"}}],\\\"from\\\":\\\"returning\\\",\\\"invalidStateMessage\\\":\\\"当前状态不能确认归还\\\",\\\"method\\\":\\\"POST\\\",\\\"name\\\":\\\"确认归还(超期)\\\",\\\"path\\\":\\\"/borrow-record/confirm-return-overdue\\\",\\\"successMessage\\\":\\\"归还确认成功,已生成罚款记录\\\",\\\"to\\\":\\\"returned_with_fine\\\"},{\\\"actor\\\":\\\"reader\\\",\\\"audit\\\":{\\\"timeField\\\":\\\"pay_fine_time\\\",\\\"userField\\\":\\\"pay_fine_user_id\\\"},\\\"button\\\":{\\\"confirm\\\":\\\"确认缴纳罚款吗?\\\",\\\"order\\\":30,\\\"pageCode\\\":\\\"my_borrows_page\\\",\\\"scope\\\":\\\"reader\\\",\\\"slot\\\":\\\"list.rowActions\\\",\\\"type\\\":\\\"primary\\\"},\\\"code\\\":\\\"pay_fine\\\",\\\"effects\\\":[{\\\"amount\\\":\\\"1\\\",\\\"errorMessage\\\":\\\"更新罚款状态失败\\\",\\\"min\\\":\\\"0\\\",\\\"notFoundMessage\\\":\\\"罚款记录不存在\\\",\\\"relationField\\\":\\\"borrow_record_id\\\",\\\"table\\\":\\\"fine_record\\\",\\\"type\\\":\\\"update_related\\\",\\\"values\\\":{\\\"status\\\":\\\"paid\\\",\\\"pay_time\\\":\\\"now\\\"}}],\\\"from\\\":\\\"returned_with_fine\\\",\\\"invalidStateMessage\\\":\\\"无需缴纳罚款\\\",\\\"method\\\":\\\"POST\\\",\\\"name\\\":\\\"缴纳罚款\\\",\\\"path\\\":\\\"/borrow-record/pay-fine\\\",\\\"successMessage\\\":\\\"罚款缴纳成功\\\",\\\"to\\\":\\\"returned\\\"},{\\\"actor\\\":\\\"admin\\\",\\\"audit\\\":{\\\"timeField\\\":\\\"mark_overdue_time\\\",\\\"userField\\\":\\\"mark_overdue_user_id\\\"},\\\"button\\\":{\\\"confirm\\\":\\\"确认标记逾期吗?\\\",\\\"order\\\":50,\\\"pageCode\\\":\\\"borrow_admin_page\\\",\\\"scope\\\":\\\"admin\\\",\\\"slot\\\":\\\"list.rowActions\\\",\\\"type\\\":\\\"warning\\\"},\\\"code\\\":\\\"mark_overdue\\\",\\\"effects\\\":[],\\\"from\\\":\\\"borrowing\\\",\\\"invalidStateMessage\\\":\\\"当前状态不能标记逾期\\\",\\\"method\\\":\\\"POST\\\",\\\"name\\\":\\\"标记逾期\\\",\\\"path\\\":\\\"/borrow-record/mark-overdue\\\",\\\"successMessage\\\":\\\"已标记为逾期\\\",\\\"to\\\":\\\"overdue\\\"}],\\\"code\\\":\\\"borrow_flow\\\",\\\"mainTable\\\":\\\"borrow_record\\\",\\\"metrics\\\":[{\\\"aggregate\\\":\\\"count\\\",\\\"code\\\":\\\"borrowing_count\\\",\\\"field\\\":\\\"id\\\",\\\"name\\\":\\\"借阅中数量\\\",\\\"status\\\":\\\"borrowing\\\",\\\"table\\\":\\\"borrow_record\\\",\\\"unit\\\":\\\"条\\\"},{\\\"aggregate\\\":\\\"count\\\",\\\"code\\\":\\\"overdue_count\\\",\\\"field\\\":\\\"id\\\",\\\"name\\\":\\\"逾期数量\\\",\\\"status\\\":\\\"overdue\\\",\\\"table\\\":\\\"borrow_record\\\",\\\"unit\\\":\\\"条\\\"},{\\\"aggregate\\\":\\\"count\\\",\\\"code\\\":\\\"returned_count\\\",\\\"field\\\":\\\"id\\\",\\\"name\\\":\\\"已归还数量\\\",\\\"status\\\":\\\"returned\\\",\\\"table\\\":\\\"borrow_record\\\",\\\"unit\\\":\\\"条\\\"},{\\\"aggregate\\\":\\\"count\\\",\\\"code\\\":\\\"pending_count\\\",\\\"field\\\":\\\"id\\\",\\\"name\\\":\\\"待审核数量\\\",\\\"status\\\":\\\"pending\\\",\\\"table\\\":\\\"borrow_record\\\",\\\"unit\\\":\\\"条\\\"}],\\\"name\\\":\\\"借阅管理流程\\\",\\\"notFoundMessage\\\":\\\"借阅记录不存在\\\",\\\"states\\\":[{\\\"code\\\":\\\"pending\\\",\\\"label\\\":\\\"待审核\\\"},{\\\"code\\\":\\\"borrowing\\\",\\\"label\\\":\\\"借阅中\\\"},{\\\"code\\\":\\\"overdue\\\",\\\"label\\\":\\\"逾期\\\"},{\\\"code\\\":\\\"returning\\\",\\\"label\\\":\\\"归还中\\\"},{\\\"code\\\":\\\"returned_with_fine\\\",\\\"label\\\":\\\"待缴费归还\\\"},{\\\"code\\\":\\\"returned\\\",\\\"label\\\":\\\"已归还\\\"},{\\\"code\\\":\\\"cancelled\\\",\\\"label\\\":\\\"已取消\\\"}],\\\"statusField\\\":\\\"status\\\",\\\"version\\\":\\\"1.0\\\"}\",\"result\":{\"downloadReady\":false,\"projectId\":101,\"report\":{\"adminPageCount\":0,\"businessActionCount\":0,\"businessLoopComplete\":true,\"businessLoopWarnings\":[],\"frontendPageCount\":0,\"loopActions\":8,\"missingRequiredActions\":[],\"quantityRules\":0,\"recordRules\":0,\"stateTransitions\":0,\"tableCount\":7},\"stage\":\"DATABASE\",\"suggestedActions\":[]}},\"schemaVersion\":\"1.0\",\"stageCode\":\"DATABASE\"}', 'ae21c961336d1dd5aea147e0ddd46ea578a772f38a14c286442df74cd7674c1b', NULL, NULL, '2026-07-14 15:50:12');
INSERT INTO `factory_ai_task_checkpoint` VALUES (102, 102, 'DATABASE', 3, 1, '1.0', '{\"payload\":{\"appBlueprintJson\":\"{\\\"adminHomeDashboard\\\":{\\\"charts\\\":[{\\\"code\\\":\\\"borrow_trend\\\",\\\"filters\\\":[],\\\"metrics\\\":[],\\\"semantic\\\":\\\"order\\\",\\\"tableName\\\":\\\"borrow_record\\\",\\\"type\\\":\\\"line\\\"},{\\\"code\\\":\\\"book_category_distribution\\\",\\\"filters\\\":[],\\\"metrics\\\":[],\\\"semantic\\\":\\\"content\\\",\\\"tableName\\\":\\\"book_info\\\",\\\"type\\\":\\\"pie\\\"}],\\\"description\\\":\\\"核心业务数据\\\",\\\"metrics\\\":[{\\\"aggregate\\\":\\\"count\\\",\\\"code\\\":\\\"total_books\\\",\\\"filters\\\":[],\\\"semantic\\\":\\\"content\\\",\\\"tableName\\\":\\\"book_info\\\"},{\\\"aggregate\\\":\\\"count\\\",\\\"code\\\":\\\"total_borrowed\\\",\\\"filters\\\":[],\\\"semantic\\\":\\\"order\\\",\\\"tableName\\\":\\\"borrow_record\\\"},{\\\"aggregate\\\":\\\"count\\\",\\\"code\\\":\\\"total_readers\\\",\\\"filters\\\":[],\\\"semantic\\\":\\\"user\\\",\\\"tableName\\\":\\\"reader\\\"},{\\\"aggregate\\\":\\\"sum\\\",\\\"code\\\":\\\"unpaid_fines\\\",\\\"field\\\":\\\"amount\\\",\\\"filters\\\":[],\\\"semantic\\\":\\\"money\\\",\\\"tableName\\\":\\\"fine_record\\\"}],\\\"title\\\":\\\"运营总览\\\"},\\\"adminMenus\\\":[{\\\"code\\\":\\\"book_admin\\\",\\\"dataScope\\\":\\\"ROLE\\\",\\\"name\\\":\\\"图书管理\\\",\\\"pageCode\\\":\\\"book_admin_page\\\",\\\"pageType\\\":\\\"list\\\",\\\"path\\\":\\\"/admin/books\\\",\\\"requiresLogin\\\":true,\\\"tableName\\\":\\\"book_info\\\",\\\"visibleRoles\\\":[\\\"admin\\\"]},{\\\"code\\\":\\\"borrow_admin\\\",\\\"dataScope\\\":\\\"ROLE\\\",\\\"name\\\":\\\"借阅管理\\\",\\\"pageCode\\\":\\\"borrow_admin_page\\\",\\\"pageType\\\":\\\"list\\\",\\\"path\\\":\\\"/admin/borrows\\\",\\\"requiresLogin\\\":true,\\\"tableName\\\":\\\"borrow_record\\\",\\\"visibleRoles\\\":[\\\"admin\\\"]},{\\\"code\\\":\\\"reservation_admin\\\",\\\"dataScope\\\":\\\"ROLE\\\",\\\"name\\\":\\\"预约管理\\\",\\\"pageCode\\\":\\\"reservation_admin_page\\\",\\\"pageType\\\":\\\"list\\\",\\\"path\\\":\\\"/admin/reservations\\\",\\\"requiresLogin\\\":true,\\\"tableName\\\":\\\"reservation_record\\\",\\\"visibleRoles\\\":[\\\"admin\\\"]},{\\\"code\\\":\\\"fine_admin\\\",\\\"dataScope\\\":\\\"ROLE\\\",\\\"name\\\":\\\"罚款管理\\\",\\\"pageCode\\\":\\\"fine_admin_page\\\",\\\"pageType\\\":\\\"list\\\",\\\"path\\\":\\\"/admin/fines\\\",\\\"requiresLogin\\\":true,\\\"tableName\\\":\\\"fine_record\\\",\\\"visibleRoles\\\":[\\\"admin\\\"]},{\\\"code\\\":\\\"reader_admin\\\",\\\"dataScope\\\":\\\"ROLE\\\",\\\"name\\\":\\\"读者管理\\\",\\\"pageCode\\\":\\\"reader_admin_page\\\",\\\"pageType\\\":\\\"list\\\",\\\"path\\\":\\\"/admin/readers\\\",\\\"requiresLogin\\\":true,\\\"tableName\\\":\\\"reader\\\",\\\"visibleRoles\\\":[\\\"admin\\\"]},{\\\"code\\\":\\\"admin_admin\\\",\\\"dataScope\\\":\\\"ROLE\\\",\\\"name\\\":\\\"管理员管理\\\",\\\"pageCode\\\":\\\"admin_admin_page\\\",\\\"pageType\\\":\\\"list\\\",\\\"path\\\":\\\"/admin/admins\\\",\\\"requiresLogin\\\":true,\\\"tableName\\\":\\\"admin\\\",\\\"visibleRoles\\\":[\\\"admin\\\"]},{\\\"code\\\":\\\"admin_profile\\\",\\\"dataScope\\\":\\\"CURRENT_USER\\\",\\\"name\\\":\\\"个人资料\\\",\\\"pageCode\\\":\\\"admin_profile_page\\\",\\\"pageType\\\":\\\"form\\\",\\\"path\\\":\\\"/admin/profile\\\",\\\"requiresLogin\\\":true,\\\"tableName\\\":\\\"admin\\\",\\\"visibleRoles\\\":[\\\"admin\\\"]}],\\\"frontendMenus\\\":[{\\\"code\\\":\\\"book_catalog\\\",\\\"dataScope\\\":\\\"PUBLIC\\\",\\\"name\\\":\\\"图书目录\\\",\\\"pageCode\\\":\\\"book_catalog_page\\\",\\\"pageType\\\":\\\"\\\",\\\"path\\\":\\\"/books\\\",\\\"requiresLogin\\\":false,\\\"tableName\\\":\\\"\\\",\\\"visibleRoles\\\":[]},{\\\"code\\\":\\\"my_borrows\\\",\\\"dataScope\\\":\\\"CURRENT_USER\\\",\\\"name\\\":\\\"我的借阅\\\",\\\"pageCode\\\":\\\"my_borrows_page\\\",\\\"pageType\\\":\\\"\\\",\\\"path\\\":\\\"/borrows\\\",\\\"requiresLogin\\\":true,\\\"tableName\\\":\\\"\\\",\\\"visibleRoles\\\":[\\\"reader\\\"]},{\\\"code\\\":\\\"my_reservations\\\",\\\"dataScope\\\":\\\"CURRENT_USER\\\",\\\"name\\\":\\\"我的预约\\\",\\\"pageCode\\\":\\\"my_reservations_page\\\",\\\"pageType\\\":\\\"\\\",\\\"path\\\":\\\"/reservations\\\",\\\"requiresLogin\\\":true,\\\"tableName\\\":\\\"\\\",\\\"visibleRoles\\\":[\\\"reader\\\"]},{\\\"code\\\":\\\"my_fines\\\",\\\"dataScope\\\":\\\"CURRENT_USER\\\",\\\"name\\\":\\\"我的罚款\\\",\\\"pageCode\\\":\\\"my_fines_page\\\",\\\"pageType\\\":\\\"\\\",\\\"path\\\":\\\"/fines\\\",\\\"requiresLogin\\\":true,\\\"tableName\\\":\\\"\\\",\\\"visibleRoles\\\":[\\\"reader\\\"]},{\\\"code\\\":\\\"reader_profile\\\",\\\"dataScope\\\":\\\"CURRENT_USER\\\",\\\"name\\\":\\\"个人资料\\\",\\\"pageCode\\\":\\\"reader_profile_page\\\",\\\"pageType\\\":\\\"\\\",\\\"path\\\":\\\"/profile\\\",\\\"requiresLogin\\\":true,\\\"tableName\\\":\\\"\\\",\\\"visibleRoles\\\":[\\\"reader\\\"]}],\\\"frontendPages\\\":[{\\\"code\\\":\\\"book_catalog_page\\\",\\\"menuCode\\\":\\\"book_catalog\\\",\\\"name\\\":\\\"图书目录\\\",\\\"pageType\\\":\\\"list\\\",\\\"parentPageCode\\\":\\\"\\\",\\\"path\\\":\\\"/books\\\",\\\"tableName\\\":\\\"book_info\\\"},{\\\"code\\\":\\\"book_detail_page\\\",\\\"menuCode\\\":\\\"book_catalog\\\",\\\"name\\\":\\\"图书详情\\\",\\\"pageType\\\":\\\"detail\\\",\\\"parentPageCode\\\":\\\"\\\",\\\"path\\\":\\\"/books/:id\\\",\\\"tableName\\\":\\\"book_info\\\"},{\\\"code\\\":\\\"my_borrows_page\\\",\\\"menuCode\\\":\\\"my_borrows\\\",\\\"name\\\":\\\"我的借阅\\\",\\\"pageType\\\":\\\"current_user_list\\\",\\\"parentPageCode\\\":\\\"\\\",\\\"path\\\":\\\"/borrows\\\",\\\"tableName\\\":\\\"borrow_record\\\"},{\\\"code\\\":\\\"my_reservations_page\\\",\\\"menuCode\\\":\\\"my_reservations\\\",\\\"name\\\":\\\"我的预约\\\",\\\"pageType\\\":\\\"current_user_list\\\",\\\"parentPageCode\\\":\\\"\\\",\\\"path\\\":\\\"/reservations\\\",\\\"tableName\\\":\\\"reservation_record\\\"},{\\\"code\\\":\\\"my_fines_page\\\",\\\"menuCode\\\":\\\"my_fines\\\",\\\"name\\\":\\\"我的罚款\\\",\\\"pageType\\\":\\\"current_user_list\\\",\\\"parentPageCode\\\":\\\"\\\",\\\"path\\\":\\\"/fines\\\",\\\"tableName\\\":\\\"fine_record\\\"},{\\\"code\\\":\\\"reader_profile_page\\\",\\\"menuCode\\\":\\\"reader_profile\\\",\\\"name\\\":\\\"个人资料\\\",\\\"pageType\\\":\\\"form\\\",\\\"parentPageCode\\\":\\\"\\\",\\\"path\\\":\\\"/profile\\\",\\\"tableName\\\":\\\"reader\\\"}],\\\"roles\\\":[{\\\"code\\\":\\\"reader\\\",\\\"description\\\":\\\"可以查询图书、借阅、预约、查看个人记录并缴纳罚款\\\",\\\"name\\\":\\\"读者\\\"},{\\\"code\\\":\\\"admin\\\",\\\"description\\\":\\\"系统管理员,管理图书、借阅、预约、读者及罚款\\\",\\\"name\\\":\\\"管理员\\\"}]}\",\"flowConfigJson\":\"{\\\"actions\\\":[{\\\"actor\\\":\\\"admin\\\",\\\"audit\\\":{\\\"timeField\\\":\\\"approve_time\\\",\\\"userField\\\":\\\"approve_user_id\\\"},\\\"button\\\":{\\\"confirm\\\":\\\"确认审核通过吗?\\\",\\\"order\\\":10,\\\"pageCode\\\":\\\"borrow_admin_page\\\",\\\"scope\\\":\\\"admin\\\",\\\"slot\\\":\\\"list.rowActions\\\",\\\"type\\\":\\\"success\\\"},\\\"code\\\":\\\"approve_borrow\\\",\\\"effects\\\":[{\\\"amount\\\":\\\"1\\\",\\\"errorMessage\\\":\\\"图书库存不足\\\",\\\"field\\\":\\\"stock\\\",\\\"min\\\":\\\"0\\\",\\\"notFoundMessage\\\":\\\"图书不存在\\\",\\\"relationField\\\":\\\"book_id\\\",\\\"table\\\":\\\"book_info\\\",\\\"type\\\":\\\"decrease\\\",\\\"values\\\":{}}],\\\"from\\\":\\\"borrow_pending\\\",\\\"invalidStateMessage\\\":\\\"当前状态不能审核\\\",\\\"method\\\":\\\"POST\\\",\\\"name\\\":\\\"审核通过\\\",\\\"path\\\":\\\"/borrow-record/approve\\\",\\\"successMessage\\\":\\\"审核成功\\\",\\\"to\\\":\\\"borrow_borrowing\\\"},{\\\"actor\\\":\\\"admin\\\",\\\"button\\\":{\\\"confirm\\\":\\\"确认驳回吗?\\\",\\\"order\\\":20,\\\"pageCode\\\":\\\"borrow_admin_page\\\",\\\"scope\\\":\\\"admin\\\",\\\"slot\\\":\\\"list.rowActions\\\",\\\"type\\\":\\\"danger\\\"},\\\"code\\\":\\\"reject_borrow\\\",\\\"effects\\\":[],\\\"from\\\":\\\"borrow_pending\\\",\\\"invalidStateMessage\\\":\\\"当前状态不能驳回\\\",\\\"method\\\":\\\"POST\\\",\\\"name\\\":\\\"驳回\\\",\\\"path\\\":\\\"/borrow-record/reject\\\",\\\"successMessage\\\":\\\"已驳回\\\",\\\"to\\\":\\\"borrow_rejected\\\"},{\\\"actor\\\":\\\"admin\\\",\\\"button\\\":{\\\"confirm\\\":\\\"确认还书吗?\\\",\\\"order\\\":30,\\\"pageCode\\\":\\\"borrow_admin_page\\\",\\\"scope\\\":\\\"admin\\\",\\\"slot\\\":\\\"list.rowActions\\\",\\\"type\\\":\\\"primary\\\"},\\\"code\\\":\\\"return_book\\\",\\\"effects\\\":[{\\\"amount\\\":\\\"1\\\",\\\"errorMessage\\\":\\\"库存增加失败\\\",\\\"field\\\":\\\"stock\\\",\\\"min\\\":\\\"0\\\",\\\"notFoundMessage\\\":\\\"图书不存在\\\",\\\"relationField\\\":\\\"book_id\\\",\\\"table\\\":\\\"book_info\\\",\\\"type\\\":\\\"increase\\\",\\\"values\\\":{}}],\\\"from\\\":\\\"borrow_borrowing\\\",\\\"invalidStateMessage\\\":\\\"当前状态不能还书\\\",\\\"method\\\":\\\"POST\\\",\\\"name\\\":\\\"还书\\\",\\\"path\\\":\\\"/borrow-record/return\\\",\\\"successMessage\\\":\\\"还书成功\\\",\\\"to\\\":\\\"borrow_returned\\\"},{\\\"actor\\\":\\\"admin\\\",\\\"button\\\":{\\\"confirm\\\":\\\"确认该预约图书已到馆吗?\\\",\\\"order\\\":10,\\\"pageCode\\\":\\\"reservation_admin_page\\\",\\\"scope\\\":\\\"admin\\\",\\\"slot\\\":\\\"list.rowActions\\\",\\\"type\\\":\\\"success\\\"},\\\"code\\\":\\\"confirm_reservation\\\",\\\"effects\\\":[],\\\"from\\\":\\\"reservation_pending\\\",\\\"invalidStateMessage\\\":\\\"当前预约状态不能确认\\\",\\\"method\\\":\\\"POST\\\",\\\"name\\\":\\\"确认到馆\\\",\\\"path\\\":\\\"/reservation/confirm\\\",\\\"successMessage\\\":\\\"已确认到馆\\\",\\\"to\\\":\\\"reservation_reserved\\\"},{\\\"actor\\\":\\\"admin\\\",\\\"button\\\":{\\\"confirm\\\":\\\"确认取消该预约吗?\\\",\\\"order\\\":20,\\\"pageCode\\\":\\\"reservation_admin_page\\\",\\\"scope\\\":\\\"admin\\\",\\\"slot\\\":\\\"list.rowActions\\\",\\\"type\\\":\\\"warning\\\"},\\\"code\\\":\\\"cancel_reservation\\\",\\\"effects\\\":[],\\\"from\\\":\\\"reservation_pending\\\",\\\"invalidStateMessage\\\":\\\"当前预约状态不能取消\\\",\\\"method\\\":\\\"POST\\\",\\\"name\\\":\\\"取消预约\\\",\\\"path\\\":\\\"/reservation/cancel\\\",\\\"successMessage\\\":\\\"已取消预约\\\",\\\"to\\\":\\\"reservation_cancelled\\\"},{\\\"actor\\\":\\\"admin\\\",\\\"button\\\":{\\\"confirm\\\":\\\"确认借出该预约图书吗?\\\",\\\"order\\\":30,\\\"pageCode\\\":\\\"reservation_admin_page\\\",\\\"scope\\\":\\\"admin\\\",\\\"slot\\\":\\\"list.rowActions\\\",\\\"type\\\":\\\"primary\\\"},\\\"code\\\":\\\"borrow_from_reservation\\\",\\\"effects\\\":[{\\\"amount\\\":\\\"1\\\",\\\"min\\\":\\\"0\\\",\\\"table\\\":\\\"borrow_record\\\",\\\"type\\\":\\\"create_record\\\",\\\"values\\\":{\\\"start_time\\\":\\\"now\\\",\\\"due_time\\\":\\\"now\\\",\\\"user_id\\\":\\\"currentUserId\\\",\\\"admin_id\\\":\\\"currentUserId\\\",\\\"book_id\\\":\\\"record.book_id\\\",\\\"status\\\":\\\"borrow_borrowing\\\"}},{\\\"amount\\\":\\\"1\\\",\\\"errorMessage\\\":\\\"图书库存不足\\\",\\\"field\\\":\\\"stock\\\",\\\"min\\\":\\\"0\\\",\\\"notFoundMessage\\\":\\\"图书不存在\\\",\\\"relationField\\\":\\\"book_id\\\",\\\"table\\\":\\\"book_info\\\",\\\"type\\\":\\\"decrease\\\",\\\"values\\\":{}}],\\\"from\\\":\\\"reservation_reserved\\\",\\\"invalidStateMessage\\\":\\\"当前预约状态不能借出\\\",\\\"method\\\":\\\"POST\\\",\\\"name\\\":\\\"借出预约图书\\\",\\\"path\\\":\\\"/reservation/borrow\\\",\\\"successMessage\\\":\\\"借出成功\\\",\\\"to\\\":\\\"reservation_borrowed\\\"},{\\\"actor\\\":\\\"reader\\\",\\\"button\\\":{\\\"confirm\\\":\\\"确认缴纳该笔罚款吗?\\\",\\\"order\\\":10,\\\"pageCode\\\":\\\"my_fines_page\\\",\\\"scope\\\":\\\"current_user\\\",\\\"slot\\\":\\\"list.rowActions\\\",\\\"type\\\":\\\"primary\\\"},\\\"code\\\":\\\"pay_fine\\\",\\\"effects\\\":[],\\\"from\\\":\\\"fine_unpaid\\\",\\\"invalidStateMessage\\\":\\\"该罚款已支付或无需缴纳\\\",\\\"method\\\":\\\"POST\\\",\\\"name\\\":\\\"缴纳罚款\\\",\\\"path\\\":\\\"/fine/pay\\\",\\\"successMessage\\\":\\\"缴纳成功\\\",\\\"to\\\":\\\"fine_paid\\\"}],\\\"code\\\":\\\"library_manage\\\",\\\"mainTable\\\":\\\"borrow_record\\\",\\\"metrics\\\":[{\\\"aggregate\\\":\\\"count\\\",\\\"code\\\":\\\"total_books\\\",\\\"field\\\":\\\"id\\\",\\\"name\\\":\\\"图书总数\\\",\\\"table\\\":\\\"book_info\\\",\\\"unit\\\":\\\"本\\\"},{\\\"aggregate\\\":\\\"count\\\",\\\"code\\\":\\\"total_borrowed\\\",\\\"field\\\":\\\"id\\\",\\\"name\\\":\\\"借阅数量\\\",\\\"status\\\":\\\"borrow_borrowing\\\",\\\"table\\\":\\\"borrow_record\\\",\\\"unit\\\":\\\"条\\\"},{\\\"aggregate\\\":\\\"count\\\",\\\"code\\\":\\\"total_readers\\\",\\\"field\\\":\\\"id\\\",\\\"name\\\":\\\"读者总数\\\",\\\"table\\\":\\\"reader\\\",\\\"unit\\\":\\\"人\\\"},{\\\"aggregate\\\":\\\"sum\\\",\\\"code\\\":\\\"unpaid_fines\\\",\\\"field\\\":\\\"amount\\\",\\\"name\\\":\\\"未缴罚款总额\\\",\\\"status\\\":\\\"fine_unpaid\\\",\\\"table\\\":\\\"fine_record\\\",\\\"unit\\\":\\\"元\\\"}],\\\"name\\\":\\\"图书管理系统\\\",\\\"notFoundMessage\\\":\\\"主记录不存在\\\",\\\"states\\\":[{\\\"code\\\":\\\"borrow_pending\\\",\\\"label\\\":\\\"待审核\\\"},{\\\"code\\\":\\\"borrow_borrowing\\\",\\\"label\\\":\\\"借阅中\\\"},{\\\"code\\\":\\\"borrow_returned\\\",\\\"label\\\":\\\"已归还\\\"},{\\\"code\\\":\\\"borrow_rejected\\\",\\\"label\\\":\\\"已驳回\\\"},{\\\"code\\\":\\\"reservation_pending\\\",\\\"label\\\":\\\"待确认\\\"},{\\\"code\\\":\\\"reservation_reserved\\\",\\\"label\\\":\\\"已预留\\\"},{\\\"code\\\":\\\"reservation_cancelled\\\",\\\"label\\\":\\\"已取消\\\"},{\\\"code\\\":\\\"reservation_expired\\\",\\\"label\\\":\\\"已超时\\\"},{\\\"code\\\":\\\"reservation_borrowed\\\",\\\"label\\\":\\\"已借出\\\"},{\\\"code\\\":\\\"fine_unpaid\\\",\\\"label\\\":\\\"未支付\\\"},{\\\"code\\\":\\\"fine_paid\\\",\\\"label\\\":\\\"已支付\\\"}],\\\"statusField\\\":\\\"status\\\",\\\"version\\\":\\\"1.0\\\"}\",\"result\":{\"downloadReady\":false,\"projectId\":102,\"report\":{\"adminPageCount\":0,\"businessActionCount\":0,\"businessLoopComplete\":true,\"businessLoopWarnings\":[],\"frontendPageCount\":0,\"loopActions\":7,\"missingRequiredActions\":[],\"quantityRules\":0,\"recordRules\":0,\"stateTransitions\":0,\"tableCount\":6},\"stage\":\"DATABASE\",\"suggestedActions\":[]}},\"schemaVersion\":\"1.0\",\"stageCode\":\"DATABASE\"}', '891f69251c0a9fdcd8c7c596cf4a0a750853b86bf358d5124c114b5121ba18d3', NULL, NULL, '2026-07-14 15:57:57');
INSERT INTO `factory_ai_task_checkpoint` VALUES (103, 103, 'DATABASE', 3, 1, '1.0', '{\"payload\":{\"appBlueprintJson\":\"{\\\"adminHomeDashboard\\\":{\\\"charts\\\":[{\\\"code\\\":\\\"borrow_trend\\\",\\\"filters\\\":[],\\\"metrics\\\":[],\\\"semantic\\\":\\\"order\\\",\\\"type\\\":\\\"line\\\"},{\\\"code\\\":\\\"book_category_distribution\\\",\\\"filters\\\":[],\\\"metrics\\\":[],\\\"semantic\\\":\\\"content\\\",\\\"type\\\":\\\"pie\\\"}],\\\"description\\\":\\\"核心业务数据\\\",\\\"metrics\\\":[{\\\"code\\\":\\\"total_books\\\",\\\"field\\\":\\\"count\\\",\\\"filters\\\":[],\\\"semantic\\\":\\\"inventory\\\"},{\\\"code\\\":\\\"total_readers\\\",\\\"field\\\":\\\"count\\\",\\\"filters\\\":[],\\\"semantic\\\":\\\"user\\\"},{\\\"code\\\":\\\"current_borrowed\\\",\\\"field\\\":\\\"count\\\",\\\"filters\\\":[],\\\"semantic\\\":\\\"order\\\"},{\\\"code\\\":\\\"pending_applications\\\",\\\"field\\\":\\\"count\\\",\\\"filters\\\":[],\\\"semantic\\\":\\\"task\\\"}],\\\"title\\\":\\\"运营总览\\\"},\\\"adminMenus\\\":[{\\\"code\\\":\\\"book_admin\\\",\\\"dataScope\\\":\\\"ROLE\\\",\\\"name\\\":\\\"图书管理\\\",\\\"pageCode\\\":\\\"book_admin_page\\\",\\\"pageType\\\":\\\"list\\\",\\\"path\\\":\\\"/admin/books\\\",\\\"requiresLogin\\\":true,\\\"tableName\\\":\\\"book_info\\\",\\\"visibleRoles\\\":[\\\"admin\\\"]},{\\\"code\\\":\\\"reader_admin\\\",\\\"dataScope\\\":\\\"ROLE\\\",\\\"name\\\":\\\"读者管理\\\",\\\"pageCode\\\":\\\"reader_admin_page\\\",\\\"pageType\\\":\\\"list\\\",\\\"path\\\":\\\"/admin/readers\\\",\\\"requiresLogin\\\":true,\\\"tableName\\\":\\\"reader\\\",\\\"visibleRoles\\\":[\\\"admin\\\"]},{\\\"code\\\":\\\"borrow_application_admin\\\",\\\"dataScope\\\":\\\"ROLE\\\",\\\"name\\\":\\\"借书申请管理\\\",\\\"pageCode\\\":\\\"borrow_application_admin_page\\\",\\\"pageType\\\":\\\"list\\\",\\\"path\\\":\\\"/admin/borrow-applications\\\",\\\"requiresLogin\\\":true,\\\"tableName\\\":\\\"borrow_application\\\",\\\"visibleRoles\\\":[\\\"admin\\\"]},{\\\"code\\\":\\\"borrow_record_admin\\\",\\\"dataScope\\\":\\\"ROLE\\\",\\\"name\\\":\\\"借阅记录管理\\\",\\\"pageCode\\\":\\\"borrow_record_admin_page\\\",\\\"pageType\\\":\\\"list\\\",\\\"path\\\":\\\"/admin/borrow-records\\\",\\\"requiresLogin\\\":true,\\\"tableName\\\":\\\"borrow_record\\\",\\\"visibleRoles\\\":[\\\"admin\\\"]},{\\\"code\\\":\\\"fine_admin\\\",\\\"dataScope\\\":\\\"ROLE\\\",\\\"name\\\":\\\"逾期费用管理\\\",\\\"pageCode\\\":\\\"fine_admin_page\\\",\\\"pageType\\\":\\\"list\\\",\\\"path\\\":\\\"/admin/fines\\\",\\\"requiresLogin\\\":true,\\\"tableName\\\":\\\"fine\\\",\\\"visibleRoles\\\":[\\\"admin\\\"]},{\\\"code\\\":\\\"reservation_admin\\\",\\\"dataScope\\\":\\\"ROLE\\\",\\\"name\\\":\\\"预约管理\\\",\\\"pageCode\\\":\\\"reservation_admin_page\\\",\\\"pageType\\\":\\\"list\\\",\\\"path\\\":\\\"/admin/reservations\\\",\\\"requiresLogin\\\":true,\\\"tableName\\\":\\\"reservation\\\",\\\"visibleRoles\\\":[\\\"admin\\\"]}],\\\"frontendMenus\\\":[{\\\"code\\\":\\\"book_catalog\\\",\\\"dataScope\\\":\\\"PUBLIC\\\",\\\"name\\\":\\\"图书目录\\\",\\\"pageCode\\\":\\\"book_catalog_page\\\",\\\"pageType\\\":\\\"\\\",\\\"path\\\":\\\"/books\\\",\\\"requiresLogin\\\":false,\\\"tableName\\\":\\\"\\\",\\\"visibleRoles\\\":[]},{\\\"code\\\":\\\"my_borrows\\\",\\\"dataScope\\\":\\\"CURRENT_USER\\\",\\\"name\\\":\\\"我的借阅\\\",\\\"pageCode\\\":\\\"my_borrows_page\\\",\\\"pageType\\\":\\\"\\\",\\\"path\\\":\\\"/my-borrows\\\",\\\"requiresLogin\\\":true,\\\"tableName\\\":\\\"\\\",\\\"visibleRoles\\\":[\\\"reader\\\"]},{\\\"code\\\":\\\"my_reservations\\\",\\\"dataScope\\\":\\\"CURRENT_USER\\\",\\\"name\\\":\\\"我的预约\\\",\\\"pageCode\\\":\\\"my_reservations_page\\\",\\\"pageType\\\":\\\"\\\",\\\"path\\\":\\\"/my-reservations\\\",\\\"requiresLogin\\\":true,\\\"tableName\\\":\\\"\\\",\\\"visibleRoles\\\":[\\\"reader\\\"]},{\\\"code\\\":\\\"my_fines\\\",\\\"dataScope\\\":\\\"CURRENT_USER\\\",\\\"name\\\":\\\"我的罚款\\\",\\\"pageCode\\\":\\\"my_fines_page\\\",\\\"pageType\\\":\\\"\\\",\\\"path\\\":\\\"/my-fines\\\",\\\"requiresLogin\\\":true,\\\"tableName\\\":\\\"\\\",\\\"visibleRoles\\\":[\\\"reader\\\"]},{\\\"code\\\":\\\"reader_profile\\\",\\\"dataScope\\\":\\\"CURRENT_USER\\\",\\\"name\\\":\\\"个人资料\\\",\\\"pageCode\\\":\\\"reader_profile_page\\\",\\\"pageType\\\":\\\"\\\",\\\"path\\\":\\\"/profile\\\",\\\"requiresLogin\\\":true,\\\"tableName\\\":\\\"\\\",\\\"visibleRoles\\\":[\\\"reader\\\"]}],\\\"frontendPages\\\":[{\\\"code\\\":\\\"book_catalog_page\\\",\\\"menuCode\\\":\\\"book_catalog\\\",\\\"name\\\":\\\"图书目录\\\",\\\"pageType\\\":\\\"list\\\",\\\"parentPageCode\\\":\\\"\\\",\\\"path\\\":\\\"/books\\\",\\\"tableName\\\":\\\"book_info\\\"},{\\\"code\\\":\\\"book_detail_page\\\",\\\"menuCode\\\":\\\"book_catalog\\\",\\\"name\\\":\\\"图书详情\\\",\\\"pageType\\\":\\\"detail\\\",\\\"parentPageCode\\\":\\\"\\\",\\\"path\\\":\\\"/books/:id\\\",\\\"tableName\\\":\\\"book_info\\\"},{\\\"code\\\":\\\"my_borrows_page\\\",\\\"menuCode\\\":\\\"my_borrows\\\",\\\"name\\\":\\\"我的借阅\\\",\\\"pageType\\\":\\\"current_user_list\\\",\\\"parentPageCode\\\":\\\"\\\",\\\"path\\\":\\\"/my-borrows\\\",\\\"tableName\\\":\\\"borrow_record\\\"},{\\\"code\\\":\\\"my_reservations_page\\\",\\\"menuCode\\\":\\\"my_reservations\\\",\\\"name\\\":\\\"我的预约\\\",\\\"pageType\\\":\\\"current_user_list\\\",\\\"parentPageCode\\\":\\\"\\\",\\\"path\\\":\\\"/my-reservations\\\",\\\"tableName\\\":\\\"reservation\\\"},{\\\"code\\\":\\\"my_fines_page\\\",\\\"menuCode\\\":\\\"my_fines\\\",\\\"name\\\":\\\"我的罚款\\\",\\\"pageType\\\":\\\"current_user_list\\\",\\\"parentPageCode\\\":\\\"\\\",\\\"path\\\":\\\"/my-fines\\\",\\\"tableName\\\":\\\"fine\\\"},{\\\"code\\\":\\\"reader_profile_page\\\",\\\"menuCode\\\":\\\"reader_profile\\\",\\\"name\\\":\\\"个人资料\\\",\\\"pageType\\\":\\\"form\\\",\\\"parentPageCode\\\":\\\"\\\",\\\"path\\\":\\\"/profile\\\",\\\"tableName\\\":\\\"reader\\\"}],\\\"roles\\\":[{\\\"code\\\":\\\"admin\\\",\\\"description\\\":\\\"系统管理员,负责图书管理、借阅审核、逾期处理等\\\",\\\"name\\\":\\\"管理员\\\"},{\\\"code\\\":\\\"reader\\\",\\\"description\\\":\\\"普通读者,可检索图书、借书、还书、预约等\\\",\\\"name\\\":\\\"读者\\\"}]}\",\"flowConfigJson\":\"{\\\"actions\\\":[{\\\"actor\\\":\\\"admin\\\",\\\"audit\\\":{\\\"timeField\\\":\\\"approve_time\\\",\\\"userField\\\":\\\"approve_user_id\\\"},\\\"button\\\":{\\\"confirm\\\":\\\"确认审核通过吗?\\\",\\\"order\\\":10,\\\"pageCode\\\":\\\"borrow_application_admin_page\\\",\\\"scope\\\":\\\"admin\\\",\\\"slot\\\":\\\"list.rowActions\\\",\\\"type\\\":\\\"primary\\\"},\\\"code\\\":\\\"approve\\\",\\\"effects\\\":[{\\\"amount\\\":\\\"1\\\",\\\"errorMessage\\\":\\\"图书库存不足\\\",\\\"field\\\":\\\"stock\\\",\\\"min\\\":\\\"0\\\",\\\"notFoundMessage\\\":\\\"图书不存在\\\",\\\"relationField\\\":\\\"book_id\\\",\\\"table\\\":\\\"book_info\\\",\\\"type\\\":\\\"decrease\\\",\\\"values\\\":{}}],\\\"from\\\":\\\"pending\\\",\\\"invalidStateMessage\\\":\\\"当前状态不能审核\\\",\\\"method\\\":\\\"POST\\\",\\\"name\\\":\\\"审核通过\\\",\\\"path\\\":\\\"/borrow-record/approve\\\",\\\"successMessage\\\":\\\"审核成功\\\",\\\"to\\\":\\\"borrowing\\\"},{\\\"actor\\\":\\\"admin\\\",\\\"audit\\\":{\\\"timeField\\\":\\\"reject_time\\\",\\\"userField\\\":\\\"reject_user_id\\\"},\\\"button\\\":{\\\"confirm\\\":\\\"确认拒绝该申请吗?\\\",\\\"order\\\":20,\\\"pageCode\\\":\\\"borrow_application_admin_page\\\",\\\"scope\\\":\\\"admin\\\",\\\"slot\\\":\\\"list.rowActions\\\",\\\"type\\\":\\\"danger\\\"},\\\"code\\\":\\\"reject\\\",\\\"effects\\\":[],\\\"from\\\":\\\"pending\\\",\\\"invalidStateMessage\\\":\\\"当前状态不能拒绝\\\",\\\"method\\\":\\\"POST\\\",\\\"name\\\":\\\"拒绝申请\\\",\\\"path\\\":\\\"/borrow-record/reject\\\",\\\"successMessage\\\":\\\"已拒绝\\\",\\\"to\\\":\\\"rejected\\\"},{\\\"actor\\\":\\\"admin\\\",\\\"button\\\":{\\\"confirm\\\":\\\"确认取消该申请吗?\\\",\\\"order\\\":30,\\\"pageCode\\\":\\\"borrow_application_admin_page\\\",\\\"scope\\\":\\\"admin\\\",\\\"slot\\\":\\\"list.rowActions\\\",\\\"type\\\":\\\"warning\\\"},\\\"code\\\":\\\"cancel\\\",\\\"effects\\\":[],\\\"from\\\":\\\"pending\\\",\\\"invalidStateMessage\\\":\\\"当前状态不能取消\\\",\\\"method\\\":\\\"POST\\\",\\\"name\\\":\\\"取消申请\\\",\\\"path\\\":\\\"/borrow-record/cancel\\\",\\\"successMessage\\\":\\\"已取消\\\",\\\"to\\\":\\\"cancelled\\\"},{\\\"actor\\\":\\\"reader\\\",\\\"button\\\":{\\\"confirm\\\":\\\"确认还书吗?\\\",\\\"order\\\":10,\\\"pageCode\\\":\\\"my_borrows_page\\\",\\\"scope\\\":\\\"reader\\\",\\\"slot\\\":\\\"list.rowActions\\\",\\\"type\\\":\\\"warning\\\"},\\\"code\\\":\\\"return\\\",\\\"effects\\\":[{\\\"amount\\\":\\\"1\\\",\\\"min\\\":\\\"0\\\",\\\"table\\\":\\\"fine\\\",\\\"type\\\":\\\"create_record\\\",\\\"values\\\":{\\\"reader_id\\\":\\\"record.reader_id\\\",\\\"amount\\\":\\\"0.00\\\",\\\"created_at\\\":\\\"now\\\",\\\"borrow_record_id\\\":\\\"record.id\\\",\\\"book_id\\\":\\\"record.book_id\\\",\\\"status\\\":\\\"unpaid\\\"}}],\\\"from\\\":\\\"borrowing\\\",\\\"invalidStateMessage\\\":\\\"当前状态不能还书\\\",\\\"method\\\":\\\"POST\\\",\\\"name\\\":\\\"还书\\\",\\\"path\\\":\\\"/borrow-record/return\\\",\\\"successMessage\\\":\\\"还书请求已提交,等待管理员确认\\\",\\\"to\\\":\\\"returning\\\"},{\\\"actor\\\":\\\"admin\\\",\\\"audit\\\":{\\\"timeField\\\":\\\"confirm_time\\\",\\\"userField\\\":\\\"confirm_user_id\\\"},\\\"button\\\":{\\\"confirm\\\":\\\"确认已收到还书?\\\",\\\"order\\\":10,\\\"pageCode\\\":\\\"borrow_record_admin_page\\\",\\\"scope\\\":\\\"admin\\\",\\\"slot\\\":\\\"list.rowActions\\\",\\\"type\\\":\\\"success\\\"},\\\"code\\\":\\\"confirm_return\\\",\\\"effects\\\":[{\\\"amount\\\":\\\"1\\\",\\\"errorMessage\\\":\\\"图书库存更新失败\\\",\\\"field\\\":\\\"stock\\\",\\\"min\\\":\\\"0\\\",\\\"notFoundMessage\\\":\\\"图书不存在\\\",\\\"relationField\\\":\\\"book_id\\\",\\\"table\\\":\\\"book_info\\\",\\\"type\\\":\\\"increase\\\",\\\"values\\\":{}}],\\\"from\\\":\\\"returning\\\",\\\"invalidStateMessage\\\":\\\"当前状态不能确认归还\\\",\\\"method\\\":\\\"POST\\\",\\\"name\\\":\\\"确认归还\\\",\\\"path\\\":\\\"/borrow-record/confirm-return\\\",\\\"successMessage\\\":\\\"归还确认成功\\\",\\\"to\\\":\\\"returned\\\"}],\\\"code\\\":\\\"borrow_record_flow\\\",\\\"mainTable\\\":\\\"borrow_record\\\",\\\"metrics\\\":[{\\\"aggregate\\\":\\\"count\\\",\\\"code\\\":\\\"total_books\\\",\\\"field\\\":\\\"id\\\",\\\"name\\\":\\\"总图书数\\\",\\\"table\\\":\\\"book_info\\\",\\\"unit\\\":\\\"册\\\"},{\\\"aggregate\\\":\\\"count\\\",\\\"code\\\":\\\"total_readers\\\",\\\"field\\\":\\\"id\\\",\\\"name\\\":\\\"总读者数\\\",\\\"table\\\":\\\"reader\\\",\\\"unit\\\":\\\"人\\\"},{\\\"aggregate\\\":\\\"count\\\",\\\"code\\\":\\\"current_borrowed\\\",\\\"field\\\":\\\"id\\\",\\\"name\\\":\\\"当前借阅中\\\",\\\"status\\\":\\\"borrowing\\\",\\\"table\\\":\\\"borrow_record\\\",\\\"unit\\\":\\\"条\\\"},{\\\"aggregate\\\":\\\"count\\\",\\\"code\\\":\\\"pending_applications\\\",\\\"field\\\":\\\"id\\\",\\\"name\\\":\\\"待审核申请\\\",\\\"status\\\":\\\"pending\\\",\\\"table\\\":\\\"borrow_record\\\",\\\"unit\\\":\\\"条\\\"}],\\\"name\\\":\\\"借阅记录流程\\\",\\\"notFoundMessage\\\":\\\"主记录不存在\\\",\\\"states\\\":[{\\\"code\\\":\\\"pending\\\",\\\"label\\\":\\\"待审核\\\"},{\\\"code\\\":\\\"borrowing\\\",\\\"label\\\":\\\"借阅中\\\"},{\\\"code\\\":\\\"returning\\\",\\\"label\\\":\\\"待确认归还\\\"},{\\\"code\\\":\\\"returned\\\",\\\"label\\\":\\\"已归还\\\"},{\\\"code\\\":\\\"cancelled\\\",\\\"label\\\":\\\"已取消\\\"},{\\\"code\\\":\\\"rejected\\\",\\\"label\\\":\\\"已拒绝\\\"}],\\\"statusField\\\":\\\"status\\\",\\\"version\\\":\\\"1.0\\\"}\",\"result\":{\"downloadReady\":false,\"projectId\":103,\"report\":{\"adminPageCount\":0,\"businessActionCount\":0,\"businessLoopComplete\":true,\"businessLoopWarnings\":[],\"frontendPageCount\":0,\"loopActions\":5,\"missingRequiredActions\":[],\"quantityRules\":0,\"recordRules\":0,\"stateTransitions\":0,\"tableCount\":7},\"stage\":\"DATABASE\",\"suggestedActions\":[]}},\"schemaVersion\":\"1.0\",\"stageCode\":\"DATABASE\"}', '4a996d96a78e553924e00a67f107441624c4e65cac01dc73bc661a0d075b0904', NULL, NULL, '2026-07-14 16:23:51');
INSERT INTO `factory_ai_task_checkpoint` VALUES (104, 106, 'DATABASE', 3, 1, '1.0', '{\"payload\":{\"appBlueprintJson\":\"{\\\"adminHomeDashboard\\\":{\\\"charts\\\":[{\\\"filters\\\":[],\\\"metrics\\\":[],\\\"semantic\\\":\\\"order\\\",\\\"tableName\\\":\\\"borrow_record\\\",\\\"type\\\":\\\"line\\\"},{\\\"filters\\\":[],\\\"metrics\\\":[],\\\"semantic\\\":\\\"content\\\",\\\"tableName\\\":\\\"book_info\\\",\\\"type\\\":\\\"pie\\\"}],\\\"description\\\":\\\"核心业务数据统计\\\",\\\"metrics\\\":[{\\\"filters\\\":[],\\\"semantic\\\":\\\"inventory\\\",\\\"tableName\\\":\\\"book_info\\\"},{\\\"filters\\\":[],\\\"semantic\\\":\\\"order\\\",\\\"tableName\\\":\\\"borrow_record\\\"},{\\\"filters\\\":[],\\\"semantic\\\":\\\"task\\\",\\\"tableName\\\":\\\"borrow_record\\\"},{\\\"filters\\\":[],\\\"semantic\\\":\\\"user\\\",\\\"tableName\\\":\\\"reader\\\"}],\\\"title\\\":\\\"运营总览\\\"},\\\"adminMenus\\\":[{\\\"code\\\":\\\"book_admin\\\",\\\"dataScope\\\":\\\"ROLE\\\",\\\"name\\\":\\\"图书管理\\\",\\\"pageCode\\\":\\\"book_admin_page\\\",\\\"pageType\\\":\\\"list\\\",\\\"path\\\":\\\"/admin/books\\\",\\\"requiresLogin\\\":true,\\\"tableName\\\":\\\"book_info\\\",\\\"visibleRoles\\\":[\\\"admin\\\"]},{\\\"code\\\":\\\"borrow_admin\\\",\\\"dataScope\\\":\\\"ROLE\\\",\\\"name\\\":\\\"借阅管理\\\",\\\"pageCode\\\":\\\"borrow_admin_page\\\",\\\"pageType\\\":\\\"list\\\",\\\"path\\\":\\\"/admin/borrows\\\",\\\"requiresLogin\\\":true,\\\"tableName\\\":\\\"borrow_record\\\",\\\"visibleRoles\\\":[\\\"admin\\\"]},{\\\"code\\\":\\\"reader_admin\\\",\\\"dataScope\\\":\\\"ROLE\\\",\\\"name\\\":\\\"读者管理\\\",\\\"pageCode\\\":\\\"reader_admin_page\\\",\\\"pageType\\\":\\\"list\\\",\\\"path\\\":\\\"/admin/readers\\\",\\\"requiresLogin\\\":true,\\\"tableName\\\":\\\"reader\\\",\\\"visibleRoles\\\":[\\\"admin\\\"]},{\\\"code\\\":\\\"carousel_admin\\\",\\\"dataScope\\\":\\\"ROLE\\\",\\\"name\\\":\\\"轮播图管理\\\",\\\"pageCode\\\":\\\"carousel_admin_page\\\",\\\"pageType\\\":\\\"list\\\",\\\"path\\\":\\\"/admin/carousels\\\",\\\"requiresLogin\\\":true,\\\"tableName\\\":\\\"carousel\\\",\\\"visibleRoles\\\":[\\\"admin\\\"]},{\\\"code\\\":\\\"announcement_admin\\\",\\\"dataScope\\\":\\\"ROLE\\\",\\\"name\\\":\\\"公告管理\\\",\\\"pageCode\\\":\\\"announcement_admin_page\\\",\\\"pageType\\\":\\\"list\\\",\\\"path\\\":\\\"/admin/announcements\\\",\\\"requiresLogin\\\":true,\\\"tableName\\\":\\\"announcement\\\",\\\"visibleRoles\\\":[\\\"admin\\\"]},{\\\"code\\\":\\\"news_admin\\\",\\\"dataScope\\\":\\\"ROLE\\\",\\\"name\\\":\\\"新闻管理\\\",\\\"pageCode\\\":\\\"news_admin_page\\\",\\\"pageType\\\":\\\"list\\\",\\\"path\\\":\\\"/admin/news\\\",\\\"requiresLogin\\\":true,\\\"tableName\\\":\\\"news\\\",\\\"visibleRoles\\\":[\\\"admin\\\"]}],\\\"frontendMenus\\\":[{\\\"code\\\":\\\"book_catalog\\\",\\\"dataScope\\\":\\\"PUBLIC\\\",\\\"name\\\":\\\"图书目录\\\",\\\"pageCode\\\":\\\"book_catalog_page\\\",\\\"pageType\\\":\\\"\\\",\\\"path\\\":\\\"/books\\\",\\\"requiresLogin\\\":false,\\\"tableName\\\":\\\"\\\",\\\"visibleRoles\\\":[]},{\\\"code\\\":\\\"my_borrows\\\",\\\"dataScope\\\":\\\"CURRENT_USER\\\",\\\"name\\\":\\\"我的借阅\\\",\\\"pageCode\\\":\\\"my_borrows_page\\\",\\\"pageType\\\":\\\"\\\",\\\"path\\\":\\\"/my-borrows\\\",\\\"requiresLogin\\\":true,\\\"tableName\\\":\\\"\\\",\\\"visibleRoles\\\":[\\\"reader\\\"]},{\\\"code\\\":\\\"reader_profile\\\",\\\"dataScope\\\":\\\"CURRENT_USER\\\",\\\"name\\\":\\\"个人资料\\\",\\\"pageCode\\\":\\\"reader_profile_page\\\",\\\"pageType\\\":\\\"\\\",\\\"path\\\":\\\"/reader/profile\\\",\\\"requiresLogin\\\":true,\\\"tableName\\\":\\\"\\\",\\\"visibleRoles\\\":[\\\"reader\\\"]}],\\\"frontendPages\\\":[{\\\"code\\\":\\\"book_catalog_page\\\",\\\"menuCode\\\":\\\"book_catalog\\\",\\\"name\\\":\\\"图书目录\\\",\\\"pageType\\\":\\\"list\\\",\\\"parentPageCode\\\":\\\"\\\",\\\"path\\\":\\\"/books\\\",\\\"tableName\\\":\\\"book_info\\\"},{\\\"code\\\":\\\"book_detail_page\\\",\\\"menuCode\\\":\\\"book_catalog\\\",\\\"name\\\":\\\"图书详情\\\",\\\"pageType\\\":\\\"detail\\\",\\\"parentPageCode\\\":\\\"\\\",\\\"path\\\":\\\"/books/:id\\\",\\\"tableName\\\":\\\"book_info\\\"},{\\\"code\\\":\\\"my_borrows_page\\\",\\\"menuCode\\\":\\\"my_borrows\\\",\\\"name\\\":\\\"我的借阅\\\",\\\"pageType\\\":\\\"current_user_list\\\",\\\"parentPageCode\\\":\\\"\\\",\\\"path\\\":\\\"/my-borrows\\\",\\\"tableName\\\":\\\"borrow_record\\\"},{\\\"code\\\":\\\"reader_profile_page\\\",\\\"menuCode\\\":\\\"reader_profile\\\",\\\"name\\\":\\\"个人资料\\\",\\\"pageType\\\":\\\"form\\\",\\\"parentPageCode\\\":\\\"\\\",\\\"path\\\":\\\"/reader/profile\\\",\\\"tableName\\\":\\\"reader\\\"}],\\\"roles\\\":[{\\\"code\\\":\\\"admin\\\",\\\"description\\\":\\\"系统管理员,管理图书、借阅、读者、轮播图、公告、新闻等\\\",\\\"name\\\":\\\"管理员\\\"},{\\\"code\\\":\\\"reader\\\",\\\"description\\\":\\\"借书、还书、预约、取消预约的普通用户\\\",\\\"name\\\":\\\"读者\\\"}]}\",\"flowConfigJson\":\"{\\\"actions\\\":[{\\\"actor\\\":\\\"admin\\\",\\\"audit\\\":{\\\"timeField\\\":\\\"approve_time\\\",\\\"userField\\\":\\\"approve_user_id\\\"},\\\"button\\\":{\\\"confirm\\\":\\\"确认审核通过吗?\\\",\\\"order\\\":10,\\\"pageCode\\\":\\\"borrow_admin_page\\\",\\\"scope\\\":\\\"admin\\\",\\\"slot\\\":\\\"list.rowActions\\\",\\\"type\\\":\\\"success\\\"},\\\"code\\\":\\\"admin_approve\\\",\\\"effects\\\":[{\\\"amount\\\":\\\"1\\\",\\\"errorMessage\\\":\\\"图书库存不足\\\",\\\"field\\\":\\\"stock\\\",\\\"min\\\":\\\"0\\\",\\\"notFoundMessage\\\":\\\"图书不存在\\\",\\\"relationField\\\":\\\"book_id\\\",\\\"table\\\":\\\"book_info\\\",\\\"type\\\":\\\"decrease\\\",\\\"values\\\":{}}],\\\"from\\\":\\\"pending\\\",\\\"invalidStateMessage\\\":\\\"当前状态不能审核通过\\\",\\\"method\\\":\\\"POST\\\",\\\"name\\\":\\\"审核通过\\\",\\\"path\\\":\\\"/borrow-record/approve\\\",\\\"successMessage\\\":\\\"审核成功,图书已借出\\\",\\\"to\\\":\\\"borrowing\\\"},{\\\"actor\\\":\\\"admin\\\",\\\"audit\\\":{\\\"timeField\\\":\\\"approve_time\\\",\\\"userField\\\":\\\"approve_user_id\\\"},\\\"button\\\":{\\\"confirm\\\":\\\"确认拒绝该借书申请吗?\\\",\\\"order\\\":20,\\\"pageCode\\\":\\\"borrow_admin_page\\\",\\\"scope\\\":\\\"admin\\\",\\\"slot\\\":\\\"list.rowActions\\\",\\\"type\\\":\\\"danger\\\"},\\\"code\\\":\\\"admin_reject\\\",\\\"effects\\\":[],\\\"from\\\":\\\"pending\\\",\\\"invalidStateMessage\\\":\\\"当前状态不能拒绝\\\",\\\"method\\\":\\\"POST\\\",\\\"name\\\":\\\"拒绝申请\\\",\\\"path\\\":\\\"/borrow-record/reject\\\",\\\"successMessage\\\":\\\"申请已拒绝\\\",\\\"to\\\":\\\"canceled\\\"},{\\\"actor\\\":\\\"admin\\\",\\\"audit\\\":{\\\"timeField\\\":\\\"return_time\\\",\\\"userField\\\":\\\"return_user_id\\\"},\\\"button\\\":{\\\"confirm\\\":\\\"确认已归还图书?\\\",\\\"order\\\":30,\\\"pageCode\\\":\\\"borrow_admin_page\\\",\\\"scope\\\":\\\"admin\\\",\\\"slot\\\":\\\"list.rowActions\\\",\\\"type\\\":\\\"primary\\\"},\\\"code\\\":\\\"admin_return\\\",\\\"effects\\\":[{\\\"amount\\\":\\\"1\\\",\\\"errorMessage\\\":\\\"图书库存恢复失败\\\",\\\"field\\\":\\\"stock\\\",\\\"min\\\":\\\"0\\\",\\\"notFoundMessage\\\":\\\"图书不存在\\\",\\\"relationField\\\":\\\"book_id\\\",\\\"table\\\":\\\"book_info\\\",\\\"type\\\":\\\"increase\\\",\\\"values\\\":{}}],\\\"from\\\":\\\"borrowing\\\",\\\"invalidStateMessage\\\":\\\"当前状态不能还书\\\",\\\"method\\\":\\\"POST\\\",\\\"name\\\":\\\"确认还书\\\",\\\"path\\\":\\\"/borrow-record/return\\\",\\\"successMessage\\\":\\\"还书成功\\\",\\\"to\\\":\\\"returned\\\"},{\\\"actor\\\":\\\"reader\\\",\\\"audit\\\":{},\\\"button\\\":{\\\"confirm\\\":\\\"确认取消借书申请?\\\",\\\"order\\\":10,\\\"pageCode\\\":\\\"my_borrows_page\\\",\\\"scope\\\":\\\"reader\\\",\\\"slot\\\":\\\"list.rowActions\\\",\\\"type\\\":\\\"default\\\"},\\\"code\\\":\\\"user_cancel_apply\\\",\\\"effects\\\":[],\\\"from\\\":\\\"pending\\\",\\\"invalidStateMessage\\\":\\\"当前状态不能取消申请\\\",\\\"method\\\":\\\"POST\\\",\\\"name\\\":\\\"取消申请\\\",\\\"path\\\":\\\"/my-borrows/cancel-apply\\\",\\\"successMessage\\\":\\\"借书申请已取消\\\",\\\"to\\\":\\\"canceled\\\"},{\\\"actor\\\":\\\"reader\\\",\\\"audit\\\":{},\\\"button\\\":{\\\"confirm\\\":\\\"确认取消预约?\\\",\\\"order\\\":20,\\\"pageCode\\\":\\\"my_borrows_page\\\",\\\"scope\\\":\\\"reader\\\",\\\"slot\\\":\\\"list.rowActions\\\",\\\"type\\\":\\\"default\\\"},\\\"code\\\":\\\"user_cancel_reserve\\\",\\\"effects\\\":[],\\\"from\\\":\\\"reserved\\\",\\\"invalidStateMessage\\\":\\\"当前状态不能取消预约\\\",\\\"method\\\":\\\"POST\\\",\\\"name\\\":\\\"取消预约\\\",\\\"path\\\":\\\"/my-borrows/cancel-reserve\\\",\\\"successMessage\\\":\\\"预约已取消\\\",\\\"to\\\":\\\"canceled\\\"}],\\\"code\\\":\\\"borrow_record\\\",\\\"mainTable\\\":\\\"borrow_record\\\",\\\"metrics\\\":[{\\\"aggregate\\\":\\\"count\\\",\\\"code\\\":\\\"borrowing_count\\\",\\\"field\\\":\\\"id\\\",\\\"name\\\":\\\"借阅中数量\\\",\\\"status\\\":\\\"borrowing\\\",\\\"table\\\":\\\"borrow_record\\\",\\\"unit\\\":\\\"条\\\"},{\\\"aggregate\\\":\\\"count\\\",\\\"code\\\":\\\"pending_count\\\",\\\"field\\\":\\\"id\\\",\\\"name\\\":\\\"待审核数量\\\",\\\"status\\\":\\\"pending\\\",\\\"table\\\":\\\"borrow_record\\\",\\\"unit\\\":\\\"条\\\"},{\\\"aggregate\\\":\\\"count\\\",\\\"code\\\":\\\"total_books\\\",\\\"field\\\":\\\"id\\\",\\\"name\\\":\\\"图书总量\\\",\\\"table\\\":\\\"book_info\\\",\\\"unit\\\":\\\"本\\\"},{\\\"aggregate\\\":\\\"count\\\",\\\"code\\\":\\\"total_readers\\\",\\\"field\\\":\\\"id\\\",\\\"name\\\":\\\"读者数量\\\",\\\"table\\\":\\\"reader\\\",\\\"unit\\\":\\\"人\\\"}],\\\"name\\\":\\\"借阅管理\\\",\\\"notFoundMessage\\\":\\\"借阅记录不存在\\\",\\\"states\\\":[{\\\"code\\\":\\\"pending\\\",\\\"label\\\":\\\"待审核\\\"},{\\\"code\\\":\\\"borrowing\\\",\\\"label\\\":\\\"借出中\\\"},{\\\"code\\\":\\\"returned\\\",\\\"label\\\":\\\"已归还\\\"},{\\\"code\\\":\\\"reserved\\\",\\\"label\\\":\\\"已预约\\\"},{\\\"code\\\":\\\"canceled\\\",\\\"label\\\":\\\"已取消\\\"}],\\\"statusField\\\":\\\"status\\\",\\\"version\\\":\\\"1.0\\\"}\",\"result\":{\"downloadReady\":false,\"projectId\":105,\"report\":{\"adminPageCount\":0,\"businessActionCount\":0,\"businessLoopComplete\":true,\"businessLoopWarnings\":[],\"frontendPageCount\":0,\"loopActions\":5,\"missingRequiredActions\":[],\"quantityRules\":0,\"recordRules\":0,\"stateTransitions\":0,\"tableCount\":9},\"stage\":\"DATABASE\",\"suggestedActions\":[]}},\"schemaVersion\":\"1.0\",\"stageCode\":\"DATABASE\"}', '18ec189c69d57a58f3259cbadb1f626ca877c0ec00be4ce1eab5a57c9ec3b7ba', NULL, NULL, '2026-07-14 17:26:38');
INSERT INTO `factory_ai_task_checkpoint` VALUES (105, 106, 'GENERATE', 4, 1, '1.0', '{\"payload\":{\"downloadReady\":true,\"generationRunId\":100,\"projectId\":105,\"report\":{\"adminPageCount\":10,\"businessActionCount\":0,\"businessLoopComplete\":true,\"businessLoopWarnings\":[],\"frontendPageCount\":5,\"loopActions\":5,\"missingRequiredActions\":[],\"quantityRules\":0,\"recordRules\":0,\"stateTransitions\":0,\"tableCount\":9},\"specContentHash\":\"2abebf97603ad49a6f80b87e4b2408d2ead3abba7563fe11f9b9a4330451e0f8\",\"specVersionId\":100,\"specVersionNo\":1,\"stage\":\"GENERATE\",\"suggestedActions\":[]},\"schemaVersion\":\"1.0\",\"stageCode\":\"GENERATE\"}', '9c2a550baaa1e4868068fbdfb255431c0f7eed8eebd07bfb15fd98e63e8e9a15', 100, 100, '2026-07-14 17:26:55');
INSERT INTO `factory_ai_task_checkpoint` VALUES (106, 108, 'DATABASE', 3, 1, '1.0', '{\"payload\":{\"appBlueprintJson\":\"{\\\"adminHomeDashboard\\\":{\\\"charts\\\":[{\\\"filters\\\":[],\\\"metrics\\\":[{\\\"aggregate\\\":\\\"count\\\",\\\"label\\\":\\\"借阅趋势\\\"}],\\\"semantic\\\":\\\"order\\\",\\\"title\\\":\\\"借阅趋势\\\",\\\"type\\\":\\\"line\\\"},{\\\"filters\\\":[],\\\"metrics\\\":[{\\\"aggregate\\\":\\\"count\\\",\\\"label\\\":\\\"图书分类分布\\\"}],\\\"semantic\\\":\\\"content\\\",\\\"title\\\":\\\"图书分类分布\\\",\\\"type\\\":\\\"pie\\\"}],\\\"description\\\":\\\"核心业务数据\\\",\\\"metrics\\\":[{\\\"aggregate\\\":\\\"count\\\",\\\"code\\\":\\\"totalBooks\\\",\\\"filters\\\":[],\\\"semantic\\\":\\\"inventory\\\"},{\\\"aggregate\\\":\\\"count\\\",\\\"code\\\":\\\"totalBorrows\\\",\\\"filters\\\":[],\\\"semantic\\\":\\\"order\\\"},{\\\"aggregate\\\":\\\"count\\\",\\\"code\\\":\\\"currentBorrows\\\",\\\"filters\\\":[],\\\"semantic\\\":\\\"inventory\\\"},{\\\"aggregate\\\":\\\"count\\\",\\\"code\\\":\\\"pendingReservations\\\",\\\"filters\\\":[],\\\"semantic\\\":\\\"task\\\"}],\\\"title\\\":\\\"运营总览\\\"},\\\"adminMenus\\\":[{\\\"code\\\":\\\"book_admin\\\",\\\"dataScope\\\":\\\"ROLE\\\",\\\"name\\\":\\\"图书管理\\\",\\\"pageCode\\\":\\\"book_admin_page\\\",\\\"pageType\\\":\\\"list\\\",\\\"path\\\":\\\"/admin/books\\\",\\\"requiresLogin\\\":true,\\\"tableName\\\":\\\"book_info\\\",\\\"visibleRoles\\\":[\\\"admin\\\"]},{\\\"code\\\":\\\"borrow_admin\\\",\\\"dataScope\\\":\\\"ROLE\\\",\\\"name\\\":\\\"借阅管理\\\",\\\"pageCode\\\":\\\"borrow_admin_page\\\",\\\"pageType\\\":\\\"list\\\",\\\"path\\\":\\\"/admin/borrows\\\",\\\"requiresLogin\\\":true,\\\"tableName\\\":\\\"borrow_record\\\",\\\"visibleRoles\\\":[\\\"admin\\\"]},{\\\"code\\\":\\\"reservation_admin\\\",\\\"dataScope\\\":\\\"ROLE\\\",\\\"name\\\":\\\"预约管理\\\",\\\"pageCode\\\":\\\"reservation_admin_page\\\",\\\"pageType\\\":\\\"list\\\",\\\"path\\\":\\\"/admin/reservations\\\",\\\"requiresLogin\\\":true,\\\"tableName\\\":\\\"reservation\\\",\\\"visibleRoles\\\":[\\\"admin\\\"]},{\\\"code\\\":\\\"reader_admin\\\",\\\"dataScope\\\":\\\"ROLE\\\",\\\"name\\\":\\\"读者管理\\\",\\\"pageCode\\\":\\\"reader_admin_page\\\",\\\"pageType\\\":\\\"list\\\",\\\"path\\\":\\\"/admin/readers\\\",\\\"requiresLogin\\\":true,\\\"tableName\\\":\\\"reader\\\",\\\"visibleRoles\\\":[\\\"admin\\\"]},{\\\"code\\\":\\\"carousel_admin\\\",\\\"dataScope\\\":\\\"ROLE\\\",\\\"name\\\":\\\"轮播图管理\\\",\\\"pageCode\\\":\\\"carousel_admin_page\\\",\\\"pageType\\\":\\\"list\\\",\\\"path\\\":\\\"/admin/carousels\\\",\\\"requiresLogin\\\":true,\\\"tableName\\\":\\\"carousel\\\",\\\"visibleRoles\\\":[\\\"admin\\\"]},{\\\"code\\\":\\\"notice_admin\\\",\\\"dataScope\\\":\\\"ROLE\\\",\\\"name\\\":\\\"公告管理\\\",\\\"pageCode\\\":\\\"notice_admin_page\\\",\\\"pageType\\\":\\\"list\\\",\\\"path\\\":\\\"/admin/notices\\\",\\\"requiresLogin\\\":true,\\\"tableName\\\":\\\"notice\\\",\\\"visibleRoles\\\":[\\\"admin\\\"]},{\\\"code\\\":\\\"news_admin\\\",\\\"dataScope\\\":\\\"ROLE\\\",\\\"name\\\":\\\"新闻管理\\\",\\\"pageCode\\\":\\\"news_admin_page\\\",\\\"pageType\\\":\\\"list\\\",\\\"path\\\":\\\"/admin/news\\\",\\\"requiresLogin\\\":true,\\\"tableName\\\":\\\"news\\\",\\\"visibleRoles\\\":[\\\"admin\\\"]},{\\\"code\\\":\\\"admin_profile\\\",\\\"dataScope\\\":\\\"ROLE\\\",\\\"name\\\":\\\"个人资料\\\",\\\"pageCode\\\":\\\"admin_profile_page\\\",\\\"pageType\\\":\\\"form\\\",\\\"path\\\":\\\"/admin/profile\\\",\\\"requiresLogin\\\":true,\\\"tableName\\\":\\\"admin\\\",\\\"visibleRoles\\\":[\\\"admin\\\"]}],\\\"frontendMenus\\\":[{\\\"code\\\":\\\"book_catalog\\\",\\\"dataScope\\\":\\\"PUBLIC\\\",\\\"name\\\":\\\"图书目录\\\",\\\"pageCode\\\":\\\"book_catalog_page\\\",\\\"pageType\\\":\\\"\\\",\\\"path\\\":\\\"/books\\\",\\\"requiresLogin\\\":false,\\\"tableName\\\":\\\"\\\",\\\"visibleRoles\\\":[]},{\\\"code\\\":\\\"my_borrows\\\",\\\"dataScope\\\":\\\"CURRENT_USER\\\",\\\"name\\\":\\\"我的借阅\\\",\\\"pageCode\\\":\\\"my_borrows_page\\\",\\\"pageType\\\":\\\"\\\",\\\"path\\\":\\\"/my-borrows\\\",\\\"requiresLogin\\\":true,\\\"tableName\\\":\\\"\\\",\\\"visibleRoles\\\":[\\\"reader\\\"]},{\\\"code\\\":\\\"my_reservations\\\",\\\"dataScope\\\":\\\"CURRENT_USER\\\",\\\"name\\\":\\\"我的预约\\\",\\\"pageCode\\\":\\\"my_reservation_page\\\",\\\"pageType\\\":\\\"\\\",\\\"path\\\":\\\"/my-reservations\\\",\\\"requiresLogin\\\":true,\\\"tableName\\\":\\\"\\\",\\\"visibleRoles\\\":[\\\"reader\\\"]},{\\\"code\\\":\\\"reader_profile\\\",\\\"dataScope\\\":\\\"CURRENT_USER\\\",\\\"name\\\":\\\"个人资料\\\",\\\"pageCode\\\":\\\"reader_profile_page\\\",\\\"pageType\\\":\\\"\\\",\\\"path\\\":\\\"/profile\\\",\\\"requiresLogin\\\":true,\\\"tableName\\\":\\\"\\\",\\\"visibleRoles\\\":[\\\"reader\\\"]},{\\\"code\\\":\\\"notices\\\",\\\"dataScope\\\":\\\"PUBLIC\\\",\\\"name\\\":\\\"公告\\\",\\\"pageCode\\\":\\\"notice_list_page\\\",\\\"pageType\\\":\\\"\\\",\\\"path\\\":\\\"/notices\\\",\\\"requiresLogin\\\":false,\\\"tableName\\\":\\\"\\\",\\\"visibleRoles\\\":[]},{\\\"code\\\":\\\"news\\\",\\\"dataScope\\\":\\\"PUBLIC\\\",\\\"name\\\":\\\"新闻\\\",\\\"pageCode\\\":\\\"news_list_page\\\",\\\"pageType\\\":\\\"\\\",\\\"path\\\":\\\"/news\\\",\\\"requiresLogin\\\":false,\\\"tableName\\\":\\\"\\\",\\\"visibleRoles\\\":[]}],\\\"frontendPages\\\":[{\\\"code\\\":\\\"book_catalog_page\\\",\\\"menuCode\\\":\\\"book_catalog\\\",\\\"name\\\":\\\"图书目录\\\",\\\"pageType\\\":\\\"list\\\",\\\"parentPageCode\\\":\\\"\\\",\\\"path\\\":\\\"/books\\\",\\\"tableName\\\":\\\"book_info\\\"},{\\\"code\\\":\\\"my_borrows_page\\\",\\\"menuCode\\\":\\\"my_borrows\\\",\\\"name\\\":\\\"我的借阅\\\",\\\"pageType\\\":\\\"current_user_list\\\",\\\"parentPageCode\\\":\\\"\\\",\\\"path\\\":\\\"/my-borrows\\\",\\\"tableName\\\":\\\"borrow_record\\\"},{\\\"code\\\":\\\"my_reservation_page\\\",\\\"menuCode\\\":\\\"my_reservations\\\",\\\"name\\\":\\\"我的预约\\\",\\\"pageType\\\":\\\"current_user_list\\\",\\\"parentPageCode\\\":\\\"\\\",\\\"path\\\":\\\"/my-reservations\\\",\\\"tableName\\\":\\\"reservation\\\"},{\\\"code\\\":\\\"reader_profile_page\\\",\\\"menuCode\\\":\\\"reader_profile\\\",\\\"name\\\":\\\"个人资料\\\",\\\"pageType\\\":\\\"form\\\",\\\"parentPageCode\\\":\\\"\\\",\\\"path\\\":\\\"/profile\\\",\\\"tableName\\\":\\\"reader\\\"},{\\\"code\\\":\\\"notice_list_page\\\",\\\"menuCode\\\":\\\"notices\\\",\\\"name\\\":\\\"公告列表\\\",\\\"pageType\\\":\\\"list\\\",\\\"parentPageCode\\\":\\\"\\\",\\\"path\\\":\\\"/notices\\\",\\\"tableName\\\":\\\"notice\\\"},{\\\"code\\\":\\\"news_list_page\\\",\\\"menuCode\\\":\\\"news\\\",\\\"name\\\":\\\"新闻列表\\\",\\\"pageType\\\":\\\"list\\\",\\\"parentPageCode\\\":\\\"\\\",\\\"path\\\":\\\"/news\\\",\\\"tableName\\\":\\\"news\\\"}],\\\"roles\\\":[{\\\"code\\\":\\\"admin\\\",\\\"description\\\":\\\"系统管理员,负责图书、借阅、预约、用户、轮播图、公告、新闻等管理\\\",\\\"name\\\":\\\"管理员\\\"},{\\\"code\\\":\\\"reader\\\",\\\"description\\\":\\\"普通用户,可借书、还书、预约图书、取消预约、查看公告和新闻\\\",\\\"name\\\":\\\"读者\\\"}]}\",\"flowConfigJson\":\"{\\\"actions\\\":[{\\\"actor\\\":\\\"admin\\\",\\\"audit\\\":{\\\"timeField\\\":\\\"approve_time\\\",\\\"userField\\\":\\\"approve_user_id\\\"},\\\"button\\\":{\\\"confirm\\\":\\\"确认审核通过吗?\\\",\\\"order\\\":10,\\\"pageCode\\\":\\\"borrow_admin_page\\\",\\\"scope\\\":\\\"admin\\\",\\\"slot\\\":\\\"list.rowActions\\\",\\\"type\\\":\\\"success\\\"},\\\"code\\\":\\\"approve\\\",\\\"effects\\\":[{\\\"amount\\\":\\\"1\\\",\\\"errorMessage\\\":\\\"图书库存不足\\\",\\\"field\\\":\\\"stock\\\",\\\"min\\\":\\\"0\\\",\\\"notFoundMessage\\\":\\\"图书不存在\\\",\\\"relationField\\\":\\\"book_id\\\",\\\"table\\\":\\\"book_info\\\",\\\"type\\\":\\\"decrease\\\",\\\"values\\\":{}}],\\\"from\\\":\\\"pending\\\",\\\"invalidStateMessage\\\":\\\"当前状态不能审核\\\",\\\"method\\\":\\\"POST\\\",\\\"name\\\":\\\"审核通过\\\",\\\"path\\\":\\\"/borrow-record/approve\\\",\\\"successMessage\\\":\\\"审核成功\\\",\\\"to\\\":\\\"borrowing\\\"},{\\\"actor\\\":\\\"admin\\\",\\\"audit\\\":{\\\"timeField\\\":\\\"reject_time\\\",\\\"userField\\\":\\\"reject_user_id\\\"},\\\"button\\\":{\\\"confirm\\\":\\\"确认拒绝吗?\\\",\\\"order\\\":20,\\\"pageCode\\\":\\\"borrow_admin_page\\\",\\\"scope\\\":\\\"admin\\\",\\\"slot\\\":\\\"list.rowActions\\\",\\\"type\\\":\\\"danger\\\"},\\\"code\\\":\\\"reject\\\",\\\"effects\\\":[],\\\"from\\\":\\\"pending\\\",\\\"invalidStateMessage\\\":\\\"当前状态不能拒绝\\\",\\\"method\\\":\\\"POST\\\",\\\"name\\\":\\\"拒绝\\\",\\\"path\\\":\\\"/borrow-record/reject\\\",\\\"successMessage\\\":\\\"已拒绝\\\",\\\"to\\\":\\\"rejected\\\"},{\\\"actor\\\":\\\"admin\\\",\\\"audit\\\":{\\\"timeField\\\":\\\"return_time\\\",\\\"userField\\\":\\\"return_user_id\\\"},\\\"button\\\":{\\\"confirm\\\":\\\"确认还书吗?\\\",\\\"order\\\":30,\\\"pageCode\\\":\\\"borrow_admin_page\\\",\\\"scope\\\":\\\"admin\\\",\\\"slot\\\":\\\"list.rowActions\\\",\\\"type\\\":\\\"primary\\\"},\\\"code\\\":\\\"return\\\",\\\"effects\\\":[{\\\"amount\\\":\\\"1\\\",\\\"field\\\":\\\"stock\\\",\\\"min\\\":\\\"0\\\",\\\"notFoundMessage\\\":\\\"图书不存在\\\",\\\"relationField\\\":\\\"book_id\\\",\\\"table\\\":\\\"book_info\\\",\\\"type\\\":\\\"increase\\\",\\\"values\\\":{}}],\\\"from\\\":\\\"borrowing\\\",\\\"invalidStateMessage\\\":\\\"当前状态不能还书\\\",\\\"method\\\":\\\"POST\\\",\\\"name\\\":\\\"还书\\\",\\\"path\\\":\\\"/borrow-record/return\\\",\\\"successMessage\\\":\\\"还书成功\\\",\\\"to\\\":\\\"returned\\\"}],\\\"code\\\":\\\"borrow_record_flow\\\",\\\"mainTable\\\":\\\"borrow_record\\\",\\\"metrics\\\":[{\\\"aggregate\\\":\\\"count\\\",\\\"code\\\":\\\"total_borrows\\\",\\\"field\\\":\\\"id\\\",\\\"name\\\":\\\"总借阅数\\\",\\\"table\\\":\\\"borrow_record\\\",\\\"unit\\\":\\\"条\\\"},{\\\"aggregate\\\":\\\"count\\\",\\\"code\\\":\\\"current_borrows\\\",\\\"field\\\":\\\"id\\\",\\\"name\\\":\\\"当前借阅数\\\",\\\"status\\\":\\\"borrowing\\\",\\\"table\\\":\\\"borrow_record\\\",\\\"unit\\\":\\\"条\\\"}],\\\"name\\\":\\\"借阅管理流程\\\",\\\"notFoundMessage\\\":\\\"借阅记录不存在\\\",\\\"states\\\":[{\\\"code\\\":\\\"pending\\\",\\\"label\\\":\\\"待审核\\\"},{\\\"code\\\":\\\"borrowing\\\",\\\"label\\\":\\\"借阅中\\\"},{\\\"code\\\":\\\"returned\\\",\\\"label\\\":\\\"已归还\\\"},{\\\"code\\\":\\\"rejected\\\",\\\"label\\\":\\\"已拒绝\\\"}],\\\"statusField\\\":\\\"status\\\",\\\"version\\\":\\\"1.0\\\"}\",\"result\":{\"downloadReady\":false,\"projectId\":106,\"report\":{\"adminPageCount\":0,\"businessActionCount\":0,\"businessLoopComplete\":true,\"businessLoopWarnings\":[],\"frontendPageCount\":0,\"loopActions\":3,\"missingRequiredActions\":[],\"quantityRules\":0,\"recordRules\":0,\"stateTransitions\":0,\"tableCount\":8},\"stage\":\"DATABASE\",\"suggestedActions\":[]}},\"schemaVersion\":\"1.0\",\"stageCode\":\"DATABASE\"}', 'e57fcfd2dfe90717d69c0493afef5c6d60efc3a1167c80a2ea496e838ce21451', NULL, NULL, '2026-07-14 17:57:35');
INSERT INTO `factory_ai_task_checkpoint` VALUES (107, 108, 'GENERATE', 4, 1, '1.0', '{\"payload\":{\"downloadReady\":true,\"generationRunId\":101,\"projectId\":106,\"report\":{\"adminPageCount\":10,\"businessActionCount\":0,\"businessLoopComplete\":true,\"businessLoopWarnings\":[],\"frontendPageCount\":7,\"loopActions\":3,\"missingRequiredActions\":[],\"quantityRules\":0,\"recordRules\":0,\"stateTransitions\":0,\"tableCount\":8},\"specContentHash\":\"6ae8c8ed14be85a098542ee9ae37870aa8910b5bc136a9aab5d94406a7bbd8ce\",\"specVersionId\":101,\"specVersionNo\":1,\"stage\":\"GENERATE\",\"suggestedActions\":[]},\"schemaVersion\":\"1.0\",\"stageCode\":\"GENERATE\"}', 'eab3a56ea42da0261943f5a5ed9454feb4cb3121c8363a3ac72e6846981e7d76', 101, 101, '2026-07-14 17:57:45');
INSERT INTO `factory_ai_task_checkpoint` VALUES (108, 108, 'VERIFY_AND_PREVIEW', 5, 1, '1.0', '{\"payload\":{\"adminFrontendUrl\":\"http://127.0.0.1:24570\",\"backendUrl\":\"http://127.0.0.1:24521\",\"downloadReady\":true,\"errorMessage\":\"生成的后端进程已退出\",\"expiresAt\":\"2026-07-14 18:12:45\",\"failedStage\":\"VERIFY_AND_PREVIEW\",\"frontendUrl\":\"http://127.0.0.1:24522\",\"generationRunId\":101,\"previewStatus\":\"FAILED\",\"projectId\":106,\"report\":{\"adminPageCount\":10,\"businessActionCount\":0,\"businessLoopComplete\":true,\"businessLoopWarnings\":[],\"frontendPageCount\":7,\"loopActions\":3,\"missingRequiredActions\":[],\"quantityRules\":0,\"recordRules\":0,\"stateTransitions\":0,\"tableCount\":8},\"specContentHash\":\"6ae8c8ed14be85a098542ee9ae37870aa8910b5bc136a9aab5d94406a7bbd8ce\",\"specVersionId\":101,\"specVersionNo\":1,\"stage\":\"VERIFY_AND_PREVIEW\",\"suggestedActions\":[\"源码预览已生成,可以先下载项目或进入高级调整后重试运行预览\"]},\"schemaVersion\":\"1.0\",\"stageCode\":\"VERIFY_AND_PREVIEW\"}', '1e7833910ada46fa3529b72ae71bae4ed00c8a0390d6d31a4831e548ae012a05', 101, 101, '2026-07-14 17:58:19');
INSERT INTO `factory_ai_task_checkpoint` VALUES (109, 109, 'DATABASE', 3, 1, '1.0', '{\"payload\":{\"appBlueprintJson\":\"{\\\"adminHomeDashboard\\\":{\\\"charts\\\":[{\\\"filters\\\":[],\\\"metrics\\\":[{\\\"aggregate\\\":\\\"count\\\",\\\"label\\\":\\\"借阅趋势\\\"}],\\\"semantic\\\":\\\"order\\\",\\\"title\\\":\\\"借阅趋势\\\",\\\"type\\\":\\\"line\\\"},{\\\"filters\\\":[],\\\"metrics\\\":[{\\\"aggregate\\\":\\\"count\\\",\\\"label\\\":\\\"图书分类分布\\\"}],\\\"semantic\\\":\\\"content\\\",\\\"title\\\":\\\"图书分类分布\\\",\\\"type\\\":\\\"pie\\\"}],\\\"description\\\":\\\"核心业务数据\\\",\\\"metrics\\\":[{\\\"aggregate\\\":\\\"count\\\",\\\"filters\\\":[],\\\"semantic\\\":\\\"inventory\\\"},{\\\"aggregate\\\":\\\"count\\\",\\\"filters\\\":[],\\\"semantic\\\":\\\"order\\\"},{\\\"aggregate\\\":\\\"count\\\",\\\"filters\\\":[],\\\"semantic\\\":\\\"user\\\"},{\\\"aggregate\\\":\\\"count\\\",\\\"filters\\\":[],\\\"semantic\\\":\\\"warning\\\"}],\\\"title\\\":\\\"运营总览\\\"},\\\"adminMenus\\\":[{\\\"code\\\":\\\"book_admin\\\",\\\"dataScope\\\":\\\"ROLE\\\",\\\"name\\\":\\\"图书管理\\\",\\\"pageCode\\\":\\\"book_admin_page\\\",\\\"pageType\\\":\\\"list\\\",\\\"path\\\":\\\"/admin/books\\\",\\\"requiresLogin\\\":true,\\\"tableName\\\":\\\"book_info\\\",\\\"visibleRoles\\\":[\\\"admin\\\"]},{\\\"code\\\":\\\"borrow_admin\\\",\\\"dataScope\\\":\\\"ROLE\\\",\\\"name\\\":\\\"借阅管理\\\",\\\"pageCode\\\":\\\"borrow_admin_page\\\",\\\"pageType\\\":\\\"list\\\",\\\"path\\\":\\\"/admin/borrows\\\",\\\"requiresLogin\\\":true,\\\"tableName\\\":\\\"borrow_record\\\",\\\"visibleRoles\\\":[\\\"admin\\\"]},{\\\"code\\\":\\\"banner_admin\\\",\\\"dataScope\\\":\\\"ROLE\\\",\\\"name\\\":\\\"轮播图管理\\\",\\\"pageCode\\\":\\\"banner_admin_page\\\",\\\"pageType\\\":\\\"list\\\",\\\"path\\\":\\\"/admin/banners\\\",\\\"requiresLogin\\\":true,\\\"tableName\\\":\\\"banner\\\",\\\"visibleRoles\\\":[\\\"admin\\\"]},{\\\"code\\\":\\\"notice_admin\\\",\\\"dataScope\\\":\\\"ROLE\\\",\\\"name\\\":\\\"公告管理\\\",\\\"pageCode\\\":\\\"notice_admin_page\\\",\\\"pageType\\\":\\\"list\\\",\\\"path\\\":\\\"/admin/notices\\\",\\\"requiresLogin\\\":true,\\\"tableName\\\":\\\"notice\\\",\\\"visibleRoles\\\":[\\\"admin\\\"]},{\\\"code\\\":\\\"news_admin\\\",\\\"dataScope\\\":\\\"ROLE\\\",\\\"name\\\":\\\"新闻管理\\\",\\\"pageCode\\\":\\\"news_admin_page\\\",\\\"pageType\\\":\\\"list\\\",\\\"path\\\":\\\"/admin/news\\\",\\\"requiresLogin\\\":true,\\\"tableName\\\":\\\"news\\\",\\\"visibleRoles\\\":[\\\"admin\\\"]}],\\\"frontendMenus\\\":[{\\\"code\\\":\\\"home\\\",\\\"dataScope\\\":\\\"PUBLIC\\\",\\\"name\\\":\\\"首页\\\",\\\"pageCode\\\":\\\"home_page\\\",\\\"pageType\\\":\\\"\\\",\\\"path\\\":\\\"/home\\\",\\\"requiresLogin\\\":false,\\\"tableName\\\":\\\"\\\",\\\"visibleRoles\\\":[]},{\\\"code\\\":\\\"book_catalog\\\",\\\"dataScope\\\":\\\"PUBLIC\\\",\\\"name\\\":\\\"图书目录\\\",\\\"pageCode\\\":\\\"book_catalog_page\\\",\\\"pageType\\\":\\\"\\\",\\\"path\\\":\\\"/books\\\",\\\"requiresLogin\\\":false,\\\"tableName\\\":\\\"\\\",\\\"visibleRoles\\\":[]},{\\\"code\\\":\\\"my_borrows\\\",\\\"dataScope\\\":\\\"CURRENT_USER\\\",\\\"name\\\":\\\"我的借阅\\\",\\\"pageCode\\\":\\\"my_borrows_page\\\",\\\"pageType\\\":\\\"\\\",\\\"path\\\":\\\"/my-borrows\\\",\\\"requiresLogin\\\":true,\\\"tableName\\\":\\\"\\\",\\\"visibleRoles\\\":[\\\"reader\\\"]},{\\\"code\\\":\\\"my_profile\\\",\\\"dataScope\\\":\\\"CURRENT_USER\\\",\\\"name\\\":\\\"个人资料\\\",\\\"pageCode\\\":\\\"my_profile_page\\\",\\\"pageType\\\":\\\"\\\",\\\"path\\\":\\\"/my-profile\\\",\\\"requiresLogin\\\":true,\\\"tableName\\\":\\\"\\\",\\\"visibleRoles\\\":[\\\"reader\\\"]}],\\\"frontendPages\\\":[{\\\"code\\\":\\\"home_page\\\",\\\"menuCode\\\":\\\"home\\\",\\\"name\\\":\\\"首页\\\",\\\"pageType\\\":\\\"list\\\",\\\"parentPageCode\\\":\\\"\\\",\\\"path\\\":\\\"/home\\\",\\\"tableName\\\":\\\"banner\\\"},{\\\"code\\\":\\\"book_catalog_page\\\",\\\"menuCode\\\":\\\"book_catalog\\\",\\\"name\\\":\\\"图书目录\\\",\\\"pageType\\\":\\\"list\\\",\\\"parentPageCode\\\":\\\"\\\",\\\"path\\\":\\\"/books\\\",\\\"tableName\\\":\\\"book_info\\\"},{\\\"code\\\":\\\"book_detail_page\\\",\\\"menuCode\\\":\\\"book_catalog\\\",\\\"name\\\":\\\"图书详情\\\",\\\"pageType\\\":\\\"detail\\\",\\\"parentPageCode\\\":\\\"\\\",\\\"path\\\":\\\"/books/:id\\\",\\\"tableName\\\":\\\"book_info\\\"},{\\\"code\\\":\\\"my_borrows_page\\\",\\\"menuCode\\\":\\\"my_borrows\\\",\\\"name\\\":\\\"我的借阅\\\",\\\"pageType\\\":\\\"current_user_list\\\",\\\"parentPageCode\\\":\\\"\\\",\\\"path\\\":\\\"/my-borrows\\\",\\\"tableName\\\":\\\"borrow_record\\\"},{\\\"code\\\":\\\"my_profile_page\\\",\\\"menuCode\\\":\\\"my_profile\\\",\\\"name\\\":\\\"个人资料\\\",\\\"pageType\\\":\\\"form\\\",\\\"parentPageCode\\\":\\\"\\\",\\\"path\\\":\\\"/my-profile\\\",\\\"tableName\\\":\\\"reader\\\"}],\\\"roles\\\":[{\\\"code\\\":\\\"admin\\\",\\\"description\\\":\\\"系统管理员,拥有所有后台管理权限\\\",\\\"name\\\":\\\"管理员\\\"},{\\\"code\\\":\\\"reader\\\",\\\"description\\\":\\\"普通用户,可以借书、还书、预约、取消预约\\\",\\\"name\\\":\\\"读者\\\"}]}\",\"flowConfigJson\":\"{\\\"actions\\\":[{\\\"actor\\\":\\\"reader\\\",\\\"button\\\":{\\\"confirm\\\":\\\"确认预约该书?\\\",\\\"order\\\":10,\\\"pageCode\\\":\\\"book_detail_page\\\",\\\"scope\\\":\\\"reader\\\",\\\"slot\\\":\\\"detail.primaryActions\\\",\\\"type\\\":\\\"primary\\\"},\\\"code\\\":\\\"reserve\\\",\\\"effects\\\":[{\\\"amount\\\":\\\"1\\\",\\\"min\\\":\\\"0\\\",\\\"table\\\":\\\"borrow_record\\\",\\\"type\\\":\\\"create_record\\\",\\\"values\\\":{\\\"reader_id\\\":\\\"currentUserId\\\",\\\"borrow_date\\\":\\\"now\\\",\\\"book_id\\\":\\\"record.book_id\\\",\\\"status\\\":\\\"reserved\\\"}}],\\\"from\\\":\\\"init\\\",\\\"invalidStateMessage\\\":\\\"该图书不可预约\\\",\\\"method\\\":\\\"POST\\\",\\\"name\\\":\\\"预约图书\\\",\\\"path\\\":\\\"/borrow-record/reserve\\\",\\\"successMessage\\\":\\\"预约成功\\\",\\\"to\\\":\\\"reserved\\\"},{\\\"actor\\\":\\\"reader\\\",\\\"button\\\":{\\\"confirm\\\":\\\"确认取消预约?\\\",\\\"order\\\":10,\\\"pageCode\\\":\\\"my_borrows_page\\\",\\\"scope\\\":\\\"reader\\\",\\\"slot\\\":\\\"list.rowActions\\\",\\\"type\\\":\\\"warning\\\"},\\\"code\\\":\\\"cancel_reserve\\\",\\\"effects\\\":[],\\\"from\\\":\\\"reserved\\\",\\\"invalidStateMessage\\\":\\\"当前状态不能取消\\\",\\\"method\\\":\\\"POST\\\",\\\"name\\\":\\\"取消预约\\\",\\\"path\\\":\\\"/borrow-record/cancel-reserve\\\",\\\"successMessage\\\":\\\"取消预约成功\\\",\\\"to\\\":\\\"cancelled\\\"},{\\\"actor\\\":\\\"admin\\\",\\\"audit\\\":{\\\"timeField\\\":\\\"approve_time\\\",\\\"userField\\\":\\\"approve_user_id\\\"},\\\"button\\\":{\\\"confirm\\\":\\\"确认借出该书?\\\",\\\"order\\\":10,\\\"pageCode\\\":\\\"borrow_admin_page\\\",\\\"scope\\\":\\\"admin\\\",\\\"slot\\\":\\\"list.rowActions\\\",\\\"type\\\":\\\"success\\\"},\\\"code\\\":\\\"lend\\\",\\\"effects\\\":[{\\\"amount\\\":\\\"1\\\",\\\"errorMessage\\\":\\\"图书库存不足\\\",\\\"field\\\":\\\"stock\\\",\\\"min\\\":\\\"0\\\",\\\"notFoundMessage\\\":\\\"图书不存在\\\",\\\"relationField\\\":\\\"book_id\\\",\\\"table\\\":\\\"book_info\\\",\\\"type\\\":\\\"decrease\\\",\\\"values\\\":{}}],\\\"from\\\":\\\"reserved\\\",\\\"invalidStateMessage\\\":\\\"该记录已借出或已取消\\\",\\\"method\\\":\\\"POST\\\",\\\"name\\\":\\\"借出\\\",\\\"path\\\":\\\"/borrow-record/lend\\\",\\\"successMessage\\\":\\\"借出成功\\\",\\\"to\\\":\\\"borrowing\\\"},{\\\"actor\\\":\\\"admin\\\",\\\"audit\\\":{\\\"timeField\\\":\\\"return_time\\\",\\\"userField\\\":\\\"return_user_id\\\"},\\\"button\\\":{\\\"confirm\\\":\\\"确认归还该书?\\\",\\\"order\\\":20,\\\"pageCode\\\":\\\"borrow_admin_page\\\",\\\"scope\\\":\\\"admin\\\",\\\"slot\\\":\\\"list.rowActions\\\",\\\"type\\\":\\\"primary\\\"},\\\"code\\\":\\\"return_book\\\",\\\"effects\\\":[{\\\"amount\\\":\\\"1\\\",\\\"field\\\":\\\"stock\\\",\\\"min\\\":\\\"0\\\",\\\"notFoundMessage\\\":\\\"图书不存在\\\",\\\"relationField\\\":\\\"book_id\\\",\\\"table\\\":\\\"book_info\\\",\\\"type\\\":\\\"increase\\\",\\\"values\\\":{}}],\\\"from\\\":\\\"borrowing\\\",\\\"invalidStateMessage\\\":\\\"当前状态不能归还\\\",\\\"method\\\":\\\"POST\\\",\\\"name\\\":\\\"归还\\\",\\\"path\\\":\\\"/borrow-record/return\\\",\\\"successMessage\\\":\\\"归还成功\\\",\\\"to\\\":\\\"returned\\\"}],\\\"code\\\":\\\"borrow_flow\\\",\\\"mainTable\\\":\\\"borrow_record\\\",\\\"metrics\\\":[{\\\"aggregate\\\":\\\"count\\\",\\\"code\\\":\\\"borrowing_count\\\",\\\"field\\\":\\\"id\\\",\\\"name\\\":\\\"借阅中数量\\\",\\\"status\\\":\\\"borrowing\\\",\\\"table\\\":\\\"borrow_record\\\",\\\"unit\\\":\\\"条\\\"},{\\\"aggregate\\\":\\\"count\\\",\\\"code\\\":\\\"reserved_count\\\",\\\"field\\\":\\\"id\\\",\\\"name\\\":\\\"预约中数量\\\",\\\"status\\\":\\\"reserved\\\",\\\"table\\\":\\\"borrow_record\\\",\\\"unit\\\":\\\"条\\\"},{\\\"aggregate\\\":\\\"count\\\",\\\"code\\\":\\\"returned_count\\\",\\\"field\\\":\\\"id\\\",\\\"name\\\":\\\"已归还数量\\\",\\\"status\\\":\\\"returned\\\",\\\"table\\\":\\\"borrow_record\\\",\\\"unit\\\":\\\"条\\\"},{\\\"aggregate\\\":\\\"count\\\",\\\"code\\\":\\\"cancelled_count\\\",\\\"field\\\":\\\"id\\\",\\\"name\\\":\\\"已取消数量\\\",\\\"status\\\":\\\"cancelled\\\",\\\"table\\\":\\\"borrow_record\\\",\\\"unit\\\":\\\"条\\\"},{\\\"aggregate\\\":\\\"count\\\",\\\"code\\\":\\\"book_total\\\",\\\"field\\\":\\\"id\\\",\\\"name\\\":\\\"图书总数\\\",\\\"table\\\":\\\"book_info\\\",\\\"unit\\\":\\\"本\\\"},{\\\"aggregate\\\":\\\"sum\\\",\\\"code\\\":\\\"book_stock_sum\\\",\\\"field\\\":\\\"stock\\\",\\\"name\\\":\\\"总库存\\\",\\\"table\\\":\\\"book_info\\\",\\\"unit\\\":\\\"本\\\"}],\\\"name\\\":\\\"借阅流程\\\",\\\"notFoundMessage\\\":\\\"借阅记录不存在\\\",\\\"states\\\":[{\\\"code\\\":\\\"init\\\",\\\"label\\\":\\\"初始\\\"},{\\\"code\\\":\\\"reserved\\\",\\\"label\\\":\\\"已预约\\\"},{\\\"code\\\":\\\"borrowing\\\",\\\"label\\\":\\\"借阅中\\\"},{\\\"code\\\":\\\"returned\\\",\\\"label\\\":\\\"已归还\\\"},{\\\"code\\\":\\\"cancelled\\\",\\\"label\\\":\\\"已取消\\\"}],\\\"statusField\\\":\\\"status\\\",\\\"version\\\":\\\"1.0\\\"}\",\"result\":{\"downloadReady\":false,\"projectId\":106,\"report\":{\"adminPageCount\":0,\"businessActionCount\":0,\"businessLoopComplete\":true,\"businessLoopWarnings\":[],\"frontendPageCount\":0,\"loopActions\":4,\"missingRequiredActions\":[],\"quantityRules\":0,\"recordRules\":0,\"stateTransitions\":0,\"tableCount\":7},\"stage\":\"DATABASE\",\"suggestedActions\":[]}},\"schemaVersion\":\"1.0\",\"stageCode\":\"DATABASE\"}', '0118fa8c6566d6ca009920b17645acb81d6922b5caf390958824ac8cf94db00f', NULL, NULL, '2026-07-14 19:51:07');
INSERT INTO `factory_ai_task_checkpoint` VALUES (110, 111, 'DATABASE', 3, 1, '1.0', '{\"payload\":{\"appBlueprintJson\":\"{\\\"adminHomeDashboard\\\":{\\\"charts\\\":[{\\\"filters\\\":[],\\\"metrics\\\":[{\\\"aggregate\\\":\\\"count\\\",\\\"label\\\":\\\"借阅趋势\\\"}],\\\"title\\\":\\\"借阅趋势\\\",\\\"type\\\":\\\"line\\\"},{\\\"filters\\\":[],\\\"metrics\\\":[{\\\"aggregate\\\":\\\"count\\\",\\\"label\\\":\\\"预约状态分布\\\"}],\\\"title\\\":\\\"预约状态分布\\\",\\\"type\\\":\\\"pie\\\"}],\\\"description\\\":\\\"核心业务数据\\\",\\\"metrics\\\":[{\\\"aggregate\\\":\\\"count\\\",\\\"code\\\":\\\"total_books\\\",\\\"filters\\\":[],\\\"semantic\\\":\\\"content\\\",\\\"tableName\\\":\\\"book_info\\\"},{\\\"aggregate\\\":\\\"count\\\",\\\"code\\\":\\\"total_borrows\\\",\\\"filters\\\":[],\\\"semantic\\\":\\\"order\\\",\\\"tableName\\\":\\\"borrow_record\\\"},{\\\"aggregate\\\":\\\"count\\\",\\\"code\\\":\\\"total_reservations\\\",\\\"filters\\\":[],\\\"semantic\\\":\\\"task\\\",\\\"tableName\\\":\\\"reservation\\\"},{\\\"aggregate\\\":\\\"count\\\",\\\"code\\\":\\\"active_readers\\\",\\\"filters\\\":[],\\\"semantic\\\":\\\"user\\\",\\\"tableName\\\":\\\"reader\\\"}],\\\"title\\\":\\\"运营总览\\\"},\\\"adminMenus\\\":[{\\\"code\\\":\\\"book_admin\\\",\\\"dataScope\\\":\\\"ROLE\\\",\\\"name\\\":\\\"图书管理\\\",\\\"pageCode\\\":\\\"book_admin_page\\\",\\\"pageType\\\":\\\"list\\\",\\\"path\\\":\\\"/admin/books\\\",\\\"requiresLogin\\\":true,\\\"tableName\\\":\\\"book_info\\\",\\\"visibleRoles\\\":[\\\"admin\\\"]},{\\\"code\\\":\\\"borrow_admin\\\",\\\"dataScope\\\":\\\"ROLE\\\",\\\"name\\\":\\\"借阅管理\\\",\\\"pageCode\\\":\\\"borrow_admin_page\\\",\\\"pageType\\\":\\\"list\\\",\\\"path\\\":\\\"/admin/borrows\\\",\\\"requiresLogin\\\":true,\\\"tableName\\\":\\\"borrow_record\\\",\\\"visibleRoles\\\":[\\\"admin\\\"]},{\\\"code\\\":\\\"reservation_admin\\\",\\\"dataScope\\\":\\\"ROLE\\\",\\\"name\\\":\\\"预约管理\\\",\\\"pageCode\\\":\\\"reservation_admin_page\\\",\\\"pageType\\\":\\\"list\\\",\\\"path\\\":\\\"/admin/reservations\\\",\\\"requiresLogin\\\":true,\\\"tableName\\\":\\\"reservation\\\",\\\"visibleRoles\\\":[\\\"admin\\\"]},{\\\"code\\\":\\\"carousel_admin\\\",\\\"dataScope\\\":\\\"ROLE\\\",\\\"name\\\":\\\"轮播图管理\\\",\\\"pageCode\\\":\\\"carousel_admin_page\\\",\\\"pageType\\\":\\\"list\\\",\\\"path\\\":\\\"/admin/carousels\\\",\\\"requiresLogin\\\":true,\\\"tableName\\\":\\\"carousel\\\",\\\"visibleRoles\\\":[\\\"admin\\\"]},{\\\"code\\\":\\\"announcement_admin\\\",\\\"dataScope\\\":\\\"ROLE\\\",\\\"name\\\":\\\"公告管理\\\",\\\"pageCode\\\":\\\"announcement_admin_page\\\",\\\"pageType\\\":\\\"list\\\",\\\"path\\\":\\\"/admin/announcements\\\",\\\"requiresLogin\\\":true,\\\"tableName\\\":\\\"announcement\\\",\\\"visibleRoles\\\":[\\\"admin\\\"]},{\\\"code\\\":\\\"news_admin\\\",\\\"dataScope\\\":\\\"ROLE\\\",\\\"name\\\":\\\"新闻管理\\\",\\\"pageCode\\\":\\\"news_admin_page\\\",\\\"pageType\\\":\\\"list\\\",\\\"path\\\":\\\"/admin/news\\\",\\\"requiresLogin\\\":true,\\\"tableName\\\":\\\"news\\\",\\\"visibleRoles\\\":[\\\"admin\\\"]}],\\\"frontendMenus\\\":[{\\\"code\\\":\\\"book_catalog\\\",\\\"dataScope\\\":\\\"PUBLIC\\\",\\\"name\\\":\\\"图书目录\\\",\\\"pageCode\\\":\\\"book_catalog_page\\\",\\\"pageType\\\":\\\"\\\",\\\"path\\\":\\\"/books\\\",\\\"requiresLogin\\\":false,\\\"tableName\\\":\\\"\\\",\\\"visibleRoles\\\":[]},{\\\"code\\\":\\\"reader_profile\\\",\\\"dataScope\\\":\\\"CURRENT_USER\\\",\\\"name\\\":\\\"个人资料\\\",\\\"pageCode\\\":\\\"reader_profile_page\\\",\\\"pageType\\\":\\\"\\\",\\\"path\\\":\\\"/reader/profile\\\",\\\"requiresLogin\\\":true,\\\"tableName\\\":\\\"\\\",\\\"visibleRoles\\\":[\\\"reader\\\"]},{\\\"code\\\":\\\"my_borrows\\\",\\\"dataScope\\\":\\\"CURRENT_USER\\\",\\\"name\\\":\\\"我的借阅\\\",\\\"pageCode\\\":\\\"my_borrows_page\\\",\\\"pageType\\\":\\\"\\\",\\\"path\\\":\\\"/reader/borrows\\\",\\\"requiresLogin\\\":true,\\\"tableName\\\":\\\"\\\",\\\"visibleRoles\\\":[\\\"reader\\\"]},{\\\"code\\\":\\\"my_reservations\\\",\\\"dataScope\\\":\\\"CURRENT_USER\\\",\\\"name\\\":\\\"我的预约\\\",\\\"pageCode\\\":\\\"my_reservations_page\\\",\\\"pageType\\\":\\\"\\\",\\\"path\\\":\\\"/reader/reservations\\\",\\\"requiresLogin\\\":true,\\\"tableName\\\":\\\"\\\",\\\"visibleRoles\\\":[\\\"reader\\\"]}],\\\"frontendPages\\\":[{\\\"code\\\":\\\"book_catalog_page\\\",\\\"menuCode\\\":\\\"book_catalog\\\",\\\"name\\\":\\\"图书目录\\\",\\\"pageType\\\":\\\"list\\\",\\\"parentPageCode\\\":\\\"\\\",\\\"path\\\":\\\"/books\\\",\\\"tableName\\\":\\\"book_info\\\"},{\\\"code\\\":\\\"reader_profile_page\\\",\\\"menuCode\\\":\\\"reader_profile\\\",\\\"name\\\":\\\"个人资料\\\",\\\"pageType\\\":\\\"form\\\",\\\"parentPageCode\\\":\\\"\\\",\\\"path\\\":\\\"/reader/profile\\\",\\\"tableName\\\":\\\"reader\\\"},{\\\"code\\\":\\\"my_borrows_page\\\",\\\"menuCode\\\":\\\"my_borrows\\\",\\\"name\\\":\\\"我的借阅\\\",\\\"pageType\\\":\\\"current_user_list\\\",\\\"parentPageCode\\\":\\\"\\\",\\\"path\\\":\\\"/reader/borrows\\\",\\\"tableName\\\":\\\"borrow_record\\\"},{\\\"code\\\":\\\"my_reservations_page\\\",\\\"menuCode\\\":\\\"my_reservations\\\",\\\"name\\\":\\\"我的预约\\\",\\\"pageType\\\":\\\"current_user_list\\\",\\\"parentPageCode\\\":\\\"\\\",\\\"path\\\":\\\"/reader/reservations\\\",\\\"tableName\\\":\\\"reservation\\\"}],\\\"roles\\\":[{\\\"code\\\":\\\"admin\\\",\\\"description\\\":\\\"系统管理员,管理图书、借阅、预约及内容维护\\\",\\\"name\\\":\\\"管理员\\\"},{\\\"code\\\":\\\"reader\\\",\\\"description\\\":\\\"普通用户,可浏览图书、借阅、预约\\\",\\\"name\\\":\\\"读者\\\"}]}\",\"flowConfigJson\":\"{\\\"actions\\\":[{\\\"actor\\\":\\\"admin\\\",\\\"audit\\\":{\\\"timeField\\\":\\\"approve_time\\\",\\\"userField\\\":\\\"approve_user_id\\\"},\\\"button\\\":{\\\"confirm\\\":\\\"确认审核通过?\\\",\\\"order\\\":10,\\\"pageCode\\\":\\\"borrow_admin_page\\\",\\\"scope\\\":\\\"admin\\\",\\\"slot\\\":\\\"list.rowActions\\\",\\\"type\\\":\\\"success\\\"},\\\"code\\\":\\\"approve\\\",\\\"effects\\\":[{\\\"amount\\\":\\\"1\\\",\\\"errorMessage\\\":\\\"图书库存不足\\\",\\\"field\\\":\\\"stock\\\",\\\"min\\\":\\\"0\\\",\\\"notFoundMessage\\\":\\\"图书不存在\\\",\\\"relationField\\\":\\\"book_id\\\",\\\"table\\\":\\\"book_info\\\",\\\"type\\\":\\\"decrease\\\",\\\"values\\\":{}}],\\\"from\\\":\\\"pending\\\",\\\"invalidStateMessage\\\":\\\"当前状态不能审核\\\",\\\"method\\\":\\\"POST\\\",\\\"name\\\":\\\"审核通过\\\",\\\"path\\\":\\\"/borrow-record/approve\\\",\\\"successMessage\\\":\\\"审核成功\\\",\\\"to\\\":\\\"borrowing\\\"},{\\\"actor\\\":\\\"admin\\\",\\\"audit\\\":{\\\"timeField\\\":\\\"reject_time\\\",\\\"userField\\\":\\\"reject_user_id\\\"},\\\"button\\\":{\\\"confirm\\\":\\\"确认拒绝?\\\",\\\"order\\\":20,\\\"pageCode\\\":\\\"borrow_admin_page\\\",\\\"scope\\\":\\\"admin\\\",\\\"slot\\\":\\\"list.rowActions\\\",\\\"type\\\":\\\"danger\\\"},\\\"code\\\":\\\"reject\\\",\\\"effects\\\":[],\\\"from\\\":\\\"pending\\\",\\\"invalidStateMessage\\\":\\\"当前状态不能拒绝\\\",\\\"method\\\":\\\"POST\\\",\\\"name\\\":\\\"审核拒绝\\\",\\\"path\\\":\\\"/borrow-record/reject\\\",\\\"successMessage\\\":\\\"已拒绝\\\",\\\"to\\\":\\\"rejected\\\"},{\\\"actor\\\":\\\"admin\\\",\\\"audit\\\":{\\\"timeField\\\":\\\"return_time\\\",\\\"userField\\\":\\\"return_user_id\\\"},\\\"button\\\":{\\\"confirm\\\":\\\"确认还书?\\\",\\\"order\\\":30,\\\"pageCode\\\":\\\"borrow_admin_page\\\",\\\"scope\\\":\\\"admin\\\",\\\"slot\\\":\\\"list.rowActions\\\",\\\"type\\\":\\\"primary\\\"},\\\"code\\\":\\\"return\\\",\\\"effects\\\":[{\\\"amount\\\":\\\"1\\\",\\\"field\\\":\\\"stock\\\",\\\"min\\\":\\\"0\\\",\\\"notFoundMessage\\\":\\\"图书不存在\\\",\\\"relationField\\\":\\\"book_id\\\",\\\"table\\\":\\\"book_info\\\",\\\"type\\\":\\\"increase\\\",\\\"values\\\":{}}],\\\"from\\\":\\\"borrowing\\\",\\\"invalidStateMessage\\\":\\\"当前状态不能还书\\\",\\\"method\\\":\\\"POST\\\",\\\"name\\\":\\\"确认还书\\\",\\\"path\\\":\\\"/borrow-record/return\\\",\\\"successMessage\\\":\\\"还书成功\\\",\\\"to\\\":\\\"returned\\\"}],\\\"code\\\":\\\"borrow_flow\\\",\\\"mainTable\\\":\\\"borrow_record\\\",\\\"metrics\\\":[{\\\"aggregate\\\":\\\"count\\\",\\\"code\\\":\\\"borrowing_count\\\",\\\"field\\\":\\\"id\\\",\\\"name\\\":\\\"借阅中数量\\\",\\\"status\\\":\\\"borrowing\\\",\\\"table\\\":\\\"borrow_record\\\",\\\"unit\\\":\\\"条\\\"},{\\\"aggregate\\\":\\\"count\\\",\\\"code\\\":\\\"total_borrowed\\\",\\\"field\\\":\\\"id\\\",\\\"name\\\":\\\"总借阅次数\\\",\\\"table\\\":\\\"borrow_record\\\",\\\"unit\\\":\\\"次\\\"},{\\\"aggregate\\\":\\\"count\\\",\\\"code\\\":\\\"reserved_count\\\",\\\"field\\\":\\\"id\\\",\\\"name\\\":\\\"预约中数量\\\",\\\"table\\\":\\\"reservation\\\",\\\"unit\\\":\\\"条\\\"}],\\\"name\\\":\\\"借阅流程\\\",\\\"notFoundMessage\\\":\\\"借阅记录不存在\\\",\\\"states\\\":[{\\\"code\\\":\\\"pending\\\",\\\"label\\\":\\\"待审核\\\"},{\\\"code\\\":\\\"borrowing\\\",\\\"label\\\":\\\"借阅中\\\"},{\\\"code\\\":\\\"returned\\\",\\\"label\\\":\\\"已归还\\\"},{\\\"code\\\":\\\"rejected\\\",\\\"label\\\":\\\"已拒绝\\\"}],\\\"statusField\\\":\\\"status\\\",\\\"version\\\":\\\"1.0\\\"}\",\"result\":{\"downloadReady\":false,\"projectId\":107,\"report\":{\"adminPageCount\":0,\"businessActionCount\":0,\"businessLoopComplete\":true,\"businessLoopWarnings\":[],\"frontendPageCount\":0,\"loopActions\":3,\"missingRequiredActions\":[],\"quantityRules\":0,\"recordRules\":0,\"stateTransitions\":0,\"tableCount\":8},\"stage\":\"DATABASE\",\"suggestedActions\":[]}},\"schemaVersion\":\"1.0\",\"stageCode\":\"DATABASE\"}', 'c2e1e48b1d334215cd749f207460054583c54aa26b8e422821959202583130ef', NULL, NULL, '2026-07-14 22:05:02');
INSERT INTO `factory_ai_task_checkpoint` VALUES (111, 111, 'GENERATE', 4, 1, '1.0', '{\"payload\":{\"downloadReady\":true,\"generationRunId\":102,\"projectId\":107,\"report\":{\"adminPageCount\":9,\"businessActionCount\":0,\"businessLoopComplete\":true,\"businessLoopWarnings\":[],\"frontendPageCount\":5,\"loopActions\":3,\"missingRequiredActions\":[],\"quantityRules\":0,\"recordRules\":0,\"stateTransitions\":0,\"tableCount\":8},\"specContentHash\":\"3c1f3fb774de1eff708fdd732d9e36c8bb602cfcf317962f18630a812dfe8d58\",\"specVersionId\":102,\"specVersionNo\":1,\"stage\":\"GENERATE\",\"suggestedActions\":[]},\"schemaVersion\":\"1.0\",\"stageCode\":\"GENERATE\"}', '44be7c38161a8fce793e682b56bfa634b998fe67342ffbd08dd8e92829740a18', 102, 102, '2026-07-14 22:05:06');
INSERT INTO `factory_ai_task_checkpoint` VALUES (112, 111, 'VERIFY_AND_PREVIEW', 5, 1, '1.0', '{\"payload\":{\"adminFrontendUrl\":\"http://127.0.0.1:35401\",\"backendUrl\":\"http://127.0.0.1:35354\",\"downloadReady\":true,\"errorMessage\":\"生成的后端进程已退出\",\"expiresAt\":\"2026-07-14 22:20:07\",\"failedStage\":\"VERIFY_AND_PREVIEW\",\"frontendUrl\":\"http://127.0.0.1:35355\",\"generationRunId\":102,\"previewStatus\":\"FAILED\",\"projectId\":107,\"report\":{\"adminPageCount\":9,\"businessActionCount\":0,\"businessLoopComplete\":true,\"businessLoopWarnings\":[],\"frontendPageCount\":5,\"loopActions\":3,\"missingRequiredActions\":[],\"quantityRules\":0,\"recordRules\":0,\"stateTransitions\":0,\"tableCount\":8},\"specContentHash\":\"3c1f3fb774de1eff708fdd732d9e36c8bb602cfcf317962f18630a812dfe8d58\",\"specVersionId\":102,\"specVersionNo\":1,\"stage\":\"VERIFY_AND_PREVIEW\",\"suggestedActions\":[\"源码预览已生成,可以先下载项目或进入高级调整后重试运行预览\"]},\"schemaVersion\":\"1.0\",\"stageCode\":\"VERIFY_AND_PREVIEW\"}', '8f21dfcb3bc9c67d9c7e92d8fe8a7b5667313b8f4e312b71cb44f48af916da9c', 102, 102, '2026-07-14 22:05:26');
INSERT INTO `factory_ai_task_checkpoint` VALUES (113, 112, 'DATABASE', 3, 1, '1.0', '{\"payload\":{\"appBlueprintJson\":\"{\\\"adminHomeDashboard\\\":{\\\"charts\\\":[{\\\"filters\\\":[],\\\"metrics\\\":[{\\\"aggregate\\\":\\\"count\\\",\\\"label\\\":\\\"近7天借阅趋势\\\"}],\\\"semantic\\\":\\\"order\\\",\\\"tableName\\\":\\\"borrow_record\\\",\\\"title\\\":\\\"近7天借阅趋势\\\",\\\"type\\\":\\\"line\\\"},{\\\"filters\\\":[],\\\"metrics\\\":[{\\\"aggregate\\\":\\\"count\\\",\\\"label\\\":\\\"图书分类分布\\\"}],\\\"semantic\\\":\\\"content\\\",\\\"tableName\\\":\\\"book_info\\\",\\\"title\\\":\\\"图书分类分布\\\",\\\"type\\\":\\\"pie\\\"}],\\\"description\\\":\\\"核心业务数据\\\",\\\"metrics\\\":[{\\\"aggregate\\\":\\\"COUNT\\\",\\\"filters\\\":[],\\\"semantic\\\":\\\"inventory\\\",\\\"tableName\\\":\\\"book_info\\\"},{\\\"aggregate\\\":\\\"COUNT\\\",\\\"filters\\\":[],\\\"semantic\\\":\\\"order\\\",\\\"tableName\\\":\\\"borrow_record\\\"},{\\\"aggregate\\\":\\\"COUNT\\\",\\\"filters\\\":[],\\\"semantic\\\":\\\"task\\\",\\\"tableName\\\":\\\"borrow_record\\\"},{\\\"aggregate\\\":\\\"COUNT\\\",\\\"filters\\\":[],\\\"semantic\\\":\\\"warning\\\",\\\"tableName\\\":\\\"reservation\\\"}],\\\"title\\\":\\\"运营总览\\\"},\\\"adminMenus\\\":[{\\\"code\\\":\\\"book_admin\\\",\\\"dataScope\\\":\\\"ROLE\\\",\\\"name\\\":\\\"图书管理\\\",\\\"pageCode\\\":\\\"book_admin_page\\\",\\\"pageType\\\":\\\"list\\\",\\\"path\\\":\\\"/admin/books\\\",\\\"requiresLogin\\\":true,\\\"tableName\\\":\\\"book_info\\\",\\\"visibleRoles\\\":[\\\"admin\\\"]},{\\\"code\\\":\\\"borrow_admin\\\",\\\"dataScope\\\":\\\"ROLE\\\",\\\"name\\\":\\\"借阅管理\\\",\\\"pageCode\\\":\\\"borrow_admin_page\\\",\\\"pageType\\\":\\\"list\\\",\\\"path\\\":\\\"/admin/borrows\\\",\\\"requiresLogin\\\":true,\\\"tableName\\\":\\\"borrow_record\\\",\\\"visibleRoles\\\":[\\\"admin\\\"]},{\\\"code\\\":\\\"reservation_admin\\\",\\\"dataScope\\\":\\\"ROLE\\\",\\\"name\\\":\\\"预约管理\\\",\\\"pageCode\\\":\\\"reservation_admin_page\\\",\\\"pageType\\\":\\\"list\\\",\\\"path\\\":\\\"/admin/reservations\\\",\\\"requiresLogin\\\":true,\\\"tableName\\\":\\\"reservation\\\",\\\"visibleRoles\\\":[\\\"admin\\\"]},{\\\"code\\\":\\\"announcement_admin\\\",\\\"dataScope\\\":\\\"ROLE\\\",\\\"name\\\":\\\"公告管理\\\",\\\"pageCode\\\":\\\"announcement_admin_page\\\",\\\"pageType\\\":\\\"list\\\",\\\"path\\\":\\\"/admin/announcements\\\",\\\"requiresLogin\\\":true,\\\"tableName\\\":\\\"announcement\\\",\\\"visibleRoles\\\":[\\\"admin\\\"]},{\\\"code\\\":\\\"news_admin\\\",\\\"dataScope\\\":\\\"ROLE\\\",\\\"name\\\":\\\"新闻管理\\\",\\\"pageCode\\\":\\\"news_admin_page\\\",\\\"pageType\\\":\\\"list\\\",\\\"path\\\":\\\"/admin/news\\\",\\\"requiresLogin\\\":true,\\\"tableName\\\":\\\"news\\\",\\\"visibleRoles\\\":[\\\"admin\\\"]},{\\\"code\\\":\\\"carousel_admin\\\",\\\"dataScope\\\":\\\"ROLE\\\",\\\"name\\\":\\\"轮播图管理\\\",\\\"pageCode\\\":\\\"carousel_admin_page\\\",\\\"pageType\\\":\\\"list\\\",\\\"path\\\":\\\"/admin/carousels\\\",\\\"requiresLogin\\\":true,\\\"tableName\\\":\\\"carousel\\\",\\\"visibleRoles\\\":[\\\"admin\\\"]},{\\\"code\\\":\\\"admin_profile\\\",\\\"dataScope\\\":\\\"ROLE\\\",\\\"name\\\":\\\"个人资料\\\",\\\"pageCode\\\":\\\"admin_profile_page\\\",\\\"pageType\\\":\\\"form\\\",\\\"path\\\":\\\"/admin/profile\\\",\\\"requiresLogin\\\":true,\\\"tableName\\\":\\\"admin\\\",\\\"visibleRoles\\\":[\\\"admin\\\"]}],\\\"frontendMenus\\\":[{\\\"code\\\":\\\"book_catalog\\\",\\\"dataScope\\\":\\\"PUBLIC\\\",\\\"name\\\":\\\"图书目录\\\",\\\"pageCode\\\":\\\"book_catalog_page\\\",\\\"pageType\\\":\\\"\\\",\\\"path\\\":\\\"/books\\\",\\\"requiresLogin\\\":false,\\\"tableName\\\":\\\"\\\",\\\"visibleRoles\\\":[]},{\\\"code\\\":\\\"announcements\\\",\\\"dataScope\\\":\\\"PUBLIC\\\",\\\"name\\\":\\\"公告\\\",\\\"pageCode\\\":\\\"announcement_list_page\\\",\\\"pageType\\\":\\\"\\\",\\\"path\\\":\\\"/announcements\\\",\\\"requiresLogin\\\":false,\\\"tableName\\\":\\\"\\\",\\\"visibleRoles\\\":[]},{\\\"code\\\":\\\"news\\\",\\\"dataScope\\\":\\\"PUBLIC\\\",\\\"name\\\":\\\"新闻\\\",\\\"pageCode\\\":\\\"news_list_page\\\",\\\"pageType\\\":\\\"\\\",\\\"path\\\":\\\"/news\\\",\\\"requiresLogin\\\":false,\\\"tableName\\\":\\\"\\\",\\\"visibleRoles\\\":[]},{\\\"code\\\":\\\"my_borrows\\\",\\\"dataScope\\\":\\\"CURRENT_USER\\\",\\\"name\\\":\\\"我的借阅\\\",\\\"pageCode\\\":\\\"my_borrows_page\\\",\\\"pageType\\\":\\\"\\\",\\\"path\\\":\\\"/my-borrows\\\",\\\"requiresLogin\\\":true,\\\"tableName\\\":\\\"\\\",\\\"visibleRoles\\\":[\\\"reader\\\"]},{\\\"code\\\":\\\"my_reservations\\\",\\\"dataScope\\\":\\\"CURRENT_USER\\\",\\\"name\\\":\\\"我的预约\\\",\\\"pageCode\\\":\\\"my_reservations_page\\\",\\\"pageType\\\":\\\"\\\",\\\"path\\\":\\\"/my-reservations\\\",\\\"requiresLogin\\\":true,\\\"tableName\\\":\\\"\\\",\\\"visibleRoles\\\":[\\\"reader\\\"]},{\\\"code\\\":\\\"reader_profile\\\",\\\"dataScope\\\":\\\"CURRENT_USER\\\",\\\"name\\\":\\\"个人中心\\\",\\\"pageCode\\\":\\\"reader_profile_page\\\",\\\"pageType\\\":\\\"\\\",\\\"path\\\":\\\"/reader/profile\\\",\\\"requiresLogin\\\":true,\\\"tableName\\\":\\\"\\\",\\\"visibleRoles\\\":[\\\"reader\\\"]}],\\\"frontendPages\\\":[{\\\"code\\\":\\\"book_catalog_page\\\",\\\"menuCode\\\":\\\"book_catalog\\\",\\\"name\\\":\\\"图书目录\\\",\\\"pageType\\\":\\\"list\\\",\\\"parentPageCode\\\":\\\"\\\",\\\"path\\\":\\\"/books\\\",\\\"tableName\\\":\\\"book_info\\\"},{\\\"code\\\":\\\"book_detail_page\\\",\\\"menuCode\\\":\\\"book_catalog\\\",\\\"name\\\":\\\"图书详情\\\",\\\"pageType\\\":\\\"detail\\\",\\\"parentPageCode\\\":\\\"\\\",\\\"path\\\":\\\"/books/:id\\\",\\\"tableName\\\":\\\"book_info\\\"},{\\\"code\\\":\\\"announcement_list_page\\\",\\\"menuCode\\\":\\\"announcements\\\",\\\"name\\\":\\\"公告列表\\\",\\\"pageType\\\":\\\"list\\\",\\\"parentPageCode\\\":\\\"\\\",\\\"path\\\":\\\"/announcements\\\",\\\"tableName\\\":\\\"announcement\\\"},{\\\"code\\\":\\\"news_list_page\\\",\\\"menuCode\\\":\\\"news\\\",\\\"name\\\":\\\"新闻列表\\\",\\\"pageType\\\":\\\"list\\\",\\\"parentPageCode\\\":\\\"\\\",\\\"path\\\":\\\"/news\\\",\\\"tableName\\\":\\\"news\\\"},{\\\"code\\\":\\\"my_borrows_page\\\",\\\"menuCode\\\":\\\"my_borrows\\\",\\\"name\\\":\\\"我的借阅\\\",\\\"pageType\\\":\\\"current_user_list\\\",\\\"parentPageCode\\\":\\\"\\\",\\\"path\\\":\\\"/my-borrows\\\",\\\"tableName\\\":\\\"borrow_record\\\"},{\\\"code\\\":\\\"my_reservations_page\\\",\\\"menuCode\\\":\\\"my_reservations\\\",\\\"name\\\":\\\"我的预约\\\",\\\"pageType\\\":\\\"current_user_list\\\",\\\"parentPageCode\\\":\\\"\\\",\\\"path\\\":\\\"/my-reservations\\\",\\\"tableName\\\":\\\"reservation\\\"},{\\\"code\\\":\\\"reader_profile_page\\\",\\\"menuCode\\\":\\\"reader_profile\\\",\\\"name\\\":\\\"个人资料\\\",\\\"pageType\\\":\\\"form\\\",\\\"parentPageCode\\\":\\\"\\\",\\\"path\\\":\\\"/reader/profile\\\",\\\"tableName\\\":\\\"reader\\\"}],\\\"roles\\\":[{\\\"code\\\":\\\"admin\\\",\\\"description\\\":\\\"系统管理员,管理图书、借阅、公告等\\\",\\\"name\\\":\\\"管理员\\\"},{\\\"code\\\":\\\"reader\\\",\\\"description\\\":\\\"普通用户,借书、还书、预约图书\\\",\\\"name\\\":\\\"读者\\\"}]}\",\"flowConfigJson\":\"{\\\"actions\\\":[{\\\"actor\\\":\\\"admin\\\",\\\"audit\\\":{\\\"timeField\\\":\\\"approve_time\\\",\\\"userField\\\":\\\"approve_user_id\\\"},\\\"button\\\":{\\\"confirm\\\":\\\"确认审核通过吗?\\\",\\\"order\\\":10,\\\"pageCode\\\":\\\"borrow_admin_page\\\",\\\"scope\\\":\\\"admin\\\",\\\"slot\\\":\\\"list.rowActions\\\",\\\"type\\\":\\\"primary\\\"},\\\"code\\\":\\\"approve_borrow\\\",\\\"effects\\\":[{\\\"amount\\\":\\\"1\\\",\\\"errorMessage\\\":\\\"图书库存不足\\\",\\\"field\\\":\\\"stock\\\",\\\"min\\\":\\\"0\\\",\\\"notFoundMessage\\\":\\\"图书不存在\\\",\\\"relationField\\\":\\\"book_id\\\",\\\"table\\\":\\\"book_info\\\",\\\"type\\\":\\\"decrease\\\",\\\"values\\\":{}}],\\\"from\\\":\\\"pending\\\",\\\"invalidStateMessage\\\":\\\"当前状态不能审核\\\",\\\"method\\\":\\\"POST\\\",\\\"name\\\":\\\"审核通过\\\",\\\"path\\\":\\\"/borrow-record/approve\\\",\\\"successMessage\\\":\\\"借书审核通过\\\",\\\"to\\\":\\\"borrowing\\\"},{\\\"actor\\\":\\\"admin\\\",\\\"audit\\\":{\\\"timeField\\\":\\\"approve_time\\\",\\\"userField\\\":\\\"approve_user_id\\\"},\\\"button\\\":{\\\"confirm\\\":\\\"确认拒绝吗?\\\",\\\"order\\\":20,\\\"pageCode\\\":\\\"borrow_admin_page\\\",\\\"scope\\\":\\\"admin\\\",\\\"slot\\\":\\\"list.rowActions\\\",\\\"type\\\":\\\"danger\\\"},\\\"code\\\":\\\"reject_borrow\\\",\\\"effects\\\":[],\\\"from\\\":\\\"pending\\\",\\\"invalidStateMessage\\\":\\\"当前状态不能拒绝\\\",\\\"method\\\":\\\"POST\\\",\\\"name\\\":\\\"拒绝借书\\\",\\\"path\\\":\\\"/borrow-record/reject\\\",\\\"successMessage\\\":\\\"已拒绝借书申请\\\",\\\"to\\\":\\\"rejected\\\"},{\\\"actor\\\":\\\"admin\\\",\\\"audit\\\":{\\\"timeField\\\":\\\"return_time\\\",\\\"userField\\\":\\\"return_user_id\\\"},\\\"button\\\":{\\\"confirm\\\":\\\"确认归还吗?\\\",\\\"order\\\":30,\\\"pageCode\\\":\\\"borrow_admin_page\\\",\\\"scope\\\":\\\"admin\\\",\\\"slot\\\":\\\"list.rowActions\\\",\\\"type\\\":\\\"success\\\"},\\\"code\\\":\\\"return_book\\\",\\\"effects\\\":[{\\\"amount\\\":\\\"1\\\",\\\"errorMessage\\\":\\\"归还失败\\\",\\\"field\\\":\\\"stock\\\",\\\"min\\\":\\\"0\\\",\\\"notFoundMessage\\\":\\\"图书不存在\\\",\\\"relationField\\\":\\\"book_id\\\",\\\"table\\\":\\\"book_info\\\",\\\"type\\\":\\\"increase\\\",\\\"values\\\":{}}],\\\"from\\\":\\\"borrowing\\\",\\\"invalidStateMessage\\\":\\\"当前状态不能归还\\\",\\\"method\\\":\\\"POST\\\",\\\"name\\\":\\\"归还图书\\\",\\\"path\\\":\\\"/borrow-record/return\\\",\\\"successMessage\\\":\\\"归还成功\\\",\\\"to\\\":\\\"returned\\\"}],\\\"code\\\":\\\"borrow_record_flow\\\",\\\"mainTable\\\":\\\"borrow_record\\\",\\\"metrics\\\":[{\\\"aggregate\\\":\\\"count\\\",\\\"code\\\":\\\"borrowing_count\\\",\\\"field\\\":\\\"id\\\",\\\"name\\\":\\\"借阅中数量\\\",\\\"status\\\":\\\"borrowing\\\",\\\"table\\\":\\\"borrow_record\\\",\\\"unit\\\":\\\"条\\\"},{\\\"aggregate\\\":\\\"count\\\",\\\"code\\\":\\\"pending_count\\\",\\\"field\\\":\\\"id\\\",\\\"name\\\":\\\"待审核数量\\\",\\\"status\\\":\\\"pending\\\",\\\"table\\\":\\\"borrow_record\\\",\\\"unit\\\":\\\"条\\\"}],\\\"name\\\":\\\"借阅管理流程\\\",\\\"notFoundMessage\\\":\\\"借阅记录不存在\\\",\\\"states\\\":[{\\\"code\\\":\\\"pending\\\",\\\"label\\\":\\\"待审核\\\"},{\\\"code\\\":\\\"borrowing\\\",\\\"label\\\":\\\"借阅中\\\"},{\\\"code\\\":\\\"returned\\\",\\\"label\\\":\\\"已归还\\\"},{\\\"code\\\":\\\"rejected\\\",\\\"label\\\":\\\"已拒绝\\\"}],\\\"statusField\\\":\\\"status\\\",\\\"version\\\":\\\"1.0\\\"}\",\"result\":{\"downloadReady\":false,\"projectId\":108,\"report\":{\"adminPageCount\":0,\"businessActionCount\":0,\"businessLoopComplete\":true,\"businessLoopWarnings\":[],\"frontendPageCount\":0,\"loopActions\":3,\"missingRequiredActions\":[],\"quantityRules\":0,\"recordRules\":0,\"stateTransitions\":0,\"tableCount\":8},\"stage\":\"DATABASE\",\"suggestedActions\":[]}},\"schemaVersion\":\"1.0\",\"stageCode\":\"DATABASE\"}', '357955c25515235ed10dc2a971b138fce88605a6ec3e554c33fb6bcff3a92ada', NULL, NULL, '2026-07-14 22:25:55');
INSERT INTO `factory_ai_task_checkpoint` VALUES (114, 112, 'GENERATE', 4, 1, '1.0', '{\"payload\":{\"downloadReady\":true,\"generationRunId\":103,\"projectId\":108,\"report\":{\"adminPageCount\":10,\"businessActionCount\":0,\"businessLoopComplete\":true,\"businessLoopWarnings\":[],\"frontendPageCount\":8,\"loopActions\":3,\"missingRequiredActions\":[],\"quantityRules\":0,\"recordRules\":0,\"stateTransitions\":0,\"tableCount\":8},\"specContentHash\":\"be45ca9b78046c0b2590f16cc26cd3def8054e98fc5ba34e32575924fe6f940b\",\"specVersionId\":103,\"specVersionNo\":1,\"stage\":\"GENERATE\",\"suggestedActions\":[]},\"schemaVersion\":\"1.0\",\"stageCode\":\"GENERATE\"}', 'a5e84bde2c050914985c85b9862f7b270332bb85205ef47b97a750e26fd0fe78', 103, 103, '2026-07-14 22:26:04');
INSERT INTO `factory_ai_task_checkpoint` VALUES (115, 112, 'VERIFY_AND_PREVIEW', 5, 1, '1.0', '{\"payload\":{\"adminFrontendUrl\":\"http://127.0.0.1:47806\",\"backendUrl\":\"http://127.0.0.1:47776\",\"downloadReady\":true,\"errorMessage\":\"运行预览启动超时\",\"expiresAt\":\"2026-07-14 22:41:04\",\"failedStage\":\"VERIFY_AND_PREVIEW\",\"frontendUrl\":\"http://127.0.0.1:47777\",\"generationRunId\":103,\"previewStatus\":\"FAILED\",\"projectId\":108,\"report\":{\"adminPageCount\":10,\"businessActionCount\":0,\"businessLoopComplete\":true,\"businessLoopWarnings\":[],\"frontendPageCount\":8,\"loopActions\":3,\"missingRequiredActions\":[],\"quantityRules\":0,\"recordRules\":0,\"stateTransitions\":0,\"tableCount\":8},\"specContentHash\":\"be45ca9b78046c0b2590f16cc26cd3def8054e98fc5ba34e32575924fe6f940b\",\"specVersionId\":103,\"specVersionNo\":1,\"stage\":\"VERIFY_AND_PREVIEW\",\"suggestedActions\":[\"源码预览已生成,可以先下载项目或进入高级调整后重试运行预览\"]},\"schemaVersion\":\"1.0\",\"stageCode\":\"VERIFY_AND_PREVIEW\"}', '3a49675532da790ed3d1898f094d8386384ce6b3b6e38f72fff0022b58f1daf1', 103, 103, '2026-07-14 22:28:15');
INSERT INTO `factory_ai_task_checkpoint` VALUES (116, 113, 'DATABASE', 3, 1, '1.0', '{\"payload\":{\"appBlueprintJson\":\"{\\\"adminHomeDashboard\\\":{\\\"charts\\\":[{\\\"filters\\\":[],\\\"metrics\\\":[{\\\"aggregate\\\":\\\"count\\\",\\\"label\\\":\\\"借阅趋势\\\"}],\\\"title\\\":\\\"借阅趋势\\\",\\\"type\\\":\\\"line\\\"},{\\\"filters\\\":[],\\\"metrics\\\":[{\\\"aggregate\\\":\\\"count\\\",\\\"label\\\":\\\"图书分类分布\\\"}],\\\"title\\\":\\\"图书分类分布\\\",\\\"type\\\":\\\"pie\\\"}],\\\"description\\\":\\\"核心业务数据\\\",\\\"metrics\\\":[{\\\"aggregate\\\":\\\"count\\\",\\\"filters\\\":[],\\\"semantic\\\":\\\"content\\\"},{\\\"aggregate\\\":\\\"count\\\",\\\"filters\\\":[],\\\"semantic\\\":\\\"order\\\"},{\\\"aggregate\\\":\\\"count\\\",\\\"filters\\\":[],\\\"semantic\\\":\\\"task\\\"},{\\\"aggregate\\\":\\\"count\\\",\\\"filters\\\":[],\\\"semantic\\\":\\\"user\\\"}],\\\"title\\\":\\\"运营总览\\\"},\\\"adminMenus\\\":[{\\\"code\\\":\\\"book_admin\\\",\\\"dataScope\\\":\\\"ROLE\\\",\\\"name\\\":\\\"图书管理\\\",\\\"pageCode\\\":\\\"book_admin_page\\\",\\\"pageType\\\":\\\"list\\\",\\\"path\\\":\\\"/admin/books\\\",\\\"requiresLogin\\\":true,\\\"tableName\\\":\\\"book_info\\\",\\\"visibleRoles\\\":[\\\"admin\\\"]},{\\\"code\\\":\\\"borrow_admin\\\",\\\"dataScope\\\":\\\"ROLE\\\",\\\"name\\\":\\\"借阅管理\\\",\\\"pageCode\\\":\\\"borrow_admin_page\\\",\\\"pageType\\\":\\\"list\\\",\\\"path\\\":\\\"/admin/borrows\\\",\\\"requiresLogin\\\":true,\\\"tableName\\\":\\\"borrow_record\\\",\\\"visibleRoles\\\":[\\\"admin\\\"]},{\\\"code\\\":\\\"reservation_admin\\\",\\\"dataScope\\\":\\\"ROLE\\\",\\\"name\\\":\\\"预约管理\\\",\\\"pageCode\\\":\\\"reservation_admin_page\\\",\\\"pageType\\\":\\\"list\\\",\\\"path\\\":\\\"/admin/reservations\\\",\\\"requiresLogin\\\":true,\\\"tableName\\\":\\\"reservation\\\",\\\"visibleRoles\\\":[\\\"admin\\\"]},{\\\"code\\\":\\\"carousel_admin\\\",\\\"dataScope\\\":\\\"ROLE\\\",\\\"name\\\":\\\"轮播图管理\\\",\\\"pageCode\\\":\\\"carousel_admin_page\\\",\\\"pageType\\\":\\\"list\\\",\\\"path\\\":\\\"/admin/carousels\\\",\\\"requiresLogin\\\":true,\\\"tableName\\\":\\\"carousel\\\",\\\"visibleRoles\\\":[\\\"admin\\\"]},{\\\"code\\\":\\\"announcement_admin\\\",\\\"dataScope\\\":\\\"ROLE\\\",\\\"name\\\":\\\"公告管理\\\",\\\"pageCode\\\":\\\"announcement_admin_page\\\",\\\"pageType\\\":\\\"list\\\",\\\"path\\\":\\\"/admin/announcements\\\",\\\"requiresLogin\\\":true,\\\"tableName\\\":\\\"announcement\\\",\\\"visibleRoles\\\":[\\\"admin\\\"]},{\\\"code\\\":\\\"news_admin\\\",\\\"dataScope\\\":\\\"ROLE\\\",\\\"name\\\":\\\"新闻管理\\\",\\\"pageCode\\\":\\\"news_admin_page\\\",\\\"pageType\\\":\\\"list\\\",\\\"path\\\":\\\"/admin/news\\\",\\\"requiresLogin\\\":true,\\\"tableName\\\":\\\"news\\\",\\\"visibleRoles\\\":[\\\"admin\\\"]},{\\\"code\\\":\\\"user_admin\\\",\\\"dataScope\\\":\\\"ROLE\\\",\\\"name\\\":\\\"用户管理\\\",\\\"pageCode\\\":\\\"user_admin_page\\\",\\\"pageType\\\":\\\"list\\\",\\\"path\\\":\\\"/admin/users\\\",\\\"requiresLogin\\\":true,\\\"tableName\\\":\\\"user\\\",\\\"visibleRoles\\\":[\\\"admin\\\"]},{\\\"code\\\":\\\"admin_profile\\\",\\\"dataScope\\\":\\\"CURRENT_USER\\\",\\\"name\\\":\\\"管理员资料\\\",\\\"pageCode\\\":\\\"admin_profile_page\\\",\\\"pageType\\\":\\\"form\\\",\\\"path\\\":\\\"/admin/profile\\\",\\\"requiresLogin\\\":true,\\\"tableName\\\":\\\"admin\\\",\\\"visibleRoles\\\":[\\\"admin\\\"]}],\\\"frontendMenus\\\":[{\\\"code\\\":\\\"book_catalog\\\",\\\"dataScope\\\":\\\"PUBLIC\\\",\\\"name\\\":\\\"图书目录\\\",\\\"pageCode\\\":\\\"book_catalog_page\\\",\\\"pageType\\\":\\\"\\\",\\\"path\\\":\\\"/books\\\",\\\"requiresLogin\\\":false,\\\"tableName\\\":\\\"\\\",\\\"visibleRoles\\\":[]},{\\\"code\\\":\\\"borrow_history\\\",\\\"dataScope\\\":\\\"CURRENT_USER\\\",\\\"name\\\":\\\"借阅记录\\\",\\\"pageCode\\\":\\\"borrow_history_page\\\",\\\"pageType\\\":\\\"\\\",\\\"path\\\":\\\"/borrow-history\\\",\\\"requiresLogin\\\":true,\\\"tableName\\\":\\\"\\\",\\\"visibleRoles\\\":[\\\"user\\\"]},{\\\"code\\\":\\\"reservation_history\\\",\\\"dataScope\\\":\\\"CURRENT_USER\\\",\\\"name\\\":\\\"预约记录\\\",\\\"pageCode\\\":\\\"reservation_history_page\\\",\\\"pageType\\\":\\\"\\\",\\\"path\\\":\\\"/reservation-history\\\",\\\"requiresLogin\\\":true,\\\"tableName\\\":\\\"\\\",\\\"visibleRoles\\\":[\\\"user\\\"]},{\\\"code\\\":\\\"user_profile\\\",\\\"dataScope\\\":\\\"CURRENT_USER\\\",\\\"name\\\":\\\"个人资料\\\",\\\"pageCode\\\":\\\"user_profile_page\\\",\\\"pageType\\\":\\\"\\\",\\\"path\\\":\\\"/profile\\\",\\\"requiresLogin\\\":true,\\\"tableName\\\":\\\"\\\",\\\"visibleRoles\\\":[\\\"user\\\"]}],\\\"frontendPages\\\":[{\\\"code\\\":\\\"book_catalog_page\\\",\\\"menuCode\\\":\\\"book_catalog\\\",\\\"name\\\":\\\"图书目录\\\",\\\"pageType\\\":\\\"list\\\",\\\"parentPageCode\\\":\\\"\\\",\\\"path\\\":\\\"/books\\\",\\\"tableName\\\":\\\"book_info\\\"},{\\\"code\\\":\\\"borrow_history_page\\\",\\\"menuCode\\\":\\\"borrow_history\\\",\\\"name\\\":\\\"借阅记录\\\",\\\"pageType\\\":\\\"current_user_list\\\",\\\"parentPageCode\\\":\\\"\\\",\\\"path\\\":\\\"/borrow-history\\\",\\\"tableName\\\":\\\"borrow_record\\\"},{\\\"code\\\":\\\"reservation_history_page\\\",\\\"menuCode\\\":\\\"reservation_history\\\",\\\"name\\\":\\\"预约记录\\\",\\\"pageType\\\":\\\"current_user_list\\\",\\\"parentPageCode\\\":\\\"\\\",\\\"path\\\":\\\"/reservation-history\\\",\\\"tableName\\\":\\\"reservation\\\"},{\\\"code\\\":\\\"user_profile_page\\\",\\\"menuCode\\\":\\\"user_profile\\\",\\\"name\\\":\\\"个人资料\\\",\\\"pageType\\\":\\\"form\\\",\\\"parentPageCode\\\":\\\"\\\",\\\"path\\\":\\\"/profile\\\",\\\"tableName\\\":\\\"user\\\"}],\\\"roles\\\":[{\\\"code\\\":\\\"admin\\\",\\\"description\\\":\\\"系统管理员,管理所有业务数据\\\",\\\"name\\\":\\\"管理员\\\"},{\\\"code\\\":\\\"user\\\",\\\"description\\\":\\\"普通读者,可借书、还书、预约\\\",\\\"name\\\":\\\"用户\\\"}]}\",\"flowConfigJson\":\"{\\\"actions\\\":[{\\\"actor\\\":\\\"admin\\\",\\\"audit\\\":{\\\"timeField\\\":\\\"approve_time\\\",\\\"userField\\\":\\\"approve_user_id\\\"},\\\"button\\\":{\\\"confirm\\\":\\\"确认审核通过并借出图书吗?\\\",\\\"order\\\":10,\\\"pageCode\\\":\\\"borrow_admin_page\\\",\\\"scope\\\":\\\"admin\\\",\\\"slot\\\":\\\"list.rowActions\\\",\\\"type\\\":\\\"success\\\"},\\\"code\\\":\\\"approve\\\",\\\"effects\\\":[{\\\"amount\\\":\\\"1\\\",\\\"errorMessage\\\":\\\"图书库存不足\\\",\\\"field\\\":\\\"stock\\\",\\\"min\\\":\\\"0\\\",\\\"notFoundMessage\\\":\\\"图书不存在\\\",\\\"relationField\\\":\\\"book_id\\\",\\\"table\\\":\\\"book_info\\\",\\\"type\\\":\\\"decrease\\\",\\\"values\\\":{}}],\\\"from\\\":\\\"pending\\\",\\\"invalidStateMessage\\\":\\\"当前状态不能审核\\\",\\\"method\\\":\\\"POST\\\",\\\"name\\\":\\\"审核通过\\\",\\\"path\\\":\\\"/borrow-record/approve\\\",\\\"requestFields\\\":[],\\\"successMessage\\\":\\\"借阅审核通过\\\",\\\"to\\\":\\\"borrowing\\\"},{\\\"actor\\\":\\\"admin\\\",\\\"audit\\\":{\\\"timeField\\\":\\\"reject_time\\\",\\\"userField\\\":\\\"reject_user_id\\\"},\\\"button\\\":{\\\"confirm\\\":\\\"确认拒绝该借阅申请吗?\\\",\\\"order\\\":20,\\\"pageCode\\\":\\\"borrow_admin_page\\\",\\\"scope\\\":\\\"admin\\\",\\\"slot\\\":\\\"list.rowActions\\\",\\\"type\\\":\\\"danger\\\"},\\\"code\\\":\\\"reject\\\",\\\"effects\\\":[],\\\"from\\\":\\\"pending\\\",\\\"invalidStateMessage\\\":\\\"当前状态不能拒绝\\\",\\\"method\\\":\\\"POST\\\",\\\"name\\\":\\\"审核拒绝\\\",\\\"path\\\":\\\"/borrow-record/reject\\\",\\\"requestFields\\\":[],\\\"successMessage\\\":\\\"借阅申请已拒绝\\\",\\\"to\\\":\\\"rejected\\\"},{\\\"actor\\\":\\\"user\\\",\\\"audit\\\":{},\\\"button\\\":{\\\"confirm\\\":\\\"确认还书吗?\\\",\\\"order\\\":10,\\\"pageCode\\\":\\\"borrow_history_page\\\",\\\"scope\\\":\\\"user\\\",\\\"slot\\\":\\\"list.rowActions\\\",\\\"type\\\":\\\"primary\\\"},\\\"code\\\":\\\"return_book\\\",\\\"effects\\\":[{\\\"amount\\\":\\\"1\\\",\\\"errorMessage\\\":\\\"库存增加失败\\\",\\\"field\\\":\\\"stock\\\",\\\"min\\\":\\\"0\\\",\\\"notFoundMessage\\\":\\\"图书不存在\\\",\\\"relationField\\\":\\\"book_id\\\",\\\"table\\\":\\\"book_info\\\",\\\"type\\\":\\\"increase\\\",\\\"values\\\":{}},{\\\"amount\\\":\\\"1\\\",\\\"min\\\":\\\"0\\\",\\\"relationField\\\":\\\"id\\\",\\\"table\\\":\\\"borrow_record\\\",\\\"type\\\":\\\"update_related\\\",\\\"values\\\":{\\\"return_user_id\\\":\\\"currentUserId\\\",\\\"return_time\\\":\\\"now\\\"}}],\\\"from\\\":\\\"borrowing\\\",\\\"invalidStateMessage\\\":\\\"当前状态不能还书\\\",\\\"method\\\":\\\"POST\\\",\\\"name\\\":\\\"还书\\\",\\\"path\\\":\\\"/borrow-record/return\\\",\\\"requestFields\\\":[],\\\"successMessage\\\":\\\"还书成功\\\",\\\"to\\\":\\\"returned\\\"},{\\\"actor\\\":\\\"user\\\",\\\"audit\\\":{},\\\"button\\\":{\\\"confirm\\\":\\\"确认取消预约吗?\\\",\\\"order\\\":10,\\\"pageCode\\\":\\\"reservation_history_page\\\",\\\"scope\\\":\\\"user\\\",\\\"slot\\\":\\\"list.rowActions\\\",\\\"type\\\":\\\"default\\\"},\\\"code\\\":\\\"cancel_reservation\\\",\\\"effects\\\":[{\\\"amount\\\":\\\"1\\\",\\\"min\\\":\\\"0\\\",\\\"relationField\\\":\\\"id\\\",\\\"table\\\":\\\"reservation\\\",\\\"type\\\":\\\"update_related\\\",\\\"values\\\":{\\\"cancel_time\\\":\\\"now\\\",\\\"cancel_user_id\\\":\\\"currentUserId\\\"}}],\\\"from\\\":\\\"reserved\\\",\\\"invalidStateMessage\\\":\\\"预约已处理不能取消\\\",\\\"method\\\":\\\"POST\\\",\\\"name\\\":\\\"取消预约\\\",\\\"path\\\":\\\"/reservation/cancel\\\",\\\"requestFields\\\":[],\\\"successMessage\\\":\\\"预约已取消\\\",\\\"to\\\":\\\"cancelled\\\"},{\\\"actor\\\":\\\"admin\\\",\\\"audit\\\":{\\\"timeField\\\":\\\"confirm_time\\\",\\\"userField\\\":\\\"confirm_user_id\\\"},\\\"button\\\":{\\\"confirm\\\":\\\"确认将预约转为借出?\\\",\\\"order\\\":10,\\\"pageCode\\\":\\\"reservation_admin_page\\\",\\\"scope\\\":\\\"admin\\\",\\\"slot\\\":\\\"list.rowActions\\\",\\\"type\\\":\\\"primary\\\"},\\\"code\\\":\\\"confirm_reservation\\\",\\\"effects\\\":[{\\\"amount\\\":\\\"1\\\",\\\"errorMessage\\\":\\\"图书库存不足\\\",\\\"field\\\":\\\"stock\\\",\\\"min\\\":\\\"0\\\",\\\"notFoundMessage\\\":\\\"图书不存在\\\",\\\"relationField\\\":\\\"book_id\\\",\\\"table\\\":\\\"book_info\\\",\\\"type\\\":\\\"decrease\\\",\\\"values\\\":{}}],\\\"from\\\":\\\"reserved\\\",\\\"invalidStateMessage\\\":\\\"预约已取消或已借出\\\",\\\"method\\\":\\\"POST\\\",\\\"name\\\":\\\"确认预约借出\\\",\\\"path\\\":\\\"/reservation/confirm\\\",\\\"requestFields\\\":[],\\\"successMessage\\\":\\\"预约已确认,图书已借出\\\",\\\"to\\\":\\\"borrowing\\\"},{\\\"actor\\\":\\\"admin\\\",\\\"audit\\\":{\\\"timeField\\\":\\\"reject_time\\\",\\\"userField\\\":\\\"reject_user_id\\\"},\\\"button\\\":{\\\"confirm\\\":\\\"确认拒绝该预约吗?\\\",\\\"order\\\":20,\\\"pageCode\\\":\\\"reservation_admin_page\\\",\\\"scope\\\":\\\"admin\\\",\\\"slot\\\":\\\"list.rowActions\\\",\\\"type\\\":\\\"danger\\\"},\\\"code\\\":\\\"reject_reservation\\\",\\\"effects\\\":[],\\\"from\\\":\\\"reserved\\\",\\\"invalidStateMessage\\\":\\\"预约已取消或已借出\\\",\\\"method\\\":\\\"POST\\\",\\\"name\\\":\\\"拒绝预约\\\",\\\"path\\\":\\\"/reservation/reject\\\",\\\"requestFields\\\":[],\\\"successMessage\\\":\\\"预约已被拒绝\\\",\\\"to\\\":\\\"cancelled\\\"}],\\\"code\\\":\\\"borrow_and_reservation\\\",\\\"mainTable\\\":\\\"borrow_record\\\",\\\"metrics\\\":[{\\\"aggregate\\\":\\\"count\\\",\\\"code\\\":\\\"borrowing_count\\\",\\\"field\\\":\\\"id\\\",\\\"name\\\":\\\"借阅中数量\\\",\\\"status\\\":\\\"borrowing\\\",\\\"table\\\":\\\"borrow_record\\\",\\\"unit\\\":\\\"条\\\"},{\\\"aggregate\\\":\\\"count\\\",\\\"code\\\":\\\"pending_count\\\",\\\"field\\\":\\\"id\\\",\\\"name\\\":\\\"待审核数量\\\",\\\"status\\\":\\\"pending\\\",\\\"table\\\":\\\"borrow_record\\\",\\\"unit\\\":\\\"条\\\"},{\\\"aggregate\\\":\\\"count\\\",\\\"code\\\":\\\"returned_count\\\",\\\"field\\\":\\\"id\\\",\\\"name\\\":\\\"已归还数量\\\",\\\"status\\\":\\\"returned\\\",\\\"table\\\":\\\"borrow_record\\\",\\\"unit\\\":\\\"条\\\"},{\\\"aggregate\\\":\\\"count\\\",\\\"code\\\":\\\"reserved_count\\\",\\\"field\\\":\\\"id\\\",\\\"name\\\":\\\"预约数量\\\",\\\"status\\\":\\\"reserved\\\",\\\"table\\\":\\\"borrow_record\\\",\\\"unit\\\":\\\"条\\\"}],\\\"name\\\":\\\"借阅与预约管理\\\",\\\"notFoundMessage\\\":\\\"借阅记录不存在\\\",\\\"states\\\":[{\\\"code\\\":\\\"pending\\\",\\\"label\\\":\\\"待审核\\\"},{\\\"code\\\":\\\"borrowing\\\",\\\"label\\\":\\\"借阅中\\\"},{\\\"code\\\":\\\"returned\\\",\\\"label\\\":\\\"已归还\\\"},{\\\"code\\\":\\\"rejected\\\",\\\"label\\\":\\\"已拒绝\\\"},{\\\"code\\\":\\\"reserved\\\",\\\"label\\\":\\\"已预约\\\"},{\\\"code\\\":\\\"cancelled\\\",\\\"label\\\":\\\"已取消\\\"}],\\\"statusField\\\":\\\"status\\\",\\\"version\\\":\\\"1.0\\\"}\",\"result\":{\"downloadReady\":false,\"projectId\":109,\"report\":{\"adminPageCount\":0,\"businessActionCount\":0,\"businessLoopComplete\":true,\"businessLoopWarnings\":[],\"frontendPageCount\":0,\"loopActions\":6,\"missingRequiredActions\":[],\"quantityRules\":0,\"recordRules\":0,\"stateTransitions\":0,\"tableCount\":8},\"stage\":\"DATABASE\",\"suggestedActions\":[]}},\"schemaVersion\":\"1.0\",\"stageCode\":\"DATABASE\"}', 'd0c8c1ed8eaf724d1edaab7327e51fd58c901097447fff71819d1f5b92a37644', NULL, NULL, '2026-07-15 08:54:21');
INSERT INTO `factory_ai_task_checkpoint` VALUES (117, 114, 'DATABASE', 3, 1, '1.0', '{\"payload\":{\"appBlueprintJson\":\"{\\\"adminHomeDashboard\\\":{\\\"charts\\\":[{\\\"dimension\\\":{\\\"field\\\":\\\"date\\\"},\\\"filters\\\":[],\\\"metrics\\\":[{\\\"aggregate\\\":\\\"count\\\",\\\"label\\\":\\\"借阅趋势\\\"}],\\\"tableName\\\":\\\"borrowing\\\",\\\"title\\\":\\\"借阅趋势\\\",\\\"type\\\":\\\"line\\\"},{\\\"dimension\\\":{\\\"field\\\":\\\"category\\\"},\\\"filters\\\":[],\\\"metrics\\\":[{\\\"aggregate\\\":\\\"count\\\",\\\"label\\\":\\\"图书分类分布\\\"}],\\\"tableName\\\":\\\"book_info\\\",\\\"title\\\":\\\"图书分类分布\\\",\\\"type\\\":\\\"pie\\\"}],\\\"description\\\":\\\"核心业务数据\\\",\\\"metrics\\\":[{\\\"aggregate\\\":\\\"count\\\",\\\"field\\\":\\\"count\\\",\\\"filters\\\":[],\\\"semantic\\\":\\\"inventory\\\",\\\"tableName\\\":\\\"book_info\\\"},{\\\"aggregate\\\":\\\"count\\\",\\\"field\\\":\\\"count\\\",\\\"filters\\\":[],\\\"semantic\\\":\\\"order\\\",\\\"tableName\\\":\\\"borrowing\\\"},{\\\"aggregate\\\":\\\"count\\\",\\\"field\\\":\\\"count\\\",\\\"filters\\\":[],\\\"semantic\\\":\\\"task\\\",\\\"tableName\\\":\\\"reservation\\\"},{\\\"aggregate\\\":\\\"count\\\",\\\"field\\\":\\\"count\\\",\\\"filters\\\":[],\\\"semantic\\\":\\\"user\\\",\\\"tableName\\\":\\\"reader\\\"}],\\\"title\\\":\\\"运营总览\\\"},\\\"adminMenus\\\":[{\\\"code\\\":\\\"book_admin\\\",\\\"dataScope\\\":\\\"ROLE\\\",\\\"name\\\":\\\"图书管理\\\",\\\"pageCode\\\":\\\"book_admin_page\\\",\\\"pageType\\\":\\\"list\\\",\\\"path\\\":\\\"/admin/books\\\",\\\"requiresLogin\\\":true,\\\"tableName\\\":\\\"book_info\\\",\\\"visibleRoles\\\":[\\\"admin\\\"]},{\\\"code\\\":\\\"borrowing_admin\\\",\\\"dataScope\\\":\\\"ROLE\\\",\\\"name\\\":\\\"借阅管理\\\",\\\"pageCode\\\":\\\"borrowing_admin_page\\\",\\\"pageType\\\":\\\"list\\\",\\\"path\\\":\\\"/admin/borrowings\\\",\\\"requiresLogin\\\":true,\\\"tableName\\\":\\\"borrowing\\\",\\\"visibleRoles\\\":[\\\"admin\\\"]},{\\\"code\\\":\\\"reservation_admin\\\",\\\"dataScope\\\":\\\"ROLE\\\",\\\"name\\\":\\\"预约管理\\\",\\\"pageCode\\\":\\\"reservation_admin_page\\\",\\\"pageType\\\":\\\"list\\\",\\\"path\\\":\\\"/admin/reservations\\\",\\\"requiresLogin\\\":true,\\\"tableName\\\":\\\"reservation\\\",\\\"visibleRoles\\\":[\\\"admin\\\"]},{\\\"code\\\":\\\"carousel_admin\\\",\\\"dataScope\\\":\\\"ROLE\\\",\\\"name\\\":\\\"轮播图管理\\\",\\\"pageCode\\\":\\\"carousel_admin_page\\\",\\\"pageType\\\":\\\"list\\\",\\\"path\\\":\\\"/admin/carousels\\\",\\\"requiresLogin\\\":true,\\\"tableName\\\":\\\"carousel\\\",\\\"visibleRoles\\\":[\\\"admin\\\"]},{\\\"code\\\":\\\"announcement_admin\\\",\\\"dataScope\\\":\\\"ROLE\\\",\\\"name\\\":\\\"公告管理\\\",\\\"pageCode\\\":\\\"announcement_admin_page\\\",\\\"pageType\\\":\\\"list\\\",\\\"path\\\":\\\"/admin/announcements\\\",\\\"requiresLogin\\\":true,\\\"tableName\\\":\\\"announcement\\\",\\\"visibleRoles\\\":[\\\"admin\\\"]},{\\\"code\\\":\\\"news_admin\\\",\\\"dataScope\\\":\\\"ROLE\\\",\\\"name\\\":\\\"新闻管理\\\",\\\"pageCode\\\":\\\"news_admin_page\\\",\\\"pageType\\\":\\\"list\\\",\\\"path\\\":\\\"/admin/news\\\",\\\"requiresLogin\\\":true,\\\"tableName\\\":\\\"news\\\",\\\"visibleRoles\\\":[\\\"admin\\\"]},{\\\"code\\\":\\\"reader_admin\\\",\\\"dataScope\\\":\\\"ROLE\\\",\\\"name\\\":\\\"读者管理\\\",\\\"pageCode\\\":\\\"reader_admin_page\\\",\\\"pageType\\\":\\\"list\\\",\\\"path\\\":\\\"/admin/readers\\\",\\\"requiresLogin\\\":true,\\\"tableName\\\":\\\"reader\\\",\\\"visibleRoles\\\":[\\\"admin\\\"]},{\\\"code\\\":\\\"admin_profile\\\",\\\"dataScope\\\":\\\"CURRENT_USER\\\",\\\"name\\\":\\\"个人资料\\\",\\\"pageCode\\\":\\\"admin_profile_page\\\",\\\"pageType\\\":\\\"form\\\",\\\"path\\\":\\\"/admin/profile\\\",\\\"requiresLogin\\\":true,\\\"tableName\\\":\\\"admin\\\",\\\"visibleRoles\\\":[\\\"admin\\\"]}],\\\"frontendMenus\\\":[{\\\"code\\\":\\\"book_catalog\\\",\\\"dataScope\\\":\\\"PUBLIC\\\",\\\"name\\\":\\\"图书目录\\\",\\\"pageCode\\\":\\\"book_catalog_page\\\",\\\"pageType\\\":\\\"\\\",\\\"path\\\":\\\"/books\\\",\\\"requiresLogin\\\":false,\\\"tableName\\\":\\\"\\\",\\\"visibleRoles\\\":[]},{\\\"code\\\":\\\"my_borrowings\\\",\\\"dataScope\\\":\\\"CURRENT_USER\\\",\\\"name\\\":\\\"我的借阅\\\",\\\"pageCode\\\":\\\"my_borrowings_page\\\",\\\"pageType\\\":\\\"\\\",\\\"path\\\":\\\"/my-borrowings\\\",\\\"requiresLogin\\\":true,\\\"tableName\\\":\\\"\\\",\\\"visibleRoles\\\":[\\\"reader\\\"]},{\\\"code\\\":\\\"my_reservations\\\",\\\"dataScope\\\":\\\"CURRENT_USER\\\",\\\"name\\\":\\\"我的预约\\\",\\\"pageCode\\\":\\\"my_reservations_page\\\",\\\"pageType\\\":\\\"\\\",\\\"path\\\":\\\"/my-reservations\\\",\\\"requiresLogin\\\":true,\\\"tableName\\\":\\\"\\\",\\\"visibleRoles\\\":[\\\"reader\\\"]},{\\\"code\\\":\\\"reader_profile\\\",\\\"dataScope\\\":\\\"CURRENT_USER\\\",\\\"name\\\":\\\"个人中心\\\",\\\"pageCode\\\":\\\"reader_profile_page\\\",\\\"pageType\\\":\\\"\\\",\\\"path\\\":\\\"/reader/profile\\\",\\\"requiresLogin\\\":true,\\\"tableName\\\":\\\"\\\",\\\"visibleRoles\\\":[\\\"reader\\\"]}],\\\"frontendPages\\\":[{\\\"code\\\":\\\"book_catalog_page\\\",\\\"menuCode\\\":\\\"book_catalog\\\",\\\"name\\\":\\\"图书目录\\\",\\\"pageType\\\":\\\"list\\\",\\\"parentPageCode\\\":\\\"\\\",\\\"path\\\":\\\"/books\\\",\\\"tableName\\\":\\\"book_info\\\"},{\\\"code\\\":\\\"book_detail_page\\\",\\\"menuCode\\\":\\\"\\\",\\\"name\\\":\\\"图书详情\\\",\\\"pageType\\\":\\\"detail\\\",\\\"parentPageCode\\\":\\\"\\\",\\\"path\\\":\\\"/books/:id\\\",\\\"tableName\\\":\\\"book_info\\\"},{\\\"code\\\":\\\"my_borrowings_page\\\",\\\"menuCode\\\":\\\"my_borrowings\\\",\\\"name\\\":\\\"我的借阅\\\",\\\"pageType\\\":\\\"list\\\",\\\"parentPageCode\\\":\\\"\\\",\\\"path\\\":\\\"/my-borrowings\\\",\\\"tableName\\\":\\\"borrowing\\\"},{\\\"code\\\":\\\"my_reservations_page\\\",\\\"menuCode\\\":\\\"my_reservations\\\",\\\"name\\\":\\\"我的预约\\\",\\\"pageType\\\":\\\"list\\\",\\\"parentPageCode\\\":\\\"\\\",\\\"path\\\":\\\"/my-reservations\\\",\\\"tableName\\\":\\\"reservation\\\"},{\\\"code\\\":\\\"reader_profile_page\\\",\\\"menuCode\\\":\\\"reader_profile\\\",\\\"name\\\":\\\"个人资料\\\",\\\"pageType\\\":\\\"form\\\",\\\"parentPageCode\\\":\\\"\\\",\\\"path\\\":\\\"/reader/profile\\\",\\\"tableName\\\":\\\"reader\\\"}],\\\"roles\\\":[{\\\"code\\\":\\\"admin\\\",\\\"description\\\":\\\"系统管理员,拥有所有后台管理权限\\\",\\\"name\\\":\\\"系统管理员\\\"},{\\\"code\\\":\\\"reader\\\",\\\"description\\\":\\\"普通读者,可浏览图书、借书、还书、预约\\\",\\\"name\\\":\\\"读者\\\"}]}\",\"flowConfigJson\":\"{\\\"actions\\\":[{\\\"actor\\\":\\\"reader\\\",\\\"button\\\":{\\\"confirm\\\":\\\"确认取消该预约吗?\\\",\\\"order\\\":10,\\\"pageCode\\\":\\\"my_reservations_page\\\",\\\"scope\\\":\\\"reader\\\",\\\"slot\\\":\\\"list.rowActions\\\",\\\"type\\\":\\\"danger\\\"},\\\"code\\\":\\\"cancel_reservation\\\",\\\"effects\\\":[],\\\"from\\\":\\\"pending\\\",\\\"invalidStateMessage\\\":\\\"当前状态不可取消预约\\\",\\\"method\\\":\\\"POST\\\",\\\"name\\\":\\\"取消预约\\\",\\\"path\\\":\\\"/reservation/cancel\\\",\\\"requestFields\\\":[],\\\"successMessage\\\":\\\"预约已取消\\\",\\\"to\\\":\\\"cancelled\\\"},{\\\"actor\\\":\\\"admin\\\",\\\"audit\\\":{\\\"timeField\\\":\\\"cancel_time\\\",\\\"userField\\\":\\\"cancel_user_id\\\"},\\\"button\\\":{\\\"confirm\\\":\\\"确认取消该预约吗?\\\",\\\"order\\\":10,\\\"pageCode\\\":\\\"reservation_admin_page\\\",\\\"scope\\\":\\\"admin\\\",\\\"slot\\\":\\\"list.rowActions\\\",\\\"type\\\":\\\"danger\\\"},\\\"code\\\":\\\"admin_cancel_reservation\\\",\\\"effects\\\":[],\\\"from\\\":\\\"pending\\\",\\\"invalidStateMessage\\\":\\\"当前状态不可取消预约\\\",\\\"method\\\":\\\"POST\\\",\\\"name\\\":\\\"取消预约\\\",\\\"path\\\":\\\"/reservation/admin-cancel\\\",\\\"requestFields\\\":[],\\\"successMessage\\\":\\\"预约已取消\\\",\\\"to\\\":\\\"cancelled\\\"},{\\\"actor\\\":\\\"admin\\\",\\\"audit\\\":{\\\"timeField\\\":\\\"fulfill_time\\\",\\\"userField\\\":\\\"fulfill_user_id\\\"},\\\"button\\\":{\\\"confirm\\\":\\\"确认借出此预约的图书?\\\",\\\"order\\\":20,\\\"pageCode\\\":\\\"reservation_admin_page\\\",\\\"scope\\\":\\\"admin\\\",\\\"slot\\\":\\\"list.rowActions\\\",\\\"type\\\":\\\"primary\\\"},\\\"code\\\":\\\"fulfill_reservation\\\",\\\"effects\\\":[{\\\"amount\\\":\\\"1\\\",\\\"min\\\":\\\"0\\\",\\\"table\\\":\\\"borrowing\\\",\\\"type\\\":\\\"create_record\\\",\\\"values\\\":{\\\"reader_id\\\":\\\"record.reader_id\\\",\\\"due_date\\\":\\\"now + 30\\\",\\\"borrow_date\\\":\\\"now\\\",\\\"book_id\\\":\\\"record.book_id\\\",\\\"status\\\":\\\"\'borrowing\'\\\"}},{\\\"amount\\\":\\\"1\\\",\\\"errorMessage\\\":\\\"图书库存不足\\\",\\\"field\\\":\\\"stock\\\",\\\"min\\\":\\\"0\\\",\\\"notFoundMessage\\\":\\\"图书不存在\\\",\\\"relationField\\\":\\\"book_id\\\",\\\"table\\\":\\\"book_info\\\",\\\"type\\\":\\\"decrease\\\",\\\"values\\\":{}}],\\\"from\\\":\\\"pending\\\",\\\"invalidStateMessage\\\":\\\"当前状态不可确认借出\\\",\\\"method\\\":\\\"POST\\\",\\\"name\\\":\\\"确认借出\\\",\\\"path\\\":\\\"/reservation/fulfill\\\",\\\"requestFields\\\":[],\\\"successMessage\\\":\\\"借出成功\\\",\\\"to\\\":\\\"fulfilled\\\"}],\\\"code\\\":\\\"reservation_management\\\",\\\"mainTable\\\":\\\"reservation\\\",\\\"metrics\\\":[{\\\"aggregate\\\":\\\"count\\\",\\\"code\\\":\\\"pending_count\\\",\\\"field\\\":\\\"id\\\",\\\"name\\\":\\\"待处理预约数\\\",\\\"status\\\":\\\"pending\\\",\\\"table\\\":\\\"reservation\\\",\\\"unit\\\":\\\"条\\\"},{\\\"aggregate\\\":\\\"count\\\",\\\"code\\\":\\\"cancelled_count\\\",\\\"field\\\":\\\"id\\\",\\\"name\\\":\\\"已取消预约数\\\",\\\"status\\\":\\\"cancelled\\\",\\\"table\\\":\\\"reservation\\\",\\\"unit\\\":\\\"条\\\"},{\\\"aggregate\\\":\\\"count\\\",\\\"code\\\":\\\"fulfilled_count\\\",\\\"field\\\":\\\"id\\\",\\\"name\\\":\\\"已借出预约数\\\",\\\"status\\\":\\\"fulfilled\\\",\\\"table\\\":\\\"reservation\\\",\\\"unit\\\":\\\"条\\\"},{\\\"aggregate\\\":\\\"count\\\",\\\"code\\\":\\\"total_reservations\\\",\\\"field\\\":\\\"id\\\",\\\"name\\\":\\\"预约总数\\\",\\\"table\\\":\\\"reservation\\\",\\\"unit\\\":\\\"条\\\"}],\\\"name\\\":\\\"预约管理\\\",\\\"notFoundMessage\\\":\\\"预约记录不存在\\\",\\\"states\\\":[{\\\"code\\\":\\\"pending\\\",\\\"label\\\":\\\"待处理\\\"},{\\\"code\\\":\\\"cancelled\\\",\\\"label\\\":\\\"已取消\\\"},{\\\"code\\\":\\\"fulfilled\\\",\\\"label\\\":\\\"已借出\\\"}],\\\"statusField\\\":\\\"status\\\",\\\"version\\\":\\\"1.0\\\"}\",\"result\":{\"downloadReady\":false,\"projectId\":110,\"report\":{\"adminPageCount\":0,\"businessActionCount\":0,\"businessLoopComplete\":true,\"businessLoopWarnings\":[],\"frontendPageCount\":0,\"loopActions\":3,\"missingRequiredActions\":[],\"quantityRules\":0,\"recordRules\":0,\"stateTransitions\":0,\"tableCount\":8},\"stage\":\"DATABASE\",\"suggestedActions\":[]}},\"schemaVersion\":\"1.0\",\"stageCode\":\"DATABASE\"}', '1ef7128a0fbe7906ecc5413f9d2f08e55722a992ddb715e534d2b4976d823488', NULL, NULL, '2026-07-15 09:29:27');
INSERT INTO `factory_ai_task_checkpoint` VALUES (118, 114, 'GENERATE', 4, 1, '1.0', '{\"payload\":{\"downloadReady\":true,\"generationRunId\":104,\"projectId\":110,\"report\":{\"adminPageCount\":10,\"businessActionCount\":0,\"businessLoopComplete\":true,\"businessLoopWarnings\":[],\"frontendPageCount\":6,\"loopActions\":3,\"missingRequiredActions\":[],\"quantityRules\":0,\"recordRules\":0,\"stateTransitions\":0,\"tableCount\":8},\"specContentHash\":\"df7b0393f895e57ebd6f791c531b59dafd58afca1de7006ade1e9c531388e1c7\",\"specVersionId\":104,\"specVersionNo\":1,\"stage\":\"GENERATE\",\"suggestedActions\":[]},\"schemaVersion\":\"1.0\",\"stageCode\":\"GENERATE\"}', '470d4e922311460dd8ac92c10672c9e640bc6014f61dd5c664f923f5f6e48bbb', 104, 104, '2026-07-15 09:29:32');
INSERT INTO `factory_ai_task_checkpoint` VALUES (119, 114, 'VERIFY_AND_PREVIEW', 5, 1, '1.0', '{\"payload\":{\"adminFrontendUrl\":\"http://127.0.0.1:38285\",\"backendUrl\":\"http://127.0.0.1:38240\",\"downloadReady\":true,\"expiresAt\":\"2026-07-15 09:44:32\",\"frontendUrl\":\"http://127.0.0.1:38241\",\"generationRunId\":104,\"previewStatus\":\"RUNNING\",\"projectId\":110,\"report\":{\"adminPageCount\":10,\"businessActionCount\":0,\"businessLoopComplete\":true,\"businessLoopWarnings\":[],\"frontendPageCount\":6,\"loopActions\":3,\"missingRequiredActions\":[],\"quantityRules\":0,\"recordRules\":0,\"stateTransitions\":0,\"tableCount\":8},\"specContentHash\":\"df7b0393f895e57ebd6f791c531b59dafd58afca1de7006ade1e9c531388e1c7\",\"specVersionId\":104,\"specVersionNo\":1,\"stage\":\"VERIFY_AND_PREVIEW\",\"suggestedActions\":[]},\"schemaVersion\":\"1.0\",\"stageCode\":\"VERIFY_AND_PREVIEW\"}', '5a0c49c6c1ec1b9fee64886aed38c11aceb07ac85ccb6a8018cc7827f6dd9c47', 104, 104, '2026-07-15 09:30:39');
INSERT INTO `factory_ai_task_checkpoint` VALUES (120, 116, 'DATABASE', 3, 1, '1.0', '{\"payload\":{\"appBlueprintJson\":\"{\\\"adminHomeDashboard\\\":{\\\"charts\\\":[{\\\"filters\\\":[],\\\"metrics\\\":[{\\\"aggregate\\\":\\\"count\\\"}],\\\"semantic\\\":\\\"order\\\",\\\"type\\\":\\\"line\\\"},{\\\"filters\\\":[],\\\"metrics\\\":[{\\\"aggregate\\\":\\\"count\\\"}],\\\"semantic\\\":\\\"inventory\\\",\\\"type\\\":\\\"pie\\\"}],\\\"description\\\":\\\"核心业务数据\\\",\\\"metrics\\\":[{\\\"aggregate\\\":\\\"count\\\",\\\"filters\\\":[],\\\"semantic\\\":\\\"inventory\\\"},{\\\"aggregate\\\":\\\"count\\\",\\\"filters\\\":[],\\\"semantic\\\":\\\"order\\\"},{\\\"aggregate\\\":\\\"count\\\",\\\"filters\\\":[],\\\"semantic\\\":\\\"order\\\"},{\\\"aggregate\\\":\\\"count\\\",\\\"filters\\\":[],\\\"semantic\\\":\\\"order\\\"}],\\\"title\\\":\\\"运营总览\\\"},\\\"adminMenus\\\":[{\\\"code\\\":\\\"book_admin\\\",\\\"dataScope\\\":\\\"ROLE\\\",\\\"name\\\":\\\"图书管理\\\",\\\"pageCode\\\":\\\"book_admin_page\\\",\\\"pageType\\\":\\\"list\\\",\\\"path\\\":\\\"/admin/books\\\",\\\"requiresLogin\\\":true,\\\"tableName\\\":\\\"book_info\\\",\\\"visibleRoles\\\":[\\\"admin\\\"]},{\\\"code\\\":\\\"borrowing_admin\\\",\\\"dataScope\\\":\\\"ROLE\\\",\\\"name\\\":\\\"借阅管理\\\",\\\"pageCode\\\":\\\"borrowing_admin_page\\\",\\\"pageType\\\":\\\"list\\\",\\\"path\\\":\\\"/admin/borrowings\\\",\\\"requiresLogin\\\":true,\\\"tableName\\\":\\\"borrowing\\\",\\\"visibleRoles\\\":[\\\"admin\\\"]},{\\\"code\\\":\\\"reservation_admin\\\",\\\"dataScope\\\":\\\"ROLE\\\",\\\"name\\\":\\\"预约管理\\\",\\\"pageCode\\\":\\\"reservation_admin_page\\\",\\\"pageType\\\":\\\"list\\\",\\\"path\\\":\\\"/admin/reservations\\\",\\\"requiresLogin\\\":true,\\\"tableName\\\":\\\"reservation\\\",\\\"visibleRoles\\\":[\\\"admin\\\"]},{\\\"code\\\":\\\"banner_admin\\\",\\\"dataScope\\\":\\\"ROLE\\\",\\\"name\\\":\\\"轮播图管理\\\",\\\"pageCode\\\":\\\"banner_admin_page\\\",\\\"pageType\\\":\\\"list\\\",\\\"path\\\":\\\"/admin/banners\\\",\\\"requiresLogin\\\":true,\\\"tableName\\\":\\\"banner\\\",\\\"visibleRoles\\\":[\\\"admin\\\"]},{\\\"code\\\":\\\"announcement_admin\\\",\\\"dataScope\\\":\\\"ROLE\\\",\\\"name\\\":\\\"公告管理\\\",\\\"pageCode\\\":\\\"announcement_admin_page\\\",\\\"pageType\\\":\\\"list\\\",\\\"path\\\":\\\"/admin/announcements\\\",\\\"requiresLogin\\\":true,\\\"tableName\\\":\\\"announcement\\\",\\\"visibleRoles\\\":[\\\"admin\\\"]},{\\\"code\\\":\\\"news_admin\\\",\\\"dataScope\\\":\\\"ROLE\\\",\\\"name\\\":\\\"新闻管理\\\",\\\"pageCode\\\":\\\"news_admin_page\\\",\\\"pageType\\\":\\\"list\\\",\\\"path\\\":\\\"/admin/news\\\",\\\"requiresLogin\\\":true,\\\"tableName\\\":\\\"news\\\",\\\"visibleRoles\\\":[\\\"admin\\\"]},{\\\"code\\\":\\\"admin_profile\\\",\\\"dataScope\\\":\\\"CURRENT_USER\\\",\\\"name\\\":\\\"个人资料\\\",\\\"pageCode\\\":\\\"admin_profile_page\\\",\\\"pageType\\\":\\\"form\\\",\\\"path\\\":\\\"/admin/profile\\\",\\\"requiresLogin\\\":true,\\\"tableName\\\":\\\"admin\\\",\\\"visibleRoles\\\":[\\\"admin\\\"]}],\\\"frontendMenus\\\":[{\\\"code\\\":\\\"book_catalog\\\",\\\"dataScope\\\":\\\"PUBLIC\\\",\\\"name\\\":\\\"图书目录\\\",\\\"pageCode\\\":\\\"book_catalog_page\\\",\\\"pageType\\\":\\\"\\\",\\\"path\\\":\\\"/books\\\",\\\"requiresLogin\\\":false,\\\"tableName\\\":\\\"\\\",\\\"visibleRoles\\\":[]},{\\\"code\\\":\\\"my_borrowings\\\",\\\"dataScope\\\":\\\"CURRENT_USER\\\",\\\"name\\\":\\\"我的借阅\\\",\\\"pageCode\\\":\\\"my_borrowings_page\\\",\\\"pageType\\\":\\\"\\\",\\\"path\\\":\\\"/my/borrowings\\\",\\\"requiresLogin\\\":true,\\\"tableName\\\":\\\"\\\",\\\"visibleRoles\\\":[\\\"reader\\\"]},{\\\"code\\\":\\\"my_reservations\\\",\\\"dataScope\\\":\\\"CURRENT_USER\\\",\\\"name\\\":\\\"我的预约\\\",\\\"pageCode\\\":\\\"my_reservations_page\\\",\\\"pageType\\\":\\\"\\\",\\\"path\\\":\\\"/my/reservations\\\",\\\"requiresLogin\\\":true,\\\"tableName\\\":\\\"\\\",\\\"visibleRoles\\\":[\\\"reader\\\"]},{\\\"code\\\":\\\"reader_profile\\\",\\\"dataScope\\\":\\\"CURRENT_USER\\\",\\\"name\\\":\\\"个人资料\\\",\\\"pageCode\\\":\\\"reader_profile_page\\\",\\\"pageType\\\":\\\"\\\",\\\"path\\\":\\\"/reader/profile\\\",\\\"requiresLogin\\\":true,\\\"tableName\\\":\\\"\\\",\\\"visibleRoles\\\":[\\\"reader\\\"]}],\\\"frontendPages\\\":[{\\\"code\\\":\\\"book_catalog_page\\\",\\\"menuCode\\\":\\\"book_catalog\\\",\\\"name\\\":\\\"图书目录\\\",\\\"pageType\\\":\\\"list\\\",\\\"parentPageCode\\\":\\\"\\\",\\\"path\\\":\\\"/books\\\",\\\"tableName\\\":\\\"book_info\\\"},{\\\"code\\\":\\\"my_borrowings_page\\\",\\\"menuCode\\\":\\\"my_borrowings\\\",\\\"name\\\":\\\"我的借阅\\\",\\\"pageType\\\":\\\"current_user_list\\\",\\\"parentPageCode\\\":\\\"\\\",\\\"path\\\":\\\"/my/borrowings\\\",\\\"tableName\\\":\\\"borrowing\\\"},{\\\"code\\\":\\\"my_reservations_page\\\",\\\"menuCode\\\":\\\"my_reservations\\\",\\\"name\\\":\\\"我的预约\\\",\\\"pageType\\\":\\\"current_user_list\\\",\\\"parentPageCode\\\":\\\"\\\",\\\"path\\\":\\\"/my/reservations\\\",\\\"tableName\\\":\\\"reservation\\\"},{\\\"code\\\":\\\"reader_profile_page\\\",\\\"menuCode\\\":\\\"reader_profile\\\",\\\"name\\\":\\\"个人资料\\\",\\\"pageType\\\":\\\"form\\\",\\\"parentPageCode\\\":\\\"\\\",\\\"path\\\":\\\"/reader/profile\\\",\\\"tableName\\\":\\\"reader\\\"}],\\\"roles\\\":[{\\\"code\\\":\\\"admin\\\",\\\"description\\\":\\\"系统管理员,负责图书、借阅、预约、轮播图、公告、新闻等模块的后台管理。\\\",\\\"name\\\":\\\"管理员\\\"},{\\\"code\\\":\\\"reader\\\",\\\"description\\\":\\\"普通读者,可浏览图书、借书、还书、预约、取消预约,管理个人资料。\\\",\\\"name\\\":\\\"读者\\\"}]}\",\"flowConfigJson\":\"{\\\"actions\\\":[],\\\"code\\\":\\\"library_circulation\\\",\\\"flows\\\":[{\\\"actions\\\":[{\\\"actor\\\":\\\"reader\\\",\\\"button\\\":{\\\"confirm\\\":\\\"确认预约吗?\\\",\\\"order\\\":10,\\\"pageCode\\\":\\\"book_catalog_page\\\",\\\"scope\\\":\\\"reader\\\",\\\"slot\\\":\\\"list.rowActions\\\",\\\"tableName\\\":\\\"book_info\\\",\\\"type\\\":\\\"primary\\\"},\\\"code\\\":\\\"reserve_book\\\",\\\"effects\\\":[{\\\"amount\\\":\\\"1\\\",\\\"min\\\":\\\"0\\\",\\\"table\\\":\\\"reservation\\\",\\\"type\\\":\\\"create_record\\\",\\\"values\\\":{\\\"reader_id\\\":\\\"currentUserId\\\",\\\"book_id\\\":\\\"record.id\\\",\\\"reserve_date\\\":\\\"now\\\",\\\"status\\\":\\\"pending\\\"}}],\\\"method\\\":\\\"POST\\\",\\\"name\\\":\\\"预约\\\",\\\"ownerTable\\\":\\\"book_info\\\",\\\"path\\\":\\\"/book-info/reserve\\\",\\\"requestFields\\\":[\\\"id\\\"],\\\"successMessage\\\":\\\"预约成功\\\"},{\\\"actor\\\":\\\"reader\\\",\\\"button\\\":{\\\"confirm\\\":\\\"确认取消预约吗?\\\",\\\"order\\\":10,\\\"pageCode\\\":\\\"my_reservations_page\\\",\\\"scope\\\":\\\"reader\\\",\\\"slot\\\":\\\"list.rowActions\\\",\\\"tableName\\\":\\\"reservation\\\",\\\"type\\\":\\\"danger\\\"},\\\"code\\\":\\\"cancel_reservation\\\",\\\"effects\\\":[],\\\"from\\\":\\\"pending\\\",\\\"method\\\":\\\"POST\\\",\\\"name\\\":\\\"取消预约\\\",\\\"ownerTable\\\":\\\"reservation\\\",\\\"path\\\":\\\"/reservation/cancel\\\",\\\"requestFields\\\":[\\\"id\\\"],\\\"to\\\":\\\"cancelled\\\"}],\\\"code\\\":\\\"reservation_flow\\\",\\\"flows\\\":[],\\\"mainTable\\\":\\\"reservation\\\",\\\"metrics\\\":[],\\\"name\\\":\\\"图书预约\\\",\\\"notFoundMessage\\\":\\\"预约记录不存在\\\",\\\"states\\\":[{\\\"code\\\":\\\"pending\\\",\\\"label\\\":\\\"待处理\\\"},{\\\"code\\\":\\\"cancelled\\\",\\\"label\\\":\\\"已取消\\\"}],\\\"statusField\\\":\\\"status\\\",\\\"version\\\":\\\"1.1\\\"},{\\\"actions\\\":[{\\\"actor\\\":\\\"reader\\\",\\\"button\\\":{\\\"confirm\\\":\\\"确认借书吗?\\\",\\\"order\\\":20,\\\"pageCode\\\":\\\"book_catalog_page\\\",\\\"scope\\\":\\\"reader\\\",\\\"slot\\\":\\\"list.rowActions\\\",\\\"tableName\\\":\\\"book_info\\\",\\\"type\\\":\\\"success\\\"},\\\"code\\\":\\\"borrow_book\\\",\\\"effects\\\":[{\\\"amount\\\":\\\"1\\\",\\\"min\\\":\\\"0\\\",\\\"table\\\":\\\"borrowing\\\",\\\"type\\\":\\\"create_record\\\",\\\"values\\\":{\\\"reader_id\\\":\\\"currentUserId\\\",\\\"borrow_date\\\":\\\"now\\\",\\\"book_id\\\":\\\"record.id\\\",\\\"status\\\":\\\"borrowing\\\"}},{\\\"amount\\\":\\\"1\\\",\\\"errorMessage\\\":\\\"图书库存不足\\\",\\\"field\\\":\\\"stock\\\",\\\"min\\\":\\\"0\\\",\\\"relationField\\\":\\\"id\\\",\\\"table\\\":\\\"book_info\\\",\\\"type\\\":\\\"decrease\\\",\\\"values\\\":{}}],\\\"method\\\":\\\"POST\\\",\\\"name\\\":\\\"借书\\\",\\\"ownerTable\\\":\\\"book_info\\\",\\\"path\\\":\\\"/book-info/borrow\\\",\\\"requestFields\\\":[\\\"id\\\"],\\\"successMessage\\\":\\\"借书成功\\\"},{\\\"actor\\\":\\\"reader\\\",\\\"button\\\":{\\\"confirm\\\":\\\"确认还书吗?\\\",\\\"order\\\":10,\\\"pageCode\\\":\\\"my_borrowings_page\\\",\\\"scope\\\":\\\"reader\\\",\\\"slot\\\":\\\"list.rowActions\\\",\\\"tableName\\\":\\\"borrowing\\\",\\\"type\\\":\\\"primary\\\"},\\\"code\\\":\\\"return_book\\\",\\\"effects\\\":[{\\\"amount\\\":\\\"1\\\",\\\"field\\\":\\\"stock\\\",\\\"min\\\":\\\"0\\\",\\\"relationField\\\":\\\"book_id\\\",\\\"table\\\":\\\"book_info\\\",\\\"type\\\":\\\"increase\\\",\\\"values\\\":{}}],\\\"from\\\":\\\"borrowing\\\",\\\"method\\\":\\\"POST\\\",\\\"name\\\":\\\"还书\\\",\\\"ownerTable\\\":\\\"borrowing\\\",\\\"path\\\":\\\"/borrowing/return\\\",\\\"requestFields\\\":[\\\"id\\\"],\\\"to\\\":\\\"returned\\\"}],\\\"code\\\":\\\"borrowing_flow\\\",\\\"flows\\\":[],\\\"mainTable\\\":\\\"borrowing\\\",\\\"metrics\\\":[{\\\"aggregate\\\":\\\"count\\\",\\\"code\\\":\\\"borrowing_count\\\",\\\"field\\\":\\\"id\\\",\\\"name\\\":\\\"借阅中数量\\\",\\\"status\\\":\\\"borrowing\\\",\\\"table\\\":\\\"borrowing\\\",\\\"unit\\\":\\\"条\\\"}],\\\"name\\\":\\\"图书借阅\\\",\\\"notFoundMessage\\\":\\\"借阅记录不存在\\\",\\\"states\\\":[{\\\"code\\\":\\\"borrowing\\\",\\\"label\\\":\\\"借阅中\\\"},{\\\"code\\\":\\\"returned\\\",\\\"label\\\":\\\"已归还\\\"}],\\\"statusField\\\":\\\"status\\\",\\\"version\\\":\\\"1.1\\\"}],\\\"metrics\\\":[],\\\"name\\\":\\\"图书流通\\\",\\\"states\\\":[],\\\"statusField\\\":\\\"status\\\",\\\"version\\\":\\\"1.1\\\"}\",\"result\":{\"downloadReady\":false,\"projectId\":111,\"report\":{\"adminPageCount\":0,\"businessActionCount\":4,\"businessLoopComplete\":true,\"businessLoopWarnings\":[],\"frontendPageCount\":0,\"loopActions\":4,\"missingRequiredActions\":[],\"quantityRules\":2,\"recordRules\":2,\"stateTransitions\":2,\"tableCount\":8},\"stage\":\"DATABASE\",\"suggestedActions\":[]}},\"schemaVersion\":\"1.0\",\"stageCode\":\"DATABASE\"}', '5f30e1acc81a95498ce2683f3e34d7e706bd50ea1ec604c8707d253e4da696f8', NULL, NULL, '2026-07-15 11:00:09');
INSERT INTO `factory_ai_task_checkpoint` VALUES (121, 116, 'GENERATE', 4, 1, '1.0', '{\"payload\":{\"downloadReady\":true,\"generationRunId\":105,\"projectId\":111,\"report\":{\"adminPageCount\":10,\"businessActionCount\":4,\"businessLoopComplete\":true,\"businessLoopWarnings\":[],\"frontendPageCount\":5,\"loopActions\":4,\"missingRequiredActions\":[],\"quantityRules\":2,\"recordRules\":2,\"stateTransitions\":2,\"tableCount\":8},\"specContentHash\":\"50b53eeb120cd253127b20066d5ef80e1dd16bbf22c239b6781901b8ef556f27\",\"specVersionId\":105,\"specVersionNo\":1,\"stage\":\"GENERATE\",\"suggestedActions\":[]},\"schemaVersion\":\"1.0\",\"stageCode\":\"GENERATE\"}', '059e62f7f83e74b59a0d2650d586701fa888448d7b6cbae192534f455a58ac9d', 105, 105, '2026-07-15 11:00:19');
INSERT INTO `factory_ai_task_checkpoint` VALUES (122, 116, 'VERIFY_AND_PREVIEW', 5, 1, '1.0', '{\"payload\":{\"adminFrontendUrl\":\"http://127.0.0.1:26779\",\"backendUrl\":\"http://127.0.0.1:26739\",\"downloadReady\":true,\"expiresAt\":\"2026-07-15 11:15:19\",\"frontendUrl\":\"http://127.0.0.1:26740\",\"generationRunId\":105,\"previewStatus\":\"RUNNING\",\"projectId\":111,\"report\":{\"adminPageCount\":10,\"businessActionCount\":4,\"businessLoopComplete\":true,\"businessLoopWarnings\":[],\"frontendPageCount\":5,\"loopActions\":4,\"missingRequiredActions\":[],\"quantityRules\":2,\"recordRules\":2,\"stateTransitions\":2,\"tableCount\":8},\"specContentHash\":\"50b53eeb120cd253127b20066d5ef80e1dd16bbf22c239b6781901b8ef556f27\",\"specVersionId\":105,\"specVersionNo\":1,\"stage\":\"VERIFY_AND_PREVIEW\",\"suggestedActions\":[]},\"schemaVersion\":\"1.0\",\"stageCode\":\"VERIFY_AND_PREVIEW\"}', 'e0a57cabd0c51c298c9f6fecd23f50cf3f842d1be3294d26849228f691a0064c', 105, 105, '2026-07-15 11:01:27');
-- ----------------------------
-- Table structure for factory_ai_task_stage
-- ----------------------------
DROP TABLE IF EXISTS `factory_ai_task_stage`;
CREATE TABLE `factory_ai_task_stage` (
`task_stage_id` bigint(20) NOT NULL AUTO_INCREMENT COMMENT 'Task stage attempt ID',
`task_id` bigint(20) NOT NULL COMMENT 'AI task ID',
`stage_code` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NOT NULL COMMENT 'Stable stage code',
`sequence_no` int(11) NOT NULL COMMENT 'Manifest sequence number',
`attempt_no` int(11) NOT NULL COMMENT 'Task attempt number',
`status` varchar(20) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NOT NULL COMMENT 'RUNNING, SUCCEEDED, or FAILED',
`handler_code` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT 'Handler code',
`handler_version` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT 'Handler version',
`input_contract` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT 'Handler input contract',
`output_contract` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT 'Handler output contract',
`generate_type` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT 'AI generation type for this stage',
`prompt_code` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT 'Pinned Prompt code',
`prompt_version` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT 'Pinned Prompt version',
`prompt_fingerprint` char(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT 'Pinned Prompt SHA-256',
`provider` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT 'Pinned model provider',
`model` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT 'Pinned model ID',
`generation_run_id` bigint(20) NULL DEFAULT NULL COMMENT 'Related source generation run ID',
`started_at` datetime(0) NOT NULL COMMENT 'Stage start time',
`finished_at` datetime(0) NULL DEFAULT NULL COMMENT 'Stage finish time',
`duration_millis` bigint(20) NULL DEFAULT NULL COMMENT 'Stage duration in milliseconds',
`error_message` varchar(1000) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT '' COMMENT 'Sanitized stage error',
`create_time` datetime(0) NULL DEFAULT NULL COMMENT 'Create time',
`update_time` datetime(0) NULL DEFAULT NULL COMMENT 'Update time',
PRIMARY KEY (`task_stage_id`) USING BTREE,
UNIQUE INDEX `uk_factory_ai_stage_attempt`(`task_id`, `stage_code`, `attempt_no`) USING BTREE,
INDEX `idx_factory_ai_stage_task`(`task_id`, `attempt_no`, `sequence_no`) USING BTREE,
INDEX `idx_factory_ai_stage_status`(`status`, `update_time`) USING BTREE,
INDEX `idx_factory_ai_stage_generation_run`(`generation_run_id`) USING BTREE,
CONSTRAINT `fk_factory_ai_stage_task` FOREIGN KEY (`task_id`) REFERENCES `front_ai_generation_task` (`task_id`) ON DELETE CASCADE ON UPDATE RESTRICT
) ENGINE = InnoDB AUTO_INCREMENT = 100 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_0900_ai_ci COMMENT = 'AI task stage attempt ledger' ROW_FORMAT = Dynamic;
-- ----------------------------
-- Records of factory_ai_task_stage
-- ----------------------------
INSERT INTO `factory_ai_task_stage` VALUES (100, 100, 'PROJECT_PREPARE', 1, 1, 'SUCCEEDED', 'one-click.project-prepare', '1.0.0', 'one-click-generation-context:v1', 'one-click-generation-context:v1', NULL, NULL, NULL, NULL, NULL, NULL, NULL, '2026-07-14 15:17:29', '2026-07-14 15:17:29', 63, '', '2026-07-14 15:17:29', '2026-07-14 15:17:29');
INSERT INTO `factory_ai_task_stage` VALUES (101, 100, 'DESIGN', 2, 1, 'SUCCEEDED', 'one-click.design', '1.0.0', 'one-click-generation-context:v1', 'one-click-generation-context:v1', 'flow_config', 'front.flow_config', 'V1', '247495840c67968896ccad2db0a599bd4fc594d0189157dce888b8ede90b3257', 'deepseek', 'deepseek-v4-flash', NULL, '2026-07-14 15:17:29', '2026-07-14 15:19:22', 112191, '', '2026-07-14 15:17:29', '2026-07-14 15:19:21');
INSERT INTO `factory_ai_task_stage` VALUES (102, 100, 'DATABASE', 3, 1, 'SUCCEEDED', 'one-click.database', '1.0.0', 'one-click-generation-context:v1', 'one-click-generation-context:v1', 'database', 'front.database', 'V1', '14dcad479b01de068e5c5bc39b5cd7a591a09d334ee6812483d8ac00dd8c9d61', 'deepseek', 'deepseek-v4-flash', NULL, '2026-07-14 15:19:22', '2026-07-14 15:21:08', 106712, '', '2026-07-14 15:19:21', '2026-07-14 15:21:08');
INSERT INTO `factory_ai_task_stage` VALUES (103, 100, 'GENERATE', 4, 1, 'FAILED', 'one-click.generate', '1.0.0', 'one-click-generation-context:v1', 'one-click-generation-context:v1', NULL, NULL, NULL, NULL, NULL, NULL, NULL, '2026-07-14 15:21:08', '2026-07-14 15:21:09', 608, 'Business action UI binding page does not exist: borrowing_admin_page', '2026-07-14 15:21:08', '2026-07-14 15:21:08');
INSERT INTO `factory_ai_task_stage` VALUES (104, 101, 'PROJECT_PREPARE', 1, 1, 'SUCCEEDED', 'one-click.project-prepare', '1.0.0', 'one-click-generation-context:v1', 'one-click-generation-context:v1', NULL, NULL, NULL, NULL, NULL, NULL, NULL, '2026-07-14 15:45:04', '2026-07-14 15:45:04', 79, '', '2026-07-14 15:45:04', '2026-07-14 15:45:04');
INSERT INTO `factory_ai_task_stage` VALUES (105, 101, 'DESIGN', 2, 1, 'SUCCEEDED', 'one-click.design', '1.0.0', 'one-click-generation-context:v1', 'one-click-generation-context:v1', 'flow_config', 'front.flow_config', 'V1', '247495840c67968896ccad2db0a599bd4fc594d0189157dce888b8ede90b3257', 'deepseek', 'deepseek-v4-flash', NULL, '2026-07-14 15:45:04', '2026-07-14 15:47:13', 129157, '', '2026-07-14 15:45:04', '2026-07-14 15:47:13');
INSERT INTO `factory_ai_task_stage` VALUES (106, 101, 'DATABASE', 3, 1, 'SUCCEEDED', 'one-click.database', '1.0.0', 'one-click-generation-context:v1', 'one-click-generation-context:v1', 'database', 'front.database', 'V1', '14dcad479b01de068e5c5bc39b5cd7a591a09d334ee6812483d8ac00dd8c9d61', 'deepseek', 'deepseek-v4-flash', NULL, '2026-07-14 15:47:13', '2026-07-14 15:50:13', 179176, '', '2026-07-14 15:47:13', '2026-07-14 15:50:12');
INSERT INTO `factory_ai_task_stage` VALUES (107, 101, 'GENERATE', 4, 1, 'FAILED', 'one-click.generate', '1.0.0', 'one-click-generation-context:v1', 'one-click-generation-context:v1', NULL, NULL, NULL, NULL, NULL, NULL, NULL, '2026-07-14 15:50:13', '2026-07-14 15:50:13', 218, 'Business action UI binding page does not exist: borrow_admin_page', '2026-07-14 15:50:12', '2026-07-14 15:50:12');
INSERT INTO `factory_ai_task_stage` VALUES (108, 102, 'PROJECT_PREPARE', 1, 1, 'SUCCEEDED', 'one-click.project-prepare', '1.0.0', 'one-click-generation-context:v1', 'one-click-generation-context:v1', NULL, NULL, NULL, NULL, NULL, NULL, NULL, '2026-07-14 15:52:57', '2026-07-14 15:52:58', 89, '', '2026-07-14 15:52:57', '2026-07-14 15:52:57');
INSERT INTO `factory_ai_task_stage` VALUES (109, 102, 'DESIGN', 2, 1, 'SUCCEEDED', 'one-click.design', '1.0.0', 'one-click-generation-context:v1', 'one-click-generation-context:v1', 'flow_config', 'front.flow_config', 'V1', '247495840c67968896ccad2db0a599bd4fc594d0189157dce888b8ede90b3257', 'deepseek', 'deepseek-v4-flash', NULL, '2026-07-14 15:52:58', '2026-07-14 15:55:26', 148653, '', '2026-07-14 15:52:57', '2026-07-14 15:55:26');
INSERT INTO `factory_ai_task_stage` VALUES (110, 102, 'DATABASE', 3, 1, 'SUCCEEDED', 'one-click.database', '1.0.0', 'one-click-generation-context:v1', 'one-click-generation-context:v1', 'database', 'front.database', 'V1', '14dcad479b01de068e5c5bc39b5cd7a591a09d334ee6812483d8ac00dd8c9d61', 'deepseek', 'deepseek-v4-flash', NULL, '2026-07-14 15:55:26', '2026-07-14 15:57:58', 151446, '', '2026-07-14 15:55:26', '2026-07-14 15:57:57');
INSERT INTO `factory_ai_task_stage` VALUES (111, 102, 'GENERATE', 4, 1, 'FAILED', 'one-click.generate', '1.0.0', 'one-click-generation-context:v1', 'one-click-generation-context:v1', NULL, NULL, NULL, NULL, NULL, NULL, NULL, '2026-07-14 15:57:58', '2026-07-14 15:57:58', 457, 'Business action UI binding page does not exist: borrow_admin_page', '2026-07-14 15:57:57', '2026-07-14 15:57:58');
INSERT INTO `factory_ai_task_stage` VALUES (112, 102, 'PROJECT_PREPARE', 1, 2, 'SUCCEEDED', 'one-click.project-prepare', '1.0.0', 'one-click-generation-context:v1', 'one-click-generation-context:v1', NULL, NULL, NULL, NULL, NULL, NULL, NULL, '2026-07-14 16:11:17', '2026-07-14 16:11:17', 49, '', '2026-07-14 16:11:17', '2026-07-14 16:11:17');
INSERT INTO `factory_ai_task_stage` VALUES (113, 102, 'GENERATE', 4, 2, 'FAILED', 'one-click.generate', '1.0.0', 'one-click-generation-context:v1', 'one-click-generation-context:v1', NULL, NULL, NULL, NULL, NULL, NULL, NULL, '2026-07-14 16:11:17', '2026-07-14 16:11:18', 354, 'Unsupported business action UI binding target: current_user', '2026-07-14 16:11:17', '2026-07-14 16:11:17');
INSERT INTO `factory_ai_task_stage` VALUES (114, 103, 'PROJECT_PREPARE', 1, 1, 'SUCCEEDED', 'one-click.project-prepare', '1.0.0', 'one-click-generation-context:v1', 'one-click-generation-context:v1', NULL, NULL, NULL, NULL, NULL, NULL, NULL, '2026-07-14 16:19:22', '2026-07-14 16:19:22', 128, '', '2026-07-14 16:19:22', '2026-07-14 16:19:22');
INSERT INTO `factory_ai_task_stage` VALUES (115, 103, 'DESIGN', 2, 1, 'SUCCEEDED', 'one-click.design', '1.0.0', 'one-click-generation-context:v1', 'one-click-generation-context:v1', 'flow_config', 'front.flow_config', 'V1', '247495840c67968896ccad2db0a599bd4fc594d0189157dce888b8ede90b3257', 'deepseek', 'deepseek-v4-flash', NULL, '2026-07-14 16:19:22', '2026-07-14 16:21:26', 123737, '', '2026-07-14 16:19:22', '2026-07-14 16:21:26');
INSERT INTO `factory_ai_task_stage` VALUES (116, 103, 'DATABASE', 3, 1, 'SUCCEEDED', 'one-click.database', '1.0.0', 'one-click-generation-context:v1', 'one-click-generation-context:v1', 'database', 'front.database', 'V1', '14dcad479b01de068e5c5bc39b5cd7a591a09d334ee6812483d8ac00dd8c9d61', 'deepseek', 'deepseek-v4-flash', NULL, '2026-07-14 16:21:26', '2026-07-14 16:23:52', 145581, '', '2026-07-14 16:21:26', '2026-07-14 16:23:51');
INSERT INTO `factory_ai_task_stage` VALUES (117, 103, 'GENERATE', 4, 1, 'FAILED', 'one-click.generate', '1.0.0', 'one-click-generation-context:v1', 'one-click-generation-context:v1', NULL, NULL, NULL, NULL, NULL, NULL, NULL, '2026-07-14 16:23:52', '2026-07-14 16:23:52', 757, 'Business effect value field does not exist: created_at', '2026-07-14 16:23:51', '2026-07-14 16:23:52');
INSERT INTO `factory_ai_task_stage` VALUES (118, 104, 'PROJECT_PREPARE', 1, 1, 'SUCCEEDED', 'one-click.project-prepare', '1.0.0', 'one-click-generation-context:v1', 'one-click-generation-context:v1', NULL, NULL, NULL, NULL, NULL, NULL, NULL, '2026-07-14 17:15:01', '2026-07-14 17:15:01', 90, '', '2026-07-14 17:15:01', '2026-07-14 17:15:01');
INSERT INTO `factory_ai_task_stage` VALUES (119, 104, 'DESIGN', 2, 1, 'FAILED', 'one-click.design', '1.0.0', 'one-click-generation-context:v1', 'one-click-generation-context:v1', 'flow_config', 'front.flow_config', 'V1', '247495840c67968896ccad2db0a599bd4fc594d0189157dce888b8ede90b3257', 'deepseek', 'deepseek-v4-flash', NULL, '2026-07-14 17:15:01', '2026-07-14 17:17:53', 171341, '统计状态不存在: total_fines -> unpaid', '2026-07-14 17:15:01', '2026-07-14 17:17:52');
INSERT INTO `factory_ai_task_stage` VALUES (120, 105, 'PROJECT_PREPARE', 1, 1, 'SUCCEEDED', 'one-click.project-prepare', '1.0.0', 'one-click-generation-context:v1', 'one-click-generation-context:v1', NULL, NULL, NULL, NULL, NULL, NULL, NULL, '2026-07-14 17:19:52', '2026-07-14 17:19:52', 61, '', '2026-07-14 17:19:52', '2026-07-14 17:19:52');
INSERT INTO `factory_ai_task_stage` VALUES (121, 105, 'DESIGN', 2, 1, 'FAILED', 'one-click.design', '1.0.0', 'one-click-generation-context:v1', 'one-click-generation-context:v1', 'flow_config', 'front.flow_config', 'V1', '247495840c67968896ccad2db0a599bd4fc594d0189157dce888b8ede90b3257', 'deepseek', 'deepseek-v4-flash', NULL, '2026-07-14 17:19:52', '2026-07-14 17:20:47', 55146, 'expect \':\', but }, offset 6259, character \", line 260, column 23, fastjson-version 2.0.53\n{\n \"roles\": [\n {\n \"code\": \"admin\",\n \"name\": \"管理员\",\n \"description\": \"系统管理员,管理图书、借阅、预约、用户、轮播图、公告、新闻等\"\n },\n {\n \"code\": \"reader\",\n \"name\": \"读者\",\n \"description\": \"普通读者,可浏览图书、借书、还书、预约、取消预约\"\n }\n ],\n \"frontendMenus\": [\n {\n \"code\": \"book_catalog\",\n \"name\": \"图书目录\",\n \"path\": \"/books\",\n \"pageCode\": \"book_catalog_page\",\n \"requiresLogin\": false,\n \"visibleRoles\": [],\n \"dataScope\": \"PUBLIC\"\n },\n {\n \"code\": \"announcement\",\n \"name\": \"公告\",\n \"path\": \"/announcements\",\n \"pageCode\": \"announcement_list_page\",\n \"requiresLogin\": false,\n \"visibleRoles\": [],\n \"dataScope\": \"PUBLIC\"\n },\n {\n \"code\": \"news\",\n \"name\": \"新闻\",\n \"path\": \"/news\",\n \"pageCode\": \"news_list_page\",\n \"requiresLogin\": false,\n \"visibleRoles\": [],\n \"dataScope\": \"PUBLIC\"\n },\n {\n \"code\": \"', '2026-07-14 17:19:52', '2026-07-14 17:20:47');
INSERT INTO `factory_ai_task_stage` VALUES (122, 106, 'PROJECT_PREPARE', 1, 1, 'SUCCEEDED', 'one-click.project-prepare', '1.0.0', 'one-click-generation-context:v1', 'one-click-generation-context:v1', NULL, NULL, NULL, NULL, NULL, NULL, NULL, '2026-07-14 17:24:17', '2026-07-14 17:24:17', 64, '', '2026-07-14 17:24:16', '2026-07-14 17:24:16');
INSERT INTO `factory_ai_task_stage` VALUES (123, 106, 'DESIGN', 2, 1, 'SUCCEEDED', 'one-click.design', '1.0.0', 'one-click-generation-context:v1', 'one-click-generation-context:v1', 'flow_config', 'front.flow_config', 'V1', '247495840c67968896ccad2db0a599bd4fc594d0189157dce888b8ede90b3257', 'deepseek', 'deepseek-v4-flash', NULL, '2026-07-14 17:24:17', '2026-07-14 17:25:26', 69108, '', '2026-07-14 17:24:16', '2026-07-14 17:25:25');
INSERT INTO `factory_ai_task_stage` VALUES (124, 106, 'DATABASE', 3, 1, 'SUCCEEDED', 'one-click.database', '1.0.0', 'one-click-generation-context:v1', 'one-click-generation-context:v1', 'database', 'front.database', 'V1', '14dcad479b01de068e5c5bc39b5cd7a591a09d334ee6812483d8ac00dd8c9d61', 'deepseek', 'deepseek-v4-flash', NULL, '2026-07-14 17:25:26', '2026-07-14 17:26:38', 72262, '', '2026-07-14 17:25:25', '2026-07-14 17:26:38');
INSERT INTO `factory_ai_task_stage` VALUES (125, 106, 'GENERATE', 4, 1, 'SUCCEEDED', 'one-click.generate', '1.0.0', 'one-click-generation-context:v1', 'one-click-generation-context:v1', NULL, NULL, NULL, NULL, NULL, NULL, 100, '2026-07-14 17:26:38', '2026-07-14 17:26:55', 17208, '', '2026-07-14 17:26:38', '2026-07-14 17:26:55');
INSERT INTO `factory_ai_task_stage` VALUES (126, 106, 'VERIFY_AND_PREVIEW', 5, 1, 'RUNNING', 'one-click.verify-and-preview', '1.0.0', 'one-click-generation-context:v1', 'one-click-generation-context:v1', NULL, NULL, NULL, NULL, NULL, NULL, NULL, '2026-07-14 17:26:55', NULL, NULL, '', '2026-07-14 17:26:55', '2026-07-14 17:26:55');
INSERT INTO `factory_ai_task_stage` VALUES (127, 107, 'PROJECT_PREPARE', 1, 1, 'SUCCEEDED', 'one-click.project-prepare', '1.0.0', 'one-click-generation-context:v1', 'one-click-generation-context:v1', NULL, NULL, NULL, NULL, NULL, NULL, NULL, '2026-07-14 17:33:28', '2026-07-14 17:33:28', 144, '', '2026-07-14 17:33:28', '2026-07-14 17:33:28');
INSERT INTO `factory_ai_task_stage` VALUES (128, 107, 'DESIGN', 2, 1, 'FAILED', 'one-click.design', '1.0.0', 'one-click-generation-context:v1', 'one-click-generation-context:v1', 'flow_config', 'front.flow_config', 'V1', '247495840c67968896ccad2db0a599bd4fc594d0189157dce888b8ede90b3257', 'deepseek', 'deepseek-v4-flash', NULL, '2026-07-14 17:33:28', '2026-07-14 17:53:40', 1212000, 'Task lock expired before completion', '2026-07-14 17:33:28', '2026-07-14 17:53:40');
INSERT INTO `factory_ai_task_stage` VALUES (129, 108, 'PROJECT_PREPARE', 1, 1, 'SUCCEEDED', 'one-click.project-prepare', '1.0.0', 'one-click-generation-context:v1', 'one-click-generation-context:v1', NULL, NULL, NULL, NULL, NULL, NULL, NULL, '2026-07-14 17:54:58', '2026-07-14 17:54:59', 63, '', '2026-07-14 17:54:58', '2026-07-14 17:54:58');
INSERT INTO `factory_ai_task_stage` VALUES (130, 108, 'DESIGN', 2, 1, 'SUCCEEDED', 'one-click.design', '1.0.0', 'one-click-generation-context:v1', 'one-click-generation-context:v1', 'flow_config', 'front.flow_config', 'V1', '247495840c67968896ccad2db0a599bd4fc594d0189157dce888b8ede90b3257', 'deepseek', 'deepseek-v4-flash', NULL, '2026-07-14 17:54:59', '2026-07-14 17:56:30', 91538, '', '2026-07-14 17:54:58', '2026-07-14 17:56:30');
INSERT INTO `factory_ai_task_stage` VALUES (131, 108, 'DATABASE', 3, 1, 'SUCCEEDED', 'one-click.database', '1.0.0', 'one-click-generation-context:v1', 'one-click-generation-context:v1', 'database', 'front.database', 'V1', '14dcad479b01de068e5c5bc39b5cd7a591a09d334ee6812483d8ac00dd8c9d61', 'deepseek', 'deepseek-v4-flash', NULL, '2026-07-14 17:56:30', '2026-07-14 17:57:36', 65729, '', '2026-07-14 17:56:30', '2026-07-14 17:57:35');
INSERT INTO `factory_ai_task_stage` VALUES (132, 108, 'GENERATE', 4, 1, 'SUCCEEDED', 'one-click.generate', '1.0.0', 'one-click-generation-context:v1', 'one-click-generation-context:v1', NULL, NULL, NULL, NULL, NULL, NULL, 101, '2026-07-14 17:57:36', '2026-07-14 17:57:46', 9704, '', '2026-07-14 17:57:35', '2026-07-14 17:57:45');
INSERT INTO `factory_ai_task_stage` VALUES (133, 108, 'VERIFY_AND_PREVIEW', 5, 1, 'FAILED', 'one-click.verify-and-preview', '1.0.0', 'one-click-generation-context:v1', 'one-click-generation-context:v1', NULL, NULL, NULL, NULL, NULL, NULL, NULL, '2026-07-14 17:57:46', '2026-07-14 17:58:19', 33713, '生成的后端进程已退出', '2026-07-14 17:57:45', '2026-07-14 17:58:19');
INSERT INTO `factory_ai_task_stage` VALUES (134, 108, 'COMPLETED', 6, 1, 'SUCCEEDED', 'one-click.completed', '1.0.0', 'one-click-generation-context:v1', 'one-click-generation-context:v1', NULL, NULL, NULL, NULL, NULL, NULL, NULL, '2026-07-14 17:58:19', '2026-07-14 17:58:19', 39, '', '2026-07-14 17:58:19', '2026-07-14 17:58:19');
INSERT INTO `factory_ai_task_stage` VALUES (135, 109, 'PROJECT_PREPARE', 1, 1, 'SUCCEEDED', 'one-click.project-prepare', '1.0.0', 'one-click-generation-context:v1', 'one-click-generation-context:v1', NULL, NULL, NULL, NULL, NULL, NULL, NULL, '2026-07-14 19:46:50', '2026-07-14 19:48:12', 82603, '', '2026-07-14 19:46:49', '2026-07-14 19:48:12');
INSERT INTO `factory_ai_task_stage` VALUES (136, 109, 'DESIGN', 2, 1, 'SUCCEEDED', 'one-click.design', '1.0.0', 'one-click-generation-context:v1', 'one-click-generation-context:v1', 'flow_config', 'front.flow_config', 'V1', '247495840c67968896ccad2db0a599bd4fc594d0189157dce888b8ede90b3257', 'deepseek', 'deepseek-v4-flash', NULL, '2026-07-14 19:48:13', '2026-07-14 19:50:06', 113002, '', '2026-07-14 19:48:12', '2026-07-14 19:50:05');
INSERT INTO `factory_ai_task_stage` VALUES (137, 109, 'DATABASE', 3, 1, 'SUCCEEDED', 'one-click.database', '1.0.0', 'one-click-generation-context:v1', 'one-click-generation-context:v1', 'database', 'front.database', 'V1', '14dcad479b01de068e5c5bc39b5cd7a591a09d334ee6812483d8ac00dd8c9d61', 'deepseek', 'deepseek-v4-flash', NULL, '2026-07-14 19:50:06', '2026-07-14 19:51:07', 61710, '', '2026-07-14 19:50:05', '2026-07-14 19:51:07');
INSERT INTO `factory_ai_task_stage` VALUES (138, 109, 'GENERATE', 4, 1, 'FAILED', 'one-click.generate', '1.0.0', 'one-click-generation-context:v1', 'one-click-generation-context:v1', NULL, NULL, NULL, NULL, NULL, NULL, NULL, '2026-07-14 19:51:07', '2026-07-14 19:51:08', 387, 'Unsupported business action UI binding slot: page.actions', '2026-07-14 19:51:07', '2026-07-14 19:51:07');
INSERT INTO `factory_ai_task_stage` VALUES (139, 110, 'PROJECT_PREPARE', 1, 1, 'SUCCEEDED', 'one-click.project-prepare', '1.0.0', 'one-click-generation-context:v1', 'one-click-generation-context:v1', NULL, NULL, NULL, NULL, NULL, NULL, NULL, '2026-07-14 21:22:25', '2026-07-14 21:22:25', 75, '', '2026-07-14 21:22:25', '2026-07-14 21:22:25');
INSERT INTO `factory_ai_task_stage` VALUES (140, 110, 'DESIGN', 2, 1, 'SUCCEEDED', 'one-click.design', '1.0.0', 'one-click-generation-context:v1', 'one-click-generation-context:v1', 'flow_config', 'front.flow_config', 'V2', '493bfe3aa6bafe555f3fedab46a75c8364c303c2a589b1ffaa01196a93c6472f', 'deepseek', 'deepseek-v4-flash', NULL, '2026-07-14 21:22:25', '2026-07-14 21:23:58', 92879, '', '2026-07-14 21:22:25', '2026-07-14 21:23:57');
INSERT INTO `factory_ai_task_stage` VALUES (141, 110, 'DATABASE', 3, 1, 'FAILED', 'one-click.database', '1.0.0', 'one-click-generation-context:v1', 'one-click-generation-context:v1', 'database', 'front.database', 'V1', '14dcad479b01de068e5c5bc39b5cd7a591a09d334ee6812483d8ac00dd8c9d61', 'deepseek', 'deepseek-v4-flash', NULL, '2026-07-14 21:23:58', '2026-07-14 21:25:56', 117945, 'Flow config audit field does not exist: borrowing_record.lend_time', '2026-07-14 21:23:57', '2026-07-14 21:25:55');
INSERT INTO `factory_ai_task_stage` VALUES (142, 111, 'PROJECT_PREPARE', 1, 1, 'SUCCEEDED', 'one-click.project-prepare', '1.0.0', 'one-click-generation-context:v1', 'one-click-generation-context:v1', NULL, NULL, NULL, NULL, NULL, NULL, NULL, '2026-07-14 22:02:57', '2026-07-14 22:02:57', 76, '', '2026-07-14 22:02:57', '2026-07-14 22:02:57');
INSERT INTO `factory_ai_task_stage` VALUES (143, 111, 'DESIGN', 2, 1, 'SUCCEEDED', 'one-click.design', '1.0.0', 'one-click-generation-context:v1', 'one-click-generation-context:v1', 'flow_config', 'front.flow_config', 'V2', '493bfe3aa6bafe555f3fedab46a75c8364c303c2a589b1ffaa01196a93c6472f', 'deepseek', 'deepseek-v4-flash', NULL, '2026-07-14 22:02:57', '2026-07-14 22:04:06', 69102, '', '2026-07-14 22:02:57', '2026-07-14 22:04:06');
INSERT INTO `factory_ai_task_stage` VALUES (144, 111, 'DATABASE', 3, 1, 'SUCCEEDED', 'one-click.database', '1.0.0', 'one-click-generation-context:v1', 'one-click-generation-context:v1', 'database', 'front.database', 'V2', 'c7d0a32ce0b0055ac80348fb10c1beb758034b9c5b5637694725425bb7937cbc', 'deepseek', 'deepseek-v4-flash', NULL, '2026-07-14 22:04:06', '2026-07-14 22:05:02', 55788, '', '2026-07-14 22:04:06', '2026-07-14 22:05:02');
INSERT INTO `factory_ai_task_stage` VALUES (145, 111, 'GENERATE', 4, 1, 'SUCCEEDED', 'one-click.generate', '1.0.0', 'one-click-generation-context:v1', 'one-click-generation-context:v1', NULL, NULL, NULL, NULL, NULL, NULL, 102, '2026-07-14 22:05:02', '2026-07-14 22:05:07', 4785, '', '2026-07-14 22:05:02', '2026-07-14 22:05:06');
INSERT INTO `factory_ai_task_stage` VALUES (146, 111, 'VERIFY_AND_PREVIEW', 5, 1, 'FAILED', 'one-click.verify-and-preview', '1.0.0', 'one-click-generation-context:v1', 'one-click-generation-context:v1', NULL, NULL, NULL, NULL, NULL, NULL, NULL, '2026-07-14 22:05:07', '2026-07-14 22:05:26', 19385, '生成的后端进程已退出', '2026-07-14 22:05:06', '2026-07-14 22:05:26');
INSERT INTO `factory_ai_task_stage` VALUES (147, 111, 'COMPLETED', 6, 1, 'SUCCEEDED', 'one-click.completed', '1.0.0', 'one-click-generation-context:v1', 'one-click-generation-context:v1', NULL, NULL, NULL, NULL, NULL, NULL, NULL, '2026-07-14 22:05:26', '2026-07-14 22:05:27', 188, '', '2026-07-14 22:05:26', '2026-07-14 22:05:26');
INSERT INTO `factory_ai_task_stage` VALUES (148, 112, 'PROJECT_PREPARE', 1, 1, 'SUCCEEDED', 'one-click.project-prepare', '1.0.0', 'one-click-generation-context:v1', 'one-click-generation-context:v1', NULL, NULL, NULL, NULL, NULL, NULL, NULL, '2026-07-14 22:22:23', '2026-07-14 22:22:23', 75, '', '2026-07-14 22:22:23', '2026-07-14 22:22:23');
INSERT INTO `factory_ai_task_stage` VALUES (149, 112, 'DESIGN', 2, 1, 'SUCCEEDED', 'one-click.design', '1.0.0', 'one-click-generation-context:v1', 'one-click-generation-context:v1', 'flow_config', 'front.flow_config', 'V2', '493bfe3aa6bafe555f3fedab46a75c8364c303c2a589b1ffaa01196a93c6472f', 'deepseek', 'deepseek-v4-flash', NULL, '2026-07-14 22:22:23', '2026-07-14 22:24:51', 147431, '', '2026-07-14 22:22:23', '2026-07-14 22:24:50');
INSERT INTO `factory_ai_task_stage` VALUES (150, 112, 'DATABASE', 3, 1, 'SUCCEEDED', 'one-click.database', '1.0.0', 'one-click-generation-context:v1', 'one-click-generation-context:v1', 'database', 'front.database', 'V2', 'c7d0a32ce0b0055ac80348fb10c1beb758034b9c5b5637694725425bb7937cbc', 'deepseek', 'deepseek-v4-flash', NULL, '2026-07-14 22:24:51', '2026-07-14 22:25:56', 64640, '', '2026-07-14 22:24:50', '2026-07-14 22:25:55');
INSERT INTO `factory_ai_task_stage` VALUES (151, 112, 'GENERATE', 4, 1, 'SUCCEEDED', 'one-click.generate', '1.0.0', 'one-click-generation-context:v1', 'one-click-generation-context:v1', NULL, NULL, NULL, NULL, NULL, NULL, 103, '2026-07-14 22:25:56', '2026-07-14 22:26:05', 8993, '', '2026-07-14 22:25:55', '2026-07-14 22:26:04');
INSERT INTO `factory_ai_task_stage` VALUES (152, 112, 'VERIFY_AND_PREVIEW', 5, 1, 'FAILED', 'one-click.verify-and-preview', '1.0.0', 'one-click-generation-context:v1', 'one-click-generation-context:v1', NULL, NULL, NULL, NULL, NULL, NULL, NULL, '2026-07-14 22:26:05', '2026-07-14 22:28:16', 131557, '运行预览启动超时', '2026-07-14 22:26:04', '2026-07-14 22:28:16');
INSERT INTO `factory_ai_task_stage` VALUES (153, 112, 'COMPLETED', 6, 1, 'SUCCEEDED', 'one-click.completed', '1.0.0', 'one-click-generation-context:v1', 'one-click-generation-context:v1', NULL, NULL, NULL, NULL, NULL, NULL, NULL, '2026-07-14 22:28:16', '2026-07-14 22:28:16', 46, '', '2026-07-14 22:28:16', '2026-07-14 22:28:16');
INSERT INTO `factory_ai_task_stage` VALUES (154, 113, 'PROJECT_PREPARE', 1, 1, 'SUCCEEDED', 'one-click.project-prepare', '1.0.0', 'one-click-generation-context:v1', 'one-click-generation-context:v1', NULL, NULL, NULL, NULL, NULL, NULL, NULL, '2026-07-15 08:50:42', '2026-07-15 08:50:42', 138, '', '2026-07-15 08:50:42', '2026-07-15 08:50:42');
INSERT INTO `factory_ai_task_stage` VALUES (155, 113, 'DESIGN', 2, 1, 'SUCCEEDED', 'one-click.design', '1.0.0', 'one-click-generation-context:v1', 'one-click-generation-context:v1', 'flow_config', 'front.flow_config', 'V2', '493bfe3aa6bafe555f3fedab46a75c8364c303c2a589b1ffaa01196a93c6472f', 'deepseek', 'deepseek-v4-flash', NULL, '2026-07-15 08:50:42', '2026-07-15 08:52:51', 129113, '', '2026-07-15 08:50:42', '2026-07-15 08:52:51');
INSERT INTO `factory_ai_task_stage` VALUES (156, 113, 'DATABASE', 3, 1, 'SUCCEEDED', 'one-click.database', '1.0.0', 'one-click-generation-context:v1', 'one-click-generation-context:v1', 'database', 'front.database', 'V2', 'c7d0a32ce0b0055ac80348fb10c1beb758034b9c5b5637694725425bb7937cbc', 'deepseek', 'deepseek-v4-flash', NULL, '2026-07-15 08:52:51', '2026-07-15 08:54:21', 89857, '', '2026-07-15 08:52:51', '2026-07-15 08:54:21');
INSERT INTO `factory_ai_task_stage` VALUES (157, 113, 'GENERATE', 4, 1, 'FAILED', 'one-click.generate', '1.0.0', 'one-click-generation-context:v1', 'one-click-generation-context:v1', NULL, NULL, NULL, NULL, NULL, NULL, NULL, '2026-07-15 08:54:21', '2026-07-15 08:54:22', 425, 'Flow config effect target table has no primary key: book_info', '2026-07-15 08:54:21', '2026-07-15 08:54:21');
INSERT INTO `factory_ai_task_stage` VALUES (158, 114, 'PROJECT_PREPARE', 1, 1, 'SUCCEEDED', 'one-click.project-prepare', '1.0.0', 'one-click-generation-context:v1', 'one-click-generation-context:v1', NULL, NULL, NULL, NULL, NULL, NULL, NULL, '2026-07-15 09:25:49', '2026-07-15 09:25:50', 141, '', '2026-07-15 09:25:49', '2026-07-15 09:25:49');
INSERT INTO `factory_ai_task_stage` VALUES (159, 114, 'DESIGN', 2, 1, 'SUCCEEDED', 'one-click.design', '1.0.0', 'one-click-generation-context:v1', 'one-click-generation-context:v1', 'flow_config', 'front.flow_config', 'V2', '493bfe3aa6bafe555f3fedab46a75c8364c303c2a589b1ffaa01196a93c6472f', 'deepseek', 'deepseek-v4-flash', NULL, '2026-07-15 09:25:50', '2026-07-15 09:26:59', 69443, '', '2026-07-15 09:25:49', '2026-07-15 09:26:59');
INSERT INTO `factory_ai_task_stage` VALUES (160, 114, 'DATABASE', 3, 1, 'SUCCEEDED', 'one-click.database', '1.0.0', 'one-click-generation-context:v1', 'one-click-generation-context:v1', 'database', 'front.database', 'V2', 'c7d0a32ce0b0055ac80348fb10c1beb758034b9c5b5637694725425bb7937cbc', 'deepseek', 'deepseek-v4-flash', NULL, '2026-07-15 09:26:59', '2026-07-15 09:29:27', 148250, '', '2026-07-15 09:26:59', '2026-07-15 09:29:27');
INSERT INTO `factory_ai_task_stage` VALUES (161, 114, 'GENERATE', 4, 1, 'SUCCEEDED', 'one-click.generate', '1.0.0', 'one-click-generation-context:v1', 'one-click-generation-context:v1', NULL, NULL, NULL, NULL, NULL, NULL, 104, '2026-07-15 09:29:27', '2026-07-15 09:29:32', 4876, '', '2026-07-15 09:29:27', '2026-07-15 09:29:32');
INSERT INTO `factory_ai_task_stage` VALUES (162, 114, 'VERIFY_AND_PREVIEW', 5, 1, 'SUCCEEDED', 'one-click.verify-and-preview', '1.0.0', 'one-click-generation-context:v1', 'one-click-generation-context:v1', NULL, NULL, NULL, NULL, NULL, NULL, NULL, '2026-07-15 09:29:32', '2026-07-15 09:30:39', 67058, '', '2026-07-15 09:29:32', '2026-07-15 09:30:39');
INSERT INTO `factory_ai_task_stage` VALUES (163, 114, 'COMPLETED', 6, 1, 'SUCCEEDED', 'one-click.completed', '1.0.0', 'one-click-generation-context:v1', 'one-click-generation-context:v1', NULL, NULL, NULL, NULL, NULL, NULL, NULL, '2026-07-15 09:30:39', '2026-07-15 09:30:39', 45, '', '2026-07-15 09:30:39', '2026-07-15 09:30:39');
INSERT INTO `factory_ai_task_stage` VALUES (164, 116, 'PROJECT_PREPARE', 1, 1, 'SUCCEEDED', 'one-click.project-prepare', '1.0.0', 'one-click-generation-context:v1', 'one-click-generation-context:v1', NULL, NULL, NULL, NULL, NULL, NULL, NULL, '2026-07-15 10:57:56', '2026-07-15 10:57:56', 74, '', '2026-07-15 10:57:55', '2026-07-15 10:57:55');
INSERT INTO `factory_ai_task_stage` VALUES (165, 116, 'DESIGN', 2, 1, 'SUCCEEDED', 'one-click.design', '1.0.0', 'one-click-generation-context:v1', 'one-click-generation-context:v1', 'flow_config', 'front.flow_config', 'v3', '9443d0ca8f3e4bb87cdc13ef4924015fff334f0c9b8690573f0551dd18708406', 'deepseek', 'deepseek-v4-flash', NULL, '2026-07-15 10:57:56', '2026-07-15 10:58:51', 55565, '', '2026-07-15 10:57:55', '2026-07-15 10:58:51');
INSERT INTO `factory_ai_task_stage` VALUES (166, 116, 'DATABASE', 3, 1, 'SUCCEEDED', 'one-click.database', '1.0.0', 'one-click-generation-context:v1', 'one-click-generation-context:v1', 'database', 'front.database', 'V2', 'c7d0a32ce0b0055ac80348fb10c1beb758034b9c5b5637694725425bb7937cbc', 'deepseek', 'deepseek-v4-flash', NULL, '2026-07-15 10:58:51', '2026-07-15 11:00:10', 78559, '', '2026-07-15 10:58:51', '2026-07-15 11:00:09');
INSERT INTO `factory_ai_task_stage` VALUES (167, 116, 'GENERATE', 4, 1, 'SUCCEEDED', 'one-click.generate', '1.0.0', 'one-click-generation-context:v1', 'one-click-generation-context:v1', NULL, NULL, NULL, NULL, NULL, NULL, 105, '2026-07-15 11:00:10', '2026-07-15 11:00:20', 9932, '', '2026-07-15 11:00:09', '2026-07-15 11:00:19');
INSERT INTO `factory_ai_task_stage` VALUES (168, 116, 'VERIFY_AND_PREVIEW', 5, 1, 'SUCCEEDED', 'one-click.verify-and-preview', '1.0.0', 'one-click-generation-context:v1', 'one-click-generation-context:v1', NULL, NULL, NULL, NULL, NULL, NULL, NULL, '2026-07-15 11:00:20', '2026-07-15 11:01:28', 67911, '', '2026-07-15 11:00:19', '2026-07-15 11:01:27');
INSERT INTO `factory_ai_task_stage` VALUES (169, 116, 'COMPLETED', 6, 1, 'SUCCEEDED', 'one-click.completed', '1.0.0', 'one-click-generation-context:v1', 'one-click-generation-context:v1', NULL, NULL, NULL, NULL, NULL, NULL, NULL, '2026-07-15 11:01:28', '2026-07-15 11:01:28', 45, '', '2026-07-15 11:01:27', '2026-07-15 11:01:27');
-- ----------------------------
-- Table structure for factory_generation_file
-- ----------------------------
DROP TABLE IF EXISTS `factory_generation_file`;
CREATE TABLE `factory_generation_file` (
`generation_file_id` bigint(20) NOT NULL AUTO_INCREMENT COMMENT 'Generated file manifest ID',
`generation_target_id` bigint(20) NOT NULL COMMENT 'Generated target ID',
`file_path` varchar(1024) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NOT NULL COMMENT 'Relative generated file path',
`file_size` bigint(20) NOT NULL DEFAULT 0 COMMENT 'Generated file bytes',
`content_hash` char(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NOT NULL COMMENT 'Generated file SHA-256',
PRIMARY KEY (`generation_file_id`) USING BTREE,
INDEX `idx_factory_file_target`(`generation_target_id`) USING BTREE,
CONSTRAINT `fk_factory_file_target` FOREIGN KEY (`generation_target_id`) REFERENCES `factory_generation_target` (`generation_target_id`) ON DELETE CASCADE ON UPDATE RESTRICT
) ENGINE = InnoDB AUTO_INCREMENT = 100 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_0900_ai_ci COMMENT = 'Generated file manifests' ROW_FORMAT = Dynamic;
-- ----------------------------
-- Table structure for factory_generation_run
-- ----------------------------
DROP TABLE IF EXISTS `factory_generation_run`;
CREATE TABLE `factory_generation_run` (
`generation_run_id` bigint(20) NOT NULL AUTO_INCREMENT COMMENT 'Generation run ID',
`project_id` bigint(20) NOT NULL COMMENT 'Front project ID',
`user_id` bigint(20) NOT NULL COMMENT 'Front user ID',
`spec_version_id` bigint(20) NOT NULL COMMENT 'ProjectSpec version ID',
`spec_version_no` int(11) NOT NULL COMMENT 'ProjectSpec version number at generation',
`spec_content_hash` char(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NOT NULL COMMENT 'ProjectSpec SHA-256',
`adapter_code` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NOT NULL COMMENT 'Generation adapter code',
`adapter_version` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NOT NULL COMMENT 'Generation adapter contract version',
`adapter_fingerprint` char(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NOT NULL COMMENT 'Adapter descriptor SHA-256',
`adapter_capability_fingerprint` char(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NOT NULL COMMENT 'Adapter capability descriptor SHA-256',
`adapter_capabilities_json` longtext CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NOT NULL COMMENT 'Canonical adapter capability snapshot',
`plugin_fingerprint` char(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NOT NULL COMMENT 'Selected plugin descriptor SHA-256',
`plugin_plan_json` longtext CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NOT NULL COMMENT 'Canonical resolved Plugin execution plan',
`template_code` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NOT NULL COMMENT 'Template pack code',
`template_version` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NOT NULL COMMENT 'Template contract version',
`template_fingerprint` char(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NOT NULL COMMENT 'Template descriptor SHA-256',
`environment_fingerprint` char(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NOT NULL COMMENT 'Aggregate environment SHA-256',
`aggregate_content_hash` char(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NOT NULL COMMENT 'Generated file manifest SHA-256',
`target_count` int(11) NOT NULL DEFAULT 0 COMMENT 'Generated target count',
`file_count` int(11) NOT NULL DEFAULT 0 COMMENT 'Generated file count',
`total_bytes` bigint(20) NOT NULL DEFAULT 0 COMMENT 'Uncompressed generated bytes',
`status` varchar(20) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NOT NULL DEFAULT 'SUCCEEDED' COMMENT 'Run status',
`create_time` datetime(0) NOT NULL COMMENT 'Completion time',
PRIMARY KEY (`generation_run_id`) USING BTREE,
INDEX `idx_factory_run_user_project`(`user_id`, `project_id`) USING BTREE,
INDEX `idx_factory_run_spec_version`(`spec_version_id`) USING BTREE,
INDEX `idx_factory_run_project_hash`(`project_id`, `aggregate_content_hash`) USING BTREE,
CONSTRAINT `fk_factory_run_project` FOREIGN KEY (`project_id`) REFERENCES `front_project` (`project_id`) ON DELETE CASCADE ON UPDATE RESTRICT,
CONSTRAINT `fk_factory_run_spec` FOREIGN KEY (`spec_version_id`) REFERENCES `factory_project_spec_version` (`spec_version_id`) ON DELETE CASCADE ON UPDATE RESTRICT
) ENGINE = InnoDB AUTO_INCREMENT = 100 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_0900_ai_ci COMMENT = 'Successful ProjectSpec generation runs' ROW_FORMAT = Dynamic;
-- ----------------------------
-- Table structure for factory_generation_target
-- ----------------------------
DROP TABLE IF EXISTS `factory_generation_target`;
CREATE TABLE `factory_generation_target` (
`generation_target_id` bigint(20) NOT NULL AUTO_INCREMENT COMMENT 'Generated target ID',
`generation_run_id` bigint(20) NOT NULL COMMENT 'Generation run ID',
`template_type` varchar(40) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NOT NULL COMMENT 'Generation target type',
`content_hash` char(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NOT NULL COMMENT 'Target manifest SHA-256',
`file_count` int(11) NOT NULL DEFAULT 0 COMMENT 'Target file count',
`total_bytes` bigint(20) NOT NULL DEFAULT 0 COMMENT 'Target uncompressed bytes',
PRIMARY KEY (`generation_target_id`) USING BTREE,
UNIQUE INDEX `uk_factory_target_run_type`(`generation_run_id`, `template_type`) USING BTREE,
CONSTRAINT `fk_factory_target_run` FOREIGN KEY (`generation_run_id`) REFERENCES `factory_generation_run` (`generation_run_id`) ON DELETE CASCADE ON UPDATE RESTRICT
) ENGINE = InnoDB AUTO_INCREMENT = 100 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_0900_ai_ci COMMENT = 'Generation target manifests' ROW_FORMAT = Dynamic;
-- ----------------------------
-- Table structure for factory_plugin
-- ----------------------------
DROP TABLE IF EXISTS `factory_plugin`;
CREATE TABLE `factory_plugin` (
`plugin_id` bigint(20) NOT NULL AUTO_INCREMENT COMMENT 'Feature Plugin ID',
`plugin_code` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NOT NULL COMMENT 'Stable Plugin code',
`plugin_name` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NOT NULL COMMENT 'Plugin name',
`provider` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NOT NULL COMMENT 'Trusted provider code',
`description` varchar(500) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT '' COMMENT 'Plugin purpose',
`status` char(1) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NOT NULL DEFAULT '0' COMMENT '0 enabled, 1 disabled',
`current_version_id` bigint(20) NULL DEFAULT NULL COMMENT 'Current published version ID',
`create_by` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT '' COMMENT 'Creator',
`create_time` datetime(0) NOT NULL COMMENT 'Create time',
`update_by` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT '' COMMENT 'Updater',
`update_time` datetime(0) NOT NULL COMMENT 'Update time',
`remark` varchar(500) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT '' COMMENT 'Remark',
PRIMARY KEY (`plugin_id`) USING BTREE,
UNIQUE INDEX `uk_factory_plugin_code`(`plugin_code`) USING BTREE,
INDEX `idx_factory_plugin_current_version`(`current_version_id`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 100 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_0900_ai_ci COMMENT = 'Feature Plugin registry' ROW_FORMAT = Dynamic;
-- ----------------------------
-- Table structure for factory_plugin_delivery_rehearsal_attempt
-- ----------------------------
DROP TABLE IF EXISTS `factory_plugin_delivery_rehearsal_attempt`;
CREATE TABLE `factory_plugin_delivery_rehearsal_attempt` (
`attempt_id` bigint(20) NOT NULL AUTO_INCREMENT COMMENT 'Local rehearsal attempt ID',
`rehearsal_id` bigint(20) NOT NULL COMMENT 'Delivery rehearsal run ID',
`retry_of_attempt_id` bigint(20) NULL DEFAULT NULL COMMENT 'Terminal attempt replayed from scratch',
`attempt_no` int(11) NOT NULL COMMENT 'Monotonic attempt number within Run',
`attempt_key` char(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NOT NULL COMMENT 'Unique attempt identity SHA-256',
`execution_mode` varchar(20) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NOT NULL COMMENT 'LOCAL_H2 only',
`status` varchar(20) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NOT NULL COMMENT 'PENDING, RUNNING, SUCCEEDED, FAILED, ABORTED',
`run_key` char(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NOT NULL COMMENT 'Frozen parent Run identity',
`acceptance_fingerprint` char(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NOT NULL COMMENT 'Frozen acceptance snapshot SHA-256',
`scenario_fingerprint` char(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NOT NULL COMMENT 'Frozen scenario plan SHA-256',
`sandbox_fingerprint` char(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NOT NULL COMMENT 'Ephemeral local sandbox identity',
`receipt_count` int(11) NOT NULL DEFAULT 0 COMMENT 'Expected scenario receipt count',
`succeeded_receipt_count` int(11) NOT NULL DEFAULT 0 COMMENT 'Completed scenario receipt count',
`started_by` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NOT NULL COMMENT 'Authenticated rehearsal operator',
`create_time` datetime(0) NOT NULL COMMENT 'Attempt creation time',
`started_at` datetime(0) NULL DEFAULT NULL COMMENT 'Attempt start time',
`finished_at` datetime(0) NULL DEFAULT NULL COMMENT 'Attempt terminal time',
`duration_millis` bigint(20) NULL DEFAULT NULL COMMENT 'Attempt duration',
`error_message` varchar(1000) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT '' COMMENT 'Sanitized terminal error',
PRIMARY KEY (`attempt_id`) USING BTREE,
UNIQUE INDEX `uk_factory_plugin_rehearsal_attempt_key`(`attempt_key`) USING BTREE,
UNIQUE INDEX `uk_factory_plugin_rehearsal_attempt_no`(`rehearsal_id`, `attempt_no`) USING BTREE,
INDEX `idx_factory_plugin_rehearsal_attempt_status`(`rehearsal_id`, `status`, `attempt_id`) USING BTREE,
INDEX `idx_factory_plugin_rehearsal_retry`(`retry_of_attempt_id`) USING BTREE,
CONSTRAINT `fk_factory_plugin_rehearsal_attempt_run` FOREIGN KEY (`rehearsal_id`) REFERENCES `factory_plugin_delivery_rehearsal_run` (`rehearsal_id`) ON DELETE CASCADE ON UPDATE RESTRICT
) ENGINE = InnoDB AUTO_INCREMENT = 100 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_0900_ai_ci COMMENT = 'Local H2 Plugin delivery rehearsal attempts' ROW_FORMAT = Dynamic;
-- ----------------------------
-- Table structure for factory_plugin_delivery_rehearsal_outbox
-- ----------------------------
DROP TABLE IF EXISTS `factory_plugin_delivery_rehearsal_outbox`;
CREATE TABLE `factory_plugin_delivery_rehearsal_outbox` (
`outbox_id` bigint(20) NOT NULL AUTO_INCREMENT COMMENT 'Durable rehearsal command ID',
`attempt_id` bigint(20) NOT NULL COMMENT 'Local rehearsal attempt ID',
`status` varchar(20) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NOT NULL COMMENT 'PENDING, PROCESSING, DELIVERED, FAILED, ABORTED',
`available_at` datetime(0) NOT NULL COMMENT 'Earliest claim time',
`lease_owner` varchar(128) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT '' COMMENT 'Current worker identity',
`lease_token` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT '' COMMENT 'Private fencing token',
`lease_until` datetime(0) NULL DEFAULT NULL COMMENT 'Lease expiry time',
`last_heartbeat_at` datetime(0) NULL DEFAULT NULL COMMENT 'Last successful lease heartbeat',
`delivery_count` int(11) NOT NULL DEFAULT 0 COMMENT 'Claim and takeover count',
`last_error` varchar(1000) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT '' COMMENT 'Sanitized delivery error',
`create_time` datetime(0) NOT NULL COMMENT 'Command creation time',
`delivered_at` datetime(0) NULL DEFAULT NULL COMMENT 'Terminal delivery time',
PRIMARY KEY (`outbox_id`) USING BTREE,
UNIQUE INDEX `uk_factory_plugin_rehearsal_outbox_attempt`(`attempt_id`) USING BTREE,
INDEX `idx_factory_plugin_rehearsal_outbox_claim`(`status`, `available_at`, `lease_until`) USING BTREE,
CONSTRAINT `fk_factory_plugin_rehearsal_outbox_attempt` FOREIGN KEY (`attempt_id`) REFERENCES `factory_plugin_delivery_rehearsal_attempt` (`attempt_id`) ON DELETE CASCADE ON UPDATE RESTRICT
) ENGINE = InnoDB AUTO_INCREMENT = 100 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_0900_ai_ci COMMENT = 'Durable local rehearsal Outbox commands' ROW_FORMAT = Dynamic;
-- ----------------------------
-- Table structure for factory_plugin_delivery_rehearsal_receipt
-- ----------------------------
DROP TABLE IF EXISTS `factory_plugin_delivery_rehearsal_receipt`;
CREATE TABLE `factory_plugin_delivery_rehearsal_receipt` (
`receipt_id` bigint(20) NOT NULL AUTO_INCREMENT COMMENT 'Scenario execution receipt ID',
`attempt_id` bigint(20) NOT NULL COMMENT 'Local rehearsal attempt ID',
`scenario_id` bigint(20) NOT NULL COMMENT 'Frozen rehearsal scenario ID',
`scenario_sequence` int(11) NOT NULL COMMENT 'Stable scenario order',
`scenario_code` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NOT NULL COMMENT 'Stable scenario code',
`scenario_name` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NOT NULL COMMENT 'Frozen scenario display name',
`status` varchar(20) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NOT NULL COMMENT 'PENDING, RUNNING, SUCCEEDED, FAILED, ABORTED',
`evidence_json` longtext CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL COMMENT 'Canonical non-secret scenario evidence',
`evidence_fingerprint` char(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT '' COMMENT 'Scenario evidence SHA-256',
`message` varchar(1000) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT '' COMMENT 'Sanitized scenario result',
`started_at` datetime(0) NULL DEFAULT NULL COMMENT 'Scenario start time',
`finished_at` datetime(0) NULL DEFAULT NULL COMMENT 'Scenario terminal time',
`duration_millis` bigint(20) NULL DEFAULT NULL COMMENT 'Scenario duration',
PRIMARY KEY (`receipt_id`) USING BTREE,
UNIQUE INDEX `uk_factory_plugin_rehearsal_receipt_code`(`attempt_id`, `scenario_code`) USING BTREE,
UNIQUE INDEX `uk_factory_plugin_rehearsal_receipt_sequence`(`attempt_id`, `scenario_sequence`) USING BTREE,
INDEX `idx_factory_plugin_rehearsal_receipt_status`(`attempt_id`, `status`) USING BTREE,
INDEX `fk_factory_plugin_rehearsal_receipt_scenario`(`scenario_id`) USING BTREE,
CONSTRAINT `fk_factory_plugin_rehearsal_receipt_attempt` FOREIGN KEY (`attempt_id`) REFERENCES `factory_plugin_delivery_rehearsal_attempt` (`attempt_id`) ON DELETE CASCADE ON UPDATE RESTRICT,
CONSTRAINT `fk_factory_plugin_rehearsal_receipt_scenario` FOREIGN KEY (`scenario_id`) REFERENCES `factory_plugin_delivery_rehearsal_scenario` (`scenario_id`) ON DELETE RESTRICT ON UPDATE RESTRICT
) ENGINE = InnoDB AUTO_INCREMENT = 100 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_0900_ai_ci COMMENT = 'Verified local rehearsal scenario receipts' ROW_FORMAT = Dynamic;
-- ----------------------------
-- Table structure for factory_plugin_delivery_rehearsal_run
-- ----------------------------
DROP TABLE IF EXISTS `factory_plugin_delivery_rehearsal_run`;
CREATE TABLE `factory_plugin_delivery_rehearsal_run` (
`rehearsal_id` bigint(20) NOT NULL AUTO_INCREMENT COMMENT 'Delivery rehearsal run ID',
`run_key` char(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NOT NULL COMMENT 'Unique rehearsal identity SHA-256',
`schema_version` varchar(20) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NOT NULL COMMENT 'Rehearsal snapshot schema version',
`rehearsal_mode` varchar(20) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NOT NULL COMMENT 'PLAN_ONLY until an isolated target is explicitly authorized',
`status` varchar(20) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NOT NULL COMMENT 'READY or BLOCKED by acceptance snapshot',
`execution_environment_code` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT '' COMMENT 'Frozen control-plane environment',
`target_environment_code` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT '' COMMENT 'Frozen JDBC target environment',
`target_catalog` varchar(128) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT '' COMMENT 'Non-secret target catalog identity',
`routing_fingerprint` char(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NOT NULL COMMENT 'Frozen executor routing SHA-256',
`acceptance_fingerprint` char(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NOT NULL COMMENT 'Acceptance snapshot SHA-256',
`scenario_fingerprint` char(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NOT NULL COMMENT 'Ordered scenario report SHA-256',
`acceptance_snapshot_json` longtext CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NOT NULL COMMENT 'Canonical non-secret acceptance snapshot',
`check_count` int(11) NOT NULL DEFAULT 0 COMMENT 'Frozen acceptance check count',
`passed_check_count` int(11) NOT NULL DEFAULT 0 COMMENT 'Frozen passed check count',
`scenario_count` int(11) NOT NULL DEFAULT 0 COMMENT 'Frozen rehearsal scenario count',
`created_by` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NOT NULL COMMENT 'Authenticated planner account',
`create_time` datetime(0) NOT NULL COMMENT 'Snapshot creation time',
PRIMARY KEY (`rehearsal_id`) USING BTREE,
UNIQUE INDEX `uk_factory_plugin_rehearsal_run_key`(`run_key`) USING BTREE,
INDEX `idx_factory_plugin_rehearsal_created`(`status`, `create_time`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 100 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_0900_ai_ci COMMENT = 'Append-only Plugin delivery rehearsal runs' ROW_FORMAT = Dynamic;
-- ----------------------------
-- Table structure for factory_plugin_delivery_rehearsal_scenario
-- ----------------------------
DROP TABLE IF EXISTS `factory_plugin_delivery_rehearsal_scenario`;
CREATE TABLE `factory_plugin_delivery_rehearsal_scenario` (
`scenario_id` bigint(20) NOT NULL AUTO_INCREMENT COMMENT 'Rehearsal scenario ID',
`rehearsal_id` bigint(20) NOT NULL COMMENT 'Delivery rehearsal run ID',
`scenario_sequence` int(11) NOT NULL COMMENT 'Stable scenario order',
`scenario_code` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NOT NULL COMMENT 'Stable scenario code',
`scenario_name` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NOT NULL COMMENT 'Scenario display name',
`state` varchar(20) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NOT NULL COMMENT 'PLANNED or BLOCKED',
`required_evidence` varchar(1000) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NOT NULL COMMENT 'Evidence required for completion',
`message` varchar(1000) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NOT NULL COMMENT 'Planning result',
PRIMARY KEY (`scenario_id`) USING BTREE,
UNIQUE INDEX `uk_factory_plugin_rehearsal_scenario`(`rehearsal_id`, `scenario_code`) USING BTREE,
UNIQUE INDEX `uk_factory_plugin_rehearsal_sequence`(`rehearsal_id`, `scenario_sequence`) USING BTREE,
CONSTRAINT `fk_factory_plugin_rehearsal_scenario_run` FOREIGN KEY (`rehearsal_id`) REFERENCES `factory_plugin_delivery_rehearsal_run` (`rehearsal_id`) ON DELETE CASCADE ON UPDATE RESTRICT
) ENGINE = InnoDB AUTO_INCREMENT = 100 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_0900_ai_ci COMMENT = 'Immutable Plugin delivery rehearsal scenario report' ROW_FORMAT = Dynamic;
-- ----------------------------
-- Table structure for factory_plugin_transition
-- ----------------------------
DROP TABLE IF EXISTS `factory_plugin_transition`;
CREATE TABLE `factory_plugin_transition` (
`transition_id` bigint(20) NOT NULL AUTO_INCREMENT COMMENT 'Plugin transition journal ID',
`plugin_id` bigint(20) NOT NULL COMMENT 'Feature Plugin ID',
`from_version_id` bigint(20) NULL DEFAULT NULL COMMENT 'Previous Plugin version ID',
`to_version_id` bigint(20) NOT NULL COMMENT 'Target Plugin version ID',
`operation` varchar(20) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NOT NULL COMMENT 'PUBLISH, RESTORE, BOOTSTRAP, REPAIR',
`transition_plan_json` longtext CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NOT NULL COMMENT 'Canonical immutable contribution transition plan',
`transition_fingerprint` char(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NOT NULL COMMENT 'Canonical transition plan SHA-256',
`step_count` int(11) NOT NULL DEFAULT 0 COMMENT 'Artifact step count',
`status` varchar(20) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NOT NULL DEFAULT 'RECORDED' COMMENT 'Append-only journal status',
`operator` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT '' COMMENT 'Transition operator',
`create_time` datetime(0) NOT NULL COMMENT 'Journal time',
PRIMARY KEY (`transition_id`) USING BTREE,
INDEX `idx_factory_plugin_transition_time`(`plugin_id`, `create_time`) USING BTREE,
INDEX `idx_factory_plugin_transition_target`(`to_version_id`) USING BTREE,
CONSTRAINT `fk_factory_plugin_transition_plugin` FOREIGN KEY (`plugin_id`) REFERENCES `factory_plugin` (`plugin_id`) ON DELETE CASCADE ON UPDATE RESTRICT
) ENGINE = InnoDB AUTO_INCREMENT = 100 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_0900_ai_ci COMMENT = 'Immutable Feature Plugin transition journal' ROW_FORMAT = Dynamic;
-- ----------------------------
-- Table structure for factory_plugin_transition_approval
-- ----------------------------
DROP TABLE IF EXISTS `factory_plugin_transition_approval`;
CREATE TABLE `factory_plugin_transition_approval` (
`approval_id` bigint(20) NOT NULL AUTO_INCREMENT COMMENT 'Transition approval ID',
`transition_id` bigint(20) NOT NULL COMMENT 'Plugin transition journal ID',
`execution_mode` varchar(20) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NOT NULL COMMENT 'APPLY, RETRY, COMPENSATE',
`transition_fingerprint` char(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NOT NULL COMMENT 'Frozen Transition SHA-256',
`routing_fingerprint` char(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NOT NULL COMMENT 'Frozen executor routing SHA-256',
`environment_code` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NOT NULL COMMENT 'Frozen execution environment',
`executor_code` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NOT NULL COMMENT 'Frozen summary Executor code',
`status` varchar(20) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NOT NULL COMMENT 'PENDING, APPROVED, REVOKED, CONSUMED, EXPIRED',
`requested_by` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NOT NULL COMMENT 'Approval requester',
`requester_roles` varchar(1000) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NOT NULL COMMENT 'Frozen requester role keys',
`request_reason` varchar(500) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NOT NULL COMMENT 'Execution request reason',
`requested_at` datetime(0) NOT NULL COMMENT 'Request time',
`request_expires_at` datetime(0) NOT NULL COMMENT 'Pending request expiry',
`approved_by` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT '' COMMENT 'Distinct approval operator',
`approver_roles` varchar(1000) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT '' COMMENT 'Frozen approver role keys',
`approved_at` datetime(0) NULL DEFAULT NULL COMMENT 'Approval time',
`approval_reason` varchar(500) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT '' COMMENT 'Approval decision reason',
`expires_at` datetime(0) NULL DEFAULT NULL COMMENT 'Approved evidence expiry',
`revoked_by` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT '' COMMENT 'Revocation operator',
`revoker_roles` varchar(1000) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT '' COMMENT 'Frozen revoker role keys',
`revoked_at` datetime(0) NULL DEFAULT NULL COMMENT 'Revocation time',
`revocation_reason` varchar(500) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT '' COMMENT 'Revocation reason',
`consumed_by` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT '' COMMENT 'Execution operator consuming approval',
`consumed_at` datetime(0) NULL DEFAULT NULL COMMENT 'Approval consumption time',
`execution_id` bigint(20) NULL DEFAULT NULL COMMENT 'Created execution batch ID',
`create_time` datetime(0) NOT NULL COMMENT 'Creation time',
`update_time` datetime(0) NOT NULL COMMENT 'Last lifecycle update',
PRIMARY KEY (`approval_id`) USING BTREE,
UNIQUE INDEX `uk_factory_plugin_approval_execution`(`execution_id`) USING BTREE,
INDEX `idx_factory_plugin_approval_status`(`transition_id`, `status`, `approval_id`) USING BTREE,
INDEX `idx_factory_plugin_approval_expiry`(`status`, `request_expires_at`, `expires_at`) USING BTREE,
CONSTRAINT `fk_factory_plugin_approval_transition` FOREIGN KEY (`transition_id`) REFERENCES `factory_plugin_transition` (`transition_id`) ON DELETE CASCADE ON UPDATE RESTRICT
) ENGINE = InnoDB AUTO_INCREMENT = 100 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_0900_ai_ci COMMENT = 'Plugin transition separation-of-duties approvals' ROW_FORMAT = Dynamic;
-- ----------------------------
-- Table structure for factory_plugin_transition_execution
-- ----------------------------
DROP TABLE IF EXISTS `factory_plugin_transition_execution`;
CREATE TABLE `factory_plugin_transition_execution` (
`execution_id` bigint(20) NOT NULL AUTO_INCREMENT COMMENT 'Transition execution batch ID',
`transition_id` bigint(20) NOT NULL COMMENT 'Plugin transition journal ID',
`attempt_no` int(11) NOT NULL COMMENT 'Monotonic execution attempt',
`execution_mode` varchar(20) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NOT NULL COMMENT 'APPLY, RETRY, COMPENSATE',
`executor_code` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NOT NULL COMMENT 'Configured target executor code',
`environment_code` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NOT NULL DEFAULT '' COMMENT 'Frozen execution environment',
`routing_fingerprint` char(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NOT NULL DEFAULT '' COMMENT 'Frozen executor routing SHA-256',
`approval_required` tinyint(1) NOT NULL DEFAULT 0 COMMENT 'Whether durable approval was required',
`approval_id` bigint(20) NULL DEFAULT NULL COMMENT 'Consumed approval ID',
`requested_by` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT '' COMMENT 'Approval requester snapshot',
`requester_roles` varchar(1000) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT '' COMMENT 'Requester role snapshot',
`request_reason` varchar(500) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT '' COMMENT 'Execution request reason snapshot',
`approved_by` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT '' COMMENT 'Approval operator',
`approver_roles` varchar(1000) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT '' COMMENT 'Approver role snapshot',
`approved_at` datetime(0) NULL DEFAULT NULL COMMENT 'Approval time',
`approval_reason` varchar(500) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT '' COMMENT 'Approval reason',
`approval_expires_at` datetime(0) NULL DEFAULT NULL COMMENT 'Approval evidence expiry',
`idempotency_key` char(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NOT NULL COMMENT 'Execution idempotency SHA-256',
`status` varchar(20) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NOT NULL COMMENT 'QUEUED, RUNNING, SUCCEEDED, FAILED',
`started_by` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT '' COMMENT 'Execution operator',
`started_at` datetime(0) NULL DEFAULT NULL COMMENT 'Execution start time',
`finished_at` datetime(0) NULL DEFAULT NULL COMMENT 'Execution finish time',
`duration_millis` bigint(20) NULL DEFAULT NULL COMMENT 'Execution duration',
`error_message` varchar(1000) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT '' COMMENT 'Sanitized execution error',
PRIMARY KEY (`execution_id`) USING BTREE,
UNIQUE INDEX `uk_factory_plugin_execution_attempt`(`transition_id`, `attempt_no`) USING BTREE,
UNIQUE INDEX `uk_factory_plugin_execution_idempotency`(`idempotency_key`) USING BTREE,
INDEX `idx_factory_plugin_execution_approval`(`approval_id`) USING BTREE,
INDEX `idx_factory_plugin_execution_status`(`transition_id`, `status`) USING BTREE,
CONSTRAINT `fk_factory_plugin_execution_transition` FOREIGN KEY (`transition_id`) REFERENCES `factory_plugin_transition` (`transition_id`) ON DELETE CASCADE ON UPDATE RESTRICT
) ENGINE = InnoDB AUTO_INCREMENT = 100 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_0900_ai_ci COMMENT = 'Plugin transition execution batches' ROW_FORMAT = Dynamic;
-- ----------------------------
-- Table structure for factory_plugin_transition_outbox
-- ----------------------------
DROP TABLE IF EXISTS `factory_plugin_transition_outbox`;
CREATE TABLE `factory_plugin_transition_outbox` (
`outbox_id` bigint(20) NOT NULL AUTO_INCREMENT COMMENT 'Durable execution command ID',
`execution_id` bigint(20) NOT NULL COMMENT 'Transition execution batch ID',
`status` varchar(20) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NOT NULL COMMENT 'PENDING, PROCESSING, DELIVERED, FAILED',
`available_at` datetime(0) NOT NULL COMMENT 'Earliest claim time',
`lease_owner` varchar(128) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT '' COMMENT 'Current Worker identity',
`lease_token` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT '' COMMENT 'Current claim token',
`lease_until` datetime(0) NULL DEFAULT NULL COMMENT 'Claim expiry time',
`delivery_count` int(11) NOT NULL DEFAULT 0 COMMENT 'Successful claim count',
`last_error` varchar(1000) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT '' COMMENT 'Last delivery error',
`created_at` datetime(0) NOT NULL COMMENT 'Outbox creation time',
`updated_at` datetime(0) NOT NULL COMMENT 'Outbox update time',
`delivered_at` datetime(0) NULL DEFAULT NULL COMMENT 'Terminal delivery time',
PRIMARY KEY (`outbox_id`) USING BTREE,
UNIQUE INDEX `uk_factory_plugin_outbox_execution`(`execution_id`) USING BTREE,
INDEX `idx_factory_plugin_outbox_claim`(`status`, `available_at`, `lease_until`) USING BTREE,
CONSTRAINT `fk_factory_plugin_outbox_execution` FOREIGN KEY (`execution_id`) REFERENCES `factory_plugin_transition_execution` (`execution_id`) ON DELETE CASCADE ON UPDATE RESTRICT
) ENGINE = InnoDB AUTO_INCREMENT = 100 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_0900_ai_ci COMMENT = 'Durable Plugin transition execution Outbox' ROW_FORMAT = Dynamic;
-- ----------------------------
-- Table structure for factory_plugin_transition_step_receipt
-- ----------------------------
DROP TABLE IF EXISTS `factory_plugin_transition_step_receipt`;
CREATE TABLE `factory_plugin_transition_step_receipt` (
`receipt_id` bigint(20) NOT NULL AUTO_INCREMENT COMMENT 'Step execution receipt ID',
`execution_id` bigint(20) NOT NULL COMMENT 'Transition execution batch ID',
`step_sequence` int(11) NOT NULL COMMENT 'Execution order in this batch',
`plan_step_sequence` int(11) NOT NULL COMMENT 'Source Transition Plan step',
`direction` varchar(20) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NOT NULL COMMENT 'APPLY or ROLLBACK',
`contribution_type` varchar(40) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NOT NULL COMMENT 'Contribution type',
`contribution_key` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NOT NULL COMMENT 'Contribution identity key',
`target` varchar(40) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NOT NULL COMMENT 'Target archive or environment',
`artifact_path` varchar(1024) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NOT NULL COMMENT 'Verified contribution artifact path',
`content_hash` char(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NOT NULL COMMENT 'Verified contribution content SHA-256',
`step_idempotency_key` char(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NOT NULL COMMENT 'Stable logical step idempotency SHA-256',
`executor_code` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NOT NULL COMMENT 'Target executor code',
`status` varchar(20) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NOT NULL COMMENT 'PENDING, RUNNING, SUCCEEDED, FAILED',
`external_receipt` varchar(1000) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT '' COMMENT 'Executor receipt identity',
`error_message` varchar(1000) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT '' COMMENT 'Sanitized step error',
`started_at` datetime(0) NULL DEFAULT NULL COMMENT 'Step start time',
`finished_at` datetime(0) NULL DEFAULT NULL COMMENT 'Step finish time',
`duration_millis` bigint(20) NULL DEFAULT NULL COMMENT 'Step duration',
PRIMARY KEY (`receipt_id`) USING BTREE,
UNIQUE INDEX `uk_factory_plugin_receipt_step`(`execution_id`, `step_sequence`) USING BTREE,
INDEX `idx_factory_plugin_receipt_status`(`execution_id`, `status`) USING BTREE,
INDEX `idx_factory_plugin_receipt_idempotency`(`step_idempotency_key`) USING BTREE,
CONSTRAINT `fk_factory_plugin_receipt_execution` FOREIGN KEY (`execution_id`) REFERENCES `factory_plugin_transition_execution` (`execution_id`) ON DELETE CASCADE ON UPDATE RESTRICT
) ENGINE = InnoDB AUTO_INCREMENT = 100 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_0900_ai_ci COMMENT = 'Plugin transition step execution receipts' ROW_FORMAT = Dynamic;
-- ----------------------------
-- Table structure for factory_plugin_version
-- ----------------------------
DROP TABLE IF EXISTS `factory_plugin_version`;
CREATE TABLE `factory_plugin_version` (
`plugin_version_id` bigint(20) NOT NULL AUTO_INCREMENT COMMENT 'Plugin version ID',
`plugin_id` bigint(20) NOT NULL COMMENT 'Feature Plugin ID',
`version_no` int(11) NOT NULL COMMENT 'Monotonic version number',
`version_label` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NOT NULL COMMENT 'Semantic release version',
`manifest_schema_version` varchar(20) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NOT NULL COMMENT 'Plugin manifest schema version',
`manifest_json` longtext CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NOT NULL COMMENT 'Canonical immutable Plugin manifest',
`content_hash` char(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NOT NULL COMMENT 'Canonical manifest SHA-256',
`status` varchar(20) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NOT NULL DEFAULT 'DRAFT' COMMENT 'DRAFT, PUBLISHED, RETIRED',
`parent_version_id` bigint(20) NULL DEFAULT NULL COMMENT 'Parent Plugin version ID',
`published_by` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT '' COMMENT 'Publisher',
`published_at` datetime(0) NULL DEFAULT NULL COMMENT 'Publish time',
`create_by` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT '' COMMENT 'Creator',
`create_time` datetime(0) NOT NULL COMMENT 'Create time',
`remark` varchar(500) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT '' COMMENT 'Change summary',
PRIMARY KEY (`plugin_version_id`) USING BTREE,
UNIQUE INDEX `uk_factory_plugin_version_no`(`plugin_id`, `version_no`) USING BTREE,
UNIQUE INDEX `uk_factory_plugin_version_label`(`plugin_id`, `version_label`) USING BTREE,
INDEX `idx_factory_plugin_version_status`(`plugin_id`, `status`) USING BTREE,
INDEX `idx_factory_plugin_parent_version`(`parent_version_id`) USING BTREE,
CONSTRAINT `fk_factory_plugin_version_plugin` FOREIGN KEY (`plugin_id`) REFERENCES `factory_plugin` (`plugin_id`) ON DELETE CASCADE ON UPDATE RESTRICT
) ENGINE = InnoDB AUTO_INCREMENT = 100 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_0900_ai_ci COMMENT = 'Immutable Feature Plugin versions' ROW_FORMAT = Dynamic;
-- ----------------------------
-- Table structure for factory_project_certified_artifact
-- ----------------------------
DROP TABLE IF EXISTS `factory_project_certified_artifact`;
CREATE TABLE `factory_project_certified_artifact` (
`artifact_id` bigint(20) NOT NULL AUTO_INCREMENT COMMENT 'Certified artifact ID',
`quality_run_id` bigint(20) NOT NULL COMMENT 'Bound passed Quality Run ID',
`project_id` bigint(20) NOT NULL COMMENT 'Front project ID',
`user_id` bigint(20) NOT NULL COMMENT 'Front user ID',
`generation_run_id` bigint(20) NOT NULL COMMENT 'Bound Generation Run ID',
`source_aggregate_hash` char(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NOT NULL COMMENT 'Bound source aggregate SHA-256',
`status` varchar(20) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NOT NULL COMMENT 'READY or FAILED',
`zip_sha256` char(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NOT NULL COMMENT 'Frozen ZIP SHA-256',
`zip_size` bigint(20) NOT NULL COMMENT 'Frozen ZIP bytes',
`report_sha256` char(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NOT NULL COMMENT 'Canonical quality report SHA-256',
`report_size` bigint(20) NOT NULL COMMENT 'Quality report bytes',
`storage_key` varchar(500) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NOT NULL COMMENT 'Immutable ZIP object key',
`report_storage_key` varchar(500) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NOT NULL COMMENT 'Immutable report object key',
`frozen_at` datetime(0) NOT NULL COMMENT 'Artifact freeze time',
`create_time` datetime(0) NOT NULL COMMENT 'Creation time',
PRIMARY KEY (`artifact_id`) USING BTREE,
UNIQUE INDEX `uk_factory_certified_quality`(`quality_run_id`) USING BTREE,
INDEX `idx_factory_certified_zip_hash`(`zip_sha256`) USING BTREE,
INDEX `idx_factory_certified_identity`(`user_id`, `project_id`, `generation_run_id`, `source_aggregate_hash`) USING BTREE,
CONSTRAINT `fk_factory_certified_quality` FOREIGN KEY (`quality_run_id`) REFERENCES `factory_project_quality_run` (`quality_run_id`) ON DELETE CASCADE ON UPDATE RESTRICT
) ENGINE = InnoDB AUTO_INCREMENT = 100 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_0900_ai_ci COMMENT = 'Immutable certified project artifacts' ROW_FORMAT = Dynamic;
-- ----------------------------
-- Table structure for factory_project_preview_job
-- ----------------------------
DROP TABLE IF EXISTS `factory_project_preview_job`;
CREATE TABLE `factory_project_preview_job` (
`preview_job_id` bigint(20) NOT NULL AUTO_INCREMENT COMMENT 'Preview Job ID',
`project_id` bigint(20) NOT NULL COMMENT 'Front project ID',
`user_id` bigint(20) NOT NULL COMMENT 'Front user ID',
`status` varchar(24) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NOT NULL COMMENT 'Durable preview state',
`message` varchar(1000) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT '' COMMENT 'Sanitized user message',
`lease_owner` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT 'Preview Worker identity',
`lease_token` char(36) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT 'Private fencing token',
`lease_until` datetime(0) NULL DEFAULT NULL COMMENT 'Worker lease expiry',
`runtime_ref` varchar(200) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT 'Private Docker runtime reference',
`runtime_ref_hash` char(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT 'Public runtime identity hash',
`frontend_url` varchar(500) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT 'Preview frontend URL',
`backend_url` varchar(500) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT 'Preview backend URL',
`admin_frontend_url` varchar(500) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT 'Admin preview URL',
`public_port` int(11) NULL DEFAULT NULL COMMENT 'Worker allocated public port',
`screenshot_key` varchar(500) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT 'Screenshot object key',
`screenshot_sha256` char(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT 'Screenshot SHA-256',
`cpu_limit` decimal(6, 2) NOT NULL COMMENT 'Docker CPU limit',
`memory_limit_mb` int(11) NOT NULL COMMENT 'Docker memory limit in MB',
`pids_limit` int(11) NOT NULL COMMENT 'Docker process limit',
`log_excerpt` longtext CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL COMMENT 'Sanitized bounded Worker log',
`started_at` datetime(0) NULL DEFAULT NULL COMMENT 'Container start time',
`expires_at` datetime(0) NOT NULL COMMENT 'Preview TTL deadline',
`finished_at` datetime(0) NULL DEFAULT NULL COMMENT 'Terminal time',
`create_time` datetime(0) NOT NULL COMMENT 'Creation time',
`update_time` datetime(0) NOT NULL COMMENT 'Update time',
PRIMARY KEY (`preview_job_id`) USING BTREE,
INDEX `idx_factory_preview_user_project`(`user_id`, `project_id`, `preview_job_id`) USING BTREE,
INDEX `idx_factory_preview_claim`(`status`, `lease_until`, `preview_job_id`) USING BTREE,
INDEX `idx_factory_preview_expiry`(`status`, `expires_at`, `preview_job_id`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 100 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_0900_ai_ci COMMENT = 'Durable isolated container preview jobs' ROW_FORMAT = Dynamic;
-- ----------------------------
-- Table structure for factory_project_quality_check
-- ----------------------------
DROP TABLE IF EXISTS `factory_project_quality_check`;
CREATE TABLE `factory_project_quality_check` (
`quality_check_id` bigint(20) NOT NULL AUTO_INCREMENT COMMENT 'Quality check ID',
`quality_run_id` bigint(20) NOT NULL COMMENT 'Quality Run ID',
`check_code` varchar(40) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NOT NULL COMMENT 'JAVA_TEST, FRONTEND_BUILD, SQL_IMPORT, API_SMOKE',
`sequence_no` int(11) NOT NULL COMMENT 'Stable execution order',
`status` varchar(20) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NOT NULL DEFAULT 'PENDING' COMMENT 'PENDING, RUNNING, PASSED, FAILED',
`summary` varchar(1000) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT '' COMMENT 'Sanitized check summary',
`log_excerpt` longtext CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL COMMENT 'Sanitized bounded execution log',
`started_at` datetime(0) NULL DEFAULT NULL COMMENT 'Check start time',
`finished_at` datetime(0) NULL DEFAULT NULL COMMENT 'Check terminal time',
`duration_ms` bigint(20) NOT NULL DEFAULT 0 COMMENT 'Check duration milliseconds',
PRIMARY KEY (`quality_check_id`) USING BTREE,
UNIQUE INDEX `uk_factory_quality_check_code`(`quality_run_id`, `check_code`) USING BTREE,
UNIQUE INDEX `uk_factory_quality_check_sequence`(`quality_run_id`, `sequence_no`) USING BTREE,
CONSTRAINT `fk_factory_quality_check_run` FOREIGN KEY (`quality_run_id`) REFERENCES `factory_project_quality_run` (`quality_run_id`) ON DELETE CASCADE ON UPDATE RESTRICT
) ENGINE = InnoDB AUTO_INCREMENT = 100 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_0900_ai_ci COMMENT = 'Ordered project quality checks' ROW_FORMAT = Dynamic;
-- ----------------------------
-- Table structure for factory_project_quality_run
-- ----------------------------
DROP TABLE IF EXISTS `factory_project_quality_run`;
CREATE TABLE `factory_project_quality_run` (
`quality_run_id` bigint(20) NOT NULL AUTO_INCREMENT COMMENT 'Quality Run ID',
`project_id` bigint(20) NOT NULL COMMENT 'Front project ID',
`user_id` bigint(20) NOT NULL COMMENT 'Front user ID',
`generation_run_id` bigint(20) NOT NULL COMMENT 'Bound Generation Run ID',
`source_aggregate_hash` char(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NOT NULL COMMENT 'Bound generated source aggregate SHA-256',
`status` varchar(20) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NOT NULL DEFAULT 'QUEUED' COMMENT 'QUEUED, RUNNING, PASSED, FAILED, INTERRUPTED',
`attempt_no` int(11) NOT NULL DEFAULT 0 COMMENT 'Worker claim count',
`check_total` int(11) NOT NULL DEFAULT 4 COMMENT 'Expected quality check count',
`passed_count` int(11) NOT NULL DEFAULT 0 COMMENT 'Passed quality checks',
`failed_count` int(11) NOT NULL DEFAULT 0 COMMENT 'Failed quality checks',
`error_summary` varchar(1000) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT '' COMMENT 'Sanitized run failure summary',
`lease_owner` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT 'Current Worker identity',
`lease_until` datetime(0) NULL DEFAULT NULL COMMENT 'Current Worker lease expiry',
`started_at` datetime(0) NULL DEFAULT NULL COMMENT 'Execution start time',
`finished_at` datetime(0) NULL DEFAULT NULL COMMENT 'Terminal time',
`duration_ms` bigint(20) NOT NULL DEFAULT 0 COMMENT 'Execution duration milliseconds',
`create_time` datetime(0) NOT NULL COMMENT 'Creation time',
`update_time` datetime(0) NOT NULL COMMENT 'Update time',
PRIMARY KEY (`quality_run_id`) USING BTREE,
INDEX `idx_factory_quality_user_project`(`user_id`, `project_id`, `quality_run_id`) USING BTREE,
INDEX `idx_factory_quality_generation`(`generation_run_id`, `source_aggregate_hash`, `quality_run_id`) USING BTREE,
INDEX `idx_factory_quality_claim`(`status`, `lease_until`, `quality_run_id`) USING BTREE,
CONSTRAINT `fk_factory_quality_generation` FOREIGN KEY (`generation_run_id`) REFERENCES `factory_generation_run` (`generation_run_id`) ON DELETE CASCADE ON UPDATE RESTRICT
) ENGINE = InnoDB AUTO_INCREMENT = 100 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_0900_ai_ci COMMENT = 'Persistent project quality runs' ROW_FORMAT = Dynamic;
-- ----------------------------
-- Table structure for factory_project_spec_version
-- ----------------------------
DROP TABLE IF EXISTS `factory_project_spec_version`;
CREATE TABLE `factory_project_spec_version` (
`spec_version_id` bigint(20) NOT NULL AUTO_INCREMENT COMMENT 'ProjectSpec version ID',
`project_id` bigint(20) NOT NULL COMMENT 'Front project ID',
`user_id` bigint(20) NOT NULL COMMENT 'Front user ID',
`version_no` int(11) NOT NULL COMMENT 'Monotonic project version number',
`parent_version_id` bigint(20) NULL DEFAULT NULL COMMENT 'Parent ProjectSpec version ID',
`schema_version` varchar(20) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NOT NULL COMMENT 'ProjectSpec schema version',
`content_json` longtext CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NOT NULL COMMENT 'Canonical ProjectSpec JSON',
`content_hash` char(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NOT NULL COMMENT 'SHA-256 of canonical JSON',
`change_source` varchar(30) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NOT NULL COMMENT 'Version change source',
`change_summary` varchar(500) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT '' COMMENT 'Version change summary',
`status` char(1) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NOT NULL DEFAULT '0' COMMENT 'Status: 0 active',
`create_by` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT '' COMMENT 'Creator',
`create_time` datetime(0) NOT NULL COMMENT 'Create time',
PRIMARY KEY (`spec_version_id`) USING BTREE,
UNIQUE INDEX `uk_factory_spec_project_version`(`project_id`, `version_no`) USING BTREE,
INDEX `idx_factory_spec_user_project`(`user_id`, `project_id`) USING BTREE,
INDEX `idx_factory_spec_project_hash`(`project_id`, `content_hash`) USING BTREE,
INDEX `idx_factory_spec_parent`(`parent_version_id`) USING BTREE,
CONSTRAINT `fk_factory_spec_project` FOREIGN KEY (`project_id`) REFERENCES `front_project` (`project_id`) ON DELETE CASCADE ON UPDATE RESTRICT
) ENGINE = InnoDB AUTO_INCREMENT = 100 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_0900_ai_ci COMMENT = 'Immutable ProjectSpec version history' ROW_FORMAT = Dynamic;
-- ----------------------------
-- Table structure for factory_project_v1_acceptance_check
-- ----------------------------
DROP TABLE IF EXISTS `factory_project_v1_acceptance_check`;
CREATE TABLE `factory_project_v1_acceptance_check` (
`acceptance_check_id` bigint(20) NOT NULL AUTO_INCREMENT COMMENT 'Acceptance check ID',
`acceptance_run_id` bigint(20) NOT NULL COMMENT 'Acceptance Run ID',
`check_code` varchar(40) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NOT NULL COMMENT 'GENERATION, FAILURE_RECOVERY, VERSION_ROLLBACK, CONTAINER_PREVIEW, CERTIFIED_DOWNLOAD',
`sequence_no` int(11) NOT NULL COMMENT 'Frozen check order',
`status` varchar(20) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NOT NULL DEFAULT 'PENDING' COMMENT 'PENDING, PASSED, FAILED',
`summary` varchar(1000) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT '' COMMENT 'Sanitized check summary',
`evidence_sha256` char(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT 'Canonical evidence SHA-256',
`duration_ms` bigint(20) NOT NULL DEFAULT 0 COMMENT 'Check duration',
PRIMARY KEY (`acceptance_check_id`) USING BTREE,
UNIQUE INDEX `uk_factory_v1_acceptance_code`(`acceptance_run_id`, `check_code`) USING BTREE,
UNIQUE INDEX `uk_factory_v1_acceptance_sequence`(`acceptance_run_id`, `sequence_no`) USING BTREE,
CONSTRAINT `fk_factory_v1_acceptance_check` FOREIGN KEY (`acceptance_run_id`) REFERENCES `factory_project_v1_acceptance_run` (`acceptance_run_id`) ON DELETE CASCADE ON UPDATE RESTRICT
) ENGINE = InnoDB AUTO_INCREMENT = 100 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_0900_ai_ci COMMENT = 'Ordered Project Factory V1 acceptance checks' ROW_FORMAT = Dynamic;
-- ----------------------------
-- Table structure for factory_project_v1_acceptance_run
-- ----------------------------
DROP TABLE IF EXISTS `factory_project_v1_acceptance_run`;
CREATE TABLE `factory_project_v1_acceptance_run` (
`acceptance_run_id` bigint(20) NOT NULL AUTO_INCREMENT COMMENT 'V1 Acceptance Run ID',
`project_id` bigint(20) NOT NULL COMMENT 'Golden sample project ID',
`user_id` bigint(20) NOT NULL COMMENT 'Front user ID',
`generation_run_id` bigint(20) NULL DEFAULT NULL COMMENT 'Bound Generation Run ID',
`quality_run_id` bigint(20) NULL DEFAULT NULL COMMENT 'Bound Quality Run ID',
`artifact_id` bigint(20) NULL DEFAULT NULL COMMENT 'Bound certified artifact ID',
`preview_job_id` bigint(20) NULL DEFAULT NULL COMMENT 'Bound container Preview Job ID',
`status` varchar(20) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NOT NULL COMMENT 'RUNNING, PASSED, FAILED',
`summary` varchar(1000) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT '' COMMENT 'Sanitized acceptance summary',
`started_at` datetime(0) NOT NULL COMMENT 'Acceptance start time',
`finished_at` datetime(0) NULL DEFAULT NULL COMMENT 'Acceptance terminal time',
`duration_ms` bigint(20) NOT NULL DEFAULT 0 COMMENT 'Acceptance duration',
`create_time` datetime(0) NOT NULL COMMENT 'Creation time',
PRIMARY KEY (`acceptance_run_id`) USING BTREE,
INDEX `idx_factory_v1_acceptance_project`(`user_id`, `project_id`, `acceptance_run_id`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 100 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_0900_ai_ci COMMENT = 'Project Factory V1 golden sample acceptance runs' ROW_FORMAT = Dynamic;
-- ----------------------------
-- Table structure for factory_prompt_debug_run
-- ----------------------------
DROP TABLE IF EXISTS `factory_prompt_debug_run`;
CREATE TABLE `factory_prompt_debug_run` (
`run_id` bigint(20) NOT NULL AUTO_INCREMENT COMMENT 'Debug run ID',
`prompt_template_id` bigint(20) NOT NULL COMMENT 'Prompt template ID',
`prompt_version_id` bigint(20) NOT NULL COMMENT 'Prompt version ID',
`experiment_id` bigint(20) NULL DEFAULT NULL COMMENT 'A/B experiment ID',
`variant` varchar(20) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NOT NULL DEFAULT 'DEBUG' COMMENT 'DEBUG, A, B',
`provider_code` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NOT NULL COMMENT 'Invoked provider',
`model` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NOT NULL COMMENT 'Invoked model',
`user_prompt` longtext CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NOT NULL COMMENT 'Debug input',
`output_content` longtext CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL COMMENT 'Model output',
`duration_ms` bigint(20) NOT NULL DEFAULT 0 COMMENT 'Invocation duration in milliseconds',
`success` char(1) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NOT NULL DEFAULT '1' COMMENT '1 success, 0 failed',
`error_message` varchar(1000) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT 'Sanitized error',
`score` int(11) NULL DEFAULT NULL COMMENT 'Manual quality score 1-5',
`feedback` varchar(1000) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT '' COMMENT 'Manual evaluation note',
`create_by` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT '' COMMENT 'Operator',
`create_time` datetime(0) NOT NULL COMMENT 'Create time',
`update_by` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT '' COMMENT 'Evaluator',
`update_time` datetime(0) NULL DEFAULT NULL COMMENT 'Evaluation time',
PRIMARY KEY (`run_id`) USING BTREE,
INDEX `idx_prompt_debug_template`(`prompt_template_id`, `create_time`) USING BTREE,
INDEX `idx_prompt_debug_experiment`(`experiment_id`, `variant`) USING BTREE,
INDEX `idx_prompt_debug_version`(`prompt_version_id`) USING BTREE,
CONSTRAINT `fk_prompt_debug_experiment` FOREIGN KEY (`experiment_id`) REFERENCES `factory_prompt_experiment` (`experiment_id`) ON DELETE SET NULL ON UPDATE RESTRICT,
CONSTRAINT `fk_prompt_debug_template` FOREIGN KEY (`prompt_template_id`) REFERENCES `factory_prompt_template` (`prompt_template_id`) ON DELETE CASCADE ON UPDATE RESTRICT,
CONSTRAINT `fk_prompt_debug_version` FOREIGN KEY (`prompt_version_id`) REFERENCES `factory_prompt_version` (`prompt_version_id`) ON DELETE RESTRICT ON UPDATE RESTRICT
) ENGINE = InnoDB AUTO_INCREMENT = 100 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_0900_ai_ci COMMENT = 'Prompt online debug and A/B run history' ROW_FORMAT = Dynamic;
-- ----------------------------
-- Table structure for factory_prompt_experiment
-- ----------------------------
DROP TABLE IF EXISTS `factory_prompt_experiment`;
CREATE TABLE `factory_prompt_experiment` (
`experiment_id` bigint(20) NOT NULL AUTO_INCREMENT COMMENT 'Experiment ID',
`prompt_template_id` bigint(20) NOT NULL COMMENT 'Prompt template ID',
`experiment_name` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NOT NULL COMMENT 'Experiment name',
`version_a_id` bigint(20) NOT NULL COMMENT 'Variant A Prompt version ID',
`version_b_id` bigint(20) NOT NULL COMMENT 'Variant B Prompt version ID',
`traffic_a` int(11) NOT NULL DEFAULT 50 COMMENT 'Variant A traffic percent',
`traffic_b` int(11) NOT NULL DEFAULT 50 COMMENT 'Variant B traffic percent',
`status` varchar(20) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NOT NULL DEFAULT 'DRAFT' COMMENT 'DRAFT, RUNNING, PAUSED, COMPLETED',
`started_at` datetime(0) NULL DEFAULT NULL COMMENT 'First start time',
`ended_at` datetime(0) NULL DEFAULT NULL COMMENT 'Completion time',
`create_by` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT '' COMMENT 'Creator',
`create_time` datetime(0) NOT NULL COMMENT 'Create time',
`update_by` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT '' COMMENT 'Updater',
`update_time` datetime(0) NOT NULL COMMENT 'Update time',
`remark` varchar(500) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT '' COMMENT 'Experiment hypothesis',
PRIMARY KEY (`experiment_id`) USING BTREE,
INDEX `idx_prompt_experiment_template`(`prompt_template_id`, `status`) USING BTREE,
INDEX `idx_prompt_experiment_version_a`(`version_a_id`) USING BTREE,
INDEX `idx_prompt_experiment_version_b`(`version_b_id`) USING BTREE,
CONSTRAINT `fk_prompt_experiment_template` FOREIGN KEY (`prompt_template_id`) REFERENCES `factory_prompt_template` (`prompt_template_id`) ON DELETE CASCADE ON UPDATE RESTRICT,
CONSTRAINT `fk_prompt_experiment_version_a` FOREIGN KEY (`version_a_id`) REFERENCES `factory_prompt_version` (`prompt_version_id`) ON DELETE RESTRICT ON UPDATE RESTRICT,
CONSTRAINT `fk_prompt_experiment_version_b` FOREIGN KEY (`version_b_id`) REFERENCES `factory_prompt_version` (`prompt_version_id`) ON DELETE RESTRICT ON UPDATE RESTRICT
) ENGINE = InnoDB AUTO_INCREMENT = 100 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_0900_ai_ci COMMENT = 'Prompt A/B experiments' ROW_FORMAT = Dynamic;
-- ----------------------------
-- Table structure for factory_prompt_template
-- ----------------------------
DROP TABLE IF EXISTS `factory_prompt_template`;
CREATE TABLE `factory_prompt_template` (
`prompt_template_id` bigint(20) NOT NULL AUTO_INCREMENT COMMENT 'Prompt template ID',
`prompt_code` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NOT NULL COMMENT 'Stable Prompt code',
`prompt_name` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NOT NULL COMMENT 'Prompt name',
`generate_type` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NOT NULL COMMENT 'AI generation type',
`description` varchar(500) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT '' COMMENT 'Prompt purpose',
`status` char(1) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NOT NULL DEFAULT '0' COMMENT '0 enabled, 1 disabled',
`current_version_id` bigint(20) NULL DEFAULT NULL COMMENT 'Current published version ID',
`create_by` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT '' COMMENT 'Creator',
`create_time` datetime(0) NOT NULL COMMENT 'Create time',
`update_by` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT '' COMMENT 'Updater',
`update_time` datetime(0) NOT NULL COMMENT 'Update time',
`remark` varchar(500) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT '' COMMENT 'Remark',
PRIMARY KEY (`prompt_template_id`) USING BTREE,
UNIQUE INDEX `uk_factory_prompt_code`(`prompt_code`) USING BTREE,
UNIQUE INDEX `uk_factory_prompt_generate_type`(`generate_type`) USING BTREE,
INDEX `idx_factory_prompt_current_version`(`current_version_id`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 100 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_0900_ai_ci COMMENT = 'Prompt template registry' ROW_FORMAT = Dynamic;
-- ----------------------------
-- Records of factory_prompt_template
-- ----------------------------
INSERT INTO `factory_prompt_template` VALUES (100, 'front.requirement', '需求建议', 'requirement', 'Generate requirement suggestions', '0', 110, 'system', '2026-07-14 15:03:16', 'admin', '2026-07-14 15:42:29', '');
INSERT INTO `factory_prompt_template` VALUES (101, 'front.app_blueprint', '应用蓝图', 'app_blueprint', 'Generate application blueprint', '0', 101, 'system', '2026-07-14 15:03:16', 'admin', '2026-07-14 15:04:35', '');
INSERT INTO `factory_prompt_template` VALUES (102, 'front.flow_config', '业务闭环配置', 'flow_config', 'Generate simplified state and business action configuration', '0', 113, 'system', '2026-07-14 15:03:16', 'admin', '2026-07-15 10:32:38', '');
INSERT INTO `factory_prompt_template` VALUES (103, 'front.database', '数据库设计', 'database', 'Generate database design', '0', 112, 'system', '2026-07-14 15:03:16', 'codex', '2026-07-14 21:56:14', '');
INSERT INTO `factory_prompt_template` VALUES (104, 'front.diagram_spec', '图表设计', 'diagram_spec', 'Generate diagram specification', '0', 104, 'system', '2026-07-14 15:03:16', 'admin', '2026-07-14 15:04:35', '');
INSERT INTO `factory_prompt_template` VALUES (105, 'front.paper_outline', '论文提纲', 'paper_outline', 'Generate paper outline', '0', 105, 'system', '2026-07-14 15:03:16', 'admin', '2026-07-14 15:04:35', '');
INSERT INTO `factory_prompt_template` VALUES (106, 'front.paper_draft', '论文正文', 'paper_draft', 'Generate paper draft', '0', 106, 'system', '2026-07-14 15:03:16', 'admin', '2026-07-14 15:04:35', '');
INSERT INTO `factory_prompt_template` VALUES (107, 'front.code_analysis', '代码解读', 'code_analysis', 'Generate code analysis', '0', 107, 'system', '2026-07-14 15:03:16', 'admin', '2026-07-14 15:04:35', '');
INSERT INTO `factory_prompt_template` VALUES (108, 'front.database_change_sync', '数据库变更同步', 'database_change_sync', 'Database change synchronization contract', '0', 108, 'system', '2026-07-14 15:03:16', 'admin', '2026-07-14 15:04:35', '');
INSERT INTO `factory_prompt_template` VALUES (109, 'front.one_click_project', '一键生成 Pipeline', 'one_click_project', 'One-click project Prompt manifest contract', '0', 109, 'system', '2026-07-14 15:03:16', 'admin', '2026-07-14 15:04:35', '');
-- ----------------------------
-- Table structure for factory_prompt_version
-- ----------------------------
DROP TABLE IF EXISTS `factory_prompt_version`;
CREATE TABLE `factory_prompt_version` (
`prompt_version_id` bigint(20) NOT NULL AUTO_INCREMENT COMMENT 'Prompt version ID',
`prompt_template_id` bigint(20) NOT NULL COMMENT 'Prompt template ID',
`version_no` int(11) NOT NULL COMMENT 'Monotonic version number',
`version_label` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NOT NULL COMMENT 'Published version label',
`system_prompt` longtext CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NOT NULL COMMENT 'System Prompt content',
`user_prompt_contract` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NOT NULL COMMENT 'User Prompt builder/template contract',
`user_prompt_template` longtext CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL COMMENT 'Editable User Prompt template using {{input}}',
`provider_code` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NOT NULL COMMENT 'Model provider code',
`model` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT '' COMMENT 'Pinned model or empty for gateway default',
`content_hash` char(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NOT NULL COMMENT 'Canonical Prompt SHA-256',
`status` varchar(20) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NOT NULL DEFAULT 'DRAFT' COMMENT 'DRAFT, PUBLISHED, RETIRED',
`parent_version_id` bigint(20) NULL DEFAULT NULL COMMENT 'Parent Prompt version ID',
`pipeline_release_code` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT 'Atomic compatible pipeline release code',
`published_by` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT '' COMMENT 'Publisher',
`published_at` datetime(0) NULL DEFAULT NULL COMMENT 'Publish time',
`create_by` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT '' COMMENT 'Creator',
`create_time` datetime(0) NOT NULL COMMENT 'Create time',
`remark` varchar(500) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT '' COMMENT 'Change summary',
PRIMARY KEY (`prompt_version_id`) USING BTREE,
UNIQUE INDEX `uk_factory_prompt_version_no`(`prompt_template_id`, `version_no`) USING BTREE,
UNIQUE INDEX `uk_factory_prompt_version_label`(`prompt_template_id`, `version_label`) USING BTREE,
INDEX `idx_factory_prompt_version_status`(`prompt_template_id`, `status`) USING BTREE,
INDEX `idx_factory_prompt_parent_version`(`parent_version_id`) USING BTREE,
CONSTRAINT `fk_factory_prompt_version_template` FOREIGN KEY (`prompt_template_id`) REFERENCES `factory_prompt_template` (`prompt_template_id`) ON DELETE CASCADE ON UPDATE RESTRICT
) ENGINE = InnoDB AUTO_INCREMENT = 100 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_0900_ai_ci COMMENT = 'Immutable Prompt content versions' ROW_FORMAT = Dynamic;
-- ----------------------------
-- Records of factory_prompt_version
-- ----------------------------
INSERT INTO `factory_prompt_version` VALUES (100, 100, 1, 'V1', '你是资深软件需求分析师。面向本科毕设或课程设计规模在保留用户原始描述的前提下补全真实业务闭环、角色、核心对象和可执行业务规则。规则必须给出明确的时间、数量、金额、状态、公式、上限和异常边界用户未提供关键数值时应给出合理默认值并标注“AI假设”不得使用“按实际情况”“超时后处理”等模糊表述。不要把需求扩张成大型企业平台也不要用增删改查或运维功能代替业务需求。只输出用户消息要求的中文纯文本不要 Markdown、JSON 或解释。', 'context-json:requirement:v1', '请根据以下 JSON 项目输入为低代码生成器补全一份可直接驱动代码生成的项目需求。\n需求复杂度控制在本科毕设或课程设计级别功能要完整但不要设计成大型企业平台或运维平台。\ncurrentDescription 是用户原始描述,必须作为事实来源保留其约束;输出补充内容,不要改写或否定用户已经明确的规则。\n只返回中文纯文本不要 Markdown不要 JSON不要解释。格式必须严格如下\n业务目标一句话说明系统解决的问题\n角色用顿号分隔 2 到 4 个用户角色\n核心对象列出流程涉及的主要业务对象和记录\n核心流程按先后顺序写出完整正向流程、逆向动作和补偿动作不要只写增删改查\n业务规则用分号分隔明确规则必须覆盖适用的时间期限、起算点、状态判定、数量限制、金额公式、计费单位、取整方式、封顶值、重复操作限制\n异常边界说明库存不足、状态不符、重复提交、取消、超时、重复支付等适用场景\n验收场景至少给出一个包含边界数值和预期结果的完整场景\n如果输入没有给出期限、费率、上限等关键数值必须选择合理默认值并在该条前标注“AI假设禁止输出“待定”“按实际情况”“超时后罚款”等不可执行描述。\n对于借阅、租赁、预约等有期限的流程必须明确起算时间、期限、到期判定和逾期处理存在罚款或费用时必须明确公式、日费率、取整和上限。\n其他模块用顿号分隔 2 到 4 个前台展示或内容维护模块,优先从轮播图、公告、新闻资讯、友情链接、留言反馈、帮助中心、系统简介中选择\n不要出现通知提醒、统计报表、数据备份、操作日志、系统监控、定时任务等后台运维或企业管理平台标配模块。\n项目输入 JSON\n{{input}}', 'deepseek', '', '75ec898b38a76e31ef640596255c084480ad82b7a93cd896e26916fa32b873c9', 'RETIRED', NULL, 'builtin-one-click-1.0.0', 'admin', '2026-07-14 15:04:35', 'admin', '2026-07-14 15:04:35', '由当前代码内置业务 Prompt 初始化');
INSERT INTO `factory_prompt_version` VALUES (101, 101, 1, 'V1', '你是应用蓝图架构师。只输出符合用户消息结构的 JSON规划业务角色、前台菜单与页面、后台菜单和运营看板。保持 pageCode、tableName、角色数据范围和登录要求前后一致只描述静态蓝图不生成数据库、权限表、菜单表或代码。角色名称使用简体中文技术标识使用稳定的小写 snake_case。', 'context-json:app_blueprint:v1', '根据项目输入 JSON 生成应用蓝图,只返回 JSON不要 Markdown 围栏或解释。\n输出结构{\"roles\":[{\"code\":\"reader\",\"name\":\"读者\",\"description\":\"\"}],\"frontendMenus\":[{\"code\":\"book_catalog\",\"name\":\"图书目录\",\"path\":\"/books\",\"pageCode\":\"book_catalog_page\",\"requiresLogin\":false,\"visibleRoles\":[],\"dataScope\":\"PUBLIC\"}],\"frontendPages\":[{\"code\":\"book_catalog_page\",\"name\":\"图书目录\",\"menuCode\":\"book_catalog\",\"path\":\"/books\",\"pageType\":\"list\",\"tableName\":\"book_info\"}],\"adminMenus\":[{\"code\":\"book_admin\",\"name\":\"图书管理\",\"path\":\"/admin/books\",\"pageCode\":\"book_admin_page\",\"tableName\":\"book_info\",\"pageType\":\"list\",\"requiresLogin\":true,\"visibleRoles\":[\"admin\"],\"dataScope\":\"ROLE\"}],\"adminHomeDashboard\":{\"title\":\"运营总览\",\"description\":\"核心业务数据\",\"metrics\":[],\"charts\":[]}}。\n蓝图描述目标生成项目而不是当前 EasyCode/RuoYi 平台。不要生成数据库表、菜单表、角色表、权限表或代码。\nrole.name 使用简体中文role.code 使用小写 snake_case。只有 role.code=admin 是系统管理员;名称含“管理员”或“后台”的业务角色仍保持独立。\nrole.name must be Simplified Chinese. Only role.code=admin is the system administrator.\n每个菜单必须包含 requiresLogin、visibleRoles、dataScopedataScope 只能是 PUBLIC、CURRENT_USER 或 ROLE。\nadminMenus 必须包含 pageCode、tableName、pageType个人资料使用 form普通管理使用 list。\nadminMenus must include pageCode, tableName, and pageType.\nfrontendMenus 顶层菜单应指向 pageCode详情页作为子页面不创建顶层详情菜单。\n不要为轮播图、banner、公告滚动条等首页装饰创建顶层菜单可放在首页业务块或作为后台维护数据。\nfrontendPages.pageType 只能是 list、current_user_list、detail、formtableName 必须是页面展示的业务表。\n同一业务对象只使用一个稳定 tableName后续数据库、闭环、页面、看板、动作必须复用不能使用同义表名。\nadminHomeDashboard 尽量包含 4 个业务指标和至少 2 张图表趋势图与分布图所有表字段必须可由后续数据库步骤创建。semantic 只能使用 money、order、user、task、warning、inventory、content、default。\n每个非 admin 角色使用表名等于 role.code 的独立账号表,不得创建共享 user、user_info、member 或 account 表。\nNever invent a shared user, user_info, member, or account table for role accounts.\n需要个人资料页时为每个非 admin 角色创建独立 form 页面和菜单tableName 绑定 role.codepageCode/path 带角色前缀visibleRoles 只包含该角色。\nCreate one form page and one menu per non-admin role when profile pages are needed.\n个人订单、借阅、资料、预约、支付等页面必须 requiresLogin=true 且 dataScope=CURRENT_USER。\n项目输入 JSON\n{{input}}', 'deepseek', '', 'c3ee0180ed446fe83055bd1c272ed1b6e3978584fe52f98f5e78e14e2cfc8f29', 'PUBLISHED', NULL, 'builtin-one-click-1.0.0', 'admin', '2026-07-14 15:04:35', 'admin', '2026-07-14 15:04:35', '由当前代码内置业务 Prompt 初始化');
INSERT INTO `factory_prompt_version` VALUES (102, 102, 1, 'V1', '你是业务流程配置设计器。只输出一个合法 JSON 对象,不输出 Markdown、解释或 SQL。\n\n目标用最小 flow_config 描述状态流转、显式 Java 业务动作、多表数量联动、按钮和统计。不要输出 CRUD不要输出通用规则 DSL。\n\n固定结构\n{\n \"version\":\"1.0\",\n \"code\":\"snake_case\",\n \"name\":\"中文业务名\",\n \"mainTable\":\"snake_case\",\n \"statusField\":\"status\",\n \"notFoundMessage\":\"主记录不存在\",\n \"states\":[{\"code\":\"pending\",\"label\":\"待审核\"}],\n \"actions\":[{\n \"code\":\"approve\",\n \"name\":\"审核通过\",\n \"from\":\"pending\",\n \"to\":\"borrowing\",\n \"actor\":\"admin\",\n \"method\":\"POST\",\n \"path\":\"/borrow-record/approve\",\n \"invalidStateMessage\":\"当前状态不能审核\",\n \"successMessage\":\"审核成功\",\n \"audit\":{\"userField\":\"approve_user_id\",\"timeField\":\"approve_time\"},\n \"effects\":[{\n \"type\":\"decrease\",\n \"table\":\"book\",\n \"relationField\":\"book_id\",\n \"field\":\"stock\",\n \"amount\":\"1\",\n \"min\":\"0\",\n \"notFoundMessage\":\"图书不存在\",\n \"errorMessage\":\"图书库存不足\"\n }],\n \"button\":{\"scope\":\"admin\",\"pageCode\":\"borrow_record_list\",\"slot\":\"list.rowActions\",\"type\":\"success\",\"confirm\":\"确认审核通过吗?\",\"order\":10}\n }],\n \"metrics\":[{\"code\":\"borrowing_count\",\"name\":\"借阅中数量\",\"table\":\"borrow_record\",\"aggregate\":\"count\",\"field\":\"id\",\"status\":\"borrowing\",\"unit\":\"条\"}]\n}\n\n约束\n1. code、表名、字段名全部使用小写 snake_case状态 code 使用稳定英文编码label 使用中文。\n2. 每个 action 必须有 from 和 to且二者存在于 states 中并且不相同。\n3. effects.type 只能是 decrease、increase、update_related、create_record。\n4. decrease/increase 必须给 table、relationField、field、amountdecrease 还要给 min。\n5. update_related/create_record 使用 values值可为 currentUserId、now、record.字段名或常量。\n6. 审核人等身份只能通过 audit.userField 表达,由后端登录态注入,不能作为前端可传字段。\n7. 覆盖需求中的完整正向闭环和关键回退/拒绝动作,但不要为普通 CRUD 创建 action。', 'context-json:flow_config:v1', '请根据以下 JSON 上下文生成 flow_config。appBlueprint 是已确认的页面、角色和菜单范围,必须与它保持一致:\n{{input}}', 'deepseek', '', '247495840c67968896ccad2db0a599bd4fc594d0189157dce888b8ede90b3257', 'RETIRED', NULL, 'builtin-one-click-1.0.0', 'admin', '2026-07-14 15:04:35', 'admin', '2026-07-14 15:04:35', '由当前代码内置业务 Prompt 初始化');
INSERT INTO `factory_prompt_version` VALUES (103, 103, 1, 'V1', '你是 MySQL 业务数据库设计专家。只输出符合用户消息结构的 JSON根据已确认的应用蓝图和业务闭环生成可直接落地的表、字段、主外键、字典和表操作策略。字段必须业务化且类型合法所有蓝图与闭环引用必须有真实表字段承载不得生成菜单、权限关系、代码或业务动作。', 'context-json:database:v1', '根据项目输入 JSON 生成 MySQL 数据库设计 JSON只返回 JSON不要 Markdown 围栏或解释。\nConfirmed app blueprint JSON and Confirmed business loop plan JSON are supplied in the input.\nDatabase generation constraints from the business loop plan must be enforced.\nEvery confirmedBusinessLoopPlan.metrics tableName, field, and filters.field must exist in the generated schema. Numeric sum/avg/min/max metric fields must use a compatible numeric column type. Status-filter metric values must remain compatible with the matching stateMachines.states.\nIf input.mode is correction, repair input.originalResponse according to input.validationError and return the complete corrected database JSON. Do not drop unrelated valid tables or fields.\n输出结构{\"tables\":[{\"tableName\":\"car_info\",\"tableComment\":\"车辆信息表\",\"adminMenuName\":\"车辆管理\",\"operations\":{\"add\":true,\"edit\":true,\"remove\":true,\"removeType\":\"physical\",\"reason\":\"\"},\"columns\":[{\"columnName\":\"id\",\"columnLabel\":\"ID\",\"columnComment\":\"主键ID\",\"columnType\":\"bigint(20)\",\"isPk\":\"1\",\"isIncrement\":\"1\",\"isRequired\":\"1\"}]}]}。\n不要使用 field_1 等占位字段;每个表必须包含非空 columns以及 adminMenuName 和 operations.add/edit/remove/removeType/reason。\nadminMenuName 必须来自本表 tableComment/tableName不得复用其他表或宽泛模块名称。\nadminMenuName must come from that table\'s own tableComment or tableName.\n字段数组名称只能是 columns不能使用 fields、fieldDesign、fieldList、columnList。\nEvery table must include a non-empty columns array; use columns exactly.\n每个字段必须包含 columnName、columnLabel、columnComment、columnType、isPk、isIncrement、isRequired。columnLabel 是短 UI 标签columnComment 是完整数据库说明。\n可提供 javaType、htmlTypehtmlType 只能是 input、textarea、select、radio、checkbox、datetime、imageUpload、fileUpload、editor。\nselect/radio/checkbox 应提供 dictType 和 dictOptions。关联选择使用 remote:target_table:value_field:label_field且目标表和值/标签字段必须都存在于本次 tables JSON。\n非主键外键字段应在目标表存在时使用 remote select无目标表的分类、类型、状态使用本地 dictOptions 或普通输入。\n普通主数据表除唯一主键外至少包含 4 个业务字段。\n订单、支付、借还、审批、流程、任务、库存记录等动作记录表使用仅新增关系、审计、日志、历史表使用只读普通主数据表使用完整 CRUD。\n不要生成 businessActions、业务动作、工作流、代码、菜单表、user_role、角色权限表或权限表。\nDo not generate menu tables, user_role tables, role-permission tables, or permission tables.\n表名字段名只使用小写字母、数字、下划线每表必须且只能有一个主键。字段类型只能使用 bigint(20)、int(11)、varchar(n)、char(n)、decimal(p,s)、datetime、date、text、longtext。\n为 confirmedAppBlueprint.roles 中每个角色创建独立账号表admin 使用 admin其他角色使用 role.code。不得使用共享用户表或 role_id/role_code/user_role。\n角色账号表包含 `<role_code>_id` 自增主键、username、password_hash、nickname、status、create_time。admin 只能登录后台,非 admin 角色登录前台。\n生成 frontendPages.tableName 引用的全部表;个人资料页必须绑定对应非 admin 角色账号表。requiresLogin=true 且 dataScope=CURRENT_USER 的业务数据通常包含 user_id。\ncanonicalTableRegistry 中的名称是最终规范表名。confirmedBusinessLoopPlan 若出现与其指向同一业务对象的同义表名,必须使用 canonicalTableRegistry 中的名称,不得同时生成两张同义表。\n根据 confirmedBusinessLoopPlan 创建 coreObjects.tableName、actions.ownerTable补齐 stateMachines.statusField、quantityRules.quantityField 以及 recordRules 和动作前置条件需要的字段。状态值不得超出 stateMachines.states。\n严格实现 confirmedBusinessLoopPlan.businessPoliciesTIME_LIMIT 的 startField、dueField 使用 datetimeOVERDUE_FEE 的 dueField 使用 datetime、daysTargetField 使用 int(11)、targetField 使用 decimal(10,2)QUANTITY_LIMIT 的 targetField 使用 int(11) 且默认值为 0。所有政策字段必须位于政策指定的 tableName禁止只把期限或公式写进 columnComment 而不创建字段。\nDo not invent status values outside stateMachines.states.\n严格遵守 input.limits.maxTables 和 maxColumnsPerTable。\n项目输入 JSON\n{{input}}', 'deepseek', '', '14dcad479b01de068e5c5bc39b5cd7a591a09d334ee6812483d8ac00dd8c9d61', 'RETIRED', NULL, 'builtin-one-click-1.0.0', 'admin', '2026-07-14 15:04:35', 'admin', '2026-07-14 15:04:35', '由当前代码内置业务 Prompt 初始化');
INSERT INTO `factory_prompt_version` VALUES (104, 104, 1, 'V1', '你是软件设计图专家。只输出符合用户消息结构的 JSON同时提供有效 Mermaid、节点和连线数据。根据指定图类型生成简体中文、结构清晰且规模适中的流程图、用例图、时序图、活动图、状态图、数据流图或架构图不得虚构与当前项目无关的系统。', 'context-json:diagram_spec:v1', '根据输入 JSON 生成软件设计图,只返回 JSON不要 Markdown 围栏或解释。\n输出结构{\"diagramType\":\"flowchart\",\"title\":\"...\",\"description\":\"...\",\"mermaid\":\"flowchart TD...\",\"markdown\":\"...\",\"nodes\":[{\"id\":\"start\",\"label\":\"开始\",\"type\":\"start\",\"lane\":\"用户\",\"description\":\"\"}],\"edges\":[{\"source\":\"start\",\"target\":\"next\",\"label\":\"\"}]}。\n支持 flowchart、use_case、sequence、activity、state、data_flow、architecture。用例图使用 actor/use_case/system_boundary流程、活动、状态图使用过程和判断节点架构图使用 frontend/backend/database/deployment 节点。\n标签使用简体中文节点 id 只使用小写字母、数字、下划线。保持 6 到 14 个节点、6 到 18 条边,不虚构无关系统。\n输入 JSON\n{{input}}', 'deepseek', '', '72fc97083f10d57fb9ee15c988f548feeb02925afe533a1c069e96dc3240d312', 'PUBLISHED', NULL, 'builtin-one-click-1.0.0', 'admin', '2026-07-14 15:04:35', 'admin', '2026-07-14 15:04:35', '由当前代码内置业务 Prompt 初始化');
INSERT INTO `factory_prompt_version` VALUES (105, 105, 1, 'V1', '你是中文软件工程本科毕业论文导师。只输出用户要求的 JSON不要 Markdown 代码块或解释。', 'context-json:paper_outline:v1', '根据输入 JSON 生成软件工程本科论文提纲,只返回 JSON不要 Markdown 围栏或解释。\n输出结构{\"title\":\"...\",\"abstractDraft\":\"...\",\"keywords\":[\"Spring Boot\",\"Vue\"],\"chapters\":[{\"title\":\"系统设定\",\"goal\":\"...\",\"sections\":[\"模块设定\",\"角色设定\",\"数据表设定\"]}]}。\n使用简体中文不虚构参考文献模块、角色、表名必须来自当前项目不使用无关行业示例。\nchapters 必须严格按以下顺序,每项包含 2 到 5 个具体小节:\n系统设定结合项目名称、需求描述、应用蓝图、业务闭环和数据库表推导系统模块、用户角色、核心数据表与关键业务流程。\n第 1 章 绪论:研究背景、研究意义、国内外研究现状、研究内容与论文结构。\n第 2 章 相关技术介绍:围绕实际技术栈介绍关键技术。\n第 3 章 系统需求分析:可行性、用户角色、功能需求、非功能需求和业务流程。\n第 4 章 系统设计:总体架构、功能模块、数据库、接口和安全设计。\n第 5 章 系统实现:围绕当前项目实际模块展开。\n第 6 章 系统测试:测试环境、方法、功能测试、异常测试、兼容性测试和结论。\n第 7 章 总结与展望:成果、不足和后续优化。\n参考文献与致谢提醒学生人工核验参考文献真实性与学校格式。\nTarget a later draft of about 10000 Chinese characters.\n输入 JSON\n{{input}}', 'deepseek', '', 'f6f24f85cc7ab529c0a3f8f20d1c86798cb57dd579cd42df908da630f31da40b', 'PUBLISHED', NULL, 'builtin-one-click-1.0.0', 'admin', '2026-07-14 15:04:35', 'admin', '2026-07-14 15:04:35', '由当前代码内置业务 Prompt 初始化');
INSERT INTO `factory_prompt_version` VALUES (106, 106, 1, 'V1', '你是中文软件工程本科毕业论文写作助手。只输出论文正文 Markdown首个非空字符必须是 #不要确认语、解释、JSON 或代码围栏。必须围绕当前项目上下文写作,不套用无关行业示例。', 'context-json:paper_draft:v1', '根据输入 JSON 撰写软件工程本科论文 Markdown 初稿。\nReturn Markdown only. Do not include acknowledgements, confirmations, explanations, or preamble before the thesis content. The first non-blank character of the response must be #.\n首个非空字符必须是 #,正文前不要确认、解释或前言。使用简体中文,篇幅参考 input.targetWords以章节连贯性优先。\n严格按以下大纲生成不得跳过或调换系统设定、第 1 至第 7 章、参考文献、致谢。\n必须严格按照以下大纲生成论文初稿系统设定、第 1 章 绪论、第 2 章 相关技术介绍、第 3 章 系统需求分析、第 4 章 系统设计、第 5 章 系统实现、第 6 章 系统测试、第 7 章 总结与展望、参考文献与致谢。\n系统设定应结合项目名称、需求、应用蓝图、闭环和数据库说明模块、角色、核心表与流程。\n第 1 章 绪论;第 2 章 相关技术;第 3 章 系统需求分析;第 4 章 系统设计;第 5 章 系统实现;第 6 章 系统测试;第 7 章 总结与展望;参考文献;致谢。\n模块、角色、表和流程必须来自当前项目。除非项目确实包含否则不得套用图书、读者、借阅等示例。\nUse module names, roles, and tables from the current project context. Do not use unrelated sample domain terms.\n图表位置使用“[此处插入 XX 图]”占位。不得虚构不可核验引用,明确提醒学生核验参考文献。\n合理使用标题、段落和表格除配置片段外避免代码块。\n输入 JSON\n{{input}}', 'deepseek', '', '8241028af8b51ea0c4587dc57b71927d9baf02a592772adf9edbb70061d04d8e', 'PUBLISHED', NULL, 'builtin-one-click-1.0.0', 'admin', '2026-07-14 15:04:35', 'admin', '2026-07-14 15:04:35', '由当前代码内置业务 Prompt 初始化');
INSERT INTO `factory_prompt_version` VALUES (107, 107, 1, 'V1', '你是资深 Java/Vue 毕设项目代码解读专家。只依据用户消息中提供的源码、文件清单和项目元信息生成正式 Markdown 报告,引用真实类名、方法名、组件、表和字段;无法确认的内容必须明确说明,不得臆造模块或流程。报告应覆盖项目概述、技术栈、架构模块、核心业务、数据库设计和答辩准备。', 'context-json:code_analysis:v1', '根据输入 JSON 中的精选核心源码和项目元信息生成正式 Markdown 代码解读报告,不要代码围栏或 JSON。\n只能依据已展开源码和文件清单不要编造未出现的模块、接口、表或流程无法确认时明确说明。引用真实类名、方法名、组件名、表名和字段名。\n无法从精选源码确认的内容必须明确标注“无法从精选源码确认”。\n必须按顺序包含\n## 1. 项目概述与技术栈\n## 2. 系统架构与核心模块\n## 3. 核心业务流程\n## 4. 数据库设计\n## 5. 答辩准备\n若 input.mode=continue在保留主题和章节结构的前提下根据 previousMarkdown 补充、修正和续写,避免重复无变化的长段。\n输入 JSON\n{{input}}', 'deepseek', '', 'f680e5f41cdfd1b781f0c76eedce6352a9334849f05b5e2c904765bc171e53d8', 'PUBLISHED', NULL, 'builtin-one-click-1.0.0', 'admin', '2026-07-14 15:04:35', 'admin', '2026-07-14 15:04:35', '由当前代码内置业务 Prompt 初始化');
INSERT INTO `factory_prompt_version` VALUES (108, 108, 1, 'V1', '你是数据库变更同步专家。根据已确认的数据库变更分析受影响的蓝图、业务闭环、页面、动作和生成产物,保持表字段引用及业务语义一致。只提出可验证的同步结果,不虚构不存在的表、字段或模块。', 'context-json:database_change_sync:v1', '根据数据库变更和项目上下文同步受影响的生成结果。严格遵守输入中的阶段契约。\n输入 JSON\n{{input}}', 'deepseek', '', '9a456014ff357fb32d92a95ad0d6d595bbad1b947dd7aff53037086430fa068c', 'PUBLISHED', NULL, 'builtin-one-click-1.0.0', 'admin', '2026-07-14 15:04:35', 'admin', '2026-07-14 15:04:35', '由当前代码内置业务 Prompt 初始化');
INSERT INTO `factory_prompt_version` VALUES (109, 109, 1, 'V1', '你是一键项目生成流水线编排专家。按照应用蓝图、业务闭环、数据库和业务动作的固定阶段顺序工作,保证各阶段 Prompt 身份、输入输出和引用关系可追踪、可恢复、可复现。不跨阶段生成不属于当前阶段的内容。', 'pipeline:app_blueprint,flow_config,database,generate,preview:v2', '按照一键生成阶段契约处理项目输入,当前阶段只输出该阶段要求的内容。\n输入 JSON\n{{input}}', 'deepseek', '', '28e64be601aa2ec52f471e7fe8e534b3f41f053125435124128794371db1b770', 'PUBLISHED', NULL, 'builtin-one-click-1.0.0', 'admin', '2026-07-14 15:04:35', 'admin', '2026-07-14 15:04:35', '由当前代码内置业务 Prompt 初始化');
INSERT INTO `factory_prompt_version` VALUES (110, 100, 2, 'v2', '你是一键生成项目的需求补全助手。你的输出会作为后续生成应用蓝图、业务闭环、数据库、页面和源码的输入。\n\n请在保留用户原始描述的基础上补全必要的业务细节让系统能生成一个本科毕设/课程设计规模的完整项目。\n\n补全重点\n- 明确项目面向谁使用,包含 2 到 4 个角色;\n- 明确核心业务对象,例如订单、预约、借阅记录、商品、课程等;\n- 明确一条完整业务闭环:发起、审核/处理、完成、取消/拒绝/回退;\n- 明确关键业务规则:状态、时间期限、数量限制、金额/费用公式、库存或名额变化;\n- 明确异常边界:库存不足、重复提交、状态不符、超时、取消、支付失败等;\n- 可补充少量前台展示或内容维护模块,但不要扩展成大型平台。\n\n约束\n- 只输出中文纯文本,不要 Markdown不要 JSON不要解释。\n- 内容要短,控制在 300 字以内。\n- 不要写技术实现、接口、数据库表、字段、代码。\n- 不要输出“按实际情况”“待定”等模糊规则缺少关键数值时用合理默认值并标注“AI假设”。\n- 不要把 CRUD、统计报表、系统监控、操作日志当作核心业务。', 'context-json:requirement:v1', '请根据以下项目输入,补全一段可直接用于一键生成项目的业务需求描述。\n\n输出格式\n项目定位\n角色\n核心流程\n关键规则\n异常边界\n\n项目输入 JSON\n{{input}}', 'deepseek', '', '07d4c186c52634ef2c9f67640a638e0822c1e139b177ff2bc7eb3a10389e8164', 'PUBLISHED', 100, '', 'admin', '2026-07-14 15:42:29', 'admin', '2026-07-14 15:42:25', '');
INSERT INTO `factory_prompt_version` VALUES (111, 102, 2, 'V2', '你是业务流程配置设计器。只输出一个合法 JSON 对象,不输出 Markdown、解释或 SQL。\n\n目标用最小 flow_config 描述状态流转、显式 Java 业务动作、多表数量联动、按钮和统计。不要输出 CRUD不要输出通用规则 DSL。\n\n固定结构\n{\n \"version\":\"1.0\",\n \"code\":\"snake_case\",\n \"name\":\"中文业务名\",\n \"mainTable\":\"snake_case\",\n \"statusField\":\"status\",\n \"notFoundMessage\":\"主记录不存在\",\n \"states\":[{\"code\":\"pending\",\"label\":\"待审核\"}],\n \"actions\":[{\n \"code\":\"approve\",\n \"name\":\"审核通过\",\n \"from\":\"pending\",\n \"to\":\"borrowing\",\n \"actor\":\"admin\",\n \"method\":\"POST\",\n \"path\":\"/borrow-record/approve\",\n \"invalidStateMessage\":\"当前状态不能审核\",\n \"successMessage\":\"审核成功\",\n \"audit\":{\"userField\":\"approve_user_id\",\"timeField\":\"approve_time\"},\n \"effects\":[{\n \"type\":\"decrease\",\n \"table\":\"book\",\n \"relationField\":\"book_id\",\n \"field\":\"stock\",\n \"amount\":\"1\",\n \"min\":\"0\",\n \"notFoundMessage\":\"图书不存在\",\n \"errorMessage\":\"图书库存不足\"\n }],\n \"button\":{\"scope\":\"admin\",\"pageCode\":\"borrow_record_list\",\"slot\":\"list.rowActions\",\"type\":\"success\",\"confirm\":\"确认审核通过吗?\",\"order\":10}\n }],\n \"metrics\":[{\"code\":\"borrowing_count\",\"name\":\"借阅中数量\",\"table\":\"borrow_record\",\"aggregate\":\"count\",\"field\":\"id\",\"status\":\"borrowing\",\"unit\":\"条\"}]\n}\n\n约束\n1. code、表名、字段名全部使用小写 snake_case状态 code 使用稳定英文编码label 使用中文。\n2. 每个 action 必须有 from 和 to且二者存在于 states 中并且不相同。\n3. effects.type 只能是 decrease、increase、update_related、create_record。\n4. decrease/increase 必须给 table、relationField、field、amountdecrease 还要给 min。\n5. update_related/create_record 使用 values值可为 currentUserId、now、record.字段名或常量。\n6. 审核人等身份只能通过 audit.userField 表达,由后端登录态注入,不能作为前端可传字段。\n7. 覆盖需求中的完整正向闭环和关键回退/拒绝动作,但不要为普通 CRUD 创建 action。\n8. metrics.status 如果填写,必须完全等于 states 中某个 code统计全状态数据或不能确定状态时省略 status。\n9. button.pageCode 必须引用 appBlueprint 中已有页面button.slot 只能是 list.toolbarActions、list.rowActions、detail.primaryActions、detail.secondaryActions、form.footerActions。详情页主操作使用 detail.primaryActions列表记录操作使用 list.rowActions禁止使用 page.actions 等自定义值。', 'context-json:flow_config:v1', '请根据以下 JSON 上下文生成 flow_config。appBlueprint 是已确认的页面、角色和菜单范围,必须与它保持一致:\n{{input}}', 'deepseek', '', '493bfe3aa6bafe555f3fedab46a75c8364c303c2a589b1ffaa01196a93c6472f', 'RETIRED', 102, 'builtin-one-click-1.0.0', 'codex', '2026-07-14 20:08:51', 'codex', '2026-07-14 20:08:51', 'Add explicit business action UI slot contract');
INSERT INTO `factory_prompt_version` VALUES (112, 103, 2, 'V2', '你是 MySQL 业务数据库设计专家。只输出符合用户消息结构的 JSON根据已确认的应用蓝图和业务闭环生成可直接落地的表、字段、主外键、字典和表操作策略。字段必须业务化且类型合法所有蓝图与闭环引用必须有真实表字段承载不得生成菜单、权限关系、代码或业务动作。flowConfig.actions[].audit 中非空的 userField 和 timeField 必须是 mainTable 的真实字段userField 使用 bigint(20)timeField 使用 datetime。', 'context-json:database:v1', '根据项目输入 JSON 生成 MySQL 数据库设计 JSON只返回 JSON不要 Markdown 围栏或解释。\nConfirmed app blueprint JSON and Confirmed business loop plan JSON are supplied in the input.\nDatabase generation constraints from the business loop plan must be enforced.\nEvery confirmedBusinessLoopPlan.metrics tableName, field, and filters.field must exist in the generated schema. Numeric sum/avg/min/max metric fields must use a compatible numeric column type. Status-filter metric values must remain compatible with the matching stateMachines.states.\nIf input.mode is correction, repair input.originalResponse according to input.validationError and return the complete corrected database JSON. Do not drop unrelated valid tables or fields.\n输出结构{\"tables\":[{\"tableName\":\"car_info\",\"tableComment\":\"车辆信息表\",\"adminMenuName\":\"车辆管理\",\"operations\":{\"add\":true,\"edit\":true,\"remove\":true,\"removeType\":\"physical\",\"reason\":\"\"},\"columns\":[{\"columnName\":\"id\",\"columnLabel\":\"ID\",\"columnComment\":\"主键ID\",\"columnType\":\"bigint(20)\",\"isPk\":\"1\",\"isIncrement\":\"1\",\"isRequired\":\"1\"}]}]}。\n不要使用 field_1 等占位字段;每个表必须包含非空 columns以及 adminMenuName 和 operations.add/edit/remove/removeType/reason。\nadminMenuName 必须来自本表 tableComment/tableName不得复用其他表或宽泛模块名称。\nadminMenuName must come from that table\'s own tableComment or tableName.\n字段数组名称只能是 columns不能使用 fields、fieldDesign、fieldList、columnList。\nEvery table must include a non-empty columns array; use columns exactly.\n每个字段必须包含 columnName、columnLabel、columnComment、columnType、isPk、isIncrement、isRequired。columnLabel 是短 UI 标签columnComment 是完整数据库说明。\n可提供 javaType、htmlTypehtmlType 只能是 input、textarea、select、radio、checkbox、datetime、imageUpload、fileUpload、editor。\nselect/radio/checkbox 应提供 dictType 和 dictOptions。关联选择使用 remote:target_table:value_field:label_field且目标表和值/标签字段必须都存在于本次 tables JSON。\n非主键外键字段应在目标表存在时使用 remote select无目标表的分类、类型、状态使用本地 dictOptions 或普通输入。\n普通主数据表除唯一主键外至少包含 4 个业务字段。\n订单、支付、借还、审批、流程、任务、库存记录等动作记录表使用仅新增关系、审计、日志、历史表使用只读普通主数据表使用完整 CRUD。\n不要生成 businessActions、业务动作、工作流、代码、菜单表、user_role、角色权限表或权限表。\nDo not generate menu tables, user_role tables, role-permission tables, or permission tables.\n表名字段名只使用小写字母、数字、下划线每表必须且只能有一个主键。字段类型只能使用 bigint(20)、int(11)、varchar(n)、char(n)、decimal(p,s)、datetime、date、text、longtext。\n为 confirmedAppBlueprint.roles 中每个角色创建独立账号表admin 使用 admin其他角色使用 role.code。不得使用共享用户表或 role_id/role_code/user_role。\n角色账号表包含 `<role_code>_id` 自增主键、username、password_hash、nickname、status、create_time。admin 只能登录后台,非 admin 角色登录前台。\n生成 frontendPages.tableName 引用的全部表;个人资料页必须绑定对应非 admin 角色账号表。requiresLogin=true 且 dataScope=CURRENT_USER 的业务数据通常包含 user_id。\ncanonicalTableRegistry 中的名称是最终规范表名。confirmedBusinessLoopPlan 若出现与其指向同一业务对象的同义表名,必须使用 canonicalTableRegistry 中的名称,不得同时生成两张同义表。\n根据 confirmedBusinessLoopPlan 创建 coreObjects.tableName、actions.ownerTable补齐 stateMachines.statusField、quantityRules.quantityField 以及 recordRules 和动作前置条件需要的字段。状态值不得超出 stateMachines.states。\n严格实现 confirmedBusinessLoopPlan.businessPoliciesTIME_LIMIT 的 startField、dueField 使用 datetimeOVERDUE_FEE 的 dueField 使用 datetime、daysTargetField 使用 int(11)、targetField 使用 decimal(10,2)QUANTITY_LIMIT 的 targetField 使用 int(11) 且默认值为 0。所有政策字段必须位于政策指定的 tableName禁止只把期限或公式写进 columnComment 而不创建字段。\nDo not invent status values outside stateMachines.states.\n严格遵守 input.limits.maxTables 和 maxColumnsPerTable。\n项目输入 JSON\n{{input}}', 'deepseek', '', 'c7d0a32ce0b0055ac80348fb10c1beb758034b9c5b5637694725425bb7937cbc', 'PUBLISHED', 103, 'builtin-one-click-1.0.0', 'codex', '2026-07-14 21:56:14', 'codex', '2026-07-14 21:56:14', 'Require flow action audit fields in the main table');
INSERT INTO `factory_prompt_version` VALUES (113, 102, 3, 'v3', '你是业务流程配置设计器。只输出一个合法 JSON 对象,不输出 Markdown、解释或 SQL。\n\n目标用最小 flow_config 描述业务发起、状态流转、显式 Java 业务动作、多表数量联动、按钮和统计。不要输出普通 CRUD不要输出通用规则 DSL。创建主业务记录的“借书/预约/申请/下单”等发起动作属于业务闭环,必须输出。项目存在预约、借阅等多个独立状态对象时,必须分别放入 flows禁止只选择其中一个局部流程。\n\n固定结构\n{\n \"version\":\"1.1\",\n \"code\":\"library_circulation\",\n \"name\":\"图书流通\",\n \"flows\":[{\n \"code\":\"reservation_flow\",\"name\":\"图书预约\",\"mainTable\":\"reservation\",\"statusField\":\"status\",\n \"notFoundMessage\":\"预约记录不存在\",\n \"states\":[{\"code\":\"pending\",\"label\":\"待处理\"},{\"code\":\"cancelled\",\"label\":\"已取消\"}],\n \"actions\":[{\n \"code\":\"reserve_book\",\"name\":\"预约\",\"actor\":\"reader\",\"ownerTable\":\"book_info\",\"requestFields\":[\"id\"],\n \"method\":\"POST\",\"path\":\"/book-info/reserve\",\"successMessage\":\"预约成功\",\n \"effects\":[{\"type\":\"create_record\",\"table\":\"reservation\",\"values\":{\"book_id\":\"record.id\",\"reader_id\":\"currentUserId\",\"status\":\"pending\",\"reserve_date\":\"now\"}}],\n \"button\":{\"scope\":\"reader\",\"pageCode\":\"book_detail_page\",\"tableName\":\"book_info\",\"slot\":\"detail.primaryActions\",\"type\":\"primary\",\"confirm\":\"确认预约吗?\",\"order\":10}\n },{\n \"code\":\"cancel_reservation\",\"name\":\"取消预约\",\"from\":\"pending\",\"to\":\"cancelled\",\"actor\":\"reader\",\n \"ownerTable\":\"reservation\",\"requestFields\":[\"id\"],\"method\":\"POST\",\"path\":\"/reservation/cancel\",\n \"button\":{\"scope\":\"reader\",\"pageCode\":\"my_reservations_page\",\"tableName\":\"reservation\",\"slot\":\"list.rowActions\",\"type\":\"danger\",\"confirm\":\"确认取消预约吗?\",\"order\":10}\n }],\n \"metrics\":[]\n },{\n \"code\":\"borrowing_flow\",\"name\":\"图书借阅\",\"mainTable\":\"borrowing\",\"statusField\":\"status\",\n \"notFoundMessage\":\"借阅记录不存在\",\n \"states\":[{\"code\":\"borrowing\",\"label\":\"借阅中\"},{\"code\":\"returned\",\"label\":\"已归还\"}],\n \"actions\":[{\n \"code\":\"borrow_book\",\"name\":\"借书\",\"actor\":\"reader\",\"ownerTable\":\"book_info\",\"requestFields\":[\"id\"],\n \"method\":\"POST\",\"path\":\"/book-info/borrow\",\"successMessage\":\"借书成功\",\n \"effects\":[{\"type\":\"create_record\",\"table\":\"borrowing\",\"values\":{\"book_id\":\"record.id\",\"reader_id\":\"currentUserId\",\"status\":\"borrowing\",\"borrow_date\":\"now\"}},\n {\"type\":\"decrease\",\"table\":\"book_info\",\"relationField\":\"id\",\"field\":\"stock\",\"amount\":\"1\",\"min\":\"0\",\"errorMessage\":\"图书库存不足\"}],\n \"button\":{\"scope\":\"reader\",\"pageCode\":\"book_detail_page\",\"tableName\":\"book_info\",\"slot\":\"detail.primaryActions\",\"type\":\"success\",\"confirm\":\"确认借书吗?\",\"order\":20}\n },{\n \"code\":\"return_book\",\"name\":\"还书\",\"from\":\"borrowing\",\"to\":\"returned\",\"actor\":\"reader\",\"ownerTable\":\"borrowing\",\"requestFields\":[\"id\"],\n \"method\":\"POST\",\"path\":\"/borrowing/return\",\"effects\":[{\"type\":\"increase\",\"table\":\"book_info\",\"relationField\":\"book_id\",\"field\":\"stock\",\"amount\":\"1\"}],\n \"button\":{\"scope\":\"reader\",\"pageCode\":\"my_borrowings_page\",\"tableName\":\"borrowing\",\"slot\":\"list.rowActions\",\"type\":\"primary\",\"confirm\":\"确认还书吗?\",\"order\":10}\n }],\n \"metrics\":[{\"code\":\"borrowing_count\",\"name\":\"借阅中数量\",\"table\":\"borrowing\",\"aggregate\":\"count\",\"field\":\"id\",\"status\":\"borrowing\",\"unit\":\"条\"}]\n }]\n}\n\n约束\n1. 根对象固定使用 version=1.1 和 flows 数组;每个独立状态主表对应一个 flow。code、表名、字段名全部使用小写 snake_case状态 code 使用稳定英文编码label 使用中文。\n2. 每个 action 必须给 ownerTablerequestFields 只列页面传入字段,通常为 ownerTable 主键 idcurrentUserId 不能作为前端可传字段。\n3. 除发起型 action 外,每个 action 必须有 from 和 to二者存在于 states 中且不相同ownerTable 必须为 mainTable。\n4. 创建主业务记录的发起型 action 必须省略 from/to并 create_record 到 mainTablevalues 必须给 statusField 写入 states 中的初始状态。借书、预约、申请、报名、下单、提交工单等需求不得误判为普通 CRUD 而省略。\n5. effects.type 只能是 decrease、increase、update_related、create_record。\n6. decrease/increase 必须给 table、relationField、field、amountdecrease 还要给 min。\n7. update_related/create_record 使用 values值可为 currentUserId、now、record.字段名或常量。record 表示 ownerTable 当前记录。\n8. 审核人等状态动作身份通过 audit.userField 表达;发起型动作的用户和时间通过 create_record.values 的 currentUserId、now 表达,均由后端登录态注入。\n9. requiredActionCodes 中的每个动作都必须在 actions 中出现,并绑定到 appBlueprint 已有页面。覆盖需求中的完整正向闭环、业务发起动作和关键回退/拒绝动作,但不要为无业务语义的普通 CRUD 创建 action。\n10. metrics.status 如果填写,必须完全等于 states 中某个 code统计全状态数据或不能确定状态时省略 status。\n11. 每个面向用户或管理员的显式动作必须有 button。button.pageCode 必须引用 appBlueprint 中已有页面button.tableName 必须是该页面绑定表,省略时等于 ownerTablebutton.slot 只能是 list.toolbarActions、list.rowActions、detail.primaryActions、detail.secondaryActions、form.footerActions。详情页主操作使用 detail.primaryActions列表记录操作使用 list.rowActions禁止使用 page.actions 等自定义值。', 'context-json:flow_config:v1', '{{input}}', 'deepseek', '', '9443d0ca8f3e4bb87cdc13ef4924015fff334f0c9b8690573f0551dd18708406', 'PUBLISHED', 111, '', 'admin', '2026-07-15 10:32:38', 'admin', '2026-07-15 10:32:33', '');
-- ----------------------------
-- Table structure for front_ai_generation_task
-- ----------------------------
DROP TABLE IF EXISTS `front_ai_generation_task`;
CREATE TABLE `front_ai_generation_task` (
`task_id` bigint(20) NOT NULL AUTO_INCREMENT COMMENT 'AI task ID',
`generation_id` bigint(20) NULL DEFAULT NULL COMMENT 'Generation record ID',
`project_id` bigint(20) NOT NULL COMMENT 'Project ID',
`user_id` bigint(20) NOT NULL COMMENT 'Front user ID',
`generate_type` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NOT NULL COMMENT 'Generation type',
`provider` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT 'deepseek' COMMENT 'AI provider',
`model` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT 'deepseek-chat' COMMENT 'AI model',
`prompt_code` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NOT NULL COMMENT 'Published Prompt code',
`prompt_version` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NOT NULL COMMENT 'Published Prompt version',
`prompt_fingerprint` char(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NOT NULL COMMENT 'Published Prompt SHA-256',
`stage_manifest_json` longtext CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL COMMENT 'Canonical stage manifest JSON',
`stage_manifest_hash` char(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT 'Stage manifest SHA-256',
`status` varchar(30) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NOT NULL DEFAULT 'QUEUED' COMMENT 'Task status',
`request_hash` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NOT NULL COMMENT 'Request idempotency hash',
`request_payload` longtext CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL COMMENT 'Request JSON',
`result_payload` longtext CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL COMMENT 'Result JSON',
`error_code` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT '' COMMENT 'Error code',
`error_message` varchar(1000) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT '' COMMENT 'Error message',
`attempts` int(11) NULL DEFAULT 0 COMMENT 'Attempt count',
`max_attempts` int(11) NULL DEFAULT 3 COMMENT 'Max attempts',
`next_retry_time` datetime(0) NULL DEFAULT NULL COMMENT 'Next retry time',
`locked_by` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT '' COMMENT 'Worker lock owner',
`locked_until` datetime(0) NULL DEFAULT NULL COMMENT 'Worker lock expiry',
`progress` int(11) NULL DEFAULT 0 COMMENT 'Progress percent',
`current_step` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT '' COMMENT 'Current step',
`prompt_tokens` int(11) NULL DEFAULT 0 COMMENT 'Prompt tokens',
`prompt_cache_hit_tokens` int(11) NULL DEFAULT 0 COMMENT 'Prompt cache hit tokens',
`prompt_cache_miss_tokens` int(11) NULL DEFAULT 0 COMMENT 'Prompt cache miss tokens',
`completion_tokens` int(11) NULL DEFAULT 0 COMMENT 'Completion tokens',
`reasoning_tokens` int(11) NULL DEFAULT 0 COMMENT 'Reasoning tokens',
`input_tokens` int(11) NULL DEFAULT 0 COMMENT 'Input tokens',
`output_tokens` int(11) NULL DEFAULT 0 COMMENT 'Output tokens',
`total_tokens` int(11) NULL DEFAULT 0 COMMENT 'Total tokens',
`cost_cents` int(11) NULL DEFAULT 0 COMMENT 'Estimated cost in cents',
`cost_usd` decimal(18, 8) NULL DEFAULT 0.00000000 COMMENT 'Estimated cost in USD',
`started_at` datetime(0) NULL DEFAULT NULL COMMENT 'Started time',
`finished_at` datetime(0) NULL DEFAULT NULL COMMENT 'Finished time',
`create_time` datetime(0) NULL DEFAULT NULL COMMENT 'Create time',
`update_time` datetime(0) NULL DEFAULT NULL COMMENT 'Update time',
PRIMARY KEY (`task_id`) USING BTREE,
INDEX `idx_front_ai_task_project`(`user_id`, `project_id`) USING BTREE,
INDEX `idx_front_ai_task_status`(`status`, `next_retry_time`) USING BTREE,
INDEX `idx_front_ai_task_generation`(`generation_id`) USING BTREE,
INDEX `idx_front_ai_task_hash`(`user_id`, `project_id`, `request_hash`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 100 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_0900_ai_ci COMMENT = 'Front AI generation task' ROW_FORMAT = Dynamic;
-- ----------------------------
-- Records of front_ai_generation_task
-- ----------------------------
INSERT INTO `front_ai_generation_task` VALUES (100, 100, 100, 100, 'one_click_project', 'deepseek', 'deepseek-v4-flash', 'front.one_click_project', 'V1', '28e64be601aa2ec52f471e7fe8e534b3f41f053125435124128794371db1b770', '{\"pipelineCode\":\"one_click_project\",\"schemaVersion\":\"1.0\",\"stages\":[{\"sequenceNo\":1,\"stageCode\":\"PROJECT_PREPARE\"},{\"generateType\":\"flow_config\",\"model\":\"deepseek-v4-flash\",\"pipelineReleaseCode\":\"builtin-one-click-1.0.0\",\"promptCode\":\"front.flow_config\",\"promptFingerprint\":\"247495840c67968896ccad2db0a599bd4fc594d0189157dce888b8ede90b3257\",\"promptVersion\":\"V1\",\"providerCode\":\"deepseek\",\"sequenceNo\":2,\"stageCode\":\"DESIGN\"},{\"generateType\":\"database\",\"model\":\"deepseek-v4-flash\",\"pipelineReleaseCode\":\"builtin-one-click-1.0.0\",\"promptCode\":\"front.database\",\"promptFingerprint\":\"14dcad479b01de068e5c5bc39b5cd7a591a09d334ee6812483d8ac00dd8c9d61\",\"promptVersion\":\"V1\",\"providerCode\":\"deepseek\",\"sequenceNo\":3,\"stageCode\":\"DATABASE\"},{\"sequenceNo\":4,\"stageCode\":\"GENERATE\"},{\"sequenceNo\":5,\"stageCode\":\"VERIFY_AND_PREVIEW\"},{\"sequenceNo\":6,\"stageCode\":\"COMPLETED\"}]}', '41665c324e489377317e2e2b290a8d95541281debd5b7c22d79aff9b24864022', 'FAILED', '68ba9096ac4fa4e896e6a184dd605af360c50c665f089d7e943512d6b2bf8e5a', '{\"codeTemplate\":\"qing\",\"extraRequirements\":\"\",\"generateType\":\"one_click_project\",\"projectDesc\":\"【AI补全需求】\\n业务目标图书管理系统旨在提供图书借阅、归还、查询及读者管理的基础功能支持图书库存管理与借阅期限控制。\\n\\n角色管理员、读者\\n\\n核心对象图书、读者、借阅记录、图书分类\\n\\n核心流程读者在系统内注册账号填写姓名、学号或工号、联系方式等信息管理员审核通过后激活读者账号读者登录系统通过关键词书名、作者、ISBN查询图书系统显示图书的库存数量、可借状态、存放位置读者选择一本可借图书并发起借阅请求系统检测读者当前借阅未还数量是否达到上限若未达到则生成借阅记录扣减库存数量1本借阅状态变为借出开始计借阅时间读者在借阅期限内将图书归还至图书馆管理员扫描图书条码或输入图书ID系统找到对应借阅记录更新归还时间为当前时间归还状态变为已还库存数量加1若读者超期未还系统在归还时自动计算超期天数并生成逾期费用读者需在系统内支付逾期费用后方可完成归还或管理员登记后读者线下支付系统记录支付状态读者可查看本人的借阅历史、当前借阅图书及应还日期管理员可管理图书信息新增、编辑图书基本信息、分类、库存数量、读者信息冻结、解冻、重置密码、查看所有借阅记录管理员可处理图书损坏或丢失标记图书状态为损坏或丢失扣除库存读者需赔偿。\\n\\n业务规则AI假设每位读者最多可借阅5本图书AI假设图书借阅期限为30天起算时间为借阅请求被管理员确认或系统自动确认时刻AI假设逾期费用为每本每天0.5元按天计费不足1天按1天计算Ceil取整单本逾期费用上限为图书定价的1倍AI假设图书定价默认为50元若未录入则使用此默认值每次借阅只能借阅同一本书1本读者账号需激活且未被冻结才能借阅库存数量为0时不可借阅已借出的图书状态为借出不可再次借阅归还时若图书损坏管理员标记损坏等级赔偿金额为图书定价的50%AI假设若图书丢失赔偿金额为图书定价的2倍AI假设系统自动在每晚23:59检查所有借阅记录将当日到期的图书标记为即将逾期状态仅供提醒但逾期计算以实际归还日期为准。\\n\\n异常边界库存不足时读者无法发起借阅请求系统提示该图书已全部借出状态不符时若图书状态为损坏或丢失不可借阅若读者账号被冻结不可借阅若读者当前借阅未还数量已达上限不可借阅重复提交时同一读者对于同一本图书在未归还前不可重复提交借阅请求系统检测已有进行中的借阅记录则拒绝取消时读者可在管理员确认借阅前取消借阅请求取消后库存不扣减借阅一旦确认无法取消超时时读者在借阅期限到期后仍可归还图书但需支付逾期费用重复支付时若读者已支付逾期费用再次支付时系统提示该笔费用已支付避免重复扣款。\\n\\n验收场景读者张三学号2023001当前借阅未还数量为4本查询到图书《数据结构》库存有2本定价50元。张三在2024年1月1日10:00发起借阅请求管理员确认后借阅成功库存变为1本应还日期为2024年1月31日。张三在2024年2月2日14:00归还超期2天1月31日到期2月1日第1天2月2日第2天。逾期费用计算2天×0.5元/天=1元未超过定价50元无需封顶。张三支付1元后归还完成库存恢复为2本。\\n\\n其他模块公告栏、新闻资讯、友情链接、帮助中心\",\"projectName\":\"图书管理系统\",\"stylePreset\":\"dark-tech\"}', '{\"downloadReady\":false,\"errorMessage\":\"Business action UI binding page does not exist: borrowing_admin_page\",\"failedStage\":\"GENERATE\",\"projectId\":100,\"report\":{\"adminPageCount\":12,\"businessActionCount\":0,\"businessLoopComplete\":true,\"businessLoopWarnings\":[],\"frontendPageCount\":10,\"loopActions\":12,\"missingRequiredActions\":[],\"quantityRules\":0,\"recordRules\":0,\"stateTransitions\":0,\"tableCount\":10},\"stage\":\"GENERATE\",\"suggestedActions\":[\"进入高级调整检查当前阶段输入和生成结果后重试\"]}', 'GENERATE', 'Business action UI binding page does not exist: borrowing_admin_page', 1, 3, '2026-07-14 15:17:29', NULL, NULL, 68, '生成失败', 0, 0, 0, 0, 0, 12639, 26337, 38976, 7, 0.00000000, '2026-07-14 15:17:29', '2026-07-14 15:21:09', '2026-07-14 15:17:29', '2026-07-14 15:21:08');
INSERT INTO `front_ai_generation_task` VALUES (101, 101, 101, 100, 'one_click_project', 'deepseek', 'deepseek-v4-flash', 'front.one_click_project', 'V1', '28e64be601aa2ec52f471e7fe8e534b3f41f053125435124128794371db1b770', '{\"pipelineCode\":\"one_click_project\",\"schemaVersion\":\"1.0\",\"stages\":[{\"sequenceNo\":1,\"stageCode\":\"PROJECT_PREPARE\"},{\"generateType\":\"flow_config\",\"model\":\"deepseek-v4-flash\",\"pipelineReleaseCode\":\"builtin-one-click-1.0.0\",\"promptCode\":\"front.flow_config\",\"promptFingerprint\":\"247495840c67968896ccad2db0a599bd4fc594d0189157dce888b8ede90b3257\",\"promptVersion\":\"V1\",\"providerCode\":\"deepseek\",\"sequenceNo\":2,\"stageCode\":\"DESIGN\"},{\"generateType\":\"database\",\"model\":\"deepseek-v4-flash\",\"pipelineReleaseCode\":\"builtin-one-click-1.0.0\",\"promptCode\":\"front.database\",\"promptFingerprint\":\"14dcad479b01de068e5c5bc39b5cd7a591a09d334ee6812483d8ac00dd8c9d61\",\"promptVersion\":\"V1\",\"providerCode\":\"deepseek\",\"sequenceNo\":3,\"stageCode\":\"DATABASE\"},{\"sequenceNo\":4,\"stageCode\":\"GENERATE\"},{\"sequenceNo\":5,\"stageCode\":\"VERIFY_AND_PREVIEW\"},{\"sequenceNo\":6,\"stageCode\":\"COMPLETED\"}]}', '41665c324e489377317e2e2b290a8d95541281debd5b7c22d79aff9b24864022', 'FAILED', '3808e5fd1c1f9cd22add4dfd62b10169062d73a5f5754d6f518e367eaad075fd', '{\"codeTemplate\":\"qing\",\"extraRequirements\":\"\",\"generateType\":\"one_click_project\",\"projectDesc\":\"项目定位:一个面向高校图书馆的图书管理系统,供读者在线借书、还书、预约,管理员进行图书管理和借阅审核。\\n\\n角色管理员、读者。\\n\\n核心流程读者检索图书→提交借书申请→管理员审核通过并发放图书→读者还书或续借→管理员确认归还→超期则系统自动生成罚款→读者在线缴纳罚款。\\n\\n关键规则每位读者最多同时借阅5本书借阅期限为30天可续借1次续借期15天超期罚款0.1元/天预约图书保留2天逾期未取自动取消。\\n\\n异常边界库存为0时禁止借出同一读者重复提交同一本书的借书申请时提示“已借出或预约中”状态为“已借出”或“逾期”时无法再次借书预约超时自动释放库存支付罚款时若余额不足则失败。\",\"projectName\":\"图书管理系统\",\"stylePreset\":\"dark-tech\"}', '{\"downloadReady\":false,\"errorMessage\":\"Business action UI binding page does not exist: borrow_admin_page\",\"failedStage\":\"GENERATE\",\"projectId\":101,\"report\":{\"adminPageCount\":9,\"businessActionCount\":0,\"businessLoopComplete\":true,\"businessLoopWarnings\":[],\"frontendPageCount\":6,\"loopActions\":8,\"missingRequiredActions\":[],\"quantityRules\":0,\"recordRules\":0,\"stateTransitions\":0,\"tableCount\":7},\"stage\":\"GENERATE\",\"suggestedActions\":[\"进入高级调整检查当前阶段输入和生成结果后重试\"]}', 'GENERATE', 'Business action UI binding page does not exist: borrow_admin_page', 1, 3, '2026-07-14 15:45:04', NULL, NULL, 68, '生成失败', 0, 0, 0, 0, 0, 20465, 37819, 58284, 10, 0.00000000, '2026-07-14 15:45:04', '2026-07-14 15:50:13', '2026-07-14 15:45:04', '2026-07-14 15:50:12');
INSERT INTO `front_ai_generation_task` VALUES (102, 102, 102, 100, 'one_click_project', 'deepseek', 'deepseek-v4-flash', 'front.one_click_project', 'V1', '28e64be601aa2ec52f471e7fe8e534b3f41f053125435124128794371db1b770', '{\"pipelineCode\":\"one_click_project\",\"schemaVersion\":\"1.0\",\"stages\":[{\"sequenceNo\":1,\"stageCode\":\"PROJECT_PREPARE\"},{\"generateType\":\"flow_config\",\"model\":\"deepseek-v4-flash\",\"pipelineReleaseCode\":\"builtin-one-click-1.0.0\",\"promptCode\":\"front.flow_config\",\"promptFingerprint\":\"247495840c67968896ccad2db0a599bd4fc594d0189157dce888b8ede90b3257\",\"promptVersion\":\"V1\",\"providerCode\":\"deepseek\",\"sequenceNo\":2,\"stageCode\":\"DESIGN\"},{\"generateType\":\"database\",\"model\":\"deepseek-v4-flash\",\"pipelineReleaseCode\":\"builtin-one-click-1.0.0\",\"promptCode\":\"front.database\",\"promptFingerprint\":\"14dcad479b01de068e5c5bc39b5cd7a591a09d334ee6812483d8ac00dd8c9d61\",\"promptVersion\":\"V1\",\"providerCode\":\"deepseek\",\"sequenceNo\":3,\"stageCode\":\"DATABASE\"},{\"sequenceNo\":4,\"stageCode\":\"GENERATE\"},{\"sequenceNo\":5,\"stageCode\":\"VERIFY_AND_PREVIEW\"},{\"sequenceNo\":6,\"stageCode\":\"COMPLETED\"}]}', '41665c324e489377317e2e2b290a8d95541281debd5b7c22d79aff9b24864022', 'FAILED', '9f702e2e517e0522240f6d21f657f12673cf80b76c9609d2e84ffed35384c110', '{\"codeTemplate\":\"qing\",\"extraRequirements\":\"\",\"generateType\":\"one_click_project\",\"projectDesc\":\"项目定位:面向高校图书馆的图书管理系统,用于读者借阅预约、管理员日常管理和系统管理员后台维护。 \\n角色读者、管理员。 \\n核心流程读者查询图书并发起借阅/预约请求管理员审核并完成借出状态变为已借出读者还书时管理员处理并更新图书状态为可借预约图书到馆后保留2天超时自动释放借阅超期生成罚款读者可通过管理台缴纳。 \\n关键规则每位读者最多同时借阅5本每本借阅期限30天超期每天罚款0.5元预约图书保留2天图书总数固定可借数量随借出减少还书后恢复。 \\n异常边界可借数量为0时无法借阅/预约;已借出状态不得重复借出;预约取消后释放名额;超期未还时借阅入口禁用;若读者已有同本书未还,不可再次借阅。\",\"projectName\":\"图书管理系统\",\"stylePreset\":\"dark-tech\"}', '{\"downloadReady\":false,\"errorMessage\":\"Unsupported business action UI binding target: current_user\",\"failedStage\":\"GENERATE\",\"projectId\":102,\"report\":{\"adminPageCount\":8,\"businessActionCount\":0,\"businessLoopComplete\":true,\"businessLoopWarnings\":[],\"frontendPageCount\":7,\"loopActions\":7,\"missingRequiredActions\":[],\"quantityRules\":0,\"recordRules\":0,\"stateTransitions\":0,\"tableCount\":6},\"stage\":\"GENERATE\",\"suggestedActions\":[\"进入高级调整检查当前阶段输入和生成结果后重试\"]}', 'GENERATE', 'Unsupported business action UI binding target: current_user', 2, 3, '2026-07-14 16:11:17', NULL, NULL, 68, '生成失败', 0, 0, 0, 0, 0, 17041, 34699, 51740, 9, 0.00000000, '2026-07-14 16:11:17', '2026-07-14 16:11:18', '2026-07-14 15:52:52', '2026-07-14 16:11:17');
INSERT INTO `front_ai_generation_task` VALUES (103, 103, 103, 100, 'one_click_project', 'deepseek', 'deepseek-v4-flash', 'front.one_click_project', 'V1', '28e64be601aa2ec52f471e7fe8e534b3f41f053125435124128794371db1b770', '{\"pipelineCode\":\"one_click_project\",\"schemaVersion\":\"1.0\",\"stages\":[{\"sequenceNo\":1,\"stageCode\":\"PROJECT_PREPARE\"},{\"generateType\":\"flow_config\",\"model\":\"deepseek-v4-flash\",\"pipelineReleaseCode\":\"builtin-one-click-1.0.0\",\"promptCode\":\"front.flow_config\",\"promptFingerprint\":\"247495840c67968896ccad2db0a599bd4fc594d0189157dce888b8ede90b3257\",\"promptVersion\":\"V1\",\"providerCode\":\"deepseek\",\"sequenceNo\":2,\"stageCode\":\"DESIGN\"},{\"generateType\":\"database\",\"model\":\"deepseek-v4-flash\",\"pipelineReleaseCode\":\"builtin-one-click-1.0.0\",\"promptCode\":\"front.database\",\"promptFingerprint\":\"14dcad479b01de068e5c5bc39b5cd7a591a09d334ee6812483d8ac00dd8c9d61\",\"promptVersion\":\"V1\",\"providerCode\":\"deepseek\",\"sequenceNo\":3,\"stageCode\":\"DATABASE\"},{\"sequenceNo\":4,\"stageCode\":\"GENERATE\"},{\"sequenceNo\":5,\"stageCode\":\"VERIFY_AND_PREVIEW\"},{\"sequenceNo\":6,\"stageCode\":\"COMPLETED\"}]}', '41665c324e489377317e2e2b290a8d95541281debd5b7c22d79aff9b24864022', 'FAILED', 'f2ddc6d1aa01455dae594e4296176b0af212251808d374076507666290ab98c4', '{\"codeTemplate\":\"qing\",\"extraRequirements\":\"\",\"generateType\":\"one_click_project\",\"projectDesc\":\"【AI补全需求】\\n项目定位面向高校图书馆的图书管理系统供读者和管理员使用。 \\n角色读者、管理员。 \\n核心流程读者检索图书 → 提交借书申请 → 管理员审核通过 → 读者取得图书(借出) → 读者还书 → 管理员确认归还。若超期,读者需缴纳逾期费用后完成还书。 \\n关键规则AI假设每位读者最多同时借阅5本书单次借阅期限30天逾期每天每本收费0.5元图书可借数量减1库存为0时不可借出管理员可手动下架图书。 \\n异常边界库存不足时禁止借出读者已借满5本时无法提交申请图书已被预约或借出时提示不可用读者未还清逾期费用无法再借新书管理员可拒绝借书申请或取消异常订单。\",\"projectName\":\"图书管理系统\",\"stylePreset\":\"dark-tech\"}', '{\"downloadReady\":false,\"errorMessage\":\"Business effect value field does not exist: created_at\",\"failedStage\":\"GENERATE\",\"projectId\":103,\"report\":{\"adminPageCount\":8,\"businessActionCount\":0,\"businessLoopComplete\":true,\"businessLoopWarnings\":[],\"frontendPageCount\":7,\"loopActions\":5,\"missingRequiredActions\":[],\"quantityRules\":0,\"recordRules\":0,\"stateTransitions\":0,\"tableCount\":7},\"stage\":\"GENERATE\",\"suggestedActions\":[\"进入高级调整检查当前阶段输入和生成结果后重试\"]}', 'GENERATE', 'Business effect value field does not exist: created_at', 1, 3, '2026-07-14 16:19:18', NULL, NULL, 68, '生成失败', 0, 0, 0, 0, 0, 17014, 33515, 50529, 9, 0.00000000, '2026-07-14 16:19:22', '2026-07-14 16:23:52', '2026-07-14 16:19:17', '2026-07-14 16:23:52');
INSERT INTO `front_ai_generation_task` VALUES (104, 104, 104, 100, 'one_click_project', 'deepseek', 'deepseek-v4-flash', 'front.one_click_project', 'V1', '28e64be601aa2ec52f471e7fe8e534b3f41f053125435124128794371db1b770', '{\"pipelineCode\":\"one_click_project\",\"schemaVersion\":\"1.0\",\"stages\":[{\"sequenceNo\":1,\"stageCode\":\"PROJECT_PREPARE\"},{\"generateType\":\"flow_config\",\"model\":\"deepseek-v4-flash\",\"pipelineReleaseCode\":\"builtin-one-click-1.0.0\",\"promptCode\":\"front.flow_config\",\"promptFingerprint\":\"247495840c67968896ccad2db0a599bd4fc594d0189157dce888b8ede90b3257\",\"promptVersion\":\"V1\",\"providerCode\":\"deepseek\",\"sequenceNo\":2,\"stageCode\":\"DESIGN\"},{\"generateType\":\"database\",\"model\":\"deepseek-v4-flash\",\"pipelineReleaseCode\":\"builtin-one-click-1.0.0\",\"promptCode\":\"front.database\",\"promptFingerprint\":\"14dcad479b01de068e5c5bc39b5cd7a591a09d334ee6812483d8ac00dd8c9d61\",\"promptVersion\":\"V1\",\"providerCode\":\"deepseek\",\"sequenceNo\":3,\"stageCode\":\"DATABASE\"},{\"sequenceNo\":4,\"stageCode\":\"GENERATE\"},{\"sequenceNo\":5,\"stageCode\":\"VERIFY_AND_PREVIEW\"},{\"sequenceNo\":6,\"stageCode\":\"COMPLETED\"}]}', '41665c324e489377317e2e2b290a8d95541281debd5b7c22d79aff9b24864022', 'FAILED', 'f5d0e4bd876e5930166aea2a06b011929d4fce052ac5b1ce4e58f79195674212', '{\"codeTemplate\":\"qing\",\"extraRequirements\":\"\",\"generateType\":\"one_click_project\",\"projectDesc\":\"项目定位面向高校图书馆的图书管理系统供学生、教师和管理员使用。角色学生、教师可借更多书且期限更长、管理员。核心业务对象图书、借阅记录、预约记录、罚款记录。核心流程用户检索图书→查看可借状态→借阅需未逾期、未超限→到期归还或续借每本限续借1次续借15天→逾期按0.1元/天罚款→管理员处理预约到书、上架新书。关键规则学生最多借5本期限30天教师最多10本期限60天。同一用户重复借阅同一本书仅在归还后方可再次借阅。预约图书到书后保留3天逾期释放。罚款累计超过10元暂停借阅权限。异常边界库存不足时不可借阅已预约图书不可借出给未预约用户超期未还不可再借图书状态为“在馆”才能借出用户存在欠款或黑名单时拒绝操作。\",\"projectName\":\"图书管理系统\",\"stylePreset\":\"dark-tech\"}', '{\"downloadReady\":false,\"errorMessage\":\"统计状态不存在: total_fines -> unpaid\",\"failedStage\":\"DESIGN\",\"projectId\":104,\"report\":{\"adminPageCount\":0,\"businessActionCount\":0,\"businessLoopComplete\":false,\"businessLoopWarnings\":[],\"frontendPageCount\":0,\"loopActions\":0,\"missingRequiredActions\":[],\"quantityRules\":0,\"recordRules\":0,\"stateTransitions\":0,\"tableCount\":0},\"stage\":\"DESIGN\",\"suggestedActions\":[\"进入高级调整检查当前阶段输入和生成结果后重试\"]}', 'DESIGN', '统计状态不存在: total_fines -> unpaid', 1, 3, '2026-07-14 17:15:01', NULL, NULL, 20, '生成失败', 0, 0, 0, 0, 0, 7442, 15670, 23112, 4, 0.00000000, '2026-07-14 17:15:01', '2026-07-14 17:17:53', '2026-07-14 17:15:01', '2026-07-14 17:17:52');
INSERT INTO `front_ai_generation_task` VALUES (105, 105, 105, 100, 'one_click_project', 'deepseek', 'deepseek-v4-flash', 'front.one_click_project', 'V1', '28e64be601aa2ec52f471e7fe8e534b3f41f053125435124128794371db1b770', '{\"pipelineCode\":\"one_click_project\",\"schemaVersion\":\"1.0\",\"stages\":[{\"sequenceNo\":1,\"stageCode\":\"PROJECT_PREPARE\"},{\"generateType\":\"flow_config\",\"model\":\"deepseek-v4-flash\",\"pipelineReleaseCode\":\"builtin-one-click-1.0.0\",\"promptCode\":\"front.flow_config\",\"promptFingerprint\":\"247495840c67968896ccad2db0a599bd4fc594d0189157dce888b8ede90b3257\",\"promptVersion\":\"V1\",\"providerCode\":\"deepseek\",\"sequenceNo\":2,\"stageCode\":\"DESIGN\"},{\"generateType\":\"database\",\"model\":\"deepseek-v4-flash\",\"pipelineReleaseCode\":\"builtin-one-click-1.0.0\",\"promptCode\":\"front.database\",\"promptFingerprint\":\"14dcad479b01de068e5c5bc39b5cd7a591a09d334ee6812483d8ac00dd8c9d61\",\"promptVersion\":\"V1\",\"providerCode\":\"deepseek\",\"sequenceNo\":3,\"stageCode\":\"DATABASE\"},{\"sequenceNo\":4,\"stageCode\":\"GENERATE\"},{\"sequenceNo\":5,\"stageCode\":\"VERIFY_AND_PREVIEW\"},{\"sequenceNo\":6,\"stageCode\":\"COMPLETED\"}]}', '41665c324e489377317e2e2b290a8d95541281debd5b7c22d79aff9b24864022', 'FAILED', '16b2147f89e3821482de52ed1e113a4481378e822cf865046ae7565553c7c6bc', '{\"codeTemplate\":\"qing\",\"extraRequirements\":\"\",\"generateType\":\"one_click_project\",\"projectDesc\":\"功能:借书、还书、预约、取消预约\\n角色用户、管理员\\n其他模块轮播图、公告、新闻\",\"projectName\":\"图书管理系统\",\"stylePreset\":\"dark-tech\"}', '{\"downloadReady\":false,\"errorMessage\":\"expect \':\', but }, offset 6259, character \\\", line 260, column 23, fastjson-version 2.0.53\\n{\\n \\\"roles\\\": [\\n {\\n \\\"code\\\": \\\"admin\\\",\\n \\\"name\\\": \\\"管理员\\\",\\n \\\"description\\\": \\\"系统管理员,管理图书、借阅、预约、用户、轮播图、公告、新闻等\\\"\\n },\\n {\\n \\\"code\\\": \\\"reader\\\",\\n \\\"name\\\": \\\"读者\\\",\\n \\\"description\\\": \\\"普通读者,可浏览图书、借书、还书、预约、取消预约\\\"\\n }\\n ],\\n \\\"frontendMenus\\\": [\\n {\\n \\\"code\\\": \\\"book_catalog\\\",\\n \\\"name\\\": \\\"图书目录\\\",\\n \\\"path\\\": \\\"/books\\\",\\n \\\"pageCode\\\": \\\"book_catalog_page\\\",\\n \\\"requiresLogin\\\": false,\\n \\\"visibleRoles\\\": [],\\n \\\"dataScope\\\": \\\"PUBLIC\\\"\\n },\\n {\\n \\\"code\\\": \\\"announcement\\\",\\n \\\"name\\\": \\\"公告\\\",\\n \\\"path\\\": \\\"/announcements\\\",\\n \\\"pageCode\\\": \\\"announcement_list_page\\\",\\n \\\"requiresLogin\\\": false,\\n \\\"visibleRoles\\\": [],\\n \\\"dataScope\\\": \\\"PUBLIC\\\"\\n },\\n {\\n \\\"code\\\": \\\"news\\\",\\n \\\"name\\\": \\\"新闻\\\",\\n \\\"path\\\": \\\"/news\\\",\\n \\\"pageCode\\\": \\\"news_list_page\\\",\\n \\\"requiresLogin\\\": false,\\n \\\"visibleRoles\\\": [],\\n \\\"dataScope\\\": \\\"PUBLIC\\\"\\n },\\n {\\n \\\"code\\\": \\\"reader_profile\\\",\\n \\\"name\\\": \\\"个人资料\\\",\\n \\\"path\\\": \\\"/profile\\\",\\n \\\"pageCode\\\": \\\"reader_profile_page\\\",\\n \\\"requiresLogin\\\": true,\\n \\\"visibleRoles\\\": [\\\"reader\\\"],\\n \\\"dataScope\\\": \\\"CURRENT_USER\\\"\\n },\\n {\\n \\\"code\\\": \\\"my_borrows\\\",\\n \\\"name\\\": \\\"我的借阅\\\",\\n \\\"path\\\": \\\"/my-borrows\\\",\\n \\\"pageCode\\\": \\\"my_borrows_page\\\",\\n \\\"requiresLogin\\\": true,\\n \\\"visibleRoles\\\": [\\\"reader\\\"],\\n \\\"dataScope\\\": \\\"CURRENT_USER\\\"\\n },\\n {\\n \\\"code\\\": \\\"my_reservations\\\",\\n \\\"name\\\": \\\"我的预约\\\",\\n \\\"path\\\": \\\"/my-reservations\\\",\\n \\\"pageCode\\\": \\\"my_reservations_page\\\",\\n \\\"requiresLogin\\\": true,\\n \\\"visibleRoles\\\": [\\\"reader\\\"],\\n \\\"dataScope\\\": \\\"CURRENT_USER\\\"\\n }\\n ],\\n \\\"frontendPages\\\": [\\n {\\n \\\"code\\\": \\\"book_catalog_page\\\",\\n \\\"name\\\": \\\"图书目录\\\",\\n \\\"menuCode\\\": \\\"book_catalog\\\",\\n \\\"path\\\": \\\"/books\\\",\\n \\\"pageType\\\": \\\"list\\\",\\n \\\"tableName\\\": \\\"book_info\\\"\\n },\\n {\\n \\\"code\\\": \\\"book_detail_page\\\",\\n \\\"name\\\": \\\"图书详情\\\",\\n \\\"menuCode\\\": \\\"book_catalog\\\",\\n \\\"path\\\": \\\"/books/:id\\\",\\n \\\"pageType\\\": \\\"detail\\\",\\n \\\"tableName\\\": \\\"book_info\\\"\\n },\\n {\\n \\\"code\\\": \\\"announcement_list_page\\\",\\n \\\"name\\\": \\\"公告列表\\\",\\n \\\"menuCode\\\": \\\"announcement\\\",\\n \\\"path\\\": \\\"/announcements\\\",\\n \\\"pageType\\\": \\\"list\\\",\\n \\\"tableName\\\": \\\"announcement\\\"\\n },\\n {\\n \\\"code\\\": \\\"announcement_detail_page\\\",\\n \\\"name\\\": \\\"公告详情\\\",\\n \\\"menuCode\\\": \\\"announcement\\\",\\n \\\"path\\\": \\\"/announcements/:id\\\",\\n \\\"pageType\\\": \\\"detail\\\",\\n \\\"tableName\\\": \\\"announcement\\\"\\n },\\n {\\n \\\"code\\\": \\\"news_list_page\\\",\\n \\\"name\\\": \\\"新闻列表\\\",\\n \\\"menuCode\\\": \\\"news\\\",\\n \\\"path\\\": \\\"/news\\\",\\n \\\"pageType\\\": \\\"list\\\",\\n \\\"tableName\\\": \\\"news\\\"\\n },\\n {\\n \\\"code\\\": \\\"news_detail_page\\\",\\n \\\"name\\\": \\\"新闻详情\\\",\\n \\\"menuCode\\\": \\\"news\\\",\\n \\\"path\\\": \\\"/news/:id\\\",\\n \\\"pageType\\\": \\\"detail\\\",\\n \\\"tableName\\\": \\\"news\\\"\\n },\\n {\\n \\\"code\\\": \\\"reader_profile_page\\\",\\n \\\"name\\\": \\\"个人资料\\\",\\n \\\"menuCode\\\": \\\"reader_profile\\\",\\n \\\"path\\\": \\\"/profile\\\",\\n \\\"pageType\\\": \\\"form\\\",\\n \\\"tableName\\\": \\\"reader\\\"\\n },\\n {\\n \\\"code\\\": \\\"my_borrows_page\\\",\\n \\\"name\\\": \\\"我的借阅\\\",\\n \\\"menuCode\\\": \\\"my_borrows\\\",\\n \\\"path\\\": \\\"/my-borrows\\\",\\n \\\"pageType\\\": \\\"current_user_list\\\",\\n \\\"tableName\\\": \\\"borrow_record\\\"\\n },\\n {\\n \\\"code\\\": \\\"my_reservations_page\\\",\\n \\\"name\\\": \\\"我的预约\\\",\\n \\\"menuCode\\\": \\\"my_reservations\\\",\\n \\\"path\\\": \\\"/my-reservations\\\",\\n \\\"pageType\\\": \\\"current_user_list\\\",\\n \\\"tableName\\\": \\\"reservation\\\"\\n }\\n ],\\n \\\"adminMenus\\\": [\\n {\\n \\\"code\\\": \\\"book_admin\\\",\\n \\\"name\\\": \\\"图书管理\\\",\\n \\\"path\\\": \\\"/admin/books\\\",\\n \\\"pageCode\\\": \\\"book_admin_page\\\",\\n \\\"pageType\\\": \\\"list\\\",\\n \\\"tableName\\\": \\\"book_info\\\",\\n \\\"requiresLogin\\\": true,\\n \\\"visibleRoles\\\": [\\\"admin\\\"],\\n \\\"dataScope\\\": \\\"ROLE\\\"\\n },\\n {\\n \\\"code\\\": \\\"borrow_admin\\\",\\n \\\"name\\\": \\\"借阅管理\\\",\\n \\\"path\\\": \\\"/admin/borrows\\\",\\n \\\"pageCode\\\": \\\"borrow_admin_page\\\",\\n \\\"pageType\\\": \\\"list\\\",\\n \\\"tableName\\\": \\\"borrow_record\\\",\\n \\\"requiresLogin\\\": true,\\n \\\"visibleRoles\\\": [\\\"admin\\\"],\\n \\\"dataScope\\\": \\\"ROLE\\\"\\n },\\n {\\n \\\"code\\\": \\\"reservation_admin\\\",\\n \\\"name\\\": \\\"预约管理\\\",\\n \\\"path\\\": \\\"/admin/reservations\\\",\\n \\\"pageCode\\\": \\\"reservation_admin_page\\\",\\n \\\"pageType\\\": \\\"list\\\",\\n \\\"tableName\\\": \\\"reservation\\\",\\n \\\"requiresLogin\\\": true,\\n \\\"visibleRoles\\\": [\\\"admin\\\"],\\n \\\"dataScope\\\": \\\"ROLE\\\"\\n },\\n {\\n \\\"code\\\": \\\"reader_admin\\\",\\n \\\"name\\\": \\\"读者管理\\\",\\n \\\"path\\\": \\\"/admin/readers\\\",\\n \\\"pageCode\\\": \\\"reader_admin_page\\\",\\n \\\"pageType\\\": \\\"list\\\",\\n \\\"tableName\\\": \\\"reader\\\",\\n \\\"requiresLogin\\\": true,\\n \\\"visibleRoles\\\": [\\\"admin\\\"],\\n \\\"dataScope\\\": \\\"ROLE\\\"\\n },\\n {\\n \\\"code\\\": \\\"carousel_admin\\\",\\n \\\"name\\\": \\\"轮播图管理\\\",\\n \\\"path\\\": \\\"/admin/carousels\\\",\\n \\\"pageCode\\\": \\\"carousel_admin_page\\\",\\n \\\"pageType\\\": \\\"list\\\",\\n \\\"tableName\\\": \\\"carousel\\\",\\n \\\"requiresLogin\\\": true,\\n \\\"visibleRoles\\\": [\\\"admin\\\"],\\n \\\"dataScope\\\": \\\"ROLE\\\"\\n },\\n {\\n \\\"code\\\": \\\"announcement_admin\\\",\\n \\\"name\\\": \\\"公告管理\\\",\\n \\\"path\\\": \\\"/admin/announcements\\\",\\n \\\"pageCode\\\": \\\"announcement_admin_page\\\",\\n \\\"pageType\\\": \\\"list\\\",\\n \\\"tableName\\\": \\\"announcement\\\",\\n \\\"requiresLogin\\\": true,\\n \\\"visibleRoles\\\": [\\\"admin\\\"],\\n \\\"dataScope\\\": \\\"ROLE\\\"\\n },\\n {\\n \\\"code\\\": \\\"news_admin\\\",\\n \\\"name\\\": \\\"新闻管理\\\",\\n \\\"path\\\": \\\"/admin/news\\\",\\n \\\"pageCode\\\": \\\"news_admin_page\\\",\\n \\\"pageType\\\": \\\"list\\\",\\n \\\"tableName\\\": \\\"news\\\",\\n \\\"requiresLogin\\\": true,\\n \\\"visibleRoles\\\": [\\\"admin\\\"],\\n \\\"dataScope\\\": \\\"ROLE\\\"\\n }\\n ],\\n \\\"adminHomeDashboard\\\": {\\n \\\"title\\\": \\\"运营总览\\\",\\n \\\"description\\\": \\\"核心业务数据\\\",\\n \\\"metrics\\\": [\\n {\\n \\\"name\\\": \\\"总图书数\\\",\\n \\\"semantic\\\": \\\"inventory\\\",\\n \\\"valueKey\\\": \\\"totalBooks\\\",\\n \\\"tableName\\\": \\\"book_info\\\"\\n },\\n {\\n \\\"name\\\": \\\"总读者数\\\",\\n \\\"semantic\\\": \\\"user\\\",\\n \\\"valueKey\\\": \\\"totalReaders\\\",\\n \\\"tableName\\\": \\\"reader\\\"\\n },\\n {\\n \\\"name\\\": \\\"在借数量\\\",\\n \\\"semantic\\\": \\\"order\\\",\\n \\\"valueKey\\\": \\\"borrowedCount\\\",\\n \\\"tableName\\\": \\\"borrow_record\\\"\\n },\\n {\\n \\\"name\\\": \\\"当前预约数\\\",\\n \\\"semantic\\\": \\\"task\\\",\\n \\\"valueKey\\\": \\\"reservationCount\\\",\\n \\\"tableName\\\": \\\"reservation\\\"\\n }\\n ],\\n \\\"charts\\\": [\\n {\\n \\\"title\\\": \\\"借阅趋势\\\",\\n \\\"type\\\": \\\"line\\\",\\n \\\"tableName\\\": \\\"borrow_record\\\",\\n \\\"xField\\\": \\\"borrow_date\\\",\\n \\\"yField\\\": \\\"count\\\",\\n \\\"metric\\\": \\\"count\\\",\\n \\\"dimension\\\": \\\"borrow_date\\\"\\n },\\n {\\n \\\"title\\\": \\\"图书分类分布\\\",\\n \\\"type\\\": \\\"pie\\\",\\n \\\"tableName\\\": \\\"book_info\\\",\\n \\\"dimension\\\": \\\"category\\\",\\n \\\"metric\\\": \\\"count\\\"\\n }\\n ]\\n }\\n}\",\"failedStage\":\"DESIGN\",\"projectId\":105,\"report\":{\"adminPageCount\":0,\"businessActionCount\":0,\"businessLoopComplete\":false,\"businessLoopWarnings\":[],\"frontendPageCount\":0,\"loopActions\":0,\"missingRequiredActions\":[],\"quantityRules\":0,\"recordRules\":0,\"stateTransitions\":0,\"tableCount\":0},\"stage\":\"DESIGN\",\"suggestedActions\":[\"进入高级调整检查当前阶段输入和生成结果后重试\"]}', 'DESIGN', 'expect \':\', but }, offset 6259, character \", line 260, column 23, fastjson-version 2.0.53 { \"roles\": [ { \"code\": \"admin\", \"name\": \"管理员\", \"description\": \"系统管理员,管理图书、借阅、预约、用户、轮播图、公告、新闻等\" }, { \"code\": \"reader\", \"name\": \"读者\", \"description\": \"普通读者,可浏览图书、借书、还书、预约、取消预约\" } ], \"frontendMenus\": [ { \"code\": \"book_catalog\", \"name\": \"图书目录\", \"path\": \"/books\", \"pageCode\": \"book_catalog_page\", \"requiresLogin\": false, \"visibleRoles\": [], \"dataScope\": \"PUBLIC\" }, { \"code\": \"announcement\", \"name\": \"公告\", \"path\": \"/announcements\", \"pageCode\": \"announcement_list_page\", \"requiresLogin\": false, \"visibleRoles\": [], \"dataScope\": \"PUBLIC\" }, { \"code\": \"news\", \"name\": \"新闻\", \"path\": \"/news\", \"pageCode\": \"news_list_page\", \"requiresLogin\": false, \"visibleRoles\": [], \"dataScope\": \"PUBLIC\" }, { \"code\": \"', 1, 3, '2026-07-14 17:19:52', NULL, NULL, 20, '生成失败', 0, 0, 0, 0, 0, 817, 5657, 6474, 2, 0.00000000, '2026-07-14 17:19:52', '2026-07-14 17:20:47', '2026-07-14 17:19:52', '2026-07-14 17:20:47');
INSERT INTO `front_ai_generation_task` VALUES (106, 106, 105, 100, 'one_click_project', 'deepseek', 'deepseek-v4-flash', 'front.one_click_project', 'V1', '28e64be601aa2ec52f471e7fe8e534b3f41f053125435124128794371db1b770', '{\"pipelineCode\":\"one_click_project\",\"schemaVersion\":\"1.0\",\"stages\":[{\"sequenceNo\":1,\"stageCode\":\"PROJECT_PREPARE\"},{\"generateType\":\"flow_config\",\"model\":\"deepseek-v4-flash\",\"pipelineReleaseCode\":\"builtin-one-click-1.0.0\",\"promptCode\":\"front.flow_config\",\"promptFingerprint\":\"247495840c67968896ccad2db0a599bd4fc594d0189157dce888b8ede90b3257\",\"promptVersion\":\"V1\",\"providerCode\":\"deepseek\",\"sequenceNo\":2,\"stageCode\":\"DESIGN\"},{\"generateType\":\"database\",\"model\":\"deepseek-v4-flash\",\"pipelineReleaseCode\":\"builtin-one-click-1.0.0\",\"promptCode\":\"front.database\",\"promptFingerprint\":\"14dcad479b01de068e5c5bc39b5cd7a591a09d334ee6812483d8ac00dd8c9d61\",\"promptVersion\":\"V1\",\"providerCode\":\"deepseek\",\"sequenceNo\":3,\"stageCode\":\"DATABASE\"},{\"sequenceNo\":4,\"stageCode\":\"GENERATE\"},{\"sequenceNo\":5,\"stageCode\":\"VERIFY_AND_PREVIEW\"},{\"sequenceNo\":6,\"stageCode\":\"COMPLETED\"}]}', '41665c324e489377317e2e2b290a8d95541281debd5b7c22d79aff9b24864022', 'FAILED', '16b2147f89e3821482de52ed1e113a4481378e822cf865046ae7565553c7c6bc', '{\"codeTemplate\":\"qing\",\"extraRequirements\":\"\",\"generateType\":\"one_click_project\",\"projectDesc\":\"功能:借书、还书、预约、取消预约\\n角色用户、管理员\\n其他模块轮播图、公告、新闻\",\"projectName\":\"图书管理系统\",\"stylePreset\":\"dark-tech\"}', '{\"downloadReady\":true,\"generationRunId\":100,\"projectId\":105,\"report\":{\"adminPageCount\":10,\"businessActionCount\":0,\"businessLoopComplete\":true,\"businessLoopWarnings\":[],\"frontendPageCount\":5,\"loopActions\":5,\"missingRequiredActions\":[],\"quantityRules\":0,\"recordRules\":0,\"stateTransitions\":0,\"tableCount\":9},\"specContentHash\":\"2abebf97603ad49a6f80b87e4b2408d2ead3abba7563fe11f9b9a4330451e0f8\",\"specVersionId\":100,\"specVersionNo\":1,\"stage\":\"VERIFY_AND_PREVIEW\",\"suggestedActions\":[]}', NULL, 'nested exception is org.apache.ibatis.exceptions.PersistenceException: ### Error updating database. Cause: org.springframework.jdbc.CannotGetJdbcConnectionException: Failed to obtain JDBC Connection; nested exception is java.sql.SQLException: interrupt ### The error may exist in file [D:\\codes\\yidaima\\RuoYi-Vue\\ruoyi-generator\\target\\classes\\mapper\\factory\\AiTaskStageMapper.xml] ### The error may involve com.ruoyi.generator.mapper.factory.AiTaskStageMapper.failStageAttempt ### The error occurred while executing an update ### Cause: org.springframework.jdbc.CannotGetJdbcConnectionException: Failed to obtain JDBC Connection; nested exception is java.sql.SQLException: interrupt', 1, 3, '2026-07-14 17:24:10', NULL, NULL, 0, '生成失败', 0, 0, 0, 0, 0, 6486, 19821, 26307, 5, 0.00000000, '2026-07-14 17:24:17', '2026-07-14 17:28:06', '2026-07-14 17:24:09', '2026-07-14 17:28:06');
INSERT INTO `front_ai_generation_task` VALUES (107, 107, 105, 100, 'one_click_project', 'deepseek', 'deepseek-v4-flash', 'front.one_click_project', 'V1', '28e64be601aa2ec52f471e7fe8e534b3f41f053125435124128794371db1b770', '{\"pipelineCode\":\"one_click_project\",\"schemaVersion\":\"1.0\",\"stages\":[{\"sequenceNo\":1,\"stageCode\":\"PROJECT_PREPARE\"},{\"generateType\":\"flow_config\",\"model\":\"deepseek-v4-flash\",\"pipelineReleaseCode\":\"builtin-one-click-1.0.0\",\"promptCode\":\"front.flow_config\",\"promptFingerprint\":\"247495840c67968896ccad2db0a599bd4fc594d0189157dce888b8ede90b3257\",\"promptVersion\":\"V1\",\"providerCode\":\"deepseek\",\"sequenceNo\":2,\"stageCode\":\"DESIGN\"},{\"generateType\":\"database\",\"model\":\"deepseek-v4-flash\",\"pipelineReleaseCode\":\"builtin-one-click-1.0.0\",\"promptCode\":\"front.database\",\"promptFingerprint\":\"14dcad479b01de068e5c5bc39b5cd7a591a09d334ee6812483d8ac00dd8c9d61\",\"promptVersion\":\"V1\",\"providerCode\":\"deepseek\",\"sequenceNo\":3,\"stageCode\":\"DATABASE\"},{\"sequenceNo\":4,\"stageCode\":\"GENERATE\"},{\"sequenceNo\":5,\"stageCode\":\"VERIFY_AND_PREVIEW\"},{\"sequenceNo\":6,\"stageCode\":\"COMPLETED\"}]}', '41665c324e489377317e2e2b290a8d95541281debd5b7c22d79aff9b24864022', 'FAILED', '16b2147f89e3821482de52ed1e113a4481378e822cf865046ae7565553c7c6bc', '{\"codeTemplate\":\"qing\",\"extraRequirements\":\"\",\"generateType\":\"one_click_project\",\"projectDesc\":\"功能:借书、还书、预约、取消预约\\n角色用户、管理员\\n其他模块轮播图、公告、新闻\",\"projectName\":\"图书管理系统\",\"stylePreset\":\"dark-tech\"}', '{\"downloadReady\":false,\"projectId\":105,\"report\":{\"adminPageCount\":0,\"businessActionCount\":0,\"businessLoopComplete\":false,\"businessLoopWarnings\":[],\"frontendPageCount\":0,\"loopActions\":0,\"missingRequiredActions\":[],\"quantityRules\":0,\"recordRules\":0,\"stateTransitions\":0,\"tableCount\":0},\"stage\":\"DESIGN\",\"suggestedActions\":[]}', 'INTERRUPTED', '服务重启或任务超时,已自动释放运行名额,请重新生成', 1, 3, '2026-07-14 17:33:28', NULL, NULL, 20, '任务已中断', 0, 0, 0, 0, 0, NULL, NULL, NULL, NULL, 0.00000000, '2026-07-14 17:33:28', '2026-07-14 17:53:40', '2026-07-14 17:33:28', '2026-07-14 17:53:40');
INSERT INTO `front_ai_generation_task` VALUES (108, 108, 106, 100, 'one_click_project', 'deepseek', 'deepseek-v4-flash', 'front.one_click_project', 'V1', '28e64be601aa2ec52f471e7fe8e534b3f41f053125435124128794371db1b770', '{\"pipelineCode\":\"one_click_project\",\"schemaVersion\":\"1.0\",\"stages\":[{\"sequenceNo\":1,\"stageCode\":\"PROJECT_PREPARE\"},{\"generateType\":\"flow_config\",\"model\":\"deepseek-v4-flash\",\"pipelineReleaseCode\":\"builtin-one-click-1.0.0\",\"promptCode\":\"front.flow_config\",\"promptFingerprint\":\"247495840c67968896ccad2db0a599bd4fc594d0189157dce888b8ede90b3257\",\"promptVersion\":\"V1\",\"providerCode\":\"deepseek\",\"sequenceNo\":2,\"stageCode\":\"DESIGN\"},{\"generateType\":\"database\",\"model\":\"deepseek-v4-flash\",\"pipelineReleaseCode\":\"builtin-one-click-1.0.0\",\"promptCode\":\"front.database\",\"promptFingerprint\":\"14dcad479b01de068e5c5bc39b5cd7a591a09d334ee6812483d8ac00dd8c9d61\",\"promptVersion\":\"V1\",\"providerCode\":\"deepseek\",\"sequenceNo\":3,\"stageCode\":\"DATABASE\"},{\"sequenceNo\":4,\"stageCode\":\"GENERATE\"},{\"sequenceNo\":5,\"stageCode\":\"VERIFY_AND_PREVIEW\"},{\"sequenceNo\":6,\"stageCode\":\"COMPLETED\"}]}', '41665c324e489377317e2e2b290a8d95541281debd5b7c22d79aff9b24864022', 'SUCCEEDED', '16b2147f89e3821482de52ed1e113a4481378e822cf865046ae7565553c7c6bc', '{\"codeTemplate\":\"qing\",\"extraRequirements\":\"\",\"generateType\":\"one_click_project\",\"projectDesc\":\"功能:借书、还书、预约、取消预约\\n角色用户、管理员\\n其他模块轮播图、公告、新闻\",\"projectName\":\"图书管理系统\",\"stylePreset\":\"dark-tech\"}', '{\"adminFrontendUrl\":\"http://127.0.0.1:24570\",\"backendUrl\":\"http://127.0.0.1:24521\",\"downloadReady\":true,\"errorMessage\":\"生成的后端进程已退出\",\"expiresAt\":\"2026-07-14 18:12:45\",\"failedStage\":\"VERIFY_AND_PREVIEW\",\"frontendUrl\":\"http://127.0.0.1:24522\",\"generationRunId\":101,\"previewStatus\":\"FAILED\",\"projectId\":106,\"report\":{\"adminPageCount\":10,\"businessActionCount\":0,\"businessLoopComplete\":true,\"businessLoopWarnings\":[],\"frontendPageCount\":7,\"loopActions\":3,\"missingRequiredActions\":[],\"quantityRules\":0,\"recordRules\":0,\"stateTransitions\":0,\"tableCount\":8},\"specContentHash\":\"6ae8c8ed14be85a098542ee9ae37870aa8910b5bc136a9aab5d94406a7bbd8ce\",\"specVersionId\":101,\"specVersionNo\":1,\"stage\":\"COMPLETED\",\"suggestedActions\":[\"源码预览已生成,可以先下载项目或进入高级调整后重试运行预览\"]}', '', '', 1, 3, '2026-07-14 17:54:58', NULL, NULL, 100, '生成完成', 0, 0, 0, 0, 0, 11430, 23491, 34921, 6, 0.00000000, '2026-07-14 17:54:58', '2026-07-14 17:58:19', '2026-07-14 17:54:58', '2026-07-14 17:58:19');
INSERT INTO `front_ai_generation_task` VALUES (109, 109, 106, 100, 'one_click_project', 'deepseek', 'deepseek-v4-flash', 'front.one_click_project', 'V1', '28e64be601aa2ec52f471e7fe8e534b3f41f053125435124128794371db1b770', '{\"pipelineCode\":\"one_click_project\",\"schemaVersion\":\"1.0\",\"stages\":[{\"sequenceNo\":1,\"stageCode\":\"PROJECT_PREPARE\"},{\"generateType\":\"flow_config\",\"model\":\"deepseek-v4-flash\",\"pipelineReleaseCode\":\"builtin-one-click-1.0.0\",\"promptCode\":\"front.flow_config\",\"promptFingerprint\":\"247495840c67968896ccad2db0a599bd4fc594d0189157dce888b8ede90b3257\",\"promptVersion\":\"V1\",\"providerCode\":\"deepseek\",\"sequenceNo\":2,\"stageCode\":\"DESIGN\"},{\"generateType\":\"database\",\"model\":\"deepseek-v4-flash\",\"pipelineReleaseCode\":\"builtin-one-click-1.0.0\",\"promptCode\":\"front.database\",\"promptFingerprint\":\"14dcad479b01de068e5c5bc39b5cd7a591a09d334ee6812483d8ac00dd8c9d61\",\"promptVersion\":\"V1\",\"providerCode\":\"deepseek\",\"sequenceNo\":3,\"stageCode\":\"DATABASE\"},{\"sequenceNo\":4,\"stageCode\":\"GENERATE\"},{\"sequenceNo\":5,\"stageCode\":\"VERIFY_AND_PREVIEW\"},{\"sequenceNo\":6,\"stageCode\":\"COMPLETED\"}]}', '41665c324e489377317e2e2b290a8d95541281debd5b7c22d79aff9b24864022', 'FAILED', '16b2147f89e3821482de52ed1e113a4481378e822cf865046ae7565553c7c6bc', '{\"codeTemplate\":\"qing\",\"extraRequirements\":\"\",\"generateType\":\"one_click_project\",\"projectDesc\":\"功能:借书、还书、预约、取消预约\\n角色用户、管理员\\n其他模块轮播图、公告、新闻\",\"projectName\":\"图书管理系统\",\"stylePreset\":\"dark-tech\"}', '{\"downloadReady\":false,\"errorMessage\":\"Unsupported business action UI binding slot: page.actions\",\"failedStage\":\"GENERATE\",\"projectId\":106,\"report\":{\"adminPageCount\":8,\"businessActionCount\":0,\"businessLoopComplete\":true,\"businessLoopWarnings\":[],\"frontendPageCount\":5,\"loopActions\":4,\"missingRequiredActions\":[],\"quantityRules\":0,\"recordRules\":0,\"stateTransitions\":0,\"tableCount\":7},\"stage\":\"GENERATE\",\"suggestedActions\":[\"进入高级调整检查当前阶段输入和生成结果后重试\"]}', 'GENERATE', 'Unsupported business action UI binding slot: page.actions', 1, 3, '2026-07-14 19:46:47', NULL, NULL, 68, '生成失败', 0, 0, 0, 0, 0, 6471, 18923, 25394, 5, 0.00000000, '2026-07-14 19:46:50', '2026-07-14 19:51:08', '2026-07-14 19:46:46', '2026-07-14 19:51:07');
INSERT INTO `front_ai_generation_task` VALUES (110, 110, 106, 100, 'one_click_project', 'deepseek', 'deepseek-v4-flash', 'front.one_click_project', 'V1', '28e64be601aa2ec52f471e7fe8e534b3f41f053125435124128794371db1b770', '{\"pipelineCode\":\"one_click_project\",\"schemaVersion\":\"1.0\",\"stages\":[{\"sequenceNo\":1,\"stageCode\":\"PROJECT_PREPARE\"},{\"generateType\":\"flow_config\",\"model\":\"deepseek-v4-flash\",\"pipelineReleaseCode\":\"builtin-one-click-1.0.0\",\"promptCode\":\"front.flow_config\",\"promptFingerprint\":\"493bfe3aa6bafe555f3fedab46a75c8364c303c2a589b1ffaa01196a93c6472f\",\"promptVersion\":\"V2\",\"providerCode\":\"deepseek\",\"sequenceNo\":2,\"stageCode\":\"DESIGN\"},{\"generateType\":\"database\",\"model\":\"deepseek-v4-flash\",\"pipelineReleaseCode\":\"builtin-one-click-1.0.0\",\"promptCode\":\"front.database\",\"promptFingerprint\":\"14dcad479b01de068e5c5bc39b5cd7a591a09d334ee6812483d8ac00dd8c9d61\",\"promptVersion\":\"V1\",\"providerCode\":\"deepseek\",\"sequenceNo\":3,\"stageCode\":\"DATABASE\"},{\"sequenceNo\":4,\"stageCode\":\"GENERATE\"},{\"sequenceNo\":5,\"stageCode\":\"VERIFY_AND_PREVIEW\"},{\"sequenceNo\":6,\"stageCode\":\"COMPLETED\"}]}', 'a95a01f55b21a7a273839b8f2b340ea0d5c5eb9e603092b8a72344a292cb6b51', 'FAILED', 'c49e77cde335f56a298d558a624dab2fc76cd3964c8abc94bd0f6a798df83b95', '{\"codeTemplate\":\"qing\",\"extraRequirements\":\"\",\"generateType\":\"one_click_project\",\"projectDesc\":\"功能:借书、还书、预约、取消预约\\n角色用户、管理员\\n其他模块轮播图、公告、新闻\",\"projectName\":\"图书管理系统\",\"stylePreset\":\"dark-tech\"}', '{\"downloadReady\":false,\"errorMessage\":\"Flow config audit field does not exist: borrowing_record.lend_time\",\"failedStage\":\"DATABASE\",\"projectId\":106,\"report\":{\"adminPageCount\":0,\"businessActionCount\":0,\"businessLoopComplete\":false,\"businessLoopWarnings\":[],\"frontendPageCount\":0,\"loopActions\":0,\"missingRequiredActions\":[],\"quantityRules\":0,\"recordRules\":0,\"stateTransitions\":0,\"tableCount\":0},\"stage\":\"DATABASE\",\"suggestedActions\":[\"进入高级调整检查当前阶段输入和生成结果后重试\"]}', 'DATABASE', 'Flow config audit field does not exist: borrowing_record.lend_time', 1, 3, '2026-07-14 21:22:16', NULL, NULL, 40, '生成失败', 0, 0, 0, 0, 0, 16636, 29777, 46413, 8, 0.00000000, '2026-07-14 21:22:25', '2026-07-14 21:25:56', '2026-07-14 21:22:15', '2026-07-14 21:25:55');
INSERT INTO `front_ai_generation_task` VALUES (111, 111, 107, 100, 'one_click_project', 'deepseek', 'deepseek-v4-flash', 'front.one_click_project', 'V1', '28e64be601aa2ec52f471e7fe8e534b3f41f053125435124128794371db1b770', '{\"pipelineCode\":\"one_click_project\",\"schemaVersion\":\"1.0\",\"stages\":[{\"sequenceNo\":1,\"stageCode\":\"PROJECT_PREPARE\"},{\"generateType\":\"flow_config\",\"model\":\"deepseek-v4-flash\",\"pipelineReleaseCode\":\"builtin-one-click-1.0.0\",\"promptCode\":\"front.flow_config\",\"promptFingerprint\":\"493bfe3aa6bafe555f3fedab46a75c8364c303c2a589b1ffaa01196a93c6472f\",\"promptVersion\":\"V2\",\"providerCode\":\"deepseek\",\"sequenceNo\":2,\"stageCode\":\"DESIGN\"},{\"generateType\":\"database\",\"model\":\"deepseek-v4-flash\",\"pipelineReleaseCode\":\"builtin-one-click-1.0.0\",\"promptCode\":\"front.database\",\"promptFingerprint\":\"c7d0a32ce0b0055ac80348fb10c1beb758034b9c5b5637694725425bb7937cbc\",\"promptVersion\":\"V2\",\"providerCode\":\"deepseek\",\"sequenceNo\":3,\"stageCode\":\"DATABASE\"},{\"sequenceNo\":4,\"stageCode\":\"GENERATE\"},{\"sequenceNo\":5,\"stageCode\":\"VERIFY_AND_PREVIEW\"},{\"sequenceNo\":6,\"stageCode\":\"COMPLETED\"}]}', '8e93f738dc6588afef35144d312ebaa07acf29e8f46390856596afad7eb3496c', 'SUCCEEDED', '2001ec7eb8d69ad532cb011356373f8c06b1783f939edd58942522174a80645d', '{\"codeTemplate\":\"qing\",\"extraRequirements\":\"\",\"generateType\":\"one_click_project\",\"projectDesc\":\"功能:借书、还书、预约、取消预约\\n角色用户、管理员\\n其他模块轮播图、公告、新闻\",\"projectName\":\"图书管理系统\",\"stylePreset\":\"dark-tech\"}', '{\"adminFrontendUrl\":\"http://127.0.0.1:35401\",\"backendUrl\":\"http://127.0.0.1:35354\",\"downloadReady\":true,\"errorMessage\":\"生成的后端进程已退出\",\"expiresAt\":\"2026-07-14 22:20:07\",\"failedStage\":\"VERIFY_AND_PREVIEW\",\"frontendUrl\":\"http://127.0.0.1:35355\",\"generationRunId\":102,\"previewStatus\":\"FAILED\",\"projectId\":107,\"report\":{\"adminPageCount\":9,\"businessActionCount\":0,\"businessLoopComplete\":true,\"businessLoopWarnings\":[],\"frontendPageCount\":5,\"loopActions\":3,\"missingRequiredActions\":[],\"quantityRules\":0,\"recordRules\":0,\"stateTransitions\":0,\"tableCount\":8},\"specContentHash\":\"3c1f3fb774de1eff708fdd732d9e36c8bb602cfcf317962f18630a812dfe8d58\",\"specVersionId\":102,\"specVersionNo\":1,\"stage\":\"COMPLETED\",\"suggestedActions\":[\"源码预览已生成,可以先下载项目或进入高级调整后重试运行预览\"]}', '', '', 1, 3, '2026-07-14 22:02:53', NULL, NULL, 100, '生成完成', 0, 0, 0, 0, 0, 6220, 17241, 23461, 4, 0.00000000, '2026-07-14 22:02:57', '2026-07-14 22:05:27', '2026-07-14 22:02:52', '2026-07-14 22:05:26');
INSERT INTO `front_ai_generation_task` VALUES (112, 112, 108, 100, 'one_click_project', 'deepseek', 'deepseek-v4-flash', 'front.one_click_project', 'V1', '28e64be601aa2ec52f471e7fe8e534b3f41f053125435124128794371db1b770', '{\"pipelineCode\":\"one_click_project\",\"schemaVersion\":\"1.0\",\"stages\":[{\"sequenceNo\":1,\"stageCode\":\"PROJECT_PREPARE\"},{\"generateType\":\"flow_config\",\"model\":\"deepseek-v4-flash\",\"pipelineReleaseCode\":\"builtin-one-click-1.0.0\",\"promptCode\":\"front.flow_config\",\"promptFingerprint\":\"493bfe3aa6bafe555f3fedab46a75c8364c303c2a589b1ffaa01196a93c6472f\",\"promptVersion\":\"V2\",\"providerCode\":\"deepseek\",\"sequenceNo\":2,\"stageCode\":\"DESIGN\"},{\"generateType\":\"database\",\"model\":\"deepseek-v4-flash\",\"pipelineReleaseCode\":\"builtin-one-click-1.0.0\",\"promptCode\":\"front.database\",\"promptFingerprint\":\"c7d0a32ce0b0055ac80348fb10c1beb758034b9c5b5637694725425bb7937cbc\",\"promptVersion\":\"V2\",\"providerCode\":\"deepseek\",\"sequenceNo\":3,\"stageCode\":\"DATABASE\"},{\"sequenceNo\":4,\"stageCode\":\"GENERATE\"},{\"sequenceNo\":5,\"stageCode\":\"VERIFY_AND_PREVIEW\"},{\"sequenceNo\":6,\"stageCode\":\"COMPLETED\"}]}', '8e93f738dc6588afef35144d312ebaa07acf29e8f46390856596afad7eb3496c', 'SUCCEEDED', 'df8a1270b711f33cd8b0adc80374f46215a560f5e4fd882a199bcbaa1a29ad82', '{\"codeTemplate\":\"qing\",\"extraRequirements\":\"\",\"generateType\":\"one_click_project\",\"projectDesc\":\"功能:借书、还书、预约、取消预约\\n角色用户、管理员\\n其他模块轮播图、公告、新闻\",\"projectName\":\"图书管理系统\",\"stylePreset\":\"business_clean\"}', '{\"adminFrontendUrl\":\"http://127.0.0.1:47806\",\"backendUrl\":\"http://127.0.0.1:47776\",\"downloadReady\":true,\"errorMessage\":\"运行预览启动超时\",\"expiresAt\":\"2026-07-14 22:41:04\",\"failedStage\":\"VERIFY_AND_PREVIEW\",\"frontendUrl\":\"http://127.0.0.1:47777\",\"generationRunId\":103,\"previewStatus\":\"FAILED\",\"projectId\":108,\"report\":{\"adminPageCount\":10,\"businessActionCount\":0,\"businessLoopComplete\":true,\"businessLoopWarnings\":[],\"frontendPageCount\":8,\"loopActions\":3,\"missingRequiredActions\":[],\"quantityRules\":0,\"recordRules\":0,\"stateTransitions\":0,\"tableCount\":8},\"specContentHash\":\"be45ca9b78046c0b2590f16cc26cd3def8054e98fc5ba34e32575924fe6f940b\",\"specVersionId\":103,\"specVersionNo\":1,\"stage\":\"COMPLETED\",\"suggestedActions\":[\"源码预览已生成,可以先下载项目或进入高级调整后重试运行预览\"]}', '', '', 1, 3, '2026-07-14 22:22:23', NULL, NULL, 100, '生成完成', 0, 0, 0, 0, 0, 11897, 26037, 37934, 7, 0.00000000, '2026-07-14 22:22:23', '2026-07-14 22:28:16', '2026-07-14 22:22:23', '2026-07-14 22:28:16');
INSERT INTO `front_ai_generation_task` VALUES (113, 113, 109, 100, 'one_click_project', 'deepseek', 'deepseek-v4-flash', 'front.one_click_project', 'V1', '28e64be601aa2ec52f471e7fe8e534b3f41f053125435124128794371db1b770', '{\"pipelineCode\":\"one_click_project\",\"schemaVersion\":\"1.0\",\"stages\":[{\"sequenceNo\":1,\"stageCode\":\"PROJECT_PREPARE\"},{\"generateType\":\"flow_config\",\"model\":\"deepseek-v4-flash\",\"pipelineReleaseCode\":\"builtin-one-click-1.0.0\",\"promptCode\":\"front.flow_config\",\"promptFingerprint\":\"493bfe3aa6bafe555f3fedab46a75c8364c303c2a589b1ffaa01196a93c6472f\",\"promptVersion\":\"V2\",\"providerCode\":\"deepseek\",\"sequenceNo\":2,\"stageCode\":\"DESIGN\"},{\"generateType\":\"database\",\"model\":\"deepseek-v4-flash\",\"pipelineReleaseCode\":\"builtin-one-click-1.0.0\",\"promptCode\":\"front.database\",\"promptFingerprint\":\"c7d0a32ce0b0055ac80348fb10c1beb758034b9c5b5637694725425bb7937cbc\",\"promptVersion\":\"V2\",\"providerCode\":\"deepseek\",\"sequenceNo\":3,\"stageCode\":\"DATABASE\"},{\"sequenceNo\":4,\"stageCode\":\"GENERATE\"},{\"sequenceNo\":5,\"stageCode\":\"VERIFY_AND_PREVIEW\"},{\"sequenceNo\":6,\"stageCode\":\"COMPLETED\"}]}', '8e93f738dc6588afef35144d312ebaa07acf29e8f46390856596afad7eb3496c', 'FAILED', '2001ec7eb8d69ad532cb011356373f8c06b1783f939edd58942522174a80645d', '{\"codeTemplate\":\"qing\",\"extraRequirements\":\"\",\"generateType\":\"one_click_project\",\"projectDesc\":\"功能:借书、还书、预约、取消预约\\n角色用户、管理员\\n其他模块轮播图、公告、新闻\",\"projectName\":\"图书管理系统\",\"stylePreset\":\"dark-tech\"}', '{\"downloadReady\":false,\"errorMessage\":\"Flow config effect target table has no primary key: book_info\",\"failedStage\":\"GENERATE\",\"projectId\":109,\"report\":{\"adminPageCount\":10,\"businessActionCount\":0,\"businessLoopComplete\":true,\"businessLoopWarnings\":[],\"frontendPageCount\":5,\"loopActions\":6,\"missingRequiredActions\":[],\"quantityRules\":0,\"recordRules\":0,\"stateTransitions\":0,\"tableCount\":8},\"stage\":\"GENERATE\",\"suggestedActions\":[\"进入高级调整检查当前阶段输入和生成结果后重试\"]}', 'GENERATE', 'Flow config effect target table has no primary key: book_info', 1, 3, '2026-07-15 08:50:42', NULL, NULL, 68, '生成失败', 0, 0, 0, 0, 0, 7566, 20720, 28286, 5, 0.00000000, '2026-07-15 08:50:42', '2026-07-15 08:54:22', '2026-07-15 08:50:42', '2026-07-15 08:54:21');
INSERT INTO `front_ai_generation_task` VALUES (114, 114, 110, 100, 'one_click_project', 'deepseek', 'deepseek-v4-flash', 'front.one_click_project', 'V1', '28e64be601aa2ec52f471e7fe8e534b3f41f053125435124128794371db1b770', '{\"pipelineCode\":\"one_click_project\",\"schemaVersion\":\"1.0\",\"stages\":[{\"sequenceNo\":1,\"stageCode\":\"PROJECT_PREPARE\"},{\"generateType\":\"flow_config\",\"model\":\"deepseek-v4-flash\",\"pipelineReleaseCode\":\"builtin-one-click-1.0.0\",\"promptCode\":\"front.flow_config\",\"promptFingerprint\":\"493bfe3aa6bafe555f3fedab46a75c8364c303c2a589b1ffaa01196a93c6472f\",\"promptVersion\":\"V2\",\"providerCode\":\"deepseek\",\"sequenceNo\":2,\"stageCode\":\"DESIGN\"},{\"generateType\":\"database\",\"model\":\"deepseek-v4-flash\",\"pipelineReleaseCode\":\"builtin-one-click-1.0.0\",\"promptCode\":\"front.database\",\"promptFingerprint\":\"c7d0a32ce0b0055ac80348fb10c1beb758034b9c5b5637694725425bb7937cbc\",\"promptVersion\":\"V2\",\"providerCode\":\"deepseek\",\"sequenceNo\":3,\"stageCode\":\"DATABASE\"},{\"sequenceNo\":4,\"stageCode\":\"GENERATE\"},{\"sequenceNo\":5,\"stageCode\":\"VERIFY_AND_PREVIEW\"},{\"sequenceNo\":6,\"stageCode\":\"COMPLETED\"}]}', '8e93f738dc6588afef35144d312ebaa07acf29e8f46390856596afad7eb3496c', 'SUCCEEDED', 'db1d1e8f591d8f68131be1fc06c601ca974a3bd46e28692e5f8107e567df7dc5', '{\"codeTemplate\":\"qing\",\"extraRequirements\":\"\",\"generateType\":\"one_click_project\",\"projectDesc\":\"功能:借书、还书、预约、取消预约\\n角色用户、管理员\\n其他模块轮播图、公告、新闻\",\"projectName\":\"图书管理系统\",\"stylePreset\":\"campus-orange\"}', '{\"adminFrontendUrl\":\"http://127.0.0.1:38285\",\"backendUrl\":\"http://127.0.0.1:38240\",\"downloadReady\":true,\"expiresAt\":\"2026-07-15 09:44:32\",\"frontendUrl\":\"http://127.0.0.1:38241\",\"generationRunId\":104,\"previewStatus\":\"RUNNING\",\"projectId\":110,\"report\":{\"adminPageCount\":10,\"businessActionCount\":0,\"businessLoopComplete\":true,\"businessLoopWarnings\":[],\"frontendPageCount\":6,\"loopActions\":3,\"missingRequiredActions\":[],\"quantityRules\":0,\"recordRules\":0,\"stateTransitions\":0,\"tableCount\":8},\"specContentHash\":\"df7b0393f895e57ebd6f791c531b59dafd58afca1de7006ade1e9c531388e1c7\",\"specVersionId\":104,\"specVersionNo\":1,\"stage\":\"COMPLETED\",\"suggestedActions\":[]}', '', '', 1, 3, '2026-07-15 09:25:49', NULL, NULL, 100, '生成完成', 0, 0, 0, 0, 0, 14964, 28693, 43657, 7, 0.00000000, '2026-07-15 09:25:49', '2026-07-15 09:30:39', '2026-07-15 09:25:49', '2026-07-15 09:30:39');
INSERT INTO `front_ai_generation_task` VALUES (115, 115, 110, 100, 'flow_config', 'deepseek', 'deepseek-v4-flash', 'front.flow_config', 'V2', '493bfe3aa6bafe555f3fedab46a75c8364c303c2a589b1ffaa01196a93c6472f', '{\"pipelineCode\":\"flow_config\",\"schemaVersion\":\"1.0\",\"stages\":[{\"generateType\":\"flow_config\",\"model\":\"deepseek-v4-flash\",\"pipelineReleaseCode\":\"builtin-one-click-1.0.0\",\"promptCode\":\"front.flow_config\",\"promptFingerprint\":\"493bfe3aa6bafe555f3fedab46a75c8364c303c2a589b1ffaa01196a93c6472f\",\"promptVersion\":\"V2\",\"providerCode\":\"deepseek\",\"sequenceNo\":1,\"stageCode\":\"FLOW_CONFIG\"}]}', '46383c03a9c86923dd3d8658b2f9f76777324e2378e1a1fa83e4b9c45741e82f', 'FAILED', '64269473cf941ab2c734f50a7aab4ebe5cab7cb069b140ce35496aec82b97721', '{\"appBlueprint\":\"{\\n \\\"roles\\\": [\\n {\\n \\\"code\\\": \\\"admin\\\",\\n \\\"description\\\": \\\"系统管理员,拥有所有后台管理权限\\\",\\n \\\"name\\\": \\\"系统管理员\\\"\\n },\\n {\\n \\\"code\\\": \\\"reader\\\",\\n \\\"description\\\": \\\"普通读者,可浏览图书、借书、还书、预约\\\",\\n \\\"name\\\": \\\"读者\\\"\\n }\\n ],\\n \\\"frontendMenus\\\": [\\n {\\n \\\"code\\\": \\\"book_catalog\\\",\\n \\\"dataScope\\\": \\\"PUBLIC\\\",\\n \\\"name\\\": \\\"图书目录\\\",\\n \\\"pageCode\\\": \\\"book_catalog_page\\\",\\n \\\"pageType\\\": \\\"\\\",\\n \\\"path\\\": \\\"/books\\\",\\n \\\"requiresLogin\\\": false,\\n \\\"tableName\\\": \\\"\\\",\\n \\\"visibleRoles\\\": []\\n },\\n {\\n \\\"code\\\": \\\"my_borrowings\\\",\\n \\\"dataScope\\\": \\\"CURRENT_USER\\\",\\n \\\"name\\\": \\\"我的借阅\\\",\\n \\\"pageCode\\\": \\\"my_borrowings_page\\\",\\n \\\"pageType\\\": \\\"\\\",\\n \\\"path\\\": \\\"/my-borrowings\\\",\\n \\\"requiresLogin\\\": true,\\n \\\"tableName\\\": \\\"\\\",\\n \\\"visibleRoles\\\": [\\n \\\"reader\\\"\\n ]\\n },\\n {\\n \\\"code\\\": \\\"my_reservations\\\",\\n \\\"dataScope\\\": \\\"CURRENT_USER\\\",\\n \\\"name\\\": \\\"我的预约\\\",\\n \\\"pageCode\\\": \\\"my_reservations_page\\\",\\n \\\"pageType\\\": \\\"\\\",\\n \\\"path\\\": \\\"/my-reservations\\\",\\n \\\"requiresLogin\\\": true,\\n \\\"tableName\\\": \\\"\\\",\\n \\\"visibleRoles\\\": [\\n \\\"reader\\\"\\n ]\\n },\\n {\\n \\\"code\\\": \\\"reader_profile\\\",\\n \\\"dataScope\\\": \\\"CURRENT_USER\\\",\\n \\\"name\\\": \\\"个人中心\\\",\\n \\\"pageCode\\\": \\\"reader_profile_page\\\",\\n \\\"pageType\\\": \\\"\\\",\\n \\\"path\\\": \\\"/reader/profile\\\",\\n \\\"requiresLogin\\\": true,\\n \\\"tableName\\\": \\\"\\\",\\n \\\"visibleRoles\\\": [\\n \\\"reader\\\"\\n ]\\n }\\n ],\\n \\\"adminMenus\\\": [\\n {\\n \\\"code\\\": \\\"book_admin\\\",\\n \\\"dataScope\\\": \\\"ROLE\\\",\\n \\\"name\\\": \\\"图书管理\\\",\\n \\\"pageCode\\\": \\\"book_admin_page\\\",\\n \\\"pageType\\\": \\\"list\\\",\\n \\\"path\\\": \\\"/admin/books\\\",\\n \\\"requiresLogin\\\": true,\\n \\\"tableName\\\": \\\"book_info\\\",\\n \\\"visibleRoles\\\": [\\n \\\"admin\\\"\\n ]\\n },\\n {\\n \\\"code\\\": \\\"borrowing_admin\\\",\\n \\\"dataScope\\\": \\\"ROLE\\\",\\n \\\"name\\\": \\\"借阅管理\\\",\\n \\\"pageCode\\\": \\\"borrowing_admin_page\\\",\\n \\\"pageType\\\": \\\"list\\\",\\n \\\"path\\\": \\\"/admin/borrowings\\\",\\n \\\"requiresLogin\\\": true,\\n \\\"tableName\\\": \\\"borrowing\\\",\\n \\\"visibleRoles\\\": [\\n \\\"admin\\\"\\n ]\\n },\\n {\\n \\\"code\\\": \\\"reservation_admin\\\",\\n \\\"dataScope\\\": \\\"ROLE\\\",\\n \\\"name\\\": \\\"预约管理\\\",\\n \\\"pageCode\\\": \\\"reservation_admin_page\\\",\\n \\\"pageType\\\": \\\"list\\\",\\n \\\"path\\\": \\\"/admin/reservations\\\",\\n \\\"requiresLogin\\\": true,\\n \\\"tableName\\\": \\\"reservation\\\",\\n \\\"visibleRoles\\\": [\\n \\\"admin\\\"\\n ]\\n },\\n {\\n \\\"code\\\": \\\"carousel_admin\\\",\\n \\\"dataScope\\\": \\\"ROLE\\\",\\n \\\"name\\\": \\\"轮播图管理\\\",\\n \\\"pageCode\\\": \\\"carousel_admin_page\\\",\\n \\\"pageType\\\": \\\"list\\\",\\n \\\"path\\\": \\\"/admin/carousels\\\",\\n \\\"requiresLogin\\\": true,\\n \\\"tableName\\\": \\\"carousel\\\",\\n \\\"visibleRoles\\\": [\\n \\\"admin\\\"\\n ]\\n },\\n {\\n \\\"code\\\": \\\"announcement_admin\\\",\\n \\\"dataScope\\\": \\\"ROLE\\\",\\n \\\"name\\\": \\\"公告管理\\\",\\n \\\"pageCode\\\": \\\"announcement_admin_page\\\",\\n \\\"pageType\\\": \\\"list\\\",\\n \\\"path\\\": \\\"/admin/announcements\\\",\\n \\\"requiresLogin\\\": true,\\n \\\"tableName\\\": \\\"announcement\\\",\\n \\\"visibleRoles\\\": [\\n \\\"admin\\\"\\n ]\\n },\\n {\\n \\\"code\\\": \\\"news_admin\\\",\\n \\\"dataScope\\\": \\\"ROLE\\\",\\n \\\"name\\\": \\\"新闻管理\\\",\\n \\\"pageCode\\\": \\\"news_admin_page\\\",\\n \\\"pageType\\\": \\\"list\\\",\\n \\\"path\\\": \\\"/admin/news\\\",\\n \\\"requiresLogin\\\": true,\\n \\\"tableName\\\": \\\"news\\\",\\n \\\"visibleRoles\\\": [\\n \\\"admin\\\"\\n ]\\n },\\n {\\n \\\"code\\\": \\\"reader_admin\\\",\\n \\\"dataScope\\\": \\\"ROLE\\\",\\n \\\"name\\\": \\\"读者管理\\\",\\n \\\"pageCode\\\": \\\"reader_admin_page\\\",\\n \\\"pageType\\\": \\\"list\\\",\\n \\\"path\\\": \\\"/admin/readers\\\",\\n \\\"requiresLogin\\\": true,\\n \\\"tableName\\\": \\\"reader\\\",\\n \\\"visibleRoles\\\": [\\n \\\"admin\\\"\\n ]\\n },\\n {\\n \\\"code\\\": \\\"admin_profile\\\",\\n \\\"dataScope\\\": \\\"CURRENT_USER\\\",\\n \\\"name\\\": \\\"个人资料\\\",\\n \\\"pageCode\\\": \\\"admin_profile_page\\\",\\n \\\"pageType\\\": \\\"form\\\",\\n \\\"path\\\": \\\"/admin/profile\\\",\\n \\\"requiresLogin\\\": true,\\n \\\"tableName\\\": \\\"admin\\\",\\n \\\"visibleRoles\\\": [\\n \\\"admin\\\"\\n ]\\n }\\n ],\\n \\\"frontendPages\\\": [\\n {\\n \\\"code\\\": \\\"book_catalog_page\\\",\\n \\\"menuCode\\\": \\\"book_catalog\\\",\\n \\\"name\\\": \\\"图书目录\\\",\\n \\\"pageType\\\": \\\"list\\\",\\n \\\"parentPageCode\\\": \\\"\\\",\\n \\\"path\\\": \\\"/books\\\",\\n \\\"tableName\\\": \\\"book_info\\\"\\n },\\n {\\n \\\"code\\\": \\\"book_detail_page\\\",\\n \\\"menuCode\\\": \\\"\\\",\\n \\\"name\\\": \\\"图书详情\\\",\\n \\\"pageType\\\": \\\"detail\\\",\\n \\\"parentPageCode\\\": \\\"\\\",\\n \\\"path\\\": \\\"/books/:id\\\",\\n \\\"tableName\\\": \\\"book_info\\\"\\n },\\n {\\n \\\"code\\\": \\\"my_borrowings_page\\\",\\n \\\"menuCode\\\": \\\"my_borrowings\\\",\\n \\\"name\\\": \\\"我的借阅\\\",\\n \\\"pageType\\\": \\\"list\\\",\\n \\\"parentPageCode\\\": \\\"\\\",\\n \\\"path\\\": \\\"/my-borrowings\\\",\\n \\\"tableName\\\": \\\"borrowing\\\"\\n },\\n {\\n \\\"code\\\": \\\"my_reservations_page\\\",\\n \\\"menuCode\\\": \\\"my_reservations\\\",\\n \\\"name\\\": \\\"我的预约\\\",\\n \\\"pageType\\\": \\\"list\\\",\\n \\\"parentPageCode\\\": \\\"\\\",\\n \\\"path\\\": \\\"/my-reservations\\\",\\n \\\"tableName\\\": \\\"reservation\\\"\\n },\\n {\\n \\\"code\\\": \\\"reader_profile_page\\\",\\n \\\"menuCode\\\": \\\"reader_profile\\\",\\n \\\"name\\\": \\\"个人资料\\\",\\n \\\"pageType\\\": \\\"form\\\",\\n \\\"parentPageCode\\\": \\\"\\\",\\n \\\"path\\\": \\\"/reader/profile\\\",\\n \\\"tableName\\\": \\\"reader\\\"\\n }\\n ]\\n}\",\"codeTemplate\":\"qing\",\"extraRequirements\":\"\",\"flowConfig\":\"{\\n \\\"version\\\": \\\"1.0\\\",\\n \\\"code\\\": \\\"reservation_management\\\",\\n \\\"name\\\": \\\"预约管理\\\",\\n \\\"mainTable\\\": \\\"reservation\\\",\\n \\\"statusField\\\": \\\"status\\\",\\n \\\"states\\\": [\\n {\\n \\\"code\\\": \\\"pending\\\",\\n \\\"label\\\": \\\"待处理\\\"\\n },\\n {\\n \\\"code\\\": \\\"cancelled\\\",\\n \\\"label\\\": \\\"已取消\\\"\\n },\\n {\\n \\\"code\\\": \\\"fulfilled\\\",\\n \\\"label\\\": \\\"已借出\\\"\\n }\\n ],\\n \\\"actions\\\": [\\n {\\n \\\"actor\\\": \\\"reader\\\",\\n \\\"button\\\": {\\n \\\"confirm\\\": \\\"确认取消该预约吗?\\\",\\n \\\"order\\\": 10,\\n \\\"pageCode\\\": \\\"my_reservations_page\\\",\\n \\\"scope\\\": \\\"reader\\\",\\n \\\"slot\\\": \\\"list.rowActions\\\",\\n \\\"type\\\": \\\"danger\\\"\\n },\\n \\\"code\\\": \\\"cancel_reservation\\\",\\n \\\"effects\\\": [],\\n \\\"from\\\": \\\"pending\\\",\\n \\\"invalidStateMessage\\\": \\\"当前状态不可取消预约\\\",\\n \\\"method\\\": \\\"POST\\\",\\n \\\"name\\\": \\\"取消预约\\\",\\n \\\"path\\\": \\\"/reservation/cancel\\\",\\n \\\"requestFields\\\": [],\\n \\\"successMessage\\\": \\\"预约已取消\\\",\\n \\\"to\\\": \\\"cancelled\\\"\\n },\\n {\\n \\\"actor\\\": \\\"admin\\\",\\n \\\"audit\\\": {\\n \\\"timeField\\\": \\\"cancel_time\\\",\\n \\\"userField\\\": \\\"cancel_user_id\\\"\\n },\\n \\\"button\\\": {\\n \\\"confirm\\\": \\\"确认取消该预约吗?\\\",\\n \\\"order\\\": 10,\\n \\\"pageCode\\\": \\\"reservation_admin_page\\\",\\n \\\"scope\\\": \\\"admin\\\",\\n \\\"slot\\\": \\\"list.rowActions\\\",\\n \\\"type\\\": \\\"danger\\\"\\n },\\n \\\"code\\\": \\\"admin_cancel_reservation\\\",\\n \\\"effects\\\": [],\\n \\\"from\\\": \\\"pending\\\",\\n \\\"invalidStateMessage\\\": \\\"当前状态不可取消预约\\\",\\n \\\"method\\\": \\\"POST\\\",\\n \\\"name\\\": \\\"取消预约\\\",\\n \\\"path\\\": \\\"/reservation/admin-cancel\\\",\\n \\\"requestFields\\\": [],\\n \\\"successMessage\\\": \\\"预约已取消\\\",\\n \\\"to\\\": \\\"cancelled\\\"\\n },\\n {\\n \\\"actor\\\": \\\"admin\\\",\\n \\\"audit\\\": {\\n \\\"timeField\\\": \\\"fulfill_time\\\",\\n \\\"userField\\\": \\\"fulfill_user_id\\\"\\n },\\n \\\"button\\\": {\\n \\\"confirm\\\": \\\"确认借出此预约的图书?\\\",\\n \\\"order\\\": 20,\\n \\\"pageCode\\\": \\\"reservation_admin_page\\\",\\n \\\"scope\\\": \\\"admin\\\",\\n \\\"slot\\\": \\\"list.rowActions\\\",\\n \\\"type\\\": \\\"primary\\\"\\n },\\n \\\"code\\\": \\\"fulfill_reservation\\\",\\n \\\"effects\\\": [\\n {\\n \\\"amount\\\": \\\"1\\\",\\n \\\"min\\\": \\\"0\\\",\\n \\\"table\\\": \\\"borrowing\\\",\\n \\\"type\\\": \\\"create_record\\\",\\n \\\"values\\\": {\\n \\\"reader_id\\\": \\\"record.reader_id\\\",\\n \\\"due_date\\\": \\\"now + 30\\\",\\n \\\"borrow_date\\\": \\\"now\\\",\\n \\\"book_id\\\": \\\"record.book_id\\\",\\n \\\"status\\\": \\\"\'borrowing\'\\\"\\n }\\n },\\n {\\n \\\"amount\\\": \\\"1\\\",\\n \\\"errorMessage\\\": \\\"图书库存不足\\\",\\n \\\"field\\\": \\\"stock\\\",\\n \\\"min\\\": \\\"0\\\",\\n \\\"notFoundMessage\\\": \\\"图书不存在\\\",\\n \\\"relationField\\\": \\\"book_id\\\",\\n \\\"table\\\": \\\"book_info\\\",\\n \\\"type\\\": \\\"decrease\\\",\\n \\\"values\\\": {}\\n }\\n ],\\n \\\"from\\\": \\\"pending\\\",\\n \\\"invalidStateMessage\\\": \\\"当前状态不可确认借出\\\",\\n \\\"method\\\": \\\"POST\\\",\\n \\\"name\\\": \\\"确认借出\\\",\\n \\\"path\\\": \\\"/reservation/fulfill\\\",\\n \\\"requestFields\\\": [],\\n \\\"successMessage\\\": \\\"借出成功\\\",\\n \\\"to\\\": \\\"fulfilled\\\"\\n }\\n ],\\n \\\"metrics\\\": [\\n {\\n \\\"aggregate\\\": \\\"count\\\",\\n \\\"code\\\": \\\"pending_count\\\",\\n \\\"field\\\": \\\"id\\\",\\n \\\"name\\\": \\\"待处理预约数\\\",\\n \\\"status\\\": \\\"pending\\\",\\n \\\"table\\\": \\\"reservation\\\",\\n \\\"unit\\\": \\\"条\\\"\\n },\\n {\\n \\\"aggregate\\\": \\\"count\\\",\\n \\\"code\\\": \\\"cancelled_count\\\",\\n \\\"field\\\": \\\"id\\\",\\n \\\"name\\\": \\\"已取消预约数\\\",\\n \\\"status\\\": \\\"cancelled\\\",\\n \\\"table\\\": \\\"reservation\\\",\\n \\\"unit\\\": \\\"条\\\"\\n },\\n {\\n \\\"aggregate\\\": \\\"count\\\",\\n \\\"code\\\": \\\"fulfilled_count\\\",\\n \\\"field\\\": \\\"id\\\",\\n \\\"name\\\": \\\"已借出预约数\\\",\\n \\\"status\\\": \\\"fulfilled\\\",\\n \\\"table\\\": \\\"reservation\\\",\\n \\\"unit\\\": \\\"条\\\"\\n },\\n {\\n \\\"aggregate\\\": \\\"count\\\",\\n \\\"code\\\": \\\"total_reservations\\\",\\n \\\"field\\\": \\\"id\\\",\\n \\\"name\\\": \\\"预约总数\\\",\\n \\\"table\\\": \\\"reservation\\\",\\n \\\"unit\\\": \\\"条\\\"\\n }\\n ],\\n \\\"notFoundMessage\\\": \\\"预约记录不存在\\\"\\n}\",\"generateType\":\"flow_config\",\"projectDesc\":\"功能:借书、还书、预约、取消预约\\n角色用户、管理员\\n其他模块轮播图、公告、新闻\",\"projectName\":\"图书管理系统\",\"stylePreset\":\"campus-orange\"}', NULL, NULL, 'Flow config value type is invalid: borrowing.return_date=', 1, 3, '2026-07-15 09:44:24', NULL, NULL, 0, '生成失败', 0, 0, 0, 0, 0, 22933, 12434, 35367, 5, 0.00000000, '2026-07-15 09:44:25', '2026-07-15 09:46:55', '2026-07-15 09:44:23', '2026-07-15 09:46:54');
INSERT INTO `front_ai_generation_task` VALUES (116, 116, 111, 100, 'one_click_project', 'deepseek', 'deepseek-v4-flash', 'front.one_click_project', 'V1', '28e64be601aa2ec52f471e7fe8e534b3f41f053125435124128794371db1b770', '{\"pipelineCode\":\"one_click_project\",\"schemaVersion\":\"1.0\",\"stages\":[{\"sequenceNo\":1,\"stageCode\":\"PROJECT_PREPARE\"},{\"generateType\":\"flow_config\",\"model\":\"deepseek-v4-flash\",\"pipelineReleaseCode\":\"\",\"promptCode\":\"front.flow_config\",\"promptFingerprint\":\"9443d0ca8f3e4bb87cdc13ef4924015fff334f0c9b8690573f0551dd18708406\",\"promptVersion\":\"v3\",\"providerCode\":\"deepseek\",\"sequenceNo\":2,\"stageCode\":\"DESIGN\"},{\"generateType\":\"database\",\"model\":\"deepseek-v4-flash\",\"pipelineReleaseCode\":\"builtin-one-click-1.0.0\",\"promptCode\":\"front.database\",\"promptFingerprint\":\"c7d0a32ce0b0055ac80348fb10c1beb758034b9c5b5637694725425bb7937cbc\",\"promptVersion\":\"V2\",\"providerCode\":\"deepseek\",\"sequenceNo\":3,\"stageCode\":\"DATABASE\"},{\"sequenceNo\":4,\"stageCode\":\"GENERATE\"},{\"sequenceNo\":5,\"stageCode\":\"VERIFY_AND_PREVIEW\"},{\"sequenceNo\":6,\"stageCode\":\"COMPLETED\"}]}', '37f8d31a066448943d45b0491bb68d403b7885c3d4a6a3274ddcf2e024fbd18c', 'SUCCEEDED', '8e85466b65d703623dc02b8e438e2a49c07a098fae4b10bc3c74010a55ed80b7', '{\"codeTemplate\":\"qing\",\"extraRequirements\":\"\",\"generateType\":\"one_click_project\",\"projectDesc\":\"功能:借书、还书、预约、取消预约\\n角色用户、管理员\\n其他模块轮播图、公告、新闻\",\"projectName\":\"图书管理系统\",\"stylePreset\":\"dark-tech\"}', '{\"adminFrontendUrl\":\"http://127.0.0.1:26779\",\"backendUrl\":\"http://127.0.0.1:26739\",\"downloadReady\":true,\"expiresAt\":\"2026-07-15 11:15:19\",\"frontendUrl\":\"http://127.0.0.1:26740\",\"generationRunId\":105,\"previewStatus\":\"RUNNING\",\"projectId\":111,\"report\":{\"adminPageCount\":10,\"businessActionCount\":4,\"businessLoopComplete\":true,\"businessLoopWarnings\":[],\"frontendPageCount\":5,\"loopActions\":4,\"missingRequiredActions\":[],\"quantityRules\":2,\"recordRules\":2,\"stateTransitions\":2,\"tableCount\":8},\"specContentHash\":\"50b53eeb120cd253127b20066d5ef80e1dd16bbf22c239b6781901b8ef556f27\",\"specVersionId\":105,\"specVersionNo\":1,\"stage\":\"COMPLETED\",\"suggestedActions\":[]}', '', '', 1, 3, '2026-07-15 10:57:49', NULL, NULL, 100, '生成完成', 0, 0, 0, 0, 0, 7230, 18029, 25259, 5, 0.00000000, '2026-07-15 10:57:56', '2026-07-15 11:01:28', '2026-07-15 10:57:48', '2026-07-15 11:01:27');
-- ----------------------------
-- Table structure for front_ai_quota_bucket
-- ----------------------------
DROP TABLE IF EXISTS `front_ai_quota_bucket`;
CREATE TABLE `front_ai_quota_bucket` (
`bucket_id` bigint(20) NOT NULL AUTO_INCREMENT COMMENT 'Quota bucket ID',
`user_id` bigint(20) NOT NULL COMMENT 'Front user ID',
`period_type` varchar(20) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NOT NULL COMMENT 'DAY or MONTH',
`period_key` varchar(20) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NOT NULL COMMENT 'Period key',
`task_limit` int(11) NULL DEFAULT 0 COMMENT 'Task limit',
`task_used` int(11) NULL DEFAULT 0 COMMENT 'Used tasks',
`token_limit` int(11) NULL DEFAULT 0 COMMENT 'Token limit',
`token_used` int(11) NULL DEFAULT 0 COMMENT 'Used tokens',
`cost_limit_cents` int(11) NULL DEFAULT 0 COMMENT 'Cost limit in cents',
`cost_used_cents` int(11) NULL DEFAULT 0 COMMENT 'Used cost in cents',
`running_limit` int(11) NULL DEFAULT 1 COMMENT 'Running task limit',
`running_count` int(11) NULL DEFAULT 0 COMMENT 'Running task count',
`create_time` datetime(0) NULL DEFAULT NULL COMMENT 'Create time',
`update_time` datetime(0) NULL DEFAULT NULL COMMENT 'Update time',
PRIMARY KEY (`bucket_id`) USING BTREE,
UNIQUE INDEX `uk_front_ai_quota_bucket`(`user_id`, `period_type`, `period_key`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 100 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_0900_ai_ci COMMENT = 'Front AI quota bucket' ROW_FORMAT = Dynamic;
-- ----------------------------
-- Records of front_ai_quota_bucket
-- ----------------------------
INSERT INTO `front_ai_quota_bucket` VALUES (100, 100, 'DAY', '20260714', 20, 14, 0, 0, 0, 0, 1, 0, '2026-07-14 15:17:29', '2026-07-14 22:28:16');
INSERT INTO `front_ai_quota_bucket` VALUES (101, 100, 'MONTH', '202607', 0, 0, 0, 607854, 5000, 107, 0, 0, '2026-07-14 15:17:29', '2026-07-15 11:01:27');
INSERT INTO `front_ai_quota_bucket` VALUES (102, 100, 'DAY', '20260715', 20, 4, 0, 0, 0, 0, 1, 0, '2026-07-15 08:50:42', '2026-07-15 11:01:27');
-- ----------------------------
-- Table structure for front_ai_usage_ledger
-- ----------------------------
DROP TABLE IF EXISTS `front_ai_usage_ledger`;
CREATE TABLE `front_ai_usage_ledger` (
`ledger_id` bigint(20) NOT NULL AUTO_INCREMENT COMMENT 'Usage ledger ID',
`task_id` bigint(20) NULL DEFAULT NULL COMMENT 'Task ID',
`generation_id` bigint(20) NULL DEFAULT NULL COMMENT 'Generation record ID',
`project_id` bigint(20) NULL DEFAULT NULL COMMENT 'Project ID',
`user_id` bigint(20) NOT NULL COMMENT 'Front user ID',
`generate_type` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NOT NULL COMMENT 'Generation type',
`provider` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT 'deepseek' COMMENT 'AI provider',
`model` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT 'deepseek-chat' COMMENT 'AI model',
`prompt_code` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT 'Prompt code',
`prompt_version` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT 'Prompt version',
`prompt_fingerprint` char(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT 'Prompt SHA-256',
`system_prompt` longtext CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL COMMENT 'Actual system prompt',
`user_prompt` longtext CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL COMMENT 'Actual rendered user prompt',
`output_content` longtext CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL COMMENT 'Aggregated model output',
`stream` char(1) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT '0' COMMENT 'Streaming flag',
`duration_ms` bigint(20) NULL DEFAULT 0 COMMENT 'Invocation duration in milliseconds',
`prompt_tokens` int(11) NULL DEFAULT 0 COMMENT 'Prompt tokens',
`prompt_cache_hit_tokens` int(11) NULL DEFAULT 0 COMMENT 'Prompt cache hit tokens',
`prompt_cache_miss_tokens` int(11) NULL DEFAULT 0 COMMENT 'Prompt cache miss tokens',
`completion_tokens` int(11) NULL DEFAULT 0 COMMENT 'Completion tokens',
`reasoning_tokens` int(11) NULL DEFAULT 0 COMMENT 'Reasoning tokens',
`input_tokens` int(11) NULL DEFAULT 0 COMMENT 'Input tokens',
`output_tokens` int(11) NULL DEFAULT 0 COMMENT 'Output tokens',
`total_tokens` int(11) NULL DEFAULT 0 COMMENT 'Total tokens',
`cost_cents` int(11) NULL DEFAULT 0 COMMENT 'Estimated cost in cents',
`cost_usd` decimal(18, 8) NULL DEFAULT 0.00000000 COMMENT 'Estimated cost in USD',
`success` char(1) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT '0' COMMENT 'Success flag',
`error_message` varchar(1000) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT '' COMMENT 'Error message',
`create_time` datetime(0) NULL DEFAULT NULL COMMENT 'Create time',
PRIMARY KEY (`ledger_id`) USING BTREE,
INDEX `idx_front_ai_usage_user`(`user_id`, `create_time`) USING BTREE,
INDEX `idx_front_ai_usage_task`(`task_id`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 100 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_0900_ai_ci COMMENT = 'Front AI usage ledger' ROW_FORMAT = Dynamic;
-- ----------------------------
-- Records of front_ai_usage_ledger
-- ----------------------------
INSERT INTO `front_ai_usage_ledger` VALUES (100, NULL, NULL, NULL, 100, 'requirement', 'deepseek', 'deepseek-v4-flash', 'front.requirement', 'V1', '75ec898b38a76e31ef640596255c084480ad82b7a93cd896e26916fa32b873c9', '你是资深软件需求分析师。面向本科毕设或课程设计规模在保留用户原始描述的前提下补全真实业务闭环、角色、核心对象和可执行业务规则。规则必须给出明确的时间、数量、金额、状态、公式、上限和异常边界用户未提供关键数值时应给出合理默认值并标注“AI假设”不得使用“按实际情况”“超时后处理”等模糊表述。不要把需求扩张成大型企业平台也不要用增删改查或运维功能代替业务需求。只输出用户消息要求的中文纯文本不要 Markdown、JSON 或解释。', '请根据以下 JSON 项目输入为低代码生成器补全一份可直接驱动代码生成的项目需求。\n需求复杂度控制在本科毕设或课程设计级别功能要完整但不要设计成大型企业平台或运维平台。\ncurrentDescription 是用户原始描述,必须作为事实来源保留其约束;输出补充内容,不要改写或否定用户已经明确的规则。\n只返回中文纯文本不要 Markdown不要 JSON不要解释。格式必须严格如下\n业务目标一句话说明系统解决的问题\n角色用顿号分隔 2 到 4 个用户角色\n核心对象列出流程涉及的主要业务对象和记录\n核心流程按先后顺序写出完整正向流程、逆向动作和补偿动作不要只写增删改查\n业务规则用分号分隔明确规则必须覆盖适用的时间期限、起算点、状态判定、数量限制、金额公式、计费单位、取整方式、封顶值、重复操作限制\n异常边界说明库存不足、状态不符、重复提交、取消、超时、重复支付等适用场景\n验收场景至少给出一个包含边界数值和预期结果的完整场景\n如果输入没有给出期限、费率、上限等关键数值必须选择合理默认值并在该条前标注“AI假设禁止输出“待定”“按实际情况”“超时后罚款”等不可执行描述。\n对于借阅、租赁、预约等有期限的流程必须明确起算时间、期限、到期判定和逾期处理存在罚款或费用时必须明确公式、日费率、取整和上限。\n其他模块用顿号分隔 2 到 4 个前台展示或内容维护模块,优先从轮播图、公告、新闻资讯、友情链接、留言反馈、帮助中心、系统简介中选择\n不要出现通知提醒、统计报表、数据备份、操作日志、系统监控、定时任务等后台运维或企业管理平台标配模块。\n项目输入 JSON\n{\"projectName\":\"图书管理系统\",\"currentDescription\":\"\"}', '业务目标:图书管理系统旨在提供图书借阅、归还、查询及读者管理的基础功能,支持图书库存管理与借阅期限控制。\n\n角色管理员、读者\n\n核心对象图书、读者、借阅记录、图书分类\n\n核心流程读者在系统内注册账号填写姓名、学号或工号、联系方式等信息管理员审核通过后激活读者账号读者登录系统通过关键词书名、作者、ISBN查询图书系统显示图书的库存数量、可借状态、存放位置读者选择一本可借图书并发起借阅请求系统检测读者当前借阅未还数量是否达到上限若未达到则生成借阅记录扣减库存数量1本借阅状态变为借出开始计借阅时间读者在借阅期限内将图书归还至图书馆管理员扫描图书条码或输入图书ID系统找到对应借阅记录更新归还时间为当前时间归还状态变为已还库存数量加1若读者超期未还系统在归还时自动计算超期天数并生成逾期费用读者需在系统内支付逾期费用后方可完成归还或管理员登记后读者线下支付系统记录支付状态读者可查看本人的借阅历史、当前借阅图书及应还日期管理员可管理图书信息新增、编辑图书基本信息、分类、库存数量、读者信息冻结、解冻、重置密码、查看所有借阅记录管理员可处理图书损坏或丢失标记图书状态为损坏或丢失扣除库存读者需赔偿。\n\n业务规则AI假设每位读者最多可借阅5本图书AI假设图书借阅期限为30天起算时间为借阅请求被管理员确认或系统自动确认时刻AI假设逾期费用为每本每天0.5元按天计费不足1天按1天计算Ceil取整单本逾期费用上限为图书定价的1倍AI假设图书定价默认为50元若未录入则使用此默认值每次借阅只能借阅同一本书1本读者账号需激活且未被冻结才能借阅库存数量为0时不可借阅已借出的图书状态为借出不可再次借阅归还时若图书损坏管理员标记损坏等级赔偿金额为图书定价的50%AI假设若图书丢失赔偿金额为图书定价的2倍AI假设系统自动在每晚23:59检查所有借阅记录将当日到期的图书标记为即将逾期状态仅供提醒但逾期计算以实际归还日期为准。\n\n异常边界库存不足时读者无法发起借阅请求系统提示该图书已全部借出状态不符时若图书状态为损坏或丢失不可借阅若读者账号被冻结不可借阅若读者当前借阅未还数量已达上限不可借阅重复提交时同一读者对于同一本图书在未归还前不可重复提交借阅请求系统检测已有进行中的借阅记录则拒绝取消时读者可在管理员确认借阅前取消借阅请求取消后库存不扣减借阅一旦确认无法取消超时时读者在借阅期限到期后仍可归还图书但需支付逾期费用重复支付时若读者已支付逾期费用再次支付时系统提示该笔费用已支付避免重复扣款。\n\n验收场景读者张三学号2023001当前借阅未还数量为4本查询到图书《数据结构》库存有2本定价50元。张三在2024年1月1日10:00发起借阅请求管理员确认后借阅成功库存变为1本应还日期为2024年1月31日。张三在2024年2月2日14:00归还超期2天1月31日到期2月1日第1天2月2日第2天。逾期费用计算2天×0.5元/天=1元未超过定价50元无需封顶。张三支付1元后归还完成库存恢复为2本。\n\n其他模块公告栏、新闻资讯、友情链接、帮助中心', '0', 22541, 557, 512, 45, 1957, 1069, 557, 1957, 2514, 1, 0.00396924, '1', NULL, '2026-07-14 15:08:59');
INSERT INTO `front_ai_usage_ledger` VALUES (101, 100, 100, 100, 100, 'app_blueprint', 'deepseek', 'deepseek-v4-flash', 'front.app_blueprint', 'V1', 'c3ee0180ed446fe83055bd1c272ed1b6e3978584fe52f98f5e78e14e2cfc8f29', '你是应用蓝图架构师。只输出符合用户消息结构的 JSON规划业务角色、前台菜单与页面、后台菜单和运营看板。保持 pageCode、tableName、角色数据范围和登录要求前后一致只描述静态蓝图不生成数据库、权限表、菜单表或代码。角色名称使用简体中文技术标识使用稳定的小写 snake_case。', '根据项目输入 JSON 生成应用蓝图,只返回 JSON不要 Markdown 围栏或解释。\n输出结构{\"roles\":[{\"code\":\"reader\",\"name\":\"读者\",\"description\":\"\"}],\"frontendMenus\":[{\"code\":\"book_catalog\",\"name\":\"图书目录\",\"path\":\"/books\",\"pageCode\":\"book_catalog_page\",\"requiresLogin\":false,\"visibleRoles\":[],\"dataScope\":\"PUBLIC\"}],\"frontendPages\":[{\"code\":\"book_catalog_page\",\"name\":\"图书目录\",\"menuCode\":\"book_catalog\",\"path\":\"/books\",\"pageType\":\"list\",\"tableName\":\"book_info\"}],\"adminMenus\":[{\"code\":\"book_admin\",\"name\":\"图书管理\",\"path\":\"/admin/books\",\"pageCode\":\"book_admin_page\",\"tableName\":\"book_info\",\"pageType\":\"list\",\"requiresLogin\":true,\"visibleRoles\":[\"admin\"],\"dataScope\":\"ROLE\"}],\"adminHomeDashboard\":{\"title\":\"运营总览\",\"description\":\"核心业务数据\",\"metrics\":[],\"charts\":[]}}。\n蓝图描述目标生成项目而不是当前 EasyCode/RuoYi 平台。不要生成数据库表、菜单表、角色表、权限表或代码。\nrole.name 使用简体中文role.code 使用小写 snake_case。只有 role.code=admin 是系统管理员;名称含“管理员”或“后台”的业务角色仍保持独立。\nrole.name must be Simplified Chinese. Only role.code=admin is the system administrator.\n每个菜单必须包含 requiresLogin、visibleRoles、dataScopedataScope 只能是 PUBLIC、CURRENT_USER 或 ROLE。\nadminMenus 必须包含 pageCode、tableName、pageType个人资料使用 form普通管理使用 list。\nadminMenus must include pageCode, tableName, and pageType.\nfrontendMenus 顶层菜单应指向 pageCode详情页作为子页面不创建顶层详情菜单。\n不要为轮播图、banner、公告滚动条等首页装饰创建顶层菜单可放在首页业务块或作为后台维护数据。\nfrontendPages.pageType 只能是 list、current_user_list、detail、formtableName 必须是页面展示的业务表。\n同一业务对象只使用一个稳定 tableName后续数据库、闭环、页面、看板、动作必须复用不能使用同义表名。\nadminHomeDashboard 尽量包含 4 个业务指标和至少 2 张图表趋势图与分布图所有表字段必须可由后续数据库步骤创建。semantic 只能使用 money、order、user、task、warning、inventory、content、default。\n每个非 admin 角色使用表名等于 role.code 的独立账号表,不得创建共享 user、user_info、member 或 account 表。\nNever invent a shared user, user_info, member, or account table for role accounts.\n需要个人资料页时为每个非 admin 角色创建独立 form 页面和菜单tableName 绑定 role.codepageCode/path 带角色前缀visibleRoles 只包含该角色。\nCreate one form page and one menu per non-admin role when profile pages are needed.\n个人订单、借阅、资料、预约、支付等页面必须 requiresLogin=true 且 dataScope=CURRENT_USER。\n项目输入 JSON\n{\"projectName\":\"图书管理系统\",\"projectDescription\":\"【AI补全需求】\\n业务目标图书管理系统旨在提供图书借阅、归还、查询及读者管理的基础功能支持图书库存管理与借阅期限控制。\\n\\n角色管理员、读者\\n\\n核心对象图书、读者、借阅记录、图书分类\\n\\n核心流程读者在系统内注册账号填写姓名、学号或工号、联系方式等信息管理员审核通过后激活读者账号读者登录系统通过关键词书名、作者、ISBN查询图书系统显示图书的库存数量、可借状态、存放位置读者选择一本可借图书并发起借阅请求系统检测读者当前借阅未还数量是否达到上限若未达到则生成借阅记录扣减库存数量1本借阅状态变为借出开始计借阅时间读者在借阅期限内将图书归还至图书馆管理员扫描图书条码或输入图书ID系统找到对应借阅记录更新归还时间为当前时间归还状态变为已还库存数量加1若读者超期未还系统在归还时自动计算超期天数并生成逾期费用读者需在系统内支付逾期费用后方可完成归还或管理员登记后读者线下支付系统记录支付状态读者可查看本人的借阅历史、当前借阅图书及应还日期管理员可管理图书信息新增、编辑图书基本信息、分类、库存数量、读者信息冻结、解冻、重置密码、查看所有借阅记录管理员可处理图书损坏或丢失标记图书状态为损坏或丢失扣除库存读者需赔偿。\\n\\n业务规则AI假设每位读者最多可借阅5本图书AI假设图书借阅期限为30天起算时间为借阅请求被管理员确认或系统自动确认时刻AI假设逾期费用为每本每天0.5元按天计费不足1天按1天计算Ceil取整单本逾期费用上限为图书定价的1倍AI假设图书定价默认为50元若未录入则使用此默认值每次借阅只能借阅同一本书1本读者账号需激活且未被冻结才能借阅库存数量为0时不可借阅已借出的图书状态为借出不可再次借阅归还时若图书损坏管理员标记损坏等级赔偿金额为图书定价的50%AI假设若图书丢失赔偿金额为图书定价的2倍AI假设系统自动在每晚23:59检查所有借阅记录将当日到期的图书标记为即将逾期状态仅供提醒但逾期计算以实际归还日期为准。\\n\\n异常边界库存不足时读者无法发起借阅请求系统提示该图书已全部借出状态不符时若图书状态为损坏或丢失不可借阅若读者账号被冻结不可借阅若读者当前借阅未还数量已达上限不可借阅重复提交时同一读者对于同一本图书在未归还前不可重复提交借阅请求系统检测已有进行中的借阅记录则拒绝取消时读者可在管理员确认借阅前取消借阅请求取消后库存不扣减借阅一旦确认无法取消超时时读者在借阅期限到期后仍可归还图书但需支付逾期费用重复支付时若读者已支付逾期费用再次支付时系统提示该笔费用已支付避免重复扣款。\\n\\n验收场景读者张三学号2023001当前借阅未还数量为4本查询到图书《数据结构》库存有2本定价50元。张三在2024年1月1日10:00发起借阅请求管理员确认后借阅成功库存变为1本应还日期为2024年1月31日。张三在2024年2月2日14:00归还超期2天1月31日到期2月1日第1天2月2日第2天。逾期费用计算2天×0.5元/天=1元未超过定价50元无需封顶。张三支付1元后归还完成库存恢复为2本。\\n\\n其他模块公告栏、新闻资讯、友情链接、帮助中心\",\"industryTemplate\":\"\",\"stylePreset\":\"dark-tech\",\"extraRequirements\":\"\"}', '{\n \"roles\": [\n {\n \"code\": \"admin\",\n \"name\": \"管理员\",\n \"description\": \"系统管理员,管理图书、读者、借阅记录等所有业务\"\n },\n {\n \"code\": \"reader\",\n \"name\": \"读者\",\n \"description\": \"注册读者,可查询图书、借阅归还、管理个人信息\"\n }\n ],\n \"frontendMenus\": [\n {\n \"code\": \"book_catalog\",\n \"name\": \"图书目录\",\n \"path\": \"/books\",\n \"pageCode\": \"book_catalog_page\",\n \"requiresLogin\": false,\n \"visibleRoles\": [],\n \"dataScope\": \"PUBLIC\"\n },\n {\n \"code\": \"announcement_list\",\n \"name\": \"公告栏\",\n \"path\": \"/announcements\",\n \"pageCode\": \"announcement_list_page\",\n \"requiresLogin\": false,\n \"visibleRoles\": [],\n \"dataScope\": \"PUBLIC\"\n },\n {\n \"code\": \"news_list\",\n \"name\": \"新闻资讯\",\n \"path\": \"/news\",\n \"pageCode\": \"news_list_page\",\n \"requiresLogin\": false,\n \"visibleRoles\": [],\n \"dataScope\": \"PUBLIC\"\n },\n {\n \"code\": \"friend_link_list\",\n \"name\": \"友情链接\",\n \"path\": \"/friend-links\",\n \"pageCode\": \"friend_link_list_page\",\n \"requiresLogin\": false,\n \"visibleRoles\": [],\n \"dataScope\": \"PUBLIC\"\n },\n {\n \"code\": \"help_center\",\n \"name\": \"帮助中心\",\n \"path\": \"/help\",\n \"pageCode\": \"help_center_page\",\n \"requiresLogin\": false,\n \"visibleRoles\": [],\n \"dataScope\": \"PUBLIC\"\n },\n {\n \"code\": \"my_borrowing\",\n \"name\": \"我的借阅\",\n \"path\": \"/my-borrowing\",\n \"pageCode\": \"my_borrowing_page\",\n \"requiresLogin\": true,\n \"visibleRoles\": [\"reader\"],\n \"dataScope\": \"CURRENT_USER\"\n },\n {\n \"code\": \"reader_profile\",\n \"name\": \"个人资料\",\n \"path\": \"/reader/profile\",\n \"pageCode\": \"reader_profile_page\",\n \"requiresLogin\": true,\n \"visibleRoles\": [\"reader\"],\n \"dataScope\": \"CURRENT_USER\"\n }\n ],\n \"frontendPages\": [\n {\n \"code\": \"book_catalog_page\",\n \"name\": \"图书目录\",\n \"menuCode\": \"book_catalog\",\n \"path\": \"/books\",\n \"pageType\": \"list\",\n \"tableName\": \"book_info\"\n },\n {\n \"code\": \"announcement_list_page\",\n \"name\": \"公告栏\",\n \"menuCode\": \"announcement_list\",\n \"path\": \"/announcements\",\n \"pageType\": \"list\",\n \"tableName\": \"announcement\"\n },\n {\n \"code\": \"news_list_page\",\n \"name\": \"新闻资讯\",\n \"menuCode\": \"news_list\",\n \"path\": \"/news\",\n \"pageType\": \"list\",\n \"tableName\": \"news\"\n },\n {\n \"code\": \"friend_link_list_page\",\n \"name\": \"友情链接\",\n \"menuCode\": \"friend_link_list\",\n \"path\": \"/friend-links\",\n \"pageType\": \"list\",\n \"tableName\": \"friend_link\"\n },\n {\n \"code\": \"help_center_page\",\n \"name\": \"帮助中心\",\n \"menuCode\": \"help_center\",\n \"path\": \"/help\",\n \"pageType\": \"list\",\n \"tableName\": \"help_article\"\n },\n {\n \"code\": \"my_borrowing_page\",\n \"name\": \"我的借阅\",\n \"menuCode\": \"my_borrowing\",\n \"path\": \"/my-borrowing\",\n \"pageType\": \"current_user_list\",\n \"tableName\": \"borrowing_record\"\n },\n {\n \"code\": \"reader_profile_page\",\n \"name\": \"个人资料\",\n \"menuCode\": \"reader_profile\",\n \"path\": \"/reader/profile\",\n \"pageType\": \"form\",\n \"tableName\": \"reader\"\n },\n {\n \"code\": \"book_detail_page\",\n \"name\": \"图书详情\",\n \"menuCode\": null,\n \"path\": \"/books/:id\",\n \"pageType\": \"detail\",\n \"tableName\": \"book_info\"\n },\n {\n \"code\": \"borrowing_detail_page\",\n \"name\": \"借阅详情\",\n \"menuCode\": null,\n \"path\": \"/my-borrowing/:id\",\n \"pageType\": \"detail\",\n \"tableName\": \"borrowing_record\"\n }\n ],\n \"adminMenus\": [\n {\n \"code\": \"book_admin\",\n \"name\": \"图书管理\",\n \"path\": \"/admin/books\",\n \"pageCode\": \"book_admin_page\",\n \"tableName\": \"book_info\",\n \"pageType\": \"list\",\n \"requiresLogin\": true,\n \"visibleRoles\": [\"admin\"],\n \"dataScope\": \"ROLE\"\n },\n {\n \"code\": \"reader_admin\",\n \"name\": \"读者管理\",\n \"path\": \"/admin/readers\",\n \"pageCode\": \"reader_admin_page\",\n \"tableName\": \"reader\",\n \"pageType\": \"list\",\n \"requiresLogin\": true,\n \"visibleRoles\": [\"admin\"],\n \"dataScope\": \"ROLE\"\n },\n {\n \"code\": \"borrowing_admin\",\n \"name\": \"借阅记录管理\",\n \"path\": \"/admin/borrowings\",\n \"pageCode\": \"borrowing_admin_page\",\n \"tableName\": \"borrowing_record\",\n \"pageType\": \"list\",\n \"requiresLogin\": true,\n \"visibleRoles\": [\"admin\"],\n \"dataScope\": \"ROLE\"\n },\n {\n \"code\": \"category_admin\",\n \"name\": \"图书分类管理\",\n \"path\": \"/admin/categories\",\n \"pageCode\": \"category_admin_page\",\n \"tableName\": \"book_category\",\n \"pageType\": \"list\",\n \"requiresLogin\": true,\n \"visibleRoles\": [\"admin\"],\n \"dataScope\": \"ROLE\"\n },\n {\n \"code\": \"announcement_admin\",\n \"name\": \"公告管理\",\n \"path\": \"/admin/announcements\",\n \"pageCode\": \"announcement_admin_page\",\n \"tableName\": \"announcement\",\n \"pageType\": \"list\",\n \"requiresLogin\": true,\n \"visibleRoles\": [\"admin\"],\n \"dataScope\": \"ROLE\"\n },\n {\n \"code\": \"news_admin\",\n \"name\": \"新闻管理\",\n \"path\": \"/admin/news\",\n \"pageCode\": \"news_admin_page\",\n \"tableName\": \"news\",\n \"pageType\": \"list\",\n \"requiresLogin\": true,\n \"visibleRoles\": [\"admin\"],\n \"dataScope\": \"ROLE\"\n },\n {\n \"code\": \"friend_link_admin\",\n \"name\": \"友情链接管理\",\n \"path\": \"/admin/friend-links\",\n \"pageCode\": \"friend_link_admin_page\",\n \"tableName\": \"friend_link\",\n \"pageType\": \"list\",\n \"requiresLogin\": true,\n \"visibleRoles\": [\"admin\"],\n \"dataScope\": \"ROLE\"\n },\n {\n \"code\": \"help_admin\",\n \"name\": \"帮助中心管理\",\n \"path\": \"/admin/help\",\n \"pageCode\": \"help_admin_page\",\n \"tableName\": \"help_article\",\n \"pageType\": \"list\",\n \"requiresLogin\": true,\n \"visibleRoles\": [\"admin\"],\n \"dataScope\": \"ROLE\"\n },\n {\n \"code\": \"admin_profile\",\n \"name\": \"管理员个人资料\",\n \"path\": \"/admin/profile\",\n \"pageCode\": \"admin_profile_page\",\n \"tableName\": \"admin_info\",\n \"pageType\": \"form\",\n \"requiresLogin\": true,\n \"visibleRoles\": [\"admin\"],\n \"dataScope\": \"ROLE\"\n }\n ],\n \"adminHomeDashboard\": {\n \"title\": \"运营总览\",\n \"description\": \"核心业务数据\",\n \"metrics\": [\n {\"label\": \"总图书数\", \"value\": 0, \"semantic\": \"inventory\"},\n {\"label\": \"总读者数\", \"value\": 0, \"semantic\": \"user\"},\n {\"label\": \"当前借出\", \"value\": 0, \"semantic\": \"order\"},\n {\"label\": \"逾期未还\", \"value\": 0, \"semantic\": \"warning\"}\n ],\n \"charts\": [\n {\"title\": \"借阅趋势\", \"type\": \"trend\", \"semantic\": \"order\"},\n {\"title\": \"图书分类分布\", \"type\": \"distribution\", \"semantic\": \"content\"}\n ]\n }\n}', '0', 46966, 1700, 768, 932, 5253, 3265, 1700, 5253, 6953, 2, 0.01145336, '1', NULL, '2026-07-14 15:18:16');
INSERT INTO `front_ai_usage_ledger` VALUES (102, 100, 100, 100, 100, 'flow_config', 'deepseek', 'deepseek-v4-flash', 'front.flow_config', 'V1', '247495840c67968896ccad2db0a599bd4fc594d0189157dce888b8ede90b3257', '你是业务流程配置设计器。只输出一个合法 JSON 对象,不输出 Markdown、解释或 SQL。\n\n目标用最小 flow_config 描述状态流转、显式 Java 业务动作、多表数量联动、按钮和统计。不要输出 CRUD不要输出通用规则 DSL。\n\n固定结构\n{\n \"version\":\"1.0\",\n \"code\":\"snake_case\",\n \"name\":\"中文业务名\",\n \"mainTable\":\"snake_case\",\n \"statusField\":\"status\",\n \"notFoundMessage\":\"主记录不存在\",\n \"states\":[{\"code\":\"pending\",\"label\":\"待审核\"}],\n \"actions\":[{\n \"code\":\"approve\",\n \"name\":\"审核通过\",\n \"from\":\"pending\",\n \"to\":\"borrowing\",\n \"actor\":\"admin\",\n \"method\":\"POST\",\n \"path\":\"/borrow-record/approve\",\n \"invalidStateMessage\":\"当前状态不能审核\",\n \"successMessage\":\"审核成功\",\n \"audit\":{\"userField\":\"approve_user_id\",\"timeField\":\"approve_time\"},\n \"effects\":[{\n \"type\":\"decrease\",\n \"table\":\"book\",\n \"relationField\":\"book_id\",\n \"field\":\"stock\",\n \"amount\":\"1\",\n \"min\":\"0\",\n \"notFoundMessage\":\"图书不存在\",\n \"errorMessage\":\"图书库存不足\"\n }],\n \"button\":{\"scope\":\"admin\",\"pageCode\":\"borrow_record_list\",\"slot\":\"list.rowActions\",\"type\":\"success\",\"confirm\":\"确认审核通过吗?\",\"order\":10}\n }],\n \"metrics\":[{\"code\":\"borrowing_count\",\"name\":\"借阅中数量\",\"table\":\"borrow_record\",\"aggregate\":\"count\",\"field\":\"id\",\"status\":\"borrowing\",\"unit\":\"条\"}]\n}\n\n约束\n1. code、表名、字段名全部使用小写 snake_case状态 code 使用稳定英文编码label 使用中文。\n2. 每个 action 必须有 from 和 to且二者存在于 states 中并且不相同。\n3. effects.type 只能是 decrease、increase、update_related、create_record。\n4. decrease/increase 必须给 table、relationField、field、amountdecrease 还要给 min。\n5. update_related/create_record 使用 values值可为 currentUserId、now、record.字段名或常量。\n6. 审核人等身份只能通过 audit.userField 表达,由后端登录态注入,不能作为前端可传字段。\n7. 覆盖需求中的完整正向闭环和关键回退/拒绝动作,但不要为普通 CRUD 创建 action。', '请根据以下 JSON 上下文生成 flow_config。appBlueprint 是已确认的页面、角色和菜单范围,必须与它保持一致:\n{\"mode\":\"generate\",\"projectName\":\"图书管理系统\",\"projectDescription\":\"【AI补全需求】\\n业务目标图书管理系统旨在提供图书借阅、归还、查询及读者管理的基础功能支持图书库存管理与借阅期限控制。\\n\\n角色管理员、读者\\n\\n核心对象图书、读者、借阅记录、图书分类\\n\\n核心流程读者在系统内注册账号填写姓名、学号或工号、联系方式等信息管理员审核通过后激活读者账号读者登录系统通过关键词书名、作者、ISBN查询图书系统显示图书的库存数量、可借状态、存放位置读者选择一本可借图书并发起借阅请求系统检测读者当前借阅未还数量是否达到上限若未达到则生成借阅记录扣减库存数量1本借阅状态变为借出开始计借阅时间读者在借阅期限内将图书归还至图书馆管理员扫描图书条码或输入图书ID系统找到对应借阅记录更新归还时间为当前时间归还状态变为已还库存数量加1若读者超期未还系统在归还时自动计算超期天数并生成逾期费用读者需在系统内支付逾期费用后方可完成归还或管理员登记后读者线下支付系统记录支付状态读者可查看本人的借阅历史、当前借阅图书及应还日期管理员可管理图书信息新增、编辑图书基本信息、分类、库存数量、读者信息冻结、解冻、重置密码、查看所有借阅记录管理员可处理图书损坏或丢失标记图书状态为损坏或丢失扣除库存读者需赔偿。\\n\\n业务规则AI假设每位读者最多可借阅5本图书AI假设图书借阅期限为30天起算时间为借阅请求被管理员确认或系统自动确认时刻AI假设逾期费用为每本每天0.5元按天计费不足1天按1天计算Ceil取整单本逾期费用上限为图书定价的1倍AI假设图书定价默认为50元若未录入则使用此默认值每次借阅只能借阅同一本书1本读者账号需激活且未被冻结才能借阅库存数量为0时不可借阅已借出的图书状态为借出不可再次借阅归还时若图书损坏管理员标记损坏等级赔偿金额为图书定价的50%AI假设若图书丢失赔偿金额为图书定价的2倍AI假设系统自动在每晚23:59检查所有借阅记录将当日到期的图书标记为即将逾期状态仅供提醒但逾期计算以实际归还日期为准。\\n\\n异常边界库存不足时读者无法发起借阅请求系统提示该图书已全部借出状态不符时若图书状态为损坏或丢失不可借阅若读者账号被冻结不可借阅若读者当前借阅未还数量已达上限不可借阅重复提交时同一读者对于同一本图书在未归还前不可重复提交借阅请求系统检测已有进行中的借阅记录则拒绝取消时读者可在管理员确认借阅前取消借阅请求取消后库存不扣减借阅一旦确认无法取消超时时读者在借阅期限到期后仍可归还图书但需支付逾期费用重复支付时若读者已支付逾期费用再次支付时系统提示该笔费用已支付避免重复扣款。\\n\\n验收场景读者张三学号2023001当前借阅未还数量为4本查询到图书《数据结构》库存有2本定价50元。张三在2024年1月1日10:00发起借阅请求管理员确认后借阅成功库存变为1本应还日期为2024年1月31日。张三在2024年2月2日14:00归还超期2天1月31日到期2月1日第1天2月2日第2天。逾期费用计算2天×0.5元/天=1元未超过定价50元无需封顶。张三支付1元后归还完成库存恢复为2本。\\n\\n其他模块公告栏、新闻资讯、友情链接、帮助中心\",\"industryTemplate\":\"\",\"stylePreset\":\"dark-tech\",\"extraRequirements\":\"\",\"confirmedAppBlueprint\":{\"adminHomeDashboard\":{\"charts\":[{\"filters\":[],\"metrics\":[],\"semantic\":\"order\",\"title\":\"借阅趋势\",\"type\":\"trend\"},{\"filters\":[],\"metrics\":[],\"semantic\":\"content\",\"title\":\"图书分类分布\",\"type\":\"distribution\"}],\"description\":\"核心业务数据\",\"metrics\":[{\"filters\":[],\"semantic\":\"inventory\"},{\"filters\":[],\"semantic\":\"user\"},{\"filters\":[],\"semantic\":\"order\"},{\"filters\":[],\"semantic\":\"warning\"}],\"title\":\"运营总览\"},\"adminMenus\":[{\"code\":\"book_admin\",\"dataScope\":\"ROLE\",\"name\":\"图书管理\",\"pageCode\":\"book_admin_page\",\"pageType\":\"list\",\"path\":\"/admin/books\",\"requiresLogin\":true,\"tableName\":\"book_info\",\"visibleRoles\":[\"admin\"]},{\"code\":\"reader_admin\",\"dataScope\":\"ROLE\",\"name\":\"读者管理\",\"pageCode\":\"reader_admin_page\",\"pageType\":\"list\",\"path\":\"/admin/readers\",\"requiresLogin\":true,\"tableName\":\"reader\",\"visibleRoles\":[\"admin\"]},{\"code\":\"borrowing_admin\",\"dataScope\":\"ROLE\",\"name\":\"借阅记录管理\",\"pageCode\":\"borrowing_admin_page\",\"pageType\":\"list\",\"path\":\"/admin/borrowings\",\"requiresLogin\":true,\"tableName\":\"borrowing_record\",\"visibleRoles\":[\"admin\"]},{\"code\":\"category_admin\",\"dataScope\":\"ROLE\",\"name\":\"图书分类管理\",\"pageCode\":\"category_admin_page\",\"pageType\":\"list\",\"path\":\"/admin/categories\",\"requiresLogin\":true,\"tableName\":\"book_category\",\"visibleRoles\":[\"admin\"]},{\"code\":\"announcement_admin\",\"dataScope\":\"ROLE\",\"name\":\"公告管理\",\"pageCode\":\"announcement_admin_page\",\"pageType\":\"list\",\"path\":\"/admin/announcements\",\"requiresLogin\":true,\"tableName\":\"announcement\",\"visibleRoles\":[\"admin\"]},{\"code\":\"news_admin\",\"dataScope\":\"ROLE\",\"name\":\"新闻管理\",\"pageCode\":\"news_admin_page\",\"pageType\":\"list\",\"path\":\"/admin/news\",\"requiresLogin\":true,\"tableName\":\"news\",\"visibleRoles\":[\"admin\"]},{\"code\":\"friend_link_admin\",\"dataScope\":\"ROLE\",\"name\":\"友情链接管理\",\"pageCode\":\"friend_link_admin_page\",\"pageType\":\"list\",\"path\":\"/admin/friend-links\",\"requiresLogin\":true,\"tableName\":\"friend_link\",\"visibleRoles\":[\"admin\"]},{\"code\":\"help_admin\",\"dataScope\":\"ROLE\",\"name\":\"帮助中心管理\",\"pageCode\":\"help_admin_page\",\"pageType\":\"list\",\"path\":\"/admin/help\",\"requiresLogin\":true,\"tableName\":\"help_article\",\"visibleRoles\":[\"admin\"]},{\"code\":\"admin_profile\",\"dataScope\":\"ROLE\",\"name\":\"管理员个人资料\",\"pageCode\":\"admin_profile_page\",\"pageType\":\"form\",\"path\":\"/admin/profile\",\"requiresLogin\":true,\"tableName\":\"admin_info\",\"visibleRoles\":[\"admin\"]}],\"frontendMenus\":[{\"code\":\"book_catalog\",\"dataScope\":\"PUBLIC\",\"name\":\"图书目录\",\"pageCode\":\"book_catalog_page\",\"pageType\":\"\",\"path\":\"/books\",\"requiresLogin\":false,\"tableName\":\"\",\"visibleRoles\":[]},{\"code\":\"announcement_list\",\"dataScope\":\"PUBLIC\",\"name\":\"公告栏\",\"pageCode\":\"announcement_list_page\",\"pageType\":\"\",\"path\":\"/announcements\",\"requiresLogin\":false,\"tableName\":\"\",\"visibleRoles\":[]},{\"code\":\"news_list\",\"dataScope\":\"PUBLIC\",\"name\":\"新闻资讯\",\"pageCode\":\"news_list_page\",\"pageType\":\"\",\"path\":\"/news\",\"requiresLogin\":false,\"tableName\":\"\",\"visibleRoles\":[]},{\"code\":\"friend_link_list\",\"dataScope\":\"PUBLIC\",\"name\":\"友情链接\",\"pageCode\":\"friend_link_list_page\",\"pageType\":\"\",\"path\":\"/friend-links\",\"requiresLogin\":false,\"tableName\":\"\",\"visibleRoles\":[]},{\"code\":\"help_center\",\"dataScope\":\"PUBLIC\",\"name\":\"帮助中心\",\"pageCode\":\"help_center_page\",\"pageType\":\"\",\"path\":\"/help\",\"requiresLogin\":false,\"tableName\":\"\",\"visibleRoles\":[]},{\"code\":\"my_borrowing\",\"dataScope\":\"CURRENT_USER\",\"name\":\"我的借阅\",\"pageCode\":\"my_borrowing_page\",\"pageType\":\"\",\"path\":\"/my-borrowing\",\"requiresLogin\":true,\"tableName\":\"\",\"visibleRoles\":[\"reader\"]},{\"code\":\"reader_profile\",\"dataScope\":\"CURRENT_USER\",\"name\":\"个人资料\",\"pageCode\":\"reader_profile_page\",\"pageType\":\"\",\"path\":\"/reader/profile\",\"requiresLogin\":true,\"tableName\":\"\",\"visibleRoles\":[\"reader\"]}],\"frontendPages\":[{\"code\":\"book_catalog_page\",\"menuCode\":\"book_catalog\",\"name\":\"图书目录\",\"pageType\":\"list\",\"parentPageCode\":\"\",\"path\":\"/books\",\"tableName\":\"book_info\"},{\"code\":\"announcement_list_page\",\"menuCode\":\"announcement_list\",\"name\":\"公告栏\",\"pageType\":\"list\",\"parentPageCode\":\"\",\"path\":\"/announcements\",\"tableName\":\"announcement\"},{\"code\":\"news_list_page\",\"menuCode\":\"news_list\",\"name\":\"新闻资讯\",\"pageType\":\"list\",\"parentPageCode\":\"\",\"path\":\"/news\",\"tableName\":\"news\"},{\"code\":\"friend_link_list_page\",\"menuCode\":\"friend_link_list\",\"name\":\"友情链接\",\"pageType\":\"list\",\"parentPageCode\":\"\",\"path\":\"/friend-links\",\"tableName\":\"friend_link\"},{\"code\":\"help_center_page\",\"menuCode\":\"help_center\",\"name\":\"帮助中心\",\"pageType\":\"list\",\"parentPageCode\":\"\",\"path\":\"/help\",\"tableName\":\"help_article\"},{\"code\":\"my_borrowing_page\",\"menuCode\":\"my_borrowing\",\"name\":\"我的借阅\",\"pageType\":\"current_user_list\",\"parentPageCode\":\"\",\"path\":\"/my-borrowing\",\"tableName\":\"borrowing_record\"},{\"code\":\"reader_profile_page\",\"menuCode\":\"reader_profile\",\"name\":\"个人资料\",\"pageType\":\"form\",\"parentPageCode\":\"\",\"path\":\"/reader/profile\",\"tableName\":\"reader\"},{\"code\":\"book_detail_page\",\"menuCode\":\"\",\"name\":\"图书详情\",\"pageType\":\"detail\",\"parentPageCode\":\"\",\"path\":\"/books/:id\",\"tableName\":\"book_info\"},{\"code\":\"borrowing_detail_page\",\"menuCode\":\"\",\"name\":\"借阅详情\",\"pageType\":\"detail\",\"parentPageCode\":\"\",\"path\":\"/my-borrowing/:id\",\"tableName\":\"borrowing_record\"}],\"roles\":[{\"code\":\"admin\",\"description\":\"系统管理员,管理图书、读者、借阅记录等所有业务\",\"name\":\"管理员\"},{\"code\":\"reader\",\"description\":\"注册读者,可查询图书、借阅归还、管理个人信息\",\"name\":\"读者\"}]}}', '{\n \"version\": \"1.0\",\n \"code\": \"borrowing_flow\",\n \"name\": \"借阅记录状态流转\",\n \"mainTable\": \"borrowing_record\",\n \"statusField\": \"status\",\n \"notFoundMessage\": \"借阅记录不存在\",\n \"states\": [\n {\"code\": \"pending_approval\", \"label\": \"待审批\"},\n {\"code\": \"borrowing\", \"label\": \"借出中\"},\n {\"code\": \"waiting_payment\", \"label\": \"待支付逾期费\"},\n {\"code\": \"returned\", \"label\": \"已归还\"},\n {\"code\": \"damaged\", \"label\": \"损坏\"},\n {\"code\": \"lost\", \"label\": \"丢失\"},\n {\"code\": \"cancelled\", \"label\": \"已取消\"},\n {\"code\": \"closed\", \"label\": \"已处理\"}\n ],\n \"actions\": [\n {\n \"code\": \"approve\",\n \"name\": \"确认借阅\",\n \"from\": \"pending_approval\",\n \"to\": \"borrowing\",\n \"actor\": \"admin\",\n \"method\": \"POST\",\n \"path\": \"/borrow-record/approve\",\n \"invalidStateMessage\": \"当前状态不能审核\",\n \"successMessage\": \"借阅确认成功\",\n \"audit\": {\"userField\": \"approve_user_id\", \"timeField\": \"approve_time\"},\n \"effects\": [\n {\n \"type\": \"decrease\",\n \"table\": \"book_info\",\n \"relationField\": \"book_id\",\n \"field\": \"stock\",\n \"amount\": \"1\",\n \"min\": \"0\",\n \"notFoundMessage\": \"图书不存在\",\n \"errorMessage\": \"图书库存不足\"\n }\n ],\n \"button\": {\n \"scope\": \"admin\",\n \"pageCode\": \"borrowing_admin_page\",\n \"slot\": \"list.rowActions\",\n \"type\": \"success\",\n \"confirm\": \"确认通过该借阅请求吗?\",\n \"order\": 10\n }\n },\n {\n \"code\": \"reject\",\n \"name\": \"拒绝借阅\",\n \"from\": \"pending_approval\",\n \"to\": \"cancelled\",\n \"actor\": \"admin\",\n \"method\": \"POST\",\n \"path\": \"/borrow-record/reject\",\n \"invalidStateMessage\": \"当前状态不能拒绝\",\n \"successMessage\": \"已拒绝借阅请求\",\n \"effects\": [],\n \"button\": {\n \"scope\": \"admin\",\n \"pageCode\": \"borrowing_admin_page\",\n \"slot\": \"list.rowActions\",\n \"type\": \"danger\",\n \"confirm\": \"确认拒绝该借阅请求吗?\",\n \"order\": 20\n }\n },\n {\n \"code\": \"cancel\",\n \"name\": \"取消借阅\",\n \"from\": \"pending_approval\",\n \"to\": \"cancelled\",\n \"actor\": \"reader\",\n \"method\": \"POST\",\n \"path\": \"/borrow-record/cancel\",\n \"invalidStateMessage\": \"只能取消待审批的借阅\",\n \"successMessage\": \"借阅请求已取消\",\n \"effects\": [],\n \"button\": {\n \"scope\": \"reader\",\n \"pageCode\": \"my_borrowing_page\",\n \"slot\": \"list.rowActions\",\n \"type\": \"default\",\n \"confirm\": \"确认取消该借阅请求吗?\",\n \"order\": 10\n }\n },\n {\n \"code\": \"return_no_overdue\",\n \"name\": \"归还(无逾期)\",\n \"from\": \"borrowing\",\n \"to\": \"returned\",\n \"actor\": \"admin\",\n \"method\": \"POST\",\n \"path\": \"/borrow-record/return\",\n \"invalidStateMessage\": \"当前记录未在借出中\",\n \"successMessage\": \"归还成功\",\n \"effects\": [\n {\n \"type\": \"increase\",\n \"table\": \"book_info\",\n \"relationField\": \"book_id\",\n \"field\": \"stock\",\n \"amount\": \"1\",\n \"notFoundMessage\": \"图书不存在\",\n \"errorMessage\": \"图书归还失败\"\n }\n ],\n \"button\": {\n \"scope\": \"admin\",\n \"pageCode\": \"borrowing_admin_page\",\n \"slot\": \"list.rowActions\",\n \"type\": \"primary\",\n \"confirm\": \"确认正常归还?\",\n \"order\": 30\n }\n },\n {\n \"code\": \"return_with_overdue\",\n \"name\": \"归还(有逾期)\",\n \"from\": \"borrowing\",\n \"to\": \"waiting_payment\",\n \"actor\": \"admin\",\n \"method\": \"POST\",\n \"path\": \"/borrow-record/return-overdue\",\n \"invalidStateMessage\": \"当前记录未在借出中\",\n \"successMessage\": \"归还成功,请支付逾期费用\",\n \"effects\": [\n {\n \"type\": \"increase\",\n \"table\": \"book_info\",\n \"relationField\": \"book_id\",\n \"field\": \"stock\",\n \"amount\": \"1\",\n \"notFoundMessage\": \"图书不存在\",\n \"errorMessage\": \"图书归还失败\"\n }\n ],\n \"button\": {\n \"scope\": \"admin\",\n \"pageCode\": \"borrowing_admin_page\",\n \"slot\": \"list.rowActions\",\n \"type\": \"warning\",\n \"confirm\": \"该借阅已超期,确认归还并生成逾期费用?\",\n \"order\": 40\n }\n },\n {\n \"code\": \"pay_overdue\",\n \"name\": \"支付逾期费\",\n \"from\": \"waiting_payment\",\n \"to\": \"returned\",\n \"actor\": \"reader\",\n \"method\": \"POST\",\n \"path\": \"/borrow-record/pay-overdue\",\n \"invalidStateMessage\": \"当前记录无需支付逾期费\",\n \"successMessage\": \"逾期费支付成功\",\n \"effects\": [],\n \"button\": {\n \"scope\": \"reader\",\n \"pageCode\": \"my_borrowing_page\",\n \"slot\": \"list.rowActions\",\n \"type\": \"success\",\n \"confirm\": \"确认支付逾期费用?\",\n \"order\": 20\n }\n },\n {\n \"code\": \"mark_damaged\",\n \"name\": \"标记损坏\",\n \"from\": \"borrowing\",\n \"to\": \"damaged\",\n \"actor\": \"admin\",\n \"method\": \"POST\",\n \"path\": \"/borrow-record/mark-damaged\",\n \"invalidStateMessage\": \"当前记录未在借出中\",\n \"successMessage\": \"已标记为损坏\",\n \"effects\": [\n {\n \"type\": \"decrease\",\n \"table\": \"book_info\",\n \"relationField\": \"book_id\",\n \"field\": \"stock\",\n \"amount\": \"1\",\n \"min\": \"0\",\n \"notFoundMessage\": \"图书不存在\",\n \"errorMessage\": \"库存不足\"\n }\n ],\n \"button\": {\n \"scope\": \"admin\",\n \"pageCode\": \"borrowing_admin_page\",\n \"slot\": \"list.rowActions\",\n \"type\": \"danger\",\n \"confirm\": \"确认标记该图书为损坏?\",\n \"order\": 50\n }\n },\n {\n \"code\": \"mark_lost\",\n \"name\": \"标记丢失\",\n \"from\": \"borrowing\",\n \"to\": \"lost\",\n \"actor\": \"admin\",\n \"method\": \"POST\",\n \"path\": \"/borrow-record/mark-lost\",\n \"invalidStateMessage\": \"当前记录未在借出中\",\n \"successMessage\": \"已标记为丢失\",\n \"effects\": [\n {\n \"type\": \"decrease\",\n \"table\": \"book_info\",\n \"relationField\": \"book_id\",\n \"field\": \"stock\",\n \"amount\": \"1\",\n \"min\": \"0\",\n \"notFoundMessage\": \"图书不存在\",\n \"errorMessage\": \"库存不足\"\n }\n ],\n \"button\": {\n \"scope\": \"admin\",\n \"pageCode\": \"borrowing_admin_page\",\n \"slot\": \"list.rowActions\",\n \"type\": \"danger\",\n \"confirm\": \"确认标记该图书为丢失?\",\n \"order\": 60\n }\n },\n {\n \"code\": \"pay_damage_compensation\",\n \"name\": \"支付损坏赔偿\",\n \"from\": \"damaged\",\n \"to\": \"closed\",\n \"actor\": \"reader\",\n \"method\": \"POST\",\n \"path\": \"/borrow-record/pay-damage\",\n \"invalidStateMessage\": \"当前记录未标记为损坏\",\n \"successMessage\": \"赔偿支付成功\",\n \"effects\": [],\n \"button\": {\n \"scope\": \"reader\",\n \"pageCode\": \"my_borrowing_page\",\n \"slot\": \"list.rowActions\",\n \"type\": \"primary\",\n \"confirm\": \"确认支付损坏赔偿?\",\n \"order\": 30\n }\n },\n {\n \"code\": \"pay_lost_compensation\",\n \"name\": \"支付丢失赔偿\",\n \"from\": \"lost\",\n \"to\": \"closed\",\n \"actor\": \"reader\",\n \"method\": \"POST\",\n \"path\": \"/borrow-record/pay-lost\",\n \"invalidStateMessage\": \"当前记录未标记为丢失\",\n \"successMessage\": \"赔偿支付成功\",\n \"effects\": [],\n \"button\": {\n \"scope\": \"reader\",\n \"pageCode\": \"my_borrowing_page\",\n \"slot\": \"list.rowActions\",\n \"type\": \"primary\",\n \"confirm\": \"确认支付丢失赔偿?\",\n \"order\": 40\n }\n },\n {\n \"code\": \"admin_close_damaged\",\n \"name\": \"管理员处理损坏\",\n \"from\": \"damaged\",\n \"to\": \"closed\",\n \"actor\": \"admin\",\n \"method\": \"POST\",\n \"path\": \"/borrow-record/close-damaged\",\n \"invalidStateMessage\": \"当前记录未标记为损坏\",\n \"successMessage\": \"损坏记录已处理\",\n \"effects\": [],\n \"button\": {\n \"scope\": \"admin\",\n \"pageCode\": \"borrowing_admin_page\",\n \"slot\": \"list.rowActions\",\n \"type\": \"primary\",\n \"confirm\": \"确认处理该损坏记录?\",\n \"order\": 70\n }\n },\n {\n \"code\": \"admin_close_lost\",\n \"name\": \"管理员处理丢失\",\n \"from\": \"lost\",\n \"to\": \"closed\",\n \"actor\": \"admin\",\n \"method\": \"POST\",\n \"path\": \"/borrow-record/close-lost\",\n \"invalidStateMessage\": \"当前记录未标记为丢失\",\n \"successMessage\": \"丢失记录已处理\",\n \"effects\": [],\n \"button\": {\n \"scope\": \"admin\",\n \"pageCode\": \"borrowing_admin_page\",\n \"slot\": \"list.rowActions\",\n \"type\": \"primary\",\n \"confirm\": \"确认处理该丢失记录?\",\n \"order\": 80\n }\n }\n ],\n \"metrics\": [\n {\"code\": \"pending_approval_count\", \"name\": \"待审批数量\", \"table\": \"borrowing_record\", \"aggregate\": \"count\", \"field\": \"id\", \"status\": \"pending_approval\", \"unit\": \"条\"},\n {\"code\": \"borrowing_count\", \"name\": \"借出中数量\", \"table\": \"borrowing_record\", \"aggregate\": \"count\", \"field\": \"id\", \"status\": \"borrowing\", \"unit\": \"条\"},\n {\"code\": \"waiting_payment_count\", \"name\": \"待支付逾期费数量\", \"table\": \"borrowing_record\", \"aggregate\": \"count\", \"field\": \"id\", \"status\": \"waiting_payment\", \"unit\": \"条\"},\n {\"code\": \"returned_count\", \"name\": \"已归还数量\", \"table\": \"borrowing_record\", \"aggregate\": \"count\", \"field\": \"id\", \"status\": \"returned\", \"unit\": \"条\"},\n {\"code\": \"damaged_lost_count\", \"name\": \"损坏丢失数量\", \"table\": \"borrowing_record\", \"aggregate\": \"count\", \"field\": \"id\", \"status\": \"damaged\", \"unit\": \"条\"},\n {\"code\": \"lost_count\", \"name\": \"丢失数量\", \"table\": \"borrowing_record\", \"aggregate\": \"count\", \"field\": \"id\", \"status\": \"lost\", \"unit\": \"条\"},\n {\"code\": \"total_borrowings\", \"name\": \"总借阅次数\", \"table\": \"borrowing_record\", \"aggregate\": \"count\", \"field\": \"id\", \"status\": \"\", \"unit\": \"条\"}\n ]\n}', '0', 64998, 2949, NULL, 2949, 6888, 4058, 2949, 6888, 9837, 2, 0.01672500, '1', NULL, '2026-07-14 15:19:21');
INSERT INTO `front_ai_usage_ledger` VALUES (103, 100, 100, 100, 100, 'database', 'deepseek', 'deepseek-v4-flash', 'front.database', 'V1', '14dcad479b01de068e5c5bc39b5cd7a591a09d334ee6812483d8ac00dd8c9d61', '你是 MySQL 业务数据库设计专家。只输出符合用户消息结构的 JSON根据已确认的应用蓝图和业务闭环生成可直接落地的表、字段、主外键、字典和表操作策略。字段必须业务化且类型合法所有蓝图与闭环引用必须有真实表字段承载不得生成菜单、权限关系、代码或业务动作。', '根据项目输入 JSON 生成 MySQL 数据库设计 JSON只返回 JSON不要 Markdown 围栏或解释。\nConfirmed app blueprint JSON and Confirmed business loop plan JSON are supplied in the input.\nDatabase generation constraints from the business loop plan must be enforced.\nEvery confirmedBusinessLoopPlan.metrics tableName, field, and filters.field must exist in the generated schema. Numeric sum/avg/min/max metric fields must use a compatible numeric column type. Status-filter metric values must remain compatible with the matching stateMachines.states.\nIf input.mode is correction, repair input.originalResponse according to input.validationError and return the complete corrected database JSON. Do not drop unrelated valid tables or fields.\n输出结构{\"tables\":[{\"tableName\":\"car_info\",\"tableComment\":\"车辆信息表\",\"adminMenuName\":\"车辆管理\",\"operations\":{\"add\":true,\"edit\":true,\"remove\":true,\"removeType\":\"physical\",\"reason\":\"\"},\"columns\":[{\"columnName\":\"id\",\"columnLabel\":\"ID\",\"columnComment\":\"主键ID\",\"columnType\":\"bigint(20)\",\"isPk\":\"1\",\"isIncrement\":\"1\",\"isRequired\":\"1\"}]}]}。\n不要使用 field_1 等占位字段;每个表必须包含非空 columns以及 adminMenuName 和 operations.add/edit/remove/removeType/reason。\nadminMenuName 必须来自本表 tableComment/tableName不得复用其他表或宽泛模块名称。\nadminMenuName must come from that table\'s own tableComment or tableName.\n字段数组名称只能是 columns不能使用 fields、fieldDesign、fieldList、columnList。\nEvery table must include a non-empty columns array; use columns exactly.\n每个字段必须包含 columnName、columnLabel、columnComment、columnType、isPk、isIncrement、isRequired。columnLabel 是短 UI 标签columnComment 是完整数据库说明。\n可提供 javaType、htmlTypehtmlType 只能是 input、textarea、select、radio、checkbox、datetime、imageUpload、fileUpload、editor。\nselect/radio/checkbox 应提供 dictType 和 dictOptions。关联选择使用 remote:target_table:value_field:label_field且目标表和值/标签字段必须都存在于本次 tables JSON。\n非主键外键字段应在目标表存在时使用 remote select无目标表的分类、类型、状态使用本地 dictOptions 或普通输入。\n普通主数据表除唯一主键外至少包含 4 个业务字段。\n订单、支付、借还、审批、流程、任务、库存记录等动作记录表使用仅新增关系、审计、日志、历史表使用只读普通主数据表使用完整 CRUD。\n不要生成 businessActions、业务动作、工作流、代码、菜单表、user_role、角色权限表或权限表。\nDo not generate menu tables, user_role tables, role-permission tables, or permission tables.\n表名字段名只使用小写字母、数字、下划线每表必须且只能有一个主键。字段类型只能使用 bigint(20)、int(11)、varchar(n)、char(n)、decimal(p,s)、datetime、date、text、longtext。\n为 confirmedAppBlueprint.roles 中每个角色创建独立账号表admin 使用 admin其他角色使用 role.code。不得使用共享用户表或 role_id/role_code/user_role。\n角色账号表包含 `<role_code>_id` 自增主键、username、password_hash、nickname、status、create_time。admin 只能登录后台,非 admin 角色登录前台。\n生成 frontendPages.tableName 引用的全部表;个人资料页必须绑定对应非 admin 角色账号表。requiresLogin=true 且 dataScope=CURRENT_USER 的业务数据通常包含 user_id。\ncanonicalTableRegistry 中的名称是最终规范表名。confirmedBusinessLoopPlan 若出现与其指向同一业务对象的同义表名,必须使用 canonicalTableRegistry 中的名称,不得同时生成两张同义表。\n根据 confirmedBusinessLoopPlan 创建 coreObjects.tableName、actions.ownerTable补齐 stateMachines.statusField、quantityRules.quantityField 以及 recordRules 和动作前置条件需要的字段。状态值不得超出 stateMachines.states。\n严格实现 confirmedBusinessLoopPlan.businessPoliciesTIME_LIMIT 的 startField、dueField 使用 datetimeOVERDUE_FEE 的 dueField 使用 datetime、daysTargetField 使用 int(11)、targetField 使用 decimal(10,2)QUANTITY_LIMIT 的 targetField 使用 int(11) 且默认值为 0。所有政策字段必须位于政策指定的 tableName禁止只把期限或公式写进 columnComment 而不创建字段。\nDo not invent status values outside stateMachines.states.\n严格遵守 input.limits.maxTables 和 maxColumnsPerTable。\n项目输入 JSON\n{\"mode\":\"generate\",\"projectName\":\"图书管理系统\",\"projectDescription\":\"【AI补全需求】\\n业务目标图书管理系统旨在提供图书借阅、归还、查询及读者管理的基础功能支持图书库存管理与借阅期限控制。\\n\\n角色管理员、读者\\n\\n核心对象图书、读者、借阅记录、图书分类\\n\\n核心流程读者在系统内注册账号填写姓名、学号或工号、联系方式等信息管理员审核通过后激活读者账号读者登录系统通过关键词书名、作者、ISBN查询图书系统显示图书的库存数量、可借状态、存放位置读者选择一本可借图书并发起借阅请求系统检测读者当前借阅未还数量是否达到上限若未达到则生成借阅记录扣减库存数量1本借阅状态变为借出开始计借阅时间读者在借阅期限内将图书归还至图书馆管理员扫描图书条码或输入图书ID系统找到对应借阅记录更新归还时间为当前时间归还状态变为已还库存数量加1若读者超期未还系统在归还时自动计算超期天数并生成逾期费用读者需在系统内支付逾期费用后方可完成归还或管理员登记后读者线下支付系统记录支付状态读者可查看本人的借阅历史、当前借阅图书及应还日期管理员可管理图书信息新增、编辑图书基本信息、分类、库存数量、读者信息冻结、解冻、重置密码、查看所有借阅记录管理员可处理图书损坏或丢失标记图书状态为损坏或丢失扣除库存读者需赔偿。\\n\\n业务规则AI假设每位读者最多可借阅5本图书AI假设图书借阅期限为30天起算时间为借阅请求被管理员确认或系统自动确认时刻AI假设逾期费用为每本每天0.5元按天计费不足1天按1天计算Ceil取整单本逾期费用上限为图书定价的1倍AI假设图书定价默认为50元若未录入则使用此默认值每次借阅只能借阅同一本书1本读者账号需激活且未被冻结才能借阅库存数量为0时不可借阅已借出的图书状态为借出不可再次借阅归还时若图书损坏管理员标记损坏等级赔偿金额为图书定价的50%AI假设若图书丢失赔偿金额为图书定价的2倍AI假设系统自动在每晚23:59检查所有借阅记录将当日到期的图书标记为即将逾期状态仅供提醒但逾期计算以实际归还日期为准。\\n\\n异常边界库存不足时读者无法发起借阅请求系统提示该图书已全部借出状态不符时若图书状态为损坏或丢失不可借阅若读者账号被冻结不可借阅若读者当前借阅未还数量已达上限不可借阅重复提交时同一读者对于同一本图书在未归还前不可重复提交借阅请求系统检测已有进行中的借阅记录则拒绝取消时读者可在管理员确认借阅前取消借阅请求取消后库存不扣减借阅一旦确认无法取消超时时读者在借阅期限到期后仍可归还图书但需支付逾期费用重复支付时若读者已支付逾期费用再次支付时系统提示该笔费用已支付避免重复扣款。\\n\\n验收场景读者张三学号2023001当前借阅未还数量为4本查询到图书《数据结构》库存有2本定价50元。张三在2024年1月1日10:00发起借阅请求管理员确认后借阅成功库存变为1本应还日期为2024年1月31日。张三在2024年2月2日14:00归还超期2天1月31日到期2月1日第1天2月2日第2天。逾期费用计算2天×0.5元/天=1元未超过定价50元无需封顶。张三支付1元后归还完成库存恢复为2本。\\n\\n其他模块公告栏、新闻资讯、友情链接、帮助中心\",\"industryTemplate\":\"\",\"stylePreset\":\"dark-tech\",\"extraRequirements\":\"\",\"confirmedAppBlueprint\":{\"adminHomeDashboard\":{\"charts\":[{\"filters\":[],\"metrics\":[],\"semantic\":\"order\",\"title\":\"借阅趋势\",\"type\":\"trend\"},{\"filters\":[],\"metrics\":[],\"semantic\":\"content\",\"title\":\"图书分类分布\",\"type\":\"distribution\"}],\"description\":\"核心业务数据\",\"metrics\":[{\"filters\":[],\"semantic\":\"inventory\"},{\"filters\":[],\"semantic\":\"user\"},{\"filters\":[],\"semantic\":\"order\"},{\"filters\":[],\"semantic\":\"warning\"}],\"title\":\"运营总览\"},\"adminMenus\":[{\"code\":\"book_admin\",\"dataScope\":\"ROLE\",\"name\":\"图书管理\",\"pageCode\":\"book_admin_page\",\"pageType\":\"list\",\"path\":\"/admin/books\",\"requiresLogin\":true,\"tableName\":\"book_info\",\"visibleRoles\":[\"admin\"]},{\"code\":\"reader_admin\",\"dataScope\":\"ROLE\",\"name\":\"读者管理\",\"pageCode\":\"reader_admin_page\",\"pageType\":\"list\",\"path\":\"/admin/readers\",\"requiresLogin\":true,\"tableName\":\"reader\",\"visibleRoles\":[\"admin\"]},{\"code\":\"borrowing_admin\",\"dataScope\":\"ROLE\",\"name\":\"借阅记录管理\",\"pageCode\":\"borrowing_admin_page\",\"pageType\":\"list\",\"path\":\"/admin/borrowings\",\"requiresLogin\":true,\"tableName\":\"borrowing_record\",\"visibleRoles\":[\"admin\"]},{\"code\":\"category_admin\",\"dataScope\":\"ROLE\",\"name\":\"图书分类管理\",\"pageCode\":\"category_admin_page\",\"pageType\":\"list\",\"path\":\"/admin/categories\",\"requiresLogin\":true,\"tableName\":\"book_category\",\"visibleRoles\":[\"admin\"]},{\"code\":\"announcement_admin\",\"dataScope\":\"ROLE\",\"name\":\"公告管理\",\"pageCode\":\"announcement_admin_page\",\"pageType\":\"list\",\"path\":\"/admin/announcements\",\"requiresLogin\":true,\"tableName\":\"announcement\",\"visibleRoles\":[\"admin\"]},{\"code\":\"news_admin\",\"dataScope\":\"ROLE\",\"name\":\"新闻管理\",\"pageCode\":\"news_admin_page\",\"pageType\":\"list\",\"path\":\"/admin/news\",\"requiresLogin\":true,\"tableName\":\"news\",\"visibleRoles\":[\"admin\"]},{\"code\":\"friend_link_admin\",\"dataScope\":\"ROLE\",\"name\":\"友情链接管理\",\"pageCode\":\"friend_link_admin_page\",\"pageType\":\"list\",\"path\":\"/admin/friend-links\",\"requiresLogin\":true,\"tableName\":\"friend_link\",\"visibleRoles\":[\"admin\"]},{\"code\":\"help_admin\",\"dataScope\":\"ROLE\",\"name\":\"帮助中心管理\",\"pageCode\":\"help_admin_page\",\"pageType\":\"list\",\"path\":\"/admin/help\",\"requiresLogin\":true,\"tableName\":\"help_article\",\"visibleRoles\":[\"admin\"]},{\"code\":\"admin_profile\",\"dataScope\":\"ROLE\",\"name\":\"管理员个人资料\",\"pageCode\":\"admin_profile_page\",\"pageType\":\"form\",\"path\":\"/admin/profile\",\"requiresLogin\":true,\"tableName\":\"admin_info\",\"visibleRoles\":[\"admin\"]}],\"frontendMenus\":[{\"code\":\"book_catalog\",\"dataScope\":\"PUBLIC\",\"name\":\"图书目录\",\"pageCode\":\"book_catalog_page\",\"pageType\":\"\",\"path\":\"/books\",\"requiresLogin\":false,\"tableName\":\"\",\"visibleRoles\":[]},{\"code\":\"announcement_list\",\"dataScope\":\"PUBLIC\",\"name\":\"公告栏\",\"pageCode\":\"announcement_list_page\",\"pageType\":\"\",\"path\":\"/announcements\",\"requiresLogin\":false,\"tableName\":\"\",\"visibleRoles\":[]},{\"code\":\"news_list\",\"dataScope\":\"PUBLIC\",\"name\":\"新闻资讯\",\"pageCode\":\"news_list_page\",\"pageType\":\"\",\"path\":\"/news\",\"requiresLogin\":false,\"tableName\":\"\",\"visibleRoles\":[]},{\"code\":\"friend_link_list\",\"dataScope\":\"PUBLIC\",\"name\":\"友情链接\",\"pageCode\":\"friend_link_list_page\",\"pageType\":\"\",\"path\":\"/friend-links\",\"requiresLogin\":false,\"tableName\":\"\",\"visibleRoles\":[]},{\"code\":\"help_center\",\"dataScope\":\"PUBLIC\",\"name\":\"帮助中心\",\"pageCode\":\"help_center_page\",\"pageType\":\"\",\"path\":\"/help\",\"requiresLogin\":false,\"tableName\":\"\",\"visibleRoles\":[]},{\"code\":\"my_borrowing\",\"dataScope\":\"CURRENT_USER\",\"name\":\"我的借阅\",\"pageCode\":\"my_borrowing_page\",\"pageType\":\"\",\"path\":\"/my-borrowing\",\"requiresLogin\":true,\"tableName\":\"\",\"visibleRoles\":[\"reader\"]},{\"code\":\"reader_profile\",\"dataScope\":\"CURRENT_USER\",\"name\":\"个人资料\",\"pageCode\":\"reader_profile_page\",\"pageType\":\"\",\"path\":\"/reader/profile\",\"requiresLogin\":true,\"tableName\":\"\",\"visibleRoles\":[\"reader\"]}],\"frontendPages\":[{\"code\":\"book_catalog_page\",\"menuCode\":\"book_catalog\",\"name\":\"图书目录\",\"pageType\":\"list\",\"parentPageCode\":\"\",\"path\":\"/books\",\"tableName\":\"book_info\"},{\"code\":\"announcement_list_page\",\"menuCode\":\"announcement_list\",\"name\":\"公告栏\",\"pageType\":\"list\",\"parentPageCode\":\"\",\"path\":\"/announcements\",\"tableName\":\"announcement\"},{\"code\":\"news_list_page\",\"menuCode\":\"news_list\",\"name\":\"新闻资讯\",\"pageType\":\"list\",\"parentPageCode\":\"\",\"path\":\"/news\",\"tableName\":\"news\"},{\"code\":\"friend_link_list_page\",\"menuCode\":\"friend_link_list\",\"name\":\"友情链接\",\"pageType\":\"list\",\"parentPageCode\":\"\",\"path\":\"/friend-links\",\"tableName\":\"friend_link\"},{\"code\":\"help_center_page\",\"menuCode\":\"help_center\",\"name\":\"帮助中心\",\"pageType\":\"list\",\"parentPageCode\":\"\",\"path\":\"/help\",\"tableName\":\"help_article\"},{\"code\":\"my_borrowing_page\",\"menuCode\":\"my_borrowing\",\"name\":\"我的借阅\",\"pageType\":\"current_user_list\",\"parentPageCode\":\"\",\"path\":\"/my-borrowing\",\"tableName\":\"borrowing_record\"},{\"code\":\"reader_profile_page\",\"menuCode\":\"reader_profile\",\"name\":\"个人资料\",\"pageType\":\"form\",\"parentPageCode\":\"\",\"path\":\"/reader/profile\",\"tableName\":\"reader\"},{\"code\":\"book_detail_page\",\"menuCode\":\"\",\"name\":\"图书详情\",\"pageType\":\"detail\",\"parentPageCode\":\"\",\"path\":\"/books/:id\",\"tableName\":\"book_info\"},{\"code\":\"borrowing_detail_page\",\"menuCode\":\"\",\"name\":\"借阅详情\",\"pageType\":\"detail\",\"parentPageCode\":\"\",\"path\":\"/my-borrowing/:id\",\"tableName\":\"borrowing_record\"}],\"roles\":[{\"code\":\"admin\",\"description\":\"系统管理员,管理图书、读者、借阅记录等所有业务\",\"name\":\"管理员\"},{\"code\":\"reader\",\"description\":\"注册读者,可查询图书、借阅归还、管理个人信息\",\"name\":\"读者\"}]},\"flowConfig\":{\"actions\":[{\"actor\":\"admin\",\"audit\":{\"timeField\":\"approve_time\",\"userField\":\"approve_user_id\"},\"button\":{\"confirm\":\"确认通过该借阅请求吗?\",\"order\":10,\"pageCode\":\"borrowing_admin_page\",\"scope\":\"admin\",\"slot\":\"list.rowActions\",\"type\":\"success\"},\"code\":\"approve\",\"effects\":[{\"amount\":\"1\",\"errorMessage\":\"图书库存不足\",\"field\":\"stock\",\"min\":\"0\",\"notFoundMessage\":\"图书不存在\",\"relationField\":\"book_id\",\"table\":\"book_info\",\"type\":\"decrease\",\"values\":{}}],\"from\":\"pending_approval\",\"invalidStateMessage\":\"当前状态不能审核\",\"method\":\"POST\",\"name\":\"确认借阅\",\"path\":\"/borrow-record/approve\",\"successMessage\":\"借阅确认成功\",\"to\":\"borrowing\"},{\"actor\":\"admin\",\"button\":{\"confirm\":\"确认拒绝该借阅请求吗?\",\"order\":20,\"pageCode\":\"borrowing_admin_page\",\"scope\":\"admin\",\"slot\":\"list.rowActions\",\"type\":\"danger\"},\"code\":\"reject\",\"effects\":[],\"from\":\"pending_approval\",\"invalidStateMessage\":\"当前状态不能拒绝\",\"method\":\"POST\",\"name\":\"拒绝借阅\",\"path\":\"/borrow-record/reject\",\"successMessage\":\"已拒绝借阅请求\",\"to\":\"cancelled\"},{\"actor\":\"reader\",\"button\":{\"confirm\":\"确认取消该借阅请求吗?\",\"order\":10,\"pageCode\":\"my_borrowing_page\",\"scope\":\"reader\",\"slot\":\"list.rowActions\",\"type\":\"default\"},\"code\":\"cancel\",\"effects\":[],\"from\":\"pending_approval\",\"invalidStateMessage\":\"只能取消待审批的借阅\",\"method\":\"POST\",\"name\":\"取消借阅\",\"path\":\"/borrow-record/cancel\",\"successMessage\":\"借阅请求已取消\",\"to\":\"cancelled\"},{\"actor\":\"admin\",\"button\":{\"confirm\":\"确认正常归还?\",\"order\":30,\"pageCode\":\"borrowing_admin_page\",\"scope\":\"admin\",\"slot\":\"list.rowActions\",\"type\":\"primary\"},\"code\":\"return_no_overdue\",\"effects\":[{\"amount\":\"1\",\"errorMessage\":\"图书归还失败\",\"field\":\"stock\",\"min\":\"0\",\"notFoundMessage\":\"图书不存在\",\"relationField\":\"book_id\",\"table\":\"book_info\",\"type\":\"increase\",\"values\":{}}],\"from\":\"borrowing\",\"invalidStateMessage\":\"当前记录未在借出中\",\"method\":\"POST\",\"name\":\"归还(无逾期)\",\"path\":\"/borrow-record/return\",\"successMessage\":\"归还成功\",\"to\":\"returned\"},{\"actor\":\"admin\",\"button\":{\"confirm\":\"该借阅已超期,确认归还并生成逾期费用?\",\"order\":40,\"pageCode\":\"borrowing_admin_page\",\"scope\":\"admin\",\"slot\":\"list.rowActions\",\"type\":\"warning\"},\"code\":\"return_with_overdue\",\"effects\":[{\"amount\":\"1\",\"errorMessage\":\"图书归还失败\",\"field\":\"stock\",\"min\":\"0\",\"notFoundMessage\":\"图书不存在\",\"relationField\":\"book_id\",\"table\":\"book_info\",\"type\":\"increase\",\"values\":{}}],\"from\":\"borrowing\",\"invalidStateMessage\":\"当前记录未在借出中\",\"method\":\"POST\",\"name\":\"归还(有逾期)\",\"path\":\"/borrow-record/return-overdue\",\"successMessage\":\"归还成功,请支付逾期费用\",\"to\":\"waiting_payment\"},{\"actor\":\"reader\",\"button\":{\"confirm\":\"确认支付逾期费用?\",\"order\":20,\"pageCode\":\"my_borrowing_page\",\"scope\":\"reader\",\"slot\":\"list.rowActions\",\"type\":\"success\"},\"code\":\"pay_overdue\",\"effects\":[],\"from\":\"waiting_payment\",\"invalidStateMessage\":\"当前记录无需支付逾期费\",\"method\":\"POST\",\"name\":\"支付逾期费\",\"path\":\"/borrow-record/pay-overdue\",\"successMessage\":\"逾期费支付成功\",\"to\":\"returned\"},{\"actor\":\"admin\",\"button\":{\"confirm\":\"确认标记该图书为损坏?\",\"order\":50,\"pageCode\":\"borrowing_admin_page\",\"scope\":\"admin\",\"slot\":\"list.rowActions\",\"type\":\"danger\"},\"code\":\"mark_damaged\",\"effects\":[{\"amount\":\"1\",\"errorMessage\":\"库存不足\",\"field\":\"stock\",\"min\":\"0\",\"notFoundMessage\":\"图书不存在\",\"relationField\":\"book_id\",\"table\":\"book_info\",\"type\":\"decrease\",\"values\":{}}],\"from\":\"borrowing\",\"invalidStateMessage\":\"当前记录未在借出中\",\"method\":\"POST\",\"name\":\"标记损坏\",\"path\":\"/borrow-record/mark-damaged\",\"successMessage\":\"已标记为损坏\",\"to\":\"damaged\"},{\"actor\":\"admin\",\"button\":{\"confirm\":\"确认标记该图书为丢失?\",\"order\":60,\"pageCode\":\"borrowing_admin_page\",\"scope\":\"admin\",\"slot\":\"list.rowActions\",\"type\":\"danger\"},\"code\":\"mark_lost\",\"effects\":[{\"amount\":\"1\",\"errorMessage\":\"库存不足\",\"field\":\"stock\",\"min\":\"0\",\"notFoundMessage\":\"图书不存在\",\"relationField\":\"book_id\",\"table\":\"book_info\",\"type\":\"decrease\",\"values\":{}}],\"from\":\"borrowing\",\"invalidStateMessage\":\"当前记录未在借出中\",\"method\":\"POST\",\"name\":\"标记丢失\",\"path\":\"/borrow-record/mark-lost\",\"successMessage\":\"已标记为丢失\",\"to\":\"lost\"},{\"actor\":\"reader\",\"button\":{\"confirm\":\"确认支付损坏赔偿?\",\"order\":30,\"pageCode\":\"my_borrowing_page\",\"scope\":\"reader\",\"slot\":\"list.rowActions\",\"type\":\"primary\"},\"code\":\"pay_damage_compensation\",\"effects\":[],\"from\":\"damaged\",\"invalidStateMessage\":\"当前记录未标记为损坏\",\"method\":\"POST\",\"name\":\"支付损坏赔偿\",\"path\":\"/borrow-record/pay-damage\",\"successMessage\":\"赔偿支付成功\",\"to\":\"closed\"},{\"actor\":\"reader\",\"button\":{\"confirm\":\"确认支付丢失赔偿?\",\"order\":40,\"pageCode\":\"my_borrowing_page\",\"scope\":\"reader\",\"slot\":\"list.rowActions\",\"type\":\"primary\"},\"code\":\"pay_lost_compensation\",\"effects\":[],\"from\":\"lost\",\"invalidStateMessage\":\"当前记录未标记为丢失\",\"method\":\"POST\",\"name\":\"支付丢失赔偿\",\"path\":\"/borrow-record/pay-lost\",\"successMessage\":\"赔偿支付成功\",\"to\":\"closed\"},{\"actor\":\"admin\",\"button\":{\"confirm\":\"确认处理该损坏记录?\",\"order\":70,\"pageCode\":\"borrowing_admin_page\",\"scope\":\"admin\",\"slot\":\"list.rowActions\",\"type\":\"primary\"},\"code\":\"admin_close_damaged\",\"effects\":[],\"from\":\"damaged\",\"invalidStateMessage\":\"当前记录未标记为损坏\",\"method\":\"POST\",\"name\":\"管理员处理损坏\",\"path\":\"/borrow-record/close-damaged\",\"successMessage\":\"损坏记录已处理\",\"to\":\"closed\"},{\"actor\":\"admin\",\"button\":{\"confirm\":\"确认处理该丢失记录?\",\"order\":80,\"pageCode\":\"borrowing_admin_page\",\"scope\":\"admin\",\"slot\":\"list.rowActions\",\"type\":\"primary\"},\"code\":\"admin_close_lost\",\"effects\":[],\"from\":\"lost\",\"invalidStateMessage\":\"当前记录未标记为丢失\",\"method\":\"POST\",\"name\":\"管理员处理丢失\",\"path\":\"/borrow-record/close-lost\",\"successMessage\":\"丢失记录已处理\",\"to\":\"closed\"}],\"code\":\"borrowing_flow\",\"mainTable\":\"borrowing_record\",\"metrics\":[{\"aggregate\":\"count\",\"code\":\"pending_approval_count\",\"field\":\"id\",\"name\":\"待审批数量\",\"status\":\"pending_approval\",\"table\":\"borrowing_record\",\"unit\":\"条\"},{\"aggregate\":\"count\",\"code\":\"borrowing_count\",\"field\":\"id\",\"name\":\"借出中数量\",\"status\":\"borrowing\",\"table\":\"borrowing_record\",\"unit\":\"条\"},{\"aggregate\":\"count\",\"code\":\"waiting_payment_count\",\"field\":\"id\",\"name\":\"待支付逾期费数量\",\"status\":\"waiting_payment\",\"table\":\"borrowing_record\",\"unit\":\"条\"},{\"aggregate\":\"count\",\"code\":\"returned_count\",\"field\":\"id\",\"name\":\"已归还数量\",\"status\":\"returned\",\"table\":\"borrowing_record\",\"unit\":\"条\"},{\"aggregate\":\"count\",\"code\":\"damaged_lost_count\",\"field\":\"id\",\"name\":\"损坏丢失数量\",\"status\":\"damaged\",\"table\":\"borrowing_record\",\"unit\":\"条\"},{\"aggregate\":\"count\",\"code\":\"lost_count\",\"field\":\"id\",\"name\":\"丢失数量\",\"status\":\"lost\",\"table\":\"borrowing_record\",\"unit\":\"条\"},{\"aggregate\":\"count\",\"code\":\"total_borrowings\",\"field\":\"id\",\"name\":\"总借阅次数\",\"status\":\"\",\"table\":\"borrowing_record\",\"unit\":\"条\"}],\"name\":\"借阅记录状态流转\",\"notFoundMessage\":\"借阅记录不存在\",\"states\":[{\"code\":\"pending_approval\",\"label\":\"待审批\"},{\"code\":\"borrowing\",\"label\":\"借出中\"},{\"code\":\"waiting_payment\",\"label\":\"待支付逾期费\"},{\"code\":\"returned\",\"label\":\"已归还\"},{\"code\":\"damaged\",\"label\":\"损坏\"},{\"code\":\"lost\",\"label\":\"丢失\"},{\"code\":\"cancelled\",\"label\":\"已取消\"},{\"code\":\"closed\",\"label\":\"已处理\"}],\"statusField\":\"status\",\"version\":\"1.0\"},\"compiledFlowContract\":{\"acceptanceScenarios\":[],\"actions\":[{\"actor\":\"admin\",\"code\":\"approve\",\"name\":\"确认借阅\",\"ownerObject\":\"borrowing_record\",\"ownerTable\":\"borrowing_record\",\"preconditions\":[],\"quantityEffects\":[{\"actionCode\":\"approve\",\"amount\":\"1\",\"effectType\":\"decrease\",\"objectCode\":\"book_info\",\"quantityField\":\"stock\",\"tableName\":\"book_info\"}],\"recordEffects\":[],\"required\":true,\"stateTransitions\":[{\"actionCode\":\"approve\",\"fromState\":\"pending_approval\",\"toState\":\"borrowing\"}]},{\"actor\":\"admin\",\"code\":\"reject\",\"name\":\"拒绝借阅\",\"ownerObject\":\"borrowing_record\",\"ownerTable\":\"borrowing_record\",\"preconditions\":[],\"quantityEffects\":[],\"recordEffects\":[],\"required\":true,\"stateTransitions\":[{\"actionCode\":\"reject\",\"fromState\":\"pending_approval\",\"toState\":\"cancelled\"}]},{\"actor\":\"reader\",\"code\":\"cancel\",\"name\":\"取消借阅\",\"ownerObject\":\"borrowing_record\",\"ownerTable\":\"borrowing_record\",\"preconditions\":[],\"quantityEffects\":[],\"recordEffects\":[],\"required\":true,\"stateTransitions\":[{\"actionCode\":\"cancel\",\"fromState\":\"pending_approval\",\"toState\":\"cancelled\"}]},{\"actor\":\"admin\",\"code\":\"return_no_overdue\",\"name\":\"归还(无逾期)\",\"ownerObject\":\"borrowing_record\",\"ownerTable\":\"borrowing_record\",\"preconditions\":[],\"quantityEffects\":[{\"actionCode\":\"return_no_overdue\",\"amount\":\"1\",\"effectType\":\"increase\",\"objectCode\":\"book_info\",\"quantityField\":\"stock\",\"tableName\":\"book_info\"}],\"recordEffects\":[],\"required\":true,\"stateTransitions\":[{\"actionCode\":\"return_no_overdue\",\"fromState\":\"borrowing\",\"toState\":\"returned\"}]},{\"actor\":\"admin\",\"code\":\"return_with_overdue\",\"name\":\"归还(有逾期)\",\"ownerObject\":\"borrowing_record\",\"ownerTable\":\"borrowing_record\",\"preconditions\":[],\"quantityEffects\":[{\"actionCode\":\"return_with_overdue\",\"amount\":\"1\",\"effectType\":\"increase\",\"objectCode\":\"book_info\",\"quantityField\":\"stock\",\"tableName\":\"book_info\"}],\"recordEffects\":[],\"required\":true,\"stateTransitions\":[{\"actionCode\":\"return_with_overdue\",\"fromState\":\"borrowing\",\"toState\":\"waiting_payment\"}]},{\"actor\":\"reader\",\"code\":\"pay_overdue\",\"name\":\"支付逾期费\",\"ownerObject\":\"borrowing_record\",\"ownerTable\":\"borrowing_record\",\"preconditions\":[],\"quantityEffects\":[],\"recordEffects\":[],\"required\":true,\"stateTransitions\":[{\"actionCode\":\"pay_overdue\",\"fromState\":\"waiting_payment\",\"toState\":\"returned\"}]},{\"actor\":\"admin\",\"code\":\"mark_damaged\",\"name\":\"标记损坏\",\"ownerObject\":\"borrowing_record\",\"ownerTable\":\"borrowing_record\",\"preconditions\":[],\"quantityEffects\":[{\"actionCode\":\"mark_damaged\",\"amount\":\"1\",\"effectType\":\"decrease\",\"objectCode\":\"book_info\",\"quantityField\":\"stock\",\"tableName\":\"book_info\"}],\"recordEffects\":[],\"required\":true,\"stateTransitions\":[{\"actionCode\":\"mark_damaged\",\"fromState\":\"borrowing\",\"toState\":\"damaged\"}]},{\"actor\":\"admin\",\"code\":\"mark_lost\",\"name\":\"标记丢失\",\"ownerObject\":\"borrowing_record\",\"ownerTable\":\"borrowing_record\",\"preconditions\":[],\"quantityEffects\":[{\"actionCode\":\"mark_lost\",\"amount\":\"1\",\"effectType\":\"decrease\",\"objectCode\":\"book_info\",\"quantityField\":\"stock\",\"tableName\":\"book_info\"}],\"recordEffects\":[],\"required\":true,\"stateTransitions\":[{\"actionCode\":\"mark_lost\",\"fromState\":\"borrowing\",\"toState\":\"lost\"}]},{\"actor\":\"reader\",\"code\":\"pay_damage_compensation\",\"name\":\"支付损坏赔偿\",\"ownerObject\":\"borrowing_record\",\"ownerTable\":\"borrowing_record\",\"preconditions\":[],\"quantityEffects\":[],\"recordEffects\":[],\"required\":true,\"stateTransitions\":[{\"actionCode\":\"pay_damage_compensation\",\"fromState\":\"damaged\",\"toState\":\"closed\"}]},{\"actor\":\"reader\",\"code\":\"pay_lost_compensation\",\"name\":\"支付丢失赔偿\",\"ownerObject\":\"borrowing_record\",\"ownerTable\":\"borrowing_record\",\"preconditions\":[],\"quantityEffects\":[],\"recordEffects\":[],\"required\":true,\"stateTransitions\":[{\"actionCode\":\"pay_lost_compensation\",\"fromState\":\"lost\",\"toState\":\"closed\"}]},{\"actor\":\"admin\",\"code\":\"admin_close_damaged\",\"name\":\"管理员处理损坏\",\"ownerObject\":\"borrowing_record\",\"ownerTable\":\"borrowing_record\",\"preconditions\":[],\"quantityEffects\":[],\"recordEffects\":[],\"required\":true,\"stateTransitions\":[{\"actionCode\":\"admin_close_damaged\",\"fromState\":\"damaged\",\"toState\":\"closed\"}]},{\"actor\":\"admin\",\"code\":\"admin_close_lost\",\"name\":\"管理员处理丢失\",\"ownerObject\":\"borrowing_record\",\"ownerTable\":\"borrowing_record\",\"preconditions\":[],\"quantityEffects\":[],\"recordEffects\":[],\"required\":true,\"stateTransitions\":[{\"actionCode\":\"admin_close_lost\",\"fromState\":\"lost\",\"toState\":\"closed\"}]}],\"businessPolicies\":[],\"coreObjects\":[{\"code\":\"borrowing_record\",\"name\":\"借阅记录状态流转\",\"objectType\":\"main\",\"tableName\":\"borrowing_record\"},{\"code\":\"book_info\",\"name\":\"book_info\",\"objectType\":\"related\",\"tableName\":\"book_info\"}],\"domainName\":\"借阅记录状态流转\",\"metrics\":[{\"aggregate\":\"count\",\"code\":\"pending_approval_count\",\"field\":\"id\",\"filters\":[{\"field\":\"status\",\"operator\":\"eq\",\"values\":[\"pending_approval\"]}],\"name\":\"待审批数量\",\"relatedActionCodes\":[],\"required\":true,\"tableName\":\"borrowing_record\",\"unit\":\"条\"},{\"aggregate\":\"count\",\"code\":\"borrowing_count\",\"field\":\"id\",\"filters\":[{\"field\":\"status\",\"operator\":\"eq\",\"values\":[\"borrowing\"]}],\"name\":\"借出中数量\",\"relatedActionCodes\":[],\"required\":true,\"tableName\":\"borrowing_record\",\"unit\":\"条\"},{\"aggregate\":\"count\",\"code\":\"waiting_payment_count\",\"field\":\"id\",\"filters\":[{\"field\":\"status\",\"operator\":\"eq\",\"values\":[\"waiting_payment\"]}],\"name\":\"待支付逾期费数量\",\"relatedActionCodes\":[],\"required\":true,\"tableName\":\"borrowing_record\",\"unit\":\"条\"},{\"aggregate\":\"count\",\"code\":\"returned_count\",\"field\":\"id\",\"filters\":[{\"field\":\"status\",\"operator\":\"eq\",\"values\":[\"returned\"]}],\"name\":\"已归还数量\",\"relatedActionCodes\":[],\"required\":true,\"tableName\":\"borrowing_record\",\"unit\":\"条\"},{\"aggregate\":\"count\",\"code\":\"damaged_lost_count\",\"field\":\"id\",\"filters\":[{\"field\":\"status\",\"operator\":\"eq\",\"values\":[\"damaged\"]}],\"name\":\"损坏丢失数量\",\"relatedActionCodes\":[],\"required\":true,\"tableName\":\"borrowing_record\",\"unit\":\"条\"},{\"aggregate\":\"count\",\"code\":\"lost_count\",\"field\":\"id\",\"filters\":[{\"field\":\"status\",\"operator\":\"eq\",\"values\":[\"lost\"]}],\"name\":\"丢失数量\",\"relatedActionCodes\":[],\"required\":true,\"tableName\":\"borrowing_record\",\"unit\":\"条\"},{\"aggregate\":\"count\",\"code\":\"total_borrowings\",\"field\":\"id\",\"filters\":[],\"name\":\"总借阅次数\",\"relatedActionCodes\":[],\"required\":true,\"tableName\":\"borrowing_record\",\"unit\":\"条\"}],\"pageBindings\":[{\"actionCode\":\"approve\",\"pageCode\":\"borrowing_admin_page\",\"slot\":\"list.rowActions\",\"tableName\":\"borrowing_record\",\"target\":\"admin\"},{\"actionCode\":\"reject\",\"pageCode\":\"borrowing_admin_page\",\"slot\":\"list.rowActions\",\"tableName\":\"borrowing_record\",\"target\":\"admin\"},{\"actionCode\":\"cancel\",\"pageCode\":\"my_borrowing_page\",\"slot\":\"list.rowActions\",\"tableName\":\"borrowing_record\",\"target\":\"reader\"},{\"actionCode\":\"return_no_overdue\",\"pageCode\":\"borrowing_admin_page\",\"slot\":\"list.rowActions\",\"tableName\":\"borrowing_record\",\"target\":\"admin\"},{\"actionCode\":\"return_with_overdue\",\"pageCode\":\"borrowing_admin_page\",\"slot\":\"list.rowActions\",\"tableName\":\"borrowing_record\",\"target\":\"admin\"},{\"actionCode\":\"pay_overdue\",\"pageCode\":\"my_borrowing_page\",\"slot\":\"list.rowActions\",\"tableName\":\"borrowing_record\",\"target\":\"reader\"},{\"actionCode\":\"mark_damaged\",\"pageCode\":\"borrowing_admin_page\",\"slot\":\"list.rowActions\",\"tableName\":\"borrowing_record\",\"target\":\"admin\"},{\"actionCode\":\"mark_lost\",\"pageCode\":\"borrowing_admin_page\",\"slot\":\"list.rowActions\",\"tableName\":\"borrowing_record\",\"target\":\"admin\"},{\"actionCode\":\"pay_damage_compensation\",\"pageCode\":\"my_borrowing_page\",\"slot\":\"list.rowActions\",\"tableName\":\"borrowing_record\",\"target\":\"reader\"},{\"actionCode\":\"pay_lost_compensation\",\"pageCode\":\"my_borrowing_page\",\"slot\":\"list.rowActions\",\"tableName\":\"borrowing_record\",\"target\":\"reader\"},{\"actionCode\":\"admin_close_damaged\",\"pageCode\":\"borrowing_admin_page\",\"slot\":\"list.rowActions\",\"tableName\":\"borrowing_record\",\"target\":\"admin\"},{\"actionCode\":\"admin_close_lost\",\"pageCode\":\"borrowing_admin_page\",\"slot\":\"list.rowActions\",\"tableName\":\"borrowing_record\",\"target\":\"admin\"}],\"quantityRules\":[{\"actionCode\":\"approve\",\"amount\":\"1\",\"effectType\":\"decrease\",\"objectCode\":\"book_info\",\"quantityField\":\"stock\",\"tableName\":\"book_info\"},{\"actionCode\":\"return_no_overdue\",\"amount\":\"1\",\"effectType\":\"increase\",\"objectCode\":\"book_info\",\"quantityField\":\"stock\",\"tableName\":\"book_info\"},{\"actionCode\":\"return_with_overdue\",\"amount\":\"1\",\"effectType\":\"increase\",\"objectCode\":\"book_info\",\"quantityField\":\"stock\",\"tableName\":\"book_info\"},{\"actionCode\":\"mark_damaged\",\"amount\":\"1\",\"effectType\":\"decrease\",\"objectCode\":\"book_info\",\"quantityField\":\"stock\",\"tableName\":\"book_info\"},{\"actionCode\":\"mark_lost\",\"amount\":\"1\",\"effectType\":\"decrease\",\"objectCode\":\"book_info\",\"quantityField\":\"stock\",\"tableName\":\"book_info\"}],\"recordRules\":[],\"stateMachines\":[{\"objectCode\":\"borrowing_record\",\"states\":[\"pending_approval\",\"borrowing\",\"waiting_payment\",\"returned\",\"damaged\",\"lost\",\"cancelled\",\"closed\"],\"statusField\":\"status\",\"tableName\":\"borrowing_record\",\"transitions\":[{\"actionCode\":\"approve\",\"fromState\":\"pending_approval\",\"toState\":\"borrowing\"},{\"actionCode\":\"reject\",\"fromState\":\"pending_approval\",\"toState\":\"cancelled\"},{\"actionCode\":\"cancel\",\"fromState\":\"pending_approval\",\"toState\":\"cancelled\"},{\"actionCode\":\"return_no_overdue\",\"fromState\":\"borrowing\",\"toState\":\"returned\"},{\"actionCode\":\"return_with_overdue\",\"fromState\":\"borrowing\",\"toState\":\"waiting_payment\"},{\"actionCode\":\"pay_overdue\",\"fromState\":\"waiting_payment\",\"toState\":\"returned\"},{\"actionCode\":\"mark_damaged\",\"fromState\":\"borrowing\",\"toState\":\"damaged\"},{\"actionCode\":\"mark_lost\",\"fromState\":\"borrowing\",\"toState\":\"lost\"},{\"actionCode\":\"pay_damage_compensation\",\"fromState\":\"damaged\",\"toState\":\"closed\"},{\"actionCode\":\"pay_lost_compensation\",\"fromState\":\"lost\",\"toState\":\"closed\"},{\"actionCode\":\"admin_close_damaged\",\"fromState\":\"damaged\",\"toState\":\"closed\"},{\"actionCode\":\"admin_close_lost\",\"fromState\":\"lost\",\"toState\":\"closed\"}]}]},\"canonicalTableRegistry\":[\"book_info\",\"announcement\",\"news\",\"friend_link\",\"help_article\",\"borrowing_record\",\"reader\",\"book_category\",\"admin_info\"],\"limits\":{\"maxTables\":12,\"maxColumnsPerTable\":30}}', '{\n \"tables\": [\n {\n \"tableName\": \"book_category\",\n \"tableComment\": \"图书分类表\",\n \"adminMenuName\": \"图书分类管理\",\n \"operations\": {\n \"add\": true,\n \"edit\": true,\n \"remove\": true,\n \"removeType\": \"physical\",\n \"reason\": \"\"\n },\n \"columns\": [\n {\n \"columnName\": \"id\",\n \"columnLabel\": \"ID\",\n \"columnComment\": \"主键ID\",\n \"columnType\": \"bigint(20)\",\n \"isPk\": \"1\",\n \"isIncrement\": \"1\",\n \"isRequired\": \"1\"\n },\n {\n \"columnName\": \"name\",\n \"columnLabel\": \"分类名称\",\n \"columnComment\": \"分类名称\",\n \"columnType\": \"varchar(100)\",\n \"isPk\": \"0\",\n \"isIncrement\": \"0\",\n \"isRequired\": \"1\",\n \"javaType\": \"String\",\n \"htmlType\": \"input\"\n },\n {\n \"columnName\": \"description\",\n \"columnLabel\": \"描述\",\n \"columnComment\": \"分类描述\",\n \"columnType\": \"varchar(255)\",\n \"isPk\": \"0\",\n \"isIncrement\": \"0\",\n \"isRequired\": \"0\",\n \"javaType\": \"String\",\n \"htmlType\": \"textarea\"\n },\n {\n \"columnName\": \"sort_order\",\n \"columnLabel\": \"排序\",\n \"columnComment\": \"排序序号\",\n \"columnType\": \"int(11)\",\n \"isPk\": \"0\",\n \"isIncrement\": \"0\",\n \"isRequired\": \"0\",\n \"javaType\": \"Integer\",\n \"htmlType\": \"input\"\n },\n {\n \"columnName\": \"status\",\n \"columnLabel\": \"状态\",\n \"columnComment\": \"启用状态(1启用,0禁用)\",\n \"columnType\": \"char(1)\",\n \"isPk\": \"0\",\n \"isIncrement\": \"0\",\n \"isRequired\": \"1\",\n \"javaType\": \"String\",\n \"htmlType\": \"select\",\n \"dictOptions\": [\n {\n \"label\": \"启用\",\n \"value\": \"1\"\n },\n {\n \"label\": \"禁用\",\n \"value\": \"0\"\n }\n ]\n },\n {\n \"columnName\": \"create_time\",\n \"columnLabel\": \"创建时间\",\n \"columnComment\": \"创建时间\",\n \"columnType\": \"datetime\",\n \"isPk\": \"0\",\n \"isIncrement\": \"0\",\n \"isRequired\": \"0\",\n \"javaType\": \"Date\",\n \"htmlType\": \"datetime\"\n },\n {\n \"columnName\": \"update_time\",\n \"columnLabel\": \"更新时间\",\n \"columnComment\": \"更新时间\",\n \"columnType\": \"datetime\",\n \"isPk\": \"0\",\n \"isIncrement\": \"0\",\n \"isRequired\": \"0\",\n \"javaType\": \"Date\",\n \"htmlType\": \"datetime\"\n }\n ]\n },\n {\n \"tableName\": \"book_info\",\n \"tableComment\": \"图书信息表\",\n \"adminMenuName\": \"图书管理\",\n \"operations\": {\n \"add\": true,\n \"edit\": true,\n \"remove\": true,\n \"removeType\": \"physical\",\n \"reason\": \"\"\n },\n \"columns\": [\n {\n \"columnName\": \"id\",\n \"columnLabel\": \"ID\",\n \"columnComment\": \"主键ID\",\n \"columnType\": \"bigint(20)\",\n \"isPk\": \"1\",\n \"isIncrement\": \"1\",\n \"isRequired\": \"1\"\n },\n {\n \"columnName\": \"category_id\",\n \"columnLabel\": \"分类\",\n \"columnComment\": \"所属分类ID\",\n \"columnType\": \"bigint(20)\",\n \"isPk\": \"0\",\n \"isIncrement\": \"0\",\n \"isRequired\": \"1\",\n \"javaType\": \"Long\",\n \"htmlType\": \"select\",\n \"dictType\": \"remote:book_category:id:name\"\n },\n {\n \"columnName\": \"title\",\n \"columnLabel\": \"书名\",\n \"columnComment\": \"图书名称\",\n \"columnType\": \"varchar(200)\",\n \"isPk\": \"0\",\n \"isIncrement\": \"0\",\n \"isRequired\": \"1\",\n \"javaType\": \"String\",\n \"htmlType\": \"input\"\n },\n {\n \"columnName\": \"author\",\n \"columnLabel\": \"作者\",\n \"columnComment\": \"图书作者\",\n \"columnType\": \"varchar(100)\",\n \"isPk\": \"0\",\n \"isIncrement\": \"0\",\n \"isRequired\": \"1\",\n \"javaType\": \"String\",\n \"htmlType\": \"input\"\n },\n {\n \"columnName\": \"isbn\",\n \"columnLabel\": \"ISBN\",\n \"columnComment\": \"国际标准书号\",\n \"columnType\": \"varchar(20)\",\n \"isPk\": \"0\",\n \"isIncrement\": \"0\",\n \"isRequired\": \"0\",\n \"javaType\": \"String\",\n \"htmlType\": \"input\"\n },\n {\n \"columnName\": \"publisher\",\n \"columnLabel\": \"出版社\",\n \"columnComment\": \"出版社名称\",\n \"columnType\": \"varchar(100)\",\n \"isPk\": \"0\",\n \"isIncrement\": \"0\",\n \"isRequired\": \"0\",\n \"javaType\": \"String\",\n \"htmlType\": \"input\"\n },\n {\n \"columnName\": \"publish_date\",\n \"columnLabel\": \"出版日期\",\n \"columnComment\": \"出版日期\",\n \"columnType\": \"date\",\n \"isPk\": \"0\",\n \"isIncrement\": \"0\",\n \"isRequired\": \"0\",\n \"javaType\": \"Date\",\n \"htmlType\": \"date\"\n },\n {\n \"columnName\": \"price\",\n \"columnLabel\": \"定价\",\n \"columnComment\": \"图书定价(元)\",\n \"columnType\": \"decimal(10,2)\",\n \"isPk\": \"0\",\n \"isIncrement\": \"0\",\n \"isRequired\": \"1\",\n \"javaType\": \"BigDecimal\",\n \"htmlType\": \"input\"\n },\n {\n \"columnName\": \"stock\",\n \"columnLabel\": \"库存数量\",\n \"columnComment\": \"当前可借库存\",\n \"columnType\": \"int(11)\",\n \"isPk\": \"0\",\n \"isIncrement\": \"0\",\n \"isRequired\": \"1\",\n \"javaType\": \"Integer\",\n \"htmlType\": \"input\"\n },\n {\n \"columnName\": \"location\",\n \"columnLabel\": \"存放位置\",\n \"columnComment\": \"图书存放位置\",\n \"columnType\": \"varchar(100)\",\n \"isPk\": \"0\",\n \"isIncrement\": \"0\",\n \"isRequired\": \"0\",\n \"javaType\": \"String\",\n \"htmlType\": \"input\"\n },\n {\n \"columnName\": \"status\",\n \"columnLabel\": \"状态\",\n \"columnComment\": \"上架状态(1上架,0下架)\",\n \"columnType\": \"char(1)\",\n \"isPk\": \"0\",\n \"isIncrement\": \"0\",\n \"isRequired\": \"1\",\n \"javaType\": \"String\",\n \"htmlType\": \"select\",\n \"dictOptions\": [\n {\n \"label\": \"上架\",\n \"value\": \"1\"\n },\n {\n \"label\": \"下架\",\n \"value\": \"0\"\n }\n ]\n },\n {\n \"columnName\": \"cover_image\",\n \"columnLabel\": \"封面图片\",\n \"columnComment\": \"图书封面URL\",\n \"columnType\": \"varchar(500)\",\n \"isPk\": \"0\",\n \"isIncrement\": \"0\",\n \"isRequired\": \"0\",\n \"javaType\": \"String\",\n \"htmlType\": \"imageUpload\"\n },\n {\n \"columnName\": \"description\",\n \"columnLabel\": \"简介\",\n \"columnComment\": \"图书简介\",\n \"columnType\": \"text\",\n \"isPk\": \"0\",\n \"isIncrement\": \"0\",\n \"isRequired\": \"0\",\n \"javaType\": \"String\",\n \"htmlType\": \"editor\"\n },\n {\n \"columnName\": \"create_time\",\n \"columnLabel\": \"创建时间\",\n \"columnComment\": \"创建时间\",\n \"columnType\": \"datetime\",\n \"isPk\": \"0\",\n \"isIncrement\": \"0\",\n \"isRequired\": \"0\",\n \"javaType\": \"Date\",\n \"htmlType\": \"datetime\"\n },\n {\n \"columnName\": \"update_time\",\n \"columnLabel\": \"更新时间\",\n \"columnComment\": \"更新时间\",\n \"columnType\": \"datetime\",\n \"isPk\": \"0\",\n \"isIncrement\": \"0\",\n \"isRequired\": \"0\",\n \"javaType\": \"Date\",\n \"htmlType\": \"datetime\"\n }\n ]\n },\n {\n \"tableName\": \"reader\",\n \"tableComment\": \"读者信息表\",\n \"adminMenuName\": \"读者管理\",\n \"operations\": {\n \"add\": true,\n \"edit\": true,\n \"remove\": true,\n \"removeType\": \"physical\",\n \"reason\": \"\"\n },\n \"columns\": [\n {\n \"columnName\": \"reader_id\",\n \"columnLabel\": \"读者ID\",\n \"columnComment\": \"读者主键ID自动递增\",\n \"columnType\": \"bigint(20)\",\n \"isPk\": \"1\",\n \"isIncrement\": \"1\",\n \"isRequired\": \"1\"\n },\n {\n \"columnName\": \"username\",\n \"columnLabel\": \"用户名\",\n \"columnComment\": \"读者登录用户名\",\n \"columnType\": \"varchar(50)\",\n \"isPk\": \"0\",\n \"isIncrement\": \"0\",\n \"isRequired\": \"1\",\n \"javaType\": \"String\",\n \"htmlType\": \"input\"\n },\n {\n \"columnName\": \"password_hash\",\n \"columnLabel\": \"密码哈希\",\n \"columnComment\": \"读者登录密码哈希值\",\n \"columnType\": \"varchar(255)\",\n \"isPk\": \"0\",\n \"isIncrement\": \"0\",\n \"isRequired\": \"1\",\n \"javaType\": \"String\",\n \"htmlType\": \"input\"\n },\n {\n \"columnName\": \"nickname\",\n \"columnLabel\": \"昵称\",\n \"columnComment\": \"读者显示名称\",\n \"columnType\": \"varchar(100)\",\n \"isPk\": \"0\",\n \"isIncrement\": \"0\",\n \"isRequired\": \"1\",\n \"javaType\": \"String\",\n \"htmlType\": \"input\"\n },\n {\n \"columnName\": \"student_id\",\n \"columnLabel\": \"学号/工号\",\n \"columnComment\": \"读者学号或工号\",\n \"columnType\": \"varchar(50)\",\n \"isPk\": \"0\",\n \"isIncrement\": \"0\",\n \"isRequired\": \"0\",\n \"javaType\": \"String\",\n \"htmlType\": \"input\"\n },\n {\n \"columnName\": \"phone\",\n \"columnLabel\": \"手机号\",\n \"columnComment\": \"读者手机号码\",\n \"columnType\": \"varchar(20)\",\n \"isPk\": \"0\",\n \"isIncrement\": \"0\",\n \"isRequired\": \"0\",\n \"javaType\": \"String\",\n \"htmlType\": \"input\"\n },\n {\n \"columnName\": \"email\",\n \"columnLabel\": \"邮箱\",\n \"columnComment\": \"读者电子邮箱\",\n \"columnType\": \"varchar(100)\",\n \"isPk\": \"0\",\n \"isIncrement\": \"0\",\n \"isRequired\": \"0\",\n \"javaType\": \"String\",\n \"htmlType\": \"input\"\n },\n {\n \"columnName\": \"status\",\n \"columnLabel\": \"状态\",\n \"columnComment\": \"读者账号状态(1激活,0冻结)\",\n \"columnType\": \"char(1)\",\n \"isPk\": \"0\",\n \"isIncrement\": \"0\",\n \"isRequired\": \"1\",\n \"javaType\": \"String\",\n \"htmlType\": \"select\",\n \"dictOptions\": [\n {\n \"label\": \"激活\",\n \"value\": \"1\"\n },\n {\n \"label\": \"冻结\",\n \"value\": \"0\"\n }\n ]\n },\n {\n \"columnName\": \"create_time\",\n \"columnLabel\": \"创建时间\",\n \"columnComment\": \"账号创建时间\",\n \"columnType\": \"datetime\",\n \"isPk\": \"0\",\n \"isIncrement\": \"0\",\n \"isRequired\": \"0\",\n \"javaType\": \"Date\",\n \"htmlType\": \"datetime\"\n },\n {\n \"columnName\": \"update_time\",\n \"columnLabel\": \"更新时间\",\n \"columnComment\": \"账号更新时间\",\n \"columnType\": \"datetime\",\n \"isPk\": \"0\",\n \"isIncrement\": \"0\",\n \"isRequired\": \"0\",\n \"javaType\": \"Date\",\n \"htmlType\": \"datetime\"\n }\n ]\n },\n {\n \"tableName\": \"borrowing_record\",\n \"tableComment\": \"借阅记录表\",\n \"adminMenuName\": \"借阅记录管理\",\n \"operations\": {\n \"add\": true,\n \"edit\": false,\n \"remove\": false,\n \"removeType\": \"physical\",\n \"reason\": \"借阅记录通过状态流转管理,不可直接编辑或删除\"\n },\n \"columns\": [\n {\n \"columnName\": \"id\",\n \"columnLabel\": \"记录ID\",\n \"columnComment\": \"借阅记录主键ID\",\n \"columnType\": \"bigint(20)\",\n \"isPk\": \"1\",\n \"isIncrement\": \"1\",\n \"isRequired\": \"1\"\n },\n {\n \"columnName\": \"reader_id\",\n \"columnLabel\": \"读者\",\n \"columnComment\": \"借阅读者ID\",\n \"columnType\": \"bigint(20)\",\n \"isPk\": \"0\",\n \"isIncrement\": \"0\",\n \"isRequired\": \"1\",\n \"javaType\": \"Long\",\n \"htmlType\": \"select\",\n \"dictType\": \"remote:reader:reader_id:nickname\"\n },\n {\n \"columnName\": \"book_id\",\n \"columnLabel\": \"图书\",\n \"columnComment\": \"借阅图书ID\",\n \"columnType\": \"bigint(20)\",\n \"isPk\": \"0\",\n \"isIncrement\": \"0\",\n \"isRequired\": \"1\",\n \"javaType\": \"Long\",\n \"htmlType\": \"select\",\n \"dictType\": \"remote:book_info:id:title\"\n },\n {\n \"columnName\": \"borrow_date\",\n \"columnLabel\": \"借出时间\",\n \"columnComment\": \"借阅确认时间\",\n \"columnType\": \"datetime\",\n \"isPk\": \"0\",\n \"isIncrement\": \"0\",\n \"isRequired\": \"1\",\n \"javaType\": \"Date\",\n \"htmlType\": \"datetime\"\n },\n {\n \"columnName\": \"due_date\",\n \"columnLabel\": \"应还日期\",\n \"columnComment\": \"借阅截止日期借出后30天\",\n \"columnType\": \"datetime\",\n \"isPk\": \"0\",\n \"isIncrement\": \"0\",\n \"isRequired\": \"1\",\n \"javaType\": \"Date\",\n \"htmlType\": \"datetime\"\n },\n {\n \"columnName\": \"return_date\",\n \"columnLabel\": \"归还时间\",\n \"columnComment\": \"实际归还时间\",\n \"columnType\": \"datetime\",\n \"isPk\": \"0\",\n \"isIncrement\": \"0\",\n \"isRequired\": \"0\",\n \"javaType\": \"Date\",\n \"htmlType\": \"datetime\"\n },\n {\n \"columnName\": \"overdue_fee\",\n \"columnLabel\": \"逾期费用\",\n \"columnComment\": \"逾期未还产生的费用(元)\",\n \"columnType\": \"decimal(10,2)\",\n \"isPk\": \"0\",\n \"isIncrement\": \"0\",\n \"isRequired\": \"0\",\n \"javaType\": \"BigDecimal\",\n \"htmlType\": \"input\"\n },\n {\n \"columnName\": \"damage_compensation\",\n \"columnLabel\": \"损坏赔偿\",\n \"columnComment\": \"图书损坏赔款金额(元)\",\n \"columnType\": \"decimal(10,2)\",\n \"isPk\": \"0\",\n \"isIncrement\": \"0\",\n \"isRequired\": \"0\",\n \"javaType\": \"BigDecimal\",\n \"htmlType\": \"input\"\n },\n {\n \"columnName\": \"lost_compensation\",\n \"columnLabel\": \"丢失赔偿\",\n \"columnComment\": \"图书丢失赔款金额(元)\",\n \"columnType\": \"decimal(10,2)\",\n \"isPk\": \"0\",\n \"isIncrement\": \"0\",\n \"isRequired\": \"0\",\n \"javaType\": \"BigDecimal\",\n \"htmlType\": \"input\"\n },\n {\n \"columnName\": \"status\",\n \"columnLabel\": \"借阅状态\",\n \"columnComment\": \"借阅记录状态(对应状态机)\",\n \"columnType\": \"varchar(20)\",\n \"isPk\": \"0\",\n \"isIncrement\": \"0\",\n \"isRequired\": \"1\",\n \"javaType\": \"String\",\n \"htmlType\": \"select\",\n \"dictOptions\": [\n {\"label\": \"待审批\", \"value\": \"pending_approval\"},\n {\"label\": \"借出中\", \"value\": \"borrowing\"},\n {\"label\": \"待支付逾期费\", \"value\": \"waiting_payment\"},\n {\"label\": \"已归还\", \"value\": \"returned\"},\n {\"label\": \"损坏\", \"value\": \"damaged\"},\n {\"label\": \"丢失\", \"value\": \"lost\"},\n {\"label\": \"已取消\", \"value\": \"cancelled\"},\n {\"label\": \"已处理\", \"value\": \"closed\"}\n ]\n },\n {\n \"columnName\": \"approve_user_id\",\n \"columnLabel\": \"审批人ID\",\n \"columnComment\": \"审批通过的管理员ID\",\n \"columnType\": \"bigint(20)\",\n \"isPk\": \"0\",\n \"isIncrement\": \"0\",\n \"isRequired\": \"0\",\n \"javaType\": \"Long\",\n \"htmlType\": \"select\",\n \"dictType\": \"remote:admin_info:admin_id:nickname\"\n },\n {\n \"columnName\": \"approve_time\",\n \"columnLabel\": \"审批时间\",\n \"columnComment\": \"审批确认时间\",\n \"columnType\": \"datetime\",\n \"isPk\": \"0\",\n \"isIncrement\": \"0\",\n \"isRequired\": \"0\",\n \"javaType\": \"Date\",\n \"htmlType\": \"datetime\"\n },\n {\n \"columnName\": \"create_time\",\n \"columnLabel\": \"创建时间\",\n \"columnComment\": \"记录创建时间(读者发起借阅时间)\",\n \"columnType\": \"datetime\",\n \"isPk\": \"0\",\n \"isIncrement\": \"0\",\n \"isRequired\": \"0\",\n \"javaType\": \"Date\",\n \"htmlType\": \"datetime\"\n },\n {\n \"columnName\": \"update_time\",\n \"columnLabel\": \"更新时间\",\n \"columnComment\": \"记录最后更新时间\",\n \"columnType\": \"datetime\",\n \"isPk\": \"0\",\n \"isIncrement\": \"0\",\n \"isRequired\": \"0\",\n \"javaType\": \"Date\",\n \"htmlType\": \"datetime\"\n }\n ]\n },\n {\n \"tableName\": \"admin_info\",\n \"tableComment\": \"管理员信息表\",\n \"adminMenuName\": \"管理员个人资料\",\n \"operations\": {\n \"add\": false,\n \"edit\": true,\n \"remove\": false,\n \"removeType\": \"physical\",\n \"reason\": \"管理员账号仅用于登录和编辑个人资料\"\n },\n \"columns\": [\n {\n \"columnName\": \"admin_id\",\n \"columnLabel\": \"管理员ID\",\n \"columnComment\": \"管理员主键ID自动递增\",\n \"columnType\": \"bigint(20)\",\n \"isPk\": \"1\",\n \"isIncrement\": \"1\",\n \"isRequired\": \"1\"\n },\n {\n \"columnName\": \"username\",\n \"columnLabel\": \"用户名\",\n \"columnComment\": \"管理员登录用户名\",\n \"columnType\": \"varchar(50)\",\n \"isPk\": \"0\",\n \"isIncrement\": \"0\",\n \"isRequired\": \"1\",\n \"javaType\": \"String\",\n \"htmlType\": \"input\"\n },\n {\n \"columnName\": \"password_hash\",\n \"columnLabel\": \"密码哈希\",\n \"columnComment\": \"管理员登录密码哈希值\",\n \"columnType\": \"varchar(255)\",\n \"isPk\": \"0\",\n \"isIncrement\": \"0\",\n \"isRequired\": \"1\",\n \"javaType\": \"String\",\n \"htmlType\": \"input\"\n },\n {\n \"columnName\": \"nickname\",\n \"columnLabel\": \"昵称\",\n \"columnComment\": \"管理员显示名称\",\n \"columnType\": \"varchar(100)\",\n \"isPk\": \"0\",\n \"isIncrement\": \"0\",\n \"isRequired\": \"1\",\n \"javaType\": \"String\",\n \"htmlType\": \"input\"\n },\n {\n \"columnName\": \"status\",\n \"columnLabel\": \"状态\",\n \"columnComment\": \"管理员账号状态(1启用,0禁用)\",\n \"columnType\": \"char(1)\",\n \"isPk\": \"0\",\n \"isIncrement\": \"0\",\n \"isRequired\": \"1\",\n \"javaType\": \"String\",\n \"htmlType\": \"select\",\n \"dictOptions\": [\n {\"label\": \"启用\", \"value\": \"1\"},\n {\"label\": \"禁用\", \"value\": \"0\"}\n ]\n },\n {\n \"columnName\": \"create_time\",\n \"columnLabel\": \"创建时间\",\n \"columnComment\": \"账号创建时间\",\n \"columnType\": \"datetime\",\n \"isPk\": \"0\",\n \"isIncrement\": \"0\",\n \"isRequired\": \"0\",\n \"javaType\": \"Date\",\n \"htmlType\": \"datetime\"\n },\n {\n \"columnName\": \"update_time\",\n \"columnLabel\": \"更新时间\",\n \"columnComment\": \"账号更新时间\",\n \"columnType\": \"datetime\",\n \"isPk\": \"0\",\n \"isIncrement\": \"0\",\n \"isRequired\": \"0\",\n \"javaType\": \"Date\",\n \"htmlType\": \"datetime\"\n }\n ]\n },\n {\n \"tableName\": \"announcement\",\n \"tableComment\": \"公告信息表\",\n \"adminMenuName\": \"公告管理\",\n \"operations\": {\n \"add\": true,\n \"edit\": true,\n \"remove\": true,\n \"removeType\": \"physical\",\n \"reason\": \"\"\n },\n \"columns\": [\n {\n \"columnName\": \"id\",\n \"columnLabel\": \"ID\",\n \"columnComment\": \"公告主键ID\",\n \"columnType\": \"bigint(20)\",\n \"isPk\": \"1\",\n \"isIncrement\": \"1\",\n \"isRequired\": \"1\"\n },\n {\n \"columnName\": \"title\",\n \"columnLabel\": \"标题\",\n \"columnComment\": \"公告标题\",\n \"columnType\": \"varchar(200)\",\n \"isPk\": \"0\",\n \"isIncrement\": \"0\",\n \"isRequired\": \"1\",\n \"javaType\": \"String\",\n \"htmlType\": \"input\"\n },\n {\n \"columnName\": \"content\",\n \"columnLabel\": \"内容\",\n \"columnComment\": \"公告正文内容\",\n \"columnType\": \"text\",\n \"isPk\": \"0\",\n \"isIncrement\": \"0\",\n \"isRequired\": \"1\",\n \"javaType\": \"String\",\n \"htmlType\": \"editor\"\n },\n {\n \"columnName\": \"publish_time\",\n \"columnLabel\": \"发布时间\",\n \"columnComment\": \"公告发布时间\",\n \"columnType\": \"datetime\",\n \"isPk\": \"0\",\n \"isIncrement\": \"0\",\n \"isRequired\": \"0\",\n \"javaType\": \"Date\",\n \"htmlType\": \"datetime\"\n },\n {\n \"columnName\": \"status\",\n \"columnLabel\": \"状态\",\n \"columnComment\": \"公告状态(1发布,0草稿)\",\n \"columnType\": \"char(1)\",\n \"isPk\": \"0\",\n \"isIncrement\": \"0\",\n \"isRequired\": \"1\",\n \"javaType\": \"String\",\n \"htmlType\": \"select\",\n \"dictOptions\": [\n {\"label\": \"发布\", \"value\": \"1\"},\n {\"label\": \"草稿\", \"value\": \"0\"}\n ]\n },\n {\n \"columnName\": \"create_time\",\n \"columnLabel\": \"创建时间\",\n \"columnComment\": \"记录创建时间\",\n \"columnType\": \"datetime\",\n \"isPk\": \"0\",\n \"isIncrement\": \"0\",\n \"isRequired\": \"0\",\n \"javaType\": \"Date\",\n \"htmlType\": \"datetime\"\n },\n {\n \"columnName\": \"update_time\",\n \"columnLabel\": \"更新时间\",\n \"columnComment\": \"记录更新时间\",\n \"columnType\": \"datetime\",\n \"isPk\": \"0\",\n \"isIncrement\": \"0\",\n \"isRequired\": \"0\",\n \"javaType\": \"Date\",\n \"htmlType\": \"datetime\"\n }\n ]\n },\n {\n \"tableName\": \"news\",\n \"tableComment\": \"新闻资讯表\",\n \"adminMenuName\": \"新闻管理\",\n \"operations\": {\n \"add\": true,\n \"edit\": true,\n \"remove\": true,\n \"removeType\": \"physical\",\n \"reason\": \"\"\n },\n \"columns\": [\n {\n \"columnName\": \"id\",\n \"columnLabel\": \"ID\",\n \"columnComment\": \"新闻主键ID\",\n \"columnType\": \"bigint(20)\",\n \"isPk\": \"1\",\n \"isIncrement\": \"1\",\n \"isRequired\": \"1\"\n },\n {\n \"columnName\": \"title\",\n \"columnLabel\": \"标题\",\n \"columnComment\": \"新闻标题\",\n \"columnType\": \"varchar(200)\",\n \"isPk\": \"0\",\n \"isIncrement\": \"0\",\n \"isRequired\": \"1\",\n \"javaType\": \"String\",\n \"htmlType\": \"input\"\n },\n {\n \"columnName\": \"content\",\n \"columnLabel\": \"内容\",\n \"columnComment\": \"新闻正文内容\",\n \"columnType\": \"text\",\n \"isPk\": \"0\",\n \"isIncrement\": \"0\",\n \"isRequired\": \"1\",\n \"javaType\": \"String\",\n \"htmlType\": \"editor\"\n },\n {\n \"columnName\": \"author\",\n \"columnLabel\": \"作者\",\n \"columnComment\": \"新闻作者\",\n \"columnType\": \"varchar(100)\",\n \"isPk\": \"0\",\n \"isIncrement\": \"0\",\n \"isRequired\": \"0\",\n \"javaType\": \"String\",\n \"htmlType\": \"input\"\n },\n {\n \"columnName\": \"publish_time\",\n \"columnLabel\": \"发布时间\",\n \"columnComment\": \"新闻发布时间\",\n \"columnType\": \"datetime\",\n \"isPk\": \"0\",\n \"isIncrement\": \"0\",\n \"isRequired\": \"0\",\n \"javaType\": \"Date\",\n \"htmlType\": \"datetime\"\n },\n {\n \"columnName\": \"source\",\n \"columnLabel\": \"来源\",\n \"columnComment\": \"新闻来源\",\n \"columnType\": \"varchar(200)\",\n \"isPk\": \"0\",\n \"isIncrement\": \"0\",\n \"isRequired\": \"0\",\n \"javaType\": \"String\",\n \"htmlType\": \"input\"\n },\n {\n \"columnName\": \"status\",\n \"columnLabel\": \"状态\",\n \"columnComment\": \"新闻状态(1发布,0草稿)\",\n \"columnType\": \"char(1)\",\n \"isPk\": \"0\",\n \"isIncrement\": \"0\",\n \"isRequired\": \"1\",\n \"javaType\": \"String\",\n \"htmlType\": \"select\",\n \"dictOptions\": [\n {\"label\": \"发布\", \"value\": \"1\"},\n {\"label\": \"草稿\", \"value\": \"0\"}\n ]\n },\n {\n \"columnName\": \"create_time\",\n \"columnLabel\": \"创建时间\",\n \"columnComment\": \"记录创建时间\",\n \"columnType\": \"datetime\",\n \"isPk\": \"0\",\n \"isIncrement\": \"0\",\n \"isRequired\": \"0\",\n \"javaType\": \"Date\",\n \"htmlType\": \"datetime\"\n },\n {\n \"columnName\": \"update_time\",\n \"columnLabel\": \"更新时间\",\n \"columnComment\": \"记录更新时间\",\n \"columnType\": \"datetime\",\n \"isPk\": \"0\",\n \"isIncrement\": \"0\",\n \"isRequired\": \"0\",\n \"javaType\": \"Date\",\n \"htmlType\": \"datetime\"\n }\n ]\n },\n {\n \"tableName\": \"friend_link\",\n \"tableComment\": \"友情链接表\",\n \"adminMenuName\": \"友情链接管理\",\n \"operations\": {\n \"add\": true,\n \"edit\": true,\n \"remove\": true,\n \"removeType\": \"physical\",\n \"reason\": \"\"\n },\n \"columns\": [\n {\n \"columnName\": \"id\",\n \"columnLabel\": \"ID\",\n \"columnComment\": \"友情链接主键ID\",\n \"columnType\": \"bigint(20)\",\n \"isPk\": \"1\",\n \"isIncrement\": \"1\",\n \"isRequired\": \"1\"\n },\n {\n \"columnName\": \"name\",\n \"columnLabel\": \"名称\",\n \"columnComment\": \"链接站点名称\",\n \"columnType\": \"varchar(200)\",\n \"isPk\": \"0\",\n \"isIncrement\": \"0\",\n \"isRequired\": \"1\",\n \"javaType\": \"String\",\n \"htmlType\": \"input\"\n },\n {\n \"columnName\": \"url\",\n \"columnLabel\": \"链接地址\",\n \"columnComment\": \"网站URL\",\n \"columnType\": \"varchar(500)\",\n \"isPk\": \"0\",\n \"isIncrement\": \"0\",\n \"isRequired\": \"1\",\n \"javaType\": \"String\",\n \"htmlType\": \"input\"\n },\n {\n \"columnName\": \"logo\",\n \"columnLabel\": \"LOGO\",\n \"columnComment\": \"站点LOGO图片URL\",\n \"columnType\": \"varchar(500)\",\n \"isPk\": \"0\",\n \"isIncrement\": \"0\",\n \"isRequired\": \"0\",\n \"javaType\": \"String\",\n \"htmlType\": \"imageUpload\"\n },\n {\n \"columnName\": \"sort_order\",\n \"columnLabel\": \"排序\",\n \"columnComment\": \"显示排序序号\",\n \"columnType\": \"int(11)\",\n \"isPk\": \"0\",\n \"isIncrement\": \"0\",\n \"isRequired\": \"0\",\n \"javaType\": \"Integer\",\n \"htmlType\": \"input\"\n },\n {\n \"columnName\": \"status\",\n \"columnLabel\": \"状态\",\n \"columnComment\": \"启用状态(1启用,0禁用)\",\n \"columnType\": \"char(1)\",\n \"isPk\": \"0\",\n \"isIncrement\": \"0\",\n \"isRequired\": \"1\",\n \"javaType\": \"String\",\n \"htmlType\": \"select\",\n \"dictOptions\": [\n {\"label\": \"启用\", \"value\": \"1\"},\n {\"label\": \"禁用\", \"value\": \"0\"}\n ]\n },\n {\n \"columnName\": \"create_time\",\n \"columnLabel\": \"创建时间\",\n \"columnComment\": \"记录创建时间\",\n \"columnType\": \"datetime\",\n \"isPk\": \"0\",\n \"isIncrement\": \"0\",\n \"isRequired\": \"0\",\n \"javaType\": \"Date\",\n \"htmlType\": \"datetime\"\n },\n {\n \"columnName\": \"update_time\",\n \"columnLabel\": \"更新时间\",\n \"columnComment\": \"记录更新时间\",\n \"columnType\": \"datetime\",\n \"isPk\": \"0\",\n \"isIncrement\": \"0\",\n \"isRequired\": \"0\",\n \"javaType\": \"Date\",\n \"htmlType\": \"datetime\"\n }\n ]\n },\n {\n \"tableName\": \"help_article\",\n \"tableComment\": \"帮助中心文章表\",\n \"adminMenuName\": \"帮助中心管理\",\n \"operations\": {\n \"add\": true,\n \"edit\": true,\n \"remove\": true,\n \"removeType\": \"physical\",\n \"reason\": \"\"\n },\n \"columns\": [\n {\n \"columnName\": \"id\",\n \"columnLabel\": \"ID\",\n \"columnComment\": \"文章主键ID\",\n \"columnType\": \"bigint(20)\",\n \"isPk\": \"1\",\n \"isIncrement\": \"1\",\n \"isRequired\": \"1\"\n },\n {\n \"columnName\": \"title\",\n \"columnLabel\": \"标题\",\n \"columnComment\": \"文章标题\",\n \"columnType\": \"varchar(200)\",\n \"isPk\": \"0\",\n \"isIncrement\": \"0\",\n \"isRequired\": \"1\",\n \"javaType\": \"String\",\n \"htmlType\": \"input\"\n },\n {\n \"columnName\": \"content\",\n \"columnLabel\": \"内容\",\n \"columnComment\": \"文章正文内容\",\n \"columnType\": \"text\",\n \"isPk\": \"0\",\n \"isIncrement\": \"0\",\n \"isRequired\": \"1\",\n \"javaType\": \"String\",\n \"htmlType\": \"editor\"\n },\n {\n \"columnName\": \"category\",\n \"columnLabel\": \"分类\",\n \"columnComment\": \"文章所属分类\",\n \"columnType\": \"varchar(100)\",\n \"isPk\": \"0\",\n \"isIncrement\": \"0\",\n \"isRequired\": \"0\",\n \"javaType\": \"String\",\n \"htmlType\": \"input\"\n },\n {\n \"columnName\": \"sort_order\",\n \"columnLabel\": \"排序\",\n \"columnComment\": \"显示排序序号\",\n \"columnType\": \"int(11)\",\n \"isPk\": \"0\",\n \"isIncrement\": \"0\",\n \"isRequired\": \"0\",\n \"javaType\": \"Integer\",\n \"htmlType\": \"input\"\n },\n {\n \"columnName\": \"status\",\n \"columnLabel\": \"状态\",\n \"columnComment\": \"文章状态(1发布,0草稿)\",\n \"columnType\": \"char(1)\",\n \"isPk\": \"0\",\n \"isIncrement\": \"0\",\n \"isRequired\": \"1\",\n \"javaType\": \"String\",\n \"htmlType\": \"select\",\n \"dictOptions\": [\n {\"label\": \"发布\", \"value\": \"1\"},\n {\"label\": \"草稿\", \"value\": \"0\"}\n ]\n },\n {\n \"columnName\": \"create_time\",\n \"columnLabel\": \"创建时间\",\n \"columnComment\": \"记录创建时间\",\n \"columnType\": \"datetime\",\n \"isPk\": \"0\",\n \"isIncrement\": \"0\",\n \"isRequired\": \"0\",\n \"javaType\": \"Date\",\n \"htmlType\": \"datetime\"\n },\n {\n \"columnName\": \"update_time\",\n \"columnLabel\": \"更新时间\",\n \"columnComment\": \"记录更新时间\",\n \"columnType\": \"datetime\",\n \"isPk\": \"0\",\n \"isIncrement\": \"0\",\n \"isRequired\": \"0\",\n \"javaType\": \"Date\",\n \"htmlType\": \"datetime\"\n }\n ]\n }\n ]\n}', '0', 106232, 7990, NULL, 7990, 14196, 5936, 7990, 14196, 22186, 4, 0.03638200, '1', NULL, '2026-07-14 15:21:07');
INSERT INTO `front_ai_usage_ledger` VALUES (104, NULL, NULL, NULL, 100, 'requirement', 'deepseek', 'deepseek-v4-flash', 'front.requirement', 'v2', '07d4c186c52634ef2c9f67640a638e0822c1e139b177ff2bc7eb3a10389e8164', '你是一键生成项目的需求补全助手。你的输出会作为后续生成应用蓝图、业务闭环、数据库、页面和源码的输入。\n\n请在保留用户原始描述的基础上补全必要的业务细节让系统能生成一个本科毕设/课程设计规模的完整项目。\n\n补全重点\n- 明确项目面向谁使用,包含 2 到 4 个角色;\n- 明确核心业务对象,例如订单、预约、借阅记录、商品、课程等;\n- 明确一条完整业务闭环:发起、审核/处理、完成、取消/拒绝/回退;\n- 明确关键业务规则:状态、时间期限、数量限制、金额/费用公式、库存或名额变化;\n- 明确异常边界:库存不足、重复提交、状态不符、超时、取消、支付失败等;\n- 可补充少量前台展示或内容维护模块,但不要扩展成大型平台。\n\n约束\n- 只输出中文纯文本,不要 Markdown不要 JSON不要解释。\n- 内容要短,控制在 300 字以内。\n- 不要写技术实现、接口、数据库表、字段、代码。\n- 不要输出“按实际情况”“待定”等模糊规则缺少关键数值时用合理默认值并标注“AI假设”。\n- 不要把 CRUD、统计报表、系统监控、操作日志当作核心业务。', '请根据以下项目输入,补全一段可直接用于一键生成项目的业务需求描述。\n\n输出格式\n项目定位\n角色\n核心流程\n关键规则\n异常边界\n\n项目输入 JSON\n{\"projectName\":\"图书管理系统\",\"currentDescription\":\"\"}', '项目定位:一个面向高校图书馆的图书管理系统,供读者在线借书、还书、预约,管理员进行图书管理和借阅审核。\n\n角色系统管理员、图书管理员、读者。\n\n核心流程读者检索图书→提交借书申请→图书管理员审核通过并发放图书→读者还书或续借→图书管理员确认归还→超期则系统自动生成罚款→读者在线缴纳罚款。\n\n关键规则每位读者最多同时借阅5本书AI假设借阅期限为30天可续借1次续借期15天超期罚款0.1元/天预约图书保留2天逾期未取自动取消。\n\n异常边界库存为0时禁止借出同一读者重复提交同一本书的借书申请时提示“已借出或预约中”状态为“已借出”或“逾期”时无法再次借书预约超时自动释放库存支付罚款时若余额不足则失败。', '0', 6336, 346, NULL, 346, 495, 287, 346, 495, 841, 1, 0.00133600, '1', NULL, '2026-07-14 15:43:13');
INSERT INTO `front_ai_usage_ledger` VALUES (105, 101, 101, 101, 100, 'app_blueprint', 'deepseek', 'deepseek-v4-flash', 'front.app_blueprint', 'V1', 'c3ee0180ed446fe83055bd1c272ed1b6e3978584fe52f98f5e78e14e2cfc8f29', '你是应用蓝图架构师。只输出符合用户消息结构的 JSON规划业务角色、前台菜单与页面、后台菜单和运营看板。保持 pageCode、tableName、角色数据范围和登录要求前后一致只描述静态蓝图不生成数据库、权限表、菜单表或代码。角色名称使用简体中文技术标识使用稳定的小写 snake_case。', '根据项目输入 JSON 生成应用蓝图,只返回 JSON不要 Markdown 围栏或解释。\n输出结构{\"roles\":[{\"code\":\"reader\",\"name\":\"读者\",\"description\":\"\"}],\"frontendMenus\":[{\"code\":\"book_catalog\",\"name\":\"图书目录\",\"path\":\"/books\",\"pageCode\":\"book_catalog_page\",\"requiresLogin\":false,\"visibleRoles\":[],\"dataScope\":\"PUBLIC\"}],\"frontendPages\":[{\"code\":\"book_catalog_page\",\"name\":\"图书目录\",\"menuCode\":\"book_catalog\",\"path\":\"/books\",\"pageType\":\"list\",\"tableName\":\"book_info\"}],\"adminMenus\":[{\"code\":\"book_admin\",\"name\":\"图书管理\",\"path\":\"/admin/books\",\"pageCode\":\"book_admin_page\",\"tableName\":\"book_info\",\"pageType\":\"list\",\"requiresLogin\":true,\"visibleRoles\":[\"admin\"],\"dataScope\":\"ROLE\"}],\"adminHomeDashboard\":{\"title\":\"运营总览\",\"description\":\"核心业务数据\",\"metrics\":[],\"charts\":[]}}。\n蓝图描述目标生成项目而不是当前 EasyCode/RuoYi 平台。不要生成数据库表、菜单表、角色表、权限表或代码。\nrole.name 使用简体中文role.code 使用小写 snake_case。只有 role.code=admin 是系统管理员;名称含“管理员”或“后台”的业务角色仍保持独立。\nrole.name must be Simplified Chinese. Only role.code=admin is the system administrator.\n每个菜单必须包含 requiresLogin、visibleRoles、dataScopedataScope 只能是 PUBLIC、CURRENT_USER 或 ROLE。\nadminMenus 必须包含 pageCode、tableName、pageType个人资料使用 form普通管理使用 list。\nadminMenus must include pageCode, tableName, and pageType.\nfrontendMenus 顶层菜单应指向 pageCode详情页作为子页面不创建顶层详情菜单。\n不要为轮播图、banner、公告滚动条等首页装饰创建顶层菜单可放在首页业务块或作为后台维护数据。\nfrontendPages.pageType 只能是 list、current_user_list、detail、formtableName 必须是页面展示的业务表。\n同一业务对象只使用一个稳定 tableName后续数据库、闭环、页面、看板、动作必须复用不能使用同义表名。\nadminHomeDashboard 尽量包含 4 个业务指标和至少 2 张图表趋势图与分布图所有表字段必须可由后续数据库步骤创建。semantic 只能使用 money、order、user、task、warning、inventory、content、default。\n每个非 admin 角色使用表名等于 role.code 的独立账号表,不得创建共享 user、user_info、member 或 account 表。\nNever invent a shared user, user_info, member, or account table for role accounts.\n需要个人资料页时为每个非 admin 角色创建独立 form 页面和菜单tableName 绑定 role.codepageCode/path 带角色前缀visibleRoles 只包含该角色。\nCreate one form page and one menu per non-admin role when profile pages are needed.\n个人订单、借阅、资料、预约、支付等页面必须 requiresLogin=true 且 dataScope=CURRENT_USER。\n项目输入 JSON\n{\"projectName\":\"图书管理系统\",\"projectDescription\":\"项目定位:一个面向高校图书馆的图书管理系统,供读者在线借书、还书、预约,管理员进行图书管理和借阅审核。\\n\\n角色管理员、读者。\\n\\n核心流程读者检索图书→提交借书申请→管理员审核通过并发放图书→读者还书或续借→管理员确认归还→超期则系统自动生成罚款→读者在线缴纳罚款。\\n\\n关键规则每位读者最多同时借阅5本书借阅期限为30天可续借1次续借期15天超期罚款0.1元/天预约图书保留2天逾期未取自动取消。\\n\\n异常边界库存为0时禁止借出同一读者重复提交同一本书的借书申请时提示“已借出或预约中”状态为“已借出”或“逾期”时无法再次借书预约超时自动释放库存支付罚款时若余额不足则失败。\",\"industryTemplate\":\"\",\"stylePreset\":\"dark-tech\",\"extraRequirements\":\"\"}', '{\n \"roles\": [\n {\n \"code\": \"admin\",\n \"name\": \"管理员\",\n \"description\": \"系统管理员,负责图书管理、借阅审核等\"\n },\n {\n \"code\": \"reader\",\n \"name\": \"读者\",\n \"description\": \"普通读者,可在线借书、预约、缴纳罚款\"\n }\n ],\n \"frontendMenus\": [\n {\n \"code\": \"book_catalog\",\n \"name\": \"图书目录\",\n \"path\": \"/books\",\n \"pageCode\": \"book_catalog_page\",\n \"requiresLogin\": false,\n \"visibleRoles\": [],\n \"dataScope\": \"PUBLIC\"\n },\n {\n \"code\": \"my_borrows\",\n \"name\": \"我的借阅\",\n \"path\": \"/my/borrows\",\n \"pageCode\": \"my_borrows_page\",\n \"requiresLogin\": true,\n \"visibleRoles\": [\"reader\"],\n \"dataScope\": \"CURRENT_USER\"\n },\n {\n \"code\": \"my_reservations\",\n \"name\": \"我的预约\",\n \"path\": \"/my/reservations\",\n \"pageCode\": \"my_reservations_page\",\n \"requiresLogin\": true,\n \"visibleRoles\": [\"reader\"],\n \"dataScope\": \"CURRENT_USER\"\n },\n {\n \"code\": \"my_fines\",\n \"name\": \"我的罚款\",\n \"path\": \"/my/fines\",\n \"pageCode\": \"my_fines_page\",\n \"requiresLogin\": true,\n \"visibleRoles\": [\"reader\"],\n \"dataScope\": \"CURRENT_USER\"\n },\n {\n \"code\": \"reader_profile\",\n \"name\": \"个人信息\",\n \"path\": \"/my/profile\",\n \"pageCode\": \"reader_profile_page\",\n \"requiresLogin\": true,\n \"visibleRoles\": [\"reader\"],\n \"dataScope\": \"CURRENT_USER\"\n }\n ],\n \"frontendPages\": [\n {\n \"code\": \"book_catalog_page\",\n \"name\": \"图书目录\",\n \"menuCode\": \"book_catalog\",\n \"path\": \"/books\",\n \"pageType\": \"list\",\n \"tableName\": \"book_info\"\n },\n {\n \"code\": \"my_borrows_page\",\n \"name\": \"我的借阅\",\n \"menuCode\": \"my_borrows\",\n \"path\": \"/my/borrows\",\n \"pageType\": \"current_user_list\",\n \"tableName\": \"borrow_record\"\n },\n {\n \"code\": \"my_reservations_page\",\n \"name\": \"我的预约\",\n \"menuCode\": \"my_reservations\",\n \"path\": \"/my/reservations\",\n \"pageType\": \"current_user_list\",\n \"tableName\": \"reservation\"\n },\n {\n \"code\": \"my_fines_page\",\n \"name\": \"我的罚款\",\n \"menuCode\": \"my_fines\",\n \"path\": \"/my/fines\",\n \"pageType\": \"current_user_list\",\n \"tableName\": \"fine_record\"\n },\n {\n \"code\": \"reader_profile_page\",\n \"name\": \"个人信息\",\n \"menuCode\": \"reader_profile\",\n \"path\": \"/my/profile\",\n \"pageType\": \"form\",\n \"tableName\": \"reader\"\n }\n ],\n \"adminMenus\": [\n {\n \"code\": \"book_admin\",\n \"name\": \"图书管理\",\n \"path\": \"/admin/books\",\n \"pageCode\": \"book_admin_page\",\n \"tableName\": \"book_info\",\n \"pageType\": \"list\",\n \"requiresLogin\": true,\n \"visibleRoles\": [\"admin\"],\n \"dataScope\": \"ROLE\"\n },\n {\n \"code\": \"borrow_admin\",\n \"name\": \"借阅审核\",\n \"path\": \"/admin/borrows\",\n \"pageCode\": \"borrow_admin_page\",\n \"tableName\": \"borrow_record\",\n \"pageType\": \"list\",\n \"requiresLogin\": true,\n \"visibleRoles\": [\"admin\"],\n \"dataScope\": \"ROLE\"\n },\n {\n \"code\": \"reader_admin\",\n \"name\": \"读者管理\",\n \"path\": \"/admin/readers\",\n \"pageCode\": \"reader_admin_page\",\n \"tableName\": \"reader\",\n \"pageType\": \"list\",\n \"requiresLogin\": true,\n \"visibleRoles\": [\"admin\"],\n \"dataScope\": \"ROLE\"\n },\n {\n \"code\": \"fine_admin\",\n \"name\": \"罚款管理\",\n \"path\": \"/admin/fines\",\n \"pageCode\": \"fine_admin_page\",\n \"tableName\": \"fine_record\",\n \"pageType\": \"list\",\n \"requiresLogin\": true,\n \"visibleRoles\": [\"admin\"],\n \"dataScope\": \"ROLE\"\n },\n {\n \"code\": \"admin_profile\",\n \"name\": \"管理员资料\",\n \"path\": \"/admin/profile\",\n \"pageCode\": \"admin_profile_page\",\n \"tableName\": \"admin\",\n \"pageType\": \"form\",\n \"requiresLogin\": true,\n \"visibleRoles\": [\"admin\"],\n \"dataScope\": \"CURRENT_USER\"\n }\n ],\n \"adminHomeDashboard\": {\n \"title\": \"运营总览\",\n \"description\": \"核心业务数据\",\n \"metrics\": [\n {\n \"label\": \"总图书数\",\n \"value\": null,\n \"semantic\": \"content\"\n },\n {\n \"label\": \"总读者数\",\n \"value\": null,\n \"semantic\": \"user\"\n },\n {\n \"label\": \"当前借出\",\n \"value\": null,\n \"semantic\": \"order\"\n },\n {\n \"label\": \"罚款总额\",\n \"value\": null,\n \"semantic\": \"money\"\n }\n ],\n \"charts\": [\n {\n \"title\": \"借阅趋势\",\n \"type\": \"line\",\n \"dataSource\": \"borrow_record\",\n \"xField\": \"date\",\n \"yField\": \"count\",\n \"semantic\": \"order\"\n },\n {\n \"title\": \"图书分类分布\",\n \"type\": \"pie\",\n \"dataSource\": \"book_info\",\n \"categoryField\": \"category\",\n \"valueField\": \"count\",\n \"semantic\": \"content\"\n }\n ]\n }\n}', '0', 34220, 998, 768, 230, 4693, 3300, 998, 4693, 5691, 1, 0.00963136, '1', NULL, '2026-07-14 15:45:38');
INSERT INTO `front_ai_usage_ledger` VALUES (106, 101, 101, 101, 100, 'flow_config', 'deepseek', 'deepseek-v4-flash', 'front.flow_config', 'V1', '247495840c67968896ccad2db0a599bd4fc594d0189157dce888b8ede90b3257', '你是业务流程配置设计器。只输出一个合法 JSON 对象,不输出 Markdown、解释或 SQL。\n\n目标用最小 flow_config 描述状态流转、显式 Java 业务动作、多表数量联动、按钮和统计。不要输出 CRUD不要输出通用规则 DSL。\n\n固定结构\n{\n \"version\":\"1.0\",\n \"code\":\"snake_case\",\n \"name\":\"中文业务名\",\n \"mainTable\":\"snake_case\",\n \"statusField\":\"status\",\n \"notFoundMessage\":\"主记录不存在\",\n \"states\":[{\"code\":\"pending\",\"label\":\"待审核\"}],\n \"actions\":[{\n \"code\":\"approve\",\n \"name\":\"审核通过\",\n \"from\":\"pending\",\n \"to\":\"borrowing\",\n \"actor\":\"admin\",\n \"method\":\"POST\",\n \"path\":\"/borrow-record/approve\",\n \"invalidStateMessage\":\"当前状态不能审核\",\n \"successMessage\":\"审核成功\",\n \"audit\":{\"userField\":\"approve_user_id\",\"timeField\":\"approve_time\"},\n \"effects\":[{\n \"type\":\"decrease\",\n \"table\":\"book\",\n \"relationField\":\"book_id\",\n \"field\":\"stock\",\n \"amount\":\"1\",\n \"min\":\"0\",\n \"notFoundMessage\":\"图书不存在\",\n \"errorMessage\":\"图书库存不足\"\n }],\n \"button\":{\"scope\":\"admin\",\"pageCode\":\"borrow_record_list\",\"slot\":\"list.rowActions\",\"type\":\"success\",\"confirm\":\"确认审核通过吗?\",\"order\":10}\n }],\n \"metrics\":[{\"code\":\"borrowing_count\",\"name\":\"借阅中数量\",\"table\":\"borrow_record\",\"aggregate\":\"count\",\"field\":\"id\",\"status\":\"borrowing\",\"unit\":\"条\"}]\n}\n\n约束\n1. code、表名、字段名全部使用小写 snake_case状态 code 使用稳定英文编码label 使用中文。\n2. 每个 action 必须有 from 和 to且二者存在于 states 中并且不相同。\n3. effects.type 只能是 decrease、increase、update_related、create_record。\n4. decrease/increase 必须给 table、relationField、field、amountdecrease 还要给 min。\n5. update_related/create_record 使用 values值可为 currentUserId、now、record.字段名或常量。\n6. 审核人等身份只能通过 audit.userField 表达,由后端登录态注入,不能作为前端可传字段。\n7. 覆盖需求中的完整正向闭环和关键回退/拒绝动作,但不要为普通 CRUD 创建 action。', '请根据以下 JSON 上下文生成 flow_config。appBlueprint 是已确认的页面、角色和菜单范围,必须与它保持一致:\n{\"mode\":\"generate\",\"projectName\":\"图书管理系统\",\"projectDescription\":\"项目定位:一个面向高校图书馆的图书管理系统,供读者在线借书、还书、预约,管理员进行图书管理和借阅审核。\\n\\n角色管理员、读者。\\n\\n核心流程读者检索图书→提交借书申请→管理员审核通过并发放图书→读者还书或续借→管理员确认归还→超期则系统自动生成罚款→读者在线缴纳罚款。\\n\\n关键规则每位读者最多同时借阅5本书借阅期限为30天可续借1次续借期15天超期罚款0.1元/天预约图书保留2天逾期未取自动取消。\\n\\n异常边界库存为0时禁止借出同一读者重复提交同一本书的借书申请时提示“已借出或预约中”状态为“已借出”或“逾期”时无法再次借书预约超时自动释放库存支付罚款时若余额不足则失败。\",\"industryTemplate\":\"\",\"stylePreset\":\"dark-tech\",\"extraRequirements\":\"\",\"confirmedAppBlueprint\":{\"adminHomeDashboard\":{\"charts\":[{\"filters\":[],\"metrics\":[],\"semantic\":\"order\",\"title\":\"借阅趋势\",\"type\":\"line\"},{\"filters\":[],\"metrics\":[],\"semantic\":\"content\",\"title\":\"图书分类分布\",\"type\":\"pie\"}],\"description\":\"核心业务数据\",\"metrics\":[{\"filters\":[],\"semantic\":\"content\"},{\"filters\":[],\"semantic\":\"user\"},{\"filters\":[],\"semantic\":\"order\"},{\"filters\":[],\"semantic\":\"money\"}],\"title\":\"运营总览\"},\"adminMenus\":[{\"code\":\"book_admin\",\"dataScope\":\"ROLE\",\"name\":\"图书管理\",\"pageCode\":\"book_admin_page\",\"pageType\":\"list\",\"path\":\"/admin/books\",\"requiresLogin\":true,\"tableName\":\"book_info\",\"visibleRoles\":[\"admin\"]},{\"code\":\"borrow_admin\",\"dataScope\":\"ROLE\",\"name\":\"借阅审核\",\"pageCode\":\"borrow_admin_page\",\"pageType\":\"list\",\"path\":\"/admin/borrows\",\"requiresLogin\":true,\"tableName\":\"borrow_record\",\"visibleRoles\":[\"admin\"]},{\"code\":\"reader_admin\",\"dataScope\":\"ROLE\",\"name\":\"读者管理\",\"pageCode\":\"reader_admin_page\",\"pageType\":\"list\",\"path\":\"/admin/readers\",\"requiresLogin\":true,\"tableName\":\"reader\",\"visibleRoles\":[\"admin\"]},{\"code\":\"fine_admin\",\"dataScope\":\"ROLE\",\"name\":\"罚款管理\",\"pageCode\":\"fine_admin_page\",\"pageType\":\"list\",\"path\":\"/admin/fines\",\"requiresLogin\":true,\"tableName\":\"fine_record\",\"visibleRoles\":[\"admin\"]},{\"code\":\"admin_profile\",\"dataScope\":\"CURRENT_USER\",\"name\":\"管理员资料\",\"pageCode\":\"admin_profile_page\",\"pageType\":\"form\",\"path\":\"/admin/profile\",\"requiresLogin\":true,\"tableName\":\"admin\",\"visibleRoles\":[\"admin\"]}],\"frontendMenus\":[{\"code\":\"book_catalog\",\"dataScope\":\"PUBLIC\",\"name\":\"图书目录\",\"pageCode\":\"book_catalog_page\",\"pageType\":\"\",\"path\":\"/books\",\"requiresLogin\":false,\"tableName\":\"\",\"visibleRoles\":[]},{\"code\":\"my_borrows\",\"dataScope\":\"CURRENT_USER\",\"name\":\"我的借阅\",\"pageCode\":\"my_borrows_page\",\"pageType\":\"\",\"path\":\"/my/borrows\",\"requiresLogin\":true,\"tableName\":\"\",\"visibleRoles\":[\"reader\"]},{\"code\":\"my_reservations\",\"dataScope\":\"CURRENT_USER\",\"name\":\"我的预约\",\"pageCode\":\"my_reservations_page\",\"pageType\":\"\",\"path\":\"/my/reservations\",\"requiresLogin\":true,\"tableName\":\"\",\"visibleRoles\":[\"reader\"]},{\"code\":\"my_fines\",\"dataScope\":\"CURRENT_USER\",\"name\":\"我的罚款\",\"pageCode\":\"my_fines_page\",\"pageType\":\"\",\"path\":\"/my/fines\",\"requiresLogin\":true,\"tableName\":\"\",\"visibleRoles\":[\"reader\"]},{\"code\":\"reader_profile\",\"dataScope\":\"CURRENT_USER\",\"name\":\"个人信息\",\"pageCode\":\"reader_profile_page\",\"pageType\":\"\",\"path\":\"/my/profile\",\"requiresLogin\":true,\"tableName\":\"\",\"visibleRoles\":[\"reader\"]}],\"frontendPages\":[{\"code\":\"book_catalog_page\",\"menuCode\":\"book_catalog\",\"name\":\"图书目录\",\"pageType\":\"list\",\"parentPageCode\":\"\",\"path\":\"/books\",\"tableName\":\"book_info\"},{\"code\":\"my_borrows_page\",\"menuCode\":\"my_borrows\",\"name\":\"我的借阅\",\"pageType\":\"current_user_list\",\"parentPageCode\":\"\",\"path\":\"/my/borrows\",\"tableName\":\"borrow_record\"},{\"code\":\"my_reservations_page\",\"menuCode\":\"my_reservations\",\"name\":\"我的预约\",\"pageType\":\"current_user_list\",\"parentPageCode\":\"\",\"path\":\"/my/reservations\",\"tableName\":\"reservation\"},{\"code\":\"my_fines_page\",\"menuCode\":\"my_fines\",\"name\":\"我的罚款\",\"pageType\":\"current_user_list\",\"parentPageCode\":\"\",\"path\":\"/my/fines\",\"tableName\":\"fine_record\"},{\"code\":\"reader_profile_page\",\"menuCode\":\"reader_profile\",\"name\":\"个人信息\",\"pageType\":\"form\",\"parentPageCode\":\"\",\"path\":\"/my/profile\",\"tableName\":\"reader\"}],\"roles\":[{\"code\":\"admin\",\"description\":\"系统管理员,负责图书管理、借阅审核等\",\"name\":\"管理员\"},{\"code\":\"reader\",\"description\":\"普通读者,可在线借书、预约、缴纳罚款\",\"name\":\"读者\"}]}}', '{\n \"version\": \"1.0\",\n \"code\": \"borrow_flow\",\n \"name\": \"借阅管理流程\",\n \"mainTable\": \"borrow_record\",\n \"statusField\": \"status\",\n \"notFoundMessage\": \"借阅记录不存在\",\n \"states\": [\n { \"code\": \"pending\", \"label\": \"待审核\" },\n { \"code\": \"borrowing\", \"label\": \"借阅中\" },\n { \"code\": \"overdue\", \"label\": \"逾期\" },\n { \"code\": \"returning\", \"label\": \"归还中\" },\n { \"code\": \"returned_with_fine\", \"label\": \"待缴费归还\" },\n { \"code\": \"returned\", \"label\": \"已归还\" },\n { \"code\": \"cancelled\", \"label\": \"已取消\" }\n ],\n \"actions\": [\n {\n \"code\": \"approve\",\n \"name\": \"审核通过\",\n \"from\": \"pending\",\n \"to\": \"borrowing\",\n \"actor\": \"admin\",\n \"method\": \"POST\",\n \"path\": \"/borrow-record/approve\",\n \"invalidStateMessage\": \"当前状态不能审核\",\n \"successMessage\": \"审核成功,图书已借出\",\n \"audit\": { \"userField\": \"approve_user_id\", \"timeField\": \"approve_time\" },\n \"effects\": [\n {\n \"type\": \"decrease\",\n \"table\": \"book\",\n \"relationField\": \"book_id\",\n \"field\": \"stock\",\n \"amount\": \"1\",\n \"min\": \"0\",\n \"notFoundMessage\": \"图书不存在\",\n \"errorMessage\": \"图书库存不足\"\n }\n ],\n \"button\": {\n \"scope\": \"admin\",\n \"pageCode\": \"borrow_admin_page\",\n \"slot\": \"list.rowActions\",\n \"type\": \"success\",\n \"confirm\": \"确认审核通过吗?\",\n \"order\": 10\n }\n },\n {\n \"code\": \"reject\",\n \"name\": \"审核拒绝\",\n \"from\": \"pending\",\n \"to\": \"cancelled\",\n \"actor\": \"admin\",\n \"method\": \"POST\",\n \"path\": \"/borrow-record/reject\",\n \"invalidStateMessage\": \"当前状态不能拒绝\",\n \"successMessage\": \"已拒绝借书申请\",\n \"audit\": { \"userField\": \"approve_user_id\", \"timeField\": \"approve_time\" },\n \"effects\": [],\n \"button\": {\n \"scope\": \"admin\",\n \"pageCode\": \"borrow_admin_page\",\n \"slot\": \"list.rowActions\",\n \"type\": \"danger\",\n \"confirm\": \"确认拒绝吗?\",\n \"order\": 20\n }\n },\n {\n \"code\": \"return_apply\",\n \"name\": \"申请还书\",\n \"from\": \"borrowing\",\n \"to\": \"returning\",\n \"actor\": \"reader\",\n \"method\": \"POST\",\n \"path\": \"/borrow-record/return-apply\",\n \"invalidStateMessage\": \"当前借阅记录无法申请还书\",\n \"successMessage\": \"还书申请已提交,请等待管理员确认\",\n \"audit\": { \"userField\": \"return_applicant_id\", \"timeField\": \"return_apply_time\" },\n \"effects\": [],\n \"button\": {\n \"scope\": \"reader\",\n \"pageCode\": \"my_borrows_page\",\n \"slot\": \"list.rowActions\",\n \"type\": \"primary\",\n \"confirm\": \"确认申请还书吗?\",\n \"order\": 10\n }\n },\n {\n \"code\": \"return_apply_overdue\",\n \"name\": \"逾期还书申请\",\n \"from\": \"overdue\",\n \"to\": \"returning\",\n \"actor\": \"reader\",\n \"method\": \"POST\",\n \"path\": \"/borrow-record/return-apply\",\n \"invalidStateMessage\": \"当前记录无法申请还书\",\n \"successMessage\": \"还书申请已提交\",\n \"audit\": { \"userField\": \"return_applicant_id\", \"timeField\": \"return_apply_time\" },\n \"effects\": [],\n \"button\": {\n \"scope\": \"reader\",\n \"pageCode\": \"my_borrows_page\",\n \"slot\": \"list.rowActions\",\n \"type\": \"primary\",\n \"confirm\": \"确认申请还书吗?\",\n \"order\": 20\n }\n },\n {\n \"code\": \"confirm_return_normal\",\n \"name\": \"确认归还\",\n \"from\": \"returning\",\n \"to\": \"returned\",\n \"actor\": \"admin\",\n \"method\": \"POST\",\n \"path\": \"/borrow-record/confirm-return\",\n \"invalidStateMessage\": \"当前状态不能确认归还\",\n \"successMessage\": \"归还确认成功\",\n \"audit\": { \"userField\": \"confirm_return_user_id\", \"timeField\": \"confirm_return_time\" },\n \"effects\": [],\n \"button\": {\n \"scope\": \"admin\",\n \"pageCode\": \"borrow_admin_page\",\n \"slot\": \"list.rowActions\",\n \"type\": \"success\",\n \"confirm\": \"确认归还吗?\",\n \"order\": 30\n }\n },\n {\n \"code\": \"confirm_return_overdue\",\n \"name\": \"确认归还(超期)\",\n \"from\": \"returning\",\n \"to\": \"returned_with_fine\",\n \"actor\": \"admin\",\n \"method\": \"POST\",\n \"path\": \"/borrow-record/confirm-return-overdue\",\n \"invalidStateMessage\": \"当前状态不能确认归还\",\n \"successMessage\": \"归还确认成功,已生成罚款记录\",\n \"audit\": { \"userField\": \"confirm_return_user_id\", \"timeField\": \"confirm_return_time\" },\n \"effects\": [\n {\n \"type\": \"create_record\",\n \"table\": \"fine_record\",\n \"values\": {\n \"borrow_record_id\": \"record.id\",\n \"user_id\": \"record.user_id\",\n \"amount\": \"0.1\",\n \"status\": \"unpaid\",\n \"created_at\": \"now\"\n },\n \"notFoundMessage\": \"\",\n \"errorMessage\": \"罚款记录创建失败\"\n }\n ],\n \"button\": {\n \"scope\": \"admin\",\n \"pageCode\": \"borrow_admin_page\",\n \"slot\": \"list.rowActions\",\n \"type\": \"warning\",\n \"confirm\": \"该记录已超期,确认归还并生成罚款吗?\",\n \"order\": 40\n }\n },\n {\n \"code\": \"pay_fine\",\n \"name\": \"缴纳罚款\",\n \"from\": \"returned_with_fine\",\n \"to\": \"returned\",\n \"actor\": \"reader\",\n \"method\": \"POST\",\n \"path\": \"/borrow-record/pay-fine\",\n \"invalidStateMessage\": \"无需缴纳罚款\",\n \"successMessage\": \"罚款缴纳成功\",\n \"audit\": { \"userField\": \"pay_fine_user_id\", \"timeField\": \"pay_fine_time\" },\n \"effects\": [\n {\n \"type\": \"update_related\",\n \"table\": \"fine_record\",\n \"relationField\": \"id\",\n \"values\": {\n \"status\": \"paid\",\n \"pay_time\": \"now\"\n },\n \"notFoundMessage\": \"罚款记录不存在\",\n \"errorMessage\": \"更新罚款状态失败\"\n }\n ],\n \"button\": {\n \"scope\": \"reader\",\n \"pageCode\": \"my_borrows_page\",\n \"slot\": \"list.rowActions\",\n \"type\": \"primary\",\n \"confirm\": \"确认缴纳罚款吗?\",\n \"order\": 30\n }\n },\n {\n \"code\": \"mark_overdue\",\n \"name\": \"标记逾期\",\n \"from\": \"borrowing\",\n \"to\": \"overdue\",\n \"actor\": \"admin\",\n \"method\": \"POST\",\n \"path\": \"/borrow-record/mark-overdue\",\n \"invalidStateMessage\": \"当前状态不能标记逾期\",\n \"successMessage\": \"已标记为逾期\",\n \"audit\": { \"userField\": \"mark_overdue_user_id\", \"timeField\": \"mark_overdue_time\" },\n \"effects\": [],\n \"button\": {\n \"scope\": \"admin\",\n \"pageCode\": \"borrow_admin_page\",\n \"slot\": \"list.rowActions\",\n \"type\": \"warning\",\n \"confirm\": \"确认标记逾期吗?\",\n \"order\": 50\n }\n }\n ],\n \"metrics\": [\n { \"code\": \"borrowing_count\", \"name\": \"借阅中数量\", \"table\": \"borrow_record\", \"aggregate\": \"count\", \"field\": \"id\", \"status\": \"borrowing\", \"unit\": \"条\" },\n { \"code\": \"overdue_count\", \"name\": \"逾期数量\", \"table\": \"borrow_record\", \"aggregate\": \"count\", \"field\": \"id\", \"status\": \"overdue\", \"unit\": \"条\" },\n { \"code\": \"returned_count\", \"name\": \"已归还数量\", \"table\": \"borrow_record\", \"aggregate\": \"count\", \"field\": \"id\", \"status\": \"returned\", \"unit\": \"条\" },\n { \"code\": \"pending_count\", \"name\": \"待审核数量\", \"table\": \"borrow_record\", \"aggregate\": \"count\", \"field\": \"id\", \"status\": \"pending\", \"unit\": \"条\" },\n { \"code\": \"total_unpaid_fine\", \"name\": \"待缴罚款总额\", \"table\": \"fine_record\", \"aggregate\": \"sum\", \"field\": \"amount\", \"status\": \"unpaid\", \"unit\": \"元\" }\n ]\n}', '0', 62559, 1764, NULL, 1764, 6826, 4648, 1764, 6826, 8590, 2, 0.01541600, '1', NULL, '2026-07-14 15:46:41');
INSERT INTO `front_ai_usage_ledger` VALUES (107, 101, 101, 101, 100, 'flow_config', 'deepseek', 'deepseek-v4-flash', 'front.flow_config', 'V1', '247495840c67968896ccad2db0a599bd4fc594d0189157dce888b8ede90b3257', '你是业务流程配置设计器。只输出一个合法 JSON 对象,不输出 Markdown、解释或 SQL。\n\n目标用最小 flow_config 描述状态流转、显式 Java 业务动作、多表数量联动、按钮和统计。不要输出 CRUD不要输出通用规则 DSL。\n\n固定结构\n{\n \"version\":\"1.0\",\n \"code\":\"snake_case\",\n \"name\":\"中文业务名\",\n \"mainTable\":\"snake_case\",\n \"statusField\":\"status\",\n \"notFoundMessage\":\"主记录不存在\",\n \"states\":[{\"code\":\"pending\",\"label\":\"待审核\"}],\n \"actions\":[{\n \"code\":\"approve\",\n \"name\":\"审核通过\",\n \"from\":\"pending\",\n \"to\":\"borrowing\",\n \"actor\":\"admin\",\n \"method\":\"POST\",\n \"path\":\"/borrow-record/approve\",\n \"invalidStateMessage\":\"当前状态不能审核\",\n \"successMessage\":\"审核成功\",\n \"audit\":{\"userField\":\"approve_user_id\",\"timeField\":\"approve_time\"},\n \"effects\":[{\n \"type\":\"decrease\",\n \"table\":\"book\",\n \"relationField\":\"book_id\",\n \"field\":\"stock\",\n \"amount\":\"1\",\n \"min\":\"0\",\n \"notFoundMessage\":\"图书不存在\",\n \"errorMessage\":\"图书库存不足\"\n }],\n \"button\":{\"scope\":\"admin\",\"pageCode\":\"borrow_record_list\",\"slot\":\"list.rowActions\",\"type\":\"success\",\"confirm\":\"确认审核通过吗?\",\"order\":10}\n }],\n \"metrics\":[{\"code\":\"borrowing_count\",\"name\":\"借阅中数量\",\"table\":\"borrow_record\",\"aggregate\":\"count\",\"field\":\"id\",\"status\":\"borrowing\",\"unit\":\"条\"}]\n}\n\n约束\n1. code、表名、字段名全部使用小写 snake_case状态 code 使用稳定英文编码label 使用中文。\n2. 每个 action 必须有 from 和 to且二者存在于 states 中并且不相同。\n3. effects.type 只能是 decrease、increase、update_related、create_record。\n4. decrease/increase 必须给 table、relationField、field、amountdecrease 还要给 min。\n5. update_related/create_record 使用 values值可为 currentUserId、now、record.字段名或常量。\n6. 审核人等身份只能通过 audit.userField 表达,由后端登录态注入,不能作为前端可传字段。\n7. 覆盖需求中的完整正向闭环和关键回退/拒绝动作,但不要为普通 CRUD 创建 action。', '请根据以下 JSON 上下文生成 flow_config。appBlueprint 是已确认的页面、角色和菜单范围,必须与它保持一致:\n{\"mode\":\"correction\",\"projectName\":\"图书管理系统\",\"projectDescription\":\"项目定位:一个面向高校图书馆的图书管理系统,供读者在线借书、还书、预约,管理员进行图书管理和借阅审核。\\n\\n角色管理员、读者。\\n\\n核心流程读者检索图书→提交借书申请→管理员审核通过并发放图书→读者还书或续借→管理员确认归还→超期则系统自动生成罚款→读者在线缴纳罚款。\\n\\n关键规则每位读者最多同时借阅5本书借阅期限为30天可续借1次续借期15天超期罚款0.1元/天预约图书保留2天逾期未取自动取消。\\n\\n异常边界库存为0时禁止借出同一读者重复提交同一本书的借书申请时提示“已借出或预约中”状态为“已借出”或“逾期”时无法再次借书预约超时自动释放库存支付罚款时若余额不足则失败。\",\"industryTemplate\":\"\",\"stylePreset\":\"dark-tech\",\"extraRequirements\":\"\",\"confirmedAppBlueprint\":{\"adminHomeDashboard\":{\"charts\":[{\"filters\":[],\"metrics\":[],\"semantic\":\"order\",\"title\":\"借阅趋势\",\"type\":\"line\"},{\"filters\":[],\"metrics\":[],\"semantic\":\"content\",\"title\":\"图书分类分布\",\"type\":\"pie\"}],\"description\":\"核心业务数据\",\"metrics\":[{\"filters\":[],\"semantic\":\"content\"},{\"filters\":[],\"semantic\":\"user\"},{\"filters\":[],\"semantic\":\"order\"},{\"filters\":[],\"semantic\":\"money\"}],\"title\":\"运营总览\"},\"adminMenus\":[{\"code\":\"book_admin\",\"dataScope\":\"ROLE\",\"name\":\"图书管理\",\"pageCode\":\"book_admin_page\",\"pageType\":\"list\",\"path\":\"/admin/books\",\"requiresLogin\":true,\"tableName\":\"book_info\",\"visibleRoles\":[\"admin\"]},{\"code\":\"borrow_admin\",\"dataScope\":\"ROLE\",\"name\":\"借阅审核\",\"pageCode\":\"borrow_admin_page\",\"pageType\":\"list\",\"path\":\"/admin/borrows\",\"requiresLogin\":true,\"tableName\":\"borrow_record\",\"visibleRoles\":[\"admin\"]},{\"code\":\"reader_admin\",\"dataScope\":\"ROLE\",\"name\":\"读者管理\",\"pageCode\":\"reader_admin_page\",\"pageType\":\"list\",\"path\":\"/admin/readers\",\"requiresLogin\":true,\"tableName\":\"reader\",\"visibleRoles\":[\"admin\"]},{\"code\":\"fine_admin\",\"dataScope\":\"ROLE\",\"name\":\"罚款管理\",\"pageCode\":\"fine_admin_page\",\"pageType\":\"list\",\"path\":\"/admin/fines\",\"requiresLogin\":true,\"tableName\":\"fine_record\",\"visibleRoles\":[\"admin\"]},{\"code\":\"admin_profile\",\"dataScope\":\"CURRENT_USER\",\"name\":\"管理员资料\",\"pageCode\":\"admin_profile_page\",\"pageType\":\"form\",\"path\":\"/admin/profile\",\"requiresLogin\":true,\"tableName\":\"admin\",\"visibleRoles\":[\"admin\"]}],\"frontendMenus\":[{\"code\":\"book_catalog\",\"dataScope\":\"PUBLIC\",\"name\":\"图书目录\",\"pageCode\":\"book_catalog_page\",\"pageType\":\"\",\"path\":\"/books\",\"requiresLogin\":false,\"tableName\":\"\",\"visibleRoles\":[]},{\"code\":\"my_borrows\",\"dataScope\":\"CURRENT_USER\",\"name\":\"我的借阅\",\"pageCode\":\"my_borrows_page\",\"pageType\":\"\",\"path\":\"/my/borrows\",\"requiresLogin\":true,\"tableName\":\"\",\"visibleRoles\":[\"reader\"]},{\"code\":\"my_reservations\",\"dataScope\":\"CURRENT_USER\",\"name\":\"我的预约\",\"pageCode\":\"my_reservations_page\",\"pageType\":\"\",\"path\":\"/my/reservations\",\"requiresLogin\":true,\"tableName\":\"\",\"visibleRoles\":[\"reader\"]},{\"code\":\"my_fines\",\"dataScope\":\"CURRENT_USER\",\"name\":\"我的罚款\",\"pageCode\":\"my_fines_page\",\"pageType\":\"\",\"path\":\"/my/fines\",\"requiresLogin\":true,\"tableName\":\"\",\"visibleRoles\":[\"reader\"]},{\"code\":\"reader_profile\",\"dataScope\":\"CURRENT_USER\",\"name\":\"个人信息\",\"pageCode\":\"reader_profile_page\",\"pageType\":\"\",\"path\":\"/my/profile\",\"requiresLogin\":true,\"tableName\":\"\",\"visibleRoles\":[\"reader\"]}],\"frontendPages\":[{\"code\":\"book_catalog_page\",\"menuCode\":\"book_catalog\",\"name\":\"图书目录\",\"pageType\":\"list\",\"parentPageCode\":\"\",\"path\":\"/books\",\"tableName\":\"book_info\"},{\"code\":\"my_borrows_page\",\"menuCode\":\"my_borrows\",\"name\":\"我的借阅\",\"pageType\":\"current_user_list\",\"parentPageCode\":\"\",\"path\":\"/my/borrows\",\"tableName\":\"borrow_record\"},{\"code\":\"my_reservations_page\",\"menuCode\":\"my_reservations\",\"name\":\"我的预约\",\"pageType\":\"current_user_list\",\"parentPageCode\":\"\",\"path\":\"/my/reservations\",\"tableName\":\"reservation\"},{\"code\":\"my_fines_page\",\"menuCode\":\"my_fines\",\"name\":\"我的罚款\",\"pageType\":\"current_user_list\",\"parentPageCode\":\"\",\"path\":\"/my/fines\",\"tableName\":\"fine_record\"},{\"code\":\"reader_profile_page\",\"menuCode\":\"reader_profile\",\"name\":\"个人信息\",\"pageType\":\"form\",\"parentPageCode\":\"\",\"path\":\"/my/profile\",\"tableName\":\"reader\"}],\"roles\":[{\"code\":\"admin\",\"description\":\"系统管理员,负责图书管理、借阅审核等\",\"name\":\"管理员\"},{\"code\":\"reader\",\"description\":\"普通读者,可在线借书、预约、缴纳罚款\",\"name\":\"读者\"}]},\"validationError\":\"统计状态不存在: total_unpaid_fine -> unpaid\",\"originalResponse\":{\"version\":\"1.0\",\"code\":\"borrow_flow\",\"name\":\"借阅管理流程\",\"mainTable\":\"borrow_record\",\"statusField\":\"status\",\"notFoundMessage\":\"借阅记录不存在\",\"states\":[{\"code\":\"pending\",\"label\":\"待审核\"},{\"code\":\"borrowing\",\"label\":\"借阅中\"},{\"code\":\"overdue\",\"label\":\"逾期\"},{\"code\":\"returning\",\"label\":\"归还中\"},{\"code\":\"returned_with_fine\",\"label\":\"待缴费归还\"},{\"code\":\"returned\",\"label\":\"已归还\"},{\"code\":\"cancelled\",\"label\":\"已取消\"}],\"actions\":[{\"code\":\"approve\",\"name\":\"审核通过\",\"from\":\"pending\",\"to\":\"borrowing\",\"actor\":\"admin\",\"method\":\"POST\",\"path\":\"/borrow-record/approve\",\"invalidStateMessage\":\"当前状态不能审核\",\"successMessage\":\"审核成功,图书已借出\",\"audit\":{\"userField\":\"approve_user_id\",\"timeField\":\"approve_time\"},\"effects\":[{\"type\":\"decrease\",\"table\":\"book\",\"relationField\":\"book_id\",\"field\":\"stock\",\"amount\":\"1\",\"min\":\"0\",\"notFoundMessage\":\"图书不存在\",\"errorMessage\":\"图书库存不足\"}],\"button\":{\"scope\":\"admin\",\"pageCode\":\"borrow_admin_page\",\"slot\":\"list.rowActions\",\"type\":\"success\",\"confirm\":\"确认审核通过吗?\",\"order\":10}},{\"code\":\"reject\",\"name\":\"审核拒绝\",\"from\":\"pending\",\"to\":\"cancelled\",\"actor\":\"admin\",\"method\":\"POST\",\"path\":\"/borrow-record/reject\",\"invalidStateMessage\":\"当前状态不能拒绝\",\"successMessage\":\"已拒绝借书申请\",\"audit\":{\"userField\":\"approve_user_id\",\"timeField\":\"approve_time\"},\"effects\":[],\"button\":{\"scope\":\"admin\",\"pageCode\":\"borrow_admin_page\",\"slot\":\"list.rowActions\",\"type\":\"danger\",\"confirm\":\"确认拒绝吗?\",\"order\":20}},{\"code\":\"return_apply\",\"name\":\"申请还书\",\"from\":\"borrowing\",\"to\":\"returning\",\"actor\":\"reader\",\"method\":\"POST\",\"path\":\"/borrow-record/return-apply\",\"invalidStateMessage\":\"当前借阅记录无法申请还书\",\"successMessage\":\"还书申请已提交,请等待管理员确认\",\"audit\":{\"userField\":\"return_applicant_id\",\"timeField\":\"return_apply_time\"},\"effects\":[],\"button\":{\"scope\":\"reader\",\"pageCode\":\"my_borrows_page\",\"slot\":\"list.rowActions\",\"type\":\"primary\",\"confirm\":\"确认申请还书吗?\",\"order\":10}},{\"code\":\"return_apply_overdue\",\"name\":\"逾期还书申请\",\"from\":\"overdue\",\"to\":\"returning\",\"actor\":\"reader\",\"method\":\"POST\",\"path\":\"/borrow-record/return-apply\",\"invalidStateMessage\":\"当前记录无法申请还书\",\"successMessage\":\"还书申请已提交\",\"audit\":{\"userField\":\"return_applicant_id\",\"timeField\":\"return_apply_time\"},\"effects\":[],\"button\":{\"scope\":\"reader\",\"pageCode\":\"my_borrows_page\",\"slot\":\"list.rowActions\",\"type\":\"primary\",\"confirm\":\"确认申请还书吗?\",\"order\":20}},{\"code\":\"confirm_return_normal\",\"name\":\"确认归还\",\"from\":\"returning\",\"to\":\"returned\",\"actor\":\"admin\",\"method\":\"POST\",\"path\":\"/borrow-record/confirm-return\",\"invalidStateMessage\":\"当前状态不能确认归还\",\"successMessage\":\"归还确认成功\",\"audit\":{\"userField\":\"confirm_return_user_id\",\"timeField\":\"confirm_return_time\"},\"effects\":[],\"button\":{\"scope\":\"admin\",\"pageCode\":\"borrow_admin_page\",\"slot\":\"list.rowActions\",\"type\":\"success\",\"confirm\":\"确认归还吗?\",\"order\":30}},{\"code\":\"confirm_return_overdue\",\"name\":\"确认归还(超期)\",\"from\":\"returning\",\"to\":\"returned_with_fine\",\"actor\":\"admin\",\"method\":\"POST\",\"path\":\"/borrow-record/confirm-return-overdue\",\"invalidStateMessage\":\"当前状态不能确认归还\",\"successMessage\":\"归还确认成功,已生成罚款记录\",\"audit\":{\"userField\":\"confirm_return_user_id\",\"timeField\":\"confirm_return_time\"},\"effects\":[{\"type\":\"create_record\",\"table\":\"fine_record\",\"values\":{\"borrow_record_id\":\"record.id\",\"user_id\":\"record.user_id\",\"amount\":\"0.1\",\"status\":\"unpaid\",\"created_at\":\"now\"},\"notFoundMessage\":\"\",\"errorMessage\":\"罚款记录创建失败\"}],\"button\":{\"scope\":\"admin\",\"pageCode\":\"borrow_admin_page\",\"slot\":\"list.rowActions\",\"type\":\"warning\",\"confirm\":\"该记录已超期,确认归还并生成罚款吗?\",\"order\":40}},{\"code\":\"pay_fine\",\"name\":\"缴纳罚款\",\"from\":\"returned_with_fine\",\"to\":\"returned\",\"actor\":\"reader\",\"method\":\"POST\",\"path\":\"/borrow-record/pay-fine\",\"invalidStateMessage\":\"无需缴纳罚款\",\"successMessage\":\"罚款缴纳成功\",\"audit\":{\"userField\":\"pay_fine_user_id\",\"timeField\":\"pay_fine_time\"},\"effects\":[{\"type\":\"update_related\",\"table\":\"fine_record\",\"relationField\":\"id\",\"values\":{\"status\":\"paid\",\"pay_time\":\"now\"},\"notFoundMessage\":\"罚款记录不存在\",\"errorMessage\":\"更新罚款状态失败\"}],\"button\":{\"scope\":\"reader\",\"pageCode\":\"my_borrows_page\",\"slot\":\"list.rowActions\",\"type\":\"primary\",\"confirm\":\"确认缴纳罚款吗?\",\"order\":30}},{\"code\":\"mark_overdue\",\"name\":\"标记逾期\",\"from\":\"borrowing\",\"to\":\"overdue\",\"actor\":\"admin\",\"method\":\"POST\",\"path\":\"/borrow-record/mark-overdue\",\"invalidStateMessage\":\"当前状态不能标记逾期\",\"successMessage\":\"已标记为逾期\",\"audit\":{\"userField\":\"mark_overdue_user_id\",\"timeField\":\"mark_overdue_time\"},\"effects\":[],\"button\":{\"scope\":\"admin\",\"pageCode\":\"borrow_admin_page\",\"slot\":\"list.rowActions\",\"type\":\"warning\",\"confirm\":\"确认标记逾期吗?\",\"order\":50}}],\"metrics\":[{\"code\":\"borrowing_count\",\"name\":\"借阅中数量\",\"table\":\"borrow_record\",\"aggregate\":\"count\",\"field\":\"id\",\"status\":\"borrowing\",\"unit\":\"条\"},{\"code\":\"overdue_count\",\"name\":\"逾期数量\",\"table\":\"borrow_record\",\"aggregate\":\"count\",\"field\":\"id\",\"status\":\"overdue\",\"unit\":\"条\"},{\"code\":\"returned_count\",\"name\":\"已归还数量\",\"table\":\"borrow_record\",\"aggregate\":\"count\",\"field\":\"id\",\"status\":\"returned\",\"unit\":\"条\"},{\"code\":\"pending_count\",\"name\":\"待审核数量\",\"table\":\"borrow_record\",\"aggregate\":\"count\",\"field\":\"id\",\"status\":\"pending\",\"unit\":\"条\"},{\"code\":\"total_unpaid_fine\",\"name\":\"待缴罚款总额\",\"table\":\"fine_record\",\"aggregate\":\"sum\",\"field\":\"amount\",\"status\":\"unpaid\",\"unit\":\"元\"}]}}', '{\n \"version\": \"1.0\",\n \"code\": \"borrow_flow\",\n \"name\": \"借阅管理流程\",\n \"mainTable\": \"borrow_record\",\n \"statusField\": \"status\",\n \"notFoundMessage\": \"借阅记录不存在\",\n \"states\": [\n {\"code\": \"pending\", \"label\": \"待审核\"},\n {\"code\": \"borrowing\", \"label\": \"借阅中\"},\n {\"code\": \"overdue\", \"label\": \"逾期\"},\n {\"code\": \"returning\", \"label\": \"归还中\"},\n {\"code\": \"returned_with_fine\", \"label\": \"待缴费归还\"},\n {\"code\": \"returned\", \"label\": \"已归还\"},\n {\"code\": \"cancelled\", \"label\": \"已取消\"}\n ],\n \"actions\": [\n {\n \"code\": \"approve\",\n \"name\": \"审核通过\",\n \"from\": \"pending\",\n \"to\": \"borrowing\",\n \"actor\": \"admin\",\n \"method\": \"POST\",\n \"path\": \"/borrow-record/approve\",\n \"invalidStateMessage\": \"当前状态不能审核\",\n \"successMessage\": \"审核成功,图书已借出\",\n \"audit\": {\"userField\": \"approve_user_id\", \"timeField\": \"approve_time\"},\n \"effects\": [\n {\n \"type\": \"decrease\",\n \"table\": \"book\",\n \"relationField\": \"book_id\",\n \"field\": \"stock\",\n \"amount\": \"1\",\n \"min\": \"0\",\n \"notFoundMessage\": \"图书不存在\",\n \"errorMessage\": \"图书库存不足\"\n }\n ],\n \"button\": {\"scope\": \"admin\", \"pageCode\": \"borrow_admin_page\", \"slot\": \"list.rowActions\", \"type\": \"success\", \"confirm\": \"确认审核通过吗?\", \"order\": 10}\n },\n {\n \"code\": \"reject\",\n \"name\": \"审核拒绝\",\n \"from\": \"pending\",\n \"to\": \"cancelled\",\n \"actor\": \"admin\",\n \"method\": \"POST\",\n \"path\": \"/borrow-record/reject\",\n \"invalidStateMessage\": \"当前状态不能拒绝\",\n \"successMessage\": \"已拒绝借书申请\",\n \"audit\": {\"userField\": \"approve_user_id\", \"timeField\": \"approve_time\"},\n \"effects\": [],\n \"button\": {\"scope\": \"admin\", \"pageCode\": \"borrow_admin_page\", \"slot\": \"list.rowActions\", \"type\": \"danger\", \"confirm\": \"确认拒绝吗?\", \"order\": 20}\n },\n {\n \"code\": \"return_apply\",\n \"name\": \"申请还书\",\n \"from\": \"borrowing\",\n \"to\": \"returning\",\n \"actor\": \"reader\",\n \"method\": \"POST\",\n \"path\": \"/borrow-record/return-apply\",\n \"invalidStateMessage\": \"当前借阅记录无法申请还书\",\n \"successMessage\": \"还书申请已提交,请等待管理员确认\",\n \"audit\": {\"userField\": \"return_applicant_id\", \"timeField\": \"return_apply_time\"},\n \"effects\": [],\n \"button\": {\"scope\": \"reader\", \"pageCode\": \"my_borrows_page\", \"slot\": \"list.rowActions\", \"type\": \"primary\", \"confirm\": \"确认申请还书吗?\", \"order\": 10}\n },\n {\n \"code\": \"return_apply_overdue\",\n \"name\": \"逾期还书申请\",\n \"from\": \"overdue\",\n \"to\": \"returning\",\n \"actor\": \"reader\",\n \"method\": \"POST\",\n \"path\": \"/borrow-record/return-apply-overdue\",\n \"invalidStateMessage\": \"当前记录无法申请还书\",\n \"successMessage\": \"还书申请已提交\",\n \"audit\": {\"userField\": \"return_applicant_id\", \"timeField\": \"return_apply_time\"},\n \"effects\": [],\n \"button\": {\"scope\": \"reader\", \"pageCode\": \"my_borrows_page\", \"slot\": \"list.rowActions\", \"type\": \"primary\", \"confirm\": \"确认申请还书吗?\", \"order\": 20}\n },\n {\n \"code\": \"confirm_return_normal\",\n \"name\": \"确认归还\",\n \"from\": \"returning\",\n \"to\": \"returned\",\n \"actor\": \"admin\",\n \"method\": \"POST\",\n \"path\": \"/borrow-record/confirm-return\",\n \"invalidStateMessage\": \"当前状态不能确认归还\",\n \"successMessage\": \"归还确认成功\",\n \"audit\": {\"userField\": \"confirm_return_user_id\", \"timeField\": \"confirm_return_time\"},\n \"effects\": [],\n \"button\": {\"scope\": \"admin\", \"pageCode\": \"borrow_admin_page\", \"slot\": \"list.rowActions\", \"type\": \"success\", \"confirm\": \"确认归还吗?\", \"order\": 30}\n },\n {\n \"code\": \"confirm_return_overdue\",\n \"name\": \"确认归还(超期)\",\n \"from\": \"returning\",\n \"to\": \"returned_with_fine\",\n \"actor\": \"admin\",\n \"method\": \"POST\",\n \"path\": \"/borrow-record/confirm-return-overdue\",\n \"invalidStateMessage\": \"当前状态不能确认归还\",\n \"successMessage\": \"归还确认成功,已生成罚款记录\",\n \"audit\": {\"userField\": \"confirm_return_user_id\", \"timeField\": \"confirm_return_time\"},\n \"effects\": [\n {\n \"type\": \"create_record\",\n \"table\": \"fine_record\",\n \"values\": {\n \"borrow_record_id\": \"record.id\",\n \"user_id\": \"record.user_id\",\n \"amount\": \"0.1\",\n \"status\": \"unpaid\",\n \"created_at\": \"now\"\n },\n \"notFoundMessage\": \"\",\n \"errorMessage\": \"罚款记录创建失败\"\n }\n ],\n \"button\": {\"scope\": \"admin\", \"pageCode\": \"borrow_admin_page\", \"slot\": \"list.rowActions\", \"type\": \"warning\", \"confirm\": \"该记录已超期,确认归还并生成罚款吗?\", \"order\": 40}\n },\n {\n \"code\": \"pay_fine\",\n \"name\": \"缴纳罚款\",\n \"from\": \"returned_with_fine\",\n \"to\": \"returned\",\n \"actor\": \"reader\",\n \"method\": \"POST\",\n \"path\": \"/borrow-record/pay-fine\",\n \"invalidStateMessage\": \"无需缴纳罚款\",\n \"successMessage\": \"罚款缴纳成功\",\n \"audit\": {\"userField\": \"pay_fine_user_id\", \"timeField\": \"pay_fine_time\"},\n \"effects\": [\n {\n \"type\": \"update_related\",\n \"table\": \"fine_record\",\n \"relationField\": \"borrow_record_id\",\n \"values\": {\n \"status\": \"paid\",\n \"pay_time\": \"now\"\n },\n \"notFoundMessage\": \"罚款记录不存在\",\n \"errorMessage\": \"更新罚款状态失败\"\n }\n ],\n \"button\": {\"scope\": \"reader\", \"pageCode\": \"my_borrows_page\", \"slot\": \"list.rowActions\", \"type\": \"primary\", \"confirm\": \"确认缴纳罚款吗?\", \"order\": 30}\n },\n {\n \"code\": \"mark_overdue\",\n \"name\": \"标记逾期\",\n \"from\": \"borrowing\",\n \"to\": \"overdue\",\n \"actor\": \"admin\",\n \"method\": \"POST\",\n \"path\": \"/borrow-record/mark-overdue\",\n \"invalidStateMessage\": \"当前状态不能标记逾期\",\n \"successMessage\": \"已标记为逾期\",\n \"audit\": {\"userField\": \"mark_overdue_user_id\", \"timeField\": \"mark_overdue_time\"},\n \"effects\": [],\n \"button\": {\"scope\": \"admin\", \"pageCode\": \"borrow_admin_page\", \"slot\": \"list.rowActions\", \"type\": \"warning\", \"confirm\": \"确认标记逾期吗?\", \"order\": 50}\n }\n ],\n \"metrics\": [\n {\"code\": \"borrowing_count\", \"name\": \"借阅中数量\", \"table\": \"borrow_record\", \"aggregate\": \"count\", \"field\": \"id\", \"status\": \"borrowing\", \"unit\": \"条\"},\n {\"code\": \"overdue_count\", \"name\": \"逾期数量\", \"table\": \"borrow_record\", \"aggregate\": \"count\", \"field\": \"id\", \"status\": \"overdue\", \"unit\": \"条\"},\n {\"code\": \"returned_count\", \"name\": \"已归还数量\", \"table\": \"borrow_record\", \"aggregate\": \"count\", \"field\": \"id\", \"status\": \"returned\", \"unit\": \"条\"},\n {\"code\": \"pending_count\", \"name\": \"待审核数量\", \"table\": \"borrow_record\", \"aggregate\": \"count\", \"field\": \"id\", \"status\": \"pending\", \"unit\": \"条\"}\n ]\n}', '0', 32136, 3231, 512, 2719, 4097, 2079, 3231, 4097, 7328, 2, 0.01092324, '1', NULL, '2026-07-14 15:47:13');
INSERT INTO `front_ai_usage_ledger` VALUES (108, 101, 101, 101, 100, 'database', 'deepseek', 'deepseek-v4-flash', 'front.database', 'V1', '14dcad479b01de068e5c5bc39b5cd7a591a09d334ee6812483d8ac00dd8c9d61', '你是 MySQL 业务数据库设计专家。只输出符合用户消息结构的 JSON根据已确认的应用蓝图和业务闭环生成可直接落地的表、字段、主外键、字典和表操作策略。字段必须业务化且类型合法所有蓝图与闭环引用必须有真实表字段承载不得生成菜单、权限关系、代码或业务动作。', '根据项目输入 JSON 生成 MySQL 数据库设计 JSON只返回 JSON不要 Markdown 围栏或解释。\nConfirmed app blueprint JSON and Confirmed business loop plan JSON are supplied in the input.\nDatabase generation constraints from the business loop plan must be enforced.\nEvery confirmedBusinessLoopPlan.metrics tableName, field, and filters.field must exist in the generated schema. Numeric sum/avg/min/max metric fields must use a compatible numeric column type. Status-filter metric values must remain compatible with the matching stateMachines.states.\nIf input.mode is correction, repair input.originalResponse according to input.validationError and return the complete corrected database JSON. Do not drop unrelated valid tables or fields.\n输出结构{\"tables\":[{\"tableName\":\"car_info\",\"tableComment\":\"车辆信息表\",\"adminMenuName\":\"车辆管理\",\"operations\":{\"add\":true,\"edit\":true,\"remove\":true,\"removeType\":\"physical\",\"reason\":\"\"},\"columns\":[{\"columnName\":\"id\",\"columnLabel\":\"ID\",\"columnComment\":\"主键ID\",\"columnType\":\"bigint(20)\",\"isPk\":\"1\",\"isIncrement\":\"1\",\"isRequired\":\"1\"}]}]}。\n不要使用 field_1 等占位字段;每个表必须包含非空 columns以及 adminMenuName 和 operations.add/edit/remove/removeType/reason。\nadminMenuName 必须来自本表 tableComment/tableName不得复用其他表或宽泛模块名称。\nadminMenuName must come from that table\'s own tableComment or tableName.\n字段数组名称只能是 columns不能使用 fields、fieldDesign、fieldList、columnList。\nEvery table must include a non-empty columns array; use columns exactly.\n每个字段必须包含 columnName、columnLabel、columnComment、columnType、isPk、isIncrement、isRequired。columnLabel 是短 UI 标签columnComment 是完整数据库说明。\n可提供 javaType、htmlTypehtmlType 只能是 input、textarea、select、radio、checkbox、datetime、imageUpload、fileUpload、editor。\nselect/radio/checkbox 应提供 dictType 和 dictOptions。关联选择使用 remote:target_table:value_field:label_field且目标表和值/标签字段必须都存在于本次 tables JSON。\n非主键外键字段应在目标表存在时使用 remote select无目标表的分类、类型、状态使用本地 dictOptions 或普通输入。\n普通主数据表除唯一主键外至少包含 4 个业务字段。\n订单、支付、借还、审批、流程、任务、库存记录等动作记录表使用仅新增关系、审计、日志、历史表使用只读普通主数据表使用完整 CRUD。\n不要生成 businessActions、业务动作、工作流、代码、菜单表、user_role、角色权限表或权限表。\nDo not generate menu tables, user_role tables, role-permission tables, or permission tables.\n表名字段名只使用小写字母、数字、下划线每表必须且只能有一个主键。字段类型只能使用 bigint(20)、int(11)、varchar(n)、char(n)、decimal(p,s)、datetime、date、text、longtext。\n为 confirmedAppBlueprint.roles 中每个角色创建独立账号表admin 使用 admin其他角色使用 role.code。不得使用共享用户表或 role_id/role_code/user_role。\n角色账号表包含 `<role_code>_id` 自增主键、username、password_hash、nickname、status、create_time。admin 只能登录后台,非 admin 角色登录前台。\n生成 frontendPages.tableName 引用的全部表;个人资料页必须绑定对应非 admin 角色账号表。requiresLogin=true 且 dataScope=CURRENT_USER 的业务数据通常包含 user_id。\ncanonicalTableRegistry 中的名称是最终规范表名。confirmedBusinessLoopPlan 若出现与其指向同一业务对象的同义表名,必须使用 canonicalTableRegistry 中的名称,不得同时生成两张同义表。\n根据 confirmedBusinessLoopPlan 创建 coreObjects.tableName、actions.ownerTable补齐 stateMachines.statusField、quantityRules.quantityField 以及 recordRules 和动作前置条件需要的字段。状态值不得超出 stateMachines.states。\n严格实现 confirmedBusinessLoopPlan.businessPoliciesTIME_LIMIT 的 startField、dueField 使用 datetimeOVERDUE_FEE 的 dueField 使用 datetime、daysTargetField 使用 int(11)、targetField 使用 decimal(10,2)QUANTITY_LIMIT 的 targetField 使用 int(11) 且默认值为 0。所有政策字段必须位于政策指定的 tableName禁止只把期限或公式写进 columnComment 而不创建字段。\nDo not invent status values outside stateMachines.states.\n严格遵守 input.limits.maxTables 和 maxColumnsPerTable。\n项目输入 JSON\n{\"mode\":\"generate\",\"projectName\":\"图书管理系统\",\"projectDescription\":\"项目定位:一个面向高校图书馆的图书管理系统,供读者在线借书、还书、预约,管理员进行图书管理和借阅审核。\\n\\n角色管理员、读者。\\n\\n核心流程读者检索图书→提交借书申请→管理员审核通过并发放图书→读者还书或续借→管理员确认归还→超期则系统自动生成罚款→读者在线缴纳罚款。\\n\\n关键规则每位读者最多同时借阅5本书借阅期限为30天可续借1次续借期15天超期罚款0.1元/天预约图书保留2天逾期未取自动取消。\\n\\n异常边界库存为0时禁止借出同一读者重复提交同一本书的借书申请时提示“已借出或预约中”状态为“已借出”或“逾期”时无法再次借书预约超时自动释放库存支付罚款时若余额不足则失败。\",\"industryTemplate\":\"\",\"stylePreset\":\"dark-tech\",\"extraRequirements\":\"\",\"confirmedAppBlueprint\":{\"adminHomeDashboard\":{\"charts\":[{\"filters\":[],\"metrics\":[],\"semantic\":\"order\",\"title\":\"借阅趋势\",\"type\":\"line\"},{\"filters\":[],\"metrics\":[],\"semantic\":\"content\",\"title\":\"图书分类分布\",\"type\":\"pie\"}],\"description\":\"核心业务数据\",\"metrics\":[{\"filters\":[],\"semantic\":\"content\"},{\"filters\":[],\"semantic\":\"user\"},{\"filters\":[],\"semantic\":\"order\"},{\"filters\":[],\"semantic\":\"money\"}],\"title\":\"运营总览\"},\"adminMenus\":[{\"code\":\"book_admin\",\"dataScope\":\"ROLE\",\"name\":\"图书管理\",\"pageCode\":\"book_admin_page\",\"pageType\":\"list\",\"path\":\"/admin/books\",\"requiresLogin\":true,\"tableName\":\"book_info\",\"visibleRoles\":[\"admin\"]},{\"code\":\"borrow_admin\",\"dataScope\":\"ROLE\",\"name\":\"借阅审核\",\"pageCode\":\"borrow_admin_page\",\"pageType\":\"list\",\"path\":\"/admin/borrows\",\"requiresLogin\":true,\"tableName\":\"borrow_record\",\"visibleRoles\":[\"admin\"]},{\"code\":\"reader_admin\",\"dataScope\":\"ROLE\",\"name\":\"读者管理\",\"pageCode\":\"reader_admin_page\",\"pageType\":\"list\",\"path\":\"/admin/readers\",\"requiresLogin\":true,\"tableName\":\"reader\",\"visibleRoles\":[\"admin\"]},{\"code\":\"fine_admin\",\"dataScope\":\"ROLE\",\"name\":\"罚款管理\",\"pageCode\":\"fine_admin_page\",\"pageType\":\"list\",\"path\":\"/admin/fines\",\"requiresLogin\":true,\"tableName\":\"fine_record\",\"visibleRoles\":[\"admin\"]},{\"code\":\"admin_profile\",\"dataScope\":\"CURRENT_USER\",\"name\":\"管理员资料\",\"pageCode\":\"admin_profile_page\",\"pageType\":\"form\",\"path\":\"/admin/profile\",\"requiresLogin\":true,\"tableName\":\"admin\",\"visibleRoles\":[\"admin\"]}],\"frontendMenus\":[{\"code\":\"book_catalog\",\"dataScope\":\"PUBLIC\",\"name\":\"图书目录\",\"pageCode\":\"book_catalog_page\",\"pageType\":\"\",\"path\":\"/books\",\"requiresLogin\":false,\"tableName\":\"\",\"visibleRoles\":[]},{\"code\":\"my_borrows\",\"dataScope\":\"CURRENT_USER\",\"name\":\"我的借阅\",\"pageCode\":\"my_borrows_page\",\"pageType\":\"\",\"path\":\"/my/borrows\",\"requiresLogin\":true,\"tableName\":\"\",\"visibleRoles\":[\"reader\"]},{\"code\":\"my_reservations\",\"dataScope\":\"CURRENT_USER\",\"name\":\"我的预约\",\"pageCode\":\"my_reservations_page\",\"pageType\":\"\",\"path\":\"/my/reservations\",\"requiresLogin\":true,\"tableName\":\"\",\"visibleRoles\":[\"reader\"]},{\"code\":\"my_fines\",\"dataScope\":\"CURRENT_USER\",\"name\":\"我的罚款\",\"pageCode\":\"my_fines_page\",\"pageType\":\"\",\"path\":\"/my/fines\",\"requiresLogin\":true,\"tableName\":\"\",\"visibleRoles\":[\"reader\"]},{\"code\":\"reader_profile\",\"dataScope\":\"CURRENT_USER\",\"name\":\"个人信息\",\"pageCode\":\"reader_profile_page\",\"pageType\":\"\",\"path\":\"/my/profile\",\"requiresLogin\":true,\"tableName\":\"\",\"visibleRoles\":[\"reader\"]}],\"frontendPages\":[{\"code\":\"book_catalog_page\",\"menuCode\":\"book_catalog\",\"name\":\"图书目录\",\"pageType\":\"list\",\"parentPageCode\":\"\",\"path\":\"/books\",\"tableName\":\"book_info\"},{\"code\":\"my_borrows_page\",\"menuCode\":\"my_borrows\",\"name\":\"我的借阅\",\"pageType\":\"current_user_list\",\"parentPageCode\":\"\",\"path\":\"/my/borrows\",\"tableName\":\"borrow_record\"},{\"code\":\"my_reservations_page\",\"menuCode\":\"my_reservations\",\"name\":\"我的预约\",\"pageType\":\"current_user_list\",\"parentPageCode\":\"\",\"path\":\"/my/reservations\",\"tableName\":\"reservation\"},{\"code\":\"my_fines_page\",\"menuCode\":\"my_fines\",\"name\":\"我的罚款\",\"pageType\":\"current_user_list\",\"parentPageCode\":\"\",\"path\":\"/my/fines\",\"tableName\":\"fine_record\"},{\"code\":\"reader_profile_page\",\"menuCode\":\"reader_profile\",\"name\":\"个人信息\",\"pageType\":\"form\",\"parentPageCode\":\"\",\"path\":\"/my/profile\",\"tableName\":\"reader\"}],\"roles\":[{\"code\":\"admin\",\"description\":\"系统管理员,负责图书管理、借阅审核等\",\"name\":\"管理员\"},{\"code\":\"reader\",\"description\":\"普通读者,可在线借书、预约、缴纳罚款\",\"name\":\"读者\"}]},\"flowConfig\":{\"actions\":[{\"actor\":\"admin\",\"audit\":{\"timeField\":\"approve_time\",\"userField\":\"approve_user_id\"},\"button\":{\"confirm\":\"确认审核通过吗?\",\"order\":10,\"pageCode\":\"borrow_admin_page\",\"scope\":\"admin\",\"slot\":\"list.rowActions\",\"type\":\"success\"},\"code\":\"approve\",\"effects\":[{\"amount\":\"1\",\"errorMessage\":\"图书库存不足\",\"field\":\"stock\",\"min\":\"0\",\"notFoundMessage\":\"图书不存在\",\"relationField\":\"book_id\",\"table\":\"book\",\"type\":\"decrease\",\"values\":{}}],\"from\":\"pending\",\"invalidStateMessage\":\"当前状态不能审核\",\"method\":\"POST\",\"name\":\"审核通过\",\"path\":\"/borrow-record/approve\",\"successMessage\":\"审核成功,图书已借出\",\"to\":\"borrowing\"},{\"actor\":\"admin\",\"audit\":{\"timeField\":\"approve_time\",\"userField\":\"approve_user_id\"},\"button\":{\"confirm\":\"确认拒绝吗?\",\"order\":20,\"pageCode\":\"borrow_admin_page\",\"scope\":\"admin\",\"slot\":\"list.rowActions\",\"type\":\"danger\"},\"code\":\"reject\",\"effects\":[],\"from\":\"pending\",\"invalidStateMessage\":\"当前状态不能拒绝\",\"method\":\"POST\",\"name\":\"审核拒绝\",\"path\":\"/borrow-record/reject\",\"successMessage\":\"已拒绝借书申请\",\"to\":\"cancelled\"},{\"actor\":\"reader\",\"audit\":{\"timeField\":\"return_apply_time\",\"userField\":\"return_applicant_id\"},\"button\":{\"confirm\":\"确认申请还书吗?\",\"order\":10,\"pageCode\":\"my_borrows_page\",\"scope\":\"reader\",\"slot\":\"list.rowActions\",\"type\":\"primary\"},\"code\":\"return_apply\",\"effects\":[],\"from\":\"borrowing\",\"invalidStateMessage\":\"当前借阅记录无法申请还书\",\"method\":\"POST\",\"name\":\"申请还书\",\"path\":\"/borrow-record/return-apply\",\"successMessage\":\"还书申请已提交,请等待管理员确认\",\"to\":\"returning\"},{\"actor\":\"reader\",\"audit\":{\"timeField\":\"return_apply_time\",\"userField\":\"return_applicant_id\"},\"button\":{\"confirm\":\"确认申请还书吗?\",\"order\":20,\"pageCode\":\"my_borrows_page\",\"scope\":\"reader\",\"slot\":\"list.rowActions\",\"type\":\"primary\"},\"code\":\"return_apply_overdue\",\"effects\":[],\"from\":\"overdue\",\"invalidStateMessage\":\"当前记录无法申请还书\",\"method\":\"POST\",\"name\":\"逾期还书申请\",\"path\":\"/borrow-record/return-apply-overdue\",\"successMessage\":\"还书申请已提交\",\"to\":\"returning\"},{\"actor\":\"admin\",\"audit\":{\"timeField\":\"confirm_return_time\",\"userField\":\"confirm_return_user_id\"},\"button\":{\"confirm\":\"确认归还吗?\",\"order\":30,\"pageCode\":\"borrow_admin_page\",\"scope\":\"admin\",\"slot\":\"list.rowActions\",\"type\":\"success\"},\"code\":\"confirm_return_normal\",\"effects\":[],\"from\":\"returning\",\"invalidStateMessage\":\"当前状态不能确认归还\",\"method\":\"POST\",\"name\":\"确认归还\",\"path\":\"/borrow-record/confirm-return\",\"successMessage\":\"归还确认成功\",\"to\":\"returned\"},{\"actor\":\"admin\",\"audit\":{\"timeField\":\"confirm_return_time\",\"userField\":\"confirm_return_user_id\"},\"button\":{\"confirm\":\"该记录已超期,确认归还并生成罚款吗?\",\"order\":40,\"pageCode\":\"borrow_admin_page\",\"scope\":\"admin\",\"slot\":\"list.rowActions\",\"type\":\"warning\"},\"code\":\"confirm_return_overdue\",\"effects\":[{\"amount\":\"1\",\"errorMessage\":\"罚款记录创建失败\",\"min\":\"0\",\"notFoundMessage\":\"\",\"table\":\"fine_record\",\"type\":\"create_record\",\"values\":{\"amount\":\"0.1\",\"user_id\":\"record.user_id\",\"created_at\":\"now\",\"borrow_record_id\":\"record.id\",\"status\":\"unpaid\"}}],\"from\":\"returning\",\"invalidStateMessage\":\"当前状态不能确认归还\",\"method\":\"POST\",\"name\":\"确认归还(超期)\",\"path\":\"/borrow-record/confirm-return-overdue\",\"successMessage\":\"归还确认成功,已生成罚款记录\",\"to\":\"returned_with_fine\"},{\"actor\":\"reader\",\"audit\":{\"timeField\":\"pay_fine_time\",\"userField\":\"pay_fine_user_id\"},\"button\":{\"confirm\":\"确认缴纳罚款吗?\",\"order\":30,\"pageCode\":\"my_borrows_page\",\"scope\":\"reader\",\"slot\":\"list.rowActions\",\"type\":\"primary\"},\"code\":\"pay_fine\",\"effects\":[{\"amount\":\"1\",\"errorMessage\":\"更新罚款状态失败\",\"min\":\"0\",\"notFoundMessage\":\"罚款记录不存在\",\"relationField\":\"borrow_record_id\",\"table\":\"fine_record\",\"type\":\"update_related\",\"values\":{\"status\":\"paid\",\"pay_time\":\"now\"}}],\"from\":\"returned_with_fine\",\"invalidStateMessage\":\"无需缴纳罚款\",\"method\":\"POST\",\"name\":\"缴纳罚款\",\"path\":\"/borrow-record/pay-fine\",\"successMessage\":\"罚款缴纳成功\",\"to\":\"returned\"},{\"actor\":\"admin\",\"audit\":{\"timeField\":\"mark_overdue_time\",\"userField\":\"mark_overdue_user_id\"},\"button\":{\"confirm\":\"确认标记逾期吗?\",\"order\":50,\"pageCode\":\"borrow_admin_page\",\"scope\":\"admin\",\"slot\":\"list.rowActions\",\"type\":\"warning\"},\"code\":\"mark_overdue\",\"effects\":[],\"from\":\"borrowing\",\"invalidStateMessage\":\"当前状态不能标记逾期\",\"method\":\"POST\",\"name\":\"标记逾期\",\"path\":\"/borrow-record/mark-overdue\",\"successMessage\":\"已标记为逾期\",\"to\":\"overdue\"}],\"code\":\"borrow_flow\",\"mainTable\":\"borrow_record\",\"metrics\":[{\"aggregate\":\"count\",\"code\":\"borrowing_count\",\"field\":\"id\",\"name\":\"借阅中数量\",\"status\":\"borrowing\",\"table\":\"borrow_record\",\"unit\":\"条\"},{\"aggregate\":\"count\",\"code\":\"overdue_count\",\"field\":\"id\",\"name\":\"逾期数量\",\"status\":\"overdue\",\"table\":\"borrow_record\",\"unit\":\"条\"},{\"aggregate\":\"count\",\"code\":\"returned_count\",\"field\":\"id\",\"name\":\"已归还数量\",\"status\":\"returned\",\"table\":\"borrow_record\",\"unit\":\"条\"},{\"aggregate\":\"count\",\"code\":\"pending_count\",\"field\":\"id\",\"name\":\"待审核数量\",\"status\":\"pending\",\"table\":\"borrow_record\",\"unit\":\"条\"}],\"name\":\"借阅管理流程\",\"notFoundMessage\":\"借阅记录不存在\",\"states\":[{\"code\":\"pending\",\"label\":\"待审核\"},{\"code\":\"borrowing\",\"label\":\"借阅中\"},{\"code\":\"overdue\",\"label\":\"逾期\"},{\"code\":\"returning\",\"label\":\"归还中\"},{\"code\":\"returned_with_fine\",\"label\":\"待缴费归还\"},{\"code\":\"returned\",\"label\":\"已归还\"},{\"code\":\"cancelled\",\"label\":\"已取消\"}],\"statusField\":\"status\",\"version\":\"1.0\"},\"compiledFlowContract\":{\"acceptanceScenarios\":[],\"actions\":[{\"actor\":\"admin\",\"code\":\"approve\",\"name\":\"审核通过\",\"ownerObject\":\"borrow_record\",\"ownerTable\":\"borrow_record\",\"preconditions\":[],\"quantityEffects\":[{\"actionCode\":\"approve\",\"amount\":\"1\",\"effectType\":\"decrease\",\"objectCode\":\"book\",\"quantityField\":\"stock\",\"tableName\":\"book\"}],\"recordEffects\":[],\"required\":true,\"stateTransitions\":[{\"actionCode\":\"approve\",\"fromState\":\"pending\",\"toState\":\"borrowing\"}]},{\"actor\":\"admin\",\"code\":\"reject\",\"name\":\"审核拒绝\",\"ownerObject\":\"borrow_record\",\"ownerTable\":\"borrow_record\",\"preconditions\":[],\"quantityEffects\":[],\"recordEffects\":[],\"required\":true,\"stateTransitions\":[{\"actionCode\":\"reject\",\"fromState\":\"pending\",\"toState\":\"cancelled\"}]},{\"actor\":\"reader\",\"code\":\"return_apply\",\"name\":\"申请还书\",\"ownerObject\":\"borrow_record\",\"ownerTable\":\"borrow_record\",\"preconditions\":[],\"quantityEffects\":[],\"recordEffects\":[],\"required\":true,\"stateTransitions\":[{\"actionCode\":\"return_apply\",\"fromState\":\"borrowing\",\"toState\":\"returning\"}]},{\"actor\":\"reader\",\"code\":\"return_apply_overdue\",\"name\":\"逾期还书申请\",\"ownerObject\":\"borrow_record\",\"ownerTable\":\"borrow_record\",\"preconditions\":[],\"quantityEffects\":[],\"recordEffects\":[],\"required\":true,\"stateTransitions\":[{\"actionCode\":\"return_apply_overdue\",\"fromState\":\"overdue\",\"toState\":\"returning\"}]},{\"actor\":\"admin\",\"code\":\"confirm_return_normal\",\"name\":\"确认归还\",\"ownerObject\":\"borrow_record\",\"ownerTable\":\"borrow_record\",\"preconditions\":[],\"quantityEffects\":[],\"recordEffects\":[],\"required\":true,\"stateTransitions\":[{\"actionCode\":\"confirm_return_normal\",\"fromState\":\"returning\",\"toState\":\"returned\"}]},{\"actor\":\"admin\",\"code\":\"confirm_return_overdue\",\"name\":\"确认归还(超期)\",\"ownerObject\":\"borrow_record\",\"ownerTable\":\"borrow_record\",\"preconditions\":[],\"quantityEffects\":[],\"recordEffects\":[],\"required\":true,\"stateTransitions\":[{\"actionCode\":\"confirm_return_overdue\",\"fromState\":\"returning\",\"toState\":\"returned_with_fine\"}]},{\"actor\":\"reader\",\"code\":\"pay_fine\",\"name\":\"缴纳罚款\",\"ownerObject\":\"borrow_record\",\"ownerTable\":\"borrow_record\",\"preconditions\":[],\"quantityEffects\":[],\"recordEffects\":[],\"required\":true,\"stateTransitions\":[{\"actionCode\":\"pay_fine\",\"fromState\":\"returned_with_fine\",\"toState\":\"returned\"}]},{\"actor\":\"admin\",\"code\":\"mark_overdue\",\"name\":\"标记逾期\",\"ownerObject\":\"borrow_record\",\"ownerTable\":\"borrow_record\",\"preconditions\":[],\"quantityEffects\":[],\"recordEffects\":[],\"required\":true,\"stateTransitions\":[{\"actionCode\":\"mark_overdue\",\"fromState\":\"borrowing\",\"toState\":\"overdue\"}]}],\"businessPolicies\":[],\"coreObjects\":[{\"code\":\"borrow_record\",\"name\":\"借阅管理流程\",\"objectType\":\"main\",\"tableName\":\"borrow_record\"},{\"code\":\"book\",\"name\":\"book\",\"objectType\":\"related\",\"tableName\":\"book\"},{\"code\":\"fine_record\",\"name\":\"fine_record\",\"objectType\":\"related\",\"tableName\":\"fine_record\"}],\"domainName\":\"借阅管理流程\",\"metrics\":[{\"aggregate\":\"count\",\"code\":\"borrowing_count\",\"field\":\"id\",\"filters\":[{\"field\":\"status\",\"operator\":\"eq\",\"values\":[\"borrowing\"]}],\"name\":\"借阅中数量\",\"relatedActionCodes\":[],\"required\":true,\"tableName\":\"borrow_record\",\"unit\":\"条\"},{\"aggregate\":\"count\",\"code\":\"overdue_count\",\"field\":\"id\",\"filters\":[{\"field\":\"status\",\"operator\":\"eq\",\"values\":[\"overdue\"]}],\"name\":\"逾期数量\",\"relatedActionCodes\":[],\"required\":true,\"tableName\":\"borrow_record\",\"unit\":\"条\"},{\"aggregate\":\"count\",\"code\":\"returned_count\",\"field\":\"id\",\"filters\":[{\"field\":\"status\",\"operator\":\"eq\",\"values\":[\"returned\"]}],\"name\":\"已归还数量\",\"relatedActionCodes\":[],\"required\":true,\"tableName\":\"borrow_record\",\"unit\":\"条\"},{\"aggregate\":\"count\",\"code\":\"pending_count\",\"field\":\"id\",\"filters\":[{\"field\":\"status\",\"operator\":\"eq\",\"values\":[\"pending\"]}],\"name\":\"待审核数量\",\"relatedActionCodes\":[],\"required\":true,\"tableName\":\"borrow_record\",\"unit\":\"条\"}],\"pageBindings\":[{\"actionCode\":\"approve\",\"pageCode\":\"borrow_admin_page\",\"slot\":\"list.rowActions\",\"tableName\":\"borrow_record\",\"target\":\"admin\"},{\"actionCode\":\"reject\",\"pageCode\":\"borrow_admin_page\",\"slot\":\"list.rowActions\",\"tableName\":\"borrow_record\",\"target\":\"admin\"},{\"actionCode\":\"return_apply\",\"pageCode\":\"my_borrows_page\",\"slot\":\"list.rowActions\",\"tableName\":\"borrow_record\",\"target\":\"reader\"},{\"actionCode\":\"return_apply_overdue\",\"pageCode\":\"my_borrows_page\",\"slot\":\"list.rowActions\",\"tableName\":\"borrow_record\",\"target\":\"reader\"},{\"actionCode\":\"confirm_return_normal\",\"pageCode\":\"borrow_admin_page\",\"slot\":\"list.rowActions\",\"tableName\":\"borrow_record\",\"target\":\"admin\"},{\"actionCode\":\"confirm_return_overdue\",\"pageCode\":\"borrow_admin_page\",\"slot\":\"list.rowActions\",\"tableName\":\"borrow_record\",\"target\":\"admin\"},{\"actionCode\":\"pay_fine\",\"pageCode\":\"my_borrows_page\",\"slot\":\"list.rowActions\",\"tableName\":\"borrow_record\",\"target\":\"reader\"},{\"actionCode\":\"mark_overdue\",\"pageCode\":\"borrow_admin_page\",\"slot\":\"list.rowActions\",\"tableName\":\"borrow_record\",\"target\":\"admin\"}],\"quantityRules\":[{\"actionCode\":\"approve\",\"amount\":\"1\",\"effectType\":\"decrease\",\"objectCode\":\"book\",\"quantityField\":\"stock\",\"tableName\":\"book\"}],\"recordRules\":[],\"stateMachines\":[{\"objectCode\":\"borrow_record\",\"states\":[\"pending\",\"borrowing\",\"overdue\",\"returning\",\"returned_with_fine\",\"returned\",\"cancelled\"],\"statusField\":\"status\",\"tableName\":\"borrow_record\",\"transitions\":[{\"actionCode\":\"approve\",\"fromState\":\"pending\",\"toState\":\"borrowing\"},{\"actionCode\":\"reject\",\"fromState\":\"pending\",\"toState\":\"cancelled\"},{\"actionCode\":\"return_apply\",\"fromState\":\"borrowing\",\"toState\":\"returning\"},{\"actionCode\":\"return_apply_overdue\",\"fromState\":\"overdue\",\"toState\":\"returning\"},{\"actionCode\":\"confirm_return_normal\",\"fromState\":\"returning\",\"toState\":\"returned\"},{\"actionCode\":\"confirm_return_overdue\",\"fromState\":\"returning\",\"toState\":\"returned_with_fine\"},{\"actionCode\":\"pay_fine\",\"fromState\":\"returned_with_fine\",\"toState\":\"returned\"},{\"actionCode\":\"mark_overdue\",\"fromState\":\"borrowing\",\"toState\":\"overdue\"}]}]},\"canonicalTableRegistry\":[\"book_info\",\"borrow_record\",\"reservation\",\"fine_record\",\"reader\",\"admin\"],\"limits\":{\"maxTables\":12,\"maxColumnsPerTable\":30}}', '{\n \"tables\": [\n {\n \"tableName\": \"book_info\",\n \"tableComment\": \"图书信息表\",\n \"adminMenuName\": \"图书管理\",\n \"operations\": {\n \"add\": true,\n \"edit\": true,\n \"remove\": true,\n \"removeType\": \"physical\",\n \"reason\": \"\"\n },\n \"columns\": [\n {\n \"columnName\": \"id\",\n \"columnLabel\": \"ID\",\n \"columnComment\": \"主键ID\",\n \"columnType\": \"bigint(20)\",\n \"isPk\": \"1\",\n \"isIncrement\": \"1\",\n \"isRequired\": \"1\"\n },\n {\n \"columnName\": \"title\",\n \"columnLabel\": \"书名\",\n \"columnComment\": \"图书名称\",\n \"columnType\": \"varchar(200)\",\n \"isPk\": \"0\",\n \"isIncrement\": \"0\",\n \"isRequired\": \"1\",\n \"javaType\": \"String\",\n \"htmlType\": \"input\"\n },\n {\n \"columnName\": \"author\",\n \"columnLabel\": \"作者\",\n \"columnComment\": \"图书作者\",\n \"columnType\": \"varchar(100)\",\n \"isPk\": \"0\",\n \"isIncrement\": \"0\",\n \"isRequired\": \"1\",\n \"javaType\": \"String\",\n \"htmlType\": \"input\"\n },\n {\n \"columnName\": \"publisher\",\n \"columnLabel\": \"出版社\",\n \"columnComment\": \"出版社名称\",\n \"columnType\": \"varchar(100)\",\n \"isPk\": \"0\",\n \"isIncrement\": \"0\",\n \"isRequired\": \"0\",\n \"javaType\": \"String\",\n \"htmlType\": \"input\"\n },\n {\n \"columnName\": \"isbn\",\n \"columnLabel\": \"ISBN\",\n \"columnComment\": \"国际标准书号\",\n \"columnType\": \"varchar(20)\",\n \"isPk\": \"0\",\n \"isIncrement\": \"0\",\n \"isRequired\": \"1\",\n \"javaType\": \"String\",\n \"htmlType\": \"input\"\n },\n {\n \"columnName\": \"category\",\n \"columnLabel\": \"分类\",\n \"columnComment\": \"图书分类\",\n \"columnType\": \"varchar(50)\",\n \"isPk\": \"0\",\n \"isIncrement\": \"0\",\n \"isRequired\": \"0\",\n \"javaType\": \"String\",\n \"htmlType\": \"select\",\n \"dictType\": \"book_category\",\n \"dictOptions\": [\n {\"label\": \"文学\", \"value\": \"literature\"},\n {\"label\": \"科学\", \"value\": \"science\"},\n {\"label\": \"历史\", \"value\": \"history\"},\n {\"label\": \"技术\", \"value\": \"technology\"},\n {\"label\": \"其他\", \"value\": \"other\"}\n ]\n },\n {\n \"columnName\": \"stock\",\n \"columnLabel\": \"库存\",\n \"columnComment\": \"当前可借库存数量\",\n \"columnType\": \"int(11)\",\n \"isPk\": \"0\",\n \"isIncrement\": \"0\",\n \"isRequired\": \"1\",\n \"javaType\": \"Integer\",\n \"htmlType\": \"input\"\n },\n {\n \"columnName\": \"description\",\n \"columnLabel\": \"简介\",\n \"columnComment\": \"图书简介\",\n \"columnType\": \"text\",\n \"isPk\": \"0\",\n \"isIncrement\": \"0\",\n \"isRequired\": \"0\",\n \"javaType\": \"String\",\n \"htmlType\": \"editor\"\n }\n ]\n },\n {\n \"tableName\": \"borrow_record\",\n \"tableComment\": \"借阅记录表\",\n \"adminMenuName\": \"借阅审核\",\n \"operations\": {\n \"add\": true,\n \"edit\": false,\n \"remove\": false,\n \"removeType\": \"physical\",\n \"reason\": \"仅新增记录,不允许编辑和删除\"\n },\n \"columns\": [\n {\n \"columnName\": \"id\",\n \"columnLabel\": \"ID\",\n \"columnComment\": \"主键ID\",\n \"columnType\": \"bigint(20)\",\n \"isPk\": \"1\",\n \"isIncrement\": \"1\",\n \"isRequired\": \"1\"\n },\n {\n \"columnName\": \"reader_id\",\n \"columnLabel\": \"读者ID\",\n \"columnComment\": \"借阅读者ID关联reader表\",\n \"columnType\": \"bigint(20)\",\n \"isPk\": \"0\",\n \"isIncrement\": \"0\",\n \"isRequired\": \"1\",\n \"javaType\": \"Long\",\n \"htmlType\": \"select\",\n \"dictType\": \"remote:reader:reader_id:nickname\"\n },\n {\n \"columnName\": \"book_id\",\n \"columnLabel\": \"图书ID\",\n \"columnComment\": \"借阅图书ID关联book_info表\",\n \"columnType\": \"bigint(20)\",\n \"isPk\": \"0\",\n \"isIncrement\": \"0\",\n \"isRequired\": \"1\",\n \"javaType\": \"Long\",\n \"htmlType\": \"select\",\n \"dictType\": \"remote:book_info:id:title\"\n },\n {\n \"columnName\": \"borrow_date\",\n \"columnLabel\": \"借书日期\",\n \"columnComment\": \"借出图书的日期\",\n \"columnType\": \"datetime\",\n \"isPk\": \"0\",\n \"isIncrement\": \"0\",\n \"isRequired\": \"1\",\n \"javaType\": \"Date\",\n \"htmlType\": \"datetime\"\n },\n {\n \"columnName\": \"due_date\",\n \"columnLabel\": \"应还日期\",\n \"columnComment\": \"图书应归还日期\",\n \"columnType\": \"datetime\",\n \"isPk\": \"0\",\n \"isIncrement\": \"0\",\n \"isRequired\": \"1\",\n \"javaType\": \"Date\",\n \"htmlType\": \"datetime\"\n },\n {\n \"columnName\": \"return_date\",\n \"columnLabel\": \"实际归还日期\",\n \"columnComment\": \"实际归还图书的日期\",\n \"columnType\": \"datetime\",\n \"isPk\": \"0\",\n \"isIncrement\": \"0\",\n \"isRequired\": \"0\",\n \"javaType\": \"Date\",\n \"htmlType\": \"datetime\"\n },\n {\n \"columnName\": \"renew_count\",\n \"columnLabel\": \"续借次数\",\n \"columnComment\": \"已续借次数最多1次\",\n \"columnType\": \"int(11)\",\n \"isPk\": \"0\",\n \"isIncrement\": \"0\",\n \"isRequired\": \"0\",\n \"javaType\": \"Integer\",\n \"htmlType\": \"input\"\n },\n {\n \"columnName\": \"status\",\n \"columnLabel\": \"借阅状态\",\n \"columnComment\": \"借阅记录状态pending-待审核borrowing-借阅中overdue-逾期returning-归还中returned_with_fine-待缴费归还returned-已归还cancelled-已取消\",\n \"columnType\": \"varchar(20)\",\n \"isPk\": \"0\",\n \"isIncrement\": \"0\",\n \"isRequired\": \"1\",\n \"javaType\": \"String\",\n \"htmlType\": \"select\",\n \"dictType\": \"borrow_status\",\n \"dictOptions\": [\n {\"label\": \"待审核\", \"value\": \"pending\"},\n {\"label\": \"借阅中\", \"value\": \"borrowing\"},\n {\"label\": \"逾期\", \"value\": \"overdue\"},\n {\"label\": \"归还中\", \"value\": \"returning\"},\n {\"label\": \"待缴费归还\", \"value\": \"returned_with_fine\"},\n {\"label\": \"已归还\", \"value\": \"returned\"},\n {\"label\": \"已取消\", \"value\": \"cancelled\"}\n ]\n },\n {\n \"columnName\": \"approve_user_id\",\n \"columnLabel\": \"审核管理员ID\",\n \"columnComment\": \"审核通过的管理员ID关联admin表\",\n \"columnType\": \"bigint(20)\",\n \"isPk\": \"0\",\n \"isIncrement\": \"0\",\n \"isRequired\": \"0\",\n \"javaType\": \"Long\",\n \"htmlType\": \"select\",\n \"dictType\": \"remote:admin:admin_id:username\"\n },\n {\n \"columnName\": \"approve_time\",\n \"columnLabel\": \"审核时间\",\n \"columnComment\": \"审核通过的时间\",\n \"columnType\": \"datetime\",\n \"isPk\": \"0\",\n \"isIncrement\": \"0\",\n \"isRequired\": \"0\",\n \"javaType\": \"Date\",\n \"htmlType\": \"datetime\"\n },\n {\n \"columnName\": \"return_applicant_id\",\n \"columnLabel\": \"还书申请人ID\",\n \"columnComment\": \"申请还书的读者ID关联reader表\",\n \"columnType\": \"bigint(20)\",\n \"isPk\": \"0\",\n \"isIncrement\": \"0\",\n \"isRequired\": \"0\",\n \"javaType\": \"Long\",\n \"htmlType\": \"select\",\n \"dictType\": \"remote:reader:reader_id:nickname\"\n },\n {\n \"columnName\": \"return_apply_time\",\n \"columnLabel\": \"还书申请时间\",\n \"columnComment\": \"申请还书的时间\",\n \"columnType\": \"datetime\",\n \"isPk\": \"0\",\n \"isIncrement\": \"0\",\n \"isRequired\": \"0\",\n \"javaType\": \"Date\",\n \"htmlType\": \"datetime\"\n },\n {\n \"columnName\": \"confirm_return_user_id\",\n \"columnLabel\": \"确认归还管理员ID\",\n \"columnComment\": \"确认归还的管理员ID关联admin表\",\n \"columnType\": \"bigint(20)\",\n \"isPk\": \"0\",\n \"isIncrement\": \"0\",\n \"isRequired\": \"0\",\n \"javaType\": \"Long\",\n \"htmlType\": \"select\",\n \"dictType\": \"remote:admin:admin_id:username\"\n },\n {\n \"columnName\": \"confirm_return_time\",\n \"columnLabel\": \"确认归还时间\",\n \"columnComment\": \"确认归还的时间\",\n \"columnType\": \"datetime\",\n \"isPk\": \"0\",\n \"isIncrement\": \"0\",\n \"isRequired\": \"0\",\n \"javaType\": \"Date\",\n \"htmlType\": \"datetime\"\n },\n {\n \"columnName\": \"mark_overdue_user_id\",\n \"columnLabel\": \"标记逾期管理员ID\",\n \"columnComment\": \"标记逾期的管理员ID关联admin表\",\n \"columnType\": \"bigint(20)\",\n \"isPk\": \"0\",\n \"isIncrement\": \"0\",\n \"isRequired\": \"0\",\n \"javaType\": \"Long\",\n \"htmlType\": \"select\",\n \"dictType\": \"remote:admin:admin_id:username\"\n },\n {\n \"columnName\": \"mark_overdue_time\",\n \"columnLabel\": \"标记逾期时间\",\n \"columnComment\": \"标记逾期的时间\",\n \"columnType\": \"datetime\",\n \"isPk\": \"0\",\n \"isIncrement\": \"0\",\n \"isRequired\": \"0\",\n \"javaType\": \"Date\",\n \"htmlType\": \"datetime\"\n }\n ]\n },\n {\n \"tableName\": \"reservation\",\n \"tableComment\": \"预约记录表\",\n \"adminMenuName\": \"预约记录\",\n \"operations\": {\n \"add\": true,\n \"edit\": false,\n \"remove\": false,\n \"removeType\": \"physical\",\n \"reason\": \"仅新增预约记录,不允许编辑和删除\"\n },\n \"columns\": [\n {\n \"columnName\": \"id\",\n \"columnLabel\": \"ID\",\n \"columnComment\": \"主键ID\",\n \"columnType\": \"bigint(20)\",\n \"isPk\": \"1\",\n \"isIncrement\": \"1\",\n \"isRequired\": \"1\"\n },\n {\n \"columnName\": \"reader_id\",\n \"columnLabel\": \"读者ID\",\n \"columnComment\": \"预约读者ID关联reader表\",\n \"columnType\": \"bigint(20)\",\n \"isPk\": \"0\",\n \"isIncrement\": \"0\",\n \"isRequired\": \"1\",\n \"javaType\": \"Long\",\n \"htmlType\": \"select\",\n \"dictType\": \"remote:reader:reader_id:nickname\"\n },\n {\n \"columnName\": \"book_id\",\n \"columnLabel\": \"图书ID\",\n \"columnComment\": \"预约图书ID关联book_info表\",\n \"columnType\": \"bigint(20)\",\n \"isPk\": \"0\",\n \"isIncrement\": \"0\",\n \"isRequired\": \"1\",\n \"javaType\": \"Long\",\n \"htmlType\": \"select\",\n \"dictType\": \"remote:book_info:id:title\"\n },\n {\n \"columnName\": \"reserve_date\",\n \"columnLabel\": \"预约日期\",\n \"columnComment\": \"发起预约的日期\",\n \"columnType\": \"datetime\",\n \"isPk\": \"0\",\n \"isIncrement\": \"0\",\n \"isRequired\": \"1\",\n \"javaType\": \"Date\",\n \"htmlType\": \"datetime\"\n },\n {\n \"columnName\": \"expire_date\",\n \"columnLabel\": \"过期日期\",\n \"columnComment\": \"预约保留截止日期,超时自动取消\",\n \"columnType\": \"datetime\",\n \"isPk\": \"0\",\n \"isIncrement\": \"0\",\n \"isRequired\": \"1\",\n \"javaType\": \"Date\",\n \"htmlType\": \"datetime\"\n },\n {\n \"columnName\": \"pickup_date\",\n \"columnLabel\": \"取书日期\",\n \"columnComment\": \"实际取书的日期\",\n \"columnType\": \"datetime\",\n \"isPk\": \"0\",\n \"isIncrement\": \"0\",\n \"isRequired\": \"0\",\n \"javaType\": \"Date\",\n \"htmlType\": \"datetime\"\n },\n {\n \"columnName\": \"status\",\n \"columnLabel\": \"预约状态\",\n \"columnComment\": \"预约状态waiting-等待取书picked-已取走cancelled-已取消expired-已过期\",\n \"columnType\": \"varchar(20)\",\n \"isPk\": \"0\",\n \"isIncrement\": \"0\",\n \"isRequired\": \"1\",\n \"javaType\": \"String\",\n \"htmlType\": \"select\",\n \"dictType\": \"reservation_status\",\n \"dictOptions\": [\n {\"label\": \"等待取书\", \"value\": \"waiting\"},\n {\"label\": \"已取走\", \"value\": \"picked\"},\n {\"label\": \"已取消\", \"value\": \"cancelled\"},\n {\"label\": \"已过期\", \"value\": \"expired\"}\n ]\n }\n ]\n },\n {\n \"tableName\": \"fine_record\",\n \"tableComment\": \"罚款记录表\",\n \"adminMenuName\": \"罚款管理\",\n \"operations\": {\n \"add\": true,\n \"edit\": false,\n \"remove\": false,\n \"removeType\": \"physical\",\n \"reason\": \"仅新增罚款记录,不允许编辑和删除\"\n },\n \"columns\": [\n {\n \"columnName\": \"id\",\n \"columnLabel\": \"ID\",\n \"columnComment\": \"主键ID\",\n \"columnType\": \"bigint(20)\",\n \"isPk\": \"1\",\n \"isIncrement\": \"1\",\n \"isRequired\": \"1\"\n },\n {\n \"columnName\": \"borrow_record_id\",\n \"columnLabel\": \"借阅记录ID\",\n \"columnComment\": \"关联的借阅记录ID\",\n \"columnType\": \"bigint(20)\",\n \"isPk\": \"0\",\n \"isIncrement\": \"0\",\n \"isRequired\": \"1\",\n \"javaType\": \"Long\",\n \"htmlType\": \"select\",\n \"dictType\": \"remote:borrow_record:id:borrow_date\"\n },\n {\n \"columnName\": \"reader_id\",\n \"columnLabel\": \"读者ID\",\n \"columnComment\": \"被罚款读者ID关联reader表\",\n \"columnType\": \"bigint(20)\",\n \"isPk\": \"0\",\n \"isIncrement\": \"0\",\n \"isRequired\": \"1\",\n \"javaType\": \"Long\",\n \"htmlType\": \"select\",\n \"dictType\": \"remote:reader:reader_id:nickname\"\n },\n {\n \"columnName\": \"amount\",\n \"columnLabel\": \"罚款金额\",\n \"columnComment\": \"罚款金额(元)\",\n \"columnType\": \"decimal(10,2)\",\n \"isPk\": \"0\",\n \"isIncrement\": \"0\",\n \"isRequired\": \"1\",\n \"javaType\": \"BigDecimal\",\n \"htmlType\": \"input\"\n },\n {\n \"columnName\": \"overdue_days\",\n \"columnLabel\": \"逾期天数\",\n \"columnComment\": \"逾期天数\",\n \"columnType\": \"int(11)\",\n \"isPk\": \"0\",\n \"isIncrement\": \"0\",\n \"isRequired\": \"0\",\n \"javaType\": \"Integer\",\n \"htmlType\": \"input\"\n },\n {\n \"columnName\": \"status\",\n \"columnLabel\": \"罚款状态\",\n \"columnComment\": \"罚款状态unpaid-未支付paid-已支付\",\n \"columnType\": \"varchar(10)\",\n \"isPk\": \"0\",\n \"isIncrement\": \"0\",\n \"isRequired\": \"1\",\n \"javaType\": \"String\",\n \"htmlType\": \"select\",\n \"dictType\": \"fine_status\",\n \"dictOptions\": [\n {\"label\": \"未支付\", \"value\": \"unpaid\"},\n {\"label\": \"已支付\", \"value\": \"paid\"}\n ]\n },\n {\n \"columnName\": \"created_at\",\n \"columnLabel\": \"创建时间\",\n \"columnComment\": \"罚款记录的创建时间\",\n \"columnType\": \"datetime\",\n \"isPk\": \"0\",\n \"isIncrement\": \"0\",\n \"isRequired\": \"1\",\n \"javaType\": \"Date\",\n \"htmlType\": \"datetime\"\n },\n {\n \"columnName\": \"pay_time\",\n \"columnLabel\": \"支付时间\",\n \"columnComment\": \"罚款支付时间\",\n \"columnType\": \"datetime\",\n \"isPk\": \"0\",\n \"isIncrement\": \"0\",\n \"isRequired\": \"0\",\n \"javaType\": \"Date\",\n \"htmlType\": \"datetime\"\n }\n ]\n },\n {\n \"tableName\": \"reader\",\n \"tableComment\": \"读者表\",\n \"adminMenuName\": \"读者管理\",\n \"operations\": {\n \"add\": true,\n \"edit\": true,\n \"remove\": true,\n \"removeType\": \"soft\",\n \"reason\": \"\"\n },\n \"columns\": [\n {\n \"columnName\": \"reader_id\",\n \"columnLabel\": \"读者ID\",\n \"columnComment\": \"读者主键ID也作为登录账号标识\",\n \"columnType\": \"bigint(20)\",\n \"isPk\": \"1\",\n \"isIncrement\": \"1\",\n \"isRequired\": \"1\"\n },\n {\n \"columnName\": \"username\",\n \"columnLabel\": \"用户名\",\n \"columnComment\": \"登录用户名\",\n \"columnType\": \"varchar(50)\",\n \"isPk\": \"0\",\n \"isIncrement\": \"0\",\n \"isRequired\": \"1\",\n \"javaType\": \"String\",\n \"htmlType\": \"input\"\n },\n {\n \"columnName\": \"password_hash\",\n \"columnLabel\": \"密码哈希\",\n \"columnComment\": \"加密后的密码\",\n \"columnType\": \"varchar(255)\",\n \"isPk\": \"0\",\n \"isIncrement\": \"0\",\n \"isRequired\": \"1\",\n \"javaType\": \"String\",\n \"htmlType\": \"input\"\n },\n {\n \"columnName\": \"nickname\",\n \"columnLabel\": \"昵称\",\n \"columnComment\": \"读者昵称\",\n \"columnType\": \"varchar(50)\",\n \"isPk\": \"0\",\n \"isIncrement\": \"0\",\n \"isRequired\": \"0\",\n \"javaType\": \"String\",\n \"htmlType\": \"input\"\n },\n {\n \"columnName\": \"email\",\n \"columnLabel\": \"邮箱\",\n \"columnComment\": \"读者邮箱地址\",\n \"columnType\": \"varchar(100)\",\n \"isPk\": \"0\",\n \"isIncrement\": \"0\",\n \"isRequired\": \"0\",\n \"javaType\": \"String\",\n \"htmlType\": \"input\"\n },\n {\n \"columnName\": \"phone\",\n \"columnLabel\": \"手机号\",\n \"columnComment\": \"读者手机号码\",\n \"columnType\": \"varchar(20)\",\n \"isPk\": \"0\",\n \"isIncrement\": \"0\",\n \"isRequired\": \"0\",\n \"javaType\": \"String\",\n \"htmlType\": \"input\"\n },\n {\n \"columnName\": \"status\",\n \"columnLabel\": \"状态\",\n \"columnComment\": \"账号状态1-正常0-禁用\",\n \"columnType\": \"char(1)\",\n \"isPk\": \"0\",\n \"isIncrement\": \"0\",\n \"isRequired\": \"1\",\n \"javaType\": \"String\",\n \"htmlType\": \"select\",\n \"dictType\": \"account_status\",\n \"dictOptions\": [\n {\"label\": \"正常\", \"value\": \"1\"},\n {\"label\": \"禁用\", \"value\": \"0\"}\n ]\n },\n {\n \"columnName\": \"deleted\",\n \"columnLabel\": \"删除标记\",\n \"columnComment\": \"软删除标记0-未删除1-已删除\",\n \"columnType\": \"tinyint(1)\",\n \"isPk\": \"0\",\n \"isIncrement\": \"0\",\n \"isRequired\": \"1\",\n \"javaType\": \"Integer\",\n \"htmlType\": \"input\"\n },\n {\n \"columnName\": \"create_time\",\n \"columnLabel\": \"创建时间\",\n \"columnComment\": \"账号创建时间\",\n \"columnType\": \"datetime\",\n \"isPk\": \"0\",\n \"isIncrement\": \"0\",\n \"isRequired\": \"1\",\n \"javaType\": \"Date\",\n \"htmlType\": \"datetime\"\n }\n ]\n },\n {\n \"tableName\": \"admin\",\n \"tableComment\": \"管理员表\",\n \"adminMenuName\": \"管理员资料\",\n \"operations\": {\n \"add\": false,\n \"edit\": true,\n \"remove\": false,\n \"removeType\": \"physical\",\n \"reason\": \"管理员账号不允许添加和删除,仅可编辑\"\n },\n \"columns\": [\n {\n \"columnName\": \"admin_id\",\n \"columnLabel\": \"管理员ID\",\n \"columnComment\": \"管理员主键ID\",\n \"columnType\": \"bigint(20)\",\n \"isPk\": \"1\",\n \"isIncrement\": \"1\",\n \"isRequired\": \"1\"\n },\n {\n \"columnName\": \"username\",\n \"columnLabel\": \"用户名\",\n \"columnComment\": \"登录用户名\",\n \"columnType\": \"varchar(50)\",\n \"isPk\": \"0\",\n \"isIncrement\": \"0\",\n \"isRequired\": \"1\",\n \"javaType\": \"String\",\n \"htmlType\": \"input\"\n },\n {\n \"columnName\": \"password_hash\",\n \"columnLabel\": \"密码哈希\",\n \"columnComment\": \"加密后的密码\",\n \"columnType\": \"varchar(255)\",\n \"isPk\": \"0\",\n \"isIncrement\": \"0\",\n \"isRequired\": \"1\",\n \"javaType\": \"String\",\n \"htmlType\": \"input\"\n },\n {\n \"columnName\": \"nickname\",\n \"columnLabel\": \"昵称\",\n \"columnComment\": \"管理员昵称\",\n \"columnType\": \"varchar(50)\",\n \"isPk\": \"0\",\n \"isIncrement\": \"0\",\n \"isRequired\": \"0\",\n \"javaType\": \"String\",\n \"htmlType\": \"input\"\n },\n {\n \"columnName\": \"status\",\n \"columnLabel\": \"状态\",\n \"columnComment\": \"账号状态1-正常0-禁用\",\n \"columnType\": \"char(1)\",\n \"isPk\": \"0\",\n \"isIncrement\": \"0\",\n \"isRequired\": \"1\",\n \"javaType\": \"String\",\n \"htmlType\": \"select\",\n \"dictType\": \"account_status\",\n \"dictOptions\": [\n {\"label\": \"正常\", \"value\": \"1\"},\n {\"label\": \"禁用\", \"value\": \"0\"}\n ]\n },\n {\n \"columnName\": \"create_time\",\n \"columnLabel\": \"创建时间\",\n \"columnComment\": \"账号创建时间\",\n \"columnType\": \"datetime\",\n \"isPk\": \"0\",\n \"isIncrement\": \"0\",\n \"isRequired\": \"1\",\n \"javaType\": \"Date\",\n \"htmlType\": \"datetime\"\n }\n ]\n }\n ]\n}', '0', 69617, 5306, NULL, 5306, 9618, 3884, 5306, 9618, 14924, 3, 0.02454200, '1', NULL, '2026-07-14 15:48:23');
INSERT INTO `front_ai_usage_ledger` VALUES (109, 101, 101, 101, 100, 'database', 'deepseek', 'deepseek-v4-flash', 'front.database', 'V1', '14dcad479b01de068e5c5bc39b5cd7a591a09d334ee6812483d8ac00dd8c9d61', '你是 MySQL 业务数据库设计专家。只输出符合用户消息结构的 JSON根据已确认的应用蓝图和业务闭环生成可直接落地的表、字段、主外键、字典和表操作策略。字段必须业务化且类型合法所有蓝图与闭环引用必须有真实表字段承载不得生成菜单、权限关系、代码或业务动作。', '根据项目输入 JSON 生成 MySQL 数据库设计 JSON只返回 JSON不要 Markdown 围栏或解释。\nConfirmed app blueprint JSON and Confirmed business loop plan JSON are supplied in the input.\nDatabase generation constraints from the business loop plan must be enforced.\nEvery confirmedBusinessLoopPlan.metrics tableName, field, and filters.field must exist in the generated schema. Numeric sum/avg/min/max metric fields must use a compatible numeric column type. Status-filter metric values must remain compatible with the matching stateMachines.states.\nIf input.mode is correction, repair input.originalResponse according to input.validationError and return the complete corrected database JSON. Do not drop unrelated valid tables or fields.\n输出结构{\"tables\":[{\"tableName\":\"car_info\",\"tableComment\":\"车辆信息表\",\"adminMenuName\":\"车辆管理\",\"operations\":{\"add\":true,\"edit\":true,\"remove\":true,\"removeType\":\"physical\",\"reason\":\"\"},\"columns\":[{\"columnName\":\"id\",\"columnLabel\":\"ID\",\"columnComment\":\"主键ID\",\"columnType\":\"bigint(20)\",\"isPk\":\"1\",\"isIncrement\":\"1\",\"isRequired\":\"1\"}]}]}。\n不要使用 field_1 等占位字段;每个表必须包含非空 columns以及 adminMenuName 和 operations.add/edit/remove/removeType/reason。\nadminMenuName 必须来自本表 tableComment/tableName不得复用其他表或宽泛模块名称。\nadminMenuName must come from that table\'s own tableComment or tableName.\n字段数组名称只能是 columns不能使用 fields、fieldDesign、fieldList、columnList。\nEvery table must include a non-empty columns array; use columns exactly.\n每个字段必须包含 columnName、columnLabel、columnComment、columnType、isPk、isIncrement、isRequired。columnLabel 是短 UI 标签columnComment 是完整数据库说明。\n可提供 javaType、htmlTypehtmlType 只能是 input、textarea、select、radio、checkbox、datetime、imageUpload、fileUpload、editor。\nselect/radio/checkbox 应提供 dictType 和 dictOptions。关联选择使用 remote:target_table:value_field:label_field且目标表和值/标签字段必须都存在于本次 tables JSON。\n非主键外键字段应在目标表存在时使用 remote select无目标表的分类、类型、状态使用本地 dictOptions 或普通输入。\n普通主数据表除唯一主键外至少包含 4 个业务字段。\n订单、支付、借还、审批、流程、任务、库存记录等动作记录表使用仅新增关系、审计、日志、历史表使用只读普通主数据表使用完整 CRUD。\n不要生成 businessActions、业务动作、工作流、代码、菜单表、user_role、角色权限表或权限表。\nDo not generate menu tables, user_role tables, role-permission tables, or permission tables.\n表名字段名只使用小写字母、数字、下划线每表必须且只能有一个主键。字段类型只能使用 bigint(20)、int(11)、varchar(n)、char(n)、decimal(p,s)、datetime、date、text、longtext。\n为 confirmedAppBlueprint.roles 中每个角色创建独立账号表admin 使用 admin其他角色使用 role.code。不得使用共享用户表或 role_id/role_code/user_role。\n角色账号表包含 `<role_code>_id` 自增主键、username、password_hash、nickname、status、create_time。admin 只能登录后台,非 admin 角色登录前台。\n生成 frontendPages.tableName 引用的全部表;个人资料页必须绑定对应非 admin 角色账号表。requiresLogin=true 且 dataScope=CURRENT_USER 的业务数据通常包含 user_id。\ncanonicalTableRegistry 中的名称是最终规范表名。confirmedBusinessLoopPlan 若出现与其指向同一业务对象的同义表名,必须使用 canonicalTableRegistry 中的名称,不得同时生成两张同义表。\n根据 confirmedBusinessLoopPlan 创建 coreObjects.tableName、actions.ownerTable补齐 stateMachines.statusField、quantityRules.quantityField 以及 recordRules 和动作前置条件需要的字段。状态值不得超出 stateMachines.states。\n严格实现 confirmedBusinessLoopPlan.businessPoliciesTIME_LIMIT 的 startField、dueField 使用 datetimeOVERDUE_FEE 的 dueField 使用 datetime、daysTargetField 使用 int(11)、targetField 使用 decimal(10,2)QUANTITY_LIMIT 的 targetField 使用 int(11) 且默认值为 0。所有政策字段必须位于政策指定的 tableName禁止只把期限或公式写进 columnComment 而不创建字段。\nDo not invent status values outside stateMachines.states.\n严格遵守 input.limits.maxTables 和 maxColumnsPerTable。\n项目输入 JSON\n{\"industryTemplate\":\"\",\"canonicalTableRegistry\":[\"book_info\",\"borrow_record\",\"reservation\",\"fine_record\",\"reader\",\"admin\"],\"validationError\":\"Business loop plan does not match current database: Missing quantity field: book.stock\",\"compiledFlowContract\":{\"acceptanceScenarios\":[],\"actions\":[{\"actor\":\"admin\",\"code\":\"approve\",\"name\":\"审核通过\",\"ownerObject\":\"borrow_record\",\"ownerTable\":\"borrow_record\",\"preconditions\":[],\"quantityEffects\":[{\"actionCode\":\"approve\",\"amount\":\"1\",\"effectType\":\"decrease\",\"objectCode\":\"book\",\"quantityField\":\"stock\",\"tableName\":\"book\"}],\"recordEffects\":[],\"required\":true,\"stateTransitions\":[{\"actionCode\":\"approve\",\"fromState\":\"pending\",\"toState\":\"borrowing\"}]},{\"actor\":\"admin\",\"code\":\"reject\",\"name\":\"审核拒绝\",\"ownerObject\":\"borrow_record\",\"ownerTable\":\"borrow_record\",\"preconditions\":[],\"quantityEffects\":[],\"recordEffects\":[],\"required\":true,\"stateTransitions\":[{\"actionCode\":\"reject\",\"fromState\":\"pending\",\"toState\":\"cancelled\"}]},{\"actor\":\"reader\",\"code\":\"return_apply\",\"name\":\"申请还书\",\"ownerObject\":\"borrow_record\",\"ownerTable\":\"borrow_record\",\"preconditions\":[],\"quantityEffects\":[],\"recordEffects\":[],\"required\":true,\"stateTransitions\":[{\"actionCode\":\"return_apply\",\"fromState\":\"borrowing\",\"toState\":\"returning\"}]},{\"actor\":\"reader\",\"code\":\"return_apply_overdue\",\"name\":\"逾期还书申请\",\"ownerObject\":\"borrow_record\",\"ownerTable\":\"borrow_record\",\"preconditions\":[],\"quantityEffects\":[],\"recordEffects\":[],\"required\":true,\"stateTransitions\":[{\"actionCode\":\"return_apply_overdue\",\"fromState\":\"overdue\",\"toState\":\"returning\"}]},{\"actor\":\"admin\",\"code\":\"confirm_return_normal\",\"name\":\"确认归还\",\"ownerObject\":\"borrow_record\",\"ownerTable\":\"borrow_record\",\"preconditions\":[],\"quantityEffects\":[],\"recordEffects\":[],\"required\":true,\"stateTransitions\":[{\"actionCode\":\"confirm_return_normal\",\"fromState\":\"returning\",\"toState\":\"returned\"}]},{\"actor\":\"admin\",\"code\":\"confirm_return_overdue\",\"name\":\"确认归还(超期)\",\"ownerObject\":\"borrow_record\",\"ownerTable\":\"borrow_record\",\"preconditions\":[],\"quantityEffects\":[],\"recordEffects\":[],\"required\":true,\"stateTransitions\":[{\"actionCode\":\"confirm_return_overdue\",\"fromState\":\"returning\",\"toState\":\"returned_with_fine\"}]},{\"actor\":\"reader\",\"code\":\"pay_fine\",\"name\":\"缴纳罚款\",\"ownerObject\":\"borrow_record\",\"ownerTable\":\"borrow_record\",\"preconditions\":[],\"quantityEffects\":[],\"recordEffects\":[],\"required\":true,\"stateTransitions\":[{\"actionCode\":\"pay_fine\",\"fromState\":\"returned_with_fine\",\"toState\":\"returned\"}]},{\"actor\":\"admin\",\"code\":\"mark_overdue\",\"name\":\"标记逾期\",\"ownerObject\":\"borrow_record\",\"ownerTable\":\"borrow_record\",\"preconditions\":[],\"quantityEffects\":[],\"recordEffects\":[],\"required\":true,\"stateTransitions\":[{\"actionCode\":\"mark_overdue\",\"fromState\":\"borrowing\",\"toState\":\"overdue\"}]}],\"businessPolicies\":[],\"coreObjects\":[{\"code\":\"borrow_record\",\"name\":\"借阅管理流程\",\"objectType\":\"main\",\"tableName\":\"borrow_record\"},{\"code\":\"book\",\"name\":\"book\",\"objectType\":\"related\",\"tableName\":\"book\"},{\"code\":\"fine_record\",\"name\":\"fine_record\",\"objectType\":\"related\",\"tableName\":\"fine_record\"}],\"domainName\":\"借阅管理流程\",\"metrics\":[{\"aggregate\":\"count\",\"code\":\"borrowing_count\",\"field\":\"id\",\"filters\":[{\"field\":\"status\",\"operator\":\"eq\",\"values\":[\"borrowing\"]}],\"name\":\"借阅中数量\",\"relatedActionCodes\":[],\"required\":true,\"tableName\":\"borrow_record\",\"unit\":\"条\"},{\"aggregate\":\"count\",\"code\":\"overdue_count\",\"field\":\"id\",\"filters\":[{\"field\":\"status\",\"operator\":\"eq\",\"values\":[\"overdue\"]}],\"name\":\"逾期数量\",\"relatedActionCodes\":[],\"required\":true,\"tableName\":\"borrow_record\",\"unit\":\"条\"},{\"aggregate\":\"count\",\"code\":\"returned_count\",\"field\":\"id\",\"filters\":[{\"field\":\"status\",\"operator\":\"eq\",\"values\":[\"returned\"]}],\"name\":\"已归还数量\",\"relatedActionCodes\":[],\"required\":true,\"tableName\":\"borrow_record\",\"unit\":\"条\"},{\"aggregate\":\"count\",\"code\":\"pending_count\",\"field\":\"id\",\"filters\":[{\"field\":\"status\",\"operator\":\"eq\",\"values\":[\"pending\"]}],\"name\":\"待审核数量\",\"relatedActionCodes\":[],\"required\":true,\"tableName\":\"borrow_record\",\"unit\":\"条\"}],\"pageBindings\":[{\"actionCode\":\"approve\",\"pageCode\":\"borrow_admin_page\",\"slot\":\"list.rowActions\",\"tableName\":\"borrow_record\",\"target\":\"admin\"},{\"actionCode\":\"reject\",\"pageCode\":\"borrow_admin_page\",\"slot\":\"list.rowActions\",\"tableName\":\"borrow_record\",\"target\":\"admin\"},{\"actionCode\":\"return_apply\",\"pageCode\":\"my_borrows_page\",\"slot\":\"list.rowActions\",\"tableName\":\"borrow_record\",\"target\":\"reader\"},{\"actionCode\":\"return_apply_overdue\",\"pageCode\":\"my_borrows_page\",\"slot\":\"list.rowActions\",\"tableName\":\"borrow_record\",\"target\":\"reader\"},{\"actionCode\":\"confirm_return_normal\",\"pageCode\":\"borrow_admin_page\",\"slot\":\"list.rowActions\",\"tableName\":\"borrow_record\",\"target\":\"admin\"},{\"actionCode\":\"confirm_return_overdue\",\"pageCode\":\"borrow_admin_page\",\"slot\":\"list.rowActions\",\"tableName\":\"borrow_record\",\"target\":\"admin\"},{\"actionCode\":\"pay_fine\",\"pageCode\":\"my_borrows_page\",\"slot\":\"list.rowActions\",\"tableName\":\"borrow_record\",\"target\":\"reader\"},{\"actionCode\":\"mark_overdue\",\"pageCode\":\"borrow_admin_page\",\"slot\":\"list.rowActions\",\"tableName\":\"borrow_record\",\"target\":\"admin\"}],\"quantityRules\":[{\"actionCode\":\"approve\",\"amount\":\"1\",\"effectType\":\"decrease\",\"objectCode\":\"book\",\"quantityField\":\"stock\",\"tableName\":\"book\"}],\"recordRules\":[],\"stateMachines\":[{\"objectCode\":\"borrow_record\",\"states\":[\"pending\",\"borrowing\",\"overdue\",\"returning\",\"returned_with_fine\",\"returned\",\"cancelled\"],\"statusField\":\"status\",\"tableName\":\"borrow_record\",\"transitions\":[{\"actionCode\":\"approve\",\"fromState\":\"pending\",\"toState\":\"borrowing\"},{\"actionCode\":\"reject\",\"fromState\":\"pending\",\"toState\":\"cancelled\"},{\"actionCode\":\"return_apply\",\"fromState\":\"borrowing\",\"toState\":\"returning\"},{\"actionCode\":\"return_apply_overdue\",\"fromState\":\"overdue\",\"toState\":\"returning\"},{\"actionCode\":\"confirm_return_normal\",\"fromState\":\"returning\",\"toState\":\"returned\"},{\"actionCode\":\"confirm_return_overdue\",\"fromState\":\"returning\",\"toState\":\"returned_with_fine\"},{\"actionCode\":\"pay_fine\",\"fromState\":\"returned_with_fine\",\"toState\":\"returned\"},{\"actionCode\":\"mark_overdue\",\"fromState\":\"borrowing\",\"toState\":\"overdue\"}]}]},\"mode\":\"correction\",\"confirmedAppBlueprint\":{\"adminHomeDashboard\":{\"charts\":[{\"filters\":[],\"metrics\":[],\"semantic\":\"order\",\"title\":\"借阅趋势\",\"type\":\"line\"},{\"filters\":[],\"metrics\":[],\"semantic\":\"content\",\"title\":\"图书分类分布\",\"type\":\"pie\"}],\"description\":\"核心业务数据\",\"metrics\":[{\"filters\":[],\"semantic\":\"content\"},{\"filters\":[],\"semantic\":\"user\"},{\"filters\":[],\"semantic\":\"order\"},{\"filters\":[],\"semantic\":\"money\"}],\"title\":\"运营总览\"},\"adminMenus\":[{\"code\":\"book_admin\",\"dataScope\":\"ROLE\",\"name\":\"图书管理\",\"pageCode\":\"book_admin_page\",\"pageType\":\"list\",\"path\":\"/admin/books\",\"requiresLogin\":true,\"tableName\":\"book_info\",\"visibleRoles\":[\"admin\"]},{\"code\":\"borrow_admin\",\"dataScope\":\"ROLE\",\"name\":\"借阅审核\",\"pageCode\":\"borrow_admin_page\",\"pageType\":\"list\",\"path\":\"/admin/borrows\",\"requiresLogin\":true,\"tableName\":\"borrow_record\",\"visibleRoles\":[\"admin\"]},{\"code\":\"reader_admin\",\"dataScope\":\"ROLE\",\"name\":\"读者管理\",\"pageCode\":\"reader_admin_page\",\"pageType\":\"list\",\"path\":\"/admin/readers\",\"requiresLogin\":true,\"tableName\":\"reader\",\"visibleRoles\":[\"admin\"]},{\"code\":\"fine_admin\",\"dataScope\":\"ROLE\",\"name\":\"罚款管理\",\"pageCode\":\"fine_admin_page\",\"pageType\":\"list\",\"path\":\"/admin/fines\",\"requiresLogin\":true,\"tableName\":\"fine_record\",\"visibleRoles\":[\"admin\"]},{\"code\":\"admin_profile\",\"dataScope\":\"CURRENT_USER\",\"name\":\"管理员资料\",\"pageCode\":\"admin_profile_page\",\"pageType\":\"form\",\"path\":\"/admin/profile\",\"requiresLogin\":true,\"tableName\":\"admin\",\"visibleRoles\":[\"admin\"]}],\"frontendMenus\":[{\"code\":\"book_catalog\",\"dataScope\":\"PUBLIC\",\"name\":\"图书目录\",\"pageCode\":\"book_catalog_page\",\"pageType\":\"\",\"path\":\"/books\",\"requiresLogin\":false,\"tableName\":\"\",\"visibleRoles\":[]},{\"code\":\"my_borrows\",\"dataScope\":\"CURRENT_USER\",\"name\":\"我的借阅\",\"pageCode\":\"my_borrows_page\",\"pageType\":\"\",\"path\":\"/my/borrows\",\"requiresLogin\":true,\"tableName\":\"\",\"visibleRoles\":[\"reader\"]},{\"code\":\"my_reservations\",\"dataScope\":\"CURRENT_USER\",\"name\":\"我的预约\",\"pageCode\":\"my_reservations_page\",\"pageType\":\"\",\"path\":\"/my/reservations\",\"requiresLogin\":true,\"tableName\":\"\",\"visibleRoles\":[\"reader\"]},{\"code\":\"my_fines\",\"dataScope\":\"CURRENT_USER\",\"name\":\"我的罚款\",\"pageCode\":\"my_fines_page\",\"pageType\":\"\",\"path\":\"/my/fines\",\"requiresLogin\":true,\"tableName\":\"\",\"visibleRoles\":[\"reader\"]},{\"code\":\"reader_profile\",\"dataScope\":\"CURRENT_USER\",\"name\":\"个人信息\",\"pageCode\":\"reader_profile_page\",\"pageType\":\"\",\"path\":\"/my/profile\",\"requiresLogin\":true,\"tableName\":\"\",\"visibleRoles\":[\"reader\"]}],\"frontendPages\":[{\"code\":\"book_catalog_page\",\"menuCode\":\"book_catalog\",\"name\":\"图书目录\",\"pageType\":\"list\",\"parentPageCode\":\"\",\"path\":\"/books\",\"tableName\":\"book_info\"},{\"code\":\"my_borrows_page\",\"menuCode\":\"my_borrows\",\"name\":\"我的借阅\",\"pageType\":\"current_user_list\",\"parentPageCode\":\"\",\"path\":\"/my/borrows\",\"tableName\":\"borrow_record\"},{\"code\":\"my_reservations_page\",\"menuCode\":\"my_reservations\",\"name\":\"我的预约\",\"pageType\":\"current_user_list\",\"parentPageCode\":\"\",\"path\":\"/my/reservations\",\"tableName\":\"reservation\"},{\"code\":\"my_fines_page\",\"menuCode\":\"my_fines\",\"name\":\"我的罚款\",\"pageType\":\"current_user_list\",\"parentPageCode\":\"\",\"path\":\"/my/fines\",\"tableName\":\"fine_record\"},{\"code\":\"reader_profile_page\",\"menuCode\":\"reader_profile\",\"name\":\"个人信息\",\"pageType\":\"form\",\"parentPageCode\":\"\",\"path\":\"/my/profile\",\"tableName\":\"reader\"}],\"roles\":[{\"code\":\"admin\",\"description\":\"系统管理员,负责图书管理、借阅审核等\",\"name\":\"管理员\"},{\"code\":\"reader\",\"description\":\"普通读者,可在线借书、预约、缴纳罚款\",\"name\":\"读者\"}]},\"extraRequirements\":\"\",\"projectDescription\":\"项目定位:一个面向高校图书馆的图书管理系统,供读者在线借书、还书、预约,管理员进行图书管理和借阅审核。\\n\\n角色管理员、读者。\\n\\n核心流程读者检索图书→提交借书申请→管理员审核通过并发放图书→读者还书或续借→管理员确认归还→超期则系统自动生成罚款→读者在线缴纳罚款。\\n\\n关键规则每位读者最多同时借阅5本书借阅期限为30天可续借1次续借期15天超期罚款0.1元/天预约图书保留2天逾期未取自动取消。\\n\\n异常边界库存为0时禁止借出同一读者重复提交同一本书的借书申请时提示“已借出或预约中”状态为“已借出”或“逾期”时无法再次借书预约超时自动释放库存支付罚款时若余额不足则失败。\",\"stylePreset\":\"dark-tech\",\"originalResponse\":{\"tables\":[{\"tableName\":\"book_info\",\"tableComment\":\"图书信息表\",\"adminMenuName\":\"图书管理\",\"operations\":{\"add\":true,\"edit\":true,\"remove\":true,\"removeType\":\"physical\",\"reason\":\"\"},\"columns\":[{\"columnName\":\"id\",\"columnLabel\":\"ID\",\"columnComment\":\"主键ID\",\"columnType\":\"bigint(20)\",\"isPk\":\"1\",\"isIncrement\":\"1\",\"isRequired\":\"1\"},{\"columnName\":\"title\",\"columnLabel\":\"书名\",\"columnComment\":\"图书名称\",\"columnType\":\"varchar(200)\",\"isPk\":\"0\",\"isIncrement\":\"0\",\"isRequired\":\"1\",\"javaType\":\"String\",\"htmlType\":\"input\"},{\"columnName\":\"author\",\"columnLabel\":\"作者\",\"columnComment\":\"图书作者\",\"columnType\":\"varchar(100)\",\"isPk\":\"0\",\"isIncrement\":\"0\",\"isRequired\":\"1\",\"javaType\":\"String\",\"htmlType\":\"input\"},{\"columnName\":\"publisher\",\"columnLabel\":\"出版社\",\"columnComment\":\"出版社名称\",\"columnType\":\"varchar(100)\",\"isPk\":\"0\",\"isIncrement\":\"0\",\"isRequired\":\"0\",\"javaType\":\"String\",\"htmlType\":\"input\"},{\"columnName\":\"isbn\",\"columnLabel\":\"ISBN\",\"columnComment\":\"国际标准书号\",\"columnType\":\"varchar(20)\",\"isPk\":\"0\",\"isIncrement\":\"0\",\"isRequired\":\"1\",\"javaType\":\"String\",\"htmlType\":\"input\"},{\"columnName\":\"category\",\"columnLabel\":\"分类\",\"columnComment\":\"图书分类\",\"columnType\":\"varchar(50)\",\"isPk\":\"0\",\"isIncrement\":\"0\",\"isRequired\":\"0\",\"javaType\":\"String\",\"htmlType\":\"select\",\"dictType\":\"book_category\",\"dictOptions\":[{\"label\":\"文学\",\"value\":\"literature\"},{\"label\":\"科学\",\"value\":\"science\"},{\"label\":\"历史\",\"value\":\"history\"},{\"label\":\"技术\",\"value\":\"technology\"},{\"label\":\"其他\",\"value\":\"other\"}]},{\"columnName\":\"stock\",\"columnLabel\":\"库存\",\"columnComment\":\"当前可借库存数量\",\"columnType\":\"int(11)\",\"isPk\":\"0\",\"isIncrement\":\"0\",\"isRequired\":\"1\",\"javaType\":\"Integer\",\"htmlType\":\"input\"},{\"columnName\":\"description\",\"columnLabel\":\"简介\",\"columnComment\":\"图书简介\",\"columnType\":\"text\",\"isPk\":\"0\",\"isIncrement\":\"0\",\"isRequired\":\"0\",\"javaType\":\"String\",\"htmlType\":\"editor\"}]},{\"tableName\":\"borrow_record\",\"tableComment\":\"借阅记录表\",\"adminMenuName\":\"借阅审核\",\"operations\":{\"add\":true,\"edit\":false,\"remove\":false,\"removeType\":\"physical\",\"reason\":\"仅新增记录,不允许编辑和删除\"},\"columns\":[{\"columnName\":\"id\",\"columnLabel\":\"ID\",\"columnComment\":\"主键ID\",\"columnType\":\"bigint(20)\",\"isPk\":\"1\",\"isIncrement\":\"1\",\"isRequired\":\"1\"},{\"columnName\":\"reader_id\",\"columnLabel\":\"读者ID\",\"columnComment\":\"借阅读者ID关联reader表\",\"columnType\":\"bigint(20)\",\"isPk\":\"0\",\"isIncrement\":\"0\",\"isRequired\":\"1\",\"javaType\":\"Long\",\"htmlType\":\"select\",\"dictType\":\"remote:reader:reader_id:nickname\"},{\"columnName\":\"book_id\",\"columnLabel\":\"图书ID\",\"columnComment\":\"借阅图书ID关联book_info表\",\"columnType\":\"bigint(20)\",\"isPk\":\"0\",\"isIncrement\":\"0\",\"isRequired\":\"1\",\"javaType\":\"Long\",\"htmlType\":\"select\",\"dictType\":\"remote:book_info:id:title\"},{\"columnName\":\"borrow_date\",\"columnLabel\":\"借书日期\",\"columnComment\":\"借出图书的日期\",\"columnType\":\"datetime\",\"isPk\":\"0\",\"isIncrement\":\"0\",\"isRequired\":\"1\",\"javaType\":\"Date\",\"htmlType\":\"datetime\"},{\"columnName\":\"due_date\",\"columnLabel\":\"应还日期\",\"columnComment\":\"图书应归还日期\",\"columnType\":\"datetime\",\"isPk\":\"0\",\"isIncrement\":\"0\",\"isRequired\":\"1\",\"javaType\":\"Date\",\"htmlType\":\"datetime\"},{\"columnName\":\"return_date\",\"columnLabel\":\"实际归还日期\",\"columnComment\":\"实际归还图书的日期\",\"columnType\":\"datetime\",\"isPk\":\"0\",\"isIncrement\":\"0\",\"isRequired\":\"0\",\"javaType\":\"Date\",\"htmlType\":\"datetime\"},{\"columnName\":\"renew_count\",\"columnLabel\":\"续借次数\",\"columnComment\":\"已续借次数最多1次\",\"columnType\":\"int(11)\",\"isPk\":\"0\",\"isIncrement\":\"0\",\"isRequired\":\"0\",\"javaType\":\"Integer\",\"htmlType\":\"input\"},{\"columnName\":\"status\",\"columnLabel\":\"借阅状态\",\"columnComment\":\"借阅记录状态pending-待审核borrowing-借阅中overdue-逾期returning-归还中returned_with_fine-待缴费归还returned-已归还cancelled-已取消\",\"columnType\":\"varchar(20)\",\"isPk\":\"0\",\"isIncrement\":\"0\",\"isRequired\":\"1\",\"javaType\":\"String\",\"htmlType\":\"select\",\"dictType\":\"borrow_status\",\"dictOptions\":[{\"label\":\"待审核\",\"value\":\"pending\"},{\"label\":\"借阅中\",\"value\":\"borrowing\"},{\"label\":\"逾期\",\"value\":\"overdue\"},{\"label\":\"归还中\",\"value\":\"returning\"},{\"label\":\"待缴费归还\",\"value\":\"returned_with_fine\"},{\"label\":\"已归还\",\"value\":\"returned\"},{\"label\":\"已取消\",\"value\":\"cancelled\"}]},{\"columnName\":\"approve_user_id\",\"columnLabel\":\"审核管理员ID\",\"columnComment\":\"审核通过的管理员ID关联admin表\",\"columnType\":\"bigint(20)\",\"isPk\":\"0\",\"isIncrement\":\"0\",\"isRequired\":\"0\",\"javaType\":\"Long\",\"htmlType\":\"select\",\"dictType\":\"remote:admin:admin_id:username\"},{\"columnName\":\"approve_time\",\"columnLabel\":\"审核时间\",\"columnComment\":\"审核通过的时间\",\"columnType\":\"datetime\",\"isPk\":\"0\",\"isIncrement\":\"0\",\"isRequired\":\"0\",\"javaType\":\"Date\",\"htmlType\":\"datetime\"},{\"columnName\":\"return_applicant_id\",\"columnLabel\":\"还书申请人ID\",\"columnComment\":\"申请还书的读者ID关联reader表\",\"columnType\":\"bigint(20)\",\"isPk\":\"0\",\"isIncrement\":\"0\",\"isRequired\":\"0\",\"javaType\":\"Long\",\"htmlType\":\"select\",\"dictType\":\"remote:reader:reader_id:nickname\"},{\"columnName\":\"return_apply_time\",\"columnLabel\":\"还书申请时间\",\"columnComment\":\"申请还书的时间\",\"columnType\":\"datetime\",\"isPk\":\"0\",\"isIncrement\":\"0\",\"isRequired\":\"0\",\"javaType\":\"Date\",\"htmlType\":\"datetime\"},{\"columnName\":\"confirm_return_user_id\",\"columnLabel\":\"确认归还管理员ID\",\"columnComment\":\"确认归还的管理员ID关联admin表\",\"columnType\":\"bigint(20)\",\"isPk\":\"0\",\"isIncrement\":\"0\",\"isRequired\":\"0\",\"javaType\":\"Long\",\"htmlType\":\"select\",\"dictType\":\"remote:admin:admin_id:username\"},{\"columnName\":\"confirm_return_time\",\"columnLabel\":\"确认归还时间\",\"columnComment\":\"确认归还的时间\",\"columnType\":\"datetime\",\"isPk\":\"0\",\"isIncrement\":\"0\",\"isRequired\":\"0\",\"javaType\":\"Date\",\"htmlType\":\"datetime\"},{\"columnName\":\"mark_overdue_user_id\",\"columnLabel\":\"标记逾期管理员ID\",\"columnComment\":\"标记逾期的管理员ID关联admin表\",\"columnType\":\"bigint(20)\",\"isPk\":\"0\",\"isIncrement\":\"0\",\"isRequired\":\"0\",\"javaType\":\"Long\",\"htmlType\":\"select\",\"dictType\":\"remote:admin:admin_id:username\"},{\"columnName\":\"mark_overdue_time\",\"columnLabel\":\"标记逾期时间\",\"columnComment\":\"标记逾期的时间\",\"columnType\":\"datetime\",\"isPk\":\"0\",\"isIncrement\":\"0\",\"isRequired\":\"0\",\"javaType\":\"Date\",\"htmlType\":\"datetime\"}]},{\"tableName\":\"reservation\",\"tableComment\":\"预约记录表\",\"adminMenuName\":\"预约记录\",\"operations\":{\"add\":true,\"edit\":false,\"remove\":false,\"removeType\":\"physical\",\"reason\":\"仅新增预约记录,不允许编辑和删除\"},\"columns\":[{\"columnName\":\"id\",\"columnLabel\":\"ID\",\"columnComment\":\"主键ID\",\"columnType\":\"bigint(20)\",\"isPk\":\"1\",\"isIncrement\":\"1\",\"isRequired\":\"1\"},{\"columnName\":\"reader_id\",\"columnLabel\":\"读者ID\",\"columnComment\":\"预约读者ID关联reader表\",\"columnType\":\"bigint(20)\",\"isPk\":\"0\",\"isIncrement\":\"0\",\"isRequired\":\"1\",\"javaType\":\"Long\",\"htmlType\":\"select\",\"dictType\":\"remote:reader:reader_id:nickname\"},{\"columnName\":\"book_id\",\"columnLabel\":\"图书ID\",\"columnComment\":\"预约图书ID关联book_info表\",\"columnType\":\"bigint(20)\",\"isPk\":\"0\",\"isIncrement\":\"0\",\"isRequired\":\"1\",\"javaType\":\"Long\",\"htmlType\":\"select\",\"dictType\":\"remote:book_info:id:title\"},{\"columnName\":\"reserve_date\",\"columnLabel\":\"预约日期\",\"columnComment\":\"发起预约的日期\",\"columnType\":\"datetime\",\"isPk\":\"0\",\"isIncrement\":\"0\",\"isRequired\":\"1\",\"javaType\":\"Date\",\"htmlType\":\"datetime\"},{\"columnName\":\"expire_date\",\"columnLabel\":\"过期日期\",\"columnComment\":\"预约保留截止日期,超时自动取消\",\"columnType\":\"datetime\",\"isPk\":\"0\",\"isIncrement\":\"0\",\"isRequired\":\"1\",\"javaType\":\"Date\",\"htmlType\":\"datetime\"},{\"columnName\":\"pickup_date\",\"columnLabel\":\"取书日期\",\"columnComment\":\"实际取书的日期\",\"columnType\":\"datetime\",\"isPk\":\"0\",\"isIncrement\":\"0\",\"isRequired\":\"0\",\"javaType\":\"Date\",\"htmlType\":\"datetime\"},{\"columnName\":\"status\",\"columnLabel\":\"预约状态\",\"columnComment\":\"预约状态waiting-等待取书picked-已取走cancelled-已取消expired-已过期\",\"columnType\":\"varchar(20)\",\"isPk\":\"0\",\"isIncrement\":\"0\",\"isRequired\":\"1\",\"javaType\":\"String\",\"htmlType\":\"select\",\"dictType\":\"reservation_status\",\"dictOptions\":[{\"label\":\"等待取书\",\"value\":\"waiting\"},{\"label\":\"已取走\",\"value\":\"picked\"},{\"label\":\"已取消\",\"value\":\"cancelled\"},{\"label\":\"已过期\",\"value\":\"expired\"}]}]},{\"tableName\":\"fine_record\",\"tableComment\":\"罚款记录表\",\"adminMenuName\":\"罚款管理\",\"operations\":{\"add\":true,\"edit\":false,\"remove\":false,\"removeType\":\"physical\",\"reason\":\"仅新增罚款记录,不允许编辑和删除\"},\"columns\":[{\"columnName\":\"id\",\"columnLabel\":\"ID\",\"columnComment\":\"主键ID\",\"columnType\":\"bigint(20)\",\"isPk\":\"1\",\"isIncrement\":\"1\",\"isRequired\":\"1\"},{\"columnName\":\"borrow_record_id\",\"columnLabel\":\"借阅记录ID\",\"columnComment\":\"关联的借阅记录ID\",\"columnType\":\"bigint(20)\",\"isPk\":\"0\",\"isIncrement\":\"0\",\"isRequired\":\"1\",\"javaType\":\"Long\",\"htmlType\":\"select\",\"dictType\":\"remote:borrow_record:id:borrow_date\"},{\"columnName\":\"reader_id\",\"columnLabel\":\"读者ID\",\"columnComment\":\"被罚款读者ID关联reader表\",\"columnType\":\"bigint(20)\",\"isPk\":\"0\",\"isIncrement\":\"0\",\"isRequired\":\"1\",\"javaType\":\"Long\",\"htmlType\":\"select\",\"dictType\":\"remote:reader:reader_id:nickname\"},{\"columnName\":\"amount\",\"columnLabel\":\"罚款金额\",\"columnComment\":\"罚款金额(元)\",\"columnType\":\"decimal(10,2)\",\"isPk\":\"0\",\"isIncrement\":\"0\",\"isRequired\":\"1\",\"javaType\":\"BigDecimal\",\"htmlType\":\"input\"},{\"columnName\":\"overdue_days\",\"columnLabel\":\"逾期天数\",\"columnComment\":\"逾期天数\",\"columnType\":\"int(11)\",\"isPk\":\"0\",\"isIncrement\":\"0\",\"isRequired\":\"0\",\"javaType\":\"Integer\",\"htmlType\":\"input\"},{\"columnName\":\"status\",\"columnLabel\":\"罚款状态\",\"columnComment\":\"罚款状态unpaid-未支付paid-已支付\",\"columnType\":\"varchar(10)\",\"isPk\":\"0\",\"isIncrement\":\"0\",\"isRequired\":\"1\",\"javaType\":\"String\",\"htmlType\":\"select\",\"dictType\":\"fine_status\",\"dictOptions\":[{\"label\":\"未支付\",\"value\":\"unpaid\"},{\"label\":\"已支付\",\"value\":\"paid\"}]},{\"columnName\":\"created_at\",\"columnLabel\":\"创建时间\",\"columnComment\":\"罚款记录的创建时间\",\"columnType\":\"datetime\",\"isPk\":\"0\",\"isIncrement\":\"0\",\"isRequired\":\"1\",\"javaType\":\"Date\",\"htmlType\":\"datetime\"},{\"columnName\":\"pay_time\",\"columnLabel\":\"支付时间\",\"columnComment\":\"罚款支付时间\",\"columnType\":\"datetime\",\"isPk\":\"0\",\"isIncrement\":\"0\",\"isRequired\":\"0\",\"javaType\":\"Date\",\"htmlType\":\"datetime\"}]},{\"tableName\":\"reader\",\"tableComment\":\"读者表\",\"adminMenuName\":\"读者管理\",\"operations\":{\"add\":true,\"edit\":true,\"remove\":true,\"removeType\":\"soft\",\"reason\":\"\"},\"columns\":[{\"columnName\":\"reader_id\",\"columnLabel\":\"读者ID\",\"columnComment\":\"读者主键ID也作为登录账号标识\",\"columnType\":\"bigint(20)\",\"isPk\":\"1\",\"isIncrement\":\"1\",\"isRequired\":\"1\"},{\"columnName\":\"username\",\"columnLabel\":\"用户名\",\"columnComment\":\"登录用户名\",\"columnType\":\"varchar(50)\",\"isPk\":\"0\",\"isIncrement\":\"0\",\"isRequired\":\"1\",\"javaType\":\"String\",\"htmlType\":\"input\"},{\"columnName\":\"password_hash\",\"columnLabel\":\"密码哈希\",\"columnComment\":\"加密后的密码\",\"columnType\":\"varchar(255)\",\"isPk\":\"0\",\"isIncrement\":\"0\",\"isRequired\":\"1\",\"javaType\":\"String\",\"htmlType\":\"input\"},{\"columnName\":\"nickname\",\"columnLabel\":\"昵称\",\"columnComment\":\"读者昵称\",\"columnType\":\"varchar(50)\",\"isPk\":\"0\",\"isIncrement\":\"0\",\"isRequired\":\"0\",\"javaType\":\"String\",\"htmlType\":\"input\"},{\"columnName\":\"email\",\"columnLabel\":\"邮箱\",\"columnComment\":\"读者邮箱地址\",\"columnType\":\"varchar(100)\",\"isPk\":\"0\",\"isIncrement\":\"0\",\"isRequired\":\"0\",\"javaType\":\"String\",\"htmlType\":\"input\"},{\"columnName\":\"phone\",\"columnLabel\":\"手机号\",\"columnComment\":\"读者手机号码\",\"columnType\":\"varchar(20)\",\"isPk\":\"0\",\"isIncrement\":\"0\",\"isRequired\":\"0\",\"javaType\":\"String\",\"htmlType\":\"input\"},{\"columnName\":\"status\",\"columnLabel\":\"状态\",\"columnComment\":\"账号状态1-正常0-禁用\",\"columnType\":\"char(1)\",\"isPk\":\"0\",\"isIncrement\":\"0\",\"isRequired\":\"1\",\"javaType\":\"String\",\"htmlType\":\"select\",\"dictType\":\"account_status\",\"dictOptions\":[{\"label\":\"正常\",\"value\":\"1\"},{\"label\":\"禁用\",\"value\":\"0\"}]},{\"columnName\":\"deleted\",\"columnLabel\":\"删除标记\",\"columnComment\":\"软删除标记0-未删除1-已删除\",\"columnType\":\"tinyint(1)\",\"isPk\":\"0\",\"isIncrement\":\"0\",\"isRequired\":\"1\",\"javaType\":\"Integer\",\"htmlType\":\"input\"},{\"columnName\":\"create_time\",\"columnLabel\":\"创建时间\",\"columnComment\":\"账号创建时间\",\"columnType\":\"datetime\",\"isPk\":\"0\",\"isIncrement\":\"0\",\"isRequired\":\"1\",\"javaType\":\"Date\",\"htmlType\":\"datetime\"}]},{\"tableName\":\"admin\",\"tableComment\":\"管理员表\",\"adminMenuName\":\"管理员资料\",\"operations\":{\"add\":false,\"edit\":true,\"remove\":false,\"removeType\":\"physical\",\"reason\":\"管理员账号不允许添加和删除,仅可编辑\"},\"columns\":[{\"columnName\":\"admin_id\",\"columnLabel\":\"管理员ID\",\"columnComment\":\"管理员主键ID\",\"columnType\":\"bigint(20)\",\"isPk\":\"1\",\"isIncrement\":\"1\",\"isRequired\":\"1\"},{\"columnName\":\"username\",\"columnLabel\":\"用户名\",\"columnComment\":\"登录用户名\",\"columnType\":\"varchar(50)\",\"isPk\":\"0\",\"isIncrement\":\"0\",\"isRequired\":\"1\",\"javaType\":\"String\",\"htmlType\":\"input\"},{\"columnName\":\"password_hash\",\"columnLabel\":\"密码哈希\",\"columnComment\":\"加密后的密码\",\"columnType\":\"varchar(255)\",\"isPk\":\"0\",\"isIncrement\":\"0\",\"isRequired\":\"1\",\"javaType\":\"String\",\"htmlType\":\"input\"},{\"columnName\":\"nickname\",\"columnLabel\":\"昵称\",\"columnComment\":\"管理员昵称\",\"columnType\":\"varchar(50)\",\"isPk\":\"0\",\"isIncrement\":\"0\",\"isRequired\":\"0\",\"javaType\":\"String\",\"htmlType\":\"input\"},{\"columnName\":\"status\",\"columnLabel\":\"状态\",\"columnComment\":\"账号状态1-正常0-禁用\",\"columnType\":\"char(1)\",\"isPk\":\"0\",\"isIncrement\":\"0\",\"isRequired\":\"1\",\"javaType\":\"String\",\"htmlType\":\"select\",\"dictType\":\"account_status\",\"dictOptions\":[{\"label\":\"正常\",\"value\":\"1\"},{\"label\":\"禁用\",\"value\":\"0\"}]},{\"columnName\":\"create_time\",\"columnLabel\":\"创建时间\",\"columnComment\":\"账号创建时间\",\"columnType\":\"datetime\",\"isPk\":\"0\",\"isIncrement\":\"0\",\"isRequired\":\"1\",\"javaType\":\"Date\",\"htmlType\":\"datetime\"}]}]},\"projectName\":\"图书管理系统\",\"flowConfig\":{\"actions\":[{\"actor\":\"admin\",\"audit\":{\"timeField\":\"approve_time\",\"userField\":\"approve_user_id\"},\"button\":{\"confirm\":\"确认审核通过吗?\",\"order\":10,\"pageCode\":\"borrow_admin_page\",\"scope\":\"admin\",\"slot\":\"list.rowActions\",\"type\":\"success\"},\"code\":\"approve\",\"effects\":[{\"amount\":\"1\",\"errorMessage\":\"图书库存不足\",\"field\":\"stock\",\"min\":\"0\",\"notFoundMessage\":\"图书不存在\",\"relationField\":\"book_id\",\"table\":\"book\",\"type\":\"decrease\",\"values\":{}}],\"from\":\"pending\",\"invalidStateMessage\":\"当前状态不能审核\",\"method\":\"POST\",\"name\":\"审核通过\",\"path\":\"/borrow-record/approve\",\"successMessage\":\"审核成功,图书已借出\",\"to\":\"borrowing\"},{\"actor\":\"admin\",\"audit\":{\"timeField\":\"approve_time\",\"userField\":\"approve_user_id\"},\"button\":{\"confirm\":\"确认拒绝吗?\",\"order\":20,\"pageCode\":\"borrow_admin_page\",\"scope\":\"admin\",\"slot\":\"list.rowActions\",\"type\":\"danger\"},\"code\":\"reject\",\"effects\":[],\"from\":\"pending\",\"invalidStateMessage\":\"当前状态不能拒绝\",\"method\":\"POST\",\"name\":\"审核拒绝\",\"path\":\"/borrow-record/reject\",\"successMessage\":\"已拒绝借书申请\",\"to\":\"cancelled\"},{\"actor\":\"reader\",\"audit\":{\"timeField\":\"return_apply_time\",\"userField\":\"return_applicant_id\"},\"button\":{\"confirm\":\"确认申请还书吗?\",\"order\":10,\"pageCode\":\"my_borrows_page\",\"scope\":\"reader\",\"slot\":\"list.rowActions\",\"type\":\"primary\"},\"code\":\"return_apply\",\"effects\":[],\"from\":\"borrowing\",\"invalidStateMessage\":\"当前借阅记录无法申请还书\",\"method\":\"POST\",\"name\":\"申请还书\",\"path\":\"/borrow-record/return-apply\",\"successMessage\":\"还书申请已提交,请等待管理员确认\",\"to\":\"returning\"},{\"actor\":\"reader\",\"audit\":{\"timeField\":\"return_apply_time\",\"userField\":\"return_applicant_id\"},\"button\":{\"confirm\":\"确认申请还书吗?\",\"order\":20,\"pageCode\":\"my_borrows_page\",\"scope\":\"reader\",\"slot\":\"list.rowActions\",\"type\":\"primary\"},\"code\":\"return_apply_overdue\",\"effects\":[],\"from\":\"overdue\",\"invalidStateMessage\":\"当前记录无法申请还书\",\"method\":\"POST\",\"name\":\"逾期还书申请\",\"path\":\"/borrow-record/return-apply-overdue\",\"successMessage\":\"还书申请已提交\",\"to\":\"returning\"},{\"actor\":\"admin\",\"audit\":{\"timeField\":\"confirm_return_time\",\"userField\":\"confirm_return_user_id\"},\"button\":{\"confirm\":\"确认归还吗?\",\"order\":30,\"pageCode\":\"borrow_admin_page\",\"scope\":\"admin\",\"slot\":\"list.rowActions\",\"type\":\"success\"},\"code\":\"confirm_return_normal\",\"effects\":[],\"from\":\"returning\",\"invalidStateMessage\":\"当前状态不能确认归还\",\"method\":\"POST\",\"name\":\"确认归还\",\"path\":\"/borrow-record/confirm-return\",\"successMessage\":\"归还确认成功\",\"to\":\"returned\"},{\"actor\":\"admin\",\"audit\":{\"timeField\":\"confirm_return_time\",\"userField\":\"confirm_return_user_id\"},\"button\":{\"confirm\":\"该记录已超期,确认归还并生成罚款吗?\",\"order\":40,\"pageCode\":\"borrow_admin_page\",\"scope\":\"admin\",\"slot\":\"list.rowActions\",\"type\":\"warning\"},\"code\":\"confirm_return_overdue\",\"effects\":[{\"amount\":\"1\",\"errorMessage\":\"罚款记录创建失败\",\"min\":\"0\",\"notFoundMessage\":\"\",\"table\":\"fine_record\",\"type\":\"create_record\",\"values\":{\"amount\":\"0.1\",\"user_id\":\"record.user_id\",\"created_at\":\"now\",\"borrow_record_id\":\"record.id\",\"status\":\"unpaid\"}}],\"from\":\"returning\",\"invalidStateMessage\":\"当前状态不能确认归还\",\"method\":\"POST\",\"name\":\"确认归还(超期)\",\"path\":\"/borrow-record/confirm-return-overdue\",\"successMessage\":\"归还确认成功,已生成罚款记录\",\"to\":\"returned_with_fine\"},{\"actor\":\"reader\",\"audit\":{\"timeField\":\"pay_fine_time\",\"userField\":\"pay_fine_user_id\"},\"button\":{\"confirm\":\"确认缴纳罚款吗?\",\"order\":30,\"pageCode\":\"my_borrows_page\",\"scope\":\"reader\",\"slot\":\"list.rowActions\",\"type\":\"primary\"},\"code\":\"pay_fine\",\"effects\":[{\"amount\":\"1\",\"errorMessage\":\"更新罚款状态失败\",\"min\":\"0\",\"notFoundMessage\":\"罚款记录不存在\",\"relationField\":\"borrow_record_id\",\"table\":\"fine_record\",\"type\":\"update_related\",\"values\":{\"status\":\"paid\",\"pay_time\":\"now\"}}],\"from\":\"returned_with_fine\",\"invalidStateMessage\":\"无需缴纳罚款\",\"method\":\"POST\",\"name\":\"缴纳罚款\",\"path\":\"/borrow-record/pay-fine\",\"successMessage\":\"罚款缴纳成功\",\"to\":\"returned\"},{\"actor\":\"admin\",\"audit\":{\"timeField\":\"mark_overdue_time\",\"userField\":\"mark_overdue_user_id\"},\"button\":{\"confirm\":\"确认标记逾期吗?\",\"order\":50,\"pageCode\":\"borrow_admin_page\",\"scope\":\"admin\",\"slot\":\"list.rowActions\",\"type\":\"warning\"},\"code\":\"mark_overdue\",\"effects\":[],\"from\":\"borrowing\",\"invalidStateMessage\":\"当前状态不能标记逾期\",\"method\":\"POST\",\"name\":\"标记逾期\",\"path\":\"/borrow-record/mark-overdue\",\"successMessage\":\"已标记为逾期\",\"to\":\"overdue\"}],\"code\":\"borrow_flow\",\"mainTable\":\"borrow_record\",\"metrics\":[{\"aggregate\":\"count\",\"code\":\"borrowing_count\",\"field\":\"id\",\"name\":\"借阅中数量\",\"status\":\"borrowing\",\"table\":\"borrow_record\",\"unit\":\"条\"},{\"aggregate\":\"count\",\"code\":\"overdue_count\",\"field\":\"id\",\"name\":\"逾期数量\",\"status\":\"overdue\",\"table\":\"borrow_record\",\"unit\":\"条\"},{\"aggregate\":\"count\",\"code\":\"returned_count\",\"field\":\"id\",\"name\":\"已归还数量\",\"status\":\"returned\",\"table\":\"borrow_record\",\"unit\":\"条\"},{\"aggregate\":\"count\",\"code\":\"pending_count\",\"field\":\"id\",\"name\":\"待审核数量\",\"status\":\"pending\",\"table\":\"borrow_record\",\"unit\":\"条\"}],\"name\":\"借阅管理流程\",\"notFoundMessage\":\"借阅记录不存在\",\"states\":[{\"code\":\"pending\",\"label\":\"待审核\"},{\"code\":\"borrowing\",\"label\":\"借阅中\"},{\"code\":\"overdue\",\"label\":\"逾期\"},{\"code\":\"returning\",\"label\":\"归还中\"},{\"code\":\"returned_with_fine\",\"label\":\"待缴费归还\"},{\"code\":\"returned\",\"label\":\"已归还\"},{\"code\":\"cancelled\",\"label\":\"已取消\"}],\"statusField\":\"status\",\"version\":\"1.0\"},\"limits\":{\"maxTables\":12,\"maxColumnsPerTable\":30}}', '{\n \"tables\": [\n {\n \"tableName\": \"book_info\",\n \"tableComment\": \"图书信息表\",\n \"adminMenuName\": \"图书管理\",\n \"operations\": {\n \"add\": true,\n \"edit\": true,\n \"remove\": true,\n \"removeType\": \"physical\",\n \"reason\": \"\"\n },\n \"columns\": [\n {\n \"columnName\": \"id\",\n \"columnLabel\": \"ID\",\n \"columnComment\": \"主键ID\",\n \"columnType\": \"bigint(20)\",\n \"isPk\": \"1\",\n \"isIncrement\": \"1\",\n \"isRequired\": \"1\"\n },\n {\n \"columnName\": \"title\",\n \"columnLabel\": \"书名\",\n \"columnComment\": \"图书名称\",\n \"columnType\": \"varchar(200)\",\n \"isPk\": \"0\",\n \"isIncrement\": \"0\",\n \"isRequired\": \"1\",\n \"javaType\": \"String\",\n \"htmlType\": \"input\"\n },\n {\n \"columnName\": \"author\",\n \"columnLabel\": \"作者\",\n \"columnComment\": \"图书作者\",\n \"columnType\": \"varchar(100)\",\n \"isPk\": \"0\",\n \"isIncrement\": \"0\",\n \"isRequired\": \"1\",\n \"javaType\": \"String\",\n \"htmlType\": \"input\"\n },\n {\n \"columnName\": \"publisher\",\n \"columnLabel\": \"出版社\",\n \"columnComment\": \"出版社名称\",\n \"columnType\": \"varchar(100)\",\n \"isPk\": \"0\",\n \"isIncrement\": \"0\",\n \"isRequired\": \"0\",\n \"javaType\": \"String\",\n \"htmlType\": \"input\"\n },\n {\n \"columnName\": \"isbn\",\n \"columnLabel\": \"ISBN\",\n \"columnComment\": \"国际标准书号\",\n \"columnType\": \"varchar(20)\",\n \"isPk\": \"0\",\n \"isIncrement\": \"0\",\n \"isRequired\": \"1\",\n \"javaType\": \"String\",\n \"htmlType\": \"input\"\n },\n {\n \"columnName\": \"category\",\n \"columnLabel\": \"分类\",\n \"columnComment\": \"图书分类\",\n \"columnType\": \"varchar(50)\",\n \"isPk\": \"0\",\n \"isIncrement\": \"0\",\n \"isRequired\": \"0\",\n \"javaType\": \"String\",\n \"htmlType\": \"select\",\n \"dictType\": \"book_category\",\n \"dictOptions\": [\n {\n \"label\": \"文学\",\n \"value\": \"literature\"\n },\n {\n \"label\": \"科学\",\n \"value\": \"science\"\n },\n {\n \"label\": \"历史\",\n \"value\": \"history\"\n },\n {\n \"label\": \"技术\",\n \"value\": \"technology\"\n },\n {\n \"label\": \"其他\",\n \"value\": \"other\"\n }\n ]\n },\n {\n \"columnName\": \"stock\",\n \"columnLabel\": \"库存\",\n \"columnComment\": \"当前可借库存数量\",\n \"columnType\": \"int(11)\",\n \"isPk\": \"0\",\n \"isIncrement\": \"0\",\n \"isRequired\": \"1\",\n \"javaType\": \"Integer\",\n \"htmlType\": \"input\"\n },\n {\n \"columnName\": \"description\",\n \"columnLabel\": \"简介\",\n \"columnComment\": \"图书简介\",\n \"columnType\": \"text\",\n \"isPk\": \"0\",\n \"isIncrement\": \"0\",\n \"isRequired\": \"0\",\n \"javaType\": \"String\",\n \"htmlType\": \"editor\"\n }\n ]\n },\n {\n \"tableName\": \"book\",\n \"tableComment\": \"图书库存表(与业务闭环关联)\",\n \"adminMenuName\": \"图书库存\",\n \"operations\": {\n \"add\": true,\n \"edit\": true,\n \"remove\": true,\n \"removeType\": \"physical\",\n \"reason\": \"\"\n },\n \"columns\": [\n {\n \"columnName\": \"id\",\n \"columnLabel\": \"ID\",\n \"columnComment\": \"主键ID\",\n \"columnType\": \"bigint(20)\",\n \"isPk\": \"1\",\n \"isIncrement\": \"1\",\n \"isRequired\": \"1\"\n },\n {\n \"columnName\": \"stock\",\n \"columnLabel\": \"库存\",\n \"columnComment\": \"当前可借库存数量(业务闭环引用)\",\n \"columnType\": \"int(11)\",\n \"isPk\": \"0\",\n \"isIncrement\": \"0\",\n \"isRequired\": \"1\",\n \"javaType\": \"Integer\",\n \"htmlType\": \"input\"\n },\n {\n \"columnName\": \"title\",\n \"columnLabel\": \"书名\",\n \"columnComment\": \"图书名称\",\n \"columnType\": \"varchar(200)\",\n \"isPk\": \"0\",\n \"isIncrement\": \"0\",\n \"isRequired\": \"1\",\n \"javaType\": \"String\",\n \"htmlType\": \"input\"\n },\n {\n \"columnName\": \"author\",\n \"columnLabel\": \"作者\",\n \"columnComment\": \"图书作者\",\n \"columnType\": \"varchar(100)\",\n \"isPk\": \"0\",\n \"isIncrement\": \"0\",\n \"isRequired\": \"1\",\n \"javaType\": \"String\",\n \"htmlType\": \"input\"\n },\n {\n \"columnName\": \"isbn\",\n \"columnLabel\": \"ISBN\",\n \"columnComment\": \"国际标准书号\",\n \"columnType\": \"varchar(20)\",\n \"isPk\": \"0\",\n \"isIncrement\": \"0\",\n \"isRequired\": \"1\",\n \"javaType\": \"String\",\n \"htmlType\": \"input\"\n },\n {\n \"columnName\": \"category\",\n \"columnLabel\": \"分类\",\n \"columnComment\": \"图书分类\",\n \"columnType\": \"varchar(50)\",\n \"isPk\": \"0\",\n \"isIncrement\": \"0\",\n \"isRequired\": \"0\",\n \"javaType\": \"String\",\n \"htmlType\": \"select\",\n \"dictType\": \"book_category\",\n \"dictOptions\": [\n {\n \"label\": \"文学\",\n \"value\": \"literature\"\n },\n {\n \"label\": \"科学\",\n \"value\": \"science\"\n },\n {\n \"label\": \"历史\",\n \"value\": \"history\"\n },\n {\n \"label\": \"技术\",\n \"value\": \"technology\"\n },\n {\n \"label\": \"其他\",\n \"value\": \"other\"\n }\n ]\n }\n ]\n },\n {\n \"tableName\": \"borrow_record\",\n \"tableComment\": \"借阅记录表\",\n \"adminMenuName\": \"借阅审核\",\n \"operations\": {\n \"add\": true,\n \"edit\": false,\n \"remove\": false,\n \"removeType\": \"physical\",\n \"reason\": \"仅新增记录,不允许编辑和删除\"\n },\n \"columns\": [\n {\n \"columnName\": \"id\",\n \"columnLabel\": \"ID\",\n \"columnComment\": \"主键ID\",\n \"columnType\": \"bigint(20)\",\n \"isPk\": \"1\",\n \"isIncrement\": \"1\",\n \"isRequired\": \"1\"\n },\n {\n \"columnName\": \"reader_id\",\n \"columnLabel\": \"读者ID\",\n \"columnComment\": \"借阅读者ID关联reader表\",\n \"columnType\": \"bigint(20)\",\n \"isPk\": \"0\",\n \"isIncrement\": \"0\",\n \"isRequired\": \"1\",\n \"javaType\": \"Long\",\n \"htmlType\": \"select\",\n \"dictType\": \"remote:reader:reader_id:nickname\"\n },\n {\n \"columnName\": \"book_id\",\n \"columnLabel\": \"图书ID\",\n \"columnComment\": \"借阅图书ID关联book_info表\",\n \"columnType\": \"bigint(20)\",\n \"isPk\": \"0\",\n \"isIncrement\": \"0\",\n \"isRequired\": \"1\",\n \"javaType\": \"Long\",\n \"htmlType\": \"select\",\n \"dictType\": \"remote:book_info:id:title\"\n },\n {\n \"columnName\": \"borrow_date\",\n \"columnLabel\": \"借书日期\",\n \"columnComment\": \"借出图书的日期\",\n \"columnType\": \"datetime\",\n \"isPk\": \"0\",\n \"isIncrement\": \"0\",\n \"isRequired\": \"1\",\n \"javaType\": \"Date\",\n \"htmlType\": \"datetime\"\n },\n {\n \"columnName\": \"due_date\",\n \"columnLabel\": \"应还日期\",\n \"columnComment\": \"图书应归还日期\",\n \"columnType\": \"datetime\",\n \"isPk\": \"0\",\n \"isIncrement\": \"0\",\n \"isRequired\": \"1\",\n \"javaType\": \"Date\",\n \"htmlType\": \"datetime\"\n },\n {\n \"columnName\": \"return_date\",\n \"columnLabel\": \"实际归还日期\",\n \"columnComment\": \"实际归还图书的日期\",\n \"columnType\": \"datetime\",\n \"isPk\": \"0\",\n \"isIncrement\": \"0\",\n \"isRequired\": \"0\",\n \"javaType\": \"Date\",\n \"htmlType\": \"datetime\"\n },\n {\n \"columnName\": \"renew_count\",\n \"columnLabel\": \"续借次数\",\n \"columnComment\": \"已续借次数最多1次\",\n \"columnType\": \"int(11)\",\n \"isPk\": \"0\",\n \"isIncrement\": \"0\",\n \"isRequired\": \"0\",\n \"javaType\": \"Integer\",\n \"htmlType\": \"input\"\n },\n {\n \"columnName\": \"status\",\n \"columnLabel\": \"借阅状态\",\n \"columnComment\": \"借阅记录状态pending-待审核borrowing-借阅中overdue-逾期returning-归还中returned_with_fine-待缴费归还returned-已归还cancelled-已取消\",\n \"columnType\": \"varchar(20)\",\n \"isPk\": \"0\",\n \"isIncrement\": \"0\",\n \"isRequired\": \"1\",\n \"javaType\": \"String\",\n \"htmlType\": \"select\",\n \"dictType\": \"borrow_status\",\n \"dictOptions\": [\n {\n \"label\": \"待审核\",\n \"value\": \"pending\"\n },\n {\n \"label\": \"借阅中\",\n \"value\": \"borrowing\"\n },\n {\n \"label\": \"逾期\",\n \"value\": \"overdue\"\n },\n {\n \"label\": \"归还中\",\n \"value\": \"returning\"\n },\n {\n \"label\": \"待缴费归还\",\n \"value\": \"returned_with_fine\"\n },\n {\n \"label\": \"已归还\",\n \"value\": \"returned\"\n },\n {\n \"label\": \"已取消\",\n \"value\": \"cancelled\"\n }\n ]\n },\n {\n \"columnName\": \"approve_user_id\",\n \"columnLabel\": \"审核管理员ID\",\n \"columnComment\": \"审核通过的管理员ID关联admin表\",\n \"columnType\": \"bigint(20)\",\n \"isPk\": \"0\",\n \"isIncrement\": \"0\",\n \"isRequired\": \"0\",\n \"javaType\": \"Long\",\n \"htmlType\": \"select\",\n \"dictType\": \"remote:admin:admin_id:username\"\n },\n {\n \"columnName\": \"approve_time\",\n \"columnLabel\": \"审核时间\",\n \"columnComment\": \"审核通过的时间\",\n \"columnType\": \"datetime\",\n \"isPk\": \"0\",\n \"isIncrement\": \"0\",\n \"isRequired\": \"0\",\n \"javaType\": \"Date\",\n \"htmlType\": \"datetime\"\n },\n {\n \"columnName\": \"return_applicant_id\",\n \"columnLabel\": \"还书申请人ID\",\n \"columnComment\": \"申请还书的读者ID关联reader表\",\n \"columnType\": \"bigint(20)\",\n \"isPk\": \"0\",\n \"isIncrement\": \"0\",\n \"isRequired\": \"0\",\n \"javaType\": \"Long\",\n \"htmlType\": \"select\",\n \"dictType\": \"remote:reader:reader_id:nickname\"\n },\n {\n \"columnName\": \"return_apply_time\",\n \"columnLabel\": \"还书申请时间\",\n \"columnComment\": \"申请还书的时间\",\n \"columnType\": \"datetime\",\n \"isPk\": \"0\",\n \"isIncrement\": \"0\",\n \"isRequired\": \"0\",\n \"javaType\": \"Date\",\n \"htmlType\": \"datetime\"\n },\n {\n \"columnName\": \"confirm_return_user_id\",\n \"columnLabel\": \"确认归还管理员ID\",\n \"columnComment\": \"确认归还的管理员ID关联admin表\",\n \"columnType\": \"bigint(20)\",\n \"isPk\": \"0\",\n \"isIncrement\": \"0\",\n \"isRequired\": \"0\",\n \"javaType\": \"Long\",\n \"htmlType\": \"select\",\n \"dictType\": \"remote:admin:admin_id:username\"\n },\n {\n \"columnName\": \"confirm_return_time\",\n \"columnLabel\": \"确认归还时间\",\n \"columnComment\": \"确认归还的时间\",\n \"columnType\": \"datetime\",\n \"isPk\": \"0\",\n \"isIncrement\": \"0\",\n \"isRequired\": \"0\",\n \"javaType\": \"Date\",\n \"htmlType\": \"datetime\"\n },\n {\n \"columnName\": \"mark_overdue_user_id\",\n \"columnLabel\": \"标记逾期管理员ID\",\n \"columnComment\": \"标记逾期的管理员ID关联admin表\",\n \"columnType\": \"bigint(20)\",\n \"isPk\": \"0\",\n \"isIncrement\": \"0\",\n \"isRequired\": \"0\",\n \"javaType\": \"Long\",\n \"htmlType\": \"select\",\n \"dictType\": \"remote:admin:admin_id:username\"\n },\n {\n \"columnName\": \"mark_overdue_time\",\n \"columnLabel\": \"标记逾期时间\",\n \"columnComment\": \"标记逾期的时间\",\n \"columnType\": \"datetime\",\n \"isPk\": \"0\",\n \"isIncrement\": \"0\",\n \"isRequired\": \"0\",\n \"javaType\": \"Date\",\n \"htmlType\": \"datetime\"\n }\n ]\n },\n {\n \"tableName\": \"reservation\",\n \"tableComment\": \"预约记录表\",\n \"adminMenuName\": \"预约记录\",\n \"operations\": {\n \"add\": true,\n \"edit\": false,\n \"remove\": false,\n \"removeType\": \"physical\",\n \"reason\": \"仅新增预约记录,不允许编辑和删除\"\n },\n \"columns\": [\n {\n \"columnName\": \"id\",\n \"columnLabel\": \"ID\",\n \"columnComment\": \"主键ID\",\n \"columnType\": \"bigint(20)\",\n \"isPk\": \"1\",\n \"isIncrement\": \"1\",\n \"isRequired\": \"1\"\n },\n {\n \"columnName\": \"reader_id\",\n \"columnLabel\": \"读者ID\",\n \"columnComment\": \"预约读者ID关联reader表\",\n \"columnType\": \"bigint(20)\",\n \"isPk\": \"0\",\n \"isIncrement\": \"0\",\n \"isRequired\": \"1\",\n \"javaType\": \"Long\",\n \"htmlType\": \"select\",\n \"dictType\": \"remote:reader:reader_id:nickname\"\n },\n {\n \"columnName\": \"book_id\",\n \"columnLabel\": \"图书ID\",\n \"columnComment\": \"预约图书ID关联book_info表\",\n \"columnType\": \"bigint(20)\",\n \"isPk\": \"0\",\n \"isIncrement\": \"0\",\n \"isRequired\": \"1\",\n \"javaType\": \"Long\",\n \"htmlType\": \"select\",\n \"dictType\": \"remote:book_info:id:title\"\n },\n {\n \"columnName\": \"reserve_date\",\n \"columnLabel\": \"预约日期\",\n \"columnComment\": \"发起预约的日期\",\n \"columnType\": \"datetime\",\n \"isPk\": \"0\",\n \"isIncrement\": \"0\",\n \"isRequired\": \"1\",\n \"javaType\": \"Date\",\n \"htmlType\": \"datetime\"\n },\n {\n \"columnName\": \"expire_date\",\n \"columnLabel\": \"过期日期\",\n \"columnComment\": \"预约保留截止日期,超时自动取消\",\n \"columnType\": \"datetime\",\n \"isPk\": \"0\",\n \"isIncrement\": \"0\",\n \"isRequired\": \"1\",\n \"javaType\": \"Date\",\n \"htmlType\": \"datetime\"\n },\n {\n \"columnName\": \"pickup_date\",\n \"columnLabel\": \"取书日期\",\n \"columnComment\": \"实际取书的日期\",\n \"columnType\": \"datetime\",\n \"isPk\": \"0\",\n \"isIncrement\": \"0\",\n \"isRequired\": \"0\",\n \"javaType\": \"Date\",\n \"htmlType\": \"datetime\"\n },\n {\n \"columnName\": \"status\",\n \"columnLabel\": \"预约状态\",\n \"columnComment\": \"预约状态waiting-等待取书picked-已取走cancelled-已取消expired-已过期\",\n \"columnType\": \"varchar(20)\",\n \"isPk\": \"0\",\n \"isIncrement\": \"0\",\n \"isRequired\": \"1\",\n \"javaType\": \"String\",\n \"htmlType\": \"select\",\n \"dictType\": \"reservation_status\",\n \"dictOptions\": [\n {\n \"label\": \"等待取书\",\n \"value\": \"waiting\"\n },\n {\n \"label\": \"已取走\",\n \"value\": \"picked\"\n },\n {\n \"label\": \"已取消\",\n \"value\": \"cancelled\"\n },\n {\n \"label\": \"已过期\",\n \"value\": \"expired\"\n }\n ]\n }\n ]\n },\n {\n \"tableName\": \"fine_record\",\n \"tableComment\": \"罚款记录表\",\n \"adminMenuName\": \"罚款管理\",\n \"operations\": {\n \"add\": true,\n \"edit\": false,\n \"remove\": false,\n \"removeType\": \"physical\",\n \"reason\": \"仅新增罚款记录,不允许编辑和删除\"\n },\n \"columns\": [\n {\n \"columnName\": \"id\",\n \"columnLabel\": \"ID\",\n \"columnComment\": \"主键ID\",\n \"columnType\": \"bigint(20)\",\n \"isPk\": \"1\",\n \"isIncrement\": \"1\",\n \"isRequired\": \"1\"\n },\n {\n \"columnName\": \"borrow_record_id\",\n \"columnLabel\": \"借阅记录ID\",\n \"columnComment\": \"关联的借阅记录ID\",\n \"columnType\": \"bigint(20)\",\n \"isPk\": \"0\",\n \"isIncrement\": \"0\",\n \"isRequired\": \"1\",\n \"javaType\": \"Long\",\n \"htmlType\": \"select\",\n \"dictType\": \"remote:borrow_record:id:borrow_date\"\n },\n {\n \"columnName\": \"reader_id\",\n \"columnLabel\": \"读者ID\",\n \"columnComment\": \"被罚款读者ID关联reader表\",\n \"columnType\": \"bigint(20)\",\n \"isPk\": \"0\",\n \"isIncrement\": \"0\",\n \"isRequired\": \"1\",\n \"javaType\": \"Long\",\n \"htmlType\": \"select\",\n \"dictType\": \"remote:reader:reader_id:nickname\"\n },\n {\n \"columnName\": \"amount\",\n \"columnLabel\": \"罚款金额\",\n \"columnComment\": \"罚款金额(元)\",\n \"columnType\": \"decimal(10,2)\",\n \"isPk\": \"0\",\n \"isIncrement\": \"0\",\n \"isRequired\": \"1\",\n \"javaType\": \"BigDecimal\",\n \"htmlType\": \"input\"\n },\n {\n \"columnName\": \"overdue_days\",\n \"columnLabel\": \"逾期天数\",\n \"columnComment\": \"逾期天数\",\n \"columnType\": \"int(11)\",\n \"isPk\": \"0\",\n \"isIncrement\": \"0\",\n \"isRequired\": \"0\",\n \"javaType\": \"Integer\",\n \"htmlType\": \"input\"\n },\n {\n \"columnName\": \"status\",\n \"columnLabel\": \"罚款状态\",\n \"columnComment\": \"罚款状态unpaid-未支付paid-已支付\",\n \"columnType\": \"varchar(10)\",\n \"isPk\": \"0\",\n \"isIncrement\": \"0\",\n \"isRequired\": \"1\",\n \"javaType\": \"String\",\n \"htmlType\": \"select\",\n \"dictType\": \"fine_status\",\n \"dictOptions\": [\n {\n \"label\": \"未支付\",\n \"value\": \"unpaid\"\n },\n {\n \"label\": \"已支付\",\n \"value\": \"paid\"\n }\n ]\n },\n {\n \"columnName\": \"created_at\",\n \"columnLabel\": \"创建时间\",\n \"columnComment\": \"罚款记录的创建时间\",\n \"columnType\": \"datetime\",\n \"isPk\": \"0\",\n \"isIncrement\": \"0\",\n \"isRequired\": \"1\",\n \"javaType\": \"Date\",\n \"htmlType\": \"datetime\"\n },\n {\n \"columnName\": \"pay_time\",\n \"columnLabel\": \"支付时间\",\n \"columnComment\": \"罚款支付时间\",\n \"columnType\": \"datetime\",\n \"isPk\": \"0\",\n \"isIncrement\": \"0\",\n \"isRequired\": \"0\",\n \"javaType\": \"Date\",\n \"htmlType\": \"datetime\"\n }\n ]\n },\n {\n \"tableName\": \"reader\",\n \"tableComment\": \"读者表\",\n \"adminMenuName\": \"读者管理\",\n \"operations\": {\n \"add\": true,\n \"edit\": true,\n \"remove\": true,\n \"removeType\": \"soft\",\n \"reason\": \"\"\n },\n \"columns\": [\n {\n \"columnName\": \"reader_id\",\n \"columnLabel\": \"读者ID\",\n \"columnComment\": \"读者主键ID也作为登录账号标识\",\n \"columnType\": \"bigint(20)\",\n \"isPk\": \"1\",\n \"isIncrement\": \"1\",\n \"isRequired\": \"1\"\n },\n {\n \"columnName\": \"username\",\n \"columnLabel\": \"用户名\",\n \"columnComment\": \"登录用户名\",\n \"columnType\": \"varchar(50)\",\n \"isPk\": \"0\",\n \"isIncrement\": \"0\",\n \"isRequired\": \"1\",\n \"javaType\": \"String\",\n \"htmlType\": \"input\"\n },\n {\n \"columnName\": \"password_hash\",\n \"columnLabel\": \"密码哈希\",\n \"columnComment\": \"加密后的密码\",\n \"columnType\": \"varchar(255)\",\n \"isPk\": \"0\",\n \"isIncrement\": \"0\",\n \"isRequired\": \"1\",\n \"javaType\": \"String\",\n \"htmlType\": \"input\"\n },\n {\n \"columnName\": \"nickname\",\n \"columnLabel\": \"昵称\",\n \"columnComment\": \"读者昵称\",\n \"columnType\": \"varchar(50)\",\n \"isPk\": \"0\",\n \"isIncrement\": \"0\",\n \"isRequired\": \"0\",\n \"javaType\": \"String\",\n \"htmlType\": \"input\"\n },\n {\n \"columnName\": \"email\",\n \"columnLabel\": \"邮箱\",\n \"columnComment\": \"读者邮箱地址\",\n \"columnType\": \"varchar(100)\",\n \"isPk\": \"0\",\n \"isIncrement\": \"0\",\n \"isRequired\": \"0\",\n \"javaType\": \"String\",\n \"htmlType\": \"input\"\n },\n {\n \"columnName\": \"phone\",\n \"columnLabel\": \"手机号\",\n \"columnComment\": \"读者手机号码\",\n \"columnType\": \"varchar(20)\",\n \"isPk\": \"0\",\n \"isIncrement\": \"0\",\n \"isRequired\": \"0\",\n \"javaType\": \"String\",\n \"htmlType\": \"input\"\n },\n {\n \"columnName\": \"status\",\n \"columnLabel\": \"状态\",\n \"columnComment\": \"账号状态1-正常0-禁用\",\n \"columnType\": \"char(1)\",\n \"isPk\": \"0\",\n \"isIncrement\": \"0\",\n \"isRequired\": \"1\",\n \"javaType\": \"String\",\n \"htmlType\": \"select\",\n \"dictType\": \"account_status\",\n \"dictOptions\": [\n {\n \"label\": \"正常\",\n \"value\": \"1\"\n },\n {\n \"label\": \"禁用\",\n \"value\": \"0\"\n }\n ]\n },\n {\n \"columnName\": \"deleted\",\n \"columnLabel\": \"删除标记\",\n \"columnComment\": \"软删除标记0-未删除1-已删除\",\n \"columnType\": \"tinyint(1)\",\n \"isPk\": \"0\",\n \"isIncrement\": \"0\",\n \"isRequired\": \"1\",\n \"javaType\": \"Integer\",\n \"htmlType\": \"input\"\n },\n {\n \"columnName\": \"create_time\",\n \"columnLabel\": \"创建时间\",\n \"columnComment\": \"账号创建时间\",\n \"columnType\": \"datetime\",\n \"isPk\": \"0\",\n \"isIncrement\": \"0\",\n \"isRequired\": \"1\",\n \"javaType\": \"Date\",\n \"htmlType\": \"datetime\"\n }\n ]\n },\n {\n \"tableName\": \"admin\",\n \"tableComment\": \"管理员表\",\n \"adminMenuName\": \"管理员资料\",\n \"operations\": {\n \"add\": false,\n \"edit\": true,\n \"remove\": false,\n \"removeType\": \"physical\",\n \"reason\": \"管理员账号不允许添加和删除,仅可编辑\"\n },\n \"columns\": [\n {\n \"columnName\": \"admin_id\",\n \"columnLabel\": \"管理员ID\",\n \"columnComment\": \"管理员主键ID\",\n \"columnType\": \"bigint(20)\",\n \"isPk\": \"1\",\n \"isIncrement\": \"1\",\n \"isRequired\": \"1\"\n },\n {\n \"columnName\": \"username\",\n \"columnLabel\": \"用户名\",\n \"columnComment\": \"登录用户名\",\n \"columnType\": \"varchar(50)\",\n \"isPk\": \"0\",\n \"isIncrement\": \"0\",\n \"isRequired\": \"1\",\n \"javaType\": \"String\",\n \"htmlType\": \"input\"\n },\n {\n \"columnName\": \"password_hash\",\n \"columnLabel\": \"密码哈希\",\n \"columnComment\": \"加密后的密码\",\n \"columnType\": \"varchar(255)\",\n \"isPk\": \"0\",\n \"isIncrement\": \"0\",\n \"isRequired\": \"1\",\n \"javaType\": \"String\",\n \"htmlType\": \"input\"\n },\n {\n \"columnName\": \"nickname\",\n \"columnLabel\": \"昵称\",\n \"columnComment\": \"管理员昵称\",\n \"columnType\": \"varchar(50)\",\n \"isPk\": \"0\",\n \"isIncrement\": \"0\",\n \"isRequired\": \"0\",\n \"javaType\": \"String\",\n \"htmlType\": \"input\"\n },\n {\n \"columnName\": \"status\",\n \"columnLabel\": \"状态\",\n \"columnComment\": \"账号状态1-正常0-禁用\",\n \"columnType\": \"char(1)\",\n \"isPk\": \"0\",\n \"isIncrement\": \"0\",\n \"isRequired\": \"1\",\n \"javaType\": \"String\",\n \"htmlType\": \"select\",\n \"dictType\": \"account_status\",\n \"dictOptions\": [\n {\n \"label\": \"正常\",\n \"value\": \"1\"\n },\n {\n \"label\": \"禁用\",\n \"value\": \"0\"\n }\n ]\n },\n {\n \"columnName\": \"create_time\",\n \"columnLabel\": \"创建时间\",\n \"columnComment\": \"账号创建时间\",\n \"columnType\": \"datetime\",\n \"isPk\": \"0\",\n \"isIncrement\": \"0\",\n \"isRequired\": \"1\",\n \"javaType\": \"Date\",\n \"htmlType\": \"datetime\"\n }\n ]\n }\n ]\n}', '0', 109294, 9166, 1024, 8142, 12585, 6063, 9166, 12585, 21751, 4, 0.03333248, '1', NULL, '2026-07-14 15:50:12');
INSERT INTO `front_ai_usage_ledger` VALUES (110, NULL, NULL, NULL, 100, 'requirement', 'deepseek', 'deepseek-v4-flash', 'front.requirement', 'v2', '07d4c186c52634ef2c9f67640a638e0822c1e139b177ff2bc7eb3a10389e8164', '你是一键生成项目的需求补全助手。你的输出会作为后续生成应用蓝图、业务闭环、数据库、页面和源码的输入。\n\n请在保留用户原始描述的基础上补全必要的业务细节让系统能生成一个本科毕设/课程设计规模的完整项目。\n\n补全重点\n- 明确项目面向谁使用,包含 2 到 4 个角色;\n- 明确核心业务对象,例如订单、预约、借阅记录、商品、课程等;\n- 明确一条完整业务闭环:发起、审核/处理、完成、取消/拒绝/回退;\n- 明确关键业务规则:状态、时间期限、数量限制、金额/费用公式、库存或名额变化;\n- 明确异常边界:库存不足、重复提交、状态不符、超时、取消、支付失败等;\n- 可补充少量前台展示或内容维护模块,但不要扩展成大型平台。\n\n约束\n- 只输出中文纯文本,不要 Markdown不要 JSON不要解释。\n- 内容要短,控制在 300 字以内。\n- 不要写技术实现、接口、数据库表、字段、代码。\n- 不要输出“按实际情况”“待定”等模糊规则缺少关键数值时用合理默认值并标注“AI假设”。\n- 不要把 CRUD、统计报表、系统监控、操作日志当作核心业务。', '请根据以下项目输入,补全一段可直接用于一键生成项目的业务需求描述。\n\n输出格式\n项目定位\n角色\n核心流程\n关键规则\n异常边界\n\n项目输入 JSON\n{\"projectName\":\"图书管理系统\",\"currentDescription\":\"\"}', '项目定位:面向高校图书馆的图书管理系统,用于读者借阅预约、图书管理员日常管理和系统管理员后台维护。 \n角色读者、图书管理员、系统管理员。 \n核心流程读者查询图书并发起借阅/预约请求图书管理员审核并完成借出状态变为已借出读者还书时管理员处理并更新图书状态为可借预约图书到馆后保留2天超时自动释放借阅超期生成罚款读者可通过管理台缴纳。 \n关键规则每位读者最多同时借阅5本每本借阅期限30天超期每天罚款0.5元预约图书保留2天图书总数固定可借数量随借出减少还书后恢复。 \n异常边界可借数量为0时无法借阅/预约;已借出状态不得重复借出;预约取消后释放名额;超期未还时借阅入口禁用;若读者已有同本书未还,不可再次借阅。', '0', 6118, 346, 256, 90, 356, 142, 346, 356, 702, 1, 0.00080712, '1', NULL, '2026-07-14 15:52:13');
INSERT INTO `front_ai_usage_ledger` VALUES (111, 102, 102, 102, 100, 'app_blueprint', 'deepseek', 'deepseek-v4-flash', 'front.app_blueprint', 'V1', 'c3ee0180ed446fe83055bd1c272ed1b6e3978584fe52f98f5e78e14e2cfc8f29', '你是应用蓝图架构师。只输出符合用户消息结构的 JSON规划业务角色、前台菜单与页面、后台菜单和运营看板。保持 pageCode、tableName、角色数据范围和登录要求前后一致只描述静态蓝图不生成数据库、权限表、菜单表或代码。角色名称使用简体中文技术标识使用稳定的小写 snake_case。', '根据项目输入 JSON 生成应用蓝图,只返回 JSON不要 Markdown 围栏或解释。\n输出结构{\"roles\":[{\"code\":\"reader\",\"name\":\"读者\",\"description\":\"\"}],\"frontendMenus\":[{\"code\":\"book_catalog\",\"name\":\"图书目录\",\"path\":\"/books\",\"pageCode\":\"book_catalog_page\",\"requiresLogin\":false,\"visibleRoles\":[],\"dataScope\":\"PUBLIC\"}],\"frontendPages\":[{\"code\":\"book_catalog_page\",\"name\":\"图书目录\",\"menuCode\":\"book_catalog\",\"path\":\"/books\",\"pageType\":\"list\",\"tableName\":\"book_info\"}],\"adminMenus\":[{\"code\":\"book_admin\",\"name\":\"图书管理\",\"path\":\"/admin/books\",\"pageCode\":\"book_admin_page\",\"tableName\":\"book_info\",\"pageType\":\"list\",\"requiresLogin\":true,\"visibleRoles\":[\"admin\"],\"dataScope\":\"ROLE\"}],\"adminHomeDashboard\":{\"title\":\"运营总览\",\"description\":\"核心业务数据\",\"metrics\":[],\"charts\":[]}}。\n蓝图描述目标生成项目而不是当前 EasyCode/RuoYi 平台。不要生成数据库表、菜单表、角色表、权限表或代码。\nrole.name 使用简体中文role.code 使用小写 snake_case。只有 role.code=admin 是系统管理员;名称含“管理员”或“后台”的业务角色仍保持独立。\nrole.name must be Simplified Chinese. Only role.code=admin is the system administrator.\n每个菜单必须包含 requiresLogin、visibleRoles、dataScopedataScope 只能是 PUBLIC、CURRENT_USER 或 ROLE。\nadminMenus 必须包含 pageCode、tableName、pageType个人资料使用 form普通管理使用 list。\nadminMenus must include pageCode, tableName, and pageType.\nfrontendMenus 顶层菜单应指向 pageCode详情页作为子页面不创建顶层详情菜单。\n不要为轮播图、banner、公告滚动条等首页装饰创建顶层菜单可放在首页业务块或作为后台维护数据。\nfrontendPages.pageType 只能是 list、current_user_list、detail、formtableName 必须是页面展示的业务表。\n同一业务对象只使用一个稳定 tableName后续数据库、闭环、页面、看板、动作必须复用不能使用同义表名。\nadminHomeDashboard 尽量包含 4 个业务指标和至少 2 张图表趋势图与分布图所有表字段必须可由后续数据库步骤创建。semantic 只能使用 money、order、user、task、warning、inventory、content、default。\n每个非 admin 角色使用表名等于 role.code 的独立账号表,不得创建共享 user、user_info、member 或 account 表。\nNever invent a shared user, user_info, member, or account table for role accounts.\n需要个人资料页时为每个非 admin 角色创建独立 form 页面和菜单tableName 绑定 role.codepageCode/path 带角色前缀visibleRoles 只包含该角色。\nCreate one form page and one menu per non-admin role when profile pages are needed.\n个人订单、借阅、资料、预约、支付等页面必须 requiresLogin=true 且 dataScope=CURRENT_USER。\n项目输入 JSON\n{\"projectName\":\"图书管理系统\",\"projectDescription\":\"项目定位:面向高校图书馆的图书管理系统,用于读者借阅预约、管理员日常管理和系统管理员后台维护。 \\n角色读者、管理员。 \\n核心流程读者查询图书并发起借阅/预约请求管理员审核并完成借出状态变为已借出读者还书时管理员处理并更新图书状态为可借预约图书到馆后保留2天超时自动释放借阅超期生成罚款读者可通过管理台缴纳。 \\n关键规则每位读者最多同时借阅5本每本借阅期限30天超期每天罚款0.5元预约图书保留2天图书总数固定可借数量随借出减少还书后恢复。 \\n异常边界可借数量为0时无法借阅/预约;已借出状态不得重复借出;预约取消后释放名额;超期未还时借阅入口禁用;若读者已有同本书未还,不可再次借阅。\",\"industryTemplate\":\"\",\"stylePreset\":\"dark-tech\",\"extraRequirements\":\"\"}', '{\n \"roles\": [\n {\n \"code\": \"reader\",\n \"name\": \"读者\",\n \"description\": \"可以查询图书、借阅、预约、查看个人记录并缴纳罚款\"\n },\n {\n \"code\": \"admin\",\n \"name\": \"管理员\",\n \"description\": \"系统管理员,管理图书、借阅、预约、读者及罚款\"\n }\n ],\n \"frontendMenus\": [\n {\n \"code\": \"book_catalog\",\n \"name\": \"图书目录\",\n \"path\": \"/books\",\n \"pageCode\": \"book_catalog_page\",\n \"requiresLogin\": false,\n \"visibleRoles\": [],\n \"dataScope\": \"PUBLIC\"\n },\n {\n \"code\": \"my_borrows\",\n \"name\": \"我的借阅\",\n \"path\": \"/borrows\",\n \"pageCode\": \"my_borrows_page\",\n \"requiresLogin\": true,\n \"visibleRoles\": [\"reader\"],\n \"dataScope\": \"CURRENT_USER\"\n },\n {\n \"code\": \"my_reservations\",\n \"name\": \"我的预约\",\n \"path\": \"/reservations\",\n \"pageCode\": \"my_reservations_page\",\n \"requiresLogin\": true,\n \"visibleRoles\": [\"reader\"],\n \"dataScope\": \"CURRENT_USER\"\n },\n {\n \"code\": \"my_fines\",\n \"name\": \"我的罚款\",\n \"path\": \"/fines\",\n \"pageCode\": \"my_fines_page\",\n \"requiresLogin\": true,\n \"visibleRoles\": [\"reader\"],\n \"dataScope\": \"CURRENT_USER\"\n },\n {\n \"code\": \"reader_profile\",\n \"name\": \"个人资料\",\n \"path\": \"/profile\",\n \"pageCode\": \"reader_profile_page\",\n \"requiresLogin\": true,\n \"visibleRoles\": [\"reader\"],\n \"dataScope\": \"CURRENT_USER\"\n }\n ],\n \"frontendPages\": [\n {\n \"code\": \"book_catalog_page\",\n \"name\": \"图书目录\",\n \"menuCode\": \"book_catalog\",\n \"path\": \"/books\",\n \"pageType\": \"list\",\n \"tableName\": \"book_info\"\n },\n {\n \"code\": \"book_detail_page\",\n \"name\": \"图书详情\",\n \"menuCode\": \"book_catalog\",\n \"path\": \"/books/:id\",\n \"pageType\": \"detail\",\n \"tableName\": \"book_info\"\n },\n {\n \"code\": \"my_borrows_page\",\n \"name\": \"我的借阅\",\n \"menuCode\": \"my_borrows\",\n \"path\": \"/borrows\",\n \"pageType\": \"current_user_list\",\n \"tableName\": \"borrow_record\"\n },\n {\n \"code\": \"my_reservations_page\",\n \"name\": \"我的预约\",\n \"menuCode\": \"my_reservations\",\n \"path\": \"/reservations\",\n \"pageType\": \"current_user_list\",\n \"tableName\": \"reservation_record\"\n },\n {\n \"code\": \"my_fines_page\",\n \"name\": \"我的罚款\",\n \"menuCode\": \"my_fines\",\n \"path\": \"/fines\",\n \"pageType\": \"current_user_list\",\n \"tableName\": \"fine_record\"\n },\n {\n \"code\": \"reader_profile_page\",\n \"name\": \"个人资料\",\n \"menuCode\": \"reader_profile\",\n \"path\": \"/profile\",\n \"pageType\": \"form\",\n \"tableName\": \"reader\"\n }\n ],\n \"adminMenus\": [\n {\n \"code\": \"book_admin\",\n \"name\": \"图书管理\",\n \"path\": \"/admin/books\",\n \"pageCode\": \"book_admin_page\",\n \"tableName\": \"book_info\",\n \"pageType\": \"list\",\n \"requiresLogin\": true,\n \"visibleRoles\": [\"admin\"],\n \"dataScope\": \"ROLE\"\n },\n {\n \"code\": \"borrow_admin\",\n \"name\": \"借阅管理\",\n \"path\": \"/admin/borrows\",\n \"pageCode\": \"borrow_admin_page\",\n \"tableName\": \"borrow_record\",\n \"pageType\": \"list\",\n \"requiresLogin\": true,\n \"visibleRoles\": [\"admin\"],\n \"dataScope\": \"ROLE\"\n },\n {\n \"code\": \"reservation_admin\",\n \"name\": \"预约管理\",\n \"path\": \"/admin/reservations\",\n \"pageCode\": \"reservation_admin_page\",\n \"tableName\": \"reservation_record\",\n \"pageType\": \"list\",\n \"requiresLogin\": true,\n \"visibleRoles\": [\"admin\"],\n \"dataScope\": \"ROLE\"\n },\n {\n \"code\": \"fine_admin\",\n \"name\": \"罚款管理\",\n \"path\": \"/admin/fines\",\n \"pageCode\": \"fine_admin_page\",\n \"tableName\": \"fine_record\",\n \"pageType\": \"list\",\n \"requiresLogin\": true,\n \"visibleRoles\": [\"admin\"],\n \"dataScope\": \"ROLE\"\n },\n {\n \"code\": \"reader_admin\",\n \"name\": \"读者管理\",\n \"path\": \"/admin/readers\",\n \"pageCode\": \"reader_admin_page\",\n \"tableName\": \"reader\",\n \"pageType\": \"list\",\n \"requiresLogin\": true,\n \"visibleRoles\": [\"admin\"],\n \"dataScope\": \"ROLE\"\n },\n {\n \"code\": \"admin_admin\",\n \"name\": \"管理员管理\",\n \"path\": \"/admin/admins\",\n \"pageCode\": \"admin_admin_page\",\n \"tableName\": \"admin\",\n \"pageType\": \"list\",\n \"requiresLogin\": true,\n \"visibleRoles\": [\"admin\"],\n \"dataScope\": \"ROLE\"\n },\n {\n \"code\": \"admin_profile\",\n \"name\": \"个人资料\",\n \"path\": \"/admin/profile\",\n \"pageCode\": \"admin_profile_page\",\n \"tableName\": \"admin\",\n \"pageType\": \"form\",\n \"requiresLogin\": true,\n \"visibleRoles\": [\"admin\"],\n \"dataScope\": \"CURRENT_USER\"\n }\n ],\n \"adminHomeDashboard\": {\n \"title\": \"运营总览\",\n \"description\": \"核心业务数据\",\n \"metrics\": [\n {\n \"code\": \"total_books\",\n \"name\": \"总图书数\",\n \"tableName\": \"book_info\",\n \"aggregate\": \"count\",\n \"semantic\": \"content\"\n },\n {\n \"code\": \"total_borrowed\",\n \"name\": \"当前借出\",\n \"tableName\": \"borrow_record\",\n \"aggregate\": \"count\",\n \"filter\": \"status=borrowed\",\n \"semantic\": \"order\"\n },\n {\n \"code\": \"total_readers\",\n \"name\": \"读者总数\",\n \"tableName\": \"reader\",\n \"aggregate\": \"count\",\n \"semantic\": \"user\"\n },\n {\n \"code\": \"unpaid_fines\",\n \"name\": \"未缴罚款总额\",\n \"tableName\": \"fine_record\",\n \"aggregate\": \"sum\",\n \"field\": \"amount\",\n \"filter\": \"paid=false\",\n \"semantic\": \"money\"\n }\n ],\n \"charts\": [\n {\n \"code\": \"borrow_trend\",\n \"name\": \"借阅趋势\",\n \"tableName\": \"borrow_record\",\n \"type\": \"line\",\n \"xField\": \"created_at\",\n \"yField\": \"count\",\n \"xAggregate\": \"month\",\n \"semantic\": \"order\"\n },\n {\n \"code\": \"book_category_distribution\",\n \"name\": \"图书分类分布\",\n \"tableName\": \"book_info\",\n \"type\": \"pie\",\n \"xField\": \"category\",\n \"yField\": \"count\",\n \"semantic\": \"content\"\n }\n ]\n }\n}', '0', 33713, 1003, 768, 235, 4357, 2607, 1003, 4357, 5360, 1, 0.00896436, '1', NULL, '2026-07-14 15:53:31');
INSERT INTO `front_ai_usage_ledger` VALUES (112, 102, 102, 102, 100, 'flow_config', 'deepseek', 'deepseek-v4-flash', 'front.flow_config', 'V1', '247495840c67968896ccad2db0a599bd4fc594d0189157dce888b8ede90b3257', '你是业务流程配置设计器。只输出一个合法 JSON 对象,不输出 Markdown、解释或 SQL。\n\n目标用最小 flow_config 描述状态流转、显式 Java 业务动作、多表数量联动、按钮和统计。不要输出 CRUD不要输出通用规则 DSL。\n\n固定结构\n{\n \"version\":\"1.0\",\n \"code\":\"snake_case\",\n \"name\":\"中文业务名\",\n \"mainTable\":\"snake_case\",\n \"statusField\":\"status\",\n \"notFoundMessage\":\"主记录不存在\",\n \"states\":[{\"code\":\"pending\",\"label\":\"待审核\"}],\n \"actions\":[{\n \"code\":\"approve\",\n \"name\":\"审核通过\",\n \"from\":\"pending\",\n \"to\":\"borrowing\",\n \"actor\":\"admin\",\n \"method\":\"POST\",\n \"path\":\"/borrow-record/approve\",\n \"invalidStateMessage\":\"当前状态不能审核\",\n \"successMessage\":\"审核成功\",\n \"audit\":{\"userField\":\"approve_user_id\",\"timeField\":\"approve_time\"},\n \"effects\":[{\n \"type\":\"decrease\",\n \"table\":\"book\",\n \"relationField\":\"book_id\",\n \"field\":\"stock\",\n \"amount\":\"1\",\n \"min\":\"0\",\n \"notFoundMessage\":\"图书不存在\",\n \"errorMessage\":\"图书库存不足\"\n }],\n \"button\":{\"scope\":\"admin\",\"pageCode\":\"borrow_record_list\",\"slot\":\"list.rowActions\",\"type\":\"success\",\"confirm\":\"确认审核通过吗?\",\"order\":10}\n }],\n \"metrics\":[{\"code\":\"borrowing_count\",\"name\":\"借阅中数量\",\"table\":\"borrow_record\",\"aggregate\":\"count\",\"field\":\"id\",\"status\":\"borrowing\",\"unit\":\"条\"}]\n}\n\n约束\n1. code、表名、字段名全部使用小写 snake_case状态 code 使用稳定英文编码label 使用中文。\n2. 每个 action 必须有 from 和 to且二者存在于 states 中并且不相同。\n3. effects.type 只能是 decrease、increase、update_related、create_record。\n4. decrease/increase 必须给 table、relationField、field、amountdecrease 还要给 min。\n5. update_related/create_record 使用 values值可为 currentUserId、now、record.字段名或常量。\n6. 审核人等身份只能通过 audit.userField 表达,由后端登录态注入,不能作为前端可传字段。\n7. 覆盖需求中的完整正向闭环和关键回退/拒绝动作,但不要为普通 CRUD 创建 action。', '请根据以下 JSON 上下文生成 flow_config。appBlueprint 是已确认的页面、角色和菜单范围,必须与它保持一致:\n{\"mode\":\"generate\",\"projectName\":\"图书管理系统\",\"projectDescription\":\"项目定位:面向高校图书馆的图书管理系统,用于读者借阅预约、管理员日常管理和系统管理员后台维护。 \\n角色读者、管理员。 \\n核心流程读者查询图书并发起借阅/预约请求管理员审核并完成借出状态变为已借出读者还书时管理员处理并更新图书状态为可借预约图书到馆后保留2天超时自动释放借阅超期生成罚款读者可通过管理台缴纳。 \\n关键规则每位读者最多同时借阅5本每本借阅期限30天超期每天罚款0.5元预约图书保留2天图书总数固定可借数量随借出减少还书后恢复。 \\n异常边界可借数量为0时无法借阅/预约;已借出状态不得重复借出;预约取消后释放名额;超期未还时借阅入口禁用;若读者已有同本书未还,不可再次借阅。\",\"industryTemplate\":\"\",\"stylePreset\":\"dark-tech\",\"extraRequirements\":\"\",\"confirmedAppBlueprint\":{\"adminHomeDashboard\":{\"charts\":[{\"code\":\"borrow_trend\",\"filters\":[],\"metrics\":[],\"semantic\":\"order\",\"tableName\":\"borrow_record\",\"type\":\"line\"},{\"code\":\"book_category_distribution\",\"filters\":[],\"metrics\":[],\"semantic\":\"content\",\"tableName\":\"book_info\",\"type\":\"pie\"}],\"description\":\"核心业务数据\",\"metrics\":[{\"aggregate\":\"count\",\"code\":\"total_books\",\"filters\":[],\"semantic\":\"content\",\"tableName\":\"book_info\"},{\"aggregate\":\"count\",\"code\":\"total_borrowed\",\"filters\":[],\"semantic\":\"order\",\"tableName\":\"borrow_record\"},{\"aggregate\":\"count\",\"code\":\"total_readers\",\"filters\":[],\"semantic\":\"user\",\"tableName\":\"reader\"},{\"aggregate\":\"sum\",\"code\":\"unpaid_fines\",\"field\":\"amount\",\"filters\":[],\"semantic\":\"money\",\"tableName\":\"fine_record\"}],\"title\":\"运营总览\"},\"adminMenus\":[{\"code\":\"book_admin\",\"dataScope\":\"ROLE\",\"name\":\"图书管理\",\"pageCode\":\"book_admin_page\",\"pageType\":\"list\",\"path\":\"/admin/books\",\"requiresLogin\":true,\"tableName\":\"book_info\",\"visibleRoles\":[\"admin\"]},{\"code\":\"borrow_admin\",\"dataScope\":\"ROLE\",\"name\":\"借阅管理\",\"pageCode\":\"borrow_admin_page\",\"pageType\":\"list\",\"path\":\"/admin/borrows\",\"requiresLogin\":true,\"tableName\":\"borrow_record\",\"visibleRoles\":[\"admin\"]},{\"code\":\"reservation_admin\",\"dataScope\":\"ROLE\",\"name\":\"预约管理\",\"pageCode\":\"reservation_admin_page\",\"pageType\":\"list\",\"path\":\"/admin/reservations\",\"requiresLogin\":true,\"tableName\":\"reservation_record\",\"visibleRoles\":[\"admin\"]},{\"code\":\"fine_admin\",\"dataScope\":\"ROLE\",\"name\":\"罚款管理\",\"pageCode\":\"fine_admin_page\",\"pageType\":\"list\",\"path\":\"/admin/fines\",\"requiresLogin\":true,\"tableName\":\"fine_record\",\"visibleRoles\":[\"admin\"]},{\"code\":\"reader_admin\",\"dataScope\":\"ROLE\",\"name\":\"读者管理\",\"pageCode\":\"reader_admin_page\",\"pageType\":\"list\",\"path\":\"/admin/readers\",\"requiresLogin\":true,\"tableName\":\"reader\",\"visibleRoles\":[\"admin\"]},{\"code\":\"admin_admin\",\"dataScope\":\"ROLE\",\"name\":\"管理员管理\",\"pageCode\":\"admin_admin_page\",\"pageType\":\"list\",\"path\":\"/admin/admins\",\"requiresLogin\":true,\"tableName\":\"admin\",\"visibleRoles\":[\"admin\"]},{\"code\":\"admin_profile\",\"dataScope\":\"CURRENT_USER\",\"name\":\"个人资料\",\"pageCode\":\"admin_profile_page\",\"pageType\":\"form\",\"path\":\"/admin/profile\",\"requiresLogin\":true,\"tableName\":\"admin\",\"visibleRoles\":[\"admin\"]}],\"frontendMenus\":[{\"code\":\"book_catalog\",\"dataScope\":\"PUBLIC\",\"name\":\"图书目录\",\"pageCode\":\"book_catalog_page\",\"pageType\":\"\",\"path\":\"/books\",\"requiresLogin\":false,\"tableName\":\"\",\"visibleRoles\":[]},{\"code\":\"my_borrows\",\"dataScope\":\"CURRENT_USER\",\"name\":\"我的借阅\",\"pageCode\":\"my_borrows_page\",\"pageType\":\"\",\"path\":\"/borrows\",\"requiresLogin\":true,\"tableName\":\"\",\"visibleRoles\":[\"reader\"]},{\"code\":\"my_reservations\",\"dataScope\":\"CURRENT_USER\",\"name\":\"我的预约\",\"pageCode\":\"my_reservations_page\",\"pageType\":\"\",\"path\":\"/reservations\",\"requiresLogin\":true,\"tableName\":\"\",\"visibleRoles\":[\"reader\"]},{\"code\":\"my_fines\",\"dataScope\":\"CURRENT_USER\",\"name\":\"我的罚款\",\"pageCode\":\"my_fines_page\",\"pageType\":\"\",\"path\":\"/fines\",\"requiresLogin\":true,\"tableName\":\"\",\"visibleRoles\":[\"reader\"]},{\"code\":\"reader_profile\",\"dataScope\":\"CURRENT_USER\",\"name\":\"个人资料\",\"pageCode\":\"reader_profile_page\",\"pageType\":\"\",\"path\":\"/profile\",\"requiresLogin\":true,\"tableName\":\"\",\"visibleRoles\":[\"reader\"]}],\"frontendPages\":[{\"code\":\"book_catalog_page\",\"menuCode\":\"book_catalog\",\"name\":\"图书目录\",\"pageType\":\"list\",\"parentPageCode\":\"\",\"path\":\"/books\",\"tableName\":\"book_info\"},{\"code\":\"book_detail_page\",\"menuCode\":\"book_catalog\",\"name\":\"图书详情\",\"pageType\":\"detail\",\"parentPageCode\":\"\",\"path\":\"/books/:id\",\"tableName\":\"book_info\"},{\"code\":\"my_borrows_page\",\"menuCode\":\"my_borrows\",\"name\":\"我的借阅\",\"pageType\":\"current_user_list\",\"parentPageCode\":\"\",\"path\":\"/borrows\",\"tableName\":\"borrow_record\"},{\"code\":\"my_reservations_page\",\"menuCode\":\"my_reservations\",\"name\":\"我的预约\",\"pageType\":\"current_user_list\",\"parentPageCode\":\"\",\"path\":\"/reservations\",\"tableName\":\"reservation_record\"},{\"code\":\"my_fines_page\",\"menuCode\":\"my_fines\",\"name\":\"我的罚款\",\"pageType\":\"current_user_list\",\"parentPageCode\":\"\",\"path\":\"/fines\",\"tableName\":\"fine_record\"},{\"code\":\"reader_profile_page\",\"menuCode\":\"reader_profile\",\"name\":\"个人资料\",\"pageType\":\"form\",\"parentPageCode\":\"\",\"path\":\"/profile\",\"tableName\":\"reader\"}],\"roles\":[{\"code\":\"reader\",\"description\":\"可以查询图书、借阅、预约、查看个人记录并缴纳罚款\",\"name\":\"读者\"},{\"code\":\"admin\",\"description\":\"系统管理员,管理图书、借阅、预约、读者及罚款\",\"name\":\"管理员\"}]}}', '{\n \"version\": \"1.0\",\n \"code\": \"library_manage\",\n \"name\": \"图书管理系统\",\n \"mainTable\": \"borrow_record\",\n \"statusField\": \"status\",\n \"notFoundMessage\": \"主记录不存在\",\n \"states\": [\n {\"code\": \"borrow_pending\", \"label\": \"待审核\"},\n {\"code\": \"borrow_borrowing\", \"label\": \"借阅中\"},\n {\"code\": \"borrow_returned\", \"label\": \"已归还\"},\n {\"code\": \"borrow_rejected\", \"label\": \"已驳回\"},\n {\"code\": \"reservation_pending\", \"label\": \"待确认\"},\n {\"code\": \"reservation_reserved\", \"label\": \"已预留\"},\n {\"code\": \"reservation_cancelled\", \"label\": \"已取消\"},\n {\"code\": \"reservation_expired\", \"label\": \"已超时\"},\n {\"code\": \"reservation_borrowed\", \"label\": \"已借出\"},\n {\"code\": \"fine_unpaid\", \"label\": \"未支付\"},\n {\"code\": \"fine_paid\", \"label\": \"已支付\"}\n ],\n \"actions\": [\n {\n \"code\": \"approve_borrow\",\n \"name\": \"审核通过\",\n \"from\": \"borrow_pending\",\n \"to\": \"borrow_borrowing\",\n \"actor\": \"admin\",\n \"method\": \"POST\",\n \"path\": \"/borrow-record/approve\",\n \"invalidStateMessage\": \"当前状态不能审核\",\n \"successMessage\": \"审核成功\",\n \"audit\": {\"userField\": \"approve_user_id\", \"timeField\": \"approve_time\"},\n \"effects\": [\n {\n \"type\": \"decrease\",\n \"table\": \"book_info\",\n \"relationField\": \"book_id\",\n \"field\": \"stock\",\n \"amount\": \"1\",\n \"min\": \"0\",\n \"notFoundMessage\": \"图书不存在\",\n \"errorMessage\": \"图书库存不足\"\n }\n ],\n \"button\": {\n \"scope\": \"admin\",\n \"pageCode\": \"borrow_admin_page\",\n \"slot\": \"list.rowActions\",\n \"type\": \"success\",\n \"confirm\": \"确认审核通过吗?\",\n \"order\": 10\n }\n },\n {\n \"code\": \"reject_borrow\",\n \"name\": \"驳回\",\n \"from\": \"borrow_pending\",\n \"to\": \"borrow_rejected\",\n \"actor\": \"admin\",\n \"method\": \"POST\",\n \"path\": \"/borrow-record/reject\",\n \"invalidStateMessage\": \"当前状态不能驳回\",\n \"successMessage\": \"已驳回\",\n \"effects\": [],\n \"button\": {\n \"scope\": \"admin\",\n \"pageCode\": \"borrow_admin_page\",\n \"slot\": \"list.rowActions\",\n \"type\": \"danger\",\n \"confirm\": \"确认驳回吗?\",\n \"order\": 20\n }\n },\n {\n \"code\": \"return_book\",\n \"name\": \"还书\",\n \"from\": \"borrow_borrowing\",\n \"to\": \"borrow_returned\",\n \"actor\": \"admin\",\n \"method\": \"POST\",\n \"path\": \"/borrow-record/return\",\n \"invalidStateMessage\": \"当前状态不能还书\",\n \"successMessage\": \"还书成功\",\n \"effects\": [\n {\n \"type\": \"increase\",\n \"table\": \"book_info\",\n \"relationField\": \"book_id\",\n \"field\": \"stock\",\n \"amount\": \"1\",\n \"notFoundMessage\": \"图书不存在\",\n \"errorMessage\": \"库存增加失败\"\n }\n ],\n \"button\": {\n \"scope\": \"admin\",\n \"pageCode\": \"borrow_admin_page\",\n \"slot\": \"list.rowActions\",\n \"type\": \"primary\",\n \"confirm\": \"确认还书吗?\",\n \"order\": 30\n }\n },\n {\n \"code\": \"confirm_reservation\",\n \"name\": \"确认到馆\",\n \"from\": \"reservation_pending\",\n \"to\": \"reservation_reserved\",\n \"actor\": \"admin\",\n \"method\": \"POST\",\n \"path\": \"/reservation/confirm\",\n \"invalidStateMessage\": \"当前预约状态不能确认\",\n \"successMessage\": \"已确认到馆\",\n \"effects\": [],\n \"button\": {\n \"scope\": \"admin\",\n \"pageCode\": \"reservation_admin_page\",\n \"slot\": \"list.rowActions\",\n \"type\": \"success\",\n \"confirm\": \"确认该预约图书已到馆吗?\",\n \"order\": 10\n }\n },\n {\n \"code\": \"cancel_reservation\",\n \"name\": \"取消预约\",\n \"from\": \"reservation_pending\",\n \"to\": \"reservation_cancelled\",\n \"actor\": \"admin\",\n \"method\": \"POST\",\n \"path\": \"/reservation/cancel\",\n \"invalidStateMessage\": \"当前预约状态不能取消\",\n \"successMessage\": \"已取消预约\",\n \"effects\": [],\n \"button\": {\n \"scope\": \"admin\",\n \"pageCode\": \"reservation_admin_page\",\n \"slot\": \"list.rowActions\",\n \"type\": \"warning\",\n \"confirm\": \"确认取消该预约吗?\",\n \"order\": 20\n }\n },\n {\n \"code\": \"borrow_from_reservation\",\n \"name\": \"借出预约图书\",\n \"from\": \"reservation_reserved\",\n \"to\": \"reservation_borrowed\",\n \"actor\": \"admin\",\n \"method\": \"POST\",\n \"path\": \"/reservation/borrow\",\n \"invalidStateMessage\": \"当前预约状态不能借出\",\n \"successMessage\": \"借出成功\",\n \"effects\": [\n {\n \"type\": \"create_record\",\n \"table\": \"borrow_record\",\n \"values\": {\n \"user_id\": \"currentUserId\",\n \"book_id\": \"record.book_id\",\n \"status\": \"borrow_borrowing\",\n \"start_time\": \"now\",\n \"due_time\": \"now\",\n \"admin_id\": \"currentUserId\"\n }\n },\n {\n \"type\": \"decrease\",\n \"table\": \"book_info\",\n \"relationField\": \"book_id\",\n \"field\": \"stock\",\n \"amount\": \"1\",\n \"min\": \"0\",\n \"notFoundMessage\": \"图书不存在\",\n \"errorMessage\": \"图书库存不足\"\n }\n ],\n \"button\": {\n \"scope\": \"admin\",\n \"pageCode\": \"reservation_admin_page\",\n \"slot\": \"list.rowActions\",\n \"type\": \"primary\",\n \"confirm\": \"确认借出该预约图书吗?\",\n \"order\": 30\n }\n },\n {\n \"code\": \"pay_fine\",\n \"name\": \"缴纳罚款\",\n \"from\": \"fine_unpaid\",\n \"to\": \"fine_paid\",\n \"actor\": \"reader\",\n \"method\": \"POST\",\n \"path\": \"/fine/pay\",\n \"invalidStateMessage\": \"该罚款已支付或无需缴纳\",\n \"successMessage\": \"缴纳成功\",\n \"effects\": [],\n \"button\": {\n \"scope\": \"current_user\",\n \"pageCode\": \"my_fines_page\",\n \"slot\": \"list.rowActions\",\n \"type\": \"primary\",\n \"confirm\": \"确认缴纳该笔罚款吗?\",\n \"order\": 10\n }\n }\n ],\n \"metrics\": [\n {\"code\": \"total_books\", \"name\": \"图书总数\", \"table\": \"book_info\", \"aggregate\": \"count\", \"field\": \"id\", \"unit\": \"本\"},\n {\"code\": \"total_borrowed\", \"name\": \"借阅数量\", \"table\": \"borrow_record\", \"aggregate\": \"count\", \"field\": \"id\", \"status\": \"borrow_borrowing\", \"unit\": \"条\"},\n {\"code\": \"total_readers\", \"name\": \"读者总数\", \"table\": \"reader\", \"aggregate\": \"count\", \"field\": \"id\", \"unit\": \"人\"},\n {\"code\": \"unpaid_fines\", \"name\": \"未缴罚款总额\", \"table\": \"fine_record\", \"aggregate\": \"sum\", \"field\": \"amount\", \"status\": \"fine_unpaid\", \"unit\": \"元\"}\n ]\n}', '0', 114704, 2008, 512, 1496, 10797, 8935, 2008, 10797, 12805, 3, 0.02310024, '1', NULL, '2026-07-14 15:55:26');
INSERT INTO `front_ai_usage_ledger` VALUES (113, 102, 102, 102, 100, 'database', 'deepseek', 'deepseek-v4-flash', 'front.database', 'V1', '14dcad479b01de068e5c5bc39b5cd7a591a09d334ee6812483d8ac00dd8c9d61', '你是 MySQL 业务数据库设计专家。只输出符合用户消息结构的 JSON根据已确认的应用蓝图和业务闭环生成可直接落地的表、字段、主外键、字典和表操作策略。字段必须业务化且类型合法所有蓝图与闭环引用必须有真实表字段承载不得生成菜单、权限关系、代码或业务动作。', '根据项目输入 JSON 生成 MySQL 数据库设计 JSON只返回 JSON不要 Markdown 围栏或解释。\nConfirmed app blueprint JSON and Confirmed business loop plan JSON are supplied in the input.\nDatabase generation constraints from the business loop plan must be enforced.\nEvery confirmedBusinessLoopPlan.metrics tableName, field, and filters.field must exist in the generated schema. Numeric sum/avg/min/max metric fields must use a compatible numeric column type. Status-filter metric values must remain compatible with the matching stateMachines.states.\nIf input.mode is correction, repair input.originalResponse according to input.validationError and return the complete corrected database JSON. Do not drop unrelated valid tables or fields.\n输出结构{\"tables\":[{\"tableName\":\"car_info\",\"tableComment\":\"车辆信息表\",\"adminMenuName\":\"车辆管理\",\"operations\":{\"add\":true,\"edit\":true,\"remove\":true,\"removeType\":\"physical\",\"reason\":\"\"},\"columns\":[{\"columnName\":\"id\",\"columnLabel\":\"ID\",\"columnComment\":\"主键ID\",\"columnType\":\"bigint(20)\",\"isPk\":\"1\",\"isIncrement\":\"1\",\"isRequired\":\"1\"}]}]}。\n不要使用 field_1 等占位字段;每个表必须包含非空 columns以及 adminMenuName 和 operations.add/edit/remove/removeType/reason。\nadminMenuName 必须来自本表 tableComment/tableName不得复用其他表或宽泛模块名称。\nadminMenuName must come from that table\'s own tableComment or tableName.\n字段数组名称只能是 columns不能使用 fields、fieldDesign、fieldList、columnList。\nEvery table must include a non-empty columns array; use columns exactly.\n每个字段必须包含 columnName、columnLabel、columnComment、columnType、isPk、isIncrement、isRequired。columnLabel 是短 UI 标签columnComment 是完整数据库说明。\n可提供 javaType、htmlTypehtmlType 只能是 input、textarea、select、radio、checkbox、datetime、imageUpload、fileUpload、editor。\nselect/radio/checkbox 应提供 dictType 和 dictOptions。关联选择使用 remote:target_table:value_field:label_field且目标表和值/标签字段必须都存在于本次 tables JSON。\n非主键外键字段应在目标表存在时使用 remote select无目标表的分类、类型、状态使用本地 dictOptions 或普通输入。\n普通主数据表除唯一主键外至少包含 4 个业务字段。\n订单、支付、借还、审批、流程、任务、库存记录等动作记录表使用仅新增关系、审计、日志、历史表使用只读普通主数据表使用完整 CRUD。\n不要生成 businessActions、业务动作、工作流、代码、菜单表、user_role、角色权限表或权限表。\nDo not generate menu tables, user_role tables, role-permission tables, or permission tables.\n表名字段名只使用小写字母、数字、下划线每表必须且只能有一个主键。字段类型只能使用 bigint(20)、int(11)、varchar(n)、char(n)、decimal(p,s)、datetime、date、text、longtext。\n为 confirmedAppBlueprint.roles 中每个角色创建独立账号表admin 使用 admin其他角色使用 role.code。不得使用共享用户表或 role_id/role_code/user_role。\n角色账号表包含 `<role_code>_id` 自增主键、username、password_hash、nickname、status、create_time。admin 只能登录后台,非 admin 角色登录前台。\n生成 frontendPages.tableName 引用的全部表;个人资料页必须绑定对应非 admin 角色账号表。requiresLogin=true 且 dataScope=CURRENT_USER 的业务数据通常包含 user_id。\ncanonicalTableRegistry 中的名称是最终规范表名。confirmedBusinessLoopPlan 若出现与其指向同一业务对象的同义表名,必须使用 canonicalTableRegistry 中的名称,不得同时生成两张同义表。\n根据 confirmedBusinessLoopPlan 创建 coreObjects.tableName、actions.ownerTable补齐 stateMachines.statusField、quantityRules.quantityField 以及 recordRules 和动作前置条件需要的字段。状态值不得超出 stateMachines.states。\n严格实现 confirmedBusinessLoopPlan.businessPoliciesTIME_LIMIT 的 startField、dueField 使用 datetimeOVERDUE_FEE 的 dueField 使用 datetime、daysTargetField 使用 int(11)、targetField 使用 decimal(10,2)QUANTITY_LIMIT 的 targetField 使用 int(11) 且默认值为 0。所有政策字段必须位于政策指定的 tableName禁止只把期限或公式写进 columnComment 而不创建字段。\nDo not invent status values outside stateMachines.states.\n严格遵守 input.limits.maxTables 和 maxColumnsPerTable。\n项目输入 JSON\n{\"mode\":\"generate\",\"projectName\":\"图书管理系统\",\"projectDescription\":\"项目定位:面向高校图书馆的图书管理系统,用于读者借阅预约、管理员日常管理和系统管理员后台维护。 \\n角色读者、管理员。 \\n核心流程读者查询图书并发起借阅/预约请求管理员审核并完成借出状态变为已借出读者还书时管理员处理并更新图书状态为可借预约图书到馆后保留2天超时自动释放借阅超期生成罚款读者可通过管理台缴纳。 \\n关键规则每位读者最多同时借阅5本每本借阅期限30天超期每天罚款0.5元预约图书保留2天图书总数固定可借数量随借出减少还书后恢复。 \\n异常边界可借数量为0时无法借阅/预约;已借出状态不得重复借出;预约取消后释放名额;超期未还时借阅入口禁用;若读者已有同本书未还,不可再次借阅。\",\"industryTemplate\":\"\",\"stylePreset\":\"dark-tech\",\"extraRequirements\":\"\",\"confirmedAppBlueprint\":{\"adminHomeDashboard\":{\"charts\":[{\"code\":\"borrow_trend\",\"filters\":[],\"metrics\":[],\"semantic\":\"order\",\"tableName\":\"borrow_record\",\"type\":\"line\"},{\"code\":\"book_category_distribution\",\"filters\":[],\"metrics\":[],\"semantic\":\"content\",\"tableName\":\"book_info\",\"type\":\"pie\"}],\"description\":\"核心业务数据\",\"metrics\":[{\"aggregate\":\"count\",\"code\":\"total_books\",\"filters\":[],\"semantic\":\"content\",\"tableName\":\"book_info\"},{\"aggregate\":\"count\",\"code\":\"total_borrowed\",\"filters\":[],\"semantic\":\"order\",\"tableName\":\"borrow_record\"},{\"aggregate\":\"count\",\"code\":\"total_readers\",\"filters\":[],\"semantic\":\"user\",\"tableName\":\"reader\"},{\"aggregate\":\"sum\",\"code\":\"unpaid_fines\",\"field\":\"amount\",\"filters\":[],\"semantic\":\"money\",\"tableName\":\"fine_record\"}],\"title\":\"运营总览\"},\"adminMenus\":[{\"code\":\"book_admin\",\"dataScope\":\"ROLE\",\"name\":\"图书管理\",\"pageCode\":\"book_admin_page\",\"pageType\":\"list\",\"path\":\"/admin/books\",\"requiresLogin\":true,\"tableName\":\"book_info\",\"visibleRoles\":[\"admin\"]},{\"code\":\"borrow_admin\",\"dataScope\":\"ROLE\",\"name\":\"借阅管理\",\"pageCode\":\"borrow_admin_page\",\"pageType\":\"list\",\"path\":\"/admin/borrows\",\"requiresLogin\":true,\"tableName\":\"borrow_record\",\"visibleRoles\":[\"admin\"]},{\"code\":\"reservation_admin\",\"dataScope\":\"ROLE\",\"name\":\"预约管理\",\"pageCode\":\"reservation_admin_page\",\"pageType\":\"list\",\"path\":\"/admin/reservations\",\"requiresLogin\":true,\"tableName\":\"reservation_record\",\"visibleRoles\":[\"admin\"]},{\"code\":\"fine_admin\",\"dataScope\":\"ROLE\",\"name\":\"罚款管理\",\"pageCode\":\"fine_admin_page\",\"pageType\":\"list\",\"path\":\"/admin/fines\",\"requiresLogin\":true,\"tableName\":\"fine_record\",\"visibleRoles\":[\"admin\"]},{\"code\":\"reader_admin\",\"dataScope\":\"ROLE\",\"name\":\"读者管理\",\"pageCode\":\"reader_admin_page\",\"pageType\":\"list\",\"path\":\"/admin/readers\",\"requiresLogin\":true,\"tableName\":\"reader\",\"visibleRoles\":[\"admin\"]},{\"code\":\"admin_admin\",\"dataScope\":\"ROLE\",\"name\":\"管理员管理\",\"pageCode\":\"admin_admin_page\",\"pageType\":\"list\",\"path\":\"/admin/admins\",\"requiresLogin\":true,\"tableName\":\"admin\",\"visibleRoles\":[\"admin\"]},{\"code\":\"admin_profile\",\"dataScope\":\"CURRENT_USER\",\"name\":\"个人资料\",\"pageCode\":\"admin_profile_page\",\"pageType\":\"form\",\"path\":\"/admin/profile\",\"requiresLogin\":true,\"tableName\":\"admin\",\"visibleRoles\":[\"admin\"]}],\"frontendMenus\":[{\"code\":\"book_catalog\",\"dataScope\":\"PUBLIC\",\"name\":\"图书目录\",\"pageCode\":\"book_catalog_page\",\"pageType\":\"\",\"path\":\"/books\",\"requiresLogin\":false,\"tableName\":\"\",\"visibleRoles\":[]},{\"code\":\"my_borrows\",\"dataScope\":\"CURRENT_USER\",\"name\":\"我的借阅\",\"pageCode\":\"my_borrows_page\",\"pageType\":\"\",\"path\":\"/borrows\",\"requiresLogin\":true,\"tableName\":\"\",\"visibleRoles\":[\"reader\"]},{\"code\":\"my_reservations\",\"dataScope\":\"CURRENT_USER\",\"name\":\"我的预约\",\"pageCode\":\"my_reservations_page\",\"pageType\":\"\",\"path\":\"/reservations\",\"requiresLogin\":true,\"tableName\":\"\",\"visibleRoles\":[\"reader\"]},{\"code\":\"my_fines\",\"dataScope\":\"CURRENT_USER\",\"name\":\"我的罚款\",\"pageCode\":\"my_fines_page\",\"pageType\":\"\",\"path\":\"/fines\",\"requiresLogin\":true,\"tableName\":\"\",\"visibleRoles\":[\"reader\"]},{\"code\":\"reader_profile\",\"dataScope\":\"CURRENT_USER\",\"name\":\"个人资料\",\"pageCode\":\"reader_profile_page\",\"pageType\":\"\",\"path\":\"/profile\",\"requiresLogin\":true,\"tableName\":\"\",\"visibleRoles\":[\"reader\"]}],\"frontendPages\":[{\"code\":\"book_catalog_page\",\"menuCode\":\"book_catalog\",\"name\":\"图书目录\",\"pageType\":\"list\",\"parentPageCode\":\"\",\"path\":\"/books\",\"tableName\":\"book_info\"},{\"code\":\"book_detail_page\",\"menuCode\":\"book_catalog\",\"name\":\"图书详情\",\"pageType\":\"detail\",\"parentPageCode\":\"\",\"path\":\"/books/:id\",\"tableName\":\"book_info\"},{\"code\":\"my_borrows_page\",\"menuCode\":\"my_borrows\",\"name\":\"我的借阅\",\"pageType\":\"current_user_list\",\"parentPageCode\":\"\",\"path\":\"/borrows\",\"tableName\":\"borrow_record\"},{\"code\":\"my_reservations_page\",\"menuCode\":\"my_reservations\",\"name\":\"我的预约\",\"pageType\":\"current_user_list\",\"parentPageCode\":\"\",\"path\":\"/reservations\",\"tableName\":\"reservation_record\"},{\"code\":\"my_fines_page\",\"menuCode\":\"my_fines\",\"name\":\"我的罚款\",\"pageType\":\"current_user_list\",\"parentPageCode\":\"\",\"path\":\"/fines\",\"tableName\":\"fine_record\"},{\"code\":\"reader_profile_page\",\"menuCode\":\"reader_profile\",\"name\":\"个人资料\",\"pageType\":\"form\",\"parentPageCode\":\"\",\"path\":\"/profile\",\"tableName\":\"reader\"}],\"roles\":[{\"code\":\"reader\",\"description\":\"可以查询图书、借阅、预约、查看个人记录并缴纳罚款\",\"name\":\"读者\"},{\"code\":\"admin\",\"description\":\"系统管理员,管理图书、借阅、预约、读者及罚款\",\"name\":\"管理员\"}]},\"flowConfig\":{\"actions\":[{\"actor\":\"admin\",\"audit\":{\"timeField\":\"approve_time\",\"userField\":\"approve_user_id\"},\"button\":{\"confirm\":\"确认审核通过吗?\",\"order\":10,\"pageCode\":\"borrow_admin_page\",\"scope\":\"admin\",\"slot\":\"list.rowActions\",\"type\":\"success\"},\"code\":\"approve_borrow\",\"effects\":[{\"amount\":\"1\",\"errorMessage\":\"图书库存不足\",\"field\":\"stock\",\"min\":\"0\",\"notFoundMessage\":\"图书不存在\",\"relationField\":\"book_id\",\"table\":\"book_info\",\"type\":\"decrease\",\"values\":{}}],\"from\":\"borrow_pending\",\"invalidStateMessage\":\"当前状态不能审核\",\"method\":\"POST\",\"name\":\"审核通过\",\"path\":\"/borrow-record/approve\",\"successMessage\":\"审核成功\",\"to\":\"borrow_borrowing\"},{\"actor\":\"admin\",\"button\":{\"confirm\":\"确认驳回吗?\",\"order\":20,\"pageCode\":\"borrow_admin_page\",\"scope\":\"admin\",\"slot\":\"list.rowActions\",\"type\":\"danger\"},\"code\":\"reject_borrow\",\"effects\":[],\"from\":\"borrow_pending\",\"invalidStateMessage\":\"当前状态不能驳回\",\"method\":\"POST\",\"name\":\"驳回\",\"path\":\"/borrow-record/reject\",\"successMessage\":\"已驳回\",\"to\":\"borrow_rejected\"},{\"actor\":\"admin\",\"button\":{\"confirm\":\"确认还书吗?\",\"order\":30,\"pageCode\":\"borrow_admin_page\",\"scope\":\"admin\",\"slot\":\"list.rowActions\",\"type\":\"primary\"},\"code\":\"return_book\",\"effects\":[{\"amount\":\"1\",\"errorMessage\":\"库存增加失败\",\"field\":\"stock\",\"min\":\"0\",\"notFoundMessage\":\"图书不存在\",\"relationField\":\"book_id\",\"table\":\"book_info\",\"type\":\"increase\",\"values\":{}}],\"from\":\"borrow_borrowing\",\"invalidStateMessage\":\"当前状态不能还书\",\"method\":\"POST\",\"name\":\"还书\",\"path\":\"/borrow-record/return\",\"successMessage\":\"还书成功\",\"to\":\"borrow_returned\"},{\"actor\":\"admin\",\"button\":{\"confirm\":\"确认该预约图书已到馆吗?\",\"order\":10,\"pageCode\":\"reservation_admin_page\",\"scope\":\"admin\",\"slot\":\"list.rowActions\",\"type\":\"success\"},\"code\":\"confirm_reservation\",\"effects\":[],\"from\":\"reservation_pending\",\"invalidStateMessage\":\"当前预约状态不能确认\",\"method\":\"POST\",\"name\":\"确认到馆\",\"path\":\"/reservation/confirm\",\"successMessage\":\"已确认到馆\",\"to\":\"reservation_reserved\"},{\"actor\":\"admin\",\"button\":{\"confirm\":\"确认取消该预约吗?\",\"order\":20,\"pageCode\":\"reservation_admin_page\",\"scope\":\"admin\",\"slot\":\"list.rowActions\",\"type\":\"warning\"},\"code\":\"cancel_reservation\",\"effects\":[],\"from\":\"reservation_pending\",\"invalidStateMessage\":\"当前预约状态不能取消\",\"method\":\"POST\",\"name\":\"取消预约\",\"path\":\"/reservation/cancel\",\"successMessage\":\"已取消预约\",\"to\":\"reservation_cancelled\"},{\"actor\":\"admin\",\"button\":{\"confirm\":\"确认借出该预约图书吗?\",\"order\":30,\"pageCode\":\"reservation_admin_page\",\"scope\":\"admin\",\"slot\":\"list.rowActions\",\"type\":\"primary\"},\"code\":\"borrow_from_reservation\",\"effects\":[{\"amount\":\"1\",\"min\":\"0\",\"table\":\"borrow_record\",\"type\":\"create_record\",\"values\":{\"start_time\":\"now\",\"due_time\":\"now\",\"user_id\":\"currentUserId\",\"admin_id\":\"currentUserId\",\"book_id\":\"record.book_id\",\"status\":\"borrow_borrowing\"}},{\"amount\":\"1\",\"errorMessage\":\"图书库存不足\",\"field\":\"stock\",\"min\":\"0\",\"notFoundMessage\":\"图书不存在\",\"relationField\":\"book_id\",\"table\":\"book_info\",\"type\":\"decrease\",\"values\":{}}],\"from\":\"reservation_reserved\",\"invalidStateMessage\":\"当前预约状态不能借出\",\"method\":\"POST\",\"name\":\"借出预约图书\",\"path\":\"/reservation/borrow\",\"successMessage\":\"借出成功\",\"to\":\"reservation_borrowed\"},{\"actor\":\"reader\",\"button\":{\"confirm\":\"确认缴纳该笔罚款吗?\",\"order\":10,\"pageCode\":\"my_fines_page\",\"scope\":\"current_user\",\"slot\":\"list.rowActions\",\"type\":\"primary\"},\"code\":\"pay_fine\",\"effects\":[],\"from\":\"fine_unpaid\",\"invalidStateMessage\":\"该罚款已支付或无需缴纳\",\"method\":\"POST\",\"name\":\"缴纳罚款\",\"path\":\"/fine/pay\",\"successMessage\":\"缴纳成功\",\"to\":\"fine_paid\"}],\"code\":\"library_manage\",\"mainTable\":\"borrow_record\",\"metrics\":[{\"aggregate\":\"count\",\"code\":\"total_books\",\"field\":\"id\",\"name\":\"图书总数\",\"table\":\"book_info\",\"unit\":\"本\"},{\"aggregate\":\"count\",\"code\":\"total_borrowed\",\"field\":\"id\",\"name\":\"借阅数量\",\"status\":\"borrow_borrowing\",\"table\":\"borrow_record\",\"unit\":\"条\"},{\"aggregate\":\"count\",\"code\":\"total_readers\",\"field\":\"id\",\"name\":\"读者总数\",\"table\":\"reader\",\"unit\":\"人\"},{\"aggregate\":\"sum\",\"code\":\"unpaid_fines\",\"field\":\"amount\",\"name\":\"未缴罚款总额\",\"status\":\"fine_unpaid\",\"table\":\"fine_record\",\"unit\":\"元\"}],\"name\":\"图书管理系统\",\"notFoundMessage\":\"主记录不存在\",\"states\":[{\"code\":\"borrow_pending\",\"label\":\"待审核\"},{\"code\":\"borrow_borrowing\",\"label\":\"借阅中\"},{\"code\":\"borrow_returned\",\"label\":\"已归还\"},{\"code\":\"borrow_rejected\",\"label\":\"已驳回\"},{\"code\":\"reservation_pending\",\"label\":\"待确认\"},{\"code\":\"reservation_reserved\",\"label\":\"已预留\"},{\"code\":\"reservation_cancelled\",\"label\":\"已取消\"},{\"code\":\"reservation_expired\",\"label\":\"已超时\"},{\"code\":\"reservation_borrowed\",\"label\":\"已借出\"},{\"code\":\"fine_unpaid\",\"label\":\"未支付\"},{\"code\":\"fine_paid\",\"label\":\"已支付\"}],\"statusField\":\"status\",\"version\":\"1.0\"},\"compiledFlowContract\":{\"acceptanceScenarios\":[],\"actions\":[{\"actor\":\"admin\",\"code\":\"approve_borrow\",\"name\":\"审核通过\",\"ownerObject\":\"borrow_record\",\"ownerTable\":\"borrow_record\",\"preconditions\":[],\"quantityEffects\":[{\"actionCode\":\"approve_borrow\",\"amount\":\"1\",\"effectType\":\"decrease\",\"objectCode\":\"book_info\",\"quantityField\":\"stock\",\"tableName\":\"book_info\"}],\"recordEffects\":[],\"required\":true,\"stateTransitions\":[{\"actionCode\":\"approve_borrow\",\"fromState\":\"borrow_pending\",\"toState\":\"borrow_borrowing\"}]},{\"actor\":\"admin\",\"code\":\"reject_borrow\",\"name\":\"驳回\",\"ownerObject\":\"borrow_record\",\"ownerTable\":\"borrow_record\",\"preconditions\":[],\"quantityEffects\":[],\"recordEffects\":[],\"required\":true,\"stateTransitions\":[{\"actionCode\":\"reject_borrow\",\"fromState\":\"borrow_pending\",\"toState\":\"borrow_rejected\"}]},{\"actor\":\"admin\",\"code\":\"return_book\",\"name\":\"还书\",\"ownerObject\":\"borrow_record\",\"ownerTable\":\"borrow_record\",\"preconditions\":[],\"quantityEffects\":[{\"actionCode\":\"return_book\",\"amount\":\"1\",\"effectType\":\"increase\",\"objectCode\":\"book_info\",\"quantityField\":\"stock\",\"tableName\":\"book_info\"}],\"recordEffects\":[],\"required\":true,\"stateTransitions\":[{\"actionCode\":\"return_book\",\"fromState\":\"borrow_borrowing\",\"toState\":\"borrow_returned\"}]},{\"actor\":\"admin\",\"code\":\"confirm_reservation\",\"name\":\"确认到馆\",\"ownerObject\":\"borrow_record\",\"ownerTable\":\"borrow_record\",\"preconditions\":[],\"quantityEffects\":[],\"recordEffects\":[],\"required\":true,\"stateTransitions\":[{\"actionCode\":\"confirm_reservation\",\"fromState\":\"reservation_pending\",\"toState\":\"reservation_reserved\"}]},{\"actor\":\"admin\",\"code\":\"cancel_reservation\",\"name\":\"取消预约\",\"ownerObject\":\"borrow_record\",\"ownerTable\":\"borrow_record\",\"preconditions\":[],\"quantityEffects\":[],\"recordEffects\":[],\"required\":true,\"stateTransitions\":[{\"actionCode\":\"cancel_reservation\",\"fromState\":\"reservation_pending\",\"toState\":\"reservation_cancelled\"}]},{\"actor\":\"admin\",\"code\":\"borrow_from_reservation\",\"name\":\"借出预约图书\",\"ownerObject\":\"borrow_record\",\"ownerTable\":\"borrow_record\",\"preconditions\":[],\"quantityEffects\":[{\"actionCode\":\"borrow_from_reservation\",\"amount\":\"1\",\"effectType\":\"decrease\",\"objectCode\":\"book_info\",\"quantityField\":\"stock\",\"tableName\":\"book_info\"}],\"recordEffects\":[],\"required\":true,\"stateTransitions\":[{\"actionCode\":\"borrow_from_reservation\",\"fromState\":\"reservation_reserved\",\"toState\":\"reservation_borrowed\"}]},{\"actor\":\"reader\",\"code\":\"pay_fine\",\"name\":\"缴纳罚款\",\"ownerObject\":\"borrow_record\",\"ownerTable\":\"borrow_record\",\"preconditions\":[],\"quantityEffects\":[],\"recordEffects\":[],\"required\":true,\"stateTransitions\":[{\"actionCode\":\"pay_fine\",\"fromState\":\"fine_unpaid\",\"toState\":\"fine_paid\"}]}],\"businessPolicies\":[],\"coreObjects\":[{\"code\":\"borrow_record\",\"name\":\"图书管理系统\",\"objectType\":\"main\",\"tableName\":\"borrow_record\"},{\"code\":\"book_info\",\"name\":\"book_info\",\"objectType\":\"related\",\"tableName\":\"book_info\"}],\"domainName\":\"图书管理系统\",\"metrics\":[{\"aggregate\":\"count\",\"code\":\"total_books\",\"field\":\"id\",\"filters\":[],\"name\":\"图书总数\",\"relatedActionCodes\":[],\"required\":true,\"tableName\":\"book_info\",\"unit\":\"本\"},{\"aggregate\":\"count\",\"code\":\"total_borrowed\",\"field\":\"id\",\"filters\":[{\"field\":\"status\",\"operator\":\"eq\",\"values\":[\"borrow_borrowing\"]}],\"name\":\"借阅数量\",\"relatedActionCodes\":[],\"required\":true,\"tableName\":\"borrow_record\",\"unit\":\"条\"},{\"aggregate\":\"count\",\"code\":\"total_readers\",\"field\":\"id\",\"filters\":[],\"name\":\"读者总数\",\"relatedActionCodes\":[],\"required\":true,\"tableName\":\"reader\",\"unit\":\"人\"},{\"aggregate\":\"sum\",\"code\":\"unpaid_fines\",\"field\":\"amount\",\"filters\":[{\"field\":\"status\",\"operator\":\"eq\",\"values\":[\"fine_unpaid\"]}],\"name\":\"未缴罚款总额\",\"relatedActionCodes\":[],\"required\":true,\"tableName\":\"fine_record\",\"unit\":\"元\"}],\"pageBindings\":[{\"actionCode\":\"approve_borrow\",\"pageCode\":\"borrow_admin_page\",\"slot\":\"list.rowActions\",\"tableName\":\"borrow_record\",\"target\":\"admin\"},{\"actionCode\":\"reject_borrow\",\"pageCode\":\"borrow_admin_page\",\"slot\":\"list.rowActions\",\"tableName\":\"borrow_record\",\"target\":\"admin\"},{\"actionCode\":\"return_book\",\"pageCode\":\"borrow_admin_page\",\"slot\":\"list.rowActions\",\"tableName\":\"borrow_record\",\"target\":\"admin\"},{\"actionCode\":\"confirm_reservation\",\"pageCode\":\"reservation_admin_page\",\"slot\":\"list.rowActions\",\"tableName\":\"borrow_record\",\"target\":\"admin\"},{\"actionCode\":\"cancel_reservation\",\"pageCode\":\"reservation_admin_page\",\"slot\":\"list.rowActions\",\"tableName\":\"borrow_record\",\"target\":\"admin\"},{\"actionCode\":\"borrow_from_reservation\",\"pageCode\":\"reservation_admin_page\",\"slot\":\"list.rowActions\",\"tableName\":\"borrow_record\",\"target\":\"admin\"},{\"actionCode\":\"pay_fine\",\"pageCode\":\"my_fines_page\",\"slot\":\"list.rowActions\",\"tableName\":\"borrow_record\",\"target\":\"current_user\"}],\"quantityRules\":[{\"actionCode\":\"approve_borrow\",\"amount\":\"1\",\"effectType\":\"decrease\",\"objectCode\":\"book_info\",\"quantityField\":\"stock\",\"tableName\":\"book_info\"},{\"actionCode\":\"return_book\",\"amount\":\"1\",\"effectType\":\"increase\",\"objectCode\":\"book_info\",\"quantityField\":\"stock\",\"tableName\":\"book_info\"},{\"actionCode\":\"borrow_from_reservation\",\"amount\":\"1\",\"effectType\":\"decrease\",\"objectCode\":\"book_info\",\"quantityField\":\"stock\",\"tableName\":\"book_info\"}],\"recordRules\":[],\"stateMachines\":[{\"objectCode\":\"borrow_record\",\"states\":[\"borrow_pending\",\"borrow_borrowing\",\"borrow_returned\",\"borrow_rejected\",\"reservation_pending\",\"reservation_reserved\",\"reservation_cancelled\",\"reservation_expired\",\"reservation_borrowed\",\"fine_unpaid\",\"fine_paid\"],\"statusField\":\"status\",\"tableName\":\"borrow_record\",\"transitions\":[{\"actionCode\":\"approve_borrow\",\"fromState\":\"borrow_pending\",\"toState\":\"borrow_borrowing\"},{\"actionCode\":\"reject_borrow\",\"fromState\":\"borrow_pending\",\"toState\":\"borrow_rejected\"},{\"actionCode\":\"return_book\",\"fromState\":\"borrow_borrowing\",\"toState\":\"borrow_returned\"},{\"actionCode\":\"confirm_reservation\",\"fromState\":\"reservation_pending\",\"toState\":\"reservation_reserved\"},{\"actionCode\":\"cancel_reservation\",\"fromState\":\"reservation_pending\",\"toState\":\"reservation_cancelled\"},{\"actionCode\":\"borrow_from_reservation\",\"fromState\":\"reservation_reserved\",\"toState\":\"reservation_borrowed\"},{\"actionCode\":\"pay_fine\",\"fromState\":\"fine_unpaid\",\"toState\":\"fine_paid\"}]}]},\"canonicalTableRegistry\":[\"book_info\",\"borrow_record\",\"reservation_record\",\"fine_record\",\"reader\",\"admin\"],\"limits\":{\"maxTables\":12,\"maxColumnsPerTable\":30}}', '{\n \"tables\": [\n {\n \"tableName\": \"book_info\",\n \"tableComment\": \"图书信息表\",\n \"adminMenuName\": \"图书管理\",\n \"operations\": {\n \"add\": true,\n \"edit\": true,\n \"remove\": true,\n \"removeType\": \"physical\",\n \"reason\": \"\"\n },\n \"columns\": [\n {\n \"columnName\": \"id\",\n \"columnLabel\": \"ID\",\n \"columnComment\": \"主键ID\",\n \"columnType\": \"bigint(20)\",\n \"isPk\": \"1\",\n \"isIncrement\": \"1\",\n \"isRequired\": \"1\"\n },\n {\n \"columnName\": \"title\",\n \"columnLabel\": \"书名\",\n \"columnComment\": \"图书名称\",\n \"columnType\": \"varchar(200)\",\n \"isPk\": \"0\",\n \"isIncrement\": \"0\",\n \"isRequired\": \"1\"\n },\n {\n \"columnName\": \"author\",\n \"columnLabel\": \"作者\",\n \"columnComment\": \"图书作者\",\n \"columnType\": \"varchar(100)\",\n \"isPk\": \"0\",\n \"isIncrement\": \"0\",\n \"isRequired\": \"1\"\n },\n {\n \"columnName\": \"isbn\",\n \"columnLabel\": \"ISBN\",\n \"columnComment\": \"国际标准书号\",\n \"columnType\": \"varchar(20)\",\n \"isPk\": \"0\",\n \"isIncrement\": \"0\",\n \"isRequired\": \"0\"\n },\n {\n \"columnName\": \"publisher\",\n \"columnLabel\": \"出版社\",\n \"columnComment\": \"出版社名称\",\n \"columnType\": \"varchar(100)\",\n \"isPk\": \"0\",\n \"isIncrement\": \"0\",\n \"isRequired\": \"0\"\n },\n {\n \"columnName\": \"publish_date\",\n \"columnLabel\": \"出版日期\",\n \"columnComment\": \"图书出版日期\",\n \"columnType\": \"date\",\n \"isPk\": \"0\",\n \"isIncrement\": \"0\",\n \"isRequired\": \"0\"\n },\n {\n \"columnName\": \"category\",\n \"columnLabel\": \"分类\",\n \"columnComment\": \"图书分类\",\n \"columnType\": \"varchar(50)\",\n \"isPk\": \"0\",\n \"isIncrement\": \"0\",\n \"isRequired\": \"0\",\n \"htmlType\": \"select\",\n \"dictType\": \"book_category\",\n \"dictOptions\": [\n {\"value\": \"literature\", \"label\": \"文学\"},\n {\"value\": \"science\", \"label\": \"科学\"},\n {\"value\": \"history\", \"label\": \"历史\"},\n {\"value\": \"technology\", \"label\": \"技术\"}\n ]\n },\n {\n \"columnName\": \"stock\",\n \"columnLabel\": \"可借数量\",\n \"columnComment\": \"当前可借出的图书数量\",\n \"columnType\": \"int(11)\",\n \"isPk\": \"0\",\n \"isIncrement\": \"0\",\n \"isRequired\": \"1\",\n \"defaultValue\": \"0\"\n },\n {\n \"columnName\": \"cover_image\",\n \"columnLabel\": \"封面图片\",\n \"columnComment\": \"图书封面图片URL\",\n \"columnType\": \"varchar(255)\",\n \"isPk\": \"0\",\n \"isIncrement\": \"0\",\n \"isRequired\": \"0\",\n \"htmlType\": \"imageUpload\"\n },\n {\n \"columnName\": \"description\",\n \"columnLabel\": \"简介\",\n \"columnComment\": \"图书内容简介\",\n \"columnType\": \"text\",\n \"isPk\": \"0\",\n \"isIncrement\": \"0\",\n \"isRequired\": \"0\",\n \"htmlType\": \"editor\"\n }\n ]\n },\n {\n \"tableName\": \"borrow_record\",\n \"tableComment\": \"借阅记录表\",\n \"adminMenuName\": \"借阅管理\",\n \"operations\": {\n \"add\": true,\n \"edit\": false,\n \"remove\": false,\n \"removeType\": \"physical\",\n \"reason\": \"借阅记录仅新增,不可编辑或删除\"\n },\n \"columns\": [\n {\n \"columnName\": \"id\",\n \"columnLabel\": \"ID\",\n \"columnComment\": \"主键ID\",\n \"columnType\": \"bigint(20)\",\n \"isPk\": \"1\",\n \"isIncrement\": \"1\",\n \"isRequired\": \"1\"\n },\n {\n \"columnName\": \"user_id\",\n \"columnLabel\": \"读者\",\n \"columnComment\": \"借阅读者ID关联读者表\",\n \"columnType\": \"bigint(20)\",\n \"isPk\": \"0\",\n \"isIncrement\": \"0\",\n \"isRequired\": \"1\",\n \"htmlType\": \"select\",\n \"dictType\": \"remote:reader:reader_id:username\"\n },\n {\n \"columnName\": \"book_id\",\n \"columnLabel\": \"图书\",\n \"columnComment\": \"借阅图书ID关联图书信息表\",\n \"columnType\": \"bigint(20)\",\n \"isPk\": \"0\",\n \"isIncrement\": \"0\",\n \"isRequired\": \"1\",\n \"htmlType\": \"select\",\n \"dictType\": \"remote:book_info:id:title\"\n },\n {\n \"columnName\": \"admin_id\",\n \"columnLabel\": \"管理员\",\n \"columnComment\": \"处理借阅的管理员ID关联管理员表\",\n \"columnType\": \"bigint(20)\",\n \"isPk\": \"0\",\n \"isIncrement\": \"0\",\n \"isRequired\": \"0\",\n \"htmlType\": \"select\",\n \"dictType\": \"remote:admin:admin_id:username\"\n },\n {\n \"columnName\": \"start_time\",\n \"columnLabel\": \"借出时间\",\n \"columnComment\": \"借阅开始时间\",\n \"columnType\": \"datetime\",\n \"isPk\": \"0\",\n \"isIncrement\": \"0\",\n \"isRequired\": \"1\"\n },\n {\n \"columnName\": \"due_time\",\n \"columnLabel\": \"应还时间\",\n \"columnComment\": \"应归还日期借出后30天\",\n \"columnType\": \"datetime\",\n \"isPk\": \"0\",\n \"isIncrement\": \"0\",\n \"isRequired\": \"1\"\n },\n {\n \"columnName\": \"return_time\",\n \"columnLabel\": \"实际归还时间\",\n \"columnComment\": \"实际归还日期,还书时填写\",\n \"columnType\": \"datetime\",\n \"isPk\": \"0\",\n \"isIncrement\": \"0\",\n \"isRequired\": \"0\"\n },\n {\n \"columnName\": \"status\",\n \"columnLabel\": \"状态\",\n \"columnComment\": \"借阅记录状态:待审核/借阅中/已归还/已驳回/罚款未付/罚款已付\",\n \"columnType\": \"varchar(20)\",\n \"isPk\": \"0\",\n \"isIncrement\": \"0\",\n \"isRequired\": \"1\",\n \"htmlType\": \"select\",\n \"dictType\": \"borrow_status\",\n \"dictOptions\": [\n {\"value\": \"borrow_pending\", \"label\": \"待审核\"},\n {\"value\": \"borrow_borrowing\", \"label\": \"借阅中\"},\n {\"value\": \"borrow_returned\", \"label\": \"已归还\"},\n {\"value\": \"borrow_rejected\", \"label\": \"已驳回\"},\n {\"value\": \"fine_unpaid\", \"label\": \"罚款未付\"},\n {\"value\": \"fine_paid\", \"label\": \"罚款已付\"}\n ]\n },\n {\n \"columnName\": \"create_time\",\n \"columnLabel\": \"创建时间\",\n \"columnComment\": \"记录创建时间\",\n \"columnType\": \"datetime\",\n \"isPk\": \"0\",\n \"isIncrement\": \"0\",\n \"isRequired\": \"1\"\n },\n {\n \"columnName\": \"remark\",\n \"columnLabel\": \"备注\",\n \"columnComment\": \"借阅备注信息\",\n \"columnType\": \"varchar(255)\",\n \"isPk\": \"0\",\n \"isIncrement\": \"0\",\n \"isRequired\": \"0\"\n }\n ]\n },\n {\n \"tableName\": \"reservation_record\",\n \"tableComment\": \"预约记录表\",\n \"adminMenuName\": \"预约管理\",\n \"operations\": {\n \"add\": true,\n \"edit\": false,\n \"remove\": false,\n \"removeType\": \"physical\",\n \"reason\": \"预约记录仅新增,不可编辑或删除\"\n },\n \"columns\": [\n {\n \"columnName\": \"id\",\n \"columnLabel\": \"ID\",\n \"columnComment\": \"主键ID\",\n \"columnType\": \"bigint(20)\",\n \"isPk\": \"1\",\n \"isIncrement\": \"1\",\n \"isRequired\": \"1\"\n },\n {\n \"columnName\": \"user_id\",\n \"columnLabel\": \"读者\",\n \"columnComment\": \"预约读者ID关联读者表\",\n \"columnType\": \"bigint(20)\",\n \"isPk\": \"0\",\n \"isIncrement\": \"0\",\n \"isRequired\": \"1\",\n \"htmlType\": \"select\",\n \"dictType\": \"remote:reader:reader_id:username\"\n },\n {\n \"columnName\": \"book_id\",\n \"columnLabel\": \"图书\",\n \"columnComment\": \"预约图书ID关联图书信息表\",\n \"columnType\": \"bigint(20)\",\n \"isPk\": \"0\",\n \"isIncrement\": \"0\",\n \"isRequired\": \"1\",\n \"htmlType\": \"select\",\n \"dictType\": \"remote:book_info:id:title\"\n },\n {\n \"columnName\": \"status\",\n \"columnLabel\": \"状态\",\n \"columnComment\": \"预约记录状态:待确认/已预留/已取消/已超时/已借出\",\n \"columnType\": \"varchar(20)\",\n \"isPk\": \"0\",\n \"isIncrement\": \"0\",\n \"isRequired\": \"1\",\n \"htmlType\": \"select\",\n \"dictType\": \"reservation_status\",\n \"dictOptions\": [\n {\"value\": \"reservation_pending\", \"label\": \"待确认\"},\n {\"value\": \"reservation_reserved\", \"label\": \"已预留\"},\n {\"value\": \"reservation_cancelled\", \"label\": \"已取消\"},\n {\"value\": \"reservation_expired\", \"label\": \"已超时\"},\n {\"value\": \"reservation_borrowed\", \"label\": \"已借出\"}\n ]\n },\n {\n \"columnName\": \"create_time\",\n \"columnLabel\": \"预约时间\",\n \"columnComment\": \"预约创建时间\",\n \"columnType\": \"datetime\",\n \"isPk\": \"0\",\n \"isIncrement\": \"0\",\n \"isRequired\": \"1\"\n },\n {\n \"columnName\": \"expire_time\",\n \"columnLabel\": \"保留截止时间\",\n \"columnComment\": \"预约图书到馆后保留截止时间到馆后2天\",\n \"columnType\": \"datetime\",\n \"isPk\": \"0\",\n \"isIncrement\": \"0\",\n \"isRequired\": \"0\"\n },\n {\n \"columnName\": \"admin_id\",\n \"columnLabel\": \"处理管理员\",\n \"columnComment\": \"处理预约的管理员ID关联管理员表\",\n \"columnType\": \"bigint(20)\",\n \"isPk\": \"0\",\n \"isIncrement\": \"0\",\n \"isRequired\": \"0\",\n \"htmlType\": \"select\",\n \"dictType\": \"remote:admin:admin_id:username\"\n },\n {\n \"columnName\": \"remark\",\n \"columnLabel\": \"备注\",\n \"columnComment\": \"预约备注信息\",\n \"columnType\": \"varchar(255)\",\n \"isPk\": \"0\",\n \"isIncrement\": \"0\",\n \"isRequired\": \"0\"\n }\n ]\n },\n {\n \"tableName\": \"fine_record\",\n \"tableComment\": \"罚款记录表\",\n \"adminMenuName\": \"罚款管理\",\n \"operations\": {\n \"add\": true,\n \"edit\": false,\n \"remove\": false,\n \"removeType\": \"physical\",\n \"reason\": \"罚款记录仅新增,不可编辑或删除\"\n },\n \"columns\": [\n {\n \"columnName\": \"id\",\n \"columnLabel\": \"ID\",\n \"columnComment\": \"主键ID\",\n \"columnType\": \"bigint(20)\",\n \"isPk\": \"1\",\n \"isIncrement\": \"1\",\n \"isRequired\": \"1\"\n },\n {\n \"columnName\": \"borrow_record_id\",\n \"columnLabel\": \"关联借阅\",\n \"columnComment\": \"关联的借阅记录ID\",\n \"columnType\": \"bigint(20)\",\n \"isPk\": \"0\",\n \"isIncrement\": \"0\",\n \"isRequired\": \"1\",\n \"htmlType\": \"select\",\n \"dictType\": \"remote:borrow_record:id:id\"\n },\n {\n \"columnName\": \"user_id\",\n \"columnLabel\": \"读者\",\n \"columnComment\": \"罚款所属读者ID关联读者表\",\n \"columnType\": \"bigint(20)\",\n \"isPk\": \"0\",\n \"isIncrement\": \"0\",\n \"isRequired\": \"1\",\n \"htmlType\": \"select\",\n \"dictType\": \"remote:reader:reader_id:username\"\n },\n {\n \"columnName\": \"amount\",\n \"columnLabel\": \"罚款金额\",\n \"columnComment\": \"罚款金额(元)\",\n \"columnType\": \"decimal(10,2)\",\n \"isPk\": \"0\",\n \"isIncrement\": \"0\",\n \"isRequired\": \"1\"\n },\n {\n \"columnName\": \"status\",\n \"columnLabel\": \"状态\",\n \"columnComment\": \"罚款状态:未支付/已支付\",\n \"columnType\": \"varchar(20)\",\n \"isPk\": \"0\",\n \"isIncrement\": \"0\",\n \"isRequired\": \"1\",\n \"htmlType\": \"select\",\n \"dictType\": \"fine_status\",\n \"dictOptions\": [\n {\"value\": \"fine_unpaid\", \"label\": \"未支付\"},\n {\"value\": \"fine_paid\", \"label\": \"已支付\"}\n ]\n },\n {\n \"columnName\": \"create_time\",\n \"columnLabel\": \"生成时间\",\n \"columnComment\": \"罚款生成时间\",\n \"columnType\": \"datetime\",\n \"isPk\": \"0\",\n \"isIncrement\": \"0\",\n \"isRequired\": \"1\"\n },\n {\n \"columnName\": \"pay_time\",\n \"columnLabel\": \"支付时间\",\n \"columnComment\": \"罚款支付时间\",\n \"columnType\": \"datetime\",\n \"isPk\": \"0\",\n \"isIncrement\": \"0\",\n \"isRequired\": \"0\"\n }\n ]\n },\n {\n \"tableName\": \"reader\",\n \"tableComment\": \"读者账号表\",\n \"adminMenuName\": \"读者管理\",\n \"operations\": {\n \"add\": true,\n \"edit\": true,\n \"remove\": true,\n \"removeType\": \"physical\",\n \"reason\": \"\"\n },\n \"columns\": [\n {\n \"columnName\": \"reader_id\",\n \"columnLabel\": \"读者ID\",\n \"columnComment\": \"读者主键ID\",\n \"columnType\": \"bigint(20)\",\n \"isPk\": \"1\",\n \"isIncrement\": \"1\",\n \"isRequired\": \"1\"\n },\n {\n \"columnName\": \"username\",\n \"columnLabel\": \"用户名\",\n \"columnComment\": \"读者登录用户名\",\n \"columnType\": \"varchar(50)\",\n \"isPk\": \"0\",\n \"isIncrement\": \"0\",\n \"isRequired\": \"1\"\n },\n {\n \"columnName\": \"password_hash\",\n \"columnLabel\": \"密码哈希\",\n \"columnComment\": \"读者登录密码哈希值\",\n \"columnType\": \"varchar(255)\",\n \"isPk\": \"0\",\n \"isIncrement\": \"0\",\n \"isRequired\": \"1\"\n },\n {\n \"columnName\": \"nickname\",\n \"columnLabel\": \"昵称\",\n \"columnComment\": \"读者昵称\",\n \"columnType\": \"varchar(50)\",\n \"isPk\": \"0\",\n \"isIncrement\": \"0\",\n \"isRequired\": \"1\"\n },\n {\n \"columnName\": \"status\",\n \"columnLabel\": \"状态\",\n \"columnComment\": \"读者账号状态active/inactive\",\n \"columnType\": \"varchar(20)\",\n \"isPk\": \"0\",\n \"isIncrement\": \"0\",\n \"isRequired\": \"1\",\n \"defaultValue\": \"active\",\n \"htmlType\": \"select\",\n \"dictType\": \"account_status\",\n \"dictOptions\": [\n {\"value\": \"active\", \"label\": \"正常\"},\n {\"value\": \"inactive\", \"label\": \"停用\"}\n ]\n },\n {\n \"columnName\": \"create_time\",\n \"columnLabel\": \"创建时间\",\n \"columnComment\": \"账号创建时间\",\n \"columnType\": \"datetime\",\n \"isPk\": \"0\",\n \"isIncrement\": \"0\",\n \"isRequired\": \"1\"\n },\n {\n \"columnName\": \"email\",\n \"columnLabel\": \"电子邮箱\",\n \"columnComment\": \"读者电子邮箱\",\n \"columnType\": \"varchar(100)\",\n \"isPk\": \"0\",\n \"isIncrement\": \"0\",\n \"isRequired\": \"0\"\n },\n {\n \"columnName\": \"phone\",\n \"columnLabel\": \"手机号\",\n \"columnComment\": \"读者手机号码\",\n \"columnType\": \"varchar(20)\",\n \"isPk\": \"0\",\n \"isIncrement\": \"0\",\n \"isRequired\": \"0\"\n }\n ]\n },\n {\n \"tableName\": \"admin\",\n \"tableComment\": \"管理员账号表\",\n \"adminMenuName\": \"管理员管理\",\n \"operations\": {\n \"add\": true,\n \"edit\": true,\n \"remove\": true,\n \"removeType\": \"physical\",\n \"reason\": \"\"\n },\n \"columns\": [\n {\n \"columnName\": \"admin_id\",\n \"columnLabel\": \"管理员ID\",\n \"columnComment\": \"管理员主键ID\",\n \"columnType\": \"bigint(20)\",\n \"isPk\": \"1\",\n \"isIncrement\": \"1\",\n \"isRequired\": \"1\"\n },\n {\n \"columnName\": \"username\",\n \"columnLabel\": \"用户名\",\n \"columnComment\": \"管理员登录用户名\",\n \"columnType\": \"varchar(50)\",\n \"isPk\": \"0\",\n \"isIncrement\": \"0\",\n \"isRequired\": \"1\"\n },\n {\n \"columnName\": \"password_hash\",\n \"columnLabel\": \"密码哈希\",\n \"columnComment\": \"管理员登录密码哈希值\",\n \"columnType\": \"varchar(255)\",\n \"isPk\": \"0\",\n \"isIncrement\": \"0\",\n \"isRequired\": \"1\"\n },\n {\n \"columnName\": \"nickname\",\n \"columnLabel\": \"昵称\",\n \"columnComment\": \"管理员昵称\",\n \"columnType\": \"varchar(50)\",\n \"isPk\": \"0\",\n \"isIncrement\": \"0\",\n \"isRequired\": \"1\"\n },\n {\n \"columnName\": \"status\",\n \"columnLabel\": \"状态\",\n \"columnComment\": \"管理员账号状态active/inactive\",\n \"columnType\": \"varchar(20)\",\n \"isPk\": \"0\",\n \"isIncrement\": \"0\",\n \"isRequired\": \"1\",\n \"defaultValue\": \"active\",\n \"htmlType\": \"select\",\n \"dictType\": \"account_status\",\n \"dictOptions\": [\n {\"value\": \"active\", \"label\": \"正常\"},\n {\"value\": \"inactive\", \"label\": \"停用\"}\n ]\n },\n {\n \"columnName\": \"create_time\",\n \"columnLabel\": \"创建时间\",\n \"columnComment\": \"账号创建时间\",\n \"columnType\": \"datetime\",\n \"isPk\": \"0\",\n \"isIncrement\": \"0\",\n \"isRequired\": \"1\"\n }\n ]\n }\n ]\n}', '0', 88956, 5443, 1024, 4419, 11039, 6382, 5443, 11039, 16482, 3, 0.02651748, '1', NULL, '2026-07-14 15:56:55');
INSERT INTO `front_ai_usage_ledger` VALUES (114, 102, 102, 102, 100, 'database', 'deepseek', 'deepseek-v4-flash', 'front.database', 'V1', '14dcad479b01de068e5c5bc39b5cd7a591a09d334ee6812483d8ac00dd8c9d61', '你是 MySQL 业务数据库设计专家。只输出符合用户消息结构的 JSON根据已确认的应用蓝图和业务闭环生成可直接落地的表、字段、主外键、字典和表操作策略。字段必须业务化且类型合法所有蓝图与闭环引用必须有真实表字段承载不得生成菜单、权限关系、代码或业务动作。', '根据项目输入 JSON 生成 MySQL 数据库设计 JSON只返回 JSON不要 Markdown 围栏或解释。\nConfirmed app blueprint JSON and Confirmed business loop plan JSON are supplied in the input.\nDatabase generation constraints from the business loop plan must be enforced.\nEvery confirmedBusinessLoopPlan.metrics tableName, field, and filters.field must exist in the generated schema. Numeric sum/avg/min/max metric fields must use a compatible numeric column type. Status-filter metric values must remain compatible with the matching stateMachines.states.\nIf input.mode is correction, repair input.originalResponse according to input.validationError and return the complete corrected database JSON. Do not drop unrelated valid tables or fields.\n输出结构{\"tables\":[{\"tableName\":\"car_info\",\"tableComment\":\"车辆信息表\",\"adminMenuName\":\"车辆管理\",\"operations\":{\"add\":true,\"edit\":true,\"remove\":true,\"removeType\":\"physical\",\"reason\":\"\"},\"columns\":[{\"columnName\":\"id\",\"columnLabel\":\"ID\",\"columnComment\":\"主键ID\",\"columnType\":\"bigint(20)\",\"isPk\":\"1\",\"isIncrement\":\"1\",\"isRequired\":\"1\"}]}]}。\n不要使用 field_1 等占位字段;每个表必须包含非空 columns以及 adminMenuName 和 operations.add/edit/remove/removeType/reason。\nadminMenuName 必须来自本表 tableComment/tableName不得复用其他表或宽泛模块名称。\nadminMenuName must come from that table\'s own tableComment or tableName.\n字段数组名称只能是 columns不能使用 fields、fieldDesign、fieldList、columnList。\nEvery table must include a non-empty columns array; use columns exactly.\n每个字段必须包含 columnName、columnLabel、columnComment、columnType、isPk、isIncrement、isRequired。columnLabel 是短 UI 标签columnComment 是完整数据库说明。\n可提供 javaType、htmlTypehtmlType 只能是 input、textarea、select、radio、checkbox、datetime、imageUpload、fileUpload、editor。\nselect/radio/checkbox 应提供 dictType 和 dictOptions。关联选择使用 remote:target_table:value_field:label_field且目标表和值/标签字段必须都存在于本次 tables JSON。\n非主键外键字段应在目标表存在时使用 remote select无目标表的分类、类型、状态使用本地 dictOptions 或普通输入。\n普通主数据表除唯一主键外至少包含 4 个业务字段。\n订单、支付、借还、审批、流程、任务、库存记录等动作记录表使用仅新增关系、审计、日志、历史表使用只读普通主数据表使用完整 CRUD。\n不要生成 businessActions、业务动作、工作流、代码、菜单表、user_role、角色权限表或权限表。\nDo not generate menu tables, user_role tables, role-permission tables, or permission tables.\n表名字段名只使用小写字母、数字、下划线每表必须且只能有一个主键。字段类型只能使用 bigint(20)、int(11)、varchar(n)、char(n)、decimal(p,s)、datetime、date、text、longtext。\n为 confirmedAppBlueprint.roles 中每个角色创建独立账号表admin 使用 admin其他角色使用 role.code。不得使用共享用户表或 role_id/role_code/user_role。\n角色账号表包含 `<role_code>_id` 自增主键、username、password_hash、nickname、status、create_time。admin 只能登录后台,非 admin 角色登录前台。\n生成 frontendPages.tableName 引用的全部表;个人资料页必须绑定对应非 admin 角色账号表。requiresLogin=true 且 dataScope=CURRENT_USER 的业务数据通常包含 user_id。\ncanonicalTableRegistry 中的名称是最终规范表名。confirmedBusinessLoopPlan 若出现与其指向同一业务对象的同义表名,必须使用 canonicalTableRegistry 中的名称,不得同时生成两张同义表。\n根据 confirmedBusinessLoopPlan 创建 coreObjects.tableName、actions.ownerTable补齐 stateMachines.statusField、quantityRules.quantityField 以及 recordRules 和动作前置条件需要的字段。状态值不得超出 stateMachines.states。\n严格实现 confirmedBusinessLoopPlan.businessPoliciesTIME_LIMIT 的 startField、dueField 使用 datetimeOVERDUE_FEE 的 dueField 使用 datetime、daysTargetField 使用 int(11)、targetField 使用 decimal(10,2)QUANTITY_LIMIT 的 targetField 使用 int(11) 且默认值为 0。所有政策字段必须位于政策指定的 tableName禁止只把期限或公式写进 columnComment 而不创建字段。\nDo not invent status values outside stateMachines.states.\n严格遵守 input.limits.maxTables 和 maxColumnsPerTable。\n项目输入 JSON\n{\"industryTemplate\":\"\",\"canonicalTableRegistry\":[\"book_info\",\"borrow_record\",\"reservation_record\",\"fine_record\",\"reader\",\"admin\"],\"validationError\":\"Business loop plan does not match current database: Missing business metric field: reader.id\",\"compiledFlowContract\":{\"acceptanceScenarios\":[],\"actions\":[{\"actor\":\"admin\",\"code\":\"approve_borrow\",\"name\":\"审核通过\",\"ownerObject\":\"borrow_record\",\"ownerTable\":\"borrow_record\",\"preconditions\":[],\"quantityEffects\":[{\"actionCode\":\"approve_borrow\",\"amount\":\"1\",\"effectType\":\"decrease\",\"objectCode\":\"book_info\",\"quantityField\":\"stock\",\"tableName\":\"book_info\"}],\"recordEffects\":[],\"required\":true,\"stateTransitions\":[{\"actionCode\":\"approve_borrow\",\"fromState\":\"borrow_pending\",\"toState\":\"borrow_borrowing\"}]},{\"actor\":\"admin\",\"code\":\"reject_borrow\",\"name\":\"驳回\",\"ownerObject\":\"borrow_record\",\"ownerTable\":\"borrow_record\",\"preconditions\":[],\"quantityEffects\":[],\"recordEffects\":[],\"required\":true,\"stateTransitions\":[{\"actionCode\":\"reject_borrow\",\"fromState\":\"borrow_pending\",\"toState\":\"borrow_rejected\"}]},{\"actor\":\"admin\",\"code\":\"return_book\",\"name\":\"还书\",\"ownerObject\":\"borrow_record\",\"ownerTable\":\"borrow_record\",\"preconditions\":[],\"quantityEffects\":[{\"actionCode\":\"return_book\",\"amount\":\"1\",\"effectType\":\"increase\",\"objectCode\":\"book_info\",\"quantityField\":\"stock\",\"tableName\":\"book_info\"}],\"recordEffects\":[],\"required\":true,\"stateTransitions\":[{\"actionCode\":\"return_book\",\"fromState\":\"borrow_borrowing\",\"toState\":\"borrow_returned\"}]},{\"actor\":\"admin\",\"code\":\"confirm_reservation\",\"name\":\"确认到馆\",\"ownerObject\":\"borrow_record\",\"ownerTable\":\"borrow_record\",\"preconditions\":[],\"quantityEffects\":[],\"recordEffects\":[],\"required\":true,\"stateTransitions\":[{\"actionCode\":\"confirm_reservation\",\"fromState\":\"reservation_pending\",\"toState\":\"reservation_reserved\"}]},{\"actor\":\"admin\",\"code\":\"cancel_reservation\",\"name\":\"取消预约\",\"ownerObject\":\"borrow_record\",\"ownerTable\":\"borrow_record\",\"preconditions\":[],\"quantityEffects\":[],\"recordEffects\":[],\"required\":true,\"stateTransitions\":[{\"actionCode\":\"cancel_reservation\",\"fromState\":\"reservation_pending\",\"toState\":\"reservation_cancelled\"}]},{\"actor\":\"admin\",\"code\":\"borrow_from_reservation\",\"name\":\"借出预约图书\",\"ownerObject\":\"borrow_record\",\"ownerTable\":\"borrow_record\",\"preconditions\":[],\"quantityEffects\":[{\"actionCode\":\"borrow_from_reservation\",\"amount\":\"1\",\"effectType\":\"decrease\",\"objectCode\":\"book_info\",\"quantityField\":\"stock\",\"tableName\":\"book_info\"}],\"recordEffects\":[],\"required\":true,\"stateTransitions\":[{\"actionCode\":\"borrow_from_reservation\",\"fromState\":\"reservation_reserved\",\"toState\":\"reservation_borrowed\"}]},{\"actor\":\"reader\",\"code\":\"pay_fine\",\"name\":\"缴纳罚款\",\"ownerObject\":\"borrow_record\",\"ownerTable\":\"borrow_record\",\"preconditions\":[],\"quantityEffects\":[],\"recordEffects\":[],\"required\":true,\"stateTransitions\":[{\"actionCode\":\"pay_fine\",\"fromState\":\"fine_unpaid\",\"toState\":\"fine_paid\"}]}],\"businessPolicies\":[],\"coreObjects\":[{\"code\":\"borrow_record\",\"name\":\"图书管理系统\",\"objectType\":\"main\",\"tableName\":\"borrow_record\"},{\"code\":\"book_info\",\"name\":\"book_info\",\"objectType\":\"related\",\"tableName\":\"book_info\"}],\"domainName\":\"图书管理系统\",\"metrics\":[{\"aggregate\":\"count\",\"code\":\"total_books\",\"field\":\"id\",\"filters\":[],\"name\":\"图书总数\",\"relatedActionCodes\":[],\"required\":true,\"tableName\":\"book_info\",\"unit\":\"本\"},{\"aggregate\":\"count\",\"code\":\"total_borrowed\",\"field\":\"id\",\"filters\":[{\"field\":\"status\",\"operator\":\"eq\",\"values\":[\"borrow_borrowing\"]}],\"name\":\"借阅数量\",\"relatedActionCodes\":[],\"required\":true,\"tableName\":\"borrow_record\",\"unit\":\"条\"},{\"aggregate\":\"count\",\"code\":\"total_readers\",\"field\":\"id\",\"filters\":[],\"name\":\"读者总数\",\"relatedActionCodes\":[],\"required\":true,\"tableName\":\"reader\",\"unit\":\"人\"},{\"aggregate\":\"sum\",\"code\":\"unpaid_fines\",\"field\":\"amount\",\"filters\":[{\"field\":\"status\",\"operator\":\"eq\",\"values\":[\"fine_unpaid\"]}],\"name\":\"未缴罚款总额\",\"relatedActionCodes\":[],\"required\":true,\"tableName\":\"fine_record\",\"unit\":\"元\"}],\"pageBindings\":[{\"actionCode\":\"approve_borrow\",\"pageCode\":\"borrow_admin_page\",\"slot\":\"list.rowActions\",\"tableName\":\"borrow_record\",\"target\":\"admin\"},{\"actionCode\":\"reject_borrow\",\"pageCode\":\"borrow_admin_page\",\"slot\":\"list.rowActions\",\"tableName\":\"borrow_record\",\"target\":\"admin\"},{\"actionCode\":\"return_book\",\"pageCode\":\"borrow_admin_page\",\"slot\":\"list.rowActions\",\"tableName\":\"borrow_record\",\"target\":\"admin\"},{\"actionCode\":\"confirm_reservation\",\"pageCode\":\"reservation_admin_page\",\"slot\":\"list.rowActions\",\"tableName\":\"borrow_record\",\"target\":\"admin\"},{\"actionCode\":\"cancel_reservation\",\"pageCode\":\"reservation_admin_page\",\"slot\":\"list.rowActions\",\"tableName\":\"borrow_record\",\"target\":\"admin\"},{\"actionCode\":\"borrow_from_reservation\",\"pageCode\":\"reservation_admin_page\",\"slot\":\"list.rowActions\",\"tableName\":\"borrow_record\",\"target\":\"admin\"},{\"actionCode\":\"pay_fine\",\"pageCode\":\"my_fines_page\",\"slot\":\"list.rowActions\",\"tableName\":\"borrow_record\",\"target\":\"current_user\"}],\"quantityRules\":[{\"actionCode\":\"approve_borrow\",\"amount\":\"1\",\"effectType\":\"decrease\",\"objectCode\":\"book_info\",\"quantityField\":\"stock\",\"tableName\":\"book_info\"},{\"actionCode\":\"return_book\",\"amount\":\"1\",\"effectType\":\"increase\",\"objectCode\":\"book_info\",\"quantityField\":\"stock\",\"tableName\":\"book_info\"},{\"actionCode\":\"borrow_from_reservation\",\"amount\":\"1\",\"effectType\":\"decrease\",\"objectCode\":\"book_info\",\"quantityField\":\"stock\",\"tableName\":\"book_info\"}],\"recordRules\":[],\"stateMachines\":[{\"objectCode\":\"borrow_record\",\"states\":[\"borrow_pending\",\"borrow_borrowing\",\"borrow_returned\",\"borrow_rejected\",\"reservation_pending\",\"reservation_reserved\",\"reservation_cancelled\",\"reservation_expired\",\"reservation_borrowed\",\"fine_unpaid\",\"fine_paid\"],\"statusField\":\"status\",\"tableName\":\"borrow_record\",\"transitions\":[{\"actionCode\":\"approve_borrow\",\"fromState\":\"borrow_pending\",\"toState\":\"borrow_borrowing\"},{\"actionCode\":\"reject_borrow\",\"fromState\":\"borrow_pending\",\"toState\":\"borrow_rejected\"},{\"actionCode\":\"return_book\",\"fromState\":\"borrow_borrowing\",\"toState\":\"borrow_returned\"},{\"actionCode\":\"confirm_reservation\",\"fromState\":\"reservation_pending\",\"toState\":\"reservation_reserved\"},{\"actionCode\":\"cancel_reservation\",\"fromState\":\"reservation_pending\",\"toState\":\"reservation_cancelled\"},{\"actionCode\":\"borrow_from_reservation\",\"fromState\":\"reservation_reserved\",\"toState\":\"reservation_borrowed\"},{\"actionCode\":\"pay_fine\",\"fromState\":\"fine_unpaid\",\"toState\":\"fine_paid\"}]}]},\"mode\":\"correction\",\"confirmedAppBlueprint\":{\"adminHomeDashboard\":{\"charts\":[{\"code\":\"borrow_trend\",\"filters\":[],\"metrics\":[],\"semantic\":\"order\",\"tableName\":\"borrow_record\",\"type\":\"line\"},{\"code\":\"book_category_distribution\",\"filters\":[],\"metrics\":[],\"semantic\":\"content\",\"tableName\":\"book_info\",\"type\":\"pie\"}],\"description\":\"核心业务数据\",\"metrics\":[{\"aggregate\":\"count\",\"code\":\"total_books\",\"filters\":[],\"semantic\":\"content\",\"tableName\":\"book_info\"},{\"aggregate\":\"count\",\"code\":\"total_borrowed\",\"filters\":[],\"semantic\":\"order\",\"tableName\":\"borrow_record\"},{\"aggregate\":\"count\",\"code\":\"total_readers\",\"filters\":[],\"semantic\":\"user\",\"tableName\":\"reader\"},{\"aggregate\":\"sum\",\"code\":\"unpaid_fines\",\"field\":\"amount\",\"filters\":[],\"semantic\":\"money\",\"tableName\":\"fine_record\"}],\"title\":\"运营总览\"},\"adminMenus\":[{\"code\":\"book_admin\",\"dataScope\":\"ROLE\",\"name\":\"图书管理\",\"pageCode\":\"book_admin_page\",\"pageType\":\"list\",\"path\":\"/admin/books\",\"requiresLogin\":true,\"tableName\":\"book_info\",\"visibleRoles\":[\"admin\"]},{\"code\":\"borrow_admin\",\"dataScope\":\"ROLE\",\"name\":\"借阅管理\",\"pageCode\":\"borrow_admin_page\",\"pageType\":\"list\",\"path\":\"/admin/borrows\",\"requiresLogin\":true,\"tableName\":\"borrow_record\",\"visibleRoles\":[\"admin\"]},{\"code\":\"reservation_admin\",\"dataScope\":\"ROLE\",\"name\":\"预约管理\",\"pageCode\":\"reservation_admin_page\",\"pageType\":\"list\",\"path\":\"/admin/reservations\",\"requiresLogin\":true,\"tableName\":\"reservation_record\",\"visibleRoles\":[\"admin\"]},{\"code\":\"fine_admin\",\"dataScope\":\"ROLE\",\"name\":\"罚款管理\",\"pageCode\":\"fine_admin_page\",\"pageType\":\"list\",\"path\":\"/admin/fines\",\"requiresLogin\":true,\"tableName\":\"fine_record\",\"visibleRoles\":[\"admin\"]},{\"code\":\"reader_admin\",\"dataScope\":\"ROLE\",\"name\":\"读者管理\",\"pageCode\":\"reader_admin_page\",\"pageType\":\"list\",\"path\":\"/admin/readers\",\"requiresLogin\":true,\"tableName\":\"reader\",\"visibleRoles\":[\"admin\"]},{\"code\":\"admin_admin\",\"dataScope\":\"ROLE\",\"name\":\"管理员管理\",\"pageCode\":\"admin_admin_page\",\"pageType\":\"list\",\"path\":\"/admin/admins\",\"requiresLogin\":true,\"tableName\":\"admin\",\"visibleRoles\":[\"admin\"]},{\"code\":\"admin_profile\",\"dataScope\":\"CURRENT_USER\",\"name\":\"个人资料\",\"pageCode\":\"admin_profile_page\",\"pageType\":\"form\",\"path\":\"/admin/profile\",\"requiresLogin\":true,\"tableName\":\"admin\",\"visibleRoles\":[\"admin\"]}],\"frontendMenus\":[{\"code\":\"book_catalog\",\"dataScope\":\"PUBLIC\",\"name\":\"图书目录\",\"pageCode\":\"book_catalog_page\",\"pageType\":\"\",\"path\":\"/books\",\"requiresLogin\":false,\"tableName\":\"\",\"visibleRoles\":[]},{\"code\":\"my_borrows\",\"dataScope\":\"CURRENT_USER\",\"name\":\"我的借阅\",\"pageCode\":\"my_borrows_page\",\"pageType\":\"\",\"path\":\"/borrows\",\"requiresLogin\":true,\"tableName\":\"\",\"visibleRoles\":[\"reader\"]},{\"code\":\"my_reservations\",\"dataScope\":\"CURRENT_USER\",\"name\":\"我的预约\",\"pageCode\":\"my_reservations_page\",\"pageType\":\"\",\"path\":\"/reservations\",\"requiresLogin\":true,\"tableName\":\"\",\"visibleRoles\":[\"reader\"]},{\"code\":\"my_fines\",\"dataScope\":\"CURRENT_USER\",\"name\":\"我的罚款\",\"pageCode\":\"my_fines_page\",\"pageType\":\"\",\"path\":\"/fines\",\"requiresLogin\":true,\"tableName\":\"\",\"visibleRoles\":[\"reader\"]},{\"code\":\"reader_profile\",\"dataScope\":\"CURRENT_USER\",\"name\":\"个人资料\",\"pageCode\":\"reader_profile_page\",\"pageType\":\"\",\"path\":\"/profile\",\"requiresLogin\":true,\"tableName\":\"\",\"visibleRoles\":[\"reader\"]}],\"frontendPages\":[{\"code\":\"book_catalog_page\",\"menuCode\":\"book_catalog\",\"name\":\"图书目录\",\"pageType\":\"list\",\"parentPageCode\":\"\",\"path\":\"/books\",\"tableName\":\"book_info\"},{\"code\":\"book_detail_page\",\"menuCode\":\"book_catalog\",\"name\":\"图书详情\",\"pageType\":\"detail\",\"parentPageCode\":\"\",\"path\":\"/books/:id\",\"tableName\":\"book_info\"},{\"code\":\"my_borrows_page\",\"menuCode\":\"my_borrows\",\"name\":\"我的借阅\",\"pageType\":\"current_user_list\",\"parentPageCode\":\"\",\"path\":\"/borrows\",\"tableName\":\"borrow_record\"},{\"code\":\"my_reservations_page\",\"menuCode\":\"my_reservations\",\"name\":\"我的预约\",\"pageType\":\"current_user_list\",\"parentPageCode\":\"\",\"path\":\"/reservations\",\"tableName\":\"reservation_record\"},{\"code\":\"my_fines_page\",\"menuCode\":\"my_fines\",\"name\":\"我的罚款\",\"pageType\":\"current_user_list\",\"parentPageCode\":\"\",\"path\":\"/fines\",\"tableName\":\"fine_record\"},{\"code\":\"reader_profile_page\",\"menuCode\":\"reader_profile\",\"name\":\"个人资料\",\"pageType\":\"form\",\"parentPageCode\":\"\",\"path\":\"/profile\",\"tableName\":\"reader\"}],\"roles\":[{\"code\":\"reader\",\"description\":\"可以查询图书、借阅、预约、查看个人记录并缴纳罚款\",\"name\":\"读者\"},{\"code\":\"admin\",\"description\":\"系统管理员,管理图书、借阅、预约、读者及罚款\",\"name\":\"管理员\"}]},\"extraRequirements\":\"\",\"projectDescription\":\"项目定位:面向高校图书馆的图书管理系统,用于读者借阅预约、管理员日常管理和系统管理员后台维护。 \\n角色读者、管理员。 \\n核心流程读者查询图书并发起借阅/预约请求管理员审核并完成借出状态变为已借出读者还书时管理员处理并更新图书状态为可借预约图书到馆后保留2天超时自动释放借阅超期生成罚款读者可通过管理台缴纳。 \\n关键规则每位读者最多同时借阅5本每本借阅期限30天超期每天罚款0.5元预约图书保留2天图书总数固定可借数量随借出减少还书后恢复。 \\n异常边界可借数量为0时无法借阅/预约;已借出状态不得重复借出;预约取消后释放名额;超期未还时借阅入口禁用;若读者已有同本书未还,不可再次借阅。\",\"stylePreset\":\"dark-tech\",\"originalResponse\":{\"tables\":[{\"tableName\":\"book_info\",\"tableComment\":\"图书信息表\",\"adminMenuName\":\"图书管理\",\"operations\":{\"add\":true,\"edit\":true,\"remove\":true,\"removeType\":\"physical\",\"reason\":\"\"},\"columns\":[{\"columnName\":\"id\",\"columnLabel\":\"ID\",\"columnComment\":\"主键ID\",\"columnType\":\"bigint(20)\",\"isPk\":\"1\",\"isIncrement\":\"1\",\"isRequired\":\"1\"},{\"columnName\":\"title\",\"columnLabel\":\"书名\",\"columnComment\":\"图书名称\",\"columnType\":\"varchar(200)\",\"isPk\":\"0\",\"isIncrement\":\"0\",\"isRequired\":\"1\"},{\"columnName\":\"author\",\"columnLabel\":\"作者\",\"columnComment\":\"图书作者\",\"columnType\":\"varchar(100)\",\"isPk\":\"0\",\"isIncrement\":\"0\",\"isRequired\":\"1\"},{\"columnName\":\"isbn\",\"columnLabel\":\"ISBN\",\"columnComment\":\"国际标准书号\",\"columnType\":\"varchar(20)\",\"isPk\":\"0\",\"isIncrement\":\"0\",\"isRequired\":\"0\"},{\"columnName\":\"publisher\",\"columnLabel\":\"出版社\",\"columnComment\":\"出版社名称\",\"columnType\":\"varchar(100)\",\"isPk\":\"0\",\"isIncrement\":\"0\",\"isRequired\":\"0\"},{\"columnName\":\"publish_date\",\"columnLabel\":\"出版日期\",\"columnComment\":\"图书出版日期\",\"columnType\":\"date\",\"isPk\":\"0\",\"isIncrement\":\"0\",\"isRequired\":\"0\"},{\"columnName\":\"category\",\"columnLabel\":\"分类\",\"columnComment\":\"图书分类\",\"columnType\":\"varchar(50)\",\"isPk\":\"0\",\"isIncrement\":\"0\",\"isRequired\":\"0\",\"htmlType\":\"select\",\"dictType\":\"book_category\",\"dictOptions\":[{\"value\":\"literature\",\"label\":\"文学\"},{\"value\":\"science\",\"label\":\"科学\"},{\"value\":\"history\",\"label\":\"历史\"},{\"value\":\"technology\",\"label\":\"技术\"}]},{\"columnName\":\"stock\",\"columnLabel\":\"可借数量\",\"columnComment\":\"当前可借出的图书数量\",\"columnType\":\"int(11)\",\"isPk\":\"0\",\"isIncrement\":\"0\",\"isRequired\":\"1\",\"defaultValue\":\"0\"},{\"columnName\":\"cover_image\",\"columnLabel\":\"封面图片\",\"columnComment\":\"图书封面图片URL\",\"columnType\":\"varchar(255)\",\"isPk\":\"0\",\"isIncrement\":\"0\",\"isRequired\":\"0\",\"htmlType\":\"imageUpload\"},{\"columnName\":\"description\",\"columnLabel\":\"简介\",\"columnComment\":\"图书内容简介\",\"columnType\":\"text\",\"isPk\":\"0\",\"isIncrement\":\"0\",\"isRequired\":\"0\",\"htmlType\":\"editor\"}]},{\"tableName\":\"borrow_record\",\"tableComment\":\"借阅记录表\",\"adminMenuName\":\"借阅管理\",\"operations\":{\"add\":true,\"edit\":false,\"remove\":false,\"removeType\":\"physical\",\"reason\":\"借阅记录仅新增,不可编辑或删除\"},\"columns\":[{\"columnName\":\"id\",\"columnLabel\":\"ID\",\"columnComment\":\"主键ID\",\"columnType\":\"bigint(20)\",\"isPk\":\"1\",\"isIncrement\":\"1\",\"isRequired\":\"1\"},{\"columnName\":\"user_id\",\"columnLabel\":\"读者\",\"columnComment\":\"借阅读者ID关联读者表\",\"columnType\":\"bigint(20)\",\"isPk\":\"0\",\"isIncrement\":\"0\",\"isRequired\":\"1\",\"htmlType\":\"select\",\"dictType\":\"remote:reader:reader_id:username\"},{\"columnName\":\"book_id\",\"columnLabel\":\"图书\",\"columnComment\":\"借阅图书ID关联图书信息表\",\"columnType\":\"bigint(20)\",\"isPk\":\"0\",\"isIncrement\":\"0\",\"isRequired\":\"1\",\"htmlType\":\"select\",\"dictType\":\"remote:book_info:id:title\"},{\"columnName\":\"admin_id\",\"columnLabel\":\"管理员\",\"columnComment\":\"处理借阅的管理员ID关联管理员表\",\"columnType\":\"bigint(20)\",\"isPk\":\"0\",\"isIncrement\":\"0\",\"isRequired\":\"0\",\"htmlType\":\"select\",\"dictType\":\"remote:admin:admin_id:username\"},{\"columnName\":\"start_time\",\"columnLabel\":\"借出时间\",\"columnComment\":\"借阅开始时间\",\"columnType\":\"datetime\",\"isPk\":\"0\",\"isIncrement\":\"0\",\"isRequired\":\"1\"},{\"columnName\":\"due_time\",\"columnLabel\":\"应还时间\",\"columnComment\":\"应归还日期借出后30天\",\"columnType\":\"datetime\",\"isPk\":\"0\",\"isIncrement\":\"0\",\"isRequired\":\"1\"},{\"columnName\":\"return_time\",\"columnLabel\":\"实际归还时间\",\"columnComment\":\"实际归还日期,还书时填写\",\"columnType\":\"datetime\",\"isPk\":\"0\",\"isIncrement\":\"0\",\"isRequired\":\"0\"},{\"columnName\":\"status\",\"columnLabel\":\"状态\",\"columnComment\":\"借阅记录状态:待审核/借阅中/已归还/已驳回/罚款未付/罚款已付\",\"columnType\":\"varchar(20)\",\"isPk\":\"0\",\"isIncrement\":\"0\",\"isRequired\":\"1\",\"htmlType\":\"select\",\"dictType\":\"borrow_status\",\"dictOptions\":[{\"value\":\"borrow_pending\",\"label\":\"待审核\"},{\"value\":\"borrow_borrowing\",\"label\":\"借阅中\"},{\"value\":\"borrow_returned\",\"label\":\"已归还\"},{\"value\":\"borrow_rejected\",\"label\":\"已驳回\"},{\"value\":\"fine_unpaid\",\"label\":\"罚款未付\"},{\"value\":\"fine_paid\",\"label\":\"罚款已付\"}]},{\"columnName\":\"create_time\",\"columnLabel\":\"创建时间\",\"columnComment\":\"记录创建时间\",\"columnType\":\"datetime\",\"isPk\":\"0\",\"isIncrement\":\"0\",\"isRequired\":\"1\"},{\"columnName\":\"remark\",\"columnLabel\":\"备注\",\"columnComment\":\"借阅备注信息\",\"columnType\":\"varchar(255)\",\"isPk\":\"0\",\"isIncrement\":\"0\",\"isRequired\":\"0\"}]},{\"tableName\":\"reservation_record\",\"tableComment\":\"预约记录表\",\"adminMenuName\":\"预约管理\",\"operations\":{\"add\":true,\"edit\":false,\"remove\":false,\"removeType\":\"physical\",\"reason\":\"预约记录仅新增,不可编辑或删除\"},\"columns\":[{\"columnName\":\"id\",\"columnLabel\":\"ID\",\"columnComment\":\"主键ID\",\"columnType\":\"bigint(20)\",\"isPk\":\"1\",\"isIncrement\":\"1\",\"isRequired\":\"1\"},{\"columnName\":\"user_id\",\"columnLabel\":\"读者\",\"columnComment\":\"预约读者ID关联读者表\",\"columnType\":\"bigint(20)\",\"isPk\":\"0\",\"isIncrement\":\"0\",\"isRequired\":\"1\",\"htmlType\":\"select\",\"dictType\":\"remote:reader:reader_id:username\"},{\"columnName\":\"book_id\",\"columnLabel\":\"图书\",\"columnComment\":\"预约图书ID关联图书信息表\",\"columnType\":\"bigint(20)\",\"isPk\":\"0\",\"isIncrement\":\"0\",\"isRequired\":\"1\",\"htmlType\":\"select\",\"dictType\":\"remote:book_info:id:title\"},{\"columnName\":\"status\",\"columnLabel\":\"状态\",\"columnComment\":\"预约记录状态:待确认/已预留/已取消/已超时/已借出\",\"columnType\":\"varchar(20)\",\"isPk\":\"0\",\"isIncrement\":\"0\",\"isRequired\":\"1\",\"htmlType\":\"select\",\"dictType\":\"reservation_status\",\"dictOptions\":[{\"value\":\"reservation_pending\",\"label\":\"待确认\"},{\"value\":\"reservation_reserved\",\"label\":\"已预留\"},{\"value\":\"reservation_cancelled\",\"label\":\"已取消\"},{\"value\":\"reservation_expired\",\"label\":\"已超时\"},{\"value\":\"reservation_borrowed\",\"label\":\"已借出\"}]},{\"columnName\":\"create_time\",\"columnLabel\":\"预约时间\",\"columnComment\":\"预约创建时间\",\"columnType\":\"datetime\",\"isPk\":\"0\",\"isIncrement\":\"0\",\"isRequired\":\"1\"},{\"columnName\":\"expire_time\",\"columnLabel\":\"保留截止时间\",\"columnComment\":\"预约图书到馆后保留截止时间到馆后2天\",\"columnType\":\"datetime\",\"isPk\":\"0\",\"isIncrement\":\"0\",\"isRequired\":\"0\"},{\"columnName\":\"admin_id\",\"columnLabel\":\"处理管理员\",\"columnComment\":\"处理预约的管理员ID关联管理员表\",\"columnType\":\"bigint(20)\",\"isPk\":\"0\",\"isIncrement\":\"0\",\"isRequired\":\"0\",\"htmlType\":\"select\",\"dictType\":\"remote:admin:admin_id:username\"},{\"columnName\":\"remark\",\"columnLabel\":\"备注\",\"columnComment\":\"预约备注信息\",\"columnType\":\"varchar(255)\",\"isPk\":\"0\",\"isIncrement\":\"0\",\"isRequired\":\"0\"}]},{\"tableName\":\"fine_record\",\"tableComment\":\"罚款记录表\",\"adminMenuName\":\"罚款管理\",\"operations\":{\"add\":true,\"edit\":false,\"remove\":false,\"removeType\":\"physical\",\"reason\":\"罚款记录仅新增,不可编辑或删除\"},\"columns\":[{\"columnName\":\"id\",\"columnLabel\":\"ID\",\"columnComment\":\"主键ID\",\"columnType\":\"bigint(20)\",\"isPk\":\"1\",\"isIncrement\":\"1\",\"isRequired\":\"1\"},{\"columnName\":\"borrow_record_id\",\"columnLabel\":\"关联借阅\",\"columnComment\":\"关联的借阅记录ID\",\"columnType\":\"bigint(20)\",\"isPk\":\"0\",\"isIncrement\":\"0\",\"isRequired\":\"1\",\"htmlType\":\"select\",\"dictType\":\"remote:borrow_record:id:id\"},{\"columnName\":\"user_id\",\"columnLabel\":\"读者\",\"columnComment\":\"罚款所属读者ID关联读者表\",\"columnType\":\"bigint(20)\",\"isPk\":\"0\",\"isIncrement\":\"0\",\"isRequired\":\"1\",\"htmlType\":\"select\",\"dictType\":\"remote:reader:reader_id:username\"},{\"columnName\":\"amount\",\"columnLabel\":\"罚款金额\",\"columnComment\":\"罚款金额(元)\",\"columnType\":\"decimal(10,2)\",\"isPk\":\"0\",\"isIncrement\":\"0\",\"isRequired\":\"1\"},{\"columnName\":\"status\",\"columnLabel\":\"状态\",\"columnComment\":\"罚款状态:未支付/已支付\",\"columnType\":\"varchar(20)\",\"isPk\":\"0\",\"isIncrement\":\"0\",\"isRequired\":\"1\",\"htmlType\":\"select\",\"dictType\":\"fine_status\",\"dictOptions\":[{\"value\":\"fine_unpaid\",\"label\":\"未支付\"},{\"value\":\"fine_paid\",\"label\":\"已支付\"}]},{\"columnName\":\"create_time\",\"columnLabel\":\"生成时间\",\"columnComment\":\"罚款生成时间\",\"columnType\":\"datetime\",\"isPk\":\"0\",\"isIncrement\":\"0\",\"isRequired\":\"1\"},{\"columnName\":\"pay_time\",\"columnLabel\":\"支付时间\",\"columnComment\":\"罚款支付时间\",\"columnType\":\"datetime\",\"isPk\":\"0\",\"isIncrement\":\"0\",\"isRequired\":\"0\"}]},{\"tableName\":\"reader\",\"tableComment\":\"读者账号表\",\"adminMenuName\":\"读者管理\",\"operations\":{\"add\":true,\"edit\":true,\"remove\":true,\"removeType\":\"physical\",\"reason\":\"\"},\"columns\":[{\"columnName\":\"reader_id\",\"columnLabel\":\"读者ID\",\"columnComment\":\"读者主键ID\",\"columnType\":\"bigint(20)\",\"isPk\":\"1\",\"isIncrement\":\"1\",\"isRequired\":\"1\"},{\"columnName\":\"username\",\"columnLabel\":\"用户名\",\"columnComment\":\"读者登录用户名\",\"columnType\":\"varchar(50)\",\"isPk\":\"0\",\"isIncrement\":\"0\",\"isRequired\":\"1\"},{\"columnName\":\"password_hash\",\"columnLabel\":\"密码哈希\",\"columnComment\":\"读者登录密码哈希值\",\"columnType\":\"varchar(255)\",\"isPk\":\"0\",\"isIncrement\":\"0\",\"isRequired\":\"1\"},{\"columnName\":\"nickname\",\"columnLabel\":\"昵称\",\"columnComment\":\"读者昵称\",\"columnType\":\"varchar(50)\",\"isPk\":\"0\",\"isIncrement\":\"0\",\"isRequired\":\"1\"},{\"columnName\":\"status\",\"columnLabel\":\"状态\",\"columnComment\":\"读者账号状态active/inactive\",\"columnType\":\"varchar(20)\",\"isPk\":\"0\",\"isIncrement\":\"0\",\"isRequired\":\"1\",\"defaultValue\":\"active\",\"htmlType\":\"select\",\"dictType\":\"account_status\",\"dictOptions\":[{\"value\":\"active\",\"label\":\"正常\"},{\"value\":\"inactive\",\"label\":\"停用\"}]},{\"columnName\":\"create_time\",\"columnLabel\":\"创建时间\",\"columnComment\":\"账号创建时间\",\"columnType\":\"datetime\",\"isPk\":\"0\",\"isIncrement\":\"0\",\"isRequired\":\"1\"},{\"columnName\":\"email\",\"columnLabel\":\"电子邮箱\",\"columnComment\":\"读者电子邮箱\",\"columnType\":\"varchar(100)\",\"isPk\":\"0\",\"isIncrement\":\"0\",\"isRequired\":\"0\"},{\"columnName\":\"phone\",\"columnLabel\":\"手机号\",\"columnComment\":\"读者手机号码\",\"columnType\":\"varchar(20)\",\"isPk\":\"0\",\"isIncrement\":\"0\",\"isRequired\":\"0\"}]},{\"tableName\":\"admin\",\"tableComment\":\"管理员账号表\",\"adminMenuName\":\"管理员管理\",\"operations\":{\"add\":true,\"edit\":true,\"remove\":true,\"removeType\":\"physical\",\"reason\":\"\"},\"columns\":[{\"columnName\":\"admin_id\",\"columnLabel\":\"管理员ID\",\"columnComment\":\"管理员主键ID\",\"columnType\":\"bigint(20)\",\"isPk\":\"1\",\"isIncrement\":\"1\",\"isRequired\":\"1\"},{\"columnName\":\"username\",\"columnLabel\":\"用户名\",\"columnComment\":\"管理员登录用户名\",\"columnType\":\"varchar(50)\",\"isPk\":\"0\",\"isIncrement\":\"0\",\"isRequired\":\"1\"},{\"columnName\":\"password_hash\",\"columnLabel\":\"密码哈希\",\"columnComment\":\"管理员登录密码哈希值\",\"columnType\":\"varchar(255)\",\"isPk\":\"0\",\"isIncrement\":\"0\",\"isRequired\":\"1\"},{\"columnName\":\"nickname\",\"columnLabel\":\"昵称\",\"columnComment\":\"管理员昵称\",\"columnType\":\"varchar(50)\",\"isPk\":\"0\",\"isIncrement\":\"0\",\"isRequired\":\"1\"},{\"columnName\":\"status\",\"columnLabel\":\"状态\",\"columnComment\":\"管理员账号状态active/inactive\",\"columnType\":\"varchar(20)\",\"isPk\":\"0\",\"isIncrement\":\"0\",\"isRequired\":\"1\",\"defaultValue\":\"active\",\"htmlType\":\"select\",\"dictType\":\"account_status\",\"dictOptions\":[{\"value\":\"active\",\"label\":\"正常\"},{\"value\":\"inactive\",\"label\":\"停用\"}]},{\"columnName\":\"create_time\",\"columnLabel\":\"创建时间\",\"columnComment\":\"账号创建时间\",\"columnType\":\"datetime\",\"isPk\":\"0\",\"isIncrement\":\"0\",\"isRequired\":\"1\"}]}]},\"projectName\":\"图书管理系统\",\"flowConfig\":{\"actions\":[{\"actor\":\"admin\",\"audit\":{\"timeField\":\"approve_time\",\"userField\":\"approve_user_id\"},\"button\":{\"confirm\":\"确认审核通过吗?\",\"order\":10,\"pageCode\":\"borrow_admin_page\",\"scope\":\"admin\",\"slot\":\"list.rowActions\",\"type\":\"success\"},\"code\":\"approve_borrow\",\"effects\":[{\"amount\":\"1\",\"errorMessage\":\"图书库存不足\",\"field\":\"stock\",\"min\":\"0\",\"notFoundMessage\":\"图书不存在\",\"relationField\":\"book_id\",\"table\":\"book_info\",\"type\":\"decrease\",\"values\":{}}],\"from\":\"borrow_pending\",\"invalidStateMessage\":\"当前状态不能审核\",\"method\":\"POST\",\"name\":\"审核通过\",\"path\":\"/borrow-record/approve\",\"successMessage\":\"审核成功\",\"to\":\"borrow_borrowing\"},{\"actor\":\"admin\",\"button\":{\"confirm\":\"确认驳回吗?\",\"order\":20,\"pageCode\":\"borrow_admin_page\",\"scope\":\"admin\",\"slot\":\"list.rowActions\",\"type\":\"danger\"},\"code\":\"reject_borrow\",\"effects\":[],\"from\":\"borrow_pending\",\"invalidStateMessage\":\"当前状态不能驳回\",\"method\":\"POST\",\"name\":\"驳回\",\"path\":\"/borrow-record/reject\",\"successMessage\":\"已驳回\",\"to\":\"borrow_rejected\"},{\"actor\":\"admin\",\"button\":{\"confirm\":\"确认还书吗?\",\"order\":30,\"pageCode\":\"borrow_admin_page\",\"scope\":\"admin\",\"slot\":\"list.rowActions\",\"type\":\"primary\"},\"code\":\"return_book\",\"effects\":[{\"amount\":\"1\",\"errorMessage\":\"库存增加失败\",\"field\":\"stock\",\"min\":\"0\",\"notFoundMessage\":\"图书不存在\",\"relationField\":\"book_id\",\"table\":\"book_info\",\"type\":\"increase\",\"values\":{}}],\"from\":\"borrow_borrowing\",\"invalidStateMessage\":\"当前状态不能还书\",\"method\":\"POST\",\"name\":\"还书\",\"path\":\"/borrow-record/return\",\"successMessage\":\"还书成功\",\"to\":\"borrow_returned\"},{\"actor\":\"admin\",\"button\":{\"confirm\":\"确认该预约图书已到馆吗?\",\"order\":10,\"pageCode\":\"reservation_admin_page\",\"scope\":\"admin\",\"slot\":\"list.rowActions\",\"type\":\"success\"},\"code\":\"confirm_reservation\",\"effects\":[],\"from\":\"reservation_pending\",\"invalidStateMessage\":\"当前预约状态不能确认\",\"method\":\"POST\",\"name\":\"确认到馆\",\"path\":\"/reservation/confirm\",\"successMessage\":\"已确认到馆\",\"to\":\"reservation_reserved\"},{\"actor\":\"admin\",\"button\":{\"confirm\":\"确认取消该预约吗?\",\"order\":20,\"pageCode\":\"reservation_admin_page\",\"scope\":\"admin\",\"slot\":\"list.rowActions\",\"type\":\"warning\"},\"code\":\"cancel_reservation\",\"effects\":[],\"from\":\"reservation_pending\",\"invalidStateMessage\":\"当前预约状态不能取消\",\"method\":\"POST\",\"name\":\"取消预约\",\"path\":\"/reservation/cancel\",\"successMessage\":\"已取消预约\",\"to\":\"reservation_cancelled\"},{\"actor\":\"admin\",\"button\":{\"confirm\":\"确认借出该预约图书吗?\",\"order\":30,\"pageCode\":\"reservation_admin_page\",\"scope\":\"admin\",\"slot\":\"list.rowActions\",\"type\":\"primary\"},\"code\":\"borrow_from_reservation\",\"effects\":[{\"amount\":\"1\",\"min\":\"0\",\"table\":\"borrow_record\",\"type\":\"create_record\",\"values\":{\"start_time\":\"now\",\"due_time\":\"now\",\"user_id\":\"currentUserId\",\"admin_id\":\"currentUserId\",\"book_id\":\"record.book_id\",\"status\":\"borrow_borrowing\"}},{\"amount\":\"1\",\"errorMessage\":\"图书库存不足\",\"field\":\"stock\",\"min\":\"0\",\"notFoundMessage\":\"图书不存在\",\"relationField\":\"book_id\",\"table\":\"book_info\",\"type\":\"decrease\",\"values\":{}}],\"from\":\"reservation_reserved\",\"invalidStateMessage\":\"当前预约状态不能借出\",\"method\":\"POST\",\"name\":\"借出预约图书\",\"path\":\"/reservation/borrow\",\"successMessage\":\"借出成功\",\"to\":\"reservation_borrowed\"},{\"actor\":\"reader\",\"button\":{\"confirm\":\"确认缴纳该笔罚款吗?\",\"order\":10,\"pageCode\":\"my_fines_page\",\"scope\":\"current_user\",\"slot\":\"list.rowActions\",\"type\":\"primary\"},\"code\":\"pay_fine\",\"effects\":[],\"from\":\"fine_unpaid\",\"invalidStateMessage\":\"该罚款已支付或无需缴纳\",\"method\":\"POST\",\"name\":\"缴纳罚款\",\"path\":\"/fine/pay\",\"successMessage\":\"缴纳成功\",\"to\":\"fine_paid\"}],\"code\":\"library_manage\",\"mainTable\":\"borrow_record\",\"metrics\":[{\"aggregate\":\"count\",\"code\":\"total_books\",\"field\":\"id\",\"name\":\"图书总数\",\"table\":\"book_info\",\"unit\":\"本\"},{\"aggregate\":\"count\",\"code\":\"total_borrowed\",\"field\":\"id\",\"name\":\"借阅数量\",\"status\":\"borrow_borrowing\",\"table\":\"borrow_record\",\"unit\":\"条\"},{\"aggregate\":\"count\",\"code\":\"total_readers\",\"field\":\"id\",\"name\":\"读者总数\",\"table\":\"reader\",\"unit\":\"人\"},{\"aggregate\":\"sum\",\"code\":\"unpaid_fines\",\"field\":\"amount\",\"name\":\"未缴罚款总额\",\"status\":\"fine_unpaid\",\"table\":\"fine_record\",\"unit\":\"元\"}],\"name\":\"图书管理系统\",\"notFoundMessage\":\"主记录不存在\",\"states\":[{\"code\":\"borrow_pending\",\"label\":\"待审核\"},{\"code\":\"borrow_borrowing\",\"label\":\"借阅中\"},{\"code\":\"borrow_returned\",\"label\":\"已归还\"},{\"code\":\"borrow_rejected\",\"label\":\"已驳回\"},{\"code\":\"reservation_pending\",\"label\":\"待确认\"},{\"code\":\"reservation_reserved\",\"label\":\"已预留\"},{\"code\":\"reservation_cancelled\",\"label\":\"已取消\"},{\"code\":\"reservation_expired\",\"label\":\"已超时\"},{\"code\":\"reservation_borrowed\",\"label\":\"已借出\"},{\"code\":\"fine_unpaid\",\"label\":\"未支付\"},{\"code\":\"fine_paid\",\"label\":\"已支付\"}],\"statusField\":\"status\",\"version\":\"1.0\"},\"limits\":{\"maxTables\":12,\"maxColumnsPerTable\":30}}', '{\n \"tables\": [\n {\n \"tableName\": \"book_info\",\n \"tableComment\": \"图书信息表\",\n \"adminMenuName\": \"图书信息\",\n \"operations\": {\n \"add\": true,\n \"edit\": true,\n \"remove\": true,\n \"removeType\": \"physical\",\n \"reason\": \"\"\n },\n \"columns\": [\n {\n \"columnName\": \"id\",\n \"columnLabel\": \"ID\",\n \"columnComment\": \"主键ID\",\n \"columnType\": \"bigint(20)\",\n \"isPk\": \"1\",\n \"isIncrement\": \"1\",\n \"isRequired\": \"1\"\n },\n {\n \"columnName\": \"title\",\n \"columnLabel\": \"书名\",\n \"columnComment\": \"图书名称\",\n \"columnType\": \"varchar(200)\",\n \"isPk\": \"0\",\n \"isIncrement\": \"0\",\n \"isRequired\": \"1\"\n },\n {\n \"columnName\": \"author\",\n \"columnLabel\": \"作者\",\n \"columnComment\": \"图书作者\",\n \"columnType\": \"varchar(100)\",\n \"isPk\": \"0\",\n \"isIncrement\": \"0\",\n \"isRequired\": \"1\"\n },\n {\n \"columnName\": \"isbn\",\n \"columnLabel\": \"ISBN\",\n \"columnComment\": \"国际标准书号\",\n \"columnType\": \"varchar(20)\",\n \"isPk\": \"0\",\n \"isIncrement\": \"0\",\n \"isRequired\": \"0\"\n },\n {\n \"columnName\": \"publisher\",\n \"columnLabel\": \"出版社\",\n \"columnComment\": \"出版社名称\",\n \"columnType\": \"varchar(100)\",\n \"isPk\": \"0\",\n \"isIncrement\": \"0\",\n \"isRequired\": \"0\"\n },\n {\n \"columnName\": \"publish_date\",\n \"columnLabel\": \"出版日期\",\n \"columnComment\": \"图书出版日期\",\n \"columnType\": \"date\",\n \"isPk\": \"0\",\n \"isIncrement\": \"0\",\n \"isRequired\": \"0\"\n },\n {\n \"columnName\": \"category\",\n \"columnLabel\": \"分类\",\n \"columnComment\": \"图书分类\",\n \"columnType\": \"varchar(50)\",\n \"isPk\": \"0\",\n \"isIncrement\": \"0\",\n \"isRequired\": \"0\",\n \"htmlType\": \"select\",\n \"dictType\": \"book_category\",\n \"dictOptions\": [\n {\"value\": \"literature\", \"label\": \"文学\"},\n {\"value\": \"science\", \"label\": \"科学\"},\n {\"value\": \"history\", \"label\": \"历史\"},\n {\"value\": \"technology\", \"label\": \"技术\"}\n ]\n },\n {\n \"columnName\": \"stock\",\n \"columnLabel\": \"可借数量\",\n \"columnComment\": \"当前可借出的图书数量\",\n \"columnType\": \"int(11)\",\n \"isPk\": \"0\",\n \"isIncrement\": \"0\",\n \"isRequired\": \"1\",\n \"defaultValue\": \"0\"\n },\n {\n \"columnName\": \"cover_image\",\n \"columnLabel\": \"封面图片\",\n \"columnComment\": \"图书封面图片URL\",\n \"columnType\": \"varchar(255)\",\n \"isPk\": \"0\",\n \"isIncrement\": \"0\",\n \"isRequired\": \"0\",\n \"htmlType\": \"imageUpload\"\n },\n {\n \"columnName\": \"description\",\n \"columnLabel\": \"简介\",\n \"columnComment\": \"图书内容简介\",\n \"columnType\": \"text\",\n \"isPk\": \"0\",\n \"isIncrement\": \"0\",\n \"isRequired\": \"0\",\n \"htmlType\": \"editor\"\n }\n ]\n },\n {\n \"tableName\": \"borrow_record\",\n \"tableComment\": \"借阅记录表\",\n \"adminMenuName\": \"借阅记录\",\n \"operations\": {\n \"add\": true,\n \"edit\": false,\n \"remove\": false,\n \"removeType\": \"physical\",\n \"reason\": \"借阅记录仅新增,不可编辑或删除\"\n },\n \"columns\": [\n {\n \"columnName\": \"id\",\n \"columnLabel\": \"ID\",\n \"columnComment\": \"主键ID\",\n \"columnType\": \"bigint(20)\",\n \"isPk\": \"1\",\n \"isIncrement\": \"1\",\n \"isRequired\": \"1\"\n },\n {\n \"columnName\": \"user_id\",\n \"columnLabel\": \"读者\",\n \"columnComment\": \"借阅读者ID关联读者表\",\n \"columnType\": \"bigint(20)\",\n \"isPk\": \"0\",\n \"isIncrement\": \"0\",\n \"isRequired\": \"1\",\n \"htmlType\": \"select\",\n \"dictType\": \"remote:reader:id:username\"\n },\n {\n \"columnName\": \"book_id\",\n \"columnLabel\": \"图书\",\n \"columnComment\": \"借阅图书ID关联图书信息表\",\n \"columnType\": \"bigint(20)\",\n \"isPk\": \"0\",\n \"isIncrement\": \"0\",\n \"isRequired\": \"1\",\n \"htmlType\": \"select\",\n \"dictType\": \"remote:book_info:id:title\"\n },\n {\n \"columnName\": \"admin_id\",\n \"columnLabel\": \"管理员\",\n \"columnComment\": \"处理借阅的管理员ID关联管理员表\",\n \"columnType\": \"bigint(20)\",\n \"isPk\": \"0\",\n \"isIncrement\": \"0\",\n \"isRequired\": \"0\",\n \"htmlType\": \"select\",\n \"dictType\": \"remote:admin:id:username\"\n },\n {\n \"columnName\": \"start_time\",\n \"columnLabel\": \"借出时间\",\n \"columnComment\": \"借阅开始时间\",\n \"columnType\": \"datetime\",\n \"isPk\": \"0\",\n \"isIncrement\": \"0\",\n \"isRequired\": \"1\"\n },\n {\n \"columnName\": \"due_time\",\n \"columnLabel\": \"应还时间\",\n \"columnComment\": \"应归还日期借出后30天\",\n \"columnType\": \"datetime\",\n \"isPk\": \"0\",\n \"isIncrement\": \"0\",\n \"isRequired\": \"1\"\n },\n {\n \"columnName\": \"return_time\",\n \"columnLabel\": \"实际归还时间\",\n \"columnComment\": \"实际归还日期,还书时填写\",\n \"columnType\": \"datetime\",\n \"isPk\": \"0\",\n \"isIncrement\": \"0\",\n \"isRequired\": \"0\"\n },\n {\n \"columnName\": \"status\",\n \"columnLabel\": \"状态\",\n \"columnComment\": \"借阅记录状态:待审核/借阅中/已归还/已驳回/待确认/已预留/已取消/已超时/已借出/罚款未付/罚款已付\",\n \"columnType\": \"varchar(20)\",\n \"isPk\": \"0\",\n \"isIncrement\": \"0\",\n \"isRequired\": \"1\",\n \"htmlType\": \"select\",\n \"dictType\": \"borrow_status\",\n \"dictOptions\": [\n {\"value\": \"borrow_pending\", \"label\": \"待审核\"},\n {\"value\": \"borrow_borrowing\", \"label\": \"借阅中\"},\n {\"value\": \"borrow_returned\", \"label\": \"已归还\"},\n {\"value\": \"borrow_rejected\", \"label\": \"已驳回\"},\n {\"value\": \"reservation_pending\", \"label\": \"待确认\"},\n {\"value\": \"reservation_reserved\", \"label\": \"已预留\"},\n {\"value\": \"reservation_cancelled\", \"label\": \"已取消\"},\n {\"value\": \"reservation_expired\", \"label\": \"已超时\"},\n {\"value\": \"reservation_borrowed\", \"label\": \"已借出\"},\n {\"value\": \"fine_unpaid\", \"label\": \"罚款未付\"},\n {\"value\": \"fine_paid\", \"label\": \"罚款已付\"}\n ]\n },\n {\n \"columnName\": \"create_time\",\n \"columnLabel\": \"创建时间\",\n \"columnComment\": \"记录创建时间\",\n \"columnType\": \"datetime\",\n \"isPk\": \"0\",\n \"isIncrement\": \"0\",\n \"isRequired\": \"1\"\n },\n {\n \"columnName\": \"remark\",\n \"columnLabel\": \"备注\",\n \"columnComment\": \"借阅备注信息\",\n \"columnType\": \"varchar(255)\",\n \"isPk\": \"0\",\n \"isIncrement\": \"0\",\n \"isRequired\": \"0\"\n }\n ]\n },\n {\n \"tableName\": \"reservation_record\",\n \"tableComment\": \"预约记录表\",\n \"adminMenuName\": \"预约记录\",\n \"operations\": {\n \"add\": true,\n \"edit\": false,\n \"remove\": false,\n \"removeType\": \"physical\",\n \"reason\": \"预约记录仅新增,不可编辑或删除\"\n },\n \"columns\": [\n {\n \"columnName\": \"id\",\n \"columnLabel\": \"ID\",\n \"columnComment\": \"主键ID\",\n \"columnType\": \"bigint(20)\",\n \"isPk\": \"1\",\n \"isIncrement\": \"1\",\n \"isRequired\": \"1\"\n },\n {\n \"columnName\": \"user_id\",\n \"columnLabel\": \"读者\",\n \"columnComment\": \"预约读者ID关联读者表\",\n \"columnType\": \"bigint(20)\",\n \"isPk\": \"0\",\n \"isIncrement\": \"0\",\n \"isRequired\": \"1\",\n \"htmlType\": \"select\",\n \"dictType\": \"remote:reader:id:username\"\n },\n {\n \"columnName\": \"book_id\",\n \"columnLabel\": \"图书\",\n \"columnComment\": \"预约图书ID关联图书信息表\",\n \"columnType\": \"bigint(20)\",\n \"isPk\": \"0\",\n \"isIncrement\": \"0\",\n \"isRequired\": \"1\",\n \"htmlType\": \"select\",\n \"dictType\": \"remote:book_info:id:title\"\n },\n {\n \"columnName\": \"status\",\n \"columnLabel\": \"状态\",\n \"columnComment\": \"预约记录状态:待确认/已预留/已取消/已超时/已借出\",\n \"columnType\": \"varchar(20)\",\n \"isPk\": \"0\",\n \"isIncrement\": \"0\",\n \"isRequired\": \"1\",\n \"htmlType\": \"select\",\n \"dictType\": \"reservation_status\",\n \"dictOptions\": [\n {\"value\": \"reservation_pending\", \"label\": \"待确认\"},\n {\"value\": \"reservation_reserved\", \"label\": \"已预留\"},\n {\"value\": \"reservation_cancelled\", \"label\": \"已取消\"},\n {\"value\": \"reservation_expired\", \"label\": \"已超时\"},\n {\"value\": \"reservation_borrowed\", \"label\": \"已借出\"}\n ]\n },\n {\n \"columnName\": \"create_time\",\n \"columnLabel\": \"预约时间\",\n \"columnComment\": \"预约创建时间\",\n \"columnType\": \"datetime\",\n \"isPk\": \"0\",\n \"isIncrement\": \"0\",\n \"isRequired\": \"1\"\n },\n {\n \"columnName\": \"expire_time\",\n \"columnLabel\": \"保留截止时间\",\n \"columnComment\": \"预约图书到馆后保留截止时间到馆后2天\",\n \"columnType\": \"datetime\",\n \"isPk\": \"0\",\n \"isIncrement\": \"0\",\n \"isRequired\": \"0\"\n },\n {\n \"columnName\": \"admin_id\",\n \"columnLabel\": \"处理管理员\",\n \"columnComment\": \"处理预约的管理员ID关联管理员表\",\n \"columnType\": \"bigint(20)\",\n \"isPk\": \"0\",\n \"isIncrement\": \"0\",\n \"isRequired\": \"0\",\n \"htmlType\": \"select\",\n \"dictType\": \"remote:admin:id:username\"\n },\n {\n \"columnName\": \"remark\",\n \"columnLabel\": \"备注\",\n \"columnComment\": \"预约备注信息\",\n \"columnType\": \"varchar(255)\",\n \"isPk\": \"0\",\n \"isIncrement\": \"0\",\n \"isRequired\": \"0\"\n }\n ]\n },\n {\n \"tableName\": \"fine_record\",\n \"tableComment\": \"罚款记录表\",\n \"adminMenuName\": \"罚款记录\",\n \"operations\": {\n \"add\": true,\n \"edit\": false,\n \"remove\": false,\n \"removeType\": \"physical\",\n \"reason\": \"罚款记录仅新增,不可编辑或删除\"\n },\n \"columns\": [\n {\n \"columnName\": \"id\",\n \"columnLabel\": \"ID\",\n \"columnComment\": \"主键ID\",\n \"columnType\": \"bigint(20)\",\n \"isPk\": \"1\",\n \"isIncrement\": \"1\",\n \"isRequired\": \"1\"\n },\n {\n \"columnName\": \"borrow_record_id\",\n \"columnLabel\": \"关联借阅\",\n \"columnComment\": \"关联的借阅记录ID\",\n \"columnType\": \"bigint(20)\",\n \"isPk\": \"0\",\n \"isIncrement\": \"0\",\n \"isRequired\": \"1\",\n \"htmlType\": \"select\",\n \"dictType\": \"remote:borrow_record:id:id\"\n },\n {\n \"columnName\": \"user_id\",\n \"columnLabel\": \"读者\",\n \"columnComment\": \"罚款所属读者ID关联读者表\",\n \"columnType\": \"bigint(20)\",\n \"isPk\": \"0\",\n \"isIncrement\": \"0\",\n \"isRequired\": \"1\",\n \"htmlType\": \"select\",\n \"dictType\": \"remote:reader:id:username\"\n },\n {\n \"columnName\": \"amount\",\n \"columnLabel\": \"罚款金额\",\n \"columnComment\": \"罚款金额(元)\",\n \"columnType\": \"decimal(10,2)\",\n \"isPk\": \"0\",\n \"isIncrement\": \"0\",\n \"isRequired\": \"1\"\n },\n {\n \"columnName\": \"status\",\n \"columnLabel\": \"状态\",\n \"columnComment\": \"罚款状态:未支付/已支付\",\n \"columnType\": \"varchar(20)\",\n \"isPk\": \"0\",\n \"isIncrement\": \"0\",\n \"isRequired\": \"1\",\n \"htmlType\": \"select\",\n \"dictType\": \"fine_status\",\n \"dictOptions\": [\n {\"value\": \"fine_unpaid\", \"label\": \"未支付\"},\n {\"value\": \"fine_paid\", \"label\": \"已支付\"}\n ]\n },\n {\n \"columnName\": \"create_time\",\n \"columnLabel\": \"生成时间\",\n \"columnComment\": \"罚款生成时间\",\n \"columnType\": \"datetime\",\n \"isPk\": \"0\",\n \"isIncrement\": \"0\",\n \"isRequired\": \"1\"\n },\n {\n \"columnName\": \"pay_time\",\n \"columnLabel\": \"支付时间\",\n \"columnComment\": \"罚款支付时间\",\n \"columnType\": \"datetime\",\n \"isPk\": \"0\",\n \"isIncrement\": \"0\",\n \"isRequired\": \"0\"\n }\n ]\n },\n {\n \"tableName\": \"reader\",\n \"tableComment\": \"读者账号表\",\n \"adminMenuName\": \"读者账号\",\n \"operations\": {\n \"add\": true,\n \"edit\": true,\n \"remove\": true,\n \"removeType\": \"physical\",\n \"reason\": \"\"\n },\n \"columns\": [\n {\n \"columnName\": \"id\",\n \"columnLabel\": \"读者ID\",\n \"columnComment\": \"读者主键ID\",\n \"columnType\": \"bigint(20)\",\n \"isPk\": \"1\",\n \"isIncrement\": \"1\",\n \"isRequired\": \"1\"\n },\n {\n \"columnName\": \"username\",\n \"columnLabel\": \"用户名\",\n \"columnComment\": \"读者登录用户名\",\n \"columnType\": \"varchar(50)\",\n \"isPk\": \"0\",\n \"isIncrement\": \"0\",\n \"isRequired\": \"1\"\n },\n {\n \"columnName\": \"password_hash\",\n \"columnLabel\": \"密码哈希\",\n \"columnComment\": \"读者登录密码哈希值\",\n \"columnType\": \"varchar(255)\",\n \"isPk\": \"0\",\n \"isIncrement\": \"0\",\n \"isRequired\": \"1\"\n },\n {\n \"columnName\": \"nickname\",\n \"columnLabel\": \"昵称\",\n \"columnComment\": \"读者昵称\",\n \"columnType\": \"varchar(50)\",\n \"isPk\": \"0\",\n \"isIncrement\": \"0\",\n \"isRequired\": \"1\"\n },\n {\n \"columnName\": \"status\",\n \"columnLabel\": \"状态\",\n \"columnComment\": \"读者账号状态active/inactive\",\n \"columnType\": \"varchar(20)\",\n \"isPk\": \"0\",\n \"isIncrement\": \"0\",\n \"isRequired\": \"1\",\n \"defaultValue\": \"active\",\n \"htmlType\": \"select\",\n \"dictType\": \"account_status\",\n \"dictOptions\": [\n {\"value\": \"active\", \"label\": \"正常\"},\n {\"value\": \"inactive\", \"label\": \"停用\"}\n ]\n },\n {\n \"columnName\": \"create_time\",\n \"columnLabel\": \"创建时间\",\n \"columnComment\": \"账号创建时间\",\n \"columnType\": \"datetime\",\n \"isPk\": \"0\",\n \"isIncrement\": \"0\",\n \"isRequired\": \"1\"\n },\n {\n \"columnName\": \"email\",\n \"columnLabel\": \"电子邮箱\",\n \"columnComment\": \"读者电子邮箱\",\n \"columnType\": \"varchar(100)\",\n \"isPk\": \"0\",\n \"isIncrement\": \"0\",\n \"isRequired\": \"0\"\n },\n {\n \"columnName\": \"phone\",\n \"columnLabel\": \"手机号\",\n \"columnComment\": \"读者手机号码\",\n \"columnType\": \"varchar(20)\",\n \"isPk\": \"0\",\n \"isIncrement\": \"0\",\n \"isRequired\": \"0\"\n }\n ]\n },\n {\n \"tableName\": \"admin\",\n \"tableComment\": \"管理员账号表\",\n \"adminMenuName\": \"管理员账号\",\n \"operations\": {\n \"add\": true,\n \"edit\": true,\n \"remove\": true,\n \"removeType\": \"physical\",\n \"reason\": \"\"\n },\n \"columns\": [\n {\n \"columnName\": \"id\",\n \"columnLabel\": \"管理员ID\",\n \"columnComment\": \"管理员主键ID\",\n \"columnType\": \"bigint(20)\",\n \"isPk\": \"1\",\n \"isIncrement\": \"1\",\n \"isRequired\": \"1\"\n },\n {\n \"columnName\": \"username\",\n \"columnLabel\": \"用户名\",\n \"columnComment\": \"管理员登录用户名\",\n \"columnType\": \"varchar(50)\",\n \"isPk\": \"0\",\n \"isIncrement\": \"0\",\n \"isRequired\": \"1\"\n },\n {\n \"columnName\": \"password_hash\",\n \"columnLabel\": \"密码哈希\",\n \"columnComment\": \"管理员登录密码哈希值\",\n \"columnType\": \"varchar(255)\",\n \"isPk\": \"0\",\n \"isIncrement\": \"0\",\n \"isRequired\": \"1\"\n },\n {\n \"columnName\": \"nickname\",\n \"columnLabel\": \"昵称\",\n \"columnComment\": \"管理员昵称\",\n \"columnType\": \"varchar(50)\",\n \"isPk\": \"0\",\n \"isIncrement\": \"0\",\n \"isRequired\": \"1\"\n },\n {\n \"columnName\": \"status\",\n \"columnLabel\": \"状态\",\n \"columnComment\": \"管理员账号状态active/inactive\",\n \"columnType\": \"varchar(20)\",\n \"isPk\": \"0\",\n \"isIncrement\": \"0\",\n \"isRequired\": \"1\",\n \"defaultValue\": \"active\",\n \"htmlType\": \"select\",\n \"dictType\": \"account_status\",\n \"dictOptions\": [\n {\"value\": \"active\", \"label\": \"正常\"},\n {\"value\": \"inactive\", \"label\": \"停用\"}\n ]\n },\n {\n \"columnName\": \"create_time\",\n \"columnLabel\": \"创建时间\",\n \"columnComment\": \"账号创建时间\",\n \"columnType\": \"datetime\",\n \"isPk\": \"0\",\n \"isIncrement\": \"0\",\n \"isRequired\": \"1\"\n }\n ]\n }\n ]\n}', '0', 62077, 8587, 1024, 7563, 8506, 3755, 8587, 8506, 17093, 3, 0.02459548, '1', NULL, '2026-07-14 15:57:57');
INSERT INTO `front_ai_usage_ledger` VALUES (115, 102, 102, 102, 100, 'one_click_project', 'deepseek', 'deepseek-v4-flash', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 17041, 34699, 51740, 9, NULL, '0', 'Unsupported business action UI binding target: current_user', '2026-07-14 16:11:17');
INSERT INTO `front_ai_usage_ledger` VALUES (116, NULL, NULL, NULL, 100, 'requirement', 'deepseek', 'deepseek-v4-flash', 'front.requirement', 'v2', '07d4c186c52634ef2c9f67640a638e0822c1e139b177ff2bc7eb3a10389e8164', '你是一键生成项目的需求补全助手。你的输出会作为后续生成应用蓝图、业务闭环、数据库、页面和源码的输入。\n\n请在保留用户原始描述的基础上补全必要的业务细节让系统能生成一个本科毕设/课程设计规模的完整项目。\n\n补全重点\n- 明确项目面向谁使用,包含 2 到 4 个角色;\n- 明确核心业务对象,例如订单、预约、借阅记录、商品、课程等;\n- 明确一条完整业务闭环:发起、审核/处理、完成、取消/拒绝/回退;\n- 明确关键业务规则:状态、时间期限、数量限制、金额/费用公式、库存或名额变化;\n- 明确异常边界:库存不足、重复提交、状态不符、超时、取消、支付失败等;\n- 可补充少量前台展示或内容维护模块,但不要扩展成大型平台。\n\n约束\n- 只输出中文纯文本,不要 Markdown不要 JSON不要解释。\n- 内容要短,控制在 300 字以内。\n- 不要写技术实现、接口、数据库表、字段、代码。\n- 不要输出“按实际情况”“待定”等模糊规则缺少关键数值时用合理默认值并标注“AI假设”。\n- 不要把 CRUD、统计报表、系统监控、操作日志当作核心业务。', '请根据以下项目输入,补全一段可直接用于一键生成项目的业务需求描述。\n\n输出格式\n项目定位\n角色\n核心流程\n关键规则\n异常边界\n\n项目输入 JSON\n{\"projectName\":\"图书管理系统\",\"currentDescription\":\"\"}', '项目定位:面向高校图书馆的图书管理系统,供读者和管理员使用。 \n角色读者、管理员。 \n核心流程读者检索图书 → 提交借书申请 → 管理员审核通过 → 读者取得图书(借出) → 读者还书 → 管理员确认归还。若超期,读者需缴纳逾期费用后完成还书。 \n关键规则AI假设每位读者最多同时借阅5本书单次借阅期限30天逾期每天每本收费0.5元图书可借数量减1库存为0时不可借出管理员可手动下架图书。 \n异常边界库存不足时禁止借出读者已借满5本时无法提交申请图书已被预约或借出时提示不可用读者未还清逾期费用无法再借新书管理员可拒绝借书申请或取消异常订单。', '0', 5414, 346, 256, 90, 333, 145, 346, 333, 679, 1, 0.00076112, '1', NULL, '2026-07-14 16:19:07');
INSERT INTO `front_ai_usage_ledger` VALUES (117, 103, 103, 103, 100, 'app_blueprint', 'deepseek', 'deepseek-v4-flash', 'front.app_blueprint', 'V1', 'c3ee0180ed446fe83055bd1c272ed1b6e3978584fe52f98f5e78e14e2cfc8f29', '你是应用蓝图架构师。只输出符合用户消息结构的 JSON规划业务角色、前台菜单与页面、后台菜单和运营看板。保持 pageCode、tableName、角色数据范围和登录要求前后一致只描述静态蓝图不生成数据库、权限表、菜单表或代码。角色名称使用简体中文技术标识使用稳定的小写 snake_case。', '根据项目输入 JSON 生成应用蓝图,只返回 JSON不要 Markdown 围栏或解释。\n输出结构{\"roles\":[{\"code\":\"reader\",\"name\":\"读者\",\"description\":\"\"}],\"frontendMenus\":[{\"code\":\"book_catalog\",\"name\":\"图书目录\",\"path\":\"/books\",\"pageCode\":\"book_catalog_page\",\"requiresLogin\":false,\"visibleRoles\":[],\"dataScope\":\"PUBLIC\"}],\"frontendPages\":[{\"code\":\"book_catalog_page\",\"name\":\"图书目录\",\"menuCode\":\"book_catalog\",\"path\":\"/books\",\"pageType\":\"list\",\"tableName\":\"book_info\"}],\"adminMenus\":[{\"code\":\"book_admin\",\"name\":\"图书管理\",\"path\":\"/admin/books\",\"pageCode\":\"book_admin_page\",\"tableName\":\"book_info\",\"pageType\":\"list\",\"requiresLogin\":true,\"visibleRoles\":[\"admin\"],\"dataScope\":\"ROLE\"}],\"adminHomeDashboard\":{\"title\":\"运营总览\",\"description\":\"核心业务数据\",\"metrics\":[],\"charts\":[]}}。\n蓝图描述目标生成项目而不是当前 EasyCode/RuoYi 平台。不要生成数据库表、菜单表、角色表、权限表或代码。\nrole.name 使用简体中文role.code 使用小写 snake_case。只有 role.code=admin 是系统管理员;名称含“管理员”或“后台”的业务角色仍保持独立。\nrole.name must be Simplified Chinese. Only role.code=admin is the system administrator.\n每个菜单必须包含 requiresLogin、visibleRoles、dataScopedataScope 只能是 PUBLIC、CURRENT_USER 或 ROLE。\nadminMenus 必须包含 pageCode、tableName、pageType个人资料使用 form普通管理使用 list。\nadminMenus must include pageCode, tableName, and pageType.\nfrontendMenus 顶层菜单应指向 pageCode详情页作为子页面不创建顶层详情菜单。\n不要为轮播图、banner、公告滚动条等首页装饰创建顶层菜单可放在首页业务块或作为后台维护数据。\nfrontendPages.pageType 只能是 list、current_user_list、detail、formtableName 必须是页面展示的业务表。\n同一业务对象只使用一个稳定 tableName后续数据库、闭环、页面、看板、动作必须复用不能使用同义表名。\nadminHomeDashboard 尽量包含 4 个业务指标和至少 2 张图表趋势图与分布图所有表字段必须可由后续数据库步骤创建。semantic 只能使用 money、order、user、task、warning、inventory、content、default。\n每个非 admin 角色使用表名等于 role.code 的独立账号表,不得创建共享 user、user_info、member 或 account 表。\nNever invent a shared user, user_info, member, or account table for role accounts.\n需要个人资料页时为每个非 admin 角色创建独立 form 页面和菜单tableName 绑定 role.codepageCode/path 带角色前缀visibleRoles 只包含该角色。\nCreate one form page and one menu per non-admin role when profile pages are needed.\n个人订单、借阅、资料、预约、支付等页面必须 requiresLogin=true 且 dataScope=CURRENT_USER。\n项目输入 JSON\n{\"projectName\":\"图书管理系统\",\"projectDescription\":\"【AI补全需求】\\n项目定位面向高校图书馆的图书管理系统供读者和管理员使用。 \\n角色读者、管理员。 \\n核心流程读者检索图书 → 提交借书申请 → 管理员审核通过 → 读者取得图书(借出) → 读者还书 → 管理员确认归还。若超期,读者需缴纳逾期费用后完成还书。 \\n关键规则AI假设每位读者最多同时借阅5本书单次借阅期限30天逾期每天每本收费0.5元图书可借数量减1库存为0时不可借出管理员可手动下架图书。 \\n异常边界库存不足时禁止借出读者已借满5本时无法提交申请图书已被预约或借出时提示不可用读者未还清逾期费用无法再借新书管理员可拒绝借书申请或取消异常订单。\",\"industryTemplate\":\"\",\"stylePreset\":\"dark-tech\",\"extraRequirements\":\"\"}', '{\n \"roles\": [\n {\n \"code\": \"admin\",\n \"name\": \"管理员\",\n \"description\": \"系统管理员,负责图书管理、借阅审核、逾期处理等\"\n },\n {\n \"code\": \"reader\",\n \"name\": \"读者\",\n \"description\": \"普通读者,可检索图书、借书、还书、预约等\"\n }\n ],\n \"frontendMenus\": [\n {\n \"code\": \"book_catalog\",\n \"name\": \"图书目录\",\n \"path\": \"/books\",\n \"pageCode\": \"book_catalog_page\",\n \"requiresLogin\": false,\n \"visibleRoles\": [],\n \"dataScope\": \"PUBLIC\"\n },\n {\n \"code\": \"my_borrows\",\n \"name\": \"我的借阅\",\n \"path\": \"/my-borrows\",\n \"pageCode\": \"my_borrows_page\",\n \"requiresLogin\": true,\n \"visibleRoles\": [\"reader\"],\n \"dataScope\": \"CURRENT_USER\"\n },\n {\n \"code\": \"my_reservations\",\n \"name\": \"我的预约\",\n \"path\": \"/my-reservations\",\n \"pageCode\": \"my_reservations_page\",\n \"requiresLogin\": true,\n \"visibleRoles\": [\"reader\"],\n \"dataScope\": \"CURRENT_USER\"\n },\n {\n \"code\": \"my_fines\",\n \"name\": \"我的罚款\",\n \"path\": \"/my-fines\",\n \"pageCode\": \"my_fines_page\",\n \"requiresLogin\": true,\n \"visibleRoles\": [\"reader\"],\n \"dataScope\": \"CURRENT_USER\"\n },\n {\n \"code\": \"reader_profile\",\n \"name\": \"个人资料\",\n \"path\": \"/profile\",\n \"pageCode\": \"reader_profile_page\",\n \"requiresLogin\": true,\n \"visibleRoles\": [\"reader\"],\n \"dataScope\": \"CURRENT_USER\"\n }\n ],\n \"frontendPages\": [\n {\n \"code\": \"book_catalog_page\",\n \"name\": \"图书目录\",\n \"menuCode\": \"book_catalog\",\n \"path\": \"/books\",\n \"pageType\": \"list\",\n \"tableName\": \"book_info\"\n },\n {\n \"code\": \"book_detail_page\",\n \"name\": \"图书详情\",\n \"menuCode\": \"book_catalog\",\n \"path\": \"/books/:id\",\n \"pageType\": \"detail\",\n \"tableName\": \"book_info\"\n },\n {\n \"code\": \"my_borrows_page\",\n \"name\": \"我的借阅\",\n \"menuCode\": \"my_borrows\",\n \"path\": \"/my-borrows\",\n \"pageType\": \"current_user_list\",\n \"tableName\": \"borrow_record\"\n },\n {\n \"code\": \"my_reservations_page\",\n \"name\": \"我的预约\",\n \"menuCode\": \"my_reservations\",\n \"path\": \"/my-reservations\",\n \"pageType\": \"current_user_list\",\n \"tableName\": \"reservation\"\n },\n {\n \"code\": \"my_fines_page\",\n \"name\": \"我的罚款\",\n \"menuCode\": \"my_fines\",\n \"path\": \"/my-fines\",\n \"pageType\": \"current_user_list\",\n \"tableName\": \"fine\"\n },\n {\n \"code\": \"reader_profile_page\",\n \"name\": \"个人资料\",\n \"menuCode\": \"reader_profile\",\n \"path\": \"/profile\",\n \"pageType\": \"form\",\n \"tableName\": \"reader\"\n }\n ],\n \"adminMenus\": [\n {\n \"code\": \"book_admin\",\n \"name\": \"图书管理\",\n \"path\": \"/admin/books\",\n \"pageCode\": \"book_admin_page\",\n \"tableName\": \"book_info\",\n \"pageType\": \"list\",\n \"requiresLogin\": true,\n \"visibleRoles\": [\"admin\"],\n \"dataScope\": \"ROLE\"\n },\n {\n \"code\": \"reader_admin\",\n \"name\": \"读者管理\",\n \"path\": \"/admin/readers\",\n \"pageCode\": \"reader_admin_page\",\n \"tableName\": \"reader\",\n \"pageType\": \"list\",\n \"requiresLogin\": true,\n \"visibleRoles\": [\"admin\"],\n \"dataScope\": \"ROLE\"\n },\n {\n \"code\": \"borrow_application_admin\",\n \"name\": \"借书申请管理\",\n \"path\": \"/admin/borrow-applications\",\n \"pageCode\": \"borrow_application_admin_page\",\n \"tableName\": \"borrow_application\",\n \"pageType\": \"list\",\n \"requiresLogin\": true,\n \"visibleRoles\": [\"admin\"],\n \"dataScope\": \"ROLE\"\n },\n {\n \"code\": \"borrow_record_admin\",\n \"name\": \"借阅记录管理\",\n \"path\": \"/admin/borrow-records\",\n \"pageCode\": \"borrow_record_admin_page\",\n \"tableName\": \"borrow_record\",\n \"pageType\": \"list\",\n \"requiresLogin\": true,\n \"visibleRoles\": [\"admin\"],\n \"dataScope\": \"ROLE\"\n },\n {\n \"code\": \"fine_admin\",\n \"name\": \"逾期费用管理\",\n \"path\": \"/admin/fines\",\n \"pageCode\": \"fine_admin_page\",\n \"tableName\": \"fine\",\n \"pageType\": \"list\",\n \"requiresLogin\": true,\n \"visibleRoles\": [\"admin\"],\n \"dataScope\": \"ROLE\"\n },\n {\n \"code\": \"reservation_admin\",\n \"name\": \"预约管理\",\n \"path\": \"/admin/reservations\",\n \"pageCode\": \"reservation_admin_page\",\n \"tableName\": \"reservation\",\n \"pageType\": \"list\",\n \"requiresLogin\": true,\n \"visibleRoles\": [\"admin\"],\n \"dataScope\": \"ROLE\"\n }\n ],\n \"adminHomeDashboard\": {\n \"title\": \"运营总览\",\n \"description\": \"核心业务数据\",\n \"metrics\": [\n {\n \"code\": \"total_books\",\n \"name\": \"图书总数\",\n \"semantic\": \"inventory\",\n \"field\": \"count\"\n },\n {\n \"code\": \"total_readers\",\n \"name\": \"读者总数\",\n \"semantic\": \"user\",\n \"field\": \"count\"\n },\n {\n \"code\": \"current_borrowed\",\n \"name\": \"当前借出数\",\n \"semantic\": \"order\",\n \"field\": \"count\"\n },\n {\n \"code\": \"pending_applications\",\n \"name\": \"待处理申请\",\n \"semantic\": \"task\",\n \"field\": \"count\"\n }\n ],\n \"charts\": [\n {\n \"code\": \"borrow_trend\",\n \"name\": \"借阅趋势\",\n \"type\": \"line\",\n \"semantic\": \"order\",\n \"field\": \"date\"\n },\n {\n \"code\": \"book_category_distribution\",\n \"name\": \"图书分类分布\",\n \"type\": \"pie\",\n \"semantic\": \"content\",\n \"field\": \"category\"\n }\n ]\n }\n}', '0', 28895, 991, 768, 223, 3462, 1878, 991, 3462, 4453, 1, 0.00716236, '1', NULL, '2026-07-14 16:19:51');
INSERT INTO `front_ai_usage_ledger` VALUES (118, 103, 103, 103, 100, 'flow_config', 'deepseek', 'deepseek-v4-flash', 'front.flow_config', 'V1', '247495840c67968896ccad2db0a599bd4fc594d0189157dce888b8ede90b3257', '你是业务流程配置设计器。只输出一个合法 JSON 对象,不输出 Markdown、解释或 SQL。\n\n目标用最小 flow_config 描述状态流转、显式 Java 业务动作、多表数量联动、按钮和统计。不要输出 CRUD不要输出通用规则 DSL。\n\n固定结构\n{\n \"version\":\"1.0\",\n \"code\":\"snake_case\",\n \"name\":\"中文业务名\",\n \"mainTable\":\"snake_case\",\n \"statusField\":\"status\",\n \"notFoundMessage\":\"主记录不存在\",\n \"states\":[{\"code\":\"pending\",\"label\":\"待审核\"}],\n \"actions\":[{\n \"code\":\"approve\",\n \"name\":\"审核通过\",\n \"from\":\"pending\",\n \"to\":\"borrowing\",\n \"actor\":\"admin\",\n \"method\":\"POST\",\n \"path\":\"/borrow-record/approve\",\n \"invalidStateMessage\":\"当前状态不能审核\",\n \"successMessage\":\"审核成功\",\n \"audit\":{\"userField\":\"approve_user_id\",\"timeField\":\"approve_time\"},\n \"effects\":[{\n \"type\":\"decrease\",\n \"table\":\"book\",\n \"relationField\":\"book_id\",\n \"field\":\"stock\",\n \"amount\":\"1\",\n \"min\":\"0\",\n \"notFoundMessage\":\"图书不存在\",\n \"errorMessage\":\"图书库存不足\"\n }],\n \"button\":{\"scope\":\"admin\",\"pageCode\":\"borrow_record_list\",\"slot\":\"list.rowActions\",\"type\":\"success\",\"confirm\":\"确认审核通过吗?\",\"order\":10}\n }],\n \"metrics\":[{\"code\":\"borrowing_count\",\"name\":\"借阅中数量\",\"table\":\"borrow_record\",\"aggregate\":\"count\",\"field\":\"id\",\"status\":\"borrowing\",\"unit\":\"条\"}]\n}\n\n约束\n1. code、表名、字段名全部使用小写 snake_case状态 code 使用稳定英文编码label 使用中文。\n2. 每个 action 必须有 from 和 to且二者存在于 states 中并且不相同。\n3. effects.type 只能是 decrease、increase、update_related、create_record。\n4. decrease/increase 必须给 table、relationField、field、amountdecrease 还要给 min。\n5. update_related/create_record 使用 values值可为 currentUserId、now、record.字段名或常量。\n6. 审核人等身份只能通过 audit.userField 表达,由后端登录态注入,不能作为前端可传字段。\n7. 覆盖需求中的完整正向闭环和关键回退/拒绝动作,但不要为普通 CRUD 创建 action。', '请根据以下 JSON 上下文生成 flow_config。appBlueprint 是已确认的页面、角色和菜单范围,必须与它保持一致:\n{\"mode\":\"generate\",\"projectName\":\"图书管理系统\",\"projectDescription\":\"【AI补全需求】\\n项目定位面向高校图书馆的图书管理系统供读者和管理员使用。 \\n角色读者、管理员。 \\n核心流程读者检索图书 → 提交借书申请 → 管理员审核通过 → 读者取得图书(借出) → 读者还书 → 管理员确认归还。若超期,读者需缴纳逾期费用后完成还书。 \\n关键规则AI假设每位读者最多同时借阅5本书单次借阅期限30天逾期每天每本收费0.5元图书可借数量减1库存为0时不可借出管理员可手动下架图书。 \\n异常边界库存不足时禁止借出读者已借满5本时无法提交申请图书已被预约或借出时提示不可用读者未还清逾期费用无法再借新书管理员可拒绝借书申请或取消异常订单。\",\"industryTemplate\":\"\",\"stylePreset\":\"dark-tech\",\"extraRequirements\":\"\",\"confirmedAppBlueprint\":{\"adminHomeDashboard\":{\"charts\":[{\"code\":\"borrow_trend\",\"filters\":[],\"metrics\":[],\"semantic\":\"order\",\"type\":\"line\"},{\"code\":\"book_category_distribution\",\"filters\":[],\"metrics\":[],\"semantic\":\"content\",\"type\":\"pie\"}],\"description\":\"核心业务数据\",\"metrics\":[{\"code\":\"total_books\",\"field\":\"count\",\"filters\":[],\"semantic\":\"inventory\"},{\"code\":\"total_readers\",\"field\":\"count\",\"filters\":[],\"semantic\":\"user\"},{\"code\":\"current_borrowed\",\"field\":\"count\",\"filters\":[],\"semantic\":\"order\"},{\"code\":\"pending_applications\",\"field\":\"count\",\"filters\":[],\"semantic\":\"task\"}],\"title\":\"运营总览\"},\"adminMenus\":[{\"code\":\"book_admin\",\"dataScope\":\"ROLE\",\"name\":\"图书管理\",\"pageCode\":\"book_admin_page\",\"pageType\":\"list\",\"path\":\"/admin/books\",\"requiresLogin\":true,\"tableName\":\"book_info\",\"visibleRoles\":[\"admin\"]},{\"code\":\"reader_admin\",\"dataScope\":\"ROLE\",\"name\":\"读者管理\",\"pageCode\":\"reader_admin_page\",\"pageType\":\"list\",\"path\":\"/admin/readers\",\"requiresLogin\":true,\"tableName\":\"reader\",\"visibleRoles\":[\"admin\"]},{\"code\":\"borrow_application_admin\",\"dataScope\":\"ROLE\",\"name\":\"借书申请管理\",\"pageCode\":\"borrow_application_admin_page\",\"pageType\":\"list\",\"path\":\"/admin/borrow-applications\",\"requiresLogin\":true,\"tableName\":\"borrow_application\",\"visibleRoles\":[\"admin\"]},{\"code\":\"borrow_record_admin\",\"dataScope\":\"ROLE\",\"name\":\"借阅记录管理\",\"pageCode\":\"borrow_record_admin_page\",\"pageType\":\"list\",\"path\":\"/admin/borrow-records\",\"requiresLogin\":true,\"tableName\":\"borrow_record\",\"visibleRoles\":[\"admin\"]},{\"code\":\"fine_admin\",\"dataScope\":\"ROLE\",\"name\":\"逾期费用管理\",\"pageCode\":\"fine_admin_page\",\"pageType\":\"list\",\"path\":\"/admin/fines\",\"requiresLogin\":true,\"tableName\":\"fine\",\"visibleRoles\":[\"admin\"]},{\"code\":\"reservation_admin\",\"dataScope\":\"ROLE\",\"name\":\"预约管理\",\"pageCode\":\"reservation_admin_page\",\"pageType\":\"list\",\"path\":\"/admin/reservations\",\"requiresLogin\":true,\"tableName\":\"reservation\",\"visibleRoles\":[\"admin\"]}],\"frontendMenus\":[{\"code\":\"book_catalog\",\"dataScope\":\"PUBLIC\",\"name\":\"图书目录\",\"pageCode\":\"book_catalog_page\",\"pageType\":\"\",\"path\":\"/books\",\"requiresLogin\":false,\"tableName\":\"\",\"visibleRoles\":[]},{\"code\":\"my_borrows\",\"dataScope\":\"CURRENT_USER\",\"name\":\"我的借阅\",\"pageCode\":\"my_borrows_page\",\"pageType\":\"\",\"path\":\"/my-borrows\",\"requiresLogin\":true,\"tableName\":\"\",\"visibleRoles\":[\"reader\"]},{\"code\":\"my_reservations\",\"dataScope\":\"CURRENT_USER\",\"name\":\"我的预约\",\"pageCode\":\"my_reservations_page\",\"pageType\":\"\",\"path\":\"/my-reservations\",\"requiresLogin\":true,\"tableName\":\"\",\"visibleRoles\":[\"reader\"]},{\"code\":\"my_fines\",\"dataScope\":\"CURRENT_USER\",\"name\":\"我的罚款\",\"pageCode\":\"my_fines_page\",\"pageType\":\"\",\"path\":\"/my-fines\",\"requiresLogin\":true,\"tableName\":\"\",\"visibleRoles\":[\"reader\"]},{\"code\":\"reader_profile\",\"dataScope\":\"CURRENT_USER\",\"name\":\"个人资料\",\"pageCode\":\"reader_profile_page\",\"pageType\":\"\",\"path\":\"/profile\",\"requiresLogin\":true,\"tableName\":\"\",\"visibleRoles\":[\"reader\"]}],\"frontendPages\":[{\"code\":\"book_catalog_page\",\"menuCode\":\"book_catalog\",\"name\":\"图书目录\",\"pageType\":\"list\",\"parentPageCode\":\"\",\"path\":\"/books\",\"tableName\":\"book_info\"},{\"code\":\"book_detail_page\",\"menuCode\":\"book_catalog\",\"name\":\"图书详情\",\"pageType\":\"detail\",\"parentPageCode\":\"\",\"path\":\"/books/:id\",\"tableName\":\"book_info\"},{\"code\":\"my_borrows_page\",\"menuCode\":\"my_borrows\",\"name\":\"我的借阅\",\"pageType\":\"current_user_list\",\"parentPageCode\":\"\",\"path\":\"/my-borrows\",\"tableName\":\"borrow_record\"},{\"code\":\"my_reservations_page\",\"menuCode\":\"my_reservations\",\"name\":\"我的预约\",\"pageType\":\"current_user_list\",\"parentPageCode\":\"\",\"path\":\"/my-reservations\",\"tableName\":\"reservation\"},{\"code\":\"my_fines_page\",\"menuCode\":\"my_fines\",\"name\":\"我的罚款\",\"pageType\":\"current_user_list\",\"parentPageCode\":\"\",\"path\":\"/my-fines\",\"tableName\":\"fine\"},{\"code\":\"reader_profile_page\",\"menuCode\":\"reader_profile\",\"name\":\"个人资料\",\"pageType\":\"form\",\"parentPageCode\":\"\",\"path\":\"/profile\",\"tableName\":\"reader\"}],\"roles\":[{\"code\":\"admin\",\"description\":\"系统管理员,负责图书管理、借阅审核、逾期处理等\",\"name\":\"管理员\"},{\"code\":\"reader\",\"description\":\"普通读者,可检索图书、借书、还书、预约等\",\"name\":\"读者\"}]}}', '{\n \"version\": \"1.0\",\n \"code\": \"borrow_record_flow\",\n \"name\": \"借阅记录流程\",\n \"mainTable\": \"borrow_record\",\n \"statusField\": \"status\",\n \"notFoundMessage\": \"主记录不存在\",\n \"states\": [\n {\"code\": \"pending\", \"label\": \"待审核\"},\n {\"code\": \"borrowing\", \"label\": \"借阅中\"},\n {\"code\": \"returning\", \"label\": \"待确认归还\"},\n {\"code\": \"returned\", \"label\": \"已归还\"},\n {\"code\": \"cancelled\", \"label\": \"已取消\"},\n {\"code\": \"rejected\", \"label\": \"已拒绝\"}\n ],\n \"actions\": [\n {\n \"code\": \"approve\",\n \"name\": \"审核通过\",\n \"from\": \"pending\",\n \"to\": \"borrowing\",\n \"actor\": \"admin\",\n \"method\": \"POST\",\n \"path\": \"/borrow-record/approve\",\n \"invalidStateMessage\": \"当前状态不能审核\",\n \"successMessage\": \"审核成功\",\n \"audit\": {\"userField\": \"approve_user_id\", \"timeField\": \"approve_time\"},\n \"effects\": [\n {\n \"type\": \"decrease\",\n \"table\": \"book_info\",\n \"relationField\": \"book_id\",\n \"field\": \"stock\",\n \"amount\": \"1\",\n \"min\": \"0\",\n \"notFoundMessage\": \"图书不存在\",\n \"errorMessage\": \"图书库存不足\"\n }\n ],\n \"button\": {\n \"scope\": \"admin\",\n \"pageCode\": \"borrow_application_admin_page\",\n \"slot\": \"list.rowActions\",\n \"type\": \"primary\",\n \"confirm\": \"确认审核通过吗?\",\n \"order\": 10\n }\n },\n {\n \"code\": \"reject\",\n \"name\": \"拒绝申请\",\n \"from\": \"pending\",\n \"to\": \"rejected\",\n \"actor\": \"admin\",\n \"method\": \"POST\",\n \"path\": \"/borrow-record/reject\",\n \"invalidStateMessage\": \"当前状态不能拒绝\",\n \"successMessage\": \"已拒绝\",\n \"audit\": {\"userField\": \"reject_user_id\", \"timeField\": \"reject_time\"},\n \"effects\": [],\n \"button\": {\n \"scope\": \"admin\",\n \"pageCode\": \"borrow_application_admin_page\",\n \"slot\": \"list.rowActions\",\n \"type\": \"danger\",\n \"confirm\": \"确认拒绝该申请吗?\",\n \"order\": 20\n }\n },\n {\n \"code\": \"cancel\",\n \"name\": \"取消申请\",\n \"from\": \"pending\",\n \"to\": \"cancelled\",\n \"actor\": \"admin\",\n \"method\": \"POST\",\n \"path\": \"/borrow-record/cancel\",\n \"invalidStateMessage\": \"当前状态不能取消\",\n \"successMessage\": \"已取消\",\n \"effects\": [],\n \"button\": {\n \"scope\": \"admin\",\n \"pageCode\": \"borrow_application_admin_page\",\n \"slot\": \"list.rowActions\",\n \"type\": \"warning\",\n \"confirm\": \"确认取消该申请吗?\",\n \"order\": 30\n }\n },\n {\n \"code\": \"return\",\n \"name\": \"还书\",\n \"from\": \"borrowing\",\n \"to\": \"returning\",\n \"actor\": \"reader\",\n \"method\": \"POST\",\n \"path\": \"/borrow-record/return\",\n \"invalidStateMessage\": \"当前状态不能还书\",\n \"successMessage\": \"还书请求已提交,等待管理员确认\",\n \"effects\": [\n {\n \"type\": \"create_record\",\n \"table\": \"fine\",\n \"values\": {\n \"reader_id\": \"record.reader_id\",\n \"book_id\": \"record.book_id\",\n \"borrow_record_id\": \"record.id\",\n \"amount\": \"0.00\",\n \"status\": \"unpaid\",\n \"created_at\": \"now\"\n }\n }\n ],\n \"button\": {\n \"scope\": \"reader\",\n \"pageCode\": \"my_borrows_page\",\n \"slot\": \"list.rowActions\",\n \"type\": \"warning\",\n \"confirm\": \"确认还书吗?\",\n \"order\": 10\n }\n },\n {\n \"code\": \"confirm_return\",\n \"name\": \"确认归还\",\n \"from\": \"returning\",\n \"to\": \"returned\",\n \"actor\": \"admin\",\n \"method\": \"POST\",\n \"path\": \"/borrow-record/confirm-return\",\n \"invalidStateMessage\": \"当前状态不能确认归还\",\n \"successMessage\": \"归还确认成功\",\n \"audit\": {\"userField\": \"confirm_user_id\", \"timeField\": \"confirm_time\"},\n \"effects\": [\n {\n \"type\": \"increase\",\n \"table\": \"book_info\",\n \"relationField\": \"book_id\",\n \"field\": \"stock\",\n \"amount\": \"1\",\n \"notFoundMessage\": \"图书不存在\",\n \"errorMessage\": \"图书库存更新失败\"\n }\n ],\n \"button\": {\n \"scope\": \"admin\",\n \"pageCode\": \"borrow_record_admin_page\",\n \"slot\": \"list.rowActions\",\n \"type\": \"success\",\n \"confirm\": \"确认已收到还书?\",\n \"order\": 10\n }\n }\n ],\n \"metrics\": [\n {\"code\": \"total_books\", \"name\": \"总图书数\", \"table\": \"book_info\", \"aggregate\": \"count\", \"field\": \"id\", \"unit\": \"册\"},\n {\"code\": \"total_readers\", \"name\": \"总读者数\", \"table\": \"reader\", \"aggregate\": \"count\", \"field\": \"id\", \"unit\": \"人\"},\n {\"code\": \"current_borrowed\", \"name\": \"当前借阅中\", \"table\": \"borrow_record\", \"aggregate\": \"count\", \"field\": \"id\", \"status\": \"borrowing\", \"unit\": \"条\"},\n {\"code\": \"pending_applications\", \"name\": \"待审核申请\", \"table\": \"borrow_record\", \"aggregate\": \"count\", \"field\": \"id\", \"status\": \"pending\", \"unit\": \"条\"}\n ]\n}', '0', 94529, 1925, 512, 1413, 8571, 7165, 1925, 8571, 10496, 2, 0.01856524, '1', NULL, '2026-07-14 16:21:25');
INSERT INTO `front_ai_usage_ledger` VALUES (119, 103, 103, 103, 100, 'database', 'deepseek', 'deepseek-v4-flash', 'front.database', 'V1', '14dcad479b01de068e5c5bc39b5cd7a591a09d334ee6812483d8ac00dd8c9d61', '你是 MySQL 业务数据库设计专家。只输出符合用户消息结构的 JSON根据已确认的应用蓝图和业务闭环生成可直接落地的表、字段、主外键、字典和表操作策略。字段必须业务化且类型合法所有蓝图与闭环引用必须有真实表字段承载不得生成菜单、权限关系、代码或业务动作。', '根据项目输入 JSON 生成 MySQL 数据库设计 JSON只返回 JSON不要 Markdown 围栏或解释。\nConfirmed app blueprint JSON and Confirmed business loop plan JSON are supplied in the input.\nDatabase generation constraints from the business loop plan must be enforced.\nEvery confirmedBusinessLoopPlan.metrics tableName, field, and filters.field must exist in the generated schema. Numeric sum/avg/min/max metric fields must use a compatible numeric column type. Status-filter metric values must remain compatible with the matching stateMachines.states.\nIf input.mode is correction, repair input.originalResponse according to input.validationError and return the complete corrected database JSON. Do not drop unrelated valid tables or fields.\n输出结构{\"tables\":[{\"tableName\":\"car_info\",\"tableComment\":\"车辆信息表\",\"adminMenuName\":\"车辆管理\",\"operations\":{\"add\":true,\"edit\":true,\"remove\":true,\"removeType\":\"physical\",\"reason\":\"\"},\"columns\":[{\"columnName\":\"id\",\"columnLabel\":\"ID\",\"columnComment\":\"主键ID\",\"columnType\":\"bigint(20)\",\"isPk\":\"1\",\"isIncrement\":\"1\",\"isRequired\":\"1\"}]}]}。\n不要使用 field_1 等占位字段;每个表必须包含非空 columns以及 adminMenuName 和 operations.add/edit/remove/removeType/reason。\nadminMenuName 必须来自本表 tableComment/tableName不得复用其他表或宽泛模块名称。\nadminMenuName must come from that table\'s own tableComment or tableName.\n字段数组名称只能是 columns不能使用 fields、fieldDesign、fieldList、columnList。\nEvery table must include a non-empty columns array; use columns exactly.\n每个字段必须包含 columnName、columnLabel、columnComment、columnType、isPk、isIncrement、isRequired。columnLabel 是短 UI 标签columnComment 是完整数据库说明。\n可提供 javaType、htmlTypehtmlType 只能是 input、textarea、select、radio、checkbox、datetime、imageUpload、fileUpload、editor。\nselect/radio/checkbox 应提供 dictType 和 dictOptions。关联选择使用 remote:target_table:value_field:label_field且目标表和值/标签字段必须都存在于本次 tables JSON。\n非主键外键字段应在目标表存在时使用 remote select无目标表的分类、类型、状态使用本地 dictOptions 或普通输入。\n普通主数据表除唯一主键外至少包含 4 个业务字段。\n订单、支付、借还、审批、流程、任务、库存记录等动作记录表使用仅新增关系、审计、日志、历史表使用只读普通主数据表使用完整 CRUD。\n不要生成 businessActions、业务动作、工作流、代码、菜单表、user_role、角色权限表或权限表。\nDo not generate menu tables, user_role tables, role-permission tables, or permission tables.\n表名字段名只使用小写字母、数字、下划线每表必须且只能有一个主键。字段类型只能使用 bigint(20)、int(11)、varchar(n)、char(n)、decimal(p,s)、datetime、date、text、longtext。\n为 confirmedAppBlueprint.roles 中每个角色创建独立账号表admin 使用 admin其他角色使用 role.code。不得使用共享用户表或 role_id/role_code/user_role。\n角色账号表包含 `<role_code>_id` 自增主键、username、password_hash、nickname、status、create_time。admin 只能登录后台,非 admin 角色登录前台。\n生成 frontendPages.tableName 引用的全部表;个人资料页必须绑定对应非 admin 角色账号表。requiresLogin=true 且 dataScope=CURRENT_USER 的业务数据通常包含 user_id。\ncanonicalTableRegistry 中的名称是最终规范表名。confirmedBusinessLoopPlan 若出现与其指向同一业务对象的同义表名,必须使用 canonicalTableRegistry 中的名称,不得同时生成两张同义表。\n根据 confirmedBusinessLoopPlan 创建 coreObjects.tableName、actions.ownerTable补齐 stateMachines.statusField、quantityRules.quantityField 以及 recordRules 和动作前置条件需要的字段。状态值不得超出 stateMachines.states。\n严格实现 confirmedBusinessLoopPlan.businessPoliciesTIME_LIMIT 的 startField、dueField 使用 datetimeOVERDUE_FEE 的 dueField 使用 datetime、daysTargetField 使用 int(11)、targetField 使用 decimal(10,2)QUANTITY_LIMIT 的 targetField 使用 int(11) 且默认值为 0。所有政策字段必须位于政策指定的 tableName禁止只把期限或公式写进 columnComment 而不创建字段。\nDo not invent status values outside stateMachines.states.\n严格遵守 input.limits.maxTables 和 maxColumnsPerTable。\n项目输入 JSON\n{\"mode\":\"generate\",\"projectName\":\"图书管理系统\",\"projectDescription\":\"【AI补全需求】\\n项目定位面向高校图书馆的图书管理系统供读者和管理员使用。 \\n角色读者、管理员。 \\n核心流程读者检索图书 → 提交借书申请 → 管理员审核通过 → 读者取得图书(借出) → 读者还书 → 管理员确认归还。若超期,读者需缴纳逾期费用后完成还书。 \\n关键规则AI假设每位读者最多同时借阅5本书单次借阅期限30天逾期每天每本收费0.5元图书可借数量减1库存为0时不可借出管理员可手动下架图书。 \\n异常边界库存不足时禁止借出读者已借满5本时无法提交申请图书已被预约或借出时提示不可用读者未还清逾期费用无法再借新书管理员可拒绝借书申请或取消异常订单。\",\"industryTemplate\":\"\",\"stylePreset\":\"dark-tech\",\"extraRequirements\":\"\",\"confirmedAppBlueprint\":{\"adminHomeDashboard\":{\"charts\":[{\"code\":\"borrow_trend\",\"filters\":[],\"metrics\":[],\"semantic\":\"order\",\"type\":\"line\"},{\"code\":\"book_category_distribution\",\"filters\":[],\"metrics\":[],\"semantic\":\"content\",\"type\":\"pie\"}],\"description\":\"核心业务数据\",\"metrics\":[{\"code\":\"total_books\",\"field\":\"count\",\"filters\":[],\"semantic\":\"inventory\"},{\"code\":\"total_readers\",\"field\":\"count\",\"filters\":[],\"semantic\":\"user\"},{\"code\":\"current_borrowed\",\"field\":\"count\",\"filters\":[],\"semantic\":\"order\"},{\"code\":\"pending_applications\",\"field\":\"count\",\"filters\":[],\"semantic\":\"task\"}],\"title\":\"运营总览\"},\"adminMenus\":[{\"code\":\"book_admin\",\"dataScope\":\"ROLE\",\"name\":\"图书管理\",\"pageCode\":\"book_admin_page\",\"pageType\":\"list\",\"path\":\"/admin/books\",\"requiresLogin\":true,\"tableName\":\"book_info\",\"visibleRoles\":[\"admin\"]},{\"code\":\"reader_admin\",\"dataScope\":\"ROLE\",\"name\":\"读者管理\",\"pageCode\":\"reader_admin_page\",\"pageType\":\"list\",\"path\":\"/admin/readers\",\"requiresLogin\":true,\"tableName\":\"reader\",\"visibleRoles\":[\"admin\"]},{\"code\":\"borrow_application_admin\",\"dataScope\":\"ROLE\",\"name\":\"借书申请管理\",\"pageCode\":\"borrow_application_admin_page\",\"pageType\":\"list\",\"path\":\"/admin/borrow-applications\",\"requiresLogin\":true,\"tableName\":\"borrow_application\",\"visibleRoles\":[\"admin\"]},{\"code\":\"borrow_record_admin\",\"dataScope\":\"ROLE\",\"name\":\"借阅记录管理\",\"pageCode\":\"borrow_record_admin_page\",\"pageType\":\"list\",\"path\":\"/admin/borrow-records\",\"requiresLogin\":true,\"tableName\":\"borrow_record\",\"visibleRoles\":[\"admin\"]},{\"code\":\"fine_admin\",\"dataScope\":\"ROLE\",\"name\":\"逾期费用管理\",\"pageCode\":\"fine_admin_page\",\"pageType\":\"list\",\"path\":\"/admin/fines\",\"requiresLogin\":true,\"tableName\":\"fine\",\"visibleRoles\":[\"admin\"]},{\"code\":\"reservation_admin\",\"dataScope\":\"ROLE\",\"name\":\"预约管理\",\"pageCode\":\"reservation_admin_page\",\"pageType\":\"list\",\"path\":\"/admin/reservations\",\"requiresLogin\":true,\"tableName\":\"reservation\",\"visibleRoles\":[\"admin\"]}],\"frontendMenus\":[{\"code\":\"book_catalog\",\"dataScope\":\"PUBLIC\",\"name\":\"图书目录\",\"pageCode\":\"book_catalog_page\",\"pageType\":\"\",\"path\":\"/books\",\"requiresLogin\":false,\"tableName\":\"\",\"visibleRoles\":[]},{\"code\":\"my_borrows\",\"dataScope\":\"CURRENT_USER\",\"name\":\"我的借阅\",\"pageCode\":\"my_borrows_page\",\"pageType\":\"\",\"path\":\"/my-borrows\",\"requiresLogin\":true,\"tableName\":\"\",\"visibleRoles\":[\"reader\"]},{\"code\":\"my_reservations\",\"dataScope\":\"CURRENT_USER\",\"name\":\"我的预约\",\"pageCode\":\"my_reservations_page\",\"pageType\":\"\",\"path\":\"/my-reservations\",\"requiresLogin\":true,\"tableName\":\"\",\"visibleRoles\":[\"reader\"]},{\"code\":\"my_fines\",\"dataScope\":\"CURRENT_USER\",\"name\":\"我的罚款\",\"pageCode\":\"my_fines_page\",\"pageType\":\"\",\"path\":\"/my-fines\",\"requiresLogin\":true,\"tableName\":\"\",\"visibleRoles\":[\"reader\"]},{\"code\":\"reader_profile\",\"dataScope\":\"CURRENT_USER\",\"name\":\"个人资料\",\"pageCode\":\"reader_profile_page\",\"pageType\":\"\",\"path\":\"/profile\",\"requiresLogin\":true,\"tableName\":\"\",\"visibleRoles\":[\"reader\"]}],\"frontendPages\":[{\"code\":\"book_catalog_page\",\"menuCode\":\"book_catalog\",\"name\":\"图书目录\",\"pageType\":\"list\",\"parentPageCode\":\"\",\"path\":\"/books\",\"tableName\":\"book_info\"},{\"code\":\"book_detail_page\",\"menuCode\":\"book_catalog\",\"name\":\"图书详情\",\"pageType\":\"detail\",\"parentPageCode\":\"\",\"path\":\"/books/:id\",\"tableName\":\"book_info\"},{\"code\":\"my_borrows_page\",\"menuCode\":\"my_borrows\",\"name\":\"我的借阅\",\"pageType\":\"current_user_list\",\"parentPageCode\":\"\",\"path\":\"/my-borrows\",\"tableName\":\"borrow_record\"},{\"code\":\"my_reservations_page\",\"menuCode\":\"my_reservations\",\"name\":\"我的预约\",\"pageType\":\"current_user_list\",\"parentPageCode\":\"\",\"path\":\"/my-reservations\",\"tableName\":\"reservation\"},{\"code\":\"my_fines_page\",\"menuCode\":\"my_fines\",\"name\":\"我的罚款\",\"pageType\":\"current_user_list\",\"parentPageCode\":\"\",\"path\":\"/my-fines\",\"tableName\":\"fine\"},{\"code\":\"reader_profile_page\",\"menuCode\":\"reader_profile\",\"name\":\"个人资料\",\"pageType\":\"form\",\"parentPageCode\":\"\",\"path\":\"/profile\",\"tableName\":\"reader\"}],\"roles\":[{\"code\":\"admin\",\"description\":\"系统管理员,负责图书管理、借阅审核、逾期处理等\",\"name\":\"管理员\"},{\"code\":\"reader\",\"description\":\"普通读者,可检索图书、借书、还书、预约等\",\"name\":\"读者\"}]},\"flowConfig\":{\"actions\":[{\"actor\":\"admin\",\"audit\":{\"timeField\":\"approve_time\",\"userField\":\"approve_user_id\"},\"button\":{\"confirm\":\"确认审核通过吗?\",\"order\":10,\"pageCode\":\"borrow_application_admin_page\",\"scope\":\"admin\",\"slot\":\"list.rowActions\",\"type\":\"primary\"},\"code\":\"approve\",\"effects\":[{\"amount\":\"1\",\"errorMessage\":\"图书库存不足\",\"field\":\"stock\",\"min\":\"0\",\"notFoundMessage\":\"图书不存在\",\"relationField\":\"book_id\",\"table\":\"book_info\",\"type\":\"decrease\",\"values\":{}}],\"from\":\"pending\",\"invalidStateMessage\":\"当前状态不能审核\",\"method\":\"POST\",\"name\":\"审核通过\",\"path\":\"/borrow-record/approve\",\"successMessage\":\"审核成功\",\"to\":\"borrowing\"},{\"actor\":\"admin\",\"audit\":{\"timeField\":\"reject_time\",\"userField\":\"reject_user_id\"},\"button\":{\"confirm\":\"确认拒绝该申请吗?\",\"order\":20,\"pageCode\":\"borrow_application_admin_page\",\"scope\":\"admin\",\"slot\":\"list.rowActions\",\"type\":\"danger\"},\"code\":\"reject\",\"effects\":[],\"from\":\"pending\",\"invalidStateMessage\":\"当前状态不能拒绝\",\"method\":\"POST\",\"name\":\"拒绝申请\",\"path\":\"/borrow-record/reject\",\"successMessage\":\"已拒绝\",\"to\":\"rejected\"},{\"actor\":\"admin\",\"button\":{\"confirm\":\"确认取消该申请吗?\",\"order\":30,\"pageCode\":\"borrow_application_admin_page\",\"scope\":\"admin\",\"slot\":\"list.rowActions\",\"type\":\"warning\"},\"code\":\"cancel\",\"effects\":[],\"from\":\"pending\",\"invalidStateMessage\":\"当前状态不能取消\",\"method\":\"POST\",\"name\":\"取消申请\",\"path\":\"/borrow-record/cancel\",\"successMessage\":\"已取消\",\"to\":\"cancelled\"},{\"actor\":\"reader\",\"button\":{\"confirm\":\"确认还书吗?\",\"order\":10,\"pageCode\":\"my_borrows_page\",\"scope\":\"reader\",\"slot\":\"list.rowActions\",\"type\":\"warning\"},\"code\":\"return\",\"effects\":[{\"amount\":\"1\",\"min\":\"0\",\"table\":\"fine\",\"type\":\"create_record\",\"values\":{\"reader_id\":\"record.reader_id\",\"amount\":\"0.00\",\"created_at\":\"now\",\"borrow_record_id\":\"record.id\",\"book_id\":\"record.book_id\",\"status\":\"unpaid\"}}],\"from\":\"borrowing\",\"invalidStateMessage\":\"当前状态不能还书\",\"method\":\"POST\",\"name\":\"还书\",\"path\":\"/borrow-record/return\",\"successMessage\":\"还书请求已提交,等待管理员确认\",\"to\":\"returning\"},{\"actor\":\"admin\",\"audit\":{\"timeField\":\"confirm_time\",\"userField\":\"confirm_user_id\"},\"button\":{\"confirm\":\"确认已收到还书?\",\"order\":10,\"pageCode\":\"borrow_record_admin_page\",\"scope\":\"admin\",\"slot\":\"list.rowActions\",\"type\":\"success\"},\"code\":\"confirm_return\",\"effects\":[{\"amount\":\"1\",\"errorMessage\":\"图书库存更新失败\",\"field\":\"stock\",\"min\":\"0\",\"notFoundMessage\":\"图书不存在\",\"relationField\":\"book_id\",\"table\":\"book_info\",\"type\":\"increase\",\"values\":{}}],\"from\":\"returning\",\"invalidStateMessage\":\"当前状态不能确认归还\",\"method\":\"POST\",\"name\":\"确认归还\",\"path\":\"/borrow-record/confirm-return\",\"successMessage\":\"归还确认成功\",\"to\":\"returned\"}],\"code\":\"borrow_record_flow\",\"mainTable\":\"borrow_record\",\"metrics\":[{\"aggregate\":\"count\",\"code\":\"total_books\",\"field\":\"id\",\"name\":\"总图书数\",\"table\":\"book_info\",\"unit\":\"册\"},{\"aggregate\":\"count\",\"code\":\"total_readers\",\"field\":\"id\",\"name\":\"总读者数\",\"table\":\"reader\",\"unit\":\"人\"},{\"aggregate\":\"count\",\"code\":\"current_borrowed\",\"field\":\"id\",\"name\":\"当前借阅中\",\"status\":\"borrowing\",\"table\":\"borrow_record\",\"unit\":\"条\"},{\"aggregate\":\"count\",\"code\":\"pending_applications\",\"field\":\"id\",\"name\":\"待审核申请\",\"status\":\"pending\",\"table\":\"borrow_record\",\"unit\":\"条\"}],\"name\":\"借阅记录流程\",\"notFoundMessage\":\"主记录不存在\",\"states\":[{\"code\":\"pending\",\"label\":\"待审核\"},{\"code\":\"borrowing\",\"label\":\"借阅中\"},{\"code\":\"returning\",\"label\":\"待确认归还\"},{\"code\":\"returned\",\"label\":\"已归还\"},{\"code\":\"cancelled\",\"label\":\"已取消\"},{\"code\":\"rejected\",\"label\":\"已拒绝\"}],\"statusField\":\"status\",\"version\":\"1.0\"},\"compiledFlowContract\":{\"acceptanceScenarios\":[],\"actions\":[{\"actor\":\"admin\",\"code\":\"approve\",\"name\":\"审核通过\",\"ownerObject\":\"borrow_record\",\"ownerTable\":\"borrow_record\",\"preconditions\":[],\"quantityEffects\":[{\"actionCode\":\"approve\",\"amount\":\"1\",\"effectType\":\"decrease\",\"objectCode\":\"book_info\",\"quantityField\":\"stock\",\"tableName\":\"book_info\"}],\"recordEffects\":[],\"required\":true,\"stateTransitions\":[{\"actionCode\":\"approve\",\"fromState\":\"pending\",\"toState\":\"borrowing\"}]},{\"actor\":\"admin\",\"code\":\"reject\",\"name\":\"拒绝申请\",\"ownerObject\":\"borrow_record\",\"ownerTable\":\"borrow_record\",\"preconditions\":[],\"quantityEffects\":[],\"recordEffects\":[],\"required\":true,\"stateTransitions\":[{\"actionCode\":\"reject\",\"fromState\":\"pending\",\"toState\":\"rejected\"}]},{\"actor\":\"admin\",\"code\":\"cancel\",\"name\":\"取消申请\",\"ownerObject\":\"borrow_record\",\"ownerTable\":\"borrow_record\",\"preconditions\":[],\"quantityEffects\":[],\"recordEffects\":[],\"required\":true,\"stateTransitions\":[{\"actionCode\":\"cancel\",\"fromState\":\"pending\",\"toState\":\"cancelled\"}]},{\"actor\":\"reader\",\"code\":\"return\",\"name\":\"还书\",\"ownerObject\":\"borrow_record\",\"ownerTable\":\"borrow_record\",\"preconditions\":[],\"quantityEffects\":[],\"recordEffects\":[],\"required\":true,\"stateTransitions\":[{\"actionCode\":\"return\",\"fromState\":\"borrowing\",\"toState\":\"returning\"}]},{\"actor\":\"admin\",\"code\":\"confirm_return\",\"name\":\"确认归还\",\"ownerObject\":\"borrow_record\",\"ownerTable\":\"borrow_record\",\"preconditions\":[],\"quantityEffects\":[{\"actionCode\":\"confirm_return\",\"amount\":\"1\",\"effectType\":\"increase\",\"objectCode\":\"book_info\",\"quantityField\":\"stock\",\"tableName\":\"book_info\"}],\"recordEffects\":[],\"required\":true,\"stateTransitions\":[{\"actionCode\":\"confirm_return\",\"fromState\":\"returning\",\"toState\":\"returned\"}]}],\"businessPolicies\":[],\"coreObjects\":[{\"code\":\"borrow_record\",\"name\":\"借阅记录流程\",\"objectType\":\"main\",\"tableName\":\"borrow_record\"},{\"code\":\"book_info\",\"name\":\"book_info\",\"objectType\":\"related\",\"tableName\":\"book_info\"},{\"code\":\"fine\",\"name\":\"fine\",\"objectType\":\"related\",\"tableName\":\"fine\"}],\"domainName\":\"借阅记录流程\",\"metrics\":[{\"aggregate\":\"count\",\"code\":\"total_books\",\"field\":\"id\",\"filters\":[],\"name\":\"总图书数\",\"relatedActionCodes\":[],\"required\":true,\"tableName\":\"book_info\",\"unit\":\"册\"},{\"aggregate\":\"count\",\"code\":\"total_readers\",\"field\":\"id\",\"filters\":[],\"name\":\"总读者数\",\"relatedActionCodes\":[],\"required\":true,\"tableName\":\"reader\",\"unit\":\"人\"},{\"aggregate\":\"count\",\"code\":\"current_borrowed\",\"field\":\"id\",\"filters\":[{\"field\":\"status\",\"operator\":\"eq\",\"values\":[\"borrowing\"]}],\"name\":\"当前借阅中\",\"relatedActionCodes\":[],\"required\":true,\"tableName\":\"borrow_record\",\"unit\":\"条\"},{\"aggregate\":\"count\",\"code\":\"pending_applications\",\"field\":\"id\",\"filters\":[{\"field\":\"status\",\"operator\":\"eq\",\"values\":[\"pending\"]}],\"name\":\"待审核申请\",\"relatedActionCodes\":[],\"required\":true,\"tableName\":\"borrow_record\",\"unit\":\"条\"}],\"pageBindings\":[{\"actionCode\":\"approve\",\"pageCode\":\"borrow_application_admin_page\",\"slot\":\"list.rowActions\",\"tableName\":\"borrow_record\",\"target\":\"admin\"},{\"actionCode\":\"reject\",\"pageCode\":\"borrow_application_admin_page\",\"slot\":\"list.rowActions\",\"tableName\":\"borrow_record\",\"target\":\"admin\"},{\"actionCode\":\"cancel\",\"pageCode\":\"borrow_application_admin_page\",\"slot\":\"list.rowActions\",\"tableName\":\"borrow_record\",\"target\":\"admin\"},{\"actionCode\":\"return\",\"pageCode\":\"my_borrows_page\",\"slot\":\"list.rowActions\",\"tableName\":\"borrow_record\",\"target\":\"reader\"},{\"actionCode\":\"confirm_return\",\"pageCode\":\"borrow_record_admin_page\",\"slot\":\"list.rowActions\",\"tableName\":\"borrow_record\",\"target\":\"admin\"}],\"quantityRules\":[{\"actionCode\":\"approve\",\"amount\":\"1\",\"effectType\":\"decrease\",\"objectCode\":\"book_info\",\"quantityField\":\"stock\",\"tableName\":\"book_info\"},{\"actionCode\":\"confirm_return\",\"amount\":\"1\",\"effectType\":\"increase\",\"objectCode\":\"book_info\",\"quantityField\":\"stock\",\"tableName\":\"book_info\"}],\"recordRules\":[],\"stateMachines\":[{\"objectCode\":\"borrow_record\",\"states\":[\"pending\",\"borrowing\",\"returning\",\"returned\",\"cancelled\",\"rejected\"],\"statusField\":\"status\",\"tableName\":\"borrow_record\",\"transitions\":[{\"actionCode\":\"approve\",\"fromState\":\"pending\",\"toState\":\"borrowing\"},{\"actionCode\":\"reject\",\"fromState\":\"pending\",\"toState\":\"rejected\"},{\"actionCode\":\"cancel\",\"fromState\":\"pending\",\"toState\":\"cancelled\"},{\"actionCode\":\"return\",\"fromState\":\"borrowing\",\"toState\":\"returning\"},{\"actionCode\":\"confirm_return\",\"fromState\":\"returning\",\"toState\":\"returned\"}]}]},\"canonicalTableRegistry\":[\"book_info\",\"borrow_record\",\"reservation\",\"fine\",\"reader\",\"borrow_application\"],\"limits\":{\"maxTables\":12,\"maxColumnsPerTable\":30}}', '{\n \"tables\": [\n {\n \"tableName\": \"book_info\",\n \"tableComment\": \"图书信息表\",\n \"adminMenuName\": \"图书管理\",\n \"operations\": {\n \"add\": true,\n \"edit\": true,\n \"remove\": true,\n \"removeType\": \"physical\",\n \"reason\": \"\"\n },\n \"columns\": [\n {\n \"columnName\": \"book_id\",\n \"columnLabel\": \"图书ID\",\n \"columnComment\": \"主键ID\",\n \"columnType\": \"bigint(20)\",\n \"isPk\": \"1\",\n \"isIncrement\": \"1\",\n \"isRequired\": \"1\",\n \"javaType\": \"Long\",\n \"htmlType\": \"input\"\n },\n {\n \"columnName\": \"isbn\",\n \"columnLabel\": \"ISBN\",\n \"columnComment\": \"国际标准书号\",\n \"columnType\": \"varchar(20)\",\n \"isPk\": \"0\",\n \"isIncrement\": \"0\",\n \"isRequired\": \"1\",\n \"javaType\": \"String\",\n \"htmlType\": \"input\"\n },\n {\n \"columnName\": \"title\",\n \"columnLabel\": \"书名\",\n \"columnComment\": \"图书名称\",\n \"columnType\": \"varchar(255)\",\n \"isPk\": \"0\",\n \"isIncrement\": \"0\",\n \"isRequired\": \"1\",\n \"javaType\": \"String\",\n \"htmlType\": \"input\"\n },\n {\n \"columnName\": \"author\",\n \"columnLabel\": \"作者\",\n \"columnComment\": \"图书作者\",\n \"columnType\": \"varchar(255)\",\n \"isPk\": \"0\",\n \"isIncrement\": \"0\",\n \"isRequired\": \"0\",\n \"javaType\": \"String\",\n \"htmlType\": \"input\"\n },\n {\n \"columnName\": \"publisher\",\n \"columnLabel\": \"出版社\",\n \"columnComment\": \"出版社名称\",\n \"columnType\": \"varchar(255)\",\n \"isPk\": \"0\",\n \"isIncrement\": \"0\",\n \"isRequired\": \"0\",\n \"javaType\": \"String\",\n \"htmlType\": \"input\"\n },\n {\n \"columnName\": \"publish_date\",\n \"columnLabel\": \"出版日期\",\n \"columnComment\": \"图书出版日期\",\n \"columnType\": \"date\",\n \"isPk\": \"0\",\n \"isIncrement\": \"0\",\n \"isRequired\": \"0\",\n \"javaType\": \"Date\",\n \"htmlType\": \"datetime\"\n },\n {\n \"columnName\": \"category\",\n \"columnLabel\": \"分类\",\n \"columnComment\": \"图书分类\",\n \"columnType\": \"varchar(50)\",\n \"isPk\": \"0\",\n \"isIncrement\": \"0\",\n \"isRequired\": \"0\",\n \"javaType\": \"String\",\n \"htmlType\": \"select\",\n \"dictType\": \"book_category\",\n \"dictOptions\": [\n {\"value\": \"literature\", \"label\": \"文学\"},\n {\"value\": \"science\", \"label\": \"科学\"},\n {\"value\": \"history\", \"label\": \"历史\"},\n {\"value\": \"technology\", \"label\": \"技术\"},\n {\"value\": \"art\", \"label\": \"艺术\"},\n {\"value\": \"other\", \"label\": \"其他\"}\n ]\n },\n {\n \"columnName\": \"description\",\n \"columnLabel\": \"简介\",\n \"columnComment\": \"图书内容简介\",\n \"columnType\": \"text\",\n \"isPk\": \"0\",\n \"isIncrement\": \"0\",\n \"isRequired\": \"0\",\n \"javaType\": \"String\",\n \"htmlType\": \"editor\"\n },\n {\n \"columnName\": \"cover_image\",\n \"columnLabel\": \"封面\",\n \"columnComment\": \"图书封面图片URL\",\n \"columnType\": \"varchar(255)\",\n \"isPk\": \"0\",\n \"isIncrement\": \"0\",\n \"isRequired\": \"0\",\n \"javaType\": \"String\",\n \"htmlType\": \"imageUpload\"\n },\n {\n \"columnName\": \"stock\",\n \"columnLabel\": \"库存数量\",\n \"columnComment\": \"当前可借库存\",\n \"columnType\": \"int(11)\",\n \"isPk\": \"0\",\n \"isIncrement\": \"0\",\n \"isRequired\": \"1\",\n \"javaType\": \"Integer\",\n \"htmlType\": \"input\"\n },\n {\n \"columnName\": \"total_stock\",\n \"columnLabel\": \"总库存\",\n \"columnComment\": \"馆藏总数量\",\n \"columnType\": \"int(11)\",\n \"isPk\": \"0\",\n \"isIncrement\": \"0\",\n \"isRequired\": \"1\",\n \"javaType\": \"Integer\",\n \"htmlType\": \"input\"\n },\n {\n \"columnName\": \"status\",\n \"columnLabel\": \"状态\",\n \"columnComment\": \"图书状态available-可借, unavailable-不可借, removed-下架\",\n \"columnType\": \"varchar(20)\",\n \"isPk\": \"0\",\n \"isIncrement\": \"0\",\n \"isRequired\": \"1\",\n \"javaType\": \"String\",\n \"htmlType\": \"select\",\n \"dictType\": \"book_status\",\n \"dictOptions\": [\n {\"value\": \"available\", \"label\": \"可借\"},\n {\"value\": \"unavailable\", \"label\": \"不可借\"},\n {\"value\": \"removed\", \"label\": \"下架\"}\n ]\n }\n ]\n },\n {\n \"tableName\": \"borrow_record\",\n \"tableComment\": \"借阅记录表\",\n \"adminMenuName\": \"借阅记录管理\",\n \"operations\": {\n \"add\": true,\n \"edit\": false,\n \"remove\": false,\n \"removeType\": \"physical\",\n \"reason\": \"\"\n },\n \"columns\": [\n {\n \"columnName\": \"record_id\",\n \"columnLabel\": \"记录ID\",\n \"columnComment\": \"主键ID\",\n \"columnType\": \"bigint(20)\",\n \"isPk\": \"1\",\n \"isIncrement\": \"1\",\n \"isRequired\": \"1\",\n \"javaType\": \"Long\",\n \"htmlType\": \"input\"\n },\n {\n \"columnName\": \"reader_id\",\n \"columnLabel\": \"读者\",\n \"columnComment\": \"借阅读者ID关联reader表\",\n \"columnType\": \"bigint(20)\",\n \"isPk\": \"0\",\n \"isIncrement\": \"0\",\n \"isRequired\": \"1\",\n \"javaType\": \"Long\",\n \"htmlType\": \"select\",\n \"dictType\": \"remote:reader:reader_id:nickname\"\n },\n {\n \"columnName\": \"book_id\",\n \"columnLabel\": \"图书\",\n \"columnComment\": \"借阅图书ID关联book_info表\",\n \"columnType\": \"bigint(20)\",\n \"isPk\": \"0\",\n \"isIncrement\": \"0\",\n \"isRequired\": \"1\",\n \"javaType\": \"Long\",\n \"htmlType\": \"select\",\n \"dictType\": \"remote:book_info:book_id:title\"\n },\n {\n \"columnName\": \"borrow_time\",\n \"columnLabel\": \"借书时间\",\n \"columnComment\": \"实际借书时间\",\n \"columnType\": \"datetime\",\n \"isPk\": \"0\",\n \"isIncrement\": \"0\",\n \"isRequired\": \"1\",\n \"javaType\": \"Date\",\n \"htmlType\": \"datetime\"\n },\n {\n \"columnName\": \"due_time\",\n \"columnLabel\": \"应还时间\",\n \"columnComment\": \"应归还日期\",\n \"columnType\": \"datetime\",\n \"isPk\": \"0\",\n \"isIncrement\": \"0\",\n \"isRequired\": \"1\",\n \"javaType\": \"Date\",\n \"htmlType\": \"datetime\"\n },\n {\n \"columnName\": \"return_time\",\n \"columnLabel\": \"实际还书时间\",\n \"columnComment\": \"读者归还时间\",\n \"columnType\": \"datetime\",\n \"isPk\": \"0\",\n \"isIncrement\": \"0\",\n \"isRequired\": \"0\",\n \"javaType\": \"Date\",\n \"htmlType\": \"datetime\"\n },\n {\n \"columnName\": \"status\",\n \"columnLabel\": \"状态\",\n \"columnComment\": \"借阅状态pending-待审核, borrowing-借阅中, returning-待确认归还, returned-已归还, cancelled-已取消, rejected-已拒绝\",\n \"columnType\": \"varchar(20)\",\n \"isPk\": \"0\",\n \"isIncrement\": \"0\",\n \"isRequired\": \"1\",\n \"javaType\": \"String\",\n \"htmlType\": \"select\",\n \"dictType\": \"borrow_record_status\",\n \"dictOptions\": [\n {\"value\": \"pending\", \"label\": \"待审核\"},\n {\"value\": \"borrowing\", \"label\": \"借阅中\"},\n {\"value\": \"returning\", \"label\": \"待确认归还\"},\n {\"value\": \"returned\", \"label\": \"已归还\"},\n {\"value\": \"cancelled\", \"label\": \"已取消\"},\n {\"value\": \"rejected\", \"label\": \"已拒绝\"}\n ]\n },\n {\n \"columnName\": \"approve_user_id\",\n \"columnLabel\": \"审核人\",\n \"columnComment\": \"审核通过的管理员ID关联admin表\",\n \"columnType\": \"bigint(20)\",\n \"isPk\": \"0\",\n \"isIncrement\": \"0\",\n \"isRequired\": \"0\",\n \"javaType\": \"Long\",\n \"htmlType\": \"select\",\n \"dictType\": \"remote:admin:admin_id:username\"\n },\n {\n \"columnName\": \"approve_time\",\n \"columnLabel\": \"审核时间\",\n \"columnComment\": \"管理员审核通过时间\",\n \"columnType\": \"datetime\",\n \"isPk\": \"0\",\n \"isIncrement\": \"0\",\n \"isRequired\": \"0\",\n \"javaType\": \"Date\",\n \"htmlType\": \"datetime\"\n },\n {\n \"columnName\": \"confirm_user_id\",\n \"columnLabel\": \"确认归还人\",\n \"columnComment\": \"确认归还的管理员ID关联admin表\",\n \"columnType\": \"bigint(20)\",\n \"isPk\": \"0\",\n \"isIncrement\": \"0\",\n \"isRequired\": \"0\",\n \"javaType\": \"Long\",\n \"htmlType\": \"select\",\n \"dictType\": \"remote:admin:admin_id:username\"\n },\n {\n \"columnName\": \"confirm_time\",\n \"columnLabel\": \"归还确认时间\",\n \"columnComment\": \"管理员确认归还时间\",\n \"columnType\": \"datetime\",\n \"isPk\": \"0\",\n \"isIncrement\": \"0\",\n \"isRequired\": \"0\",\n \"javaType\": \"Date\",\n \"htmlType\": \"datetime\"\n },\n {\n \"columnName\": \"created_at\",\n \"columnLabel\": \"创建时间\",\n \"columnComment\": \"记录创建时间(申请时间)\",\n \"columnType\": \"datetime\",\n \"isPk\": \"0\",\n \"isIncrement\": \"0\",\n \"isRequired\": \"1\",\n \"javaType\": \"Date\",\n \"htmlType\": \"datetime\"\n },\n {\n \"columnName\": \"updated_at\",\n \"columnLabel\": \"更新时间\",\n \"columnComment\": \"记录最后更新时间\",\n \"columnType\": \"datetime\",\n \"isPk\": \"0\",\n \"isIncrement\": \"0\",\n \"isRequired\": \"0\",\n \"javaType\": \"Date\",\n \"htmlType\": \"datetime\"\n }\n ]\n },\n {\n \"tableName\": \"reservation\",\n \"tableComment\": \"预约表\",\n \"adminMenuName\": \"预约管理\",\n \"operations\": {\n \"add\": true,\n \"edit\": false,\n \"remove\": false,\n \"removeType\": \"physical\",\n \"reason\": \"\"\n },\n \"columns\": [\n {\n \"columnName\": \"reservation_id\",\n \"columnLabel\": \"预约ID\",\n \"columnComment\": \"主键ID\",\n \"columnType\": \"bigint(20)\",\n \"isPk\": \"1\",\n \"isIncrement\": \"1\",\n \"isRequired\": \"1\",\n \"javaType\": \"Long\",\n \"htmlType\": \"input\"\n },\n {\n \"columnName\": \"reader_id\",\n \"columnLabel\": \"读者\",\n \"columnComment\": \"预约读者ID关联reader表\",\n \"columnType\": \"bigint(20)\",\n \"isPk\": \"0\",\n \"isIncrement\": \"0\",\n \"isRequired\": \"1\",\n \"javaType\": \"Long\",\n \"htmlType\": \"select\",\n \"dictType\": \"remote:reader:reader_id:nickname\"\n },\n {\n \"columnName\": \"book_id\",\n \"columnLabel\": \"图书\",\n \"columnComment\": \"预约图书ID关联book_info表\",\n \"columnType\": \"bigint(20)\",\n \"isPk\": \"0\",\n \"isIncrement\": \"0\",\n \"isRequired\": \"1\",\n \"javaType\": \"Long\",\n \"htmlType\": \"select\",\n \"dictType\": \"remote:book_info:book_id:title\"\n },\n {\n \"columnName\": \"reserve_time\",\n \"columnLabel\": \"预约时间\",\n \"columnComment\": \"读者预约时间\",\n \"columnType\": \"datetime\",\n \"isPk\": \"0\",\n \"isIncrement\": \"0\",\n \"isRequired\": \"1\",\n \"javaType\": \"Date\",\n \"htmlType\": \"datetime\"\n },\n {\n \"columnName\": \"status\",\n \"columnLabel\": \"状态\",\n \"columnComment\": \"预约状态waiting-等待中, fulfilled-已借出, cancelled-已取消, expired-已过期\",\n \"columnType\": \"varchar(20)\",\n \"isPk\": \"0\",\n \"isIncrement\": \"0\",\n \"isRequired\": \"1\",\n \"javaType\": \"String\",\n \"htmlType\": \"select\",\n \"dictType\": \"reservation_status\",\n \"dictOptions\": [\n {\"value\": \"waiting\", \"label\": \"等待中\"},\n {\"value\": \"fulfilled\", \"label\": \"已借出\"},\n {\"value\": \"cancelled\", \"label\": \"已取消\"},\n {\"value\": \"expired\", \"label\": \"已过期\"}\n ]\n },\n {\n \"columnName\": \"expire_time\",\n \"columnLabel\": \"过期时间\",\n \"columnComment\": \"预约自动过期时间\",\n \"columnType\": \"datetime\",\n \"isPk\": \"0\",\n \"isIncrement\": \"0\",\n \"isRequired\": \"0\",\n \"javaType\": \"Date\",\n \"htmlType\": \"datetime\"\n },\n {\n \"columnName\": \"fulfilled_record_id\",\n \"columnLabel\": \"关联借阅记录\",\n \"columnComment\": \"预约后实际借出的借阅记录ID关联borrow_record表\",\n \"columnType\": \"bigint(20)\",\n \"isPk\": \"0\",\n \"isIncrement\": \"0\",\n \"isRequired\": \"0\",\n \"javaType\": \"Long\",\n \"htmlType\": \"select\",\n \"dictType\": \"remote:borrow_record:record_id:record_id\"\n }\n ]\n },\n {\n \"tableName\": \"fine\",\n \"tableComment\": \"罚款表\",\n \"adminMenuName\": \"逾期费用管理\",\n \"operations\": {\n \"add\": true,\n \"edit\": false,\n \"remove\": false,\n \"removeType\": \"physical\",\n \"reason\": \"\"\n },\n \"columns\": [\n {\n \"columnName\": \"fine_id\",\n \"columnLabel\": \"罚款ID\",\n \"columnComment\": \"主键ID\",\n \"columnType\": \"bigint(20)\",\n \"isPk\": \"1\",\n \"isIncrement\": \"1\",\n \"isRequired\": \"1\",\n \"javaType\": \"Long\",\n \"htmlType\": \"input\"\n },\n {\n \"columnName\": \"reader_id\",\n \"columnLabel\": \"读者\",\n \"columnComment\": \"被罚款读者ID关联reader表\",\n \"columnType\": \"bigint(20)\",\n \"isPk\": \"0\",\n \"isIncrement\": \"0\",\n \"isRequired\": \"1\",\n \"javaType\": \"Long\",\n \"htmlType\": \"select\",\n \"dictType\": \"remote:reader:reader_id:nickname\"\n },\n {\n \"columnName\": \"book_id\",\n \"columnLabel\": \"图书\",\n \"columnComment\": \"关联图书ID关联book_info表\",\n \"columnType\": \"bigint(20)\",\n \"isPk\": \"0\",\n \"isIncrement\": \"0\",\n \"isRequired\": \"1\",\n \"javaType\": \"Long\",\n \"htmlType\": \"select\",\n \"dictType\": \"remote:book_info:book_id:title\"\n },\n {\n \"columnName\": \"borrow_record_id\",\n \"columnLabel\": \"借阅记录\",\n \"columnComment\": \"关联借阅记录ID关联borrow_record表\",\n \"columnType\": \"bigint(20)\",\n \"isPk\": \"0\",\n \"isIncrement\": \"0\",\n \"isRequired\": \"1\",\n \"javaType\": \"Long\",\n \"htmlType\": \"select\",\n \"dictType\": \"remote:borrow_record:record_id:record_id\"\n },\n {\n \"columnName\": \"overdue_days\",\n \"columnLabel\": \"逾期天数\",\n \"columnComment\": \"实际逾期天数\",\n \"columnType\": \"int(11)\",\n \"isPk\": \"0\",\n \"isIncrement\": \"0\",\n \"isRequired\": \"1\",\n \"javaType\": \"Integer\",\n \"htmlType\": \"input\"\n },\n {\n \"columnName\": \"amount\",\n \"columnLabel\": \"罚款金额\",\n \"columnComment\": \"需缴纳的罚款金额(元)\",\n \"columnType\": \"decimal(10,2)\",\n \"isPk\": \"0\",\n \"isIncrement\": \"0\",\n \"isRequired\": \"1\",\n \"javaType\": \"BigDecimal\",\n \"htmlType\": \"input\"\n },\n {\n \"columnName\": \"status\",\n \"columnLabel\": \"状态\",\n \"columnComment\": \"罚款状态unpaid-未支付, paid-已支付, waived-已免除\",\n \"columnType\": \"varchar(20)\",\n \"isPk\": \"0\",\n \"isIncrement\": \"0\",\n \"isRequired\": \"1\",\n \"javaType\": \"String\",\n \"htmlType\": \"select\",\n \"dictType\": \"fine_status\",\n \"dictOptions\": [\n {\"value\": \"unpaid\", \"label\": \"未支付\"},\n {\"value\": \"paid\", \"label\": \"已支付\"},\n {\"value\": \"waived\", \"label\": \"已免除\"}\n ]\n },\n {\n \"columnName\": \"create_time\",\n \"columnLabel\": \"创建时间\",\n \"columnComment\": \"罚款记录生成时间\",\n \"columnType\": \"datetime\",\n \"isPk\": \"0\",\n \"isIncrement\": \"0\",\n \"isRequired\": \"1\",\n \"javaType\": \"Date\",\n \"htmlType\": \"datetime\"\n },\n {\n \"columnName\": \"pay_time\",\n \"columnLabel\": \"支付时间\",\n \"columnComment\": \"读者支付罚款时间\",\n \"columnType\": \"datetime\",\n \"isPk\": \"0\",\n \"isIncrement\": \"0\",\n \"isRequired\": \"0\",\n \"javaType\": \"Date\",\n \"htmlType\": \"datetime\"\n }\n ]\n },\n {\n \"tableName\": \"reader\",\n \"tableComment\": \"读者信息表\",\n \"adminMenuName\": \"读者管理\",\n \"operations\": {\n \"add\": true,\n \"edit\": true,\n \"remove\": true,\n \"removeType\": \"physical\",\n \"reason\": \"\"\n },\n \"columns\": [\n {\n \"columnName\": \"reader_id\",\n \"columnLabel\": \"读者ID\",\n \"columnComment\": \"主键ID\",\n \"columnType\": \"bigint(20)\",\n \"isPk\": \"1\",\n \"isIncrement\": \"1\",\n \"isRequired\": \"1\",\n \"javaType\": \"Long\",\n \"htmlType\": \"input\"\n },\n {\n \"columnName\": \"username\",\n \"columnLabel\": \"用户名\",\n \"columnComment\": \"登录用户名\",\n \"columnType\": \"varchar(50)\",\n \"isPk\": \"0\",\n \"isIncrement\": \"0\",\n \"isRequired\": \"1\",\n \"javaType\": \"String\",\n \"htmlType\": \"input\"\n },\n {\n \"columnName\": \"password_hash\",\n \"columnLabel\": \"密码哈希\",\n \"columnComment\": \"加密后的密码\",\n \"columnType\": \"varchar(255)\",\n \"isPk\": \"0\",\n \"isIncrement\": \"0\",\n \"isRequired\": \"1\",\n \"javaType\": \"String\",\n \"htmlType\": \"input\"\n },\n {\n \"columnName\": \"nickname\",\n \"columnLabel\": \"昵称\",\n \"columnComment\": \"读者昵称/显示名\",\n \"columnType\": \"varchar(50)\",\n \"isPk\": \"0\",\n \"isIncrement\": \"0\",\n \"isRequired\": \"0\",\n \"javaType\": \"String\",\n \"htmlType\": \"input\"\n },\n {\n \"columnName\": \"status\",\n \"columnLabel\": \"状态\",\n \"columnComment\": \"读者账号状态active-正常, inactive-停用, locked-锁定\",\n \"columnType\": \"varchar(20)\",\n \"isPk\": \"0\",\n \"isIncrement\": \"0\",\n \"isRequired\": \"1\",\n \"javaType\": \"String\",\n \"htmlType\": \"select\",\n \"dictType\": \"reader_status\",\n \"dictOptions\": [\n {\"value\": \"active\", \"label\": \"正常\"},\n {\"value\": \"inactive\", \"label\": \"停用\"},\n {\"value\": \"locked\", \"label\": \"锁定\"}\n ]\n },\n {\n \"columnName\": \"create_time\",\n \"columnLabel\": \"创建时间\",\n \"columnComment\": \"账号创建时间\",\n \"columnType\": \"datetime\",\n \"isPk\": \"0\",\n \"isIncrement\": \"0\",\n \"isRequired\": \"1\",\n \"javaType\": \"Date\",\n \"htmlType\": \"datetime\"\n },\n {\n \"columnName\": \"real_name\",\n \"columnLabel\": \"真实姓名\",\n \"columnComment\": \"读者真实姓名\",\n \"columnType\": \"varchar(50)\",\n \"isPk\": \"0\",\n \"isIncrement\": \"0\",\n \"isRequired\": \"0\",\n \"javaType\": \"String\",\n \"htmlType\": \"input\"\n },\n {\n \"columnName\": \"student_id\",\n \"columnLabel\": \"学号\",\n \"columnComment\": \"读者学号/工号\",\n \"columnType\": \"varchar(20)\",\n \"isPk\": \"0\",\n \"isIncrement\": \"0\",\n \"isRequired\": \"0\",\n \"javaType\": \"String\",\n \"htmlType\": \"input\"\n },\n {\n \"columnName\": \"phone\",\n \"columnLabel\": \"手机号\",\n \"columnComment\": \"联系手机号码\",\n \"columnType\": \"varchar(20)\",\n \"isPk\": \"0\",\n \"isIncrement\": \"0\",\n \"isRequired\": \"0\",\n \"javaType\": \"String\",\n \"htmlType\": \"input\"\n },\n {\n \"columnName\": \"email\",\n \"columnLabel\": \"邮箱\",\n \"columnComment\": \"电子邮箱地址\",\n \"columnType\": \"varchar(100)\",\n \"isPk\": \"0\",\n \"isIncrement\": \"0\",\n \"isRequired\": \"0\",\n \"javaType\": \"String\",\n \"htmlType\": \"input\"\n },\n {\n \"columnName\": \"gender\",\n \"columnLabel\": \"性别\",\n \"columnComment\": \"读者性别\",\n \"columnType\": \"varchar(10)\",\n \"isPk\": \"0\",\n \"isIncrement\": \"0\",\n \"isRequired\": \"0\",\n \"javaType\": \"String\",\n \"htmlType\": \"select\",\n \"dictType\": \"gender\",\n \"dictOptions\": [\n {\"value\": \"male\", \"label\": \"男\"},\n {\"value\": \"female\", \"label\": \"女\"}\n ]\n },\n {\n \"columnName\": \"avatar\",\n \"columnLabel\": \"头像\",\n \"columnComment\": \"读者头像图片URL\",\n \"columnType\": \"varchar(255)\",\n \"isPk\": \"0\",\n \"isIncrement\": \"0\",\n \"isRequired\": \"0\",\n \"javaType\": \"String\",\n \"htmlType\": \"imageUpload\"\n },\n {\n \"columnName\": \"borrowed_count\",\n \"columnLabel\": \"当前借阅数\",\n \"columnComment\": \"当前正在借阅的图书数量\",\n \"columnType\": \"int(11)\",\n \"isPk\": \"0\",\n \"isIncrement\": \"0\",\n \"isRequired\": \"0\",\n \"javaType\": \"Integer\",\n \"htmlType\": \"input\"\n }\n ]\n },\n {\n \"tableName\": \"borrow_application\",\n \"tableComment\": \"借书申请表\",\n \"adminMenuName\": \"借书申请管理\",\n \"operations\": {\n \"add\": true,\n \"edit\": false,\n \"remove\": false,\n \"removeType\": \"physical\",\n \"reason\": \"\"\n },\n \"columns\": [\n {\n \"columnName\": \"application_id\",\n \"columnLabel\": \"申请ID\",\n \"columnComment\": \"主键ID\",\n \"columnType\": \"bigint(20)\",\n \"isPk\": \"1\",\n \"isIncrement\": \"1\",\n \"isRequired\": \"1\",\n \"javaType\": \"Long\",\n \"htmlType\": \"input\"\n },\n {\n \"columnName\": \"reader_id\",\n \"columnLabel\": \"读者\",\n \"columnComment\": \"申请读者ID关联reader表\",\n \"columnType\": \"bigint(20)\",\n \"isPk\": \"0\",\n \"isIncrement\": \"0\",\n \"isRequired\": \"1\",\n \"javaType\": \"Long\",\n \"htmlType\": \"select\",\n \"dictType\": \"remote:reader:reader_id:nickname\"\n },\n {\n \"columnName\": \"book_id\",\n \"columnLabel\": \"图书\",\n \"columnComment\": \"申请图书ID关联book_info表\",\n \"columnType\": \"bigint(20)\",\n \"isPk\": \"0\",\n \"isIncrement\": \"0\",\n \"isRequired\": \"1\",\n \"javaType\": \"Long\",\n \"htmlType\": \"select\",\n \"dictType\": \"remote:book_info:book_id:title\"\n },\n {\n \"columnName\": \"apply_time\",\n \"columnLabel\": \"申请时间\",\n \"columnComment\": \"读者提交申请时间\",\n \"columnType\": \"datetime\",\n \"isPk\": \"0\",\n \"isIncrement\": \"0\",\n \"isRequired\": \"1\",\n \"javaType\": \"Date\",\n \"htmlType\": \"datetime\"\n },\n {\n \"columnName\": \"status\",\n \"columnLabel\": \"状态\",\n \"columnComment\": \"申请状态pending-待审核, approved-已通过, rejected-已拒绝, cancelled-已取消\",\n \"columnType\": \"varchar(20)\",\n \"isPk\": \"0\",\n \"isIncrement\": \"0\",\n \"isRequired\": \"1\",\n \"javaType\": \"String\",\n \"htmlType\": \"select\",\n \"dictType\": \"borrow_application_status\",\n \"dictOptions\": [\n {\"value\": \"pending\", \"label\": \"待审核\"},\n {\"value\": \"approved\", \"label\": \"已通过\"},\n {\"value\": \"rejected\", \"label\": \"已拒绝\"},\n {\"value\": \"cancelled\", \"label\": \"已取消\"}\n ]\n },\n {\n \"columnName\": \"approve_user_id\",\n \"columnLabel\": \"审批人\",\n \"columnComment\": \"审批管理员ID关联admin表\",\n \"columnType\": \"bigint(20)\",\n \"isPk\": \"0\",\n \"isIncrement\": \"0\",\n \"isRequired\": \"0\",\n \"javaType\": \"Long\",\n \"htmlType\": \"select\",\n \"dictType\": \"remote:admin:admin_id:username\"\n },\n {\n \"columnName\": \"approve_time\",\n \"columnLabel\": \"审批时间\",\n \"columnComment\": \"管理员审批时间\",\n \"columnType\": \"datetime\",\n \"isPk\": \"0\",\n \"isIncrement\": \"0\",\n \"isRequired\": \"0\",\n \"javaType\": \"Date\",\n \"htmlType\": \"datetime\"\n },\n {\n \"columnName\": \"reject_reason\",\n \"columnLabel\": \"拒绝原因\",\n \"columnComment\": \"管理员拒绝申请的原因\",\n \"columnType\": \"varchar(255)\",\n \"isPk\": \"0\",\n \"isIncrement\": \"0\",\n \"isRequired\": \"0\",\n \"javaType\": \"String\",\n \"htmlType\": \"textarea\"\n }\n ]\n },\n {\n \"tableName\": \"admin\",\n \"tableComment\": \"管理员账号表\",\n \"adminMenuName\": \"管理员管理\",\n \"operations\": {\n \"add\": true,\n \"edit\": true,\n \"remove\": true,\n \"removeType\": \"physical\",\n \"reason\": \"\"\n },\n \"columns\": [\n {\n \"columnName\": \"admin_id\",\n \"columnLabel\": \"管理员ID\",\n \"columnComment\": \"主键ID\",\n \"columnType\": \"bigint(20)\",\n \"isPk\": \"1\",\n \"isIncrement\": \"1\",\n \"isRequired\": \"1\",\n \"javaType\": \"Long\",\n \"htmlType\": \"input\"\n },\n {\n \"columnName\": \"username\",\n \"columnLabel\": \"用户名\",\n \"columnComment\": \"登录用户名\",\n \"columnType\": \"varchar(50)\",\n \"isPk\": \"0\",\n \"isIncrement\": \"0\",\n \"isRequired\": \"1\",\n \"javaType\": \"String\",\n \"htmlType\": \"input\"\n },\n {\n \"columnName\": \"password_hash\",\n \"columnLabel\": \"密码哈希\",\n \"columnComment\": \"加密后的密码\",\n \"columnType\": \"varchar(255)\",\n \"isPk\": \"0\",\n \"isIncrement\": \"0\",\n \"isRequired\": \"1\",\n \"javaType\": \"String\",\n \"htmlType\": \"input\"\n },\n {\n \"columnName\": \"nickname\",\n \"columnLabel\": \"昵称\",\n \"columnComment\": \"管理员显示名称\",\n \"columnType\": \"varchar(50)\",\n \"isPk\": \"0\",\n \"isIncrement\": \"0\",\n \"isRequired\": \"0\",\n \"javaType\": \"String\",\n \"htmlType\": \"input\"\n },\n {\n \"columnName\": \"status\",\n \"columnLabel\": \"状态\",\n \"columnComment\": \"管理员账号状态active-正常, inactive-停用\",\n \"columnType\": \"varchar(20)\",\n \"isPk\": \"0\",\n \"isIncrement\": \"0\",\n \"isRequired\": \"1\",\n \"javaType\": \"String\",\n \"htmlType\": \"select\",\n \"dictType\": \"admin_status\",\n \"dictOptions\": [\n {\"value\": \"active\", \"label\": \"正常\"},\n {\"value\": \"inactive\", \"label\": \"停用\"}\n ]\n },\n {\n \"columnName\": \"create_time\",\n \"columnLabel\": \"创建时间\",\n \"columnComment\": \"账号创建时间\",\n \"columnType\": \"datetime\",\n \"isPk\": \"0\",\n \"isIncrement\": \"0\",\n \"isRequired\": \"1\",\n \"javaType\": \"Date\",\n \"htmlType\": \"datetime\"\n }\n ]\n }\n ]\n}', '0', 88895, 4585, 1024, 3561, 12177, 4836, 4585, 12177, 16762, 3, 0.02793548, '1', NULL, '2026-07-14 16:22:55');
INSERT INTO `front_ai_usage_ledger` VALUES (120, 103, 103, 103, 100, 'database', 'deepseek', 'deepseek-v4-flash', 'front.database', 'V1', '14dcad479b01de068e5c5bc39b5cd7a591a09d334ee6812483d8ac00dd8c9d61', '你是 MySQL 业务数据库设计专家。只输出符合用户消息结构的 JSON根据已确认的应用蓝图和业务闭环生成可直接落地的表、字段、主外键、字典和表操作策略。字段必须业务化且类型合法所有蓝图与闭环引用必须有真实表字段承载不得生成菜单、权限关系、代码或业务动作。', '根据项目输入 JSON 生成 MySQL 数据库设计 JSON只返回 JSON不要 Markdown 围栏或解释。\nConfirmed app blueprint JSON and Confirmed business loop plan JSON are supplied in the input.\nDatabase generation constraints from the business loop plan must be enforced.\nEvery confirmedBusinessLoopPlan.metrics tableName, field, and filters.field must exist in the generated schema. Numeric sum/avg/min/max metric fields must use a compatible numeric column type. Status-filter metric values must remain compatible with the matching stateMachines.states.\nIf input.mode is correction, repair input.originalResponse according to input.validationError and return the complete corrected database JSON. Do not drop unrelated valid tables or fields.\n输出结构{\"tables\":[{\"tableName\":\"car_info\",\"tableComment\":\"车辆信息表\",\"adminMenuName\":\"车辆管理\",\"operations\":{\"add\":true,\"edit\":true,\"remove\":true,\"removeType\":\"physical\",\"reason\":\"\"},\"columns\":[{\"columnName\":\"id\",\"columnLabel\":\"ID\",\"columnComment\":\"主键ID\",\"columnType\":\"bigint(20)\",\"isPk\":\"1\",\"isIncrement\":\"1\",\"isRequired\":\"1\"}]}]}。\n不要使用 field_1 等占位字段;每个表必须包含非空 columns以及 adminMenuName 和 operations.add/edit/remove/removeType/reason。\nadminMenuName 必须来自本表 tableComment/tableName不得复用其他表或宽泛模块名称。\nadminMenuName must come from that table\'s own tableComment or tableName.\n字段数组名称只能是 columns不能使用 fields、fieldDesign、fieldList、columnList。\nEvery table must include a non-empty columns array; use columns exactly.\n每个字段必须包含 columnName、columnLabel、columnComment、columnType、isPk、isIncrement、isRequired。columnLabel 是短 UI 标签columnComment 是完整数据库说明。\n可提供 javaType、htmlTypehtmlType 只能是 input、textarea、select、radio、checkbox、datetime、imageUpload、fileUpload、editor。\nselect/radio/checkbox 应提供 dictType 和 dictOptions。关联选择使用 remote:target_table:value_field:label_field且目标表和值/标签字段必须都存在于本次 tables JSON。\n非主键外键字段应在目标表存在时使用 remote select无目标表的分类、类型、状态使用本地 dictOptions 或普通输入。\n普通主数据表除唯一主键外至少包含 4 个业务字段。\n订单、支付、借还、审批、流程、任务、库存记录等动作记录表使用仅新增关系、审计、日志、历史表使用只读普通主数据表使用完整 CRUD。\n不要生成 businessActions、业务动作、工作流、代码、菜单表、user_role、角色权限表或权限表。\nDo not generate menu tables, user_role tables, role-permission tables, or permission tables.\n表名字段名只使用小写字母、数字、下划线每表必须且只能有一个主键。字段类型只能使用 bigint(20)、int(11)、varchar(n)、char(n)、decimal(p,s)、datetime、date、text、longtext。\n为 confirmedAppBlueprint.roles 中每个角色创建独立账号表admin 使用 admin其他角色使用 role.code。不得使用共享用户表或 role_id/role_code/user_role。\n角色账号表包含 `<role_code>_id` 自增主键、username、password_hash、nickname、status、create_time。admin 只能登录后台,非 admin 角色登录前台。\n生成 frontendPages.tableName 引用的全部表;个人资料页必须绑定对应非 admin 角色账号表。requiresLogin=true 且 dataScope=CURRENT_USER 的业务数据通常包含 user_id。\ncanonicalTableRegistry 中的名称是最终规范表名。confirmedBusinessLoopPlan 若出现与其指向同一业务对象的同义表名,必须使用 canonicalTableRegistry 中的名称,不得同时生成两张同义表。\n根据 confirmedBusinessLoopPlan 创建 coreObjects.tableName、actions.ownerTable补齐 stateMachines.statusField、quantityRules.quantityField 以及 recordRules 和动作前置条件需要的字段。状态值不得超出 stateMachines.states。\n严格实现 confirmedBusinessLoopPlan.businessPoliciesTIME_LIMIT 的 startField、dueField 使用 datetimeOVERDUE_FEE 的 dueField 使用 datetime、daysTargetField 使用 int(11)、targetField 使用 decimal(10,2)QUANTITY_LIMIT 的 targetField 使用 int(11) 且默认值为 0。所有政策字段必须位于政策指定的 tableName禁止只把期限或公式写进 columnComment 而不创建字段。\nDo not invent status values outside stateMachines.states.\n严格遵守 input.limits.maxTables 和 maxColumnsPerTable。\n项目输入 JSON\n{\"industryTemplate\":\"\",\"canonicalTableRegistry\":[\"book_info\",\"borrow_record\",\"reservation\",\"fine\",\"reader\",\"borrow_application\"],\"validationError\":\"Business loop plan does not match current database: Missing business metric field: book_info.id\",\"compiledFlowContract\":{\"acceptanceScenarios\":[],\"actions\":[{\"actor\":\"admin\",\"code\":\"approve\",\"name\":\"审核通过\",\"ownerObject\":\"borrow_record\",\"ownerTable\":\"borrow_record\",\"preconditions\":[],\"quantityEffects\":[{\"actionCode\":\"approve\",\"amount\":\"1\",\"effectType\":\"decrease\",\"objectCode\":\"book_info\",\"quantityField\":\"stock\",\"tableName\":\"book_info\"}],\"recordEffects\":[],\"required\":true,\"stateTransitions\":[{\"actionCode\":\"approve\",\"fromState\":\"pending\",\"toState\":\"borrowing\"}]},{\"actor\":\"admin\",\"code\":\"reject\",\"name\":\"拒绝申请\",\"ownerObject\":\"borrow_record\",\"ownerTable\":\"borrow_record\",\"preconditions\":[],\"quantityEffects\":[],\"recordEffects\":[],\"required\":true,\"stateTransitions\":[{\"actionCode\":\"reject\",\"fromState\":\"pending\",\"toState\":\"rejected\"}]},{\"actor\":\"admin\",\"code\":\"cancel\",\"name\":\"取消申请\",\"ownerObject\":\"borrow_record\",\"ownerTable\":\"borrow_record\",\"preconditions\":[],\"quantityEffects\":[],\"recordEffects\":[],\"required\":true,\"stateTransitions\":[{\"actionCode\":\"cancel\",\"fromState\":\"pending\",\"toState\":\"cancelled\"}]},{\"actor\":\"reader\",\"code\":\"return\",\"name\":\"还书\",\"ownerObject\":\"borrow_record\",\"ownerTable\":\"borrow_record\",\"preconditions\":[],\"quantityEffects\":[],\"recordEffects\":[],\"required\":true,\"stateTransitions\":[{\"actionCode\":\"return\",\"fromState\":\"borrowing\",\"toState\":\"returning\"}]},{\"actor\":\"admin\",\"code\":\"confirm_return\",\"name\":\"确认归还\",\"ownerObject\":\"borrow_record\",\"ownerTable\":\"borrow_record\",\"preconditions\":[],\"quantityEffects\":[{\"actionCode\":\"confirm_return\",\"amount\":\"1\",\"effectType\":\"increase\",\"objectCode\":\"book_info\",\"quantityField\":\"stock\",\"tableName\":\"book_info\"}],\"recordEffects\":[],\"required\":true,\"stateTransitions\":[{\"actionCode\":\"confirm_return\",\"fromState\":\"returning\",\"toState\":\"returned\"}]}],\"businessPolicies\":[],\"coreObjects\":[{\"code\":\"borrow_record\",\"name\":\"借阅记录流程\",\"objectType\":\"main\",\"tableName\":\"borrow_record\"},{\"code\":\"book_info\",\"name\":\"book_info\",\"objectType\":\"related\",\"tableName\":\"book_info\"},{\"code\":\"fine\",\"name\":\"fine\",\"objectType\":\"related\",\"tableName\":\"fine\"}],\"domainName\":\"借阅记录流程\",\"metrics\":[{\"aggregate\":\"count\",\"code\":\"total_books\",\"field\":\"id\",\"filters\":[],\"name\":\"总图书数\",\"relatedActionCodes\":[],\"required\":true,\"tableName\":\"book_info\",\"unit\":\"册\"},{\"aggregate\":\"count\",\"code\":\"total_readers\",\"field\":\"id\",\"filters\":[],\"name\":\"总读者数\",\"relatedActionCodes\":[],\"required\":true,\"tableName\":\"reader\",\"unit\":\"人\"},{\"aggregate\":\"count\",\"code\":\"current_borrowed\",\"field\":\"id\",\"filters\":[{\"field\":\"status\",\"operator\":\"eq\",\"values\":[\"borrowing\"]}],\"name\":\"当前借阅中\",\"relatedActionCodes\":[],\"required\":true,\"tableName\":\"borrow_record\",\"unit\":\"条\"},{\"aggregate\":\"count\",\"code\":\"pending_applications\",\"field\":\"id\",\"filters\":[{\"field\":\"status\",\"operator\":\"eq\",\"values\":[\"pending\"]}],\"name\":\"待审核申请\",\"relatedActionCodes\":[],\"required\":true,\"tableName\":\"borrow_record\",\"unit\":\"条\"}],\"pageBindings\":[{\"actionCode\":\"approve\",\"pageCode\":\"borrow_application_admin_page\",\"slot\":\"list.rowActions\",\"tableName\":\"borrow_record\",\"target\":\"admin\"},{\"actionCode\":\"reject\",\"pageCode\":\"borrow_application_admin_page\",\"slot\":\"list.rowActions\",\"tableName\":\"borrow_record\",\"target\":\"admin\"},{\"actionCode\":\"cancel\",\"pageCode\":\"borrow_application_admin_page\",\"slot\":\"list.rowActions\",\"tableName\":\"borrow_record\",\"target\":\"admin\"},{\"actionCode\":\"return\",\"pageCode\":\"my_borrows_page\",\"slot\":\"list.rowActions\",\"tableName\":\"borrow_record\",\"target\":\"reader\"},{\"actionCode\":\"confirm_return\",\"pageCode\":\"borrow_record_admin_page\",\"slot\":\"list.rowActions\",\"tableName\":\"borrow_record\",\"target\":\"admin\"}],\"quantityRules\":[{\"actionCode\":\"approve\",\"amount\":\"1\",\"effectType\":\"decrease\",\"objectCode\":\"book_info\",\"quantityField\":\"stock\",\"tableName\":\"book_info\"},{\"actionCode\":\"confirm_return\",\"amount\":\"1\",\"effectType\":\"increase\",\"objectCode\":\"book_info\",\"quantityField\":\"stock\",\"tableName\":\"book_info\"}],\"recordRules\":[],\"stateMachines\":[{\"objectCode\":\"borrow_record\",\"states\":[\"pending\",\"borrowing\",\"returning\",\"returned\",\"cancelled\",\"rejected\"],\"statusField\":\"status\",\"tableName\":\"borrow_record\",\"transitions\":[{\"actionCode\":\"approve\",\"fromState\":\"pending\",\"toState\":\"borrowing\"},{\"actionCode\":\"reject\",\"fromState\":\"pending\",\"toState\":\"rejected\"},{\"actionCode\":\"cancel\",\"fromState\":\"pending\",\"toState\":\"cancelled\"},{\"actionCode\":\"return\",\"fromState\":\"borrowing\",\"toState\":\"returning\"},{\"actionCode\":\"confirm_return\",\"fromState\":\"returning\",\"toState\":\"returned\"}]}]},\"mode\":\"correction\",\"confirmedAppBlueprint\":{\"adminHomeDashboard\":{\"charts\":[{\"code\":\"borrow_trend\",\"filters\":[],\"metrics\":[],\"semantic\":\"order\",\"type\":\"line\"},{\"code\":\"book_category_distribution\",\"filters\":[],\"metrics\":[],\"semantic\":\"content\",\"type\":\"pie\"}],\"description\":\"核心业务数据\",\"metrics\":[{\"code\":\"total_books\",\"field\":\"count\",\"filters\":[],\"semantic\":\"inventory\"},{\"code\":\"total_readers\",\"field\":\"count\",\"filters\":[],\"semantic\":\"user\"},{\"code\":\"current_borrowed\",\"field\":\"count\",\"filters\":[],\"semantic\":\"order\"},{\"code\":\"pending_applications\",\"field\":\"count\",\"filters\":[],\"semantic\":\"task\"}],\"title\":\"运营总览\"},\"adminMenus\":[{\"code\":\"book_admin\",\"dataScope\":\"ROLE\",\"name\":\"图书管理\",\"pageCode\":\"book_admin_page\",\"pageType\":\"list\",\"path\":\"/admin/books\",\"requiresLogin\":true,\"tableName\":\"book_info\",\"visibleRoles\":[\"admin\"]},{\"code\":\"reader_admin\",\"dataScope\":\"ROLE\",\"name\":\"读者管理\",\"pageCode\":\"reader_admin_page\",\"pageType\":\"list\",\"path\":\"/admin/readers\",\"requiresLogin\":true,\"tableName\":\"reader\",\"visibleRoles\":[\"admin\"]},{\"code\":\"borrow_application_admin\",\"dataScope\":\"ROLE\",\"name\":\"借书申请管理\",\"pageCode\":\"borrow_application_admin_page\",\"pageType\":\"list\",\"path\":\"/admin/borrow-applications\",\"requiresLogin\":true,\"tableName\":\"borrow_application\",\"visibleRoles\":[\"admin\"]},{\"code\":\"borrow_record_admin\",\"dataScope\":\"ROLE\",\"name\":\"借阅记录管理\",\"pageCode\":\"borrow_record_admin_page\",\"pageType\":\"list\",\"path\":\"/admin/borrow-records\",\"requiresLogin\":true,\"tableName\":\"borrow_record\",\"visibleRoles\":[\"admin\"]},{\"code\":\"fine_admin\",\"dataScope\":\"ROLE\",\"name\":\"逾期费用管理\",\"pageCode\":\"fine_admin_page\",\"pageType\":\"list\",\"path\":\"/admin/fines\",\"requiresLogin\":true,\"tableName\":\"fine\",\"visibleRoles\":[\"admin\"]},{\"code\":\"reservation_admin\",\"dataScope\":\"ROLE\",\"name\":\"预约管理\",\"pageCode\":\"reservation_admin_page\",\"pageType\":\"list\",\"path\":\"/admin/reservations\",\"requiresLogin\":true,\"tableName\":\"reservation\",\"visibleRoles\":[\"admin\"]}],\"frontendMenus\":[{\"code\":\"book_catalog\",\"dataScope\":\"PUBLIC\",\"name\":\"图书目录\",\"pageCode\":\"book_catalog_page\",\"pageType\":\"\",\"path\":\"/books\",\"requiresLogin\":false,\"tableName\":\"\",\"visibleRoles\":[]},{\"code\":\"my_borrows\",\"dataScope\":\"CURRENT_USER\",\"name\":\"我的借阅\",\"pageCode\":\"my_borrows_page\",\"pageType\":\"\",\"path\":\"/my-borrows\",\"requiresLogin\":true,\"tableName\":\"\",\"visibleRoles\":[\"reader\"]},{\"code\":\"my_reservations\",\"dataScope\":\"CURRENT_USER\",\"name\":\"我的预约\",\"pageCode\":\"my_reservations_page\",\"pageType\":\"\",\"path\":\"/my-reservations\",\"requiresLogin\":true,\"tableName\":\"\",\"visibleRoles\":[\"reader\"]},{\"code\":\"my_fines\",\"dataScope\":\"CURRENT_USER\",\"name\":\"我的罚款\",\"pageCode\":\"my_fines_page\",\"pageType\":\"\",\"path\":\"/my-fines\",\"requiresLogin\":true,\"tableName\":\"\",\"visibleRoles\":[\"reader\"]},{\"code\":\"reader_profile\",\"dataScope\":\"CURRENT_USER\",\"name\":\"个人资料\",\"pageCode\":\"reader_profile_page\",\"pageType\":\"\",\"path\":\"/profile\",\"requiresLogin\":true,\"tableName\":\"\",\"visibleRoles\":[\"reader\"]}],\"frontendPages\":[{\"code\":\"book_catalog_page\",\"menuCode\":\"book_catalog\",\"name\":\"图书目录\",\"pageType\":\"list\",\"parentPageCode\":\"\",\"path\":\"/books\",\"tableName\":\"book_info\"},{\"code\":\"book_detail_page\",\"menuCode\":\"book_catalog\",\"name\":\"图书详情\",\"pageType\":\"detail\",\"parentPageCode\":\"\",\"path\":\"/books/:id\",\"tableName\":\"book_info\"},{\"code\":\"my_borrows_page\",\"menuCode\":\"my_borrows\",\"name\":\"我的借阅\",\"pageType\":\"current_user_list\",\"parentPageCode\":\"\",\"path\":\"/my-borrows\",\"tableName\":\"borrow_record\"},{\"code\":\"my_reservations_page\",\"menuCode\":\"my_reservations\",\"name\":\"我的预约\",\"pageType\":\"current_user_list\",\"parentPageCode\":\"\",\"path\":\"/my-reservations\",\"tableName\":\"reservation\"},{\"code\":\"my_fines_page\",\"menuCode\":\"my_fines\",\"name\":\"我的罚款\",\"pageType\":\"current_user_list\",\"parentPageCode\":\"\",\"path\":\"/my-fines\",\"tableName\":\"fine\"},{\"code\":\"reader_profile_page\",\"menuCode\":\"reader_profile\",\"name\":\"个人资料\",\"pageType\":\"form\",\"parentPageCode\":\"\",\"path\":\"/profile\",\"tableName\":\"reader\"}],\"roles\":[{\"code\":\"admin\",\"description\":\"系统管理员,负责图书管理、借阅审核、逾期处理等\",\"name\":\"管理员\"},{\"code\":\"reader\",\"description\":\"普通读者,可检索图书、借书、还书、预约等\",\"name\":\"读者\"}]},\"extraRequirements\":\"\",\"projectDescription\":\"【AI补全需求】\\n项目定位面向高校图书馆的图书管理系统供读者和管理员使用。 \\n角色读者、管理员。 \\n核心流程读者检索图书 → 提交借书申请 → 管理员审核通过 → 读者取得图书(借出) → 读者还书 → 管理员确认归还。若超期,读者需缴纳逾期费用后完成还书。 \\n关键规则AI假设每位读者最多同时借阅5本书单次借阅期限30天逾期每天每本收费0.5元图书可借数量减1库存为0时不可借出管理员可手动下架图书。 \\n异常边界库存不足时禁止借出读者已借满5本时无法提交申请图书已被预约或借出时提示不可用读者未还清逾期费用无法再借新书管理员可拒绝借书申请或取消异常订单。\",\"stylePreset\":\"dark-tech\",\"originalResponse\":{\"tables\":[{\"tableName\":\"book_info\",\"tableComment\":\"图书信息表\",\"adminMenuName\":\"图书管理\",\"operations\":{\"add\":true,\"edit\":true,\"remove\":true,\"removeType\":\"physical\",\"reason\":\"\"},\"columns\":[{\"columnName\":\"book_id\",\"columnLabel\":\"图书ID\",\"columnComment\":\"主键ID\",\"columnType\":\"bigint(20)\",\"isPk\":\"1\",\"isIncrement\":\"1\",\"isRequired\":\"1\",\"javaType\":\"Long\",\"htmlType\":\"input\"},{\"columnName\":\"isbn\",\"columnLabel\":\"ISBN\",\"columnComment\":\"国际标准书号\",\"columnType\":\"varchar(20)\",\"isPk\":\"0\",\"isIncrement\":\"0\",\"isRequired\":\"1\",\"javaType\":\"String\",\"htmlType\":\"input\"},{\"columnName\":\"title\",\"columnLabel\":\"书名\",\"columnComment\":\"图书名称\",\"columnType\":\"varchar(255)\",\"isPk\":\"0\",\"isIncrement\":\"0\",\"isRequired\":\"1\",\"javaType\":\"String\",\"htmlType\":\"input\"},{\"columnName\":\"author\",\"columnLabel\":\"作者\",\"columnComment\":\"图书作者\",\"columnType\":\"varchar(255)\",\"isPk\":\"0\",\"isIncrement\":\"0\",\"isRequired\":\"0\",\"javaType\":\"String\",\"htmlType\":\"input\"},{\"columnName\":\"publisher\",\"columnLabel\":\"出版社\",\"columnComment\":\"出版社名称\",\"columnType\":\"varchar(255)\",\"isPk\":\"0\",\"isIncrement\":\"0\",\"isRequired\":\"0\",\"javaType\":\"String\",\"htmlType\":\"input\"},{\"columnName\":\"publish_date\",\"columnLabel\":\"出版日期\",\"columnComment\":\"图书出版日期\",\"columnType\":\"date\",\"isPk\":\"0\",\"isIncrement\":\"0\",\"isRequired\":\"0\",\"javaType\":\"Date\",\"htmlType\":\"datetime\"},{\"columnName\":\"category\",\"columnLabel\":\"分类\",\"columnComment\":\"图书分类\",\"columnType\":\"varchar(50)\",\"isPk\":\"0\",\"isIncrement\":\"0\",\"isRequired\":\"0\",\"javaType\":\"String\",\"htmlType\":\"select\",\"dictType\":\"book_category\",\"dictOptions\":[{\"value\":\"literature\",\"label\":\"文学\"},{\"value\":\"science\",\"label\":\"科学\"},{\"value\":\"history\",\"label\":\"历史\"},{\"value\":\"technology\",\"label\":\"技术\"},{\"value\":\"art\",\"label\":\"艺术\"},{\"value\":\"other\",\"label\":\"其他\"}]},{\"columnName\":\"description\",\"columnLabel\":\"简介\",\"columnComment\":\"图书内容简介\",\"columnType\":\"text\",\"isPk\":\"0\",\"isIncrement\":\"0\",\"isRequired\":\"0\",\"javaType\":\"String\",\"htmlType\":\"editor\"},{\"columnName\":\"cover_image\",\"columnLabel\":\"封面\",\"columnComment\":\"图书封面图片URL\",\"columnType\":\"varchar(255)\",\"isPk\":\"0\",\"isIncrement\":\"0\",\"isRequired\":\"0\",\"javaType\":\"String\",\"htmlType\":\"imageUpload\"},{\"columnName\":\"stock\",\"columnLabel\":\"库存数量\",\"columnComment\":\"当前可借库存\",\"columnType\":\"int(11)\",\"isPk\":\"0\",\"isIncrement\":\"0\",\"isRequired\":\"1\",\"javaType\":\"Integer\",\"htmlType\":\"input\"},{\"columnName\":\"total_stock\",\"columnLabel\":\"总库存\",\"columnComment\":\"馆藏总数量\",\"columnType\":\"int(11)\",\"isPk\":\"0\",\"isIncrement\":\"0\",\"isRequired\":\"1\",\"javaType\":\"Integer\",\"htmlType\":\"input\"},{\"columnName\":\"status\",\"columnLabel\":\"状态\",\"columnComment\":\"图书状态available-可借, unavailable-不可借, removed-下架\",\"columnType\":\"varchar(20)\",\"isPk\":\"0\",\"isIncrement\":\"0\",\"isRequired\":\"1\",\"javaType\":\"String\",\"htmlType\":\"select\",\"dictType\":\"book_status\",\"dictOptions\":[{\"value\":\"available\",\"label\":\"可借\"},{\"value\":\"unavailable\",\"label\":\"不可借\"},{\"value\":\"removed\",\"label\":\"下架\"}]}]},{\"tableName\":\"borrow_record\",\"tableComment\":\"借阅记录表\",\"adminMenuName\":\"借阅记录管理\",\"operations\":{\"add\":true,\"edit\":false,\"remove\":false,\"removeType\":\"physical\",\"reason\":\"\"},\"columns\":[{\"columnName\":\"record_id\",\"columnLabel\":\"记录ID\",\"columnComment\":\"主键ID\",\"columnType\":\"bigint(20)\",\"isPk\":\"1\",\"isIncrement\":\"1\",\"isRequired\":\"1\",\"javaType\":\"Long\",\"htmlType\":\"input\"},{\"columnName\":\"reader_id\",\"columnLabel\":\"读者\",\"columnComment\":\"借阅读者ID关联reader表\",\"columnType\":\"bigint(20)\",\"isPk\":\"0\",\"isIncrement\":\"0\",\"isRequired\":\"1\",\"javaType\":\"Long\",\"htmlType\":\"select\",\"dictType\":\"remote:reader:reader_id:nickname\"},{\"columnName\":\"book_id\",\"columnLabel\":\"图书\",\"columnComment\":\"借阅图书ID关联book_info表\",\"columnType\":\"bigint(20)\",\"isPk\":\"0\",\"isIncrement\":\"0\",\"isRequired\":\"1\",\"javaType\":\"Long\",\"htmlType\":\"select\",\"dictType\":\"remote:book_info:book_id:title\"},{\"columnName\":\"borrow_time\",\"columnLabel\":\"借书时间\",\"columnComment\":\"实际借书时间\",\"columnType\":\"datetime\",\"isPk\":\"0\",\"isIncrement\":\"0\",\"isRequired\":\"1\",\"javaType\":\"Date\",\"htmlType\":\"datetime\"},{\"columnName\":\"due_time\",\"columnLabel\":\"应还时间\",\"columnComment\":\"应归还日期\",\"columnType\":\"datetime\",\"isPk\":\"0\",\"isIncrement\":\"0\",\"isRequired\":\"1\",\"javaType\":\"Date\",\"htmlType\":\"datetime\"},{\"columnName\":\"return_time\",\"columnLabel\":\"实际还书时间\",\"columnComment\":\"读者归还时间\",\"columnType\":\"datetime\",\"isPk\":\"0\",\"isIncrement\":\"0\",\"isRequired\":\"0\",\"javaType\":\"Date\",\"htmlType\":\"datetime\"},{\"columnName\":\"status\",\"columnLabel\":\"状态\",\"columnComment\":\"借阅状态pending-待审核, borrowing-借阅中, returning-待确认归还, returned-已归还, cancelled-已取消, rejected-已拒绝\",\"columnType\":\"varchar(20)\",\"isPk\":\"0\",\"isIncrement\":\"0\",\"isRequired\":\"1\",\"javaType\":\"String\",\"htmlType\":\"select\",\"dictType\":\"borrow_record_status\",\"dictOptions\":[{\"value\":\"pending\",\"label\":\"待审核\"},{\"value\":\"borrowing\",\"label\":\"借阅中\"},{\"value\":\"returning\",\"label\":\"待确认归还\"},{\"value\":\"returned\",\"label\":\"已归还\"},{\"value\":\"cancelled\",\"label\":\"已取消\"},{\"value\":\"rejected\",\"label\":\"已拒绝\"}]},{\"columnName\":\"approve_user_id\",\"columnLabel\":\"审核人\",\"columnComment\":\"审核通过的管理员ID关联admin表\",\"columnType\":\"bigint(20)\",\"isPk\":\"0\",\"isIncrement\":\"0\",\"isRequired\":\"0\",\"javaType\":\"Long\",\"htmlType\":\"select\",\"dictType\":\"remote:admin:admin_id:username\"},{\"columnName\":\"approve_time\",\"columnLabel\":\"审核时间\",\"columnComment\":\"管理员审核通过时间\",\"columnType\":\"datetime\",\"isPk\":\"0\",\"isIncrement\":\"0\",\"isRequired\":\"0\",\"javaType\":\"Date\",\"htmlType\":\"datetime\"},{\"columnName\":\"confirm_user_id\",\"columnLabel\":\"确认归还人\",\"columnComment\":\"确认归还的管理员ID关联admin表\",\"columnType\":\"bigint(20)\",\"isPk\":\"0\",\"isIncrement\":\"0\",\"isRequired\":\"0\",\"javaType\":\"Long\",\"htmlType\":\"select\",\"dictType\":\"remote:admin:admin_id:username\"},{\"columnName\":\"confirm_time\",\"columnLabel\":\"归还确认时间\",\"columnComment\":\"管理员确认归还时间\",\"columnType\":\"datetime\",\"isPk\":\"0\",\"isIncrement\":\"0\",\"isRequired\":\"0\",\"javaType\":\"Date\",\"htmlType\":\"datetime\"},{\"columnName\":\"created_at\",\"columnLabel\":\"创建时间\",\"columnComment\":\"记录创建时间(申请时间)\",\"columnType\":\"datetime\",\"isPk\":\"0\",\"isIncrement\":\"0\",\"isRequired\":\"1\",\"javaType\":\"Date\",\"htmlType\":\"datetime\"},{\"columnName\":\"updated_at\",\"columnLabel\":\"更新时间\",\"columnComment\":\"记录最后更新时间\",\"columnType\":\"datetime\",\"isPk\":\"0\",\"isIncrement\":\"0\",\"isRequired\":\"0\",\"javaType\":\"Date\",\"htmlType\":\"datetime\"}]},{\"tableName\":\"reservation\",\"tableComment\":\"预约表\",\"adminMenuName\":\"预约管理\",\"operations\":{\"add\":true,\"edit\":false,\"remove\":false,\"removeType\":\"physical\",\"reason\":\"\"},\"columns\":[{\"columnName\":\"reservation_id\",\"columnLabel\":\"预约ID\",\"columnComment\":\"主键ID\",\"columnType\":\"bigint(20)\",\"isPk\":\"1\",\"isIncrement\":\"1\",\"isRequired\":\"1\",\"javaType\":\"Long\",\"htmlType\":\"input\"},{\"columnName\":\"reader_id\",\"columnLabel\":\"读者\",\"columnComment\":\"预约读者ID关联reader表\",\"columnType\":\"bigint(20)\",\"isPk\":\"0\",\"isIncrement\":\"0\",\"isRequired\":\"1\",\"javaType\":\"Long\",\"htmlType\":\"select\",\"dictType\":\"remote:reader:reader_id:nickname\"},{\"columnName\":\"book_id\",\"columnLabel\":\"图书\",\"columnComment\":\"预约图书ID关联book_info表\",\"columnType\":\"bigint(20)\",\"isPk\":\"0\",\"isIncrement\":\"0\",\"isRequired\":\"1\",\"javaType\":\"Long\",\"htmlType\":\"select\",\"dictType\":\"remote:book_info:book_id:title\"},{\"columnName\":\"reserve_time\",\"columnLabel\":\"预约时间\",\"columnComment\":\"读者预约时间\",\"columnType\":\"datetime\",\"isPk\":\"0\",\"isIncrement\":\"0\",\"isRequired\":\"1\",\"javaType\":\"Date\",\"htmlType\":\"datetime\"},{\"columnName\":\"status\",\"columnLabel\":\"状态\",\"columnComment\":\"预约状态waiting-等待中, fulfilled-已借出, cancelled-已取消, expired-已过期\",\"columnType\":\"varchar(20)\",\"isPk\":\"0\",\"isIncrement\":\"0\",\"isRequired\":\"1\",\"javaType\":\"String\",\"htmlType\":\"select\",\"dictType\":\"reservation_status\",\"dictOptions\":[{\"value\":\"waiting\",\"label\":\"等待中\"},{\"value\":\"fulfilled\",\"label\":\"已借出\"},{\"value\":\"cancelled\",\"label\":\"已取消\"},{\"value\":\"expired\",\"label\":\"已过期\"}]},{\"columnName\":\"expire_time\",\"columnLabel\":\"过期时间\",\"columnComment\":\"预约自动过期时间\",\"columnType\":\"datetime\",\"isPk\":\"0\",\"isIncrement\":\"0\",\"isRequired\":\"0\",\"javaType\":\"Date\",\"htmlType\":\"datetime\"},{\"columnName\":\"fulfilled_record_id\",\"columnLabel\":\"关联借阅记录\",\"columnComment\":\"预约后实际借出的借阅记录ID关联borrow_record表\",\"columnType\":\"bigint(20)\",\"isPk\":\"0\",\"isIncrement\":\"0\",\"isRequired\":\"0\",\"javaType\":\"Long\",\"htmlType\":\"select\",\"dictType\":\"remote:borrow_record:record_id:record_id\"}]},{\"tableName\":\"fine\",\"tableComment\":\"罚款表\",\"adminMenuName\":\"逾期费用管理\",\"operations\":{\"add\":true,\"edit\":false,\"remove\":false,\"removeType\":\"physical\",\"reason\":\"\"},\"columns\":[{\"columnName\":\"fine_id\",\"columnLabel\":\"罚款ID\",\"columnComment\":\"主键ID\",\"columnType\":\"bigint(20)\",\"isPk\":\"1\",\"isIncrement\":\"1\",\"isRequired\":\"1\",\"javaType\":\"Long\",\"htmlType\":\"input\"},{\"columnName\":\"reader_id\",\"columnLabel\":\"读者\",\"columnComment\":\"被罚款读者ID关联reader表\",\"columnType\":\"bigint(20)\",\"isPk\":\"0\",\"isIncrement\":\"0\",\"isRequired\":\"1\",\"javaType\":\"Long\",\"htmlType\":\"select\",\"dictType\":\"remote:reader:reader_id:nickname\"},{\"columnName\":\"book_id\",\"columnLabel\":\"图书\",\"columnComment\":\"关联图书ID关联book_info表\",\"columnType\":\"bigint(20)\",\"isPk\":\"0\",\"isIncrement\":\"0\",\"isRequired\":\"1\",\"javaType\":\"Long\",\"htmlType\":\"select\",\"dictType\":\"remote:book_info:book_id:title\"},{\"columnName\":\"borrow_record_id\",\"columnLabel\":\"借阅记录\",\"columnComment\":\"关联借阅记录ID关联borrow_record表\",\"columnType\":\"bigint(20)\",\"isPk\":\"0\",\"isIncrement\":\"0\",\"isRequired\":\"1\",\"javaType\":\"Long\",\"htmlType\":\"select\",\"dictType\":\"remote:borrow_record:record_id:record_id\"},{\"columnName\":\"overdue_days\",\"columnLabel\":\"逾期天数\",\"columnComment\":\"实际逾期天数\",\"columnType\":\"int(11)\",\"isPk\":\"0\",\"isIncrement\":\"0\",\"isRequired\":\"1\",\"javaType\":\"Integer\",\"htmlType\":\"input\"},{\"columnName\":\"amount\",\"columnLabel\":\"罚款金额\",\"columnComment\":\"需缴纳的罚款金额(元)\",\"columnType\":\"decimal(10,2)\",\"isPk\":\"0\",\"isIncrement\":\"0\",\"isRequired\":\"1\",\"javaType\":\"BigDecimal\",\"htmlType\":\"input\"},{\"columnName\":\"status\",\"columnLabel\":\"状态\",\"columnComment\":\"罚款状态unpaid-未支付, paid-已支付, waived-已免除\",\"columnType\":\"varchar(20)\",\"isPk\":\"0\",\"isIncrement\":\"0\",\"isRequired\":\"1\",\"javaType\":\"String\",\"htmlType\":\"select\",\"dictType\":\"fine_status\",\"dictOptions\":[{\"value\":\"unpaid\",\"label\":\"未支付\"},{\"value\":\"paid\",\"label\":\"已支付\"},{\"value\":\"waived\",\"label\":\"已免除\"}]},{\"columnName\":\"create_time\",\"columnLabel\":\"创建时间\",\"columnComment\":\"罚款记录生成时间\",\"columnType\":\"datetime\",\"isPk\":\"0\",\"isIncrement\":\"0\",\"isRequired\":\"1\",\"javaType\":\"Date\",\"htmlType\":\"datetime\"},{\"columnName\":\"pay_time\",\"columnLabel\":\"支付时间\",\"columnComment\":\"读者支付罚款时间\",\"columnType\":\"datetime\",\"isPk\":\"0\",\"isIncrement\":\"0\",\"isRequired\":\"0\",\"javaType\":\"Date\",\"htmlType\":\"datetime\"}]},{\"tableName\":\"reader\",\"tableComment\":\"读者信息表\",\"adminMenuName\":\"读者管理\",\"operations\":{\"add\":true,\"edit\":true,\"remove\":true,\"removeType\":\"physical\",\"reason\":\"\"},\"columns\":[{\"columnName\":\"reader_id\",\"columnLabel\":\"读者ID\",\"columnComment\":\"主键ID\",\"columnType\":\"bigint(20)\",\"isPk\":\"1\",\"isIncrement\":\"1\",\"isRequired\":\"1\",\"javaType\":\"Long\",\"htmlType\":\"input\"},{\"columnName\":\"username\",\"columnLabel\":\"用户名\",\"columnComment\":\"登录用户名\",\"columnType\":\"varchar(50)\",\"isPk\":\"0\",\"isIncrement\":\"0\",\"isRequired\":\"1\",\"javaType\":\"String\",\"htmlType\":\"input\"},{\"columnName\":\"password_hash\",\"columnLabel\":\"密码哈希\",\"columnComment\":\"加密后的密码\",\"columnType\":\"varchar(255)\",\"isPk\":\"0\",\"isIncrement\":\"0\",\"isRequired\":\"1\",\"javaType\":\"String\",\"htmlType\":\"input\"},{\"columnName\":\"nickname\",\"columnLabel\":\"昵称\",\"columnComment\":\"读者昵称/显示名\",\"columnType\":\"varchar(50)\",\"isPk\":\"0\",\"isIncrement\":\"0\",\"isRequired\":\"0\",\"javaType\":\"String\",\"htmlType\":\"input\"},{\"columnName\":\"status\",\"columnLabel\":\"状态\",\"columnComment\":\"读者账号状态active-正常, inactive-停用, locked-锁定\",\"columnType\":\"varchar(20)\",\"isPk\":\"0\",\"isIncrement\":\"0\",\"isRequired\":\"1\",\"javaType\":\"String\",\"htmlType\":\"select\",\"dictType\":\"reader_status\",\"dictOptions\":[{\"value\":\"active\",\"label\":\"正常\"},{\"value\":\"inactive\",\"label\":\"停用\"},{\"value\":\"locked\",\"label\":\"锁定\"}]},{\"columnName\":\"create_time\",\"columnLabel\":\"创建时间\",\"columnComment\":\"账号创建时间\",\"columnType\":\"datetime\",\"isPk\":\"0\",\"isIncrement\":\"0\",\"isRequired\":\"1\",\"javaType\":\"Date\",\"htmlType\":\"datetime\"},{\"columnName\":\"real_name\",\"columnLabel\":\"真实姓名\",\"columnComment\":\"读者真实姓名\",\"columnType\":\"varchar(50)\",\"isPk\":\"0\",\"isIncrement\":\"0\",\"isRequired\":\"0\",\"javaType\":\"String\",\"htmlType\":\"input\"},{\"columnName\":\"student_id\",\"columnLabel\":\"学号\",\"columnComment\":\"读者学号/工号\",\"columnType\":\"varchar(20)\",\"isPk\":\"0\",\"isIncrement\":\"0\",\"isRequired\":\"0\",\"javaType\":\"String\",\"htmlType\":\"input\"},{\"columnName\":\"phone\",\"columnLabel\":\"手机号\",\"columnComment\":\"联系手机号码\",\"columnType\":\"varchar(20)\",\"isPk\":\"0\",\"isIncrement\":\"0\",\"isRequired\":\"0\",\"javaType\":\"String\",\"htmlType\":\"input\"},{\"columnName\":\"email\",\"columnLabel\":\"邮箱\",\"columnComment\":\"电子邮箱地址\",\"columnType\":\"varchar(100)\",\"isPk\":\"0\",\"isIncrement\":\"0\",\"isRequired\":\"0\",\"javaType\":\"String\",\"htmlType\":\"input\"},{\"columnName\":\"gender\",\"columnLabel\":\"性别\",\"columnComment\":\"读者性别\",\"columnType\":\"varchar(10)\",\"isPk\":\"0\",\"isIncrement\":\"0\",\"isRequired\":\"0\",\"javaType\":\"String\",\"htmlType\":\"select\",\"dictType\":\"gender\",\"dictOptions\":[{\"value\":\"male\",\"label\":\"男\"},{\"value\":\"female\",\"label\":\"女\"}]},{\"columnName\":\"avatar\",\"columnLabel\":\"头像\",\"columnComment\":\"读者头像图片URL\",\"columnType\":\"varchar(255)\",\"isPk\":\"0\",\"isIncrement\":\"0\",\"isRequired\":\"0\",\"javaType\":\"String\",\"htmlType\":\"imageUpload\"},{\"columnName\":\"borrowed_count\",\"columnLabel\":\"当前借阅数\",\"columnComment\":\"当前正在借阅的图书数量\",\"columnType\":\"int(11)\",\"isPk\":\"0\",\"isIncrement\":\"0\",\"isRequired\":\"0\",\"javaType\":\"Integer\",\"htmlType\":\"input\"}]},{\"tableName\":\"borrow_application\",\"tableComment\":\"借书申请表\",\"adminMenuName\":\"借书申请管理\",\"operations\":{\"add\":true,\"edit\":false,\"remove\":false,\"removeType\":\"physical\",\"reason\":\"\"},\"columns\":[{\"columnName\":\"application_id\",\"columnLabel\":\"申请ID\",\"columnComment\":\"主键ID\",\"columnType\":\"bigint(20)\",\"isPk\":\"1\",\"isIncrement\":\"1\",\"isRequired\":\"1\",\"javaType\":\"Long\",\"htmlType\":\"input\"},{\"columnName\":\"reader_id\",\"columnLabel\":\"读者\",\"columnComment\":\"申请读者ID关联reader表\",\"columnType\":\"bigint(20)\",\"isPk\":\"0\",\"isIncrement\":\"0\",\"isRequired\":\"1\",\"javaType\":\"Long\",\"htmlType\":\"select\",\"dictType\":\"remote:reader:reader_id:nickname\"},{\"columnName\":\"book_id\",\"columnLabel\":\"图书\",\"columnComment\":\"申请图书ID关联book_info表\",\"columnType\":\"bigint(20)\",\"isPk\":\"0\",\"isIncrement\":\"0\",\"isRequired\":\"1\",\"javaType\":\"Long\",\"htmlType\":\"select\",\"dictType\":\"remote:book_info:book_id:title\"},{\"columnName\":\"apply_time\",\"columnLabel\":\"申请时间\",\"columnComment\":\"读者提交申请时间\",\"columnType\":\"datetime\",\"isPk\":\"0\",\"isIncrement\":\"0\",\"isRequired\":\"1\",\"javaType\":\"Date\",\"htmlType\":\"datetime\"},{\"columnName\":\"status\",\"columnLabel\":\"状态\",\"columnComment\":\"申请状态pending-待审核, approved-已通过, rejected-已拒绝, cancelled-已取消\",\"columnType\":\"varchar(20)\",\"isPk\":\"0\",\"isIncrement\":\"0\",\"isRequired\":\"1\",\"javaType\":\"String\",\"htmlType\":\"select\",\"dictType\":\"borrow_application_status\",\"dictOptions\":[{\"value\":\"pending\",\"label\":\"待审核\"},{\"value\":\"approved\",\"label\":\"已通过\"},{\"value\":\"rejected\",\"label\":\"已拒绝\"},{\"value\":\"cancelled\",\"label\":\"已取消\"}]},{\"columnName\":\"approve_user_id\",\"columnLabel\":\"审批人\",\"columnComment\":\"审批管理员ID关联admin表\",\"columnType\":\"bigint(20)\",\"isPk\":\"0\",\"isIncrement\":\"0\",\"isRequired\":\"0\",\"javaType\":\"Long\",\"htmlType\":\"select\",\"dictType\":\"remote:admin:admin_id:username\"},{\"columnName\":\"approve_time\",\"columnLabel\":\"审批时间\",\"columnComment\":\"管理员审批时间\",\"columnType\":\"datetime\",\"isPk\":\"0\",\"isIncrement\":\"0\",\"isRequired\":\"0\",\"javaType\":\"Date\",\"htmlType\":\"datetime\"},{\"columnName\":\"reject_reason\",\"columnLabel\":\"拒绝原因\",\"columnComment\":\"管理员拒绝申请的原因\",\"columnType\":\"varchar(255)\",\"isPk\":\"0\",\"isIncrement\":\"0\",\"isRequired\":\"0\",\"javaType\":\"String\",\"htmlType\":\"textarea\"}]},{\"tableName\":\"admin\",\"tableComment\":\"管理员账号表\",\"adminMenuName\":\"管理员管理\",\"operations\":{\"add\":true,\"edit\":true,\"remove\":true,\"removeType\":\"physical\",\"reason\":\"\"},\"columns\":[{\"columnName\":\"admin_id\",\"columnLabel\":\"管理员ID\",\"columnComment\":\"主键ID\",\"columnType\":\"bigint(20)\",\"isPk\":\"1\",\"isIncrement\":\"1\",\"isRequired\":\"1\",\"javaType\":\"Long\",\"htmlType\":\"input\"},{\"columnName\":\"username\",\"columnLabel\":\"用户名\",\"columnComment\":\"登录用户名\",\"columnType\":\"varchar(50)\",\"isPk\":\"0\",\"isIncrement\":\"0\",\"isRequired\":\"1\",\"javaType\":\"String\",\"htmlType\":\"input\"},{\"columnName\":\"password_hash\",\"columnLabel\":\"密码哈希\",\"columnComment\":\"加密后的密码\",\"columnType\":\"varchar(255)\",\"isPk\":\"0\",\"isIncrement\":\"0\",\"isRequired\":\"1\",\"javaType\":\"String\",\"htmlType\":\"input\"},{\"columnName\":\"nickname\",\"columnLabel\":\"昵称\",\"columnComment\":\"管理员显示名称\",\"columnType\":\"varchar(50)\",\"isPk\":\"0\",\"isIncrement\":\"0\",\"isRequired\":\"0\",\"javaType\":\"String\",\"htmlType\":\"input\"},{\"columnName\":\"status\",\"columnLabel\":\"状态\",\"columnComment\":\"管理员账号状态active-正常, inactive-停用\",\"columnType\":\"varchar(20)\",\"isPk\":\"0\",\"isIncrement\":\"0\",\"isRequired\":\"1\",\"javaType\":\"String\",\"htmlType\":\"select\",\"dictType\":\"admin_status\",\"dictOptions\":[{\"value\":\"active\",\"label\":\"正常\"},{\"value\":\"inactive\",\"label\":\"停用\"}]},{\"columnName\":\"create_time\",\"columnLabel\":\"创建时间\",\"columnComment\":\"账号创建时间\",\"columnType\":\"datetime\",\"isPk\":\"0\",\"isIncrement\":\"0\",\"isRequired\":\"1\",\"javaType\":\"Date\",\"htmlType\":\"datetime\"}]}]},\"projectName\":\"图书管理系统\",\"flowConfig\":{\"actions\":[{\"actor\":\"admin\",\"audit\":{\"timeField\":\"approve_time\",\"userField\":\"approve_user_id\"},\"button\":{\"confirm\":\"确认审核通过吗?\",\"order\":10,\"pageCode\":\"borrow_application_admin_page\",\"scope\":\"admin\",\"slot\":\"list.rowActions\",\"type\":\"primary\"},\"code\":\"approve\",\"effects\":[{\"amount\":\"1\",\"errorMessage\":\"图书库存不足\",\"field\":\"stock\",\"min\":\"0\",\"notFoundMessage\":\"图书不存在\",\"relationField\":\"book_id\",\"table\":\"book_info\",\"type\":\"decrease\",\"values\":{}}],\"from\":\"pending\",\"invalidStateMessage\":\"当前状态不能审核\",\"method\":\"POST\",\"name\":\"审核通过\",\"path\":\"/borrow-record/approve\",\"successMessage\":\"审核成功\",\"to\":\"borrowing\"},{\"actor\":\"admin\",\"audit\":{\"timeField\":\"reject_time\",\"userField\":\"reject_user_id\"},\"button\":{\"confirm\":\"确认拒绝该申请吗?\",\"order\":20,\"pageCode\":\"borrow_application_admin_page\",\"scope\":\"admin\",\"slot\":\"list.rowActions\",\"type\":\"danger\"},\"code\":\"reject\",\"effects\":[],\"from\":\"pending\",\"invalidStateMessage\":\"当前状态不能拒绝\",\"method\":\"POST\",\"name\":\"拒绝申请\",\"path\":\"/borrow-record/reject\",\"successMessage\":\"已拒绝\",\"to\":\"rejected\"},{\"actor\":\"admin\",\"button\":{\"confirm\":\"确认取消该申请吗?\",\"order\":30,\"pageCode\":\"borrow_application_admin_page\",\"scope\":\"admin\",\"slot\":\"list.rowActions\",\"type\":\"warning\"},\"code\":\"cancel\",\"effects\":[],\"from\":\"pending\",\"invalidStateMessage\":\"当前状态不能取消\",\"method\":\"POST\",\"name\":\"取消申请\",\"path\":\"/borrow-record/cancel\",\"successMessage\":\"已取消\",\"to\":\"cancelled\"},{\"actor\":\"reader\",\"button\":{\"confirm\":\"确认还书吗?\",\"order\":10,\"pageCode\":\"my_borrows_page\",\"scope\":\"reader\",\"slot\":\"list.rowActions\",\"type\":\"warning\"},\"code\":\"return\",\"effects\":[{\"amount\":\"1\",\"min\":\"0\",\"table\":\"fine\",\"type\":\"create_record\",\"values\":{\"reader_id\":\"record.reader_id\",\"amount\":\"0.00\",\"created_at\":\"now\",\"borrow_record_id\":\"record.id\",\"book_id\":\"record.book_id\",\"status\":\"unpaid\"}}],\"from\":\"borrowing\",\"invalidStateMessage\":\"当前状态不能还书\",\"method\":\"POST\",\"name\":\"还书\",\"path\":\"/borrow-record/return\",\"successMessage\":\"还书请求已提交,等待管理员确认\",\"to\":\"returning\"},{\"actor\":\"admin\",\"audit\":{\"timeField\":\"confirm_time\",\"userField\":\"confirm_user_id\"},\"button\":{\"confirm\":\"确认已收到还书?\",\"order\":10,\"pageCode\":\"borrow_record_admin_page\",\"scope\":\"admin\",\"slot\":\"list.rowActions\",\"type\":\"success\"},\"code\":\"confirm_return\",\"effects\":[{\"amount\":\"1\",\"errorMessage\":\"图书库存更新失败\",\"field\":\"stock\",\"min\":\"0\",\"notFoundMessage\":\"图书不存在\",\"relationField\":\"book_id\",\"table\":\"book_info\",\"type\":\"increase\",\"values\":{}}],\"from\":\"returning\",\"invalidStateMessage\":\"当前状态不能确认归还\",\"method\":\"POST\",\"name\":\"确认归还\",\"path\":\"/borrow-record/confirm-return\",\"successMessage\":\"归还确认成功\",\"to\":\"returned\"}],\"code\":\"borrow_record_flow\",\"mainTable\":\"borrow_record\",\"metrics\":[{\"aggregate\":\"count\",\"code\":\"total_books\",\"field\":\"id\",\"name\":\"总图书数\",\"table\":\"book_info\",\"unit\":\"册\"},{\"aggregate\":\"count\",\"code\":\"total_readers\",\"field\":\"id\",\"name\":\"总读者数\",\"table\":\"reader\",\"unit\":\"人\"},{\"aggregate\":\"count\",\"code\":\"current_borrowed\",\"field\":\"id\",\"name\":\"当前借阅中\",\"status\":\"borrowing\",\"table\":\"borrow_record\",\"unit\":\"条\"},{\"aggregate\":\"count\",\"code\":\"pending_applications\",\"field\":\"id\",\"name\":\"待审核申请\",\"status\":\"pending\",\"table\":\"borrow_record\",\"unit\":\"条\"}],\"name\":\"借阅记录流程\",\"notFoundMessage\":\"主记录不存在\",\"states\":[{\"code\":\"pending\",\"label\":\"待审核\"},{\"code\":\"borrowing\",\"label\":\"借阅中\"},{\"code\":\"returning\",\"label\":\"待确认归还\"},{\"code\":\"returned\",\"label\":\"已归还\"},{\"code\":\"cancelled\",\"label\":\"已取消\"},{\"code\":\"rejected\",\"label\":\"已拒绝\"}],\"statusField\":\"status\",\"version\":\"1.0\"},\"limits\":{\"maxTables\":12,\"maxColumnsPerTable\":30}}', '{\n \"tables\": [\n {\n \"tableName\": \"book_info\",\n \"tableComment\": \"图书信息表\",\n \"adminMenuName\": \"图书管理\",\n \"operations\": {\n \"add\": true,\n \"edit\": true,\n \"remove\": true,\n \"removeType\": \"physical\",\n \"reason\": \"\"\n },\n \"columns\": [\n {\n \"columnName\": \"id\",\n \"columnLabel\": \"图书ID\",\n \"columnComment\": \"主键ID\",\n \"columnType\": \"bigint(20)\",\n \"isPk\": \"1\",\n \"isIncrement\": \"1\",\n \"isRequired\": \"1\",\n \"javaType\": \"Long\",\n \"htmlType\": \"input\"\n },\n {\n \"columnName\": \"isbn\",\n \"columnLabel\": \"ISBN\",\n \"columnComment\": \"国际标准书号\",\n \"columnType\": \"varchar(20)\",\n \"isPk\": \"0\",\n \"isIncrement\": \"0\",\n \"isRequired\": \"1\",\n \"javaType\": \"String\",\n \"htmlType\": \"input\"\n },\n {\n \"columnName\": \"title\",\n \"columnLabel\": \"书名\",\n \"columnComment\": \"图书名称\",\n \"columnType\": \"varchar(255)\",\n \"isPk\": \"0\",\n \"isIncrement\": \"0\",\n \"isRequired\": \"1\",\n \"javaType\": \"String\",\n \"htmlType\": \"input\"\n },\n {\n \"columnName\": \"author\",\n \"columnLabel\": \"作者\",\n \"columnComment\": \"图书作者\",\n \"columnType\": \"varchar(255)\",\n \"isPk\": \"0\",\n \"isIncrement\": \"0\",\n \"isRequired\": \"0\",\n \"javaType\": \"String\",\n \"htmlType\": \"input\"\n },\n {\n \"columnName\": \"publisher\",\n \"columnLabel\": \"出版社\",\n \"columnComment\": \"出版社名称\",\n \"columnType\": \"varchar(255)\",\n \"isPk\": \"0\",\n \"isIncrement\": \"0\",\n \"isRequired\": \"0\",\n \"javaType\": \"String\",\n \"htmlType\": \"input\"\n },\n {\n \"columnName\": \"publish_date\",\n \"columnLabel\": \"出版日期\",\n \"columnComment\": \"图书出版日期\",\n \"columnType\": \"date\",\n \"isPk\": \"0\",\n \"isIncrement\": \"0\",\n \"isRequired\": \"0\",\n \"javaType\": \"Date\",\n \"htmlType\": \"datetime\"\n },\n {\n \"columnName\": \"category\",\n \"columnLabel\": \"分类\",\n \"columnComment\": \"图书分类\",\n \"columnType\": \"varchar(50)\",\n \"isPk\": \"0\",\n \"isIncrement\": \"0\",\n \"isRequired\": \"0\",\n \"javaType\": \"String\",\n \"htmlType\": \"select\",\n \"dictType\": \"book_category\",\n \"dictOptions\": [\n {\n \"value\": \"literature\",\n \"label\": \"文学\"\n },\n {\n \"value\": \"science\",\n \"label\": \"科学\"\n },\n {\n \"value\": \"history\",\n \"label\": \"历史\"\n },\n {\n \"value\": \"technology\",\n \"label\": \"技术\"\n },\n {\n \"value\": \"art\",\n \"label\": \"艺术\"\n },\n {\n \"value\": \"other\",\n \"label\": \"其他\"\n }\n ]\n },\n {\n \"columnName\": \"description\",\n \"columnLabel\": \"简介\",\n \"columnComment\": \"图书内容简介\",\n \"columnType\": \"text\",\n \"isPk\": \"0\",\n \"isIncrement\": \"0\",\n \"isRequired\": \"0\",\n \"javaType\": \"String\",\n \"htmlType\": \"editor\"\n },\n {\n \"columnName\": \"cover_image\",\n \"columnLabel\": \"封面\",\n \"columnComment\": \"图书封面图片URL\",\n \"columnType\": \"varchar(255)\",\n \"isPk\": \"0\",\n \"isIncrement\": \"0\",\n \"isRequired\": \"0\",\n \"javaType\": \"String\",\n \"htmlType\": \"imageUpload\"\n },\n {\n \"columnName\": \"stock\",\n \"columnLabel\": \"库存数量\",\n \"columnComment\": \"当前可借库存\",\n \"columnType\": \"int(11)\",\n \"isPk\": \"0\",\n \"isIncrement\": \"0\",\n \"isRequired\": \"1\",\n \"javaType\": \"Integer\",\n \"htmlType\": \"input\"\n },\n {\n \"columnName\": \"total_stock\",\n \"columnLabel\": \"总库存\",\n \"columnComment\": \"馆藏总数量\",\n \"columnType\": \"int(11)\",\n \"isPk\": \"0\",\n \"isIncrement\": \"0\",\n \"isRequired\": \"1\",\n \"javaType\": \"Integer\",\n \"htmlType\": \"input\"\n },\n {\n \"columnName\": \"status\",\n \"columnLabel\": \"状态\",\n \"columnComment\": \"图书状态available-可借, unavailable-不可借, removed-下架\",\n \"columnType\": \"varchar(20)\",\n \"isPk\": \"0\",\n \"isIncrement\": \"0\",\n \"isRequired\": \"1\",\n \"javaType\": \"String\",\n \"htmlType\": \"select\",\n \"dictType\": \"book_status\",\n \"dictOptions\": [\n {\n \"value\": \"available\",\n \"label\": \"可借\"\n },\n {\n \"value\": \"unavailable\",\n \"label\": \"不可借\"\n },\n {\n \"value\": \"removed\",\n \"label\": \"下架\"\n }\n ]\n }\n ]\n },\n {\n \"tableName\": \"borrow_record\",\n \"tableComment\": \"借阅记录表\",\n \"adminMenuName\": \"借阅记录管理\",\n \"operations\": {\n \"add\": true,\n \"edit\": false,\n \"remove\": false,\n \"removeType\": \"physical\",\n \"reason\": \"\"\n },\n \"columns\": [\n {\n \"columnName\": \"id\",\n \"columnLabel\": \"记录ID\",\n \"columnComment\": \"主键ID\",\n \"columnType\": \"bigint(20)\",\n \"isPk\": \"1\",\n \"isIncrement\": \"1\",\n \"isRequired\": \"1\",\n \"javaType\": \"Long\",\n \"htmlType\": \"input\"\n },\n {\n \"columnName\": \"reader_id\",\n \"columnLabel\": \"读者\",\n \"columnComment\": \"借阅读者ID关联reader表\",\n \"columnType\": \"bigint(20)\",\n \"isPk\": \"0\",\n \"isIncrement\": \"0\",\n \"isRequired\": \"1\",\n \"javaType\": \"Long\",\n \"htmlType\": \"select\",\n \"dictType\": \"remote:reader:id:nickname\"\n },\n {\n \"columnName\": \"book_id\",\n \"columnLabel\": \"图书\",\n \"columnComment\": \"借阅图书ID关联book_info表\",\n \"columnType\": \"bigint(20)\",\n \"isPk\": \"0\",\n \"isIncrement\": \"0\",\n \"isRequired\": \"1\",\n \"javaType\": \"Long\",\n \"htmlType\": \"select\",\n \"dictType\": \"remote:book_info:id:title\"\n },\n {\n \"columnName\": \"borrow_time\",\n \"columnLabel\": \"借书时间\",\n \"columnComment\": \"实际借书时间\",\n \"columnType\": \"datetime\",\n \"isPk\": \"0\",\n \"isIncrement\": \"0\",\n \"isRequired\": \"1\",\n \"javaType\": \"Date\",\n \"htmlType\": \"datetime\"\n },\n {\n \"columnName\": \"due_time\",\n \"columnLabel\": \"应还时间\",\n \"columnComment\": \"应归还日期\",\n \"columnType\": \"datetime\",\n \"isPk\": \"0\",\n \"isIncrement\": \"0\",\n \"isRequired\": \"1\",\n \"javaType\": \"Date\",\n \"htmlType\": \"datetime\"\n },\n {\n \"columnName\": \"return_time\",\n \"columnLabel\": \"实际还书时间\",\n \"columnComment\": \"读者归还时间\",\n \"columnType\": \"datetime\",\n \"isPk\": \"0\",\n \"isIncrement\": \"0\",\n \"isRequired\": \"0\",\n \"javaType\": \"Date\",\n \"htmlType\": \"datetime\"\n },\n {\n \"columnName\": \"status\",\n \"columnLabel\": \"状态\",\n \"columnComment\": \"借阅状态pending-待审核, borrowing-借阅中, returning-待确认归还, returned-已归还, cancelled-已取消, rejected-已拒绝\",\n \"columnType\": \"varchar(20)\",\n \"isPk\": \"0\",\n \"isIncrement\": \"0\",\n \"isRequired\": \"1\",\n \"javaType\": \"String\",\n \"htmlType\": \"select\",\n \"dictType\": \"borrow_record_status\",\n \"dictOptions\": [\n {\n \"value\": \"pending\",\n \"label\": \"待审核\"\n },\n {\n \"value\": \"borrowing\",\n \"label\": \"借阅中\"\n },\n {\n \"value\": \"returning\",\n \"label\": \"待确认归还\"\n },\n {\n \"value\": \"returned\",\n \"label\": \"已归还\"\n },\n {\n \"value\": \"cancelled\",\n \"label\": \"已取消\"\n },\n {\n \"value\": \"rejected\",\n \"label\": \"已拒绝\"\n }\n ]\n },\n {\n \"columnName\": \"approve_user_id\",\n \"columnLabel\": \"审核人\",\n \"columnComment\": \"审核通过的管理员ID关联admin表\",\n \"columnType\": \"bigint(20)\",\n \"isPk\": \"0\",\n \"isIncrement\": \"0\",\n \"isRequired\": \"0\",\n \"javaType\": \"Long\",\n \"htmlType\": \"select\",\n \"dictType\": \"remote:admin:id:username\"\n },\n {\n \"columnName\": \"approve_time\",\n \"columnLabel\": \"审核时间\",\n \"columnComment\": \"管理员审核通过时间\",\n \"columnType\": \"datetime\",\n \"isPk\": \"0\",\n \"isIncrement\": \"0\",\n \"isRequired\": \"0\",\n \"javaType\": \"Date\",\n \"htmlType\": \"datetime\"\n },\n {\n \"columnName\": \"confirm_user_id\",\n \"columnLabel\": \"确认归还人\",\n \"columnComment\": \"确认归还的管理员ID关联admin表\",\n \"columnType\": \"bigint(20)\",\n \"isPk\": \"0\",\n \"isIncrement\": \"0\",\n \"isRequired\": \"0\",\n \"javaType\": \"Long\",\n \"htmlType\": \"select\",\n \"dictType\": \"remote:admin:id:username\"\n },\n {\n \"columnName\": \"confirm_time\",\n \"columnLabel\": \"归还确认时间\",\n \"columnComment\": \"管理员确认归还时间\",\n \"columnType\": \"datetime\",\n \"isPk\": \"0\",\n \"isIncrement\": \"0\",\n \"isRequired\": \"0\",\n \"javaType\": \"Date\",\n \"htmlType\": \"datetime\"\n },\n {\n \"columnName\": \"created_at\",\n \"columnLabel\": \"创建时间\",\n \"columnComment\": \"记录创建时间(申请时间)\",\n \"columnType\": \"datetime\",\n \"isPk\": \"0\",\n \"isIncrement\": \"0\",\n \"isRequired\": \"1\",\n \"javaType\": \"Date\",\n \"htmlType\": \"datetime\"\n },\n {\n \"columnName\": \"updated_at\",\n \"columnLabel\": \"更新时间\",\n \"columnComment\": \"记录最后更新时间\",\n \"columnType\": \"datetime\",\n \"isPk\": \"0\",\n \"isIncrement\": \"0\",\n \"isRequired\": \"0\",\n \"javaType\": \"Date\",\n \"htmlType\": \"datetime\"\n }\n ]\n },\n {\n \"tableName\": \"reservation\",\n \"tableComment\": \"预约表\",\n \"adminMenuName\": \"预约管理\",\n \"operations\": {\n \"add\": true,\n \"edit\": false,\n \"remove\": false,\n \"removeType\": \"physical\",\n \"reason\": \"\"\n },\n \"columns\": [\n {\n \"columnName\": \"id\",\n \"columnLabel\": \"预约ID\",\n \"columnComment\": \"主键ID\",\n \"columnType\": \"bigint(20)\",\n \"isPk\": \"1\",\n \"isIncrement\": \"1\",\n \"isRequired\": \"1\",\n \"javaType\": \"Long\",\n \"htmlType\": \"input\"\n },\n {\n \"columnName\": \"reader_id\",\n \"columnLabel\": \"读者\",\n \"columnComment\": \"预约读者ID关联reader表\",\n \"columnType\": \"bigint(20)\",\n \"isPk\": \"0\",\n \"isIncrement\": \"0\",\n \"isRequired\": \"1\",\n \"javaType\": \"Long\",\n \"htmlType\": \"select\",\n \"dictType\": \"remote:reader:id:nickname\"\n },\n {\n \"columnName\": \"book_id\",\n \"columnLabel\": \"图书\",\n \"columnComment\": \"预约图书ID关联book_info表\",\n \"columnType\": \"bigint(20)\",\n \"isPk\": \"0\",\n \"isIncrement\": \"0\",\n \"isRequired\": \"1\",\n \"javaType\": \"Long\",\n \"htmlType\": \"select\",\n \"dictType\": \"remote:book_info:id:title\"\n },\n {\n \"columnName\": \"reserve_time\",\n \"columnLabel\": \"预约时间\",\n \"columnComment\": \"读者预约时间\",\n \"columnType\": \"datetime\",\n \"isPk\": \"0\",\n \"isIncrement\": \"0\",\n \"isRequired\": \"1\",\n \"javaType\": \"Date\",\n \"htmlType\": \"datetime\"\n },\n {\n \"columnName\": \"status\",\n \"columnLabel\": \"状态\",\n \"columnComment\": \"预约状态waiting-等待中, fulfilled-已借出, cancelled-已取消, expired-已过期\",\n \"columnType\": \"varchar(20)\",\n \"isPk\": \"0\",\n \"isIncrement\": \"0\",\n \"isRequired\": \"1\",\n \"javaType\": \"String\",\n \"htmlType\": \"select\",\n \"dictType\": \"reservation_status\",\n \"dictOptions\": [\n {\n \"value\": \"waiting\",\n \"label\": \"等待中\"\n },\n {\n \"value\": \"fulfilled\",\n \"label\": \"已借出\"\n },\n {\n \"value\": \"cancelled\",\n \"label\": \"已取消\"\n },\n {\n \"value\": \"expired\",\n \"label\": \"已过期\"\n }\n ]\n },\n {\n \"columnName\": \"expire_time\",\n \"columnLabel\": \"过期时间\",\n \"columnComment\": \"预约自动过期时间\",\n \"columnType\": \"datetime\",\n \"isPk\": \"0\",\n \"isIncrement\": \"0\",\n \"isRequired\": \"0\",\n \"javaType\": \"Date\",\n \"htmlType\": \"datetime\"\n },\n {\n \"columnName\": \"fulfilled_record_id\",\n \"columnLabel\": \"关联借阅记录\",\n \"columnComment\": \"预约后实际借出的借阅记录ID关联borrow_record表\",\n \"columnType\": \"bigint(20)\",\n \"isPk\": \"0\",\n \"isIncrement\": \"0\",\n \"isRequired\": \"0\",\n \"javaType\": \"Long\",\n \"htmlType\": \"select\",\n \"dictType\": \"remote:borrow_record:id:id\"\n }\n ]\n },\n {\n \"tableName\": \"fine\",\n \"tableComment\": \"罚款表\",\n \"adminMenuName\": \"逾期费用管理\",\n \"operations\": {\n \"add\": true,\n \"edit\": false,\n \"remove\": false,\n \"removeType\": \"physical\",\n \"reason\": \"\"\n },\n \"columns\": [\n {\n \"columnName\": \"id\",\n \"columnLabel\": \"罚款ID\",\n \"columnComment\": \"主键ID\",\n \"columnType\": \"bigint(20)\",\n \"isPk\": \"1\",\n \"isIncrement\": \"1\",\n \"isRequired\": \"1\",\n \"javaType\": \"Long\",\n \"htmlType\": \"input\"\n },\n {\n \"columnName\": \"reader_id\",\n \"columnLabel\": \"读者\",\n \"columnComment\": \"被罚款读者ID关联reader表\",\n \"columnType\": \"bigint(20)\",\n \"isPk\": \"0\",\n \"isIncrement\": \"0\",\n \"isRequired\": \"1\",\n \"javaType\": \"Long\",\n \"htmlType\": \"select\",\n \"dictType\": \"remote:reader:id:nickname\"\n },\n {\n \"columnName\": \"book_id\",\n \"columnLabel\": \"图书\",\n \"columnComment\": \"关联图书ID关联book_info表\",\n \"columnType\": \"bigint(20)\",\n \"isPk\": \"0\",\n \"isIncrement\": \"0\",\n \"isRequired\": \"1\",\n \"javaType\": \"Long\",\n \"htmlType\": \"select\",\n \"dictType\": \"remote:book_info:id:title\"\n },\n {\n \"columnName\": \"borrow_record_id\",\n \"columnLabel\": \"借阅记录\",\n \"columnComment\": \"关联借阅记录ID关联borrow_record表\",\n \"columnType\": \"bigint(20)\",\n \"isPk\": \"0\",\n \"isIncrement\": \"0\",\n \"isRequired\": \"1\",\n \"javaType\": \"Long\",\n \"htmlType\": \"select\",\n \"dictType\": \"remote:borrow_record:id:id\"\n },\n {\n \"columnName\": \"overdue_days\",\n \"columnLabel\": \"逾期天数\",\n \"columnComment\": \"实际逾期天数\",\n \"columnType\": \"int(11)\",\n \"isPk\": \"0\",\n \"isIncrement\": \"0\",\n \"isRequired\": \"1\",\n \"javaType\": \"Integer\",\n \"htmlType\": \"input\"\n },\n {\n \"columnName\": \"amount\",\n \"columnLabel\": \"罚款金额\",\n \"columnComment\": \"需缴纳的罚款金额(元)\",\n \"columnType\": \"decimal(10,2)\",\n \"isPk\": \"0\",\n \"isIncrement\": \"0\",\n \"isRequired\": \"1\",\n \"javaType\": \"BigDecimal\",\n \"htmlType\": \"input\"\n },\n {\n \"columnName\": \"status\",\n \"columnLabel\": \"状态\",\n \"columnComment\": \"罚款状态unpaid-未支付, paid-已支付, waived-已免除\",\n \"columnType\": \"varchar(20)\",\n \"isPk\": \"0\",\n \"isIncrement\": \"0\",\n \"isRequired\": \"1\",\n \"javaType\": \"String\",\n \"htmlType\": \"select\",\n \"dictType\": \"fine_status\",\n \"dictOptions\": [\n {\n \"value\": \"unpaid\",\n \"label\": \"未支付\"\n },\n {\n \"value\": \"paid\",\n \"label\": \"已支付\"\n },\n {\n \"value\": \"waived\",\n \"label\": \"已免除\"\n }\n ]\n },\n {\n \"columnName\": \"create_time\",\n \"columnLabel\": \"创建时间\",\n \"columnComment\": \"罚款记录生成时间\",\n \"columnType\": \"datetime\",\n \"isPk\": \"0\",\n \"isIncrement\": \"0\",\n \"isRequired\": \"1\",\n \"javaType\": \"Date\",\n \"htmlType\": \"datetime\"\n },\n {\n \"columnName\": \"pay_time\",\n \"columnLabel\": \"支付时间\",\n \"columnComment\": \"读者支付罚款时间\",\n \"columnType\": \"datetime\",\n \"isPk\": \"0\",\n \"isIncrement\": \"0\",\n \"isRequired\": \"0\",\n \"javaType\": \"Date\",\n \"htmlType\": \"datetime\"\n }\n ]\n },\n {\n \"tableName\": \"reader\",\n \"tableComment\": \"读者信息表\",\n \"adminMenuName\": \"读者管理\",\n \"operations\": {\n \"add\": true,\n \"edit\": true,\n \"remove\": true,\n \"removeType\": \"physical\",\n \"reason\": \"\"\n },\n \"columns\": [\n {\n \"columnName\": \"id\",\n \"columnLabel\": \"读者ID\",\n \"columnComment\": \"主键ID\",\n \"columnType\": \"bigint(20)\",\n \"isPk\": \"1\",\n \"isIncrement\": \"1\",\n \"isRequired\": \"1\",\n \"javaType\": \"Long\",\n \"htmlType\": \"input\"\n },\n {\n \"columnName\": \"username\",\n \"columnLabel\": \"用户名\",\n \"columnComment\": \"登录用户名\",\n \"columnType\": \"varchar(50)\",\n \"isPk\": \"0\",\n \"isIncrement\": \"0\",\n \"isRequired\": \"1\",\n \"javaType\": \"String\",\n \"htmlType\": \"input\"\n },\n {\n \"columnName\": \"password_hash\",\n \"columnLabel\": \"密码哈希\",\n \"columnComment\": \"加密后的密码\",\n \"columnType\": \"varchar(255)\",\n \"isPk\": \"0\",\n \"isIncrement\": \"0\",\n \"isRequired\": \"1\",\n \"javaType\": \"String\",\n \"htmlType\": \"input\"\n },\n {\n \"columnName\": \"nickname\",\n \"columnLabel\": \"昵称\",\n \"columnComment\": \"读者昵称/显示名\",\n \"columnType\": \"varchar(50)\",\n \"isPk\": \"0\",\n \"isIncrement\": \"0\",\n \"isRequired\": \"0\",\n \"javaType\": \"String\",\n \"htmlType\": \"input\"\n },\n {\n \"columnName\": \"status\",\n \"columnLabel\": \"状态\",\n \"columnComment\": \"读者账号状态active-正常, inactive-停用, locked-锁定\",\n \"columnType\": \"varchar(20)\",\n \"isPk\": \"0\",\n \"isIncrement\": \"0\",\n \"isRequired\": \"1\",\n \"javaType\": \"String\",\n \"htmlType\": \"select\",\n \"dictType\": \"reader_status\",\n \"dictOptions\": [\n {\n \"value\": \"active\",\n \"label\": \"正常\"\n },\n {\n \"value\": \"inactive\",\n \"label\": \"停用\"\n },\n {\n \"value\": \"locked\",\n \"label\": \"锁定\"\n }\n ]\n },\n {\n \"columnName\": \"create_time\",\n \"columnLabel\": \"创建时间\",\n \"columnComment\": \"账号创建时间\",\n \"columnType\": \"datetime\",\n \"isPk\": \"0\",\n \"isIncrement\": \"0\",\n \"isRequired\": \"1\",\n \"javaType\": \"Date\",\n \"htmlType\": \"datetime\"\n },\n {\n \"columnName\": \"real_name\",\n \"columnLabel\": \"真实姓名\",\n \"columnComment\": \"读者真实姓名\",\n \"columnType\": \"varchar(50)\",\n \"isPk\": \"0\",\n \"isIncrement\": \"0\",\n \"isRequired\": \"0\",\n \"javaType\": \"String\",\n \"htmlType\": \"input\"\n },\n {\n \"columnName\": \"student_id\",\n \"columnLabel\": \"学号\",\n \"columnComment\": \"读者学号/工号\",\n \"columnType\": \"varchar(20)\",\n \"isPk\": \"0\",\n \"isIncrement\": \"0\",\n \"isRequired\": \"0\",\n \"javaType\": \"String\",\n \"htmlType\": \"input\"\n },\n {\n \"columnName\": \"phone\",\n \"columnLabel\": \"手机号\",\n \"columnComment\": \"联系手机号码\",\n \"columnType\": \"varchar(20)\",\n \"isPk\": \"0\",\n \"isIncrement\": \"0\",\n \"isRequired\": \"0\",\n \"javaType\": \"String\",\n \"htmlType\": \"input\"\n },\n {\n \"columnName\": \"email\",\n \"columnLabel\": \"邮箱\",\n \"columnComment\": \"电子邮箱地址\",\n \"columnType\": \"varchar(100)\",\n \"isPk\": \"0\",\n \"isIncrement\": \"0\",\n \"isRequired\": \"0\",\n \"javaType\": \"String\",\n \"htmlType\": \"input\"\n },\n {\n \"columnName\": \"gender\",\n \"columnLabel\": \"性别\",\n \"columnComment\": \"读者性别\",\n \"columnType\": \"varchar(10)\",\n \"isPk\": \"0\",\n \"isIncrement\": \"0\",\n \"isRequired\": \"0\",\n \"javaType\": \"String\",\n \"htmlType\": \"select\",\n \"dictType\": \"gender\",\n \"dictOptions\": [\n {\n \"value\": \"male\",\n \"label\": \"男\"\n },\n {\n \"value\": \"female\",\n \"label\": \"女\"\n }\n ]\n },\n {\n \"columnName\": \"avatar\",\n \"columnLabel\": \"头像\",\n \"columnComment\": \"读者头像图片URL\",\n \"columnType\": \"varchar(255)\",\n \"isPk\": \"0\",\n \"isIncrement\": \"0\",\n \"isRequired\": \"0\",\n \"javaType\": \"String\",\n \"htmlType\": \"imageUpload\"\n },\n {\n \"columnName\": \"borrowed_count\",\n \"columnLabel\": \"当前借阅数\",\n \"columnComment\": \"当前正在借阅的图书数量\",\n \"columnType\": \"int(11)\",\n \"isPk\": \"0\",\n \"isIncrement\": \"0\",\n \"isRequired\": \"0\",\n \"javaType\": \"Integer\",\n \"htmlType\": \"input\"\n }\n ]\n },\n {\n \"tableName\": \"borrow_application\",\n \"tableComment\": \"借书申请表\",\n \"adminMenuName\": \"借书申请管理\",\n \"operations\": {\n \"add\": true,\n \"edit\": false,\n \"remove\": false,\n \"removeType\": \"physical\",\n \"reason\": \"\"\n },\n \"columns\": [\n {\n \"columnName\": \"id\",\n \"columnLabel\": \"申请ID\",\n \"columnComment\": \"主键ID\",\n \"columnType\": \"bigint(20)\",\n \"isPk\": \"1\",\n \"isIncrement\": \"1\",\n \"isRequired\": \"1\",\n \"javaType\": \"Long\",\n \"htmlType\": \"input\"\n },\n {\n \"columnName\": \"reader_id\",\n \"columnLabel\": \"读者\",\n \"columnComment\": \"申请读者ID关联reader表\",\n \"columnType\": \"bigint(20)\",\n \"isPk\": \"0\",\n \"isIncrement\": \"0\",\n \"isRequired\": \"1\",\n \"javaType\": \"Long\",\n \"htmlType\": \"select\",\n \"dictType\": \"remote:reader:id:nickname\"\n },\n {\n \"columnName\": \"book_id\",\n \"columnLabel\": \"图书\",\n \"columnComment\": \"申请图书ID关联book_info表\",\n \"columnType\": \"bigint(20)\",\n \"isPk\": \"0\",\n \"isIncrement\": \"0\",\n \"isRequired\": \"1\",\n \"javaType\": \"Long\",\n \"htmlType\": \"select\",\n \"dictType\": \"remote:book_info:id:title\"\n },\n {\n \"columnName\": \"apply_time\",\n \"columnLabel\": \"申请时间\",\n \"columnComment\": \"读者提交申请时间\",\n \"columnType\": \"datetime\",\n \"isPk\": \"0\",\n \"isIncrement\": \"0\",\n \"isRequired\": \"1\",\n \"javaType\": \"Date\",\n \"htmlType\": \"datetime\"\n },\n {\n \"columnName\": \"status\",\n \"columnLabel\": \"状态\",\n \"columnComment\": \"申请状态pending-待审核, approved-已通过, rejected-已拒绝, cancelled-已取消\",\n \"columnType\": \"varchar(20)\",\n \"isPk\": \"0\",\n \"isIncrement\": \"0\",\n \"isRequired\": \"1\",\n \"javaType\": \"String\",\n \"htmlType\": \"select\",\n \"dictType\": \"borrow_application_status\",\n \"dictOptions\": [\n {\n \"value\": \"pending\",\n \"label\": \"待审核\"\n },\n {\n \"value\": \"approved\",\n \"label\": \"已通过\"\n },\n {\n \"value\": \"rejected\",\n \"label\": \"已拒绝\"\n },\n {\n \"value\": \"cancelled\",\n \"label\": \"已取消\"\n }\n ]\n },\n {\n \"columnName\": \"approve_user_id\",\n \"columnLabel\": \"审批人\",\n \"columnComment\": \"审批管理员ID关联admin表\",\n \"columnType\": \"bigint(20)\",\n \"isPk\": \"0\",\n \"isIncrement\": \"0\",\n \"isRequired\": \"0\",\n \"javaType\": \"Long\",\n \"htmlType\": \"select\",\n \"dictType\": \"remote:admin:id:username\"\n },\n {\n \"columnName\": \"approve_time\",\n \"columnLabel\": \"审批时间\",\n \"columnComment\": \"管理员审批时间\",\n \"columnType\": \"datetime\",\n \"isPk\": \"0\",\n \"isIncrement\": \"0\",\n \"isRequired\": \"0\",\n \"javaType\": \"Date\",\n \"htmlType\": \"datetime\"\n },\n {\n \"columnName\": \"reject_reason\",\n \"columnLabel\": \"拒绝原因\",\n \"columnComment\": \"管理员拒绝申请的原因\",\n \"columnType\": \"varchar(255)\",\n \"isPk\": \"0\",\n \"isIncrement\": \"0\",\n \"isRequired\": \"0\",\n \"javaType\": \"String\",\n \"htmlType\": \"textarea\"\n }\n ]\n },\n {\n \"tableName\": \"admin\",\n \"tableComment\": \"管理员账号表\",\n \"adminMenuName\": \"管理员管理\",\n \"operations\": {\n \"add\": true,\n \"edit\": true,\n \"remove\": true,\n \"removeType\": \"physical\",\n \"reason\": \"\"\n },\n \"columns\": [\n {\n \"columnName\": \"id\",\n \"columnLabel\": \"管理员ID\",\n \"columnComment\": \"主键ID\",\n \"columnType\": \"bigint(20)\",\n \"isPk\": \"1\",\n \"isIncrement\": \"1\",\n \"isRequired\": \"1\",\n \"javaType\": \"Long\",\n \"htmlType\": \"input\"\n },\n {\n \"columnName\": \"username\",\n \"columnLabel\": \"用户名\",\n \"columnComment\": \"登录用户名\",\n \"columnType\": \"varchar(50)\",\n \"isPk\": \"0\",\n \"isIncrement\": \"0\",\n \"isRequired\": \"1\",\n \"javaType\": \"String\",\n \"htmlType\": \"input\"\n },\n {\n \"columnName\": \"password_hash\",\n \"columnLabel\": \"密码哈希\",\n \"columnComment\": \"加密后的密码\",\n \"columnType\": \"varchar(255)\",\n \"isPk\": \"0\",\n \"isIncrement\": \"0\",\n \"isRequired\": \"1\",\n \"javaType\": \"String\",\n \"htmlType\": \"input\"\n },\n {\n \"columnName\": \"nickname\",\n \"columnLabel\": \"昵称\",\n \"columnComment\": \"管理员显示名称\",\n \"columnType\": \"varchar(50)\",\n \"isPk\": \"0\",\n \"isIncrement\": \"0\",\n \"isRequired\": \"0\",\n \"javaType\": \"String\",\n \"htmlType\": \"input\"\n },\n {\n \"columnName\": \"status\",\n \"columnLabel\": \"状态\",\n \"columnComment\": \"管理员账号状态active-正常, inactive-停用\",\n \"columnType\": \"varchar(20)\",\n \"isPk\": \"0\",\n \"isIncrement\": \"0\",\n \"isRequired\": \"1\",\n \"javaType\": \"String\",\n \"htmlType\": \"select\",\n \"dictType\": \"admin_status\",\n \"dictOptions\": [\n {\n \"value\": \"active\",\n \"label\": \"正常\"\n },\n {\n \"value\": \"inactive\",\n \"label\": \"停用\"\n }\n ]\n },\n {\n \"columnName\": \"create_time\",\n \"columnLabel\": \"创建时间\",\n \"columnComment\": \"账号创建时间\",\n \"columnType\": \"datetime\",\n \"isPk\": \"0\",\n \"isIncrement\": \"0\",\n \"isRequired\": \"1\",\n \"javaType\": \"Date\",\n \"htmlType\": \"datetime\"\n }\n ]\n }\n ]\n}', '0', 56071, 9513, 1024, 8489, 9305, 1837, 9513, 9305, 18818, 3, 0.02711948, '1', NULL, '2026-07-14 16:23:51');
INSERT INTO `front_ai_usage_ledger` VALUES (121, NULL, NULL, NULL, 100, 'requirement', 'deepseek', 'deepseek-v4-flash', 'front.requirement', 'v2', '07d4c186c52634ef2c9f67640a638e0822c1e139b177ff2bc7eb3a10389e8164', '你是一键生成项目的需求补全助手。你的输出会作为后续生成应用蓝图、业务闭环、数据库、页面和源码的输入。\n\n请在保留用户原始描述的基础上补全必要的业务细节让系统能生成一个本科毕设/课程设计规模的完整项目。\n\n补全重点\n- 明确项目面向谁使用,包含 2 到 4 个角色;\n- 明确核心业务对象,例如订单、预约、借阅记录、商品、课程等;\n- 明确一条完整业务闭环:发起、审核/处理、完成、取消/拒绝/回退;\n- 明确关键业务规则:状态、时间期限、数量限制、金额/费用公式、库存或名额变化;\n- 明确异常边界:库存不足、重复提交、状态不符、超时、取消、支付失败等;\n- 可补充少量前台展示或内容维护模块,但不要扩展成大型平台。\n\n约束\n- 只输出中文纯文本,不要 Markdown不要 JSON不要解释。\n- 内容要短,控制在 300 字以内。\n- 不要写技术实现、接口、数据库表、字段、代码。\n- 不要输出“按实际情况”“待定”等模糊规则缺少关键数值时用合理默认值并标注“AI假设”。\n- 不要把 CRUD、统计报表、系统监控、操作日志当作核心业务。', '请根据以下项目输入,补全一段可直接用于一键生成项目的业务需求描述。\n\n输出格式\n项目定位\n角色\n核心流程\n关键规则\n异常边界\n\n项目输入 JSON\n{\"projectName\":\"图书管理系统\",\"currentDescription\":\"\"}', '项目定位面向高校图书馆的图书管理系统供学生、教师和管理员使用。角色学生、教师可借更多书且期限更长、管理员。核心业务对象图书、借阅记录、预约记录、罚款记录。核心流程用户检索图书→查看可借状态→借阅需未逾期、未超限→到期归还或续借每本限续借1次续借15天→逾期按0.1元/天罚款→管理员处理预约到书、上架新书。关键规则学生最多借5本期限30天教师最多10本期限60天。同一用户重复借阅同一本书仅在归还后方可再次借阅。预约图书到书后保留3天逾期释放。罚款累计超过10元暂停借阅权限。异常边界库存不足时不可借阅已预约图书不可借出给未预约用户超期未还不可再借图书状态为“在馆”才能借出用户存在欠款或黑名单时拒绝操作。', '0', 6551, 346, 256, 90, 338, 112, 346, 338, 684, 1, 0.00077112, '1', NULL, '2026-07-14 17:14:43');
INSERT INTO `front_ai_usage_ledger` VALUES (122, 104, 104, 104, 100, 'app_blueprint', 'deepseek', 'deepseek-v4-flash', 'front.app_blueprint', 'V1', 'c3ee0180ed446fe83055bd1c272ed1b6e3978584fe52f98f5e78e14e2cfc8f29', '你是应用蓝图架构师。只输出符合用户消息结构的 JSON规划业务角色、前台菜单与页面、后台菜单和运营看板。保持 pageCode、tableName、角色数据范围和登录要求前后一致只描述静态蓝图不生成数据库、权限表、菜单表或代码。角色名称使用简体中文技术标识使用稳定的小写 snake_case。', '根据项目输入 JSON 生成应用蓝图,只返回 JSON不要 Markdown 围栏或解释。\n输出结构{\"roles\":[{\"code\":\"reader\",\"name\":\"读者\",\"description\":\"\"}],\"frontendMenus\":[{\"code\":\"book_catalog\",\"name\":\"图书目录\",\"path\":\"/books\",\"pageCode\":\"book_catalog_page\",\"requiresLogin\":false,\"visibleRoles\":[],\"dataScope\":\"PUBLIC\"}],\"frontendPages\":[{\"code\":\"book_catalog_page\",\"name\":\"图书目录\",\"menuCode\":\"book_catalog\",\"path\":\"/books\",\"pageType\":\"list\",\"tableName\":\"book_info\"}],\"adminMenus\":[{\"code\":\"book_admin\",\"name\":\"图书管理\",\"path\":\"/admin/books\",\"pageCode\":\"book_admin_page\",\"tableName\":\"book_info\",\"pageType\":\"list\",\"requiresLogin\":true,\"visibleRoles\":[\"admin\"],\"dataScope\":\"ROLE\"}],\"adminHomeDashboard\":{\"title\":\"运营总览\",\"description\":\"核心业务数据\",\"metrics\":[],\"charts\":[]}}。\n蓝图描述目标生成项目而不是当前 EasyCode/RuoYi 平台。不要生成数据库表、菜单表、角色表、权限表或代码。\nrole.name 使用简体中文role.code 使用小写 snake_case。只有 role.code=admin 是系统管理员;名称含“管理员”或“后台”的业务角色仍保持独立。\nrole.name must be Simplified Chinese. Only role.code=admin is the system administrator.\n每个菜单必须包含 requiresLogin、visibleRoles、dataScopedataScope 只能是 PUBLIC、CURRENT_USER 或 ROLE。\nadminMenus 必须包含 pageCode、tableName、pageType个人资料使用 form普通管理使用 list。\nadminMenus must include pageCode, tableName, and pageType.\nfrontendMenus 顶层菜单应指向 pageCode详情页作为子页面不创建顶层详情菜单。\n不要为轮播图、banner、公告滚动条等首页装饰创建顶层菜单可放在首页业务块或作为后台维护数据。\nfrontendPages.pageType 只能是 list、current_user_list、detail、formtableName 必须是页面展示的业务表。\n同一业务对象只使用一个稳定 tableName后续数据库、闭环、页面、看板、动作必须复用不能使用同义表名。\nadminHomeDashboard 尽量包含 4 个业务指标和至少 2 张图表趋势图与分布图所有表字段必须可由后续数据库步骤创建。semantic 只能使用 money、order、user、task、warning、inventory、content、default。\n每个非 admin 角色使用表名等于 role.code 的独立账号表,不得创建共享 user、user_info、member 或 account 表。\nNever invent a shared user, user_info, member, or account table for role accounts.\n需要个人资料页时为每个非 admin 角色创建独立 form 页面和菜单tableName 绑定 role.codepageCode/path 带角色前缀visibleRoles 只包含该角色。\nCreate one form page and one menu per non-admin role when profile pages are needed.\n个人订单、借阅、资料、预约、支付等页面必须 requiresLogin=true 且 dataScope=CURRENT_USER。\n项目输入 JSON\n{\"projectName\":\"图书管理系统\",\"projectDescription\":\"项目定位面向高校图书馆的图书管理系统供学生、教师和管理员使用。角色学生、教师可借更多书且期限更长、管理员。核心业务对象图书、借阅记录、预约记录、罚款记录。核心流程用户检索图书→查看可借状态→借阅需未逾期、未超限→到期归还或续借每本限续借1次续借15天→逾期按0.1元/天罚款→管理员处理预约到书、上架新书。关键规则学生最多借5本期限30天教师最多10本期限60天。同一用户重复借阅同一本书仅在归还后方可再次借阅。预约图书到书后保留3天逾期释放。罚款累计超过10元暂停借阅权限。异常边界库存不足时不可借阅已预约图书不可借出给未预约用户超期未还不可再借图书状态为“在馆”才能借出用户存在欠款或黑名单时拒绝操作。\",\"industryTemplate\":\"\",\"stylePreset\":\"dark-tech\",\"extraRequirements\":\"\"}', '{\n \"roles\": [\n {\n \"code\": \"admin\",\n \"name\": \"管理员\",\n \"description\": \"系统管理员,管理图书、借阅、预约、罚款及用户账号\"\n },\n {\n \"code\": \"student\",\n \"name\": \"学生\",\n \"description\": \"学生用户可借阅图书最多5本期限30天\"\n },\n {\n \"code\": \"teacher\",\n \"name\": \"教师\",\n \"description\": \"教师用户可借阅图书最多10本期限60天\"\n }\n ],\n \"frontendMenus\": [\n {\n \"code\": \"book_catalog\",\n \"name\": \"图书目录\",\n \"path\": \"/books\",\n \"pageCode\": \"book_catalog_page\",\n \"requiresLogin\": false,\n \"visibleRoles\": [],\n \"dataScope\": \"PUBLIC\"\n },\n {\n \"code\": \"my_borrowings\",\n \"name\": \"我的借阅\",\n \"path\": \"/my/borrowings\",\n \"pageCode\": \"my_borrowings_page\",\n \"requiresLogin\": true,\n \"visibleRoles\": [\"student\", \"teacher\"],\n \"dataScope\": \"CURRENT_USER\"\n },\n {\n \"code\": \"my_reservations\",\n \"name\": \"我的预约\",\n \"path\": \"/my/reservations\",\n \"pageCode\": \"my_reservations_page\",\n \"requiresLogin\": true,\n \"visibleRoles\": [\"student\", \"teacher\"],\n \"dataScope\": \"CURRENT_USER\"\n },\n {\n \"code\": \"my_fines\",\n \"name\": \"我的罚款\",\n \"path\": \"/my/fines\",\n \"pageCode\": \"my_fines_page\",\n \"requiresLogin\": true,\n \"visibleRoles\": [\"student\", \"teacher\"],\n \"dataScope\": \"CURRENT_USER\"\n },\n {\n \"code\": \"student_profile\",\n \"name\": \"学生个人资料\",\n \"path\": \"/student/profile\",\n \"pageCode\": \"student_profile_page\",\n \"requiresLogin\": true,\n \"visibleRoles\": [\"student\"],\n \"dataScope\": \"CURRENT_USER\"\n },\n {\n \"code\": \"teacher_profile\",\n \"name\": \"教师个人资料\",\n \"path\": \"/teacher/profile\",\n \"pageCode\": \"teacher_profile_page\",\n \"requiresLogin\": true,\n \"visibleRoles\": [\"teacher\"],\n \"dataScope\": \"CURRENT_USER\"\n }\n ],\n \"frontendPages\": [\n {\n \"code\": \"book_catalog_page\",\n \"name\": \"图书目录\",\n \"menuCode\": \"book_catalog\",\n \"path\": \"/books\",\n \"pageType\": \"list\",\n \"tableName\": \"book_info\"\n },\n {\n \"code\": \"book_detail_page\",\n \"name\": \"图书详情\",\n \"menuCode\": null,\n \"path\": \"/books/:id\",\n \"pageType\": \"detail\",\n \"tableName\": \"book_info\"\n },\n {\n \"code\": \"my_borrowings_page\",\n \"name\": \"我的借阅\",\n \"menuCode\": \"my_borrowings\",\n \"path\": \"/my/borrowings\",\n \"pageType\": \"current_user_list\",\n \"tableName\": \"borrowing_record\"\n },\n {\n \"code\": \"my_reservations_page\",\n \"name\": \"我的预约\",\n \"menuCode\": \"my_reservations\",\n \"path\": \"/my/reservations\",\n \"pageType\": \"current_user_list\",\n \"tableName\": \"reservation\"\n },\n {\n \"code\": \"my_fines_page\",\n \"name\": \"我的罚款\",\n \"menuCode\": \"my_fines\",\n \"path\": \"/my/fines\",\n \"pageType\": \"current_user_list\",\n \"tableName\": \"fine\"\n },\n {\n \"code\": \"student_profile_page\",\n \"name\": \"学生个人资料\",\n \"menuCode\": \"student_profile\",\n \"path\": \"/student/profile\",\n \"pageType\": \"form\",\n \"tableName\": \"student\"\n },\n {\n \"code\": \"teacher_profile_page\",\n \"name\": \"教师个人资料\",\n \"menuCode\": \"teacher_profile\",\n \"path\": \"/teacher/profile\",\n \"pageType\": \"form\",\n \"tableName\": \"teacher\"\n }\n ],\n \"adminMenus\": [\n {\n \"code\": \"book_management\",\n \"name\": \"图书管理\",\n \"path\": \"/admin/books\",\n \"pageCode\": \"book_management_page\",\n \"tableName\": \"book_info\",\n \"pageType\": \"list\",\n \"requiresLogin\": true,\n \"visibleRoles\": [\"admin\"],\n \"dataScope\": \"ROLE\"\n },\n {\n \"code\": \"borrowing_management\",\n \"name\": \"借阅管理\",\n \"path\": \"/admin/borrowings\",\n \"pageCode\": \"borrowing_management_page\",\n \"tableName\": \"borrowing_record\",\n \"pageType\": \"list\",\n \"requiresLogin\": true,\n \"visibleRoles\": [\"admin\"],\n \"dataScope\": \"ROLE\"\n },\n {\n \"code\": \"reservation_management\",\n \"name\": \"预约管理\",\n \"path\": \"/admin/reservations\",\n \"pageCode\": \"reservation_management_page\",\n \"tableName\": \"reservation\",\n \"pageType\": \"list\",\n \"requiresLogin\": true,\n \"visibleRoles\": [\"admin\"],\n \"dataScope\": \"ROLE\"\n },\n {\n \"code\": \"fine_management\",\n \"name\": \"罚款管理\",\n \"path\": \"/admin/fines\",\n \"pageCode\": \"fine_management_page\",\n \"tableName\": \"fine\",\n \"pageType\": \"list\",\n \"requiresLogin\": true,\n \"visibleRoles\": [\"admin\"],\n \"dataScope\": \"ROLE\"\n },\n {\n \"code\": \"student_management\",\n \"name\": \"学生管理\",\n \"path\": \"/admin/students\",\n \"pageCode\": \"student_management_page\",\n \"tableName\": \"student\",\n \"pageType\": \"list\",\n \"requiresLogin\": true,\n \"visibleRoles\": [\"admin\"],\n \"dataScope\": \"ROLE\"\n },\n {\n \"code\": \"teacher_management\",\n \"name\": \"教师管理\",\n \"path\": \"/admin/teachers\",\n \"pageCode\": \"teacher_management_page\",\n \"tableName\": \"teacher\",\n \"pageType\": \"list\",\n \"requiresLogin\": true,\n \"visibleRoles\": [\"admin\"],\n \"dataScope\": \"ROLE\"\n }\n ],\n \"adminHomeDashboard\": {\n \"title\": \"运营总览\",\n \"description\": \"核心业务数据\",\n \"metrics\": [\n {\n \"label\": \"图书总数\",\n \"value\": 0,\n \"semantic\": \"content\"\n },\n {\n \"label\": \"本月借阅数\",\n \"value\": 0,\n \"semantic\": \"order\"\n },\n {\n \"label\": \"逾期未还数\",\n \"value\": 0,\n \"semantic\": \"warning\"\n },\n {\n \"label\": \"未缴罚款总额\",\n \"value\": 0,\n \"semantic\": \"money\"\n }\n ],\n \"charts\": [\n {\n \"title\": \"借阅趋势\",\n \"type\": \"line\",\n \"semantic\": \"order\",\n \"description\": \"按月统计借阅数量\"\n },\n {\n \"title\": \"图书分类分布\",\n \"type\": \"pie\",\n \"semantic\": \"content\",\n \"description\": \"各分类图书占比\"\n }\n ]\n }\n}', '0', 43008, 1013, 768, 245, 4017, 2314, 1013, 4017, 5030, 1, 0.00829436, '1', NULL, '2026-07-14 17:15:44');
INSERT INTO `front_ai_usage_ledger` VALUES (126, 106, 106, 105, 100, 'app_blueprint', 'deepseek', 'deepseek-v4-flash', 'front.app_blueprint', 'V1', 'c3ee0180ed446fe83055bd1c272ed1b6e3978584fe52f98f5e78e14e2cfc8f29', '你是应用蓝图架构师。只输出符合用户消息结构的 JSON规划业务角色、前台菜单与页面、后台菜单和运营看板。保持 pageCode、tableName、角色数据范围和登录要求前后一致只描述静态蓝图不生成数据库、权限表、菜单表或代码。角色名称使用简体中文技术标识使用稳定的小写 snake_case。', '根据项目输入 JSON 生成应用蓝图,只返回 JSON不要 Markdown 围栏或解释。\n输出结构{\"roles\":[{\"code\":\"reader\",\"name\":\"读者\",\"description\":\"\"}],\"frontendMenus\":[{\"code\":\"book_catalog\",\"name\":\"图书目录\",\"path\":\"/books\",\"pageCode\":\"book_catalog_page\",\"requiresLogin\":false,\"visibleRoles\":[],\"dataScope\":\"PUBLIC\"}],\"frontendPages\":[{\"code\":\"book_catalog_page\",\"name\":\"图书目录\",\"menuCode\":\"book_catalog\",\"path\":\"/books\",\"pageType\":\"list\",\"tableName\":\"book_info\"}],\"adminMenus\":[{\"code\":\"book_admin\",\"name\":\"图书管理\",\"path\":\"/admin/books\",\"pageCode\":\"book_admin_page\",\"tableName\":\"book_info\",\"pageType\":\"list\",\"requiresLogin\":true,\"visibleRoles\":[\"admin\"],\"dataScope\":\"ROLE\"}],\"adminHomeDashboard\":{\"title\":\"运营总览\",\"description\":\"核心业务数据\",\"metrics\":[],\"charts\":[]}}。\n蓝图描述目标生成项目而不是当前 EasyCode/RuoYi 平台。不要生成数据库表、菜单表、角色表、权限表或代码。\nrole.name 使用简体中文role.code 使用小写 snake_case。只有 role.code=admin 是系统管理员;名称含“管理员”或“后台”的业务角色仍保持独立。\nrole.name must be Simplified Chinese. Only role.code=admin is the system administrator.\n每个菜单必须包含 requiresLogin、visibleRoles、dataScopedataScope 只能是 PUBLIC、CURRENT_USER 或 ROLE。\nadminMenus 必须包含 pageCode、tableName、pageType个人资料使用 form普通管理使用 list。\nadminMenus must include pageCode, tableName, and pageType.\nfrontendMenus 顶层菜单应指向 pageCode详情页作为子页面不创建顶层详情菜单。\n不要为轮播图、banner、公告滚动条等首页装饰创建顶层菜单可放在首页业务块或作为后台维护数据。\nfrontendPages.pageType 只能是 list、current_user_list、detail、formtableName 必须是页面展示的业务表。\n同一业务对象只使用一个稳定 tableName后续数据库、闭环、页面、看板、动作必须复用不能使用同义表名。\nadminHomeDashboard 尽量包含 4 个业务指标和至少 2 张图表趋势图与分布图所有表字段必须可由后续数据库步骤创建。semantic 只能使用 money、order、user、task、warning、inventory、content、default。\n每个非 admin 角色使用表名等于 role.code 的独立账号表,不得创建共享 user、user_info、member 或 account 表。\nNever invent a shared user, user_info, member, or account table for role accounts.\n需要个人资料页时为每个非 admin 角色创建独立 form 页面和菜单tableName 绑定 role.codepageCode/path 带角色前缀visibleRoles 只包含该角色。\nCreate one form page and one menu per non-admin role when profile pages are needed.\n个人订单、借阅、资料、预约、支付等页面必须 requiresLogin=true 且 dataScope=CURRENT_USER。\n项目输入 JSON\n{\"projectName\":\"图书管理系统\",\"projectDescription\":\"功能:借书、还书、预约、取消预约\\n角色用户、管理员\\n其他模块轮播图、公告、新闻\",\"industryTemplate\":\"\",\"stylePreset\":\"dark-tech\",\"extraRequirements\":\"\"}', '{\n \"roles\": [\n {\n \"code\": \"admin\",\n \"name\": \"管理员\",\n \"description\": \"系统管理员,管理图书、借阅、读者、轮播图、公告、新闻等\"\n },\n {\n \"code\": \"reader\",\n \"name\": \"读者\",\n \"description\": \"借书、还书、预约、取消预约的普通用户\"\n }\n ],\n \"frontendMenus\": [\n {\n \"code\": \"book_catalog\",\n \"name\": \"图书目录\",\n \"path\": \"/books\",\n \"pageCode\": \"book_catalog_page\",\n \"requiresLogin\": false,\n \"visibleRoles\": [],\n \"dataScope\": \"PUBLIC\"\n },\n {\n \"code\": \"my_borrows\",\n \"name\": \"我的借阅\",\n \"path\": \"/my-borrows\",\n \"pageCode\": \"my_borrows_page\",\n \"requiresLogin\": true,\n \"visibleRoles\": [\"reader\"],\n \"dataScope\": \"CURRENT_USER\"\n },\n {\n \"code\": \"reader_profile\",\n \"name\": \"个人资料\",\n \"path\": \"/reader/profile\",\n \"pageCode\": \"reader_profile_page\",\n \"requiresLogin\": true,\n \"visibleRoles\": [\"reader\"],\n \"dataScope\": \"CURRENT_USER\"\n }\n ],\n \"frontendPages\": [\n {\n \"code\": \"book_catalog_page\",\n \"name\": \"图书目录\",\n \"menuCode\": \"book_catalog\",\n \"path\": \"/books\",\n \"pageType\": \"list\",\n \"tableName\": \"book_info\"\n },\n {\n \"code\": \"book_detail_page\",\n \"name\": \"图书详情\",\n \"menuCode\": \"book_catalog\",\n \"path\": \"/books/:id\",\n \"pageType\": \"detail\",\n \"tableName\": \"book_info\"\n },\n {\n \"code\": \"my_borrows_page\",\n \"name\": \"我的借阅\",\n \"menuCode\": \"my_borrows\",\n \"path\": \"/my-borrows\",\n \"pageType\": \"current_user_list\",\n \"tableName\": \"borrow_record\"\n },\n {\n \"code\": \"reader_profile_page\",\n \"name\": \"个人资料\",\n \"menuCode\": \"reader_profile\",\n \"path\": \"/reader/profile\",\n \"pageType\": \"form\",\n \"tableName\": \"reader\"\n }\n ],\n \"adminMenus\": [\n {\n \"code\": \"book_admin\",\n \"name\": \"图书管理\",\n \"path\": \"/admin/books\",\n \"pageCode\": \"book_admin_page\",\n \"tableName\": \"book_info\",\n \"pageType\": \"list\",\n \"requiresLogin\": true,\n \"visibleRoles\": [\"admin\"],\n \"dataScope\": \"ROLE\"\n },\n {\n \"code\": \"borrow_admin\",\n \"name\": \"借阅管理\",\n \"path\": \"/admin/borrows\",\n \"pageCode\": \"borrow_admin_page\",\n \"tableName\": \"borrow_record\",\n \"pageType\": \"list\",\n \"requiresLogin\": true,\n \"visibleRoles\": [\"admin\"],\n \"dataScope\": \"ROLE\"\n },\n {\n \"code\": \"reader_admin\",\n \"name\": \"读者管理\",\n \"path\": \"/admin/readers\",\n \"pageCode\": \"reader_admin_page\",\n \"tableName\": \"reader\",\n \"pageType\": \"list\",\n \"requiresLogin\": true,\n \"visibleRoles\": [\"admin\"],\n \"dataScope\": \"ROLE\"\n },\n {\n \"code\": \"carousel_admin\",\n \"name\": \"轮播图管理\",\n \"path\": \"/admin/carousels\",\n \"pageCode\": \"carousel_admin_page\",\n \"tableName\": \"carousel\",\n \"pageType\": \"list\",\n \"requiresLogin\": true,\n \"visibleRoles\": [\"admin\"],\n \"dataScope\": \"ROLE\"\n },\n {\n \"code\": \"announcement_admin\",\n \"name\": \"公告管理\",\n \"path\": \"/admin/announcements\",\n \"pageCode\": \"announcement_admin_page\",\n \"tableName\": \"announcement\",\n \"pageType\": \"list\",\n \"requiresLogin\": true,\n \"visibleRoles\": [\"admin\"],\n \"dataScope\": \"ROLE\"\n },\n {\n \"code\": \"news_admin\",\n \"name\": \"新闻管理\",\n \"path\": \"/admin/news\",\n \"pageCode\": \"news_admin_page\",\n \"tableName\": \"news\",\n \"pageType\": \"list\",\n \"requiresLogin\": true,\n \"visibleRoles\": [\"admin\"],\n \"dataScope\": \"ROLE\"\n }\n ],\n \"adminHomeDashboard\": {\n \"title\": \"运营总览\",\n \"description\": \"核心业务数据统计\",\n \"metrics\": [\n {\n \"label\": \"图书总量\",\n \"value\": null,\n \"semantic\": \"inventory\",\n \"tableName\": \"book_info\"\n },\n {\n \"label\": \"借出数量\",\n \"value\": null,\n \"semantic\": \"order\",\n \"tableName\": \"borrow_record\"\n },\n {\n \"label\": \"预约数量\",\n \"value\": null,\n \"semantic\": \"task\",\n \"tableName\": \"borrow_record\"\n },\n {\n \"label\": \"读者总数\",\n \"value\": null,\n \"semantic\": \"user\",\n \"tableName\": \"reader\"\n }\n ],\n \"charts\": [\n {\n \"label\": \"每日借阅趋势\",\n \"type\": \"line\",\n \"semantic\": \"order\",\n \"tableName\": \"borrow_record\",\n \"xField\": \"borrow_date\",\n \"yField\": \"count\"\n },\n {\n \"label\": \"图书分类分布\",\n \"type\": \"pie\",\n \"semantic\": \"content\",\n \"tableName\": \"book_info\",\n \"xField\": \"category\",\n \"yField\": \"count\"\n }\n ]\n }\n}', '0', 31129, 817, 768, 49, 4165, 2831, 817, 4165, 4982, 1, 0.00839436, '1', NULL, '2026-07-14 17:24:47');
INSERT INTO `front_ai_usage_ledger` VALUES (127, 106, 106, 105, 100, 'flow_config', 'deepseek', 'deepseek-v4-flash', 'front.flow_config', 'V1', '247495840c67968896ccad2db0a599bd4fc594d0189157dce888b8ede90b3257', '你是业务流程配置设计器。只输出一个合法 JSON 对象,不输出 Markdown、解释或 SQL。\n\n目标用最小 flow_config 描述状态流转、显式 Java 业务动作、多表数量联动、按钮和统计。不要输出 CRUD不要输出通用规则 DSL。\n\n固定结构\n{\n \"version\":\"1.0\",\n \"code\":\"snake_case\",\n \"name\":\"中文业务名\",\n \"mainTable\":\"snake_case\",\n \"statusField\":\"status\",\n \"notFoundMessage\":\"主记录不存在\",\n \"states\":[{\"code\":\"pending\",\"label\":\"待审核\"}],\n \"actions\":[{\n \"code\":\"approve\",\n \"name\":\"审核通过\",\n \"from\":\"pending\",\n \"to\":\"borrowing\",\n \"actor\":\"admin\",\n \"method\":\"POST\",\n \"path\":\"/borrow-record/approve\",\n \"invalidStateMessage\":\"当前状态不能审核\",\n \"successMessage\":\"审核成功\",\n \"audit\":{\"userField\":\"approve_user_id\",\"timeField\":\"approve_time\"},\n \"effects\":[{\n \"type\":\"decrease\",\n \"table\":\"book\",\n \"relationField\":\"book_id\",\n \"field\":\"stock\",\n \"amount\":\"1\",\n \"min\":\"0\",\n \"notFoundMessage\":\"图书不存在\",\n \"errorMessage\":\"图书库存不足\"\n }],\n \"button\":{\"scope\":\"admin\",\"pageCode\":\"borrow_record_list\",\"slot\":\"list.rowActions\",\"type\":\"success\",\"confirm\":\"确认审核通过吗?\",\"order\":10}\n }],\n \"metrics\":[{\"code\":\"borrowing_count\",\"name\":\"借阅中数量\",\"table\":\"borrow_record\",\"aggregate\":\"count\",\"field\":\"id\",\"status\":\"borrowing\",\"unit\":\"条\"}]\n}\n\n约束\n1. code、表名、字段名全部使用小写 snake_case状态 code 使用稳定英文编码label 使用中文。\n2. 每个 action 必须有 from 和 to且二者存在于 states 中并且不相同。\n3. effects.type 只能是 decrease、increase、update_related、create_record。\n4. decrease/increase 必须给 table、relationField、field、amountdecrease 还要给 min。\n5. update_related/create_record 使用 values值可为 currentUserId、now、record.字段名或常量。\n6. 审核人等身份只能通过 audit.userField 表达,由后端登录态注入,不能作为前端可传字段。\n7. 覆盖需求中的完整正向闭环和关键回退/拒绝动作,但不要为普通 CRUD 创建 action。', '请根据以下 JSON 上下文生成 flow_config。appBlueprint 是已确认的页面、角色和菜单范围,必须与它保持一致:\n{\"mode\":\"generate\",\"projectName\":\"图书管理系统\",\"projectDescription\":\"功能:借书、还书、预约、取消预约\\n角色用户、管理员\\n其他模块轮播图、公告、新闻\",\"industryTemplate\":\"\",\"stylePreset\":\"dark-tech\",\"extraRequirements\":\"\",\"confirmedAppBlueprint\":{\"adminHomeDashboard\":{\"charts\":[{\"filters\":[],\"metrics\":[],\"semantic\":\"order\",\"tableName\":\"borrow_record\",\"type\":\"line\"},{\"filters\":[],\"metrics\":[],\"semantic\":\"content\",\"tableName\":\"book_info\",\"type\":\"pie\"}],\"description\":\"核心业务数据统计\",\"metrics\":[{\"filters\":[],\"semantic\":\"inventory\",\"tableName\":\"book_info\"},{\"filters\":[],\"semantic\":\"order\",\"tableName\":\"borrow_record\"},{\"filters\":[],\"semantic\":\"task\",\"tableName\":\"borrow_record\"},{\"filters\":[],\"semantic\":\"user\",\"tableName\":\"reader\"}],\"title\":\"运营总览\"},\"adminMenus\":[{\"code\":\"book_admin\",\"dataScope\":\"ROLE\",\"name\":\"图书管理\",\"pageCode\":\"book_admin_page\",\"pageType\":\"list\",\"path\":\"/admin/books\",\"requiresLogin\":true,\"tableName\":\"book_info\",\"visibleRoles\":[\"admin\"]},{\"code\":\"borrow_admin\",\"dataScope\":\"ROLE\",\"name\":\"借阅管理\",\"pageCode\":\"borrow_admin_page\",\"pageType\":\"list\",\"path\":\"/admin/borrows\",\"requiresLogin\":true,\"tableName\":\"borrow_record\",\"visibleRoles\":[\"admin\"]},{\"code\":\"reader_admin\",\"dataScope\":\"ROLE\",\"name\":\"读者管理\",\"pageCode\":\"reader_admin_page\",\"pageType\":\"list\",\"path\":\"/admin/readers\",\"requiresLogin\":true,\"tableName\":\"reader\",\"visibleRoles\":[\"admin\"]},{\"code\":\"carousel_admin\",\"dataScope\":\"ROLE\",\"name\":\"轮播图管理\",\"pageCode\":\"carousel_admin_page\",\"pageType\":\"list\",\"path\":\"/admin/carousels\",\"requiresLogin\":true,\"tableName\":\"carousel\",\"visibleRoles\":[\"admin\"]},{\"code\":\"announcement_admin\",\"dataScope\":\"ROLE\",\"name\":\"公告管理\",\"pageCode\":\"announcement_admin_page\",\"pageType\":\"list\",\"path\":\"/admin/announcements\",\"requiresLogin\":true,\"tableName\":\"announcement\",\"visibleRoles\":[\"admin\"]},{\"code\":\"news_admin\",\"dataScope\":\"ROLE\",\"name\":\"新闻管理\",\"pageCode\":\"news_admin_page\",\"pageType\":\"list\",\"path\":\"/admin/news\",\"requiresLogin\":true,\"tableName\":\"news\",\"visibleRoles\":[\"admin\"]}],\"frontendMenus\":[{\"code\":\"book_catalog\",\"dataScope\":\"PUBLIC\",\"name\":\"图书目录\",\"pageCode\":\"book_catalog_page\",\"pageType\":\"\",\"path\":\"/books\",\"requiresLogin\":false,\"tableName\":\"\",\"visibleRoles\":[]},{\"code\":\"my_borrows\",\"dataScope\":\"CURRENT_USER\",\"name\":\"我的借阅\",\"pageCode\":\"my_borrows_page\",\"pageType\":\"\",\"path\":\"/my-borrows\",\"requiresLogin\":true,\"tableName\":\"\",\"visibleRoles\":[\"reader\"]},{\"code\":\"reader_profile\",\"dataScope\":\"CURRENT_USER\",\"name\":\"个人资料\",\"pageCode\":\"reader_profile_page\",\"pageType\":\"\",\"path\":\"/reader/profile\",\"requiresLogin\":true,\"tableName\":\"\",\"visibleRoles\":[\"reader\"]}],\"frontendPages\":[{\"code\":\"book_catalog_page\",\"menuCode\":\"book_catalog\",\"name\":\"图书目录\",\"pageType\":\"list\",\"parentPageCode\":\"\",\"path\":\"/books\",\"tableName\":\"book_info\"},{\"code\":\"book_detail_page\",\"menuCode\":\"book_catalog\",\"name\":\"图书详情\",\"pageType\":\"detail\",\"parentPageCode\":\"\",\"path\":\"/books/:id\",\"tableName\":\"book_info\"},{\"code\":\"my_borrows_page\",\"menuCode\":\"my_borrows\",\"name\":\"我的借阅\",\"pageType\":\"current_user_list\",\"parentPageCode\":\"\",\"path\":\"/my-borrows\",\"tableName\":\"borrow_record\"},{\"code\":\"reader_profile_page\",\"menuCode\":\"reader_profile\",\"name\":\"个人资料\",\"pageType\":\"form\",\"parentPageCode\":\"\",\"path\":\"/reader/profile\",\"tableName\":\"reader\"}],\"roles\":[{\"code\":\"admin\",\"description\":\"系统管理员,管理图书、借阅、读者、轮播图、公告、新闻等\",\"name\":\"管理员\"},{\"code\":\"reader\",\"description\":\"借书、还书、预约、取消预约的普通用户\",\"name\":\"读者\"}]}}', '{\n \"version\": \"1.0\",\n \"code\": \"borrow_record\",\n \"name\": \"借阅管理\",\n \"mainTable\": \"borrow_record\",\n \"statusField\": \"status\",\n \"notFoundMessage\": \"借阅记录不存在\",\n \"states\": [\n {\"code\": \"pending\", \"label\": \"待审核\"},\n {\"code\": \"borrowing\", \"label\": \"借出中\"},\n {\"code\": \"returned\", \"label\": \"已归还\"},\n {\"code\": \"reserved\", \"label\": \"已预约\"},\n {\"code\": \"canceled\", \"label\": \"已取消\"}\n ],\n \"actions\": [\n {\n \"code\": \"admin_approve\",\n \"name\": \"审核通过\",\n \"from\": \"pending\",\n \"to\": \"borrowing\",\n \"actor\": \"admin\",\n \"method\": \"POST\",\n \"path\": \"/borrow-record/approve\",\n \"invalidStateMessage\": \"当前状态不能审核通过\",\n \"successMessage\": \"审核成功,图书已借出\",\n \"audit\": {\"userField\": \"approve_user_id\", \"timeField\": \"approve_time\"},\n \"effects\": [\n {\n \"type\": \"decrease\",\n \"table\": \"book_info\",\n \"relationField\": \"book_id\",\n \"field\": \"stock\",\n \"amount\": \"1\",\n \"min\": \"0\",\n \"notFoundMessage\": \"图书不存在\",\n \"errorMessage\": \"图书库存不足\"\n }\n ],\n \"button\": {\n \"scope\": \"admin\",\n \"pageCode\": \"borrow_admin_page\",\n \"slot\": \"list.rowActions\",\n \"type\": \"success\",\n \"confirm\": \"确认审核通过吗?\",\n \"order\": 10\n }\n },\n {\n \"code\": \"admin_reject\",\n \"name\": \"拒绝申请\",\n \"from\": \"pending\",\n \"to\": \"canceled\",\n \"actor\": \"admin\",\n \"method\": \"POST\",\n \"path\": \"/borrow-record/reject\",\n \"invalidStateMessage\": \"当前状态不能拒绝\",\n \"successMessage\": \"申请已拒绝\",\n \"audit\": {\"userField\": \"approve_user_id\", \"timeField\": \"approve_time\"},\n \"effects\": [],\n \"button\": {\n \"scope\": \"admin\",\n \"pageCode\": \"borrow_admin_page\",\n \"slot\": \"list.rowActions\",\n \"type\": \"danger\",\n \"confirm\": \"确认拒绝该借书申请吗?\",\n \"order\": 20\n }\n },\n {\n \"code\": \"admin_return\",\n \"name\": \"确认还书\",\n \"from\": \"borrowing\",\n \"to\": \"returned\",\n \"actor\": \"admin\",\n \"method\": \"POST\",\n \"path\": \"/borrow-record/return\",\n \"invalidStateMessage\": \"当前状态不能还书\",\n \"successMessage\": \"还书成功\",\n \"audit\": {\"userField\": \"return_user_id\", \"timeField\": \"return_time\"},\n \"effects\": [\n {\n \"type\": \"increase\",\n \"table\": \"book_info\",\n \"relationField\": \"book_id\",\n \"field\": \"stock\",\n \"amount\": \"1\",\n \"notFoundMessage\": \"图书不存在\",\n \"errorMessage\": \"图书库存恢复失败\"\n }\n ],\n \"button\": {\n \"scope\": \"admin\",\n \"pageCode\": \"borrow_admin_page\",\n \"slot\": \"list.rowActions\",\n \"type\": \"primary\",\n \"confirm\": \"确认已归还图书?\",\n \"order\": 30\n }\n },\n {\n \"code\": \"user_cancel_apply\",\n \"name\": \"取消申请\",\n \"from\": \"pending\",\n \"to\": \"canceled\",\n \"actor\": \"reader\",\n \"method\": \"POST\",\n \"path\": \"/my-borrows/cancel-apply\",\n \"invalidStateMessage\": \"当前状态不能取消申请\",\n \"successMessage\": \"借书申请已取消\",\n \"audit\": {},\n \"effects\": [],\n \"button\": {\n \"scope\": \"reader\",\n \"pageCode\": \"my_borrows_page\",\n \"slot\": \"list.rowActions\",\n \"type\": \"default\",\n \"confirm\": \"确认取消借书申请?\",\n \"order\": 10\n }\n },\n {\n \"code\": \"user_cancel_reserve\",\n \"name\": \"取消预约\",\n \"from\": \"reserved\",\n \"to\": \"canceled\",\n \"actor\": \"reader\",\n \"method\": \"POST\",\n \"path\": \"/my-borrows/cancel-reserve\",\n \"invalidStateMessage\": \"当前状态不能取消预约\",\n \"successMessage\": \"预约已取消\",\n \"audit\": {},\n \"effects\": [],\n \"button\": {\n \"scope\": \"reader\",\n \"pageCode\": \"my_borrows_page\",\n \"slot\": \"list.rowActions\",\n \"type\": \"default\",\n \"confirm\": \"确认取消预约?\",\n \"order\": 20\n }\n }\n ],\n \"metrics\": [\n {\n \"code\": \"borrowing_count\",\n \"name\": \"借阅中数量\",\n \"table\": \"borrow_record\",\n \"aggregate\": \"count\",\n \"field\": \"id\",\n \"status\": \"borrowing\",\n \"unit\": \"条\"\n },\n {\n \"code\": \"pending_count\",\n \"name\": \"待审核数量\",\n \"table\": \"borrow_record\",\n \"aggregate\": \"count\",\n \"field\": \"id\",\n \"status\": \"pending\",\n \"unit\": \"条\"\n },\n {\n \"code\": \"total_books\",\n \"name\": \"图书总量\",\n \"table\": \"book_info\",\n \"aggregate\": \"count\",\n \"field\": \"id\",\n \"status\": null,\n \"unit\": \"本\"\n },\n {\n \"code\": \"total_readers\",\n \"name\": \"读者数量\",\n \"table\": \"reader\",\n \"aggregate\": \"count\",\n \"field\": \"id\",\n \"status\": null,\n \"unit\": \"人\"\n }\n ]\n}', '0', 37721, 1526, 512, 1014, 4472, 3099, 1526, 4472, 5998, 1, 0.00996824, '1', NULL, '2026-07-14 17:25:25');
INSERT INTO `front_ai_usage_ledger` VALUES (128, 106, 106, 105, 100, 'database', 'deepseek', 'deepseek-v4-flash', 'front.database', 'V1', '14dcad479b01de068e5c5bc39b5cd7a591a09d334ee6812483d8ac00dd8c9d61', '你是 MySQL 业务数据库设计专家。只输出符合用户消息结构的 JSON根据已确认的应用蓝图和业务闭环生成可直接落地的表、字段、主外键、字典和表操作策略。字段必须业务化且类型合法所有蓝图与闭环引用必须有真实表字段承载不得生成菜单、权限关系、代码或业务动作。', '根据项目输入 JSON 生成 MySQL 数据库设计 JSON只返回 JSON不要 Markdown 围栏或解释。\nConfirmed app blueprint JSON and Confirmed business loop plan JSON are supplied in the input.\nDatabase generation constraints from the business loop plan must be enforced.\nEvery confirmedBusinessLoopPlan.metrics tableName, field, and filters.field must exist in the generated schema. Numeric sum/avg/min/max metric fields must use a compatible numeric column type. Status-filter metric values must remain compatible with the matching stateMachines.states.\nIf input.mode is correction, repair input.originalResponse according to input.validationError and return the complete corrected database JSON. Do not drop unrelated valid tables or fields.\n输出结构{\"tables\":[{\"tableName\":\"car_info\",\"tableComment\":\"车辆信息表\",\"adminMenuName\":\"车辆管理\",\"operations\":{\"add\":true,\"edit\":true,\"remove\":true,\"removeType\":\"physical\",\"reason\":\"\"},\"columns\":[{\"columnName\":\"id\",\"columnLabel\":\"ID\",\"columnComment\":\"主键ID\",\"columnType\":\"bigint(20)\",\"isPk\":\"1\",\"isIncrement\":\"1\",\"isRequired\":\"1\"}]}]}。\n不要使用 field_1 等占位字段;每个表必须包含非空 columns以及 adminMenuName 和 operations.add/edit/remove/removeType/reason。\nadminMenuName 必须来自本表 tableComment/tableName不得复用其他表或宽泛模块名称。\nadminMenuName must come from that table\'s own tableComment or tableName.\n字段数组名称只能是 columns不能使用 fields、fieldDesign、fieldList、columnList。\nEvery table must include a non-empty columns array; use columns exactly.\n每个字段必须包含 columnName、columnLabel、columnComment、columnType、isPk、isIncrement、isRequired。columnLabel 是短 UI 标签columnComment 是完整数据库说明。\n可提供 javaType、htmlTypehtmlType 只能是 input、textarea、select、radio、checkbox、datetime、imageUpload、fileUpload、editor。\nselect/radio/checkbox 应提供 dictType 和 dictOptions。关联选择使用 remote:target_table:value_field:label_field且目标表和值/标签字段必须都存在于本次 tables JSON。\n非主键外键字段应在目标表存在时使用 remote select无目标表的分类、类型、状态使用本地 dictOptions 或普通输入。\n普通主数据表除唯一主键外至少包含 4 个业务字段。\n订单、支付、借还、审批、流程、任务、库存记录等动作记录表使用仅新增关系、审计、日志、历史表使用只读普通主数据表使用完整 CRUD。\n不要生成 businessActions、业务动作、工作流、代码、菜单表、user_role、角色权限表或权限表。\nDo not generate menu tables, user_role tables, role-permission tables, or permission tables.\n表名字段名只使用小写字母、数字、下划线每表必须且只能有一个主键。字段类型只能使用 bigint(20)、int(11)、varchar(n)、char(n)、decimal(p,s)、datetime、date、text、longtext。\n为 confirmedAppBlueprint.roles 中每个角色创建独立账号表admin 使用 admin其他角色使用 role.code。不得使用共享用户表或 role_id/role_code/user_role。\n角色账号表包含 `<role_code>_id` 自增主键、username、password_hash、nickname、status、create_time。admin 只能登录后台,非 admin 角色登录前台。\n生成 frontendPages.tableName 引用的全部表;个人资料页必须绑定对应非 admin 角色账号表。requiresLogin=true 且 dataScope=CURRENT_USER 的业务数据通常包含 user_id。\ncanonicalTableRegistry 中的名称是最终规范表名。confirmedBusinessLoopPlan 若出现与其指向同一业务对象的同义表名,必须使用 canonicalTableRegistry 中的名称,不得同时生成两张同义表。\n根据 confirmedBusinessLoopPlan 创建 coreObjects.tableName、actions.ownerTable补齐 stateMachines.statusField、quantityRules.quantityField 以及 recordRules 和动作前置条件需要的字段。状态值不得超出 stateMachines.states。\n严格实现 confirmedBusinessLoopPlan.businessPoliciesTIME_LIMIT 的 startField、dueField 使用 datetimeOVERDUE_FEE 的 dueField 使用 datetime、daysTargetField 使用 int(11)、targetField 使用 decimal(10,2)QUANTITY_LIMIT 的 targetField 使用 int(11) 且默认值为 0。所有政策字段必须位于政策指定的 tableName禁止只把期限或公式写进 columnComment 而不创建字段。\nDo not invent status values outside stateMachines.states.\n严格遵守 input.limits.maxTables 和 maxColumnsPerTable。\n项目输入 JSON\n{\"mode\":\"generate\",\"projectName\":\"图书管理系统\",\"projectDescription\":\"功能:借书、还书、预约、取消预约\\n角色用户、管理员\\n其他模块轮播图、公告、新闻\",\"industryTemplate\":\"\",\"stylePreset\":\"dark-tech\",\"extraRequirements\":\"\",\"confirmedAppBlueprint\":{\"adminHomeDashboard\":{\"charts\":[{\"filters\":[],\"metrics\":[],\"semantic\":\"order\",\"tableName\":\"borrow_record\",\"type\":\"line\"},{\"filters\":[],\"metrics\":[],\"semantic\":\"content\",\"tableName\":\"book_info\",\"type\":\"pie\"}],\"description\":\"核心业务数据统计\",\"metrics\":[{\"filters\":[],\"semantic\":\"inventory\",\"tableName\":\"book_info\"},{\"filters\":[],\"semantic\":\"order\",\"tableName\":\"borrow_record\"},{\"filters\":[],\"semantic\":\"task\",\"tableName\":\"borrow_record\"},{\"filters\":[],\"semantic\":\"user\",\"tableName\":\"reader\"}],\"title\":\"运营总览\"},\"adminMenus\":[{\"code\":\"book_admin\",\"dataScope\":\"ROLE\",\"name\":\"图书管理\",\"pageCode\":\"book_admin_page\",\"pageType\":\"list\",\"path\":\"/admin/books\",\"requiresLogin\":true,\"tableName\":\"book_info\",\"visibleRoles\":[\"admin\"]},{\"code\":\"borrow_admin\",\"dataScope\":\"ROLE\",\"name\":\"借阅管理\",\"pageCode\":\"borrow_admin_page\",\"pageType\":\"list\",\"path\":\"/admin/borrows\",\"requiresLogin\":true,\"tableName\":\"borrow_record\",\"visibleRoles\":[\"admin\"]},{\"code\":\"reader_admin\",\"dataScope\":\"ROLE\",\"name\":\"读者管理\",\"pageCode\":\"reader_admin_page\",\"pageType\":\"list\",\"path\":\"/admin/readers\",\"requiresLogin\":true,\"tableName\":\"reader\",\"visibleRoles\":[\"admin\"]},{\"code\":\"carousel_admin\",\"dataScope\":\"ROLE\",\"name\":\"轮播图管理\",\"pageCode\":\"carousel_admin_page\",\"pageType\":\"list\",\"path\":\"/admin/carousels\",\"requiresLogin\":true,\"tableName\":\"carousel\",\"visibleRoles\":[\"admin\"]},{\"code\":\"announcement_admin\",\"dataScope\":\"ROLE\",\"name\":\"公告管理\",\"pageCode\":\"announcement_admin_page\",\"pageType\":\"list\",\"path\":\"/admin/announcements\",\"requiresLogin\":true,\"tableName\":\"announcement\",\"visibleRoles\":[\"admin\"]},{\"code\":\"news_admin\",\"dataScope\":\"ROLE\",\"name\":\"新闻管理\",\"pageCode\":\"news_admin_page\",\"pageType\":\"list\",\"path\":\"/admin/news\",\"requiresLogin\":true,\"tableName\":\"news\",\"visibleRoles\":[\"admin\"]}],\"frontendMenus\":[{\"code\":\"book_catalog\",\"dataScope\":\"PUBLIC\",\"name\":\"图书目录\",\"pageCode\":\"book_catalog_page\",\"pageType\":\"\",\"path\":\"/books\",\"requiresLogin\":false,\"tableName\":\"\",\"visibleRoles\":[]},{\"code\":\"my_borrows\",\"dataScope\":\"CURRENT_USER\",\"name\":\"我的借阅\",\"pageCode\":\"my_borrows_page\",\"pageType\":\"\",\"path\":\"/my-borrows\",\"requiresLogin\":true,\"tableName\":\"\",\"visibleRoles\":[\"reader\"]},{\"code\":\"reader_profile\",\"dataScope\":\"CURRENT_USER\",\"name\":\"个人资料\",\"pageCode\":\"reader_profile_page\",\"pageType\":\"\",\"path\":\"/reader/profile\",\"requiresLogin\":true,\"tableName\":\"\",\"visibleRoles\":[\"reader\"]}],\"frontendPages\":[{\"code\":\"book_catalog_page\",\"menuCode\":\"book_catalog\",\"name\":\"图书目录\",\"pageType\":\"list\",\"parentPageCode\":\"\",\"path\":\"/books\",\"tableName\":\"book_info\"},{\"code\":\"book_detail_page\",\"menuCode\":\"book_catalog\",\"name\":\"图书详情\",\"pageType\":\"detail\",\"parentPageCode\":\"\",\"path\":\"/books/:id\",\"tableName\":\"book_info\"},{\"code\":\"my_borrows_page\",\"menuCode\":\"my_borrows\",\"name\":\"我的借阅\",\"pageType\":\"current_user_list\",\"parentPageCode\":\"\",\"path\":\"/my-borrows\",\"tableName\":\"borrow_record\"},{\"code\":\"reader_profile_page\",\"menuCode\":\"reader_profile\",\"name\":\"个人资料\",\"pageType\":\"form\",\"parentPageCode\":\"\",\"path\":\"/reader/profile\",\"tableName\":\"reader\"}],\"roles\":[{\"code\":\"admin\",\"description\":\"系统管理员,管理图书、借阅、读者、轮播图、公告、新闻等\",\"name\":\"管理员\"},{\"code\":\"reader\",\"description\":\"借书、还书、预约、取消预约的普通用户\",\"name\":\"读者\"}]},\"flowConfig\":{\"actions\":[{\"actor\":\"admin\",\"audit\":{\"timeField\":\"approve_time\",\"userField\":\"approve_user_id\"},\"button\":{\"confirm\":\"确认审核通过吗?\",\"order\":10,\"pageCode\":\"borrow_admin_page\",\"scope\":\"admin\",\"slot\":\"list.rowActions\",\"type\":\"success\"},\"code\":\"admin_approve\",\"effects\":[{\"amount\":\"1\",\"errorMessage\":\"图书库存不足\",\"field\":\"stock\",\"min\":\"0\",\"notFoundMessage\":\"图书不存在\",\"relationField\":\"book_id\",\"table\":\"book_info\",\"type\":\"decrease\",\"values\":{}}],\"from\":\"pending\",\"invalidStateMessage\":\"当前状态不能审核通过\",\"method\":\"POST\",\"name\":\"审核通过\",\"path\":\"/borrow-record/approve\",\"successMessage\":\"审核成功,图书已借出\",\"to\":\"borrowing\"},{\"actor\":\"admin\",\"audit\":{\"timeField\":\"approve_time\",\"userField\":\"approve_user_id\"},\"button\":{\"confirm\":\"确认拒绝该借书申请吗?\",\"order\":20,\"pageCode\":\"borrow_admin_page\",\"scope\":\"admin\",\"slot\":\"list.rowActions\",\"type\":\"danger\"},\"code\":\"admin_reject\",\"effects\":[],\"from\":\"pending\",\"invalidStateMessage\":\"当前状态不能拒绝\",\"method\":\"POST\",\"name\":\"拒绝申请\",\"path\":\"/borrow-record/reject\",\"successMessage\":\"申请已拒绝\",\"to\":\"canceled\"},{\"actor\":\"admin\",\"audit\":{\"timeField\":\"return_time\",\"userField\":\"return_user_id\"},\"button\":{\"confirm\":\"确认已归还图书?\",\"order\":30,\"pageCode\":\"borrow_admin_page\",\"scope\":\"admin\",\"slot\":\"list.rowActions\",\"type\":\"primary\"},\"code\":\"admin_return\",\"effects\":[{\"amount\":\"1\",\"errorMessage\":\"图书库存恢复失败\",\"field\":\"stock\",\"min\":\"0\",\"notFoundMessage\":\"图书不存在\",\"relationField\":\"book_id\",\"table\":\"book_info\",\"type\":\"increase\",\"values\":{}}],\"from\":\"borrowing\",\"invalidStateMessage\":\"当前状态不能还书\",\"method\":\"POST\",\"name\":\"确认还书\",\"path\":\"/borrow-record/return\",\"successMessage\":\"还书成功\",\"to\":\"returned\"},{\"actor\":\"reader\",\"audit\":{},\"button\":{\"confirm\":\"确认取消借书申请?\",\"order\":10,\"pageCode\":\"my_borrows_page\",\"scope\":\"reader\",\"slot\":\"list.rowActions\",\"type\":\"default\"},\"code\":\"user_cancel_apply\",\"effects\":[],\"from\":\"pending\",\"invalidStateMessage\":\"当前状态不能取消申请\",\"method\":\"POST\",\"name\":\"取消申请\",\"path\":\"/my-borrows/cancel-apply\",\"successMessage\":\"借书申请已取消\",\"to\":\"canceled\"},{\"actor\":\"reader\",\"audit\":{},\"button\":{\"confirm\":\"确认取消预约?\",\"order\":20,\"pageCode\":\"my_borrows_page\",\"scope\":\"reader\",\"slot\":\"list.rowActions\",\"type\":\"default\"},\"code\":\"user_cancel_reserve\",\"effects\":[],\"from\":\"reserved\",\"invalidStateMessage\":\"当前状态不能取消预约\",\"method\":\"POST\",\"name\":\"取消预约\",\"path\":\"/my-borrows/cancel-reserve\",\"successMessage\":\"预约已取消\",\"to\":\"canceled\"}],\"code\":\"borrow_record\",\"mainTable\":\"borrow_record\",\"metrics\":[{\"aggregate\":\"count\",\"code\":\"borrowing_count\",\"field\":\"id\",\"name\":\"借阅中数量\",\"status\":\"borrowing\",\"table\":\"borrow_record\",\"unit\":\"条\"},{\"aggregate\":\"count\",\"code\":\"pending_count\",\"field\":\"id\",\"name\":\"待审核数量\",\"status\":\"pending\",\"table\":\"borrow_record\",\"unit\":\"条\"},{\"aggregate\":\"count\",\"code\":\"total_books\",\"field\":\"id\",\"name\":\"图书总量\",\"table\":\"book_info\",\"unit\":\"本\"},{\"aggregate\":\"count\",\"code\":\"total_readers\",\"field\":\"id\",\"name\":\"读者数量\",\"table\":\"reader\",\"unit\":\"人\"}],\"name\":\"借阅管理\",\"notFoundMessage\":\"借阅记录不存在\",\"states\":[{\"code\":\"pending\",\"label\":\"待审核\"},{\"code\":\"borrowing\",\"label\":\"借出中\"},{\"code\":\"returned\",\"label\":\"已归还\"},{\"code\":\"reserved\",\"label\":\"已预约\"},{\"code\":\"canceled\",\"label\":\"已取消\"}],\"statusField\":\"status\",\"version\":\"1.0\"},\"compiledFlowContract\":{\"acceptanceScenarios\":[],\"actions\":[{\"actor\":\"admin\",\"code\":\"admin_approve\",\"name\":\"审核通过\",\"ownerObject\":\"borrow_record\",\"ownerTable\":\"borrow_record\",\"preconditions\":[],\"quantityEffects\":[{\"actionCode\":\"admin_approve\",\"amount\":\"1\",\"effectType\":\"decrease\",\"objectCode\":\"book_info\",\"quantityField\":\"stock\",\"tableName\":\"book_info\"}],\"recordEffects\":[],\"required\":true,\"stateTransitions\":[{\"actionCode\":\"admin_approve\",\"fromState\":\"pending\",\"toState\":\"borrowing\"}]},{\"actor\":\"admin\",\"code\":\"admin_reject\",\"name\":\"拒绝申请\",\"ownerObject\":\"borrow_record\",\"ownerTable\":\"borrow_record\",\"preconditions\":[],\"quantityEffects\":[],\"recordEffects\":[],\"required\":true,\"stateTransitions\":[{\"actionCode\":\"admin_reject\",\"fromState\":\"pending\",\"toState\":\"canceled\"}]},{\"actor\":\"admin\",\"code\":\"admin_return\",\"name\":\"确认还书\",\"ownerObject\":\"borrow_record\",\"ownerTable\":\"borrow_record\",\"preconditions\":[],\"quantityEffects\":[{\"actionCode\":\"admin_return\",\"amount\":\"1\",\"effectType\":\"increase\",\"objectCode\":\"book_info\",\"quantityField\":\"stock\",\"tableName\":\"book_info\"}],\"recordEffects\":[],\"required\":true,\"stateTransitions\":[{\"actionCode\":\"admin_return\",\"fromState\":\"borrowing\",\"toState\":\"returned\"}]},{\"actor\":\"reader\",\"code\":\"user_cancel_apply\",\"name\":\"取消申请\",\"ownerObject\":\"borrow_record\",\"ownerTable\":\"borrow_record\",\"preconditions\":[],\"quantityEffects\":[],\"recordEffects\":[],\"required\":true,\"stateTransitions\":[{\"actionCode\":\"user_cancel_apply\",\"fromState\":\"pending\",\"toState\":\"canceled\"}]},{\"actor\":\"reader\",\"code\":\"user_cancel_reserve\",\"name\":\"取消预约\",\"ownerObject\":\"borrow_record\",\"ownerTable\":\"borrow_record\",\"preconditions\":[],\"quantityEffects\":[],\"recordEffects\":[],\"required\":true,\"stateTransitions\":[{\"actionCode\":\"user_cancel_reserve\",\"fromState\":\"reserved\",\"toState\":\"canceled\"}]}],\"businessPolicies\":[],\"coreObjects\":[{\"code\":\"borrow_record\",\"name\":\"借阅管理\",\"objectType\":\"main\",\"tableName\":\"borrow_record\"},{\"code\":\"book_info\",\"name\":\"book_info\",\"objectType\":\"related\",\"tableName\":\"book_info\"}],\"domainName\":\"借阅管理\",\"metrics\":[{\"aggregate\":\"count\",\"code\":\"borrowing_count\",\"field\":\"id\",\"filters\":[{\"field\":\"status\",\"operator\":\"eq\",\"values\":[\"borrowing\"]}],\"name\":\"借阅中数量\",\"relatedActionCodes\":[],\"required\":true,\"tableName\":\"borrow_record\",\"unit\":\"条\"},{\"aggregate\":\"count\",\"code\":\"pending_count\",\"field\":\"id\",\"filters\":[{\"field\":\"status\",\"operator\":\"eq\",\"values\":[\"pending\"]}],\"name\":\"待审核数量\",\"relatedActionCodes\":[],\"required\":true,\"tableName\":\"borrow_record\",\"unit\":\"条\"},{\"aggregate\":\"count\",\"code\":\"total_books\",\"field\":\"id\",\"filters\":[],\"name\":\"图书总量\",\"relatedActionCodes\":[],\"required\":true,\"tableName\":\"book_info\",\"unit\":\"本\"},{\"aggregate\":\"count\",\"code\":\"total_readers\",\"field\":\"id\",\"filters\":[],\"name\":\"读者数量\",\"relatedActionCodes\":[],\"required\":true,\"tableName\":\"reader\",\"unit\":\"人\"}],\"pageBindings\":[{\"actionCode\":\"admin_approve\",\"pageCode\":\"borrow_admin_page\",\"slot\":\"list.rowActions\",\"tableName\":\"borrow_record\",\"target\":\"admin\"},{\"actionCode\":\"admin_reject\",\"pageCode\":\"borrow_admin_page\",\"slot\":\"list.rowActions\",\"tableName\":\"borrow_record\",\"target\":\"admin\"},{\"actionCode\":\"admin_return\",\"pageCode\":\"borrow_admin_page\",\"slot\":\"list.rowActions\",\"tableName\":\"borrow_record\",\"target\":\"admin\"},{\"actionCode\":\"user_cancel_apply\",\"pageCode\":\"my_borrows_page\",\"slot\":\"list.rowActions\",\"tableName\":\"borrow_record\",\"target\":\"frontend\"},{\"actionCode\":\"user_cancel_reserve\",\"pageCode\":\"my_borrows_page\",\"slot\":\"list.rowActions\",\"tableName\":\"borrow_record\",\"target\":\"frontend\"}],\"quantityRules\":[{\"actionCode\":\"admin_approve\",\"amount\":\"1\",\"effectType\":\"decrease\",\"objectCode\":\"book_info\",\"quantityField\":\"stock\",\"tableName\":\"book_info\"},{\"actionCode\":\"admin_return\",\"amount\":\"1\",\"effectType\":\"increase\",\"objectCode\":\"book_info\",\"quantityField\":\"stock\",\"tableName\":\"book_info\"}],\"recordRules\":[],\"stateMachines\":[{\"objectCode\":\"borrow_record\",\"states\":[\"pending\",\"borrowing\",\"returned\",\"reserved\",\"canceled\"],\"statusField\":\"status\",\"tableName\":\"borrow_record\",\"transitions\":[{\"actionCode\":\"admin_approve\",\"fromState\":\"pending\",\"toState\":\"borrowing\"},{\"actionCode\":\"admin_reject\",\"fromState\":\"pending\",\"toState\":\"canceled\"},{\"actionCode\":\"admin_return\",\"fromState\":\"borrowing\",\"toState\":\"returned\"},{\"actionCode\":\"user_cancel_apply\",\"fromState\":\"pending\",\"toState\":\"canceled\"},{\"actionCode\":\"user_cancel_reserve\",\"fromState\":\"reserved\",\"toState\":\"canceled\"}]}]},\"canonicalTableRegistry\":[\"book_info\",\"borrow_record\",\"reader\",\"carousel\",\"announcement\",\"news\"],\"limits\":{\"maxTables\":12,\"maxColumnsPerTable\":30}}', '{\n \"tables\": [\n {\n \"tableName\": \"book_info\",\n \"tableComment\": \"图书信息表\",\n \"adminMenuName\": \"图书管理\",\n \"operations\": {\n \"add\": true,\n \"edit\": true,\n \"remove\": true,\n \"removeType\": \"physical\",\n \"reason\": \"\"\n },\n \"columns\": [\n {\n \"columnName\": \"id\",\n \"columnLabel\": \"ID\",\n \"columnComment\": \"主键ID\",\n \"columnType\": \"bigint(20)\",\n \"isPk\": \"1\",\n \"isIncrement\": \"1\",\n \"isRequired\": \"1\",\n \"javaType\": \"Long\",\n \"htmlType\": \"input\"\n },\n {\n \"columnName\": \"title\",\n \"columnLabel\": \"书名\",\n \"columnComment\": \"图书标题\",\n \"columnType\": \"varchar(200)\",\n \"isPk\": \"0\",\n \"isIncrement\": \"0\",\n \"isRequired\": \"1\",\n \"javaType\": \"String\",\n \"htmlType\": \"input\"\n },\n {\n \"columnName\": \"author\",\n \"columnLabel\": \"作者\",\n \"columnComment\": \"图书作者\",\n \"columnType\": \"varchar(100)\",\n \"isPk\": \"0\",\n \"isIncrement\": \"0\",\n \"isRequired\": \"0\",\n \"javaType\": \"String\",\n \"htmlType\": \"input\"\n },\n {\n \"columnName\": \"publisher\",\n \"columnLabel\": \"出版社\",\n \"columnComment\": \"出版社名称\",\n \"columnType\": \"varchar(100)\",\n \"isPk\": \"0\",\n \"isIncrement\": \"0\",\n \"isRequired\": \"0\",\n \"javaType\": \"String\",\n \"htmlType\": \"input\"\n },\n {\n \"columnName\": \"isbn\",\n \"columnLabel\": \"ISBN\",\n \"columnComment\": \"国际标准书号\",\n \"columnType\": \"varchar(20)\",\n \"isPk\": \"0\",\n \"isIncrement\": \"0\",\n \"isRequired\": \"0\",\n \"javaType\": \"String\",\n \"htmlType\": \"input\"\n },\n {\n \"columnName\": \"stock\",\n \"columnLabel\": \"库存\",\n \"columnComment\": \"图书当前库存数量\",\n \"columnType\": \"int(11)\",\n \"isPk\": \"0\",\n \"isIncrement\": \"0\",\n \"isRequired\": \"1\",\n \"javaType\": \"Integer\",\n \"htmlType\": \"input\"\n },\n {\n \"columnName\": \"category\",\n \"columnLabel\": \"分类\",\n \"columnComment\": \"图书分类\",\n \"columnType\": \"varchar(50)\",\n \"isPk\": \"0\",\n \"isIncrement\": \"0\",\n \"isRequired\": \"0\",\n \"javaType\": \"String\",\n \"htmlType\": \"select\",\n \"dictOptions\": [\"文学\", \"科技\", \"历史\", \"艺术\", \"教育\"]\n },\n {\n \"columnName\": \"cover_image\",\n \"columnLabel\": \"封面图片\",\n \"columnComment\": \"图书封面图片URL\",\n \"columnType\": \"varchar(500)\",\n \"isPk\": \"0\",\n \"isIncrement\": \"0\",\n \"isRequired\": \"0\",\n \"javaType\": \"String\",\n \"htmlType\": \"imageUpload\"\n },\n {\n \"columnName\": \"description\",\n \"columnLabel\": \"简介\",\n \"columnComment\": \"图书简介内容\",\n \"columnType\": \"text\",\n \"isPk\": \"0\",\n \"isIncrement\": \"0\",\n \"isRequired\": \"0\",\n \"javaType\": \"String\",\n \"htmlType\": \"editor\"\n },\n {\n \"columnName\": \"status\",\n \"columnLabel\": \"状态\",\n \"columnComment\": \"图书状态active-上架inactive-下架\",\n \"columnType\": \"varchar(20)\",\n \"isPk\": \"0\",\n \"isIncrement\": \"0\",\n \"isRequired\": \"1\",\n \"javaType\": \"String\",\n \"htmlType\": \"select\",\n \"dictOptions\": [\"active\", \"inactive\"]\n },\n {\n \"columnName\": \"create_time\",\n \"columnLabel\": \"创建时间\",\n \"columnComment\": \"记录创建时间\",\n \"columnType\": \"datetime\",\n \"isPk\": \"0\",\n \"isIncrement\": \"0\",\n \"isRequired\": \"0\",\n \"javaType\": \"Date\",\n \"htmlType\": \"datetime\"\n },\n {\n \"columnName\": \"update_time\",\n \"columnLabel\": \"更新时间\",\n \"columnComment\": \"记录最后更新时间\",\n \"columnType\": \"datetime\",\n \"isPk\": \"0\",\n \"isIncrement\": \"0\",\n \"isRequired\": \"0\",\n \"javaType\": \"Date\",\n \"htmlType\": \"datetime\"\n }\n ]\n },\n {\n \"tableName\": \"borrow_record\",\n \"tableComment\": \"借阅记录表\",\n \"adminMenuName\": \"借阅记录\",\n \"operations\": {\n \"add\": true,\n \"edit\": false,\n \"remove\": false,\n \"removeType\": \"physical\",\n \"reason\": \"仅新增,不允许编辑或删除\"\n },\n \"columns\": [\n {\n \"columnName\": \"id\",\n \"columnLabel\": \"ID\",\n \"columnComment\": \"主键ID\",\n \"columnType\": \"bigint(20)\",\n \"isPk\": \"1\",\n \"isIncrement\": \"1\",\n \"isRequired\": \"1\",\n \"javaType\": \"Long\",\n \"htmlType\": \"input\"\n },\n {\n \"columnName\": \"book_id\",\n \"columnLabel\": \"图书\",\n \"columnComment\": \"关联图书ID\",\n \"columnType\": \"bigint(20)\",\n \"isPk\": \"0\",\n \"isIncrement\": \"0\",\n \"isRequired\": \"1\",\n \"javaType\": \"Long\",\n \"htmlType\": \"select\",\n \"dictType\": \"remote:book_info:id:title\"\n },\n {\n \"columnName\": \"reader_id\",\n \"columnLabel\": \"读者\",\n \"columnComment\": \"关联读者信息ID\",\n \"columnType\": \"bigint(20)\",\n \"isPk\": \"0\",\n \"isIncrement\": \"0\",\n \"isRequired\": \"1\",\n \"javaType\": \"Long\",\n \"htmlType\": \"select\",\n \"dictType\": \"remote:reader:id:real_name\"\n },\n {\n \"columnName\": \"status\",\n \"columnLabel\": \"状态\",\n \"columnComment\": \"借阅状态pending-待审核, borrowing-借出中, returned-已归还, reserved-已预约, canceled-已取消\",\n \"columnType\": \"varchar(20)\",\n \"isPk\": \"0\",\n \"isIncrement\": \"0\",\n \"isRequired\": \"1\",\n \"javaType\": \"String\",\n \"htmlType\": \"select\",\n \"dictOptions\": [\"pending\", \"borrowing\", \"returned\", \"reserved\", \"canceled\"]\n },\n {\n \"columnName\": \"reserve_time\",\n \"columnLabel\": \"预约时间\",\n \"columnComment\": \"读者预约图书的时间\",\n \"columnType\": \"datetime\",\n \"isPk\": \"0\",\n \"isIncrement\": \"0\",\n \"isRequired\": \"0\",\n \"javaType\": \"Date\",\n \"htmlType\": \"datetime\"\n },\n {\n \"columnName\": \"borrow_time\",\n \"columnLabel\": \"借出时间\",\n \"columnComment\": \"实际借出图书的时间(审核通过时)\",\n \"columnType\": \"datetime\",\n \"isPk\": \"0\",\n \"isIncrement\": \"0\",\n \"isRequired\": \"0\",\n \"javaType\": \"Date\",\n \"htmlType\": \"datetime\"\n },\n {\n \"columnName\": \"due_time\",\n \"columnLabel\": \"应还日期\",\n \"columnComment\": \"要求归还的最后日期\",\n \"columnType\": \"datetime\",\n \"isPk\": \"0\",\n \"isIncrement\": \"0\",\n \"isRequired\": \"0\",\n \"javaType\": \"Date\",\n \"htmlType\": \"datetime\"\n },\n {\n \"columnName\": \"approve_user_id\",\n \"columnLabel\": \"审核人ID\",\n \"columnComment\": \"执行审核通过的管理员ID\",\n \"columnType\": \"bigint(20)\",\n \"isPk\": \"0\",\n \"isIncrement\": \"0\",\n \"isRequired\": \"0\",\n \"javaType\": \"Long\",\n \"htmlType\": \"select\",\n \"dictType\": \"remote:admin_account:admin_id:username\"\n },\n {\n \"columnName\": \"approve_time\",\n \"columnLabel\": \"审核时间\",\n \"columnComment\": \"管理员审核通过的时间\",\n \"columnType\": \"datetime\",\n \"isPk\": \"0\",\n \"isIncrement\": \"0\",\n \"isRequired\": \"0\",\n \"javaType\": \"Date\",\n \"htmlType\": \"datetime\"\n },\n {\n \"columnName\": \"return_user_id\",\n \"columnLabel\": \"还书人ID\",\n \"columnComment\": \"确认还书的管理员ID\",\n \"columnType\": \"bigint(20)\",\n \"isPk\": \"0\",\n \"isIncrement\": \"0\",\n \"isRequired\": \"0\",\n \"javaType\": \"Long\",\n \"htmlType\": \"select\",\n \"dictType\": \"remote:admin_account:admin_id:username\"\n },\n {\n \"columnName\": \"return_time\",\n \"columnLabel\": \"归还时间\",\n \"columnComment\": \"管理员确认归还的时间\",\n \"columnType\": \"datetime\",\n \"isPk\": \"0\",\n \"isIncrement\": \"0\",\n \"isRequired\": \"0\",\n \"javaType\": \"Date\",\n \"htmlType\": \"datetime\"\n },\n {\n \"columnName\": \"create_time\",\n \"columnLabel\": \"创建时间\",\n \"columnComment\": \"记录创建时间\",\n \"columnType\": \"datetime\",\n \"isPk\": \"0\",\n \"isIncrement\": \"0\",\n \"isRequired\": \"0\",\n \"javaType\": \"Date\",\n \"htmlType\": \"datetime\"\n },\n {\n \"columnName\": \"update_time\",\n \"columnLabel\": \"更新时间\",\n \"columnComment\": \"记录最后更新时间\",\n \"columnType\": \"datetime\",\n \"isPk\": \"0\",\n \"isIncrement\": \"0\",\n \"isRequired\": \"0\",\n \"javaType\": \"Date\",\n \"htmlType\": \"datetime\"\n }\n ]\n },\n {\n \"tableName\": \"reader\",\n \"tableComment\": \"读者信息表\",\n \"adminMenuName\": \"读者管理\",\n \"operations\": {\n \"add\": true,\n \"edit\": true,\n \"remove\": true,\n \"removeType\": \"physical\",\n \"reason\": \"\"\n },\n \"columns\": [\n {\n \"columnName\": \"id\",\n \"columnLabel\": \"ID\",\n \"columnComment\": \"主键ID\",\n \"columnType\": \"bigint(20)\",\n \"isPk\": \"1\",\n \"isIncrement\": \"1\",\n \"isRequired\": \"1\",\n \"javaType\": \"Long\",\n \"htmlType\": \"input\"\n },\n {\n \"columnName\": \"user_id\",\n \"columnLabel\": \"账号ID\",\n \"columnComment\": \"关联读者账号表的ID\",\n \"columnType\": \"bigint(20)\",\n \"isPk\": \"0\",\n \"isIncrement\": \"0\",\n \"isRequired\": \"1\",\n \"javaType\": \"Long\",\n \"htmlType\": \"select\",\n \"dictType\": \"remote:reader_account:reader_id:username\"\n },\n {\n \"columnName\": \"real_name\",\n \"columnLabel\": \"真实姓名\",\n \"columnComment\": \"读者的真实姓名\",\n \"columnType\": \"varchar(50)\",\n \"isPk\": \"0\",\n \"isIncrement\": \"0\",\n \"isRequired\": \"1\",\n \"javaType\": \"String\",\n \"htmlType\": \"input\"\n },\n {\n \"columnName\": \"phone\",\n \"columnLabel\": \"手机号\",\n \"columnComment\": \"读者联系电话\",\n \"columnType\": \"varchar(20)\",\n \"isPk\": \"0\",\n \"isIncrement\": \"0\",\n \"isRequired\": \"0\",\n \"javaType\": \"String\",\n \"htmlType\": \"input\"\n },\n {\n \"columnName\": \"email\",\n \"columnLabel\": \"邮箱\",\n \"columnComment\": \"读者电子邮箱\",\n \"columnType\": \"varchar(100)\",\n \"isPk\": \"0\",\n \"isIncrement\": \"0\",\n \"isRequired\": \"0\",\n \"javaType\": \"String\",\n \"htmlType\": \"input\"\n },\n {\n \"columnName\": \"gender\",\n \"columnLabel\": \"性别\",\n \"columnComment\": \"读者性别\",\n \"columnType\": \"varchar(10)\",\n \"isPk\": \"0\",\n \"isIncrement\": \"0\",\n \"isRequired\": \"0\",\n \"javaType\": \"String\",\n \"htmlType\": \"radio\",\n \"dictOptions\": [\"男\", \"女\"]\n },\n {\n \"columnName\": \"avatar\",\n \"columnLabel\": \"头像\",\n \"columnComment\": \"读者头像图片URL\",\n \"columnType\": \"varchar(500)\",\n \"isPk\": \"0\",\n \"isIncrement\": \"0\",\n \"isRequired\": \"0\",\n \"javaType\": \"String\",\n \"htmlType\": \"imageUpload\"\n },\n {\n \"columnName\": \"status\",\n \"columnLabel\": \"状态\",\n \"columnComment\": \"读者状态active-正常inactive-禁用\",\n \"columnType\": \"varchar(20)\",\n \"isPk\": \"0\",\n \"isIncrement\": \"0\",\n \"isRequired\": \"1\",\n \"javaType\": \"String\",\n \"htmlType\": \"select\",\n \"dictOptions\": [\"active\", \"inactive\"]\n },\n {\n \"columnName\": \"create_time\",\n \"columnLabel\": \"创建时间\",\n \"columnComment\": \"记录创建时间\",\n \"columnType\": \"datetime\",\n \"isPk\": \"0\",\n \"isIncrement\": \"0\",\n \"isRequired\": \"0\",\n \"javaType\": \"Date\",\n \"htmlType\": \"datetime\"\n },\n {\n \"columnName\": \"update_time\",\n \"columnLabel\": \"更新时间\",\n \"columnComment\": \"记录最后更新时间\",\n \"columnType\": \"datetime\",\n \"isPk\": \"0\",\n \"isIncrement\": \"0\",\n \"isRequired\": \"0\",\n \"javaType\": \"Date\",\n \"htmlType\": \"datetime\"\n }\n ]\n },\n {\n \"tableName\": \"carousel\",\n \"tableComment\": \"轮播图表\",\n \"adminMenuName\": \"轮播图管理\",\n \"operations\": {\n \"add\": true,\n \"edit\": true,\n \"remove\": true,\n \"removeType\": \"physical\",\n \"reason\": \"\"\n },\n \"columns\": [\n {\n \"columnName\": \"id\",\n \"columnLabel\": \"ID\",\n \"columnComment\": \"主键ID\",\n \"columnType\": \"bigint(20)\",\n \"isPk\": \"1\",\n \"isIncrement\": \"1\",\n \"isRequired\": \"1\",\n \"javaType\": \"Long\",\n \"htmlType\": \"input\"\n },\n {\n \"columnName\": \"image_url\",\n \"columnLabel\": \"图片URL\",\n \"columnComment\": \"轮播图片URL\",\n \"columnType\": \"varchar(500)\",\n \"isPk\": \"0\",\n \"isIncrement\": \"0\",\n \"isRequired\": \"1\",\n \"javaType\": \"String\",\n \"htmlType\": \"imageUpload\"\n },\n {\n \"columnName\": \"link_url\",\n \"columnLabel\": \"链接URL\",\n \"columnComment\": \"点击轮播图跳转的链接\",\n \"columnType\": \"varchar(500)\",\n \"isPk\": \"0\",\n \"isIncrement\": \"0\",\n \"isRequired\": \"0\",\n \"javaType\": \"String\",\n \"htmlType\": \"input\"\n },\n {\n \"columnName\": \"title\",\n \"columnLabel\": \"标题\",\n \"columnComment\": \"轮播图标题\",\n \"columnType\": \"varchar(200)\",\n \"isPk\": \"0\",\n \"isIncrement\": \"0\",\n \"isRequired\": \"0\",\n \"javaType\": \"String\",\n \"htmlType\": \"input\"\n },\n {\n \"columnName\": \"sort_order\",\n \"columnLabel\": \"排序\",\n \"columnComment\": \"显示排序,数字越小越靠前\",\n \"columnType\": \"int(11)\",\n \"isPk\": \"0\",\n \"isIncrement\": \"0\",\n \"isRequired\": \"0\",\n \"javaType\": \"Integer\",\n \"htmlType\": \"input\"\n },\n {\n \"columnName\": \"status\",\n \"columnLabel\": \"状态\",\n \"columnComment\": \"轮播图状态active-启用inactive-禁用\",\n \"columnType\": \"varchar(20)\",\n \"isPk\": \"0\",\n \"isIncrement\": \"0\",\n \"isRequired\": \"1\",\n \"javaType\": \"String\",\n \"htmlType\": \"select\",\n \"dictOptions\": [\"active\", \"inactive\"]\n },\n {\n \"columnName\": \"create_time\",\n \"columnLabel\": \"创建时间\",\n \"columnComment\": \"记录创建时间\",\n \"columnType\": \"datetime\",\n \"isPk\": \"0\",\n \"isIncrement\": \"0\",\n \"isRequired\": \"0\",\n \"javaType\": \"Date\",\n \"htmlType\": \"datetime\"\n },\n {\n \"columnName\": \"update_time\",\n \"columnLabel\": \"更新时间\",\n \"columnComment\": \"记录最后更新时间\",\n \"columnType\": \"datetime\",\n \"isPk\": \"0\",\n \"isIncrement\": \"0\",\n \"isRequired\": \"0\",\n \"javaType\": \"Date\",\n \"htmlType\": \"datetime\"\n }\n ]\n },\n {\n \"tableName\": \"announcement\",\n \"tableComment\": \"公告表\",\n \"adminMenuName\": \"公告管理\",\n \"operations\": {\n \"add\": true,\n \"edit\": true,\n \"remove\": true,\n \"removeType\": \"physical\",\n \"reason\": \"\"\n },\n \"columns\": [\n {\n \"columnName\": \"id\",\n \"columnLabel\": \"ID\",\n \"columnComment\": \"主键ID\",\n \"columnType\": \"bigint(20)\",\n \"isPk\": \"1\",\n \"isIncrement\": \"1\",\n \"isRequired\": \"1\",\n \"javaType\": \"Long\",\n \"htmlType\": \"input\"\n },\n {\n \"columnName\": \"title\",\n \"columnLabel\": \"标题\",\n \"columnComment\": \"公告标题\",\n \"columnType\": \"varchar(200)\",\n \"isPk\": \"0\",\n \"isIncrement\": \"0\",\n \"isRequired\": \"1\",\n \"javaType\": \"String\",\n \"htmlType\": \"input\"\n },\n {\n \"columnName\": \"content\",\n \"columnLabel\": \"内容\",\n \"columnComment\": \"公告正文内容\",\n \"columnType\": \"longtext\",\n \"isPk\": \"0\",\n \"isIncrement\": \"0\",\n \"isRequired\": \"1\",\n \"javaType\": \"String\",\n \"htmlType\": \"editor\"\n },\n {\n \"columnName\": \"status\",\n \"columnLabel\": \"状态\",\n \"columnComment\": \"公告状态draft-草稿published-已发布\",\n \"columnType\": \"varchar(20)\",\n \"isPk\": \"0\",\n \"isIncrement\": \"0\",\n \"isRequired\": \"1\",\n \"javaType\": \"String\",\n \"htmlType\": \"select\",\n \"dictOptions\": [\"draft\", \"published\"]\n },\n {\n \"columnName\": \"publish_time\",\n \"columnLabel\": \"发布时间\",\n \"columnComment\": \"公告正式发布时间\",\n \"columnType\": \"datetime\",\n \"isPk\": \"0\",\n \"isIncrement\": \"0\",\n \"isRequired\": \"0\",\n \"javaType\": \"Date\",\n \"htmlType\": \"datetime\"\n },\n {\n \"columnName\": \"create_time\",\n \"columnLabel\": \"创建时间\",\n \"columnComment\": \"记录创建时间\",\n \"columnType\": \"datetime\",\n \"isPk\": \"0\",\n \"isIncrement\": \"0\",\n \"isRequired\": \"0\",\n \"javaType\": \"Date\",\n \"htmlType\": \"datetime\"\n },\n {\n \"columnName\": \"update_time\",\n \"columnLabel\": \"更新时间\",\n \"columnComment\": \"记录最后更新时间\",\n \"columnType\": \"datetime\",\n \"isPk\": \"0\",\n \"isIncrement\": \"0\",\n \"isRequired\": \"0\",\n \"javaType\": \"Date\",\n \"htmlType\": \"datetime\"\n }\n ]\n },\n {\n \"tableName\": \"news\",\n \"tableComment\": \"新闻表\",\n \"adminMenuName\": \"新闻管理\",\n \"operations\": {\n \"add\": true,\n \"edit\": true,\n \"remove\": true,\n \"removeType\": \"physical\",\n \"reason\": \"\"\n },\n \"columns\": [\n {\n \"columnName\": \"id\",\n \"columnLabel\": \"ID\",\n \"columnComment\": \"主键ID\",\n \"columnType\": \"bigint(20)\",\n \"isPk\": \"1\",\n \"isIncrement\": \"1\",\n \"isRequired\": \"1\",\n \"javaType\": \"Long\",\n \"htmlType\": \"input\"\n },\n {\n \"columnName\": \"title\",\n \"columnLabel\": \"标题\",\n \"columnComment\": \"新闻标题\",\n \"columnType\": \"varchar(200)\",\n \"isPk\": \"0\",\n \"isIncrement\": \"0\",\n \"isRequired\": \"1\",\n \"javaType\": \"String\",\n \"htmlType\": \"input\"\n },\n {\n \"columnName\": \"summary\",\n \"columnLabel\": \"摘要\",\n \"columnComment\": \"新闻摘要简介\",\n \"columnType\": \"varchar(500)\",\n \"isPk\": \"0\",\n \"isIncrement\": \"0\",\n \"isRequired\": \"0\",\n \"javaType\": \"String\",\n \"htmlType\": \"input\"\n },\n {\n \"columnName\": \"content\",\n \"columnLabel\": \"内容\",\n \"columnComment\": \"新闻正文内容\",\n \"columnType\": \"longtext\",\n \"isPk\": \"0\",\n \"isIncrement\": \"0\",\n \"isRequired\": \"1\",\n \"javaType\": \"String\",\n \"htmlType\": \"editor\"\n },\n {\n \"columnName\": \"cover_image\",\n \"columnLabel\": \"封面图片\",\n \"columnComment\": \"新闻封面图片URL\",\n \"columnType\": \"varchar(500)\",\n \"isPk\": \"0\",\n \"isIncrement\": \"0\",\n \"isRequired\": \"0\",\n \"javaType\": \"String\",\n \"htmlType\": \"imageUpload\"\n },\n {\n \"columnName\": \"publish_time\",\n \"columnLabel\": \"发布时间\",\n \"columnComment\": \"新闻正式发布时间\",\n \"columnType\": \"datetime\",\n \"isPk\": \"0\",\n \"isIncrement\": \"0\",\n \"isRequired\": \"0\",\n \"javaType\": \"Date\",\n \"htmlType\": \"datetime\"\n },\n {\n \"columnName\": \"status\",\n \"columnLabel\": \"状态\",\n \"columnComment\": \"新闻状态draft-草稿published-已发布\",\n \"columnType\": \"varchar(20)\",\n \"isPk\": \"0\",\n \"isIncrement\": \"0\",\n \"isRequired\": \"1\",\n \"javaType\": \"String\",\n \"htmlType\": \"select\",\n \"dictOptions\": [\"draft\", \"published\"]\n },\n {\n \"columnName\": \"create_time\",\n \"columnLabel\": \"创建时间\",\n \"columnComment\": \"记录创建时间\",\n \"columnType\": \"datetime\",\n \"isPk\": \"0\",\n \"isIncrement\": \"0\",\n \"isRequired\": \"0\",\n \"javaType\": \"Date\",\n \"htmlType\": \"datetime\"\n },\n {\n \"columnName\": \"update_time\",\n \"columnLabel\": \"更新时间\",\n \"columnComment\": \"记录最后更新时间\",\n \"columnType\": \"datetime\",\n \"isPk\": \"0\",\n \"isIncrement\": \"0\",\n \"isRequired\": \"0\",\n \"javaType\": \"Date\",\n \"htmlType\": \"datetime\"\n }\n ]\n },\n {\n \"tableName\": \"admin_account\",\n \"tableComment\": \"管理员账号表\",\n \"adminMenuName\": \"管理员账号\",\n \"operations\": {\n \"add\": true,\n \"edit\": true,\n \"remove\": true,\n \"removeType\": \"physical\",\n \"reason\": \"\"\n },\n \"columns\": [\n {\n \"columnName\": \"admin_id\",\n \"columnLabel\": \"管理员ID\",\n \"columnComment\": \"主键ID\",\n \"columnType\": \"bigint(20)\",\n \"isPk\": \"1\",\n \"isIncrement\": \"1\",\n \"isRequired\": \"1\",\n \"javaType\": \"Long\",\n \"htmlType\": \"input\"\n },\n {\n \"columnName\": \"username\",\n \"columnLabel\": \"用户名\",\n \"columnComment\": \"管理员登录用户名\",\n \"columnType\": \"varchar(50)\",\n \"isPk\": \"0\",\n \"isIncrement\": \"0\",\n \"isRequired\": \"1\",\n \"javaType\": \"String\",\n \"htmlType\": \"input\"\n },\n {\n \"columnName\": \"password_hash\",\n \"columnLabel\": \"密码哈希\",\n \"columnComment\": \"经过哈希处理的密码\",\n \"columnType\": \"varchar(200)\",\n \"isPk\": \"0\",\n \"isIncrement\": \"0\",\n \"isRequired\": \"1\",\n \"javaType\": \"String\",\n \"htmlType\": \"input\"\n },\n {\n \"columnName\": \"nickname\",\n \"columnLabel\": \"昵称\",\n \"columnComment\": \"管理员显示昵称\",\n \"columnType\": \"varchar(100)\",\n \"isPk\": \"0\",\n \"isIncrement\": \"0\",\n \"isRequired\": \"0\",\n \"javaType\": \"String\",\n \"htmlType\": \"input\"\n },\n {\n \"columnName\": \"status\",\n \"columnLabel\": \"状态\",\n \"columnComment\": \"账号状态active-正常inactive-禁用\",\n \"columnType\": \"varchar(20)\",\n \"isPk\": \"0\",\n \"isIncrement\": \"0\",\n \"isRequired\": \"1\",\n \"javaType\": \"String\",\n \"htmlType\": \"select\",\n \"dictOptions\": [\"active\", \"inactive\"]\n },\n {\n \"columnName\": \"create_time\",\n \"columnLabel\": \"创建时间\",\n \"columnComment\": \"记录创建时间\",\n \"columnType\": \"datetime\",\n \"isPk\": \"0\",\n \"isIncrement\": \"0\",\n \"isRequired\": \"0\",\n \"javaType\": \"Date\",\n \"htmlType\": \"datetime\"\n }\n ]\n },\n {\n \"tableName\": \"reader_account\",\n \"tableComment\": \"读者账号表\",\n \"adminMenuName\": \"读者账号\",\n \"operations\": {\n \"add\": true,\n \"edit\": true,\n \"remove\": true,\n \"removeType\": \"physical\",\n \"reason\": \"\"\n },\n \"columns\": [\n {\n \"columnName\": \"reader_id\",\n \"columnLabel\": \"读者ID\",\n \"columnComment\": \"主键ID\",\n \"columnType\": \"bigint(20)\",\n \"isPk\": \"1\",\n \"isIncrement\": \"1\",\n \"isRequired\": \"1\",\n \"javaType\": \"Long\",\n \"htmlType\": \"input\"\n },\n {\n \"columnName\": \"username\",\n \"columnLabel\": \"用户名\",\n \"columnComment\": \"读者登录用户名\",\n \"columnType\": \"varchar(50)\",\n \"isPk\": \"0\",\n \"isIncrement\": \"0\",\n \"isRequired\": \"1\",\n \"javaType\": \"String\",\n \"htmlType\": \"input\"\n },\n {\n \"columnName\": \"password_hash\",\n \"columnLabel\": \"密码哈希\",\n \"columnComment\": \"经过哈希处理的密码\",\n \"columnType\": \"varchar(200)\",\n \"isPk\": \"0\",\n \"isIncrement\": \"0\",\n \"isRequired\": \"1\",\n \"javaType\": \"String\",\n \"htmlType\": \"input\"\n },\n {\n \"columnName\": \"nickname\",\n \"columnLabel\": \"昵称\",\n \"columnComment\": \"读者显示昵称\",\n \"columnType\": \"varchar(100)\",\n \"isPk\": \"0\",\n \"isIncrement\": \"0\",\n \"isRequired\": \"0\",\n \"javaType\": \"String\",\n \"htmlType\": \"input\"\n },\n {\n \"columnName\": \"status\",\n \"columnLabel\": \"状态\",\n \"columnComment\": \"账号状态active-正常inactive-禁用\",\n \"columnType\": \"varchar(20)\",\n \"isPk\": \"0\",\n \"isIncrement\": \"0\",\n \"isRequired\": \"1\",\n \"javaType\": \"String\",\n \"htmlType\": \"select\",\n \"dictOptions\": [\"active\", \"inactive\"]\n },\n {\n \"columnName\": \"create_time\",\n \"columnLabel\": \"创建时间\",\n \"columnComment\": \"记录创建时间\",\n \"columnType\": \"datetime\",\n \"isPk\": \"0\",\n \"isIncrement\": \"0\",\n \"isRequired\": \"0\",\n \"javaType\": \"Date\",\n \"htmlType\": \"datetime\"\n }\n ]\n }\n ]\n}', '0', 71731, 4143, 1024, 3119, 11184, 4295, 4143, 11184, 15327, 3, 0.02550748, '1', NULL, '2026-07-14 17:26:37');
INSERT INTO `front_ai_usage_ledger` VALUES (130, 108, 108, 106, 100, 'app_blueprint', 'deepseek', 'deepseek-v4-flash', 'front.app_blueprint', 'V1', 'c3ee0180ed446fe83055bd1c272ed1b6e3978584fe52f98f5e78e14e2cfc8f29', '你是应用蓝图架构师。只输出符合用户消息结构的 JSON规划业务角色、前台菜单与页面、后台菜单和运营看板。保持 pageCode、tableName、角色数据范围和登录要求前后一致只描述静态蓝图不生成数据库、权限表、菜单表或代码。角色名称使用简体中文技术标识使用稳定的小写 snake_case。', '根据项目输入 JSON 生成应用蓝图,只返回 JSON不要 Markdown 围栏或解释。\n输出结构{\"roles\":[{\"code\":\"reader\",\"name\":\"读者\",\"description\":\"\"}],\"frontendMenus\":[{\"code\":\"book_catalog\",\"name\":\"图书目录\",\"path\":\"/books\",\"pageCode\":\"book_catalog_page\",\"requiresLogin\":false,\"visibleRoles\":[],\"dataScope\":\"PUBLIC\"}],\"frontendPages\":[{\"code\":\"book_catalog_page\",\"name\":\"图书目录\",\"menuCode\":\"book_catalog\",\"path\":\"/books\",\"pageType\":\"list\",\"tableName\":\"book_info\"}],\"adminMenus\":[{\"code\":\"book_admin\",\"name\":\"图书管理\",\"path\":\"/admin/books\",\"pageCode\":\"book_admin_page\",\"tableName\":\"book_info\",\"pageType\":\"list\",\"requiresLogin\":true,\"visibleRoles\":[\"admin\"],\"dataScope\":\"ROLE\"}],\"adminHomeDashboard\":{\"title\":\"运营总览\",\"description\":\"核心业务数据\",\"metrics\":[],\"charts\":[]}}。\n蓝图描述目标生成项目而不是当前 EasyCode/RuoYi 平台。不要生成数据库表、菜单表、角色表、权限表或代码。\nrole.name 使用简体中文role.code 使用小写 snake_case。只有 role.code=admin 是系统管理员;名称含“管理员”或“后台”的业务角色仍保持独立。\nrole.name must be Simplified Chinese. Only role.code=admin is the system administrator.\n每个菜单必须包含 requiresLogin、visibleRoles、dataScopedataScope 只能是 PUBLIC、CURRENT_USER 或 ROLE。\nadminMenus 必须包含 pageCode、tableName、pageType个人资料使用 form普通管理使用 list。\nadminMenus must include pageCode, tableName, and pageType.\nfrontendMenus 顶层菜单应指向 pageCode详情页作为子页面不创建顶层详情菜单。\n不要为轮播图、banner、公告滚动条等首页装饰创建顶层菜单可放在首页业务块或作为后台维护数据。\nfrontendPages.pageType 只能是 list、current_user_list、detail、formtableName 必须是页面展示的业务表。\n同一业务对象只使用一个稳定 tableName后续数据库、闭环、页面、看板、动作必须复用不能使用同义表名。\nadminHomeDashboard 尽量包含 4 个业务指标和至少 2 张图表趋势图与分布图所有表字段必须可由后续数据库步骤创建。semantic 只能使用 money、order、user、task、warning、inventory、content、default。\n每个非 admin 角色使用表名等于 role.code 的独立账号表,不得创建共享 user、user_info、member 或 account 表。\nNever invent a shared user, user_info, member, or account table for role accounts.\n需要个人资料页时为每个非 admin 角色创建独立 form 页面和菜单tableName 绑定 role.codepageCode/path 带角色前缀visibleRoles 只包含该角色。\nCreate one form page and one menu per non-admin role when profile pages are needed.\n个人订单、借阅、资料、预约、支付等页面必须 requiresLogin=true 且 dataScope=CURRENT_USER。\n项目输入 JSON\n{\"projectName\":\"图书管理系统\",\"projectDescription\":\"功能:借书、还书、预约、取消预约\\n角色用户、管理员\\n其他模块轮播图、公告、新闻\",\"industryTemplate\":\"\",\"stylePreset\":\"dark-tech\",\"extraRequirements\":\"\"}', '{\n \"roles\": [\n {\n \"code\": \"admin\",\n \"name\": \"管理员\",\n \"description\": \"系统管理员,负责图书、借阅、预约、用户、轮播图、公告、新闻等管理\"\n },\n {\n \"code\": \"reader\",\n \"name\": \"读者\",\n \"description\": \"普通用户,可借书、还书、预约图书、取消预约、查看公告和新闻\"\n }\n ],\n \"frontendMenus\": [\n {\n \"code\": \"book_catalog\",\n \"name\": \"图书目录\",\n \"path\": \"/books\",\n \"pageCode\": \"book_catalog_page\",\n \"requiresLogin\": false,\n \"visibleRoles\": [],\n \"dataScope\": \"PUBLIC\"\n },\n {\n \"code\": \"my_borrows\",\n \"name\": \"我的借阅\",\n \"path\": \"/my-borrows\",\n \"pageCode\": \"my_borrows_page\",\n \"requiresLogin\": true,\n \"visibleRoles\": [\"reader\"],\n \"dataScope\": \"CURRENT_USER\"\n },\n {\n \"code\": \"my_reservations\",\n \"name\": \"我的预约\",\n \"path\": \"/my-reservations\",\n \"pageCode\": \"my_reservation_page\",\n \"requiresLogin\": true,\n \"visibleRoles\": [\"reader\"],\n \"dataScope\": \"CURRENT_USER\"\n },\n {\n \"code\": \"reader_profile\",\n \"name\": \"个人资料\",\n \"path\": \"/profile\",\n \"pageCode\": \"reader_profile_page\",\n \"requiresLogin\": true,\n \"visibleRoles\": [\"reader\"],\n \"dataScope\": \"CURRENT_USER\"\n },\n {\n \"code\": \"notices\",\n \"name\": \"公告\",\n \"path\": \"/notices\",\n \"pageCode\": \"notice_list_page\",\n \"requiresLogin\": false,\n \"visibleRoles\": [],\n \"dataScope\": \"PUBLIC\"\n },\n {\n \"code\": \"news\",\n \"name\": \"新闻\",\n \"path\": \"/news\",\n \"pageCode\": \"news_list_page\",\n \"requiresLogin\": false,\n \"visibleRoles\": [],\n \"dataScope\": \"PUBLIC\"\n }\n ],\n \"frontendPages\": [\n {\n \"code\": \"book_catalog_page\",\n \"name\": \"图书目录\",\n \"menuCode\": \"book_catalog\",\n \"path\": \"/books\",\n \"pageType\": \"list\",\n \"tableName\": \"book_info\"\n },\n {\n \"code\": \"my_borrows_page\",\n \"name\": \"我的借阅\",\n \"menuCode\": \"my_borrows\",\n \"path\": \"/my-borrows\",\n \"pageType\": \"current_user_list\",\n \"tableName\": \"borrow_record\"\n },\n {\n \"code\": \"my_reservation_page\",\n \"name\": \"我的预约\",\n \"menuCode\": \"my_reservations\",\n \"path\": \"/my-reservations\",\n \"pageType\": \"current_user_list\",\n \"tableName\": \"reservation\"\n },\n {\n \"code\": \"reader_profile_page\",\n \"name\": \"个人资料\",\n \"menuCode\": \"reader_profile\",\n \"path\": \"/profile\",\n \"pageType\": \"form\",\n \"tableName\": \"reader\"\n },\n {\n \"code\": \"notice_list_page\",\n \"name\": \"公告列表\",\n \"menuCode\": \"notices\",\n \"path\": \"/notices\",\n \"pageType\": \"list\",\n \"tableName\": \"notice\"\n },\n {\n \"code\": \"news_list_page\",\n \"name\": \"新闻列表\",\n \"menuCode\": \"news\",\n \"path\": \"/news\",\n \"pageType\": \"list\",\n \"tableName\": \"news\"\n }\n ],\n \"adminMenus\": [\n {\n \"code\": \"book_admin\",\n \"name\": \"图书管理\",\n \"path\": \"/admin/books\",\n \"pageCode\": \"book_admin_page\",\n \"tableName\": \"book_info\",\n \"pageType\": \"list\",\n \"requiresLogin\": true,\n \"visibleRoles\": [\"admin\"],\n \"dataScope\": \"ROLE\"\n },\n {\n \"code\": \"borrow_admin\",\n \"name\": \"借阅管理\",\n \"path\": \"/admin/borrows\",\n \"pageCode\": \"borrow_admin_page\",\n \"tableName\": \"borrow_record\",\n \"pageType\": \"list\",\n \"requiresLogin\": true,\n \"visibleRoles\": [\"admin\"],\n \"dataScope\": \"ROLE\"\n },\n {\n \"code\": \"reservation_admin\",\n \"name\": \"预约管理\",\n \"path\": \"/admin/reservations\",\n \"pageCode\": \"reservation_admin_page\",\n \"tableName\": \"reservation\",\n \"pageType\": \"list\",\n \"requiresLogin\": true,\n \"visibleRoles\": [\"admin\"],\n \"dataScope\": \"ROLE\"\n },\n {\n \"code\": \"reader_admin\",\n \"name\": \"读者管理\",\n \"path\": \"/admin/readers\",\n \"pageCode\": \"reader_admin_page\",\n \"tableName\": \"reader\",\n \"pageType\": \"list\",\n \"requiresLogin\": true,\n \"visibleRoles\": [\"admin\"],\n \"dataScope\": \"ROLE\"\n },\n {\n \"code\": \"carousel_admin\",\n \"name\": \"轮播图管理\",\n \"path\": \"/admin/carousels\",\n \"pageCode\": \"carousel_admin_page\",\n \"tableName\": \"carousel\",\n \"pageType\": \"list\",\n \"requiresLogin\": true,\n \"visibleRoles\": [\"admin\"],\n \"dataScope\": \"ROLE\"\n },\n {\n \"code\": \"notice_admin\",\n \"name\": \"公告管理\",\n \"path\": \"/admin/notices\",\n \"pageCode\": \"notice_admin_page\",\n \"tableName\": \"notice\",\n \"pageType\": \"list\",\n \"requiresLogin\": true,\n \"visibleRoles\": [\"admin\"],\n \"dataScope\": \"ROLE\"\n },\n {\n \"code\": \"news_admin\",\n \"name\": \"新闻管理\",\n \"path\": \"/admin/news\",\n \"pageCode\": \"news_admin_page\",\n \"tableName\": \"news\",\n \"pageType\": \"list\",\n \"requiresLogin\": true,\n \"visibleRoles\": [\"admin\"],\n \"dataScope\": \"ROLE\"\n },\n {\n \"code\": \"admin_profile\",\n \"name\": \"个人资料\",\n \"path\": \"/admin/profile\",\n \"pageCode\": \"admin_profile_page\",\n \"tableName\": \"admin\",\n \"pageType\": \"form\",\n \"requiresLogin\": true,\n \"visibleRoles\": [\"admin\"],\n \"dataScope\": \"ROLE\"\n }\n ],\n \"adminHomeDashboard\": {\n \"title\": \"运营总览\",\n \"description\": \"核心业务数据\",\n \"metrics\": [\n {\n \"label\": \"总图书数\",\n \"valueKey\": \"totalBooks\",\n \"semantic\": \"inventory\"\n },\n {\n \"label\": \"总借阅次数\",\n \"valueKey\": \"totalBorrows\",\n \"semantic\": \"order\"\n },\n {\n \"label\": \"当前借出\",\n \"valueKey\": \"currentBorrows\",\n \"semantic\": \"inventory\"\n },\n {\n \"label\": \"待处理预约\",\n \"valueKey\": \"pendingReservations\",\n \"semantic\": \"task\"\n }\n ],\n \"charts\": [\n {\n \"title\": \"借阅趋势\",\n \"type\": \"line\",\n \"dataSource\": {\n \"tableName\": \"borrow_record\",\n \"metricField\": \"count\",\n \"groupField\": \"month\"\n },\n \"semantic\": \"order\"\n },\n {\n \"title\": \"图书分类分布\",\n \"type\": \"pie\",\n \"dataSource\": {\n \"tableName\": \"book_info\",\n \"metricField\": \"count\",\n \"groupField\": \"category\"\n },\n \"semantic\": \"content\"\n }\n ]\n }\n}', '0', 30293, 817, 768, 49, 4375, 2586, 817, 4375, 5192, 1, 0.00881436, '1', NULL, '2026-07-14 17:55:28');
INSERT INTO `front_ai_usage_ledger` VALUES (131, 108, 108, 106, 100, 'flow_config', 'deepseek', 'deepseek-v4-flash', 'front.flow_config', 'V1', '247495840c67968896ccad2db0a599bd4fc594d0189157dce888b8ede90b3257', '你是业务流程配置设计器。只输出一个合法 JSON 对象,不输出 Markdown、解释或 SQL。\n\n目标用最小 flow_config 描述状态流转、显式 Java 业务动作、多表数量联动、按钮和统计。不要输出 CRUD不要输出通用规则 DSL。\n\n固定结构\n{\n \"version\":\"1.0\",\n \"code\":\"snake_case\",\n \"name\":\"中文业务名\",\n \"mainTable\":\"snake_case\",\n \"statusField\":\"status\",\n \"notFoundMessage\":\"主记录不存在\",\n \"states\":[{\"code\":\"pending\",\"label\":\"待审核\"}],\n \"actions\":[{\n \"code\":\"approve\",\n \"name\":\"审核通过\",\n \"from\":\"pending\",\n \"to\":\"borrowing\",\n \"actor\":\"admin\",\n \"method\":\"POST\",\n \"path\":\"/borrow-record/approve\",\n \"invalidStateMessage\":\"当前状态不能审核\",\n \"successMessage\":\"审核成功\",\n \"audit\":{\"userField\":\"approve_user_id\",\"timeField\":\"approve_time\"},\n \"effects\":[{\n \"type\":\"decrease\",\n \"table\":\"book\",\n \"relationField\":\"book_id\",\n \"field\":\"stock\",\n \"amount\":\"1\",\n \"min\":\"0\",\n \"notFoundMessage\":\"图书不存在\",\n \"errorMessage\":\"图书库存不足\"\n }],\n \"button\":{\"scope\":\"admin\",\"pageCode\":\"borrow_record_list\",\"slot\":\"list.rowActions\",\"type\":\"success\",\"confirm\":\"确认审核通过吗?\",\"order\":10}\n }],\n \"metrics\":[{\"code\":\"borrowing_count\",\"name\":\"借阅中数量\",\"table\":\"borrow_record\",\"aggregate\":\"count\",\"field\":\"id\",\"status\":\"borrowing\",\"unit\":\"条\"}]\n}\n\n约束\n1. code、表名、字段名全部使用小写 snake_case状态 code 使用稳定英文编码label 使用中文。\n2. 每个 action 必须有 from 和 to且二者存在于 states 中并且不相同。\n3. effects.type 只能是 decrease、increase、update_related、create_record。\n4. decrease/increase 必须给 table、relationField、field、amountdecrease 还要给 min。\n5. update_related/create_record 使用 values值可为 currentUserId、now、record.字段名或常量。\n6. 审核人等身份只能通过 audit.userField 表达,由后端登录态注入,不能作为前端可传字段。\n7. 覆盖需求中的完整正向闭环和关键回退/拒绝动作,但不要为普通 CRUD 创建 action。', '请根据以下 JSON 上下文生成 flow_config。appBlueprint 是已确认的页面、角色和菜单范围,必须与它保持一致:\n{\"mode\":\"generate\",\"projectName\":\"图书管理系统\",\"projectDescription\":\"功能:借书、还书、预约、取消预约\\n角色用户、管理员\\n其他模块轮播图、公告、新闻\",\"industryTemplate\":\"\",\"stylePreset\":\"dark-tech\",\"extraRequirements\":\"\",\"confirmedAppBlueprint\":{\"adminHomeDashboard\":{\"charts\":[{\"filters\":[],\"metrics\":[{\"aggregate\":\"count\",\"label\":\"借阅趋势\"}],\"semantic\":\"order\",\"title\":\"借阅趋势\",\"type\":\"line\"},{\"filters\":[],\"metrics\":[{\"aggregate\":\"count\",\"label\":\"图书分类分布\"}],\"semantic\":\"content\",\"title\":\"图书分类分布\",\"type\":\"pie\"}],\"description\":\"核心业务数据\",\"metrics\":[{\"aggregate\":\"count\",\"code\":\"totalBooks\",\"filters\":[],\"semantic\":\"inventory\"},{\"aggregate\":\"count\",\"code\":\"totalBorrows\",\"filters\":[],\"semantic\":\"order\"},{\"aggregate\":\"count\",\"code\":\"currentBorrows\",\"filters\":[],\"semantic\":\"inventory\"},{\"aggregate\":\"count\",\"code\":\"pendingReservations\",\"filters\":[],\"semantic\":\"task\"}],\"title\":\"运营总览\"},\"adminMenus\":[{\"code\":\"book_admin\",\"dataScope\":\"ROLE\",\"name\":\"图书管理\",\"pageCode\":\"book_admin_page\",\"pageType\":\"list\",\"path\":\"/admin/books\",\"requiresLogin\":true,\"tableName\":\"book_info\",\"visibleRoles\":[\"admin\"]},{\"code\":\"borrow_admin\",\"dataScope\":\"ROLE\",\"name\":\"借阅管理\",\"pageCode\":\"borrow_admin_page\",\"pageType\":\"list\",\"path\":\"/admin/borrows\",\"requiresLogin\":true,\"tableName\":\"borrow_record\",\"visibleRoles\":[\"admin\"]},{\"code\":\"reservation_admin\",\"dataScope\":\"ROLE\",\"name\":\"预约管理\",\"pageCode\":\"reservation_admin_page\",\"pageType\":\"list\",\"path\":\"/admin/reservations\",\"requiresLogin\":true,\"tableName\":\"reservation\",\"visibleRoles\":[\"admin\"]},{\"code\":\"reader_admin\",\"dataScope\":\"ROLE\",\"name\":\"读者管理\",\"pageCode\":\"reader_admin_page\",\"pageType\":\"list\",\"path\":\"/admin/readers\",\"requiresLogin\":true,\"tableName\":\"reader\",\"visibleRoles\":[\"admin\"]},{\"code\":\"carousel_admin\",\"dataScope\":\"ROLE\",\"name\":\"轮播图管理\",\"pageCode\":\"carousel_admin_page\",\"pageType\":\"list\",\"path\":\"/admin/carousels\",\"requiresLogin\":true,\"tableName\":\"carousel\",\"visibleRoles\":[\"admin\"]},{\"code\":\"notice_admin\",\"dataScope\":\"ROLE\",\"name\":\"公告管理\",\"pageCode\":\"notice_admin_page\",\"pageType\":\"list\",\"path\":\"/admin/notices\",\"requiresLogin\":true,\"tableName\":\"notice\",\"visibleRoles\":[\"admin\"]},{\"code\":\"news_admin\",\"dataScope\":\"ROLE\",\"name\":\"新闻管理\",\"pageCode\":\"news_admin_page\",\"pageType\":\"list\",\"path\":\"/admin/news\",\"requiresLogin\":true,\"tableName\":\"news\",\"visibleRoles\":[\"admin\"]},{\"code\":\"admin_profile\",\"dataScope\":\"ROLE\",\"name\":\"个人资料\",\"pageCode\":\"admin_profile_page\",\"pageType\":\"form\",\"path\":\"/admin/profile\",\"requiresLogin\":true,\"tableName\":\"admin\",\"visibleRoles\":[\"admin\"]}],\"frontendMenus\":[{\"code\":\"book_catalog\",\"dataScope\":\"PUBLIC\",\"name\":\"图书目录\",\"pageCode\":\"book_catalog_page\",\"pageType\":\"\",\"path\":\"/books\",\"requiresLogin\":false,\"tableName\":\"\",\"visibleRoles\":[]},{\"code\":\"my_borrows\",\"dataScope\":\"CURRENT_USER\",\"name\":\"我的借阅\",\"pageCode\":\"my_borrows_page\",\"pageType\":\"\",\"path\":\"/my-borrows\",\"requiresLogin\":true,\"tableName\":\"\",\"visibleRoles\":[\"reader\"]},{\"code\":\"my_reservations\",\"dataScope\":\"CURRENT_USER\",\"name\":\"我的预约\",\"pageCode\":\"my_reservation_page\",\"pageType\":\"\",\"path\":\"/my-reservations\",\"requiresLogin\":true,\"tableName\":\"\",\"visibleRoles\":[\"reader\"]},{\"code\":\"reader_profile\",\"dataScope\":\"CURRENT_USER\",\"name\":\"个人资料\",\"pageCode\":\"reader_profile_page\",\"pageType\":\"\",\"path\":\"/profile\",\"requiresLogin\":true,\"tableName\":\"\",\"visibleRoles\":[\"reader\"]},{\"code\":\"notices\",\"dataScope\":\"PUBLIC\",\"name\":\"公告\",\"pageCode\":\"notice_list_page\",\"pageType\":\"\",\"path\":\"/notices\",\"requiresLogin\":false,\"tableName\":\"\",\"visibleRoles\":[]},{\"code\":\"news\",\"dataScope\":\"PUBLIC\",\"name\":\"新闻\",\"pageCode\":\"news_list_page\",\"pageType\":\"\",\"path\":\"/news\",\"requiresLogin\":false,\"tableName\":\"\",\"visibleRoles\":[]}],\"frontendPages\":[{\"code\":\"book_catalog_page\",\"menuCode\":\"book_catalog\",\"name\":\"图书目录\",\"pageType\":\"list\",\"parentPageCode\":\"\",\"path\":\"/books\",\"tableName\":\"book_info\"},{\"code\":\"my_borrows_page\",\"menuCode\":\"my_borrows\",\"name\":\"我的借阅\",\"pageType\":\"current_user_list\",\"parentPageCode\":\"\",\"path\":\"/my-borrows\",\"tableName\":\"borrow_record\"},{\"code\":\"my_reservation_page\",\"menuCode\":\"my_reservations\",\"name\":\"我的预约\",\"pageType\":\"current_user_list\",\"parentPageCode\":\"\",\"path\":\"/my-reservations\",\"tableName\":\"reservation\"},{\"code\":\"reader_profile_page\",\"menuCode\":\"reader_profile\",\"name\":\"个人资料\",\"pageType\":\"form\",\"parentPageCode\":\"\",\"path\":\"/profile\",\"tableName\":\"reader\"},{\"code\":\"notice_list_page\",\"menuCode\":\"notices\",\"name\":\"公告列表\",\"pageType\":\"list\",\"parentPageCode\":\"\",\"path\":\"/notices\",\"tableName\":\"notice\"},{\"code\":\"news_list_page\",\"menuCode\":\"news\",\"name\":\"新闻列表\",\"pageType\":\"list\",\"parentPageCode\":\"\",\"path\":\"/news\",\"tableName\":\"news\"}],\"roles\":[{\"code\":\"admin\",\"description\":\"系统管理员,负责图书、借阅、预约、用户、轮播图、公告、新闻等管理\",\"name\":\"管理员\"},{\"code\":\"reader\",\"description\":\"普通用户,可借书、还书、预约图书、取消预约、查看公告和新闻\",\"name\":\"读者\"}]}}', '[\n {\n \"version\": \"1.0\",\n \"code\": \"borrow_record_flow\",\n \"name\": \"借阅管理流程\",\n \"mainTable\": \"borrow_record\",\n \"statusField\": \"status\",\n \"notFoundMessage\": \"借阅记录不存在\",\n \"states\": [\n {\"code\": \"pending\", \"label\": \"待审核\"},\n {\"code\": \"borrowing\", \"label\": \"借阅中\"},\n {\"code\": \"returned\", \"label\": \"已归还\"},\n {\"code\": \"rejected\", \"label\": \"已拒绝\"}\n ],\n \"actions\": [\n {\n \"code\": \"approve\",\n \"name\": \"审核通过\",\n \"from\": \"pending\",\n \"to\": \"borrowing\",\n \"actor\": \"admin\",\n \"method\": \"POST\",\n \"path\": \"/borrow-record/approve\",\n \"invalidStateMessage\": \"当前状态不能审核\",\n \"successMessage\": \"审核成功\",\n \"audit\": {\"userField\": \"approve_user_id\", \"timeField\": \"approve_time\"},\n \"effects\": [\n {\n \"type\": \"decrease\",\n \"table\": \"book_info\",\n \"relationField\": \"book_id\",\n \"field\": \"stock\",\n \"amount\": \"1\",\n \"min\": \"0\",\n \"notFoundMessage\": \"图书不存在\",\n \"errorMessage\": \"图书库存不足\"\n }\n ],\n \"button\": {\n \"scope\": \"admin\",\n \"pageCode\": \"borrow_admin_page\",\n \"slot\": \"list.rowActions\",\n \"type\": \"success\",\n \"confirm\": \"确认审核通过吗?\",\n \"order\": 10\n }\n },\n {\n \"code\": \"reject\",\n \"name\": \"拒绝\",\n \"from\": \"pending\",\n \"to\": \"rejected\",\n \"actor\": \"admin\",\n \"method\": \"POST\",\n \"path\": \"/borrow-record/reject\",\n \"invalidStateMessage\": \"当前状态不能拒绝\",\n \"successMessage\": \"已拒绝\",\n \"audit\": {\"userField\": \"reject_user_id\", \"timeField\": \"reject_time\"},\n \"button\": {\n \"scope\": \"admin\",\n \"pageCode\": \"borrow_admin_page\",\n \"slot\": \"list.rowActions\",\n \"type\": \"danger\",\n \"confirm\": \"确认拒绝吗?\",\n \"order\": 20\n }\n },\n {\n \"code\": \"return\",\n \"name\": \"还书\",\n \"from\": \"borrowing\",\n \"to\": \"returned\",\n \"actor\": \"admin\",\n \"method\": \"POST\",\n \"path\": \"/borrow-record/return\",\n \"invalidStateMessage\": \"当前状态不能还书\",\n \"successMessage\": \"还书成功\",\n \"audit\": {\"userField\": \"return_user_id\", \"timeField\": \"return_time\"},\n \"effects\": [\n {\n \"type\": \"increase\",\n \"table\": \"book_info\",\n \"relationField\": \"book_id\",\n \"field\": \"stock\",\n \"amount\": \"1\",\n \"notFoundMessage\": \"图书不存在\"\n }\n ],\n \"button\": {\n \"scope\": \"admin\",\n \"pageCode\": \"borrow_admin_page\",\n \"slot\": \"list.rowActions\",\n \"type\": \"primary\",\n \"confirm\": \"确认还书吗?\",\n \"order\": 30\n }\n }\n ],\n \"metrics\": [\n {\"code\": \"total_borrows\", \"name\": \"总借阅数\", \"table\": \"borrow_record\", \"aggregate\": \"count\", \"field\": \"id\", \"unit\": \"条\"},\n {\"code\": \"current_borrows\", \"name\": \"当前借阅数\", \"table\": \"borrow_record\", \"aggregate\": \"count\", \"field\": \"id\", \"status\": \"borrowing\", \"unit\": \"条\"}\n ]\n },\n {\n \"version\": \"1.0\",\n \"code\": \"reservation_flow\",\n \"name\": \"预约管理流程\",\n \"mainTable\": \"reservation\",\n \"statusField\": \"status\",\n \"notFoundMessage\": \"预约记录不存在\",\n \"states\": [\n {\"code\": \"pending\", \"label\": \"待取书\"},\n {\"code\": \"borrowing\", \"label\": \"已借出\"},\n {\"code\": \"cancelled\", \"label\": \"已取消\"}\n ],\n \"actions\": [\n {\n \"code\": \"cancel\",\n \"name\": \"取消预约\",\n \"from\": \"pending\",\n \"to\": \"cancelled\",\n \"actor\": \"reader\",\n \"method\": \"POST\",\n \"path\": \"/reservation/cancel\",\n \"invalidStateMessage\": \"当前状态不能取消\",\n \"successMessage\": \"取消成功\",\n \"audit\": {\"timeField\": \"cancel_time\"},\n \"button\": {\n \"scope\": \"reader\",\n \"pageCode\": \"my_reservation_page\",\n \"slot\": \"list.rowActions\",\n \"type\": \"warning\",\n \"confirm\": \"确认取消预约吗?\",\n \"order\": 10\n }\n },\n {\n \"code\": \"confirm\",\n \"name\": \"确认取书\",\n \"from\": \"pending\",\n \"to\": \"borrowing\",\n \"actor\": \"admin\",\n \"method\": \"POST\",\n \"path\": \"/reservation/confirm\",\n \"invalidStateMessage\": \"当前状态不能确认\",\n \"successMessage\": \"取书确认成功\",\n \"audit\": {\"userField\": \"confirm_user_id\", \"timeField\": \"confirm_time\"},\n \"effects\": [\n {\n \"type\": \"decrease\",\n \"table\": \"book_info\",\n \"relationField\": \"book_id\",\n \"field\": \"stock\",\n \"amount\": \"1\",\n \"min\": \"0\",\n \"notFoundMessage\": \"图书不存在\",\n \"errorMessage\": \"图书库存不足\"\n },\n {\n \"type\": \"create_record\",\n \"table\": \"borrow_record\",\n \"values\": {\n \"book_id\": \"record.book_id\",\n \"user_id\": \"record.user_id\",\n \"status\": \"borrowing\",\n \"borrow_time\": \"now\"\n },\n \"notFoundMessage\": \"创建借阅记录失败\"\n }\n ],\n \"button\": {\n \"scope\": \"admin\",\n \"pageCode\": \"reservation_admin_page\",\n \"slot\": \"list.rowActions\",\n \"type\": \"success\",\n \"confirm\": \"确认取书吗?\",\n \"order\": 10\n }\n }\n ],\n \"metrics\": [\n {\"code\": \"pending_reservations\", \"name\": \"待取书预约\", \"table\": \"reservation\", \"aggregate\": \"count\", \"field\": \"id\", \"status\": \"pending\", \"unit\": \"条\"},\n {\"code\": \"total_reservations\", \"name\": \"总预约数\", \"table\": \"reservation\", \"aggregate\": \"count\", \"field\": \"id\", \"unit\": \"条\"}\n ]\n }\n]', '0', 48694, 1902, 512, 1390, 6373, 4806, 1902, 6373, 8275, 2, 0.01414624, '1', NULL, '2026-07-14 17:56:17');
INSERT INTO `front_ai_usage_ledger` VALUES (132, 108, 108, 106, 100, 'flow_config', 'deepseek', 'deepseek-v4-flash', 'front.flow_config', 'V1', '247495840c67968896ccad2db0a599bd4fc594d0189157dce888b8ede90b3257', '你是业务流程配置设计器。只输出一个合法 JSON 对象,不输出 Markdown、解释或 SQL。\n\n目标用最小 flow_config 描述状态流转、显式 Java 业务动作、多表数量联动、按钮和统计。不要输出 CRUD不要输出通用规则 DSL。\n\n固定结构\n{\n \"version\":\"1.0\",\n \"code\":\"snake_case\",\n \"name\":\"中文业务名\",\n \"mainTable\":\"snake_case\",\n \"statusField\":\"status\",\n \"notFoundMessage\":\"主记录不存在\",\n \"states\":[{\"code\":\"pending\",\"label\":\"待审核\"}],\n \"actions\":[{\n \"code\":\"approve\",\n \"name\":\"审核通过\",\n \"from\":\"pending\",\n \"to\":\"borrowing\",\n \"actor\":\"admin\",\n \"method\":\"POST\",\n \"path\":\"/borrow-record/approve\",\n \"invalidStateMessage\":\"当前状态不能审核\",\n \"successMessage\":\"审核成功\",\n \"audit\":{\"userField\":\"approve_user_id\",\"timeField\":\"approve_time\"},\n \"effects\":[{\n \"type\":\"decrease\",\n \"table\":\"book\",\n \"relationField\":\"book_id\",\n \"field\":\"stock\",\n \"amount\":\"1\",\n \"min\":\"0\",\n \"notFoundMessage\":\"图书不存在\",\n \"errorMessage\":\"图书库存不足\"\n }],\n \"button\":{\"scope\":\"admin\",\"pageCode\":\"borrow_record_list\",\"slot\":\"list.rowActions\",\"type\":\"success\",\"confirm\":\"确认审核通过吗?\",\"order\":10}\n }],\n \"metrics\":[{\"code\":\"borrowing_count\",\"name\":\"借阅中数量\",\"table\":\"borrow_record\",\"aggregate\":\"count\",\"field\":\"id\",\"status\":\"borrowing\",\"unit\":\"条\"}]\n}\n\n约束\n1. code、表名、字段名全部使用小写 snake_case状态 code 使用稳定英文编码label 使用中文。\n2. 每个 action 必须有 from 和 to且二者存在于 states 中并且不相同。\n3. effects.type 只能是 decrease、increase、update_related、create_record。\n4. decrease/increase 必须给 table、relationField、field、amountdecrease 还要给 min。\n5. update_related/create_record 使用 values值可为 currentUserId、now、record.字段名或常量。\n6. 审核人等身份只能通过 audit.userField 表达,由后端登录态注入,不能作为前端可传字段。\n7. 覆盖需求中的完整正向闭环和关键回退/拒绝动作,但不要为普通 CRUD 创建 action。', '请根据以下 JSON 上下文生成 flow_config。appBlueprint 是已确认的页面、角色和菜单范围,必须与它保持一致:\n{\"mode\":\"correction\",\"projectName\":\"图书管理系统\",\"projectDescription\":\"功能:借书、还书、预约、取消预约\\n角色用户、管理员\\n其他模块轮播图、公告、新闻\",\"industryTemplate\":\"\",\"stylePreset\":\"dark-tech\",\"extraRequirements\":\"\",\"confirmedAppBlueprint\":{\"adminHomeDashboard\":{\"charts\":[{\"filters\":[],\"metrics\":[{\"aggregate\":\"count\",\"label\":\"借阅趋势\"}],\"semantic\":\"order\",\"title\":\"借阅趋势\",\"type\":\"line\"},{\"filters\":[],\"metrics\":[{\"aggregate\":\"count\",\"label\":\"图书分类分布\"}],\"semantic\":\"content\",\"title\":\"图书分类分布\",\"type\":\"pie\"}],\"description\":\"核心业务数据\",\"metrics\":[{\"aggregate\":\"count\",\"code\":\"totalBooks\",\"filters\":[],\"semantic\":\"inventory\"},{\"aggregate\":\"count\",\"code\":\"totalBorrows\",\"filters\":[],\"semantic\":\"order\"},{\"aggregate\":\"count\",\"code\":\"currentBorrows\",\"filters\":[],\"semantic\":\"inventory\"},{\"aggregate\":\"count\",\"code\":\"pendingReservations\",\"filters\":[],\"semantic\":\"task\"}],\"title\":\"运营总览\"},\"adminMenus\":[{\"code\":\"book_admin\",\"dataScope\":\"ROLE\",\"name\":\"图书管理\",\"pageCode\":\"book_admin_page\",\"pageType\":\"list\",\"path\":\"/admin/books\",\"requiresLogin\":true,\"tableName\":\"book_info\",\"visibleRoles\":[\"admin\"]},{\"code\":\"borrow_admin\",\"dataScope\":\"ROLE\",\"name\":\"借阅管理\",\"pageCode\":\"borrow_admin_page\",\"pageType\":\"list\",\"path\":\"/admin/borrows\",\"requiresLogin\":true,\"tableName\":\"borrow_record\",\"visibleRoles\":[\"admin\"]},{\"code\":\"reservation_admin\",\"dataScope\":\"ROLE\",\"name\":\"预约管理\",\"pageCode\":\"reservation_admin_page\",\"pageType\":\"list\",\"path\":\"/admin/reservations\",\"requiresLogin\":true,\"tableName\":\"reservation\",\"visibleRoles\":[\"admin\"]},{\"code\":\"reader_admin\",\"dataScope\":\"ROLE\",\"name\":\"读者管理\",\"pageCode\":\"reader_admin_page\",\"pageType\":\"list\",\"path\":\"/admin/readers\",\"requiresLogin\":true,\"tableName\":\"reader\",\"visibleRoles\":[\"admin\"]},{\"code\":\"carousel_admin\",\"dataScope\":\"ROLE\",\"name\":\"轮播图管理\",\"pageCode\":\"carousel_admin_page\",\"pageType\":\"list\",\"path\":\"/admin/carousels\",\"requiresLogin\":true,\"tableName\":\"carousel\",\"visibleRoles\":[\"admin\"]},{\"code\":\"notice_admin\",\"dataScope\":\"ROLE\",\"name\":\"公告管理\",\"pageCode\":\"notice_admin_page\",\"pageType\":\"list\",\"path\":\"/admin/notices\",\"requiresLogin\":true,\"tableName\":\"notice\",\"visibleRoles\":[\"admin\"]},{\"code\":\"news_admin\",\"dataScope\":\"ROLE\",\"name\":\"新闻管理\",\"pageCode\":\"news_admin_page\",\"pageType\":\"list\",\"path\":\"/admin/news\",\"requiresLogin\":true,\"tableName\":\"news\",\"visibleRoles\":[\"admin\"]},{\"code\":\"admin_profile\",\"dataScope\":\"ROLE\",\"name\":\"个人资料\",\"pageCode\":\"admin_profile_page\",\"pageType\":\"form\",\"path\":\"/admin/profile\",\"requiresLogin\":true,\"tableName\":\"admin\",\"visibleRoles\":[\"admin\"]}],\"frontendMenus\":[{\"code\":\"book_catalog\",\"dataScope\":\"PUBLIC\",\"name\":\"图书目录\",\"pageCode\":\"book_catalog_page\",\"pageType\":\"\",\"path\":\"/books\",\"requiresLogin\":false,\"tableName\":\"\",\"visibleRoles\":[]},{\"code\":\"my_borrows\",\"dataScope\":\"CURRENT_USER\",\"name\":\"我的借阅\",\"pageCode\":\"my_borrows_page\",\"pageType\":\"\",\"path\":\"/my-borrows\",\"requiresLogin\":true,\"tableName\":\"\",\"visibleRoles\":[\"reader\"]},{\"code\":\"my_reservations\",\"dataScope\":\"CURRENT_USER\",\"name\":\"我的预约\",\"pageCode\":\"my_reservation_page\",\"pageType\":\"\",\"path\":\"/my-reservations\",\"requiresLogin\":true,\"tableName\":\"\",\"visibleRoles\":[\"reader\"]},{\"code\":\"reader_profile\",\"dataScope\":\"CURRENT_USER\",\"name\":\"个人资料\",\"pageCode\":\"reader_profile_page\",\"pageType\":\"\",\"path\":\"/profile\",\"requiresLogin\":true,\"tableName\":\"\",\"visibleRoles\":[\"reader\"]},{\"code\":\"notices\",\"dataScope\":\"PUBLIC\",\"name\":\"公告\",\"pageCode\":\"notice_list_page\",\"pageType\":\"\",\"path\":\"/notices\",\"requiresLogin\":false,\"tableName\":\"\",\"visibleRoles\":[]},{\"code\":\"news\",\"dataScope\":\"PUBLIC\",\"name\":\"新闻\",\"pageCode\":\"news_list_page\",\"pageType\":\"\",\"path\":\"/news\",\"requiresLogin\":false,\"tableName\":\"\",\"visibleRoles\":[]}],\"frontendPages\":[{\"code\":\"book_catalog_page\",\"menuCode\":\"book_catalog\",\"name\":\"图书目录\",\"pageType\":\"list\",\"parentPageCode\":\"\",\"path\":\"/books\",\"tableName\":\"book_info\"},{\"code\":\"my_borrows_page\",\"menuCode\":\"my_borrows\",\"name\":\"我的借阅\",\"pageType\":\"current_user_list\",\"parentPageCode\":\"\",\"path\":\"/my-borrows\",\"tableName\":\"borrow_record\"},{\"code\":\"my_reservation_page\",\"menuCode\":\"my_reservations\",\"name\":\"我的预约\",\"pageType\":\"current_user_list\",\"parentPageCode\":\"\",\"path\":\"/my-reservations\",\"tableName\":\"reservation\"},{\"code\":\"reader_profile_page\",\"menuCode\":\"reader_profile\",\"name\":\"个人资料\",\"pageType\":\"form\",\"parentPageCode\":\"\",\"path\":\"/profile\",\"tableName\":\"reader\"},{\"code\":\"notice_list_page\",\"menuCode\":\"notices\",\"name\":\"公告列表\",\"pageType\":\"list\",\"parentPageCode\":\"\",\"path\":\"/notices\",\"tableName\":\"notice\"},{\"code\":\"news_list_page\",\"menuCode\":\"news\",\"name\":\"新闻列表\",\"pageType\":\"list\",\"parentPageCode\":\"\",\"path\":\"/news\",\"tableName\":\"news\"}],\"roles\":[{\"code\":\"admin\",\"description\":\"系统管理员,负责图书、借阅、预约、用户、轮播图、公告、新闻等管理\",\"name\":\"管理员\"},{\"code\":\"reader\",\"description\":\"普通用户,可借书、还书、预约图书、取消预约、查看公告和新闻\",\"name\":\"读者\"}]},\"validationError\":\"expect {, but [, class com.ruoyi.generator.domain.front.dto.SimpleFlowConfig, offset 1, character [, line 1, column 1, fastjson-version 2.0.53 [\\n {\\n \\\"version\\\": \\\"1.0\\\",\\n \\\"code\\\": \\\"borrow_record_flow\\\",\\n \\\"name\\\": \\\"借阅管理流程\\\",\\n \\\"mainTable\\\": \\\"borrow_record\\\",\\n \\\"statusField\\\": \\\"status\\\",\\n \\\"notFoundMessage\\\": \\\"借阅记录不存在\\\",\\n \\\"states\\\": [\\n {\\\"code\\\": \\\"pending\\\", \\\"label\\\": \\\"待审核\\\"},\\n {\\\"code\\\": \\\"borrowing\\\", \\\"label\\\": \\\"借阅中\\\"},\\n {\\\"code\\\": \\\"returned\\\", \\\"label\\\": \\\"已归还\\\"},\\n {\\\"code\\\": \\\"rejected\\\", \\\"label\\\": \\\"已拒绝\\\"}\\n ],\\n \\\"actions\\\": [\\n {\\n \\\"code\\\": \\\"approve\\\",\\n \\\"name\\\": \\\"审核通过\\\",\\n \\\"from\\\": \\\"pending\\\",\\n \\\"to\\\": \\\"borrowing\\\",\\n \\\"actor\\\": \\\"admin\\\",\\n \\\"method\\\": \\\"POST\\\",\\n \\\"path\\\": \\\"/borrow-record/approve\\\",\\n \\\"invalidStateMessage\\\": \\\"当前状态不能审核\\\",\\n \\\"successMessage\\\": \\\"审核成功\\\",\\n \\\"audit\\\": {\\\"userField\\\": \\\"approve_user_id\\\", \\\"timeField\\\": \\\"approve_time\\\"},\\n \\\"effects\\\": [\\n {\\n \\\"type\\\": \\\"decrease\\\",\\n \\\"table\\\": \\\"book_info\\\",\\n \\\"relationField\\\": \\\"book_id\\\",\\n \\\"field\\\": \\\"stock\\\",\\n \\\"amount\\\": \\\"1\\\",\\n \\\"min\\\": \\\"0\\\",\\n \\\"notFoundMessage\\\": \\\"图书不存在\\\",\\n \\\"errorMessage\\\": \\\"图书库存不足\\\"\\n }\\n ],\\n \\\"button\\\": {\\n \\\"scope\\\": \\\"admin\\\",\\n \\\"pageCode\\\": \\\"borrow_admin_page\\\",\\n \\\"slot\\\": \\\"list.rowActions\\\",\\n \\\"type\\\": \\\"success\\\",\\n \\\"confirm\\\": \\\"确认审核通过吗?\\\",\\n \\\"order\\\": 10\\n }\\n },\\n {\\n \\\"code\\\": \\\"reject\\\",\\n \\\"name\\\": \\\"拒绝\\\",\\n \\\"from\\\": \\\"pending\\\",\\n \\\"to\\\": \\\"rejected\\\",\\n \\\"actor\\\": \\\"admin\\\",\\n \\\"method\\\": \\\"POST\\\",\\n \\\"path\\\": \\\"/borrow-record/reject\\\",\\n \\\"invalidStateMessage\\\": \\\"当前状态不能拒绝\\\",\\n \\\"successMessage\\\": \\\"已拒绝\\\",\\n \\\"audit\\\": {\\\"userField\\\": \\\"reject_user_id\\\", \\\"timeField\\\": \\\"reject_time\\\"},\\n \\\"button\\\": {\\n \\\"scope\\\": \\\"admin\\\",\\n \\\"pageCode\\\": \\\"borrow_admin_page\\\",\\n \\\"slot\\\": \\\"list.rowActions\\\",\\n \\\"type\\\": \\\"danger\\\",\\n \\\"confirm\\\": \\\"确认拒绝吗?\\\",\\n \\\"order\\\": 20\\n }\\n },\\n {\\n \\\"code\\\": \\\"return\\\",\\n \\\"name\\\": \\\"还书\\\",\\n \\\"from\\\": \\\"borrowing\\\",\\n \\\"to\\\": \\\"returned\\\",\\n \\\"actor\\\": \\\"admin\\\",\\n \\\"method\\\": \\\"POST\\\",\\n \\\"path\\\": \\\"/borrow-record/return\\\",\\n \\\"invalidStateMessage\\\": \\\"当前状态不能还书\\\",\\n \\\"successMessage\\\": \\\"还书成功\\\",\\n \\\"audit\\\": {\\\"userField\\\": \\\"return_user_id\\\", \\\"timeField\\\": \\\"return_time\\\"},\\n \\\"effects\\\": [\\n {\\n \\\"type\\\": \\\"increase\\\",\\n \\\"table\\\": \\\"book_info\\\",\\n \\\"relationField\\\": \\\"book_id\\\",\\n \\\"field\\\": \\\"stock\\\",\\n \\\"amount\\\": \\\"1\\\",\\n \\\"notFoundMessage\\\": \\\"图书不存在\\\"\\n }\\n ],\\n \\\"button\\\": {\\n \\\"scope\\\": \\\"admin\\\",\\n \\\"pageCode\\\": \\\"borrow_admin_page\\\",\\n \\\"slot\\\": \\\"list.rowActions\\\",\\n \\\"type\\\": \\\"primary\\\",\\n \\\"confirm\\\": \\\"确认还书吗?\\\",\\n \\\"order\\\": 30\\n }\\n }\\n ],\\n \\\"metrics\\\": [\\n {\\\"code\\\": \\\"total_borrows\\\", \\\"name\\\": \\\"总借阅数\\\", \\\"table\\\": \\\"borrow_record\\\", \\\"aggregate\\\": \\\"count\\\", \\\"field\\\": \\\"id\\\", \\\"unit\\\": \\\"条\\\"},\\n {\\\"code\\\": \\\"current_borrows\\\", \\\"name\\\": \\\"当前借阅数\\\", \\\"table\\\": \\\"borrow_record\\\", \\\"aggregate\\\": \\\"count\\\", \\\"field\\\": \\\"id\\\", \\\"status\\\": \\\"borrowing\\\", \\\"unit\\\": \\\"条\\\"}\\n ]\\n },\\n {\\n \\\"version\\\": \\\"1.0\\\",\\n \\\"code\\\": \\\"reservation_flow\\\",\\n \\\"name\\\": \\\"预约管理流程\\\",\\n \\\"mainTable\\\": \\\"reservation\\\",\\n \\\"statusField\\\": \\\"status\\\",\\n \\\"notFoundMessage\\\": \\\"预约记录不存在\\\",\\n \\\"states\\\": [\\n {\\\"code\\\": \\\"pending\\\", \\\"label\\\": \\\"待取书\\\"},\\n {\\\"code\\\": \\\"borrowing\\\", \\\"label\\\": \\\"已借出\\\"},\\n {\\\"code\\\": \\\"cancelled\\\", \\\"label\\\": \\\"已取消\\\"}\\n ],\\n \\\"actions\\\": [\\n {\\n \\\"code\\\": \\\"cancel\\\",\\n \\\"name\\\": \\\"取消预约\\\",\\n \\\"from\\\": \\\"pending\\\",\\n \\\"to\\\": \\\"cancelled\\\",\\n \\\"actor\\\": \\\"reader\\\",\\n \\\"method\\\": \\\"POST\\\",\\n \\\"path\\\": \\\"/reservation/cancel\\\",\\n \\\"invalidStateMessage\\\": \\\"当前状态不能取消\\\",\\n \\\"successMessage\\\": \\\"取消成功\\\",\\n \\\"audit\\\": {\\\"timeField\\\": \\\"cancel_time\\\"},\\n \\\"button\\\": {\\n \\\"scope\\\": \\\"reader\\\",\\n \\\"pageCode\\\": \\\"my_reservation_page\\\",\\n \\\"slot\\\": \\\"list.rowActions\\\",\\n \\\"type\\\": \\\"warning\\\",\\n \\\"confirm\\\": \\\"确认取消预约吗?\\\",\\n \\\"order\\\": 10\\n }\\n },\\n {\\n \\\"code\\\": \\\"confirm\\\",\\n \\\"name\\\": \\\"确认取书\\\",\\n \\\"from\\\": \\\"pending\\\",\\n \\\"to\\\": \\\"borrowing\\\",\\n \\\"actor\\\": \\\"admin\\\",\\n \\\"method\\\": \\\"POST\\\",\\n \\\"path\\\": \\\"/reservation/confirm\\\",\\n \\\"invalidStateMessage\\\": \\\"当前状态不能确认\\\",\\n \\\"successMessage\\\": \\\"取书确认成功\\\",\\n \\\"audit\\\": {\\\"userField\\\": \\\"confirm_user_id\\\", \\\"timeField\\\": \\\"confirm_time\\\"},\\n \\\"effects\\\": [\\n {\\n \\\"type\\\": \\\"decrease\\\",\\n \\\"table\\\": \\\"book_info\\\",\\n \\\"relationField\\\": \\\"book_id\\\",\\n \\\"field\\\": \\\"stock\\\",\\n \\\"amount\\\": \\\"1\\\",\\n \\\"min\\\": \\\"0\\\",\\n \\\"notFoundMessage\\\": \\\"图书不存在\\\",\\n \\\"errorMessage\\\": \\\"图书库存不足\\\"\\n },\\n {\\n \\\"type\\\": \\\"create_record\\\",\\n \\\"table\\\": \\\"borrow_record\\\",\\n \\\"values\\\": {\\n \\\"book_id\\\": \\\"record.book_id\\\",\\n \\\"user_id\\\": \\\"record.user_id\\\",\\n \\\"status\\\": \\\"borrowing\\\",\\n \\\"borrow_time\\\": \\\"now\\\"\\n },\\n \\\"notFoundMessage\\\": \\\"创建借阅记录失败\\\"\\n }\\n ],\\n \\\"button\\\": {\\n \\\"scope\\\": \\\"admin\\\",\\n \\\"pageCode\\\": \\\"reservation_admin_page\\\",\\n \\\"slot\\\": \\\"list.rowActions\\\",\\n \\\"type\\\": \\\"success\\\",\\n \\\"confirm\\\": \\\"确认取书吗?\\\",\\n \\\"order\\\": 10\\n }\\n }\\n ],\\n \\\"metrics\\\": [\\n {\\\"code\\\": \\\"pending_reservations\\\", \\\"name\\\": \\\"待取书预约\\\", \\\"table\\\": \\\"reservation\\\", \\\"aggregate\\\": \\\"count\\\", \\\"field\\\": \\\"id\\\", \\\"status\\\": \\\"pending\\\", \\\"unit\\\": \\\"条\\\"},\\n {\\\"code\\\": \\\"total_reservations\\\", \\\"name\\\": \\\"总预约数\\\", \\\"table\\\": \\\"reservation\\\", \\\"aggregate\\\": \\\"count\\\", \\\"field\\\": \\\"id\\\", \\\"unit\\\": \\\"条\\\"}\\n ]\\n }\\n]\",\"originalResponse\":[{\"version\":\"1.0\",\"code\":\"borrow_record_flow\",\"name\":\"借阅管理流程\",\"mainTable\":\"borrow_record\",\"statusField\":\"status\",\"notFoundMessage\":\"借阅记录不存在\",\"states\":[{\"code\":\"pending\",\"label\":\"待审核\"},{\"code\":\"borrowing\",\"label\":\"借阅中\"},{\"code\":\"returned\",\"label\":\"已归还\"},{\"code\":\"rejected\",\"label\":\"已拒绝\"}],\"actions\":[{\"code\":\"approve\",\"name\":\"审核通过\",\"from\":\"pending\",\"to\":\"borrowing\",\"actor\":\"admin\",\"method\":\"POST\",\"path\":\"/borrow-record/approve\",\"invalidStateMessage\":\"当前状态不能审核\",\"successMessage\":\"审核成功\",\"audit\":{\"userField\":\"approve_user_id\",\"timeField\":\"approve_time\"},\"effects\":[{\"type\":\"decrease\",\"table\":\"book_info\",\"relationField\":\"book_id\",\"field\":\"stock\",\"amount\":\"1\",\"min\":\"0\",\"notFoundMessage\":\"图书不存在\",\"errorMessage\":\"图书库存不足\"}],\"button\":{\"scope\":\"admin\",\"pageCode\":\"borrow_admin_page\",\"slot\":\"list.rowActions\",\"type\":\"success\",\"confirm\":\"确认审核通过吗?\",\"order\":10}},{\"code\":\"reject\",\"name\":\"拒绝\",\"from\":\"pending\",\"to\":\"rejected\",\"actor\":\"admin\",\"method\":\"POST\",\"path\":\"/borrow-record/reject\",\"invalidStateMessage\":\"当前状态不能拒绝\",\"successMessage\":\"已拒绝\",\"audit\":{\"userField\":\"reject_user_id\",\"timeField\":\"reject_time\"},\"button\":{\"scope\":\"admin\",\"pageCode\":\"borrow_admin_page\",\"slot\":\"list.rowActions\",\"type\":\"danger\",\"confirm\":\"确认拒绝吗?\",\"order\":20}},{\"code\":\"return\",\"name\":\"还书\",\"from\":\"borrowing\",\"to\":\"returned\",\"actor\":\"admin\",\"method\":\"POST\",\"path\":\"/borrow-record/return\",\"invalidStateMessage\":\"当前状态不能还书\",\"successMessage\":\"还书成功\",\"audit\":{\"userField\":\"return_user_id\",\"timeField\":\"return_time\"},\"effects\":[{\"type\":\"increase\",\"table\":\"book_info\",\"relationField\":\"book_id\",\"field\":\"stock\",\"amount\":\"1\",\"notFoundMessage\":\"图书不存在\"}],\"button\":{\"scope\":\"admin\",\"pageCode\":\"borrow_admin_page\",\"slot\":\"list.rowActions\",\"type\":\"primary\",\"confirm\":\"确认还书吗?\",\"order\":30}}],\"metrics\":[{\"code\":\"total_borrows\",\"name\":\"总借阅数\",\"table\":\"borrow_record\",\"aggregate\":\"count\",\"field\":\"id\",\"unit\":\"条\"},{\"code\":\"current_borrows\",\"name\":\"当前借阅数\",\"table\":\"borrow_record\",\"aggregate\":\"count\",\"field\":\"id\",\"status\":\"borrowing\",\"unit\":\"条\"}]},{\"version\":\"1.0\",\"code\":\"reservation_flow\",\"name\":\"预约管理流程\",\"mainTable\":\"reservation\",\"statusField\":\"status\",\"notFoundMessage\":\"预约记录不存在\",\"states\":[{\"code\":\"pending\",\"label\":\"待取书\"},{\"code\":\"borrowing\",\"label\":\"已借出\"},{\"code\":\"cancelled\",\"label\":\"已取消\"}],\"actions\":[{\"code\":\"cancel\",\"name\":\"取消预约\",\"from\":\"pending\",\"to\":\"cancelled\",\"actor\":\"reader\",\"method\":\"POST\",\"path\":\"/reservation/cancel\",\"invalidStateMessage\":\"当前状态不能取消\",\"successMessage\":\"取消成功\",\"audit\":{\"timeField\":\"cancel_time\"},\"button\":{\"scope\":\"reader\",\"pageCode\":\"my_reservation_page\",\"slot\":\"list.rowActions\",\"type\":\"warning\",\"confirm\":\"确认取消预约吗?\",\"order\":10}},{\"code\":\"confirm\",\"name\":\"确认取书\",\"from\":\"pending\",\"to\":\"borrowing\",\"actor\":\"admin\",\"method\":\"POST\",\"path\":\"/reservation/confirm\",\"invalidStateMessage\":\"当前状态不能确认\",\"successMessage\":\"取书确认成功\",\"audit\":{\"userField\":\"confirm_user_id\",\"timeField\":\"confirm_time\"},\"effects\":[{\"type\":\"decrease\",\"table\":\"book_info\",\"relationField\":\"book_id\",\"field\":\"stock\",\"amount\":\"1\",\"min\":\"0\",\"notFoundMessage\":\"图书不存在\",\"errorMessage\":\"图书库存不足\"},{\"type\":\"create_record\",\"table\":\"borrow_record\",\"values\":{\"book_id\":\"record.book_id\",\"user_id\":\"record.user_id\",\"status\":\"borrowing\",\"borrow_time\":\"now\"},\"notFoundMessage\":\"创建借阅记录失败\"}],\"button\":{\"scope\":\"admin\",\"pageCode\":\"reservation_admin_page\",\"slot\":\"list.rowActions\",\"type\":\"success\",\"confirm\":\"确认取书吗?\",\"order\":10}}],\"metrics\":[{\"code\":\"pending_reservations\",\"name\":\"待取书预约\",\"table\":\"reservation\",\"aggregate\":\"count\",\"field\":\"id\",\"status\":\"pending\",\"unit\":\"条\"},{\"code\":\"total_reservations\",\"name\":\"总预约数\",\"table\":\"reservation\",\"aggregate\":\"count\",\"field\":\"id\",\"unit\":\"条\"}]}]}', '{\n \"version\": \"1.0\",\n \"code\": \"borrow_record_flow\",\n \"name\": \"借阅管理流程\",\n \"mainTable\": \"borrow_record\",\n \"statusField\": \"status\",\n \"notFoundMessage\": \"借阅记录不存在\",\n \"states\": [\n {\"code\": \"pending\", \"label\": \"待审核\"},\n {\"code\": \"borrowing\", \"label\": \"借阅中\"},\n {\"code\": \"returned\", \"label\": \"已归还\"},\n {\"code\": \"rejected\", \"label\": \"已拒绝\"}\n ],\n \"actions\": [\n {\n \"code\": \"approve\",\n \"name\": \"审核通过\",\n \"from\": \"pending\",\n \"to\": \"borrowing\",\n \"actor\": \"admin\",\n \"method\": \"POST\",\n \"path\": \"/borrow-record/approve\",\n \"invalidStateMessage\": \"当前状态不能审核\",\n \"successMessage\": \"审核成功\",\n \"audit\": {\"userField\": \"approve_user_id\", \"timeField\": \"approve_time\"},\n \"effects\": [\n {\n \"type\": \"decrease\",\n \"table\": \"book_info\",\n \"relationField\": \"book_id\",\n \"field\": \"stock\",\n \"amount\": \"1\",\n \"min\": \"0\",\n \"notFoundMessage\": \"图书不存在\",\n \"errorMessage\": \"图书库存不足\"\n }\n ],\n \"button\": {\n \"scope\": \"admin\",\n \"pageCode\": \"borrow_admin_page\",\n \"slot\": \"list.rowActions\",\n \"type\": \"success\",\n \"confirm\": \"确认审核通过吗?\",\n \"order\": 10\n }\n },\n {\n \"code\": \"reject\",\n \"name\": \"拒绝\",\n \"from\": \"pending\",\n \"to\": \"rejected\",\n \"actor\": \"admin\",\n \"method\": \"POST\",\n \"path\": \"/borrow-record/reject\",\n \"invalidStateMessage\": \"当前状态不能拒绝\",\n \"successMessage\": \"已拒绝\",\n \"audit\": {\"userField\": \"reject_user_id\", \"timeField\": \"reject_time\"},\n \"button\": {\n \"scope\": \"admin\",\n \"pageCode\": \"borrow_admin_page\",\n \"slot\": \"list.rowActions\",\n \"type\": \"danger\",\n \"confirm\": \"确认拒绝吗?\",\n \"order\": 20\n }\n },\n {\n \"code\": \"return\",\n \"name\": \"还书\",\n \"from\": \"borrowing\",\n \"to\": \"returned\",\n \"actor\": \"admin\",\n \"method\": \"POST\",\n \"path\": \"/borrow-record/return\",\n \"invalidStateMessage\": \"当前状态不能还书\",\n \"successMessage\": \"还书成功\",\n \"audit\": {\"userField\": \"return_user_id\", \"timeField\": \"return_time\"},\n \"effects\": [\n {\n \"type\": \"increase\",\n \"table\": \"book_info\",\n \"relationField\": \"book_id\",\n \"field\": \"stock\",\n \"amount\": \"1\",\n \"notFoundMessage\": \"图书不存在\"\n }\n ],\n \"button\": {\n \"scope\": \"admin\",\n \"pageCode\": \"borrow_admin_page\",\n \"slot\": \"list.rowActions\",\n \"type\": \"primary\",\n \"confirm\": \"确认还书吗?\",\n \"order\": 30\n }\n }\n ],\n \"metrics\": [\n {\"code\": \"total_borrows\", \"name\": \"总借阅数\", \"table\": \"borrow_record\", \"aggregate\": \"count\", \"field\": \"id\", \"unit\": \"条\"},\n {\"code\": \"current_borrows\", \"name\": \"当前借阅数\", \"table\": \"borrow_record\", \"aggregate\": \"count\", \"field\": \"id\", \"status\": \"borrowing\", \"unit\": \"条\"}\n ]\n}', '0', 12221, 4896, 512, 4384, 1614, 744, 4896, 1614, 6510, 1, 0.00762224, '1', NULL, '2026-07-14 17:56:29');
INSERT INTO `front_ai_usage_ledger` VALUES (133, 108, 108, 106, 100, 'database', 'deepseek', 'deepseek-v4-flash', 'front.database', 'V1', '14dcad479b01de068e5c5bc39b5cd7a591a09d334ee6812483d8ac00dd8c9d61', '你是 MySQL 业务数据库设计专家。只输出符合用户消息结构的 JSON根据已确认的应用蓝图和业务闭环生成可直接落地的表、字段、主外键、字典和表操作策略。字段必须业务化且类型合法所有蓝图与闭环引用必须有真实表字段承载不得生成菜单、权限关系、代码或业务动作。', '根据项目输入 JSON 生成 MySQL 数据库设计 JSON只返回 JSON不要 Markdown 围栏或解释。\nConfirmed app blueprint JSON and Confirmed business loop plan JSON are supplied in the input.\nDatabase generation constraints from the business loop plan must be enforced.\nEvery confirmedBusinessLoopPlan.metrics tableName, field, and filters.field must exist in the generated schema. Numeric sum/avg/min/max metric fields must use a compatible numeric column type. Status-filter metric values must remain compatible with the matching stateMachines.states.\nIf input.mode is correction, repair input.originalResponse according to input.validationError and return the complete corrected database JSON. Do not drop unrelated valid tables or fields.\n输出结构{\"tables\":[{\"tableName\":\"car_info\",\"tableComment\":\"车辆信息表\",\"adminMenuName\":\"车辆管理\",\"operations\":{\"add\":true,\"edit\":true,\"remove\":true,\"removeType\":\"physical\",\"reason\":\"\"},\"columns\":[{\"columnName\":\"id\",\"columnLabel\":\"ID\",\"columnComment\":\"主键ID\",\"columnType\":\"bigint(20)\",\"isPk\":\"1\",\"isIncrement\":\"1\",\"isRequired\":\"1\"}]}]}。\n不要使用 field_1 等占位字段;每个表必须包含非空 columns以及 adminMenuName 和 operations.add/edit/remove/removeType/reason。\nadminMenuName 必须来自本表 tableComment/tableName不得复用其他表或宽泛模块名称。\nadminMenuName must come from that table\'s own tableComment or tableName.\n字段数组名称只能是 columns不能使用 fields、fieldDesign、fieldList、columnList。\nEvery table must include a non-empty columns array; use columns exactly.\n每个字段必须包含 columnName、columnLabel、columnComment、columnType、isPk、isIncrement、isRequired。columnLabel 是短 UI 标签columnComment 是完整数据库说明。\n可提供 javaType、htmlTypehtmlType 只能是 input、textarea、select、radio、checkbox、datetime、imageUpload、fileUpload、editor。\nselect/radio/checkbox 应提供 dictType 和 dictOptions。关联选择使用 remote:target_table:value_field:label_field且目标表和值/标签字段必须都存在于本次 tables JSON。\n非主键外键字段应在目标表存在时使用 remote select无目标表的分类、类型、状态使用本地 dictOptions 或普通输入。\n普通主数据表除唯一主键外至少包含 4 个业务字段。\n订单、支付、借还、审批、流程、任务、库存记录等动作记录表使用仅新增关系、审计、日志、历史表使用只读普通主数据表使用完整 CRUD。\n不要生成 businessActions、业务动作、工作流、代码、菜单表、user_role、角色权限表或权限表。\nDo not generate menu tables, user_role tables, role-permission tables, or permission tables.\n表名字段名只使用小写字母、数字、下划线每表必须且只能有一个主键。字段类型只能使用 bigint(20)、int(11)、varchar(n)、char(n)、decimal(p,s)、datetime、date、text、longtext。\n为 confirmedAppBlueprint.roles 中每个角色创建独立账号表admin 使用 admin其他角色使用 role.code。不得使用共享用户表或 role_id/role_code/user_role。\n角色账号表包含 `<role_code>_id` 自增主键、username、password_hash、nickname、status、create_time。admin 只能登录后台,非 admin 角色登录前台。\n生成 frontendPages.tableName 引用的全部表;个人资料页必须绑定对应非 admin 角色账号表。requiresLogin=true 且 dataScope=CURRENT_USER 的业务数据通常包含 user_id。\ncanonicalTableRegistry 中的名称是最终规范表名。confirmedBusinessLoopPlan 若出现与其指向同一业务对象的同义表名,必须使用 canonicalTableRegistry 中的名称,不得同时生成两张同义表。\n根据 confirmedBusinessLoopPlan 创建 coreObjects.tableName、actions.ownerTable补齐 stateMachines.statusField、quantityRules.quantityField 以及 recordRules 和动作前置条件需要的字段。状态值不得超出 stateMachines.states。\n严格实现 confirmedBusinessLoopPlan.businessPoliciesTIME_LIMIT 的 startField、dueField 使用 datetimeOVERDUE_FEE 的 dueField 使用 datetime、daysTargetField 使用 int(11)、targetField 使用 decimal(10,2)QUANTITY_LIMIT 的 targetField 使用 int(11) 且默认值为 0。所有政策字段必须位于政策指定的 tableName禁止只把期限或公式写进 columnComment 而不创建字段。\nDo not invent status values outside stateMachines.states.\n严格遵守 input.limits.maxTables 和 maxColumnsPerTable。\n项目输入 JSON\n{\"mode\":\"generate\",\"projectName\":\"图书管理系统\",\"projectDescription\":\"功能:借书、还书、预约、取消预约\\n角色用户、管理员\\n其他模块轮播图、公告、新闻\",\"industryTemplate\":\"\",\"stylePreset\":\"dark-tech\",\"extraRequirements\":\"\",\"confirmedAppBlueprint\":{\"adminHomeDashboard\":{\"charts\":[{\"filters\":[],\"metrics\":[{\"aggregate\":\"count\",\"label\":\"借阅趋势\"}],\"semantic\":\"order\",\"title\":\"借阅趋势\",\"type\":\"line\"},{\"filters\":[],\"metrics\":[{\"aggregate\":\"count\",\"label\":\"图书分类分布\"}],\"semantic\":\"content\",\"title\":\"图书分类分布\",\"type\":\"pie\"}],\"description\":\"核心业务数据\",\"metrics\":[{\"aggregate\":\"count\",\"code\":\"totalBooks\",\"filters\":[],\"semantic\":\"inventory\"},{\"aggregate\":\"count\",\"code\":\"totalBorrows\",\"filters\":[],\"semantic\":\"order\"},{\"aggregate\":\"count\",\"code\":\"currentBorrows\",\"filters\":[],\"semantic\":\"inventory\"},{\"aggregate\":\"count\",\"code\":\"pendingReservations\",\"filters\":[],\"semantic\":\"task\"}],\"title\":\"运营总览\"},\"adminMenus\":[{\"code\":\"book_admin\",\"dataScope\":\"ROLE\",\"name\":\"图书管理\",\"pageCode\":\"book_admin_page\",\"pageType\":\"list\",\"path\":\"/admin/books\",\"requiresLogin\":true,\"tableName\":\"book_info\",\"visibleRoles\":[\"admin\"]},{\"code\":\"borrow_admin\",\"dataScope\":\"ROLE\",\"name\":\"借阅管理\",\"pageCode\":\"borrow_admin_page\",\"pageType\":\"list\",\"path\":\"/admin/borrows\",\"requiresLogin\":true,\"tableName\":\"borrow_record\",\"visibleRoles\":[\"admin\"]},{\"code\":\"reservation_admin\",\"dataScope\":\"ROLE\",\"name\":\"预约管理\",\"pageCode\":\"reservation_admin_page\",\"pageType\":\"list\",\"path\":\"/admin/reservations\",\"requiresLogin\":true,\"tableName\":\"reservation\",\"visibleRoles\":[\"admin\"]},{\"code\":\"reader_admin\",\"dataScope\":\"ROLE\",\"name\":\"读者管理\",\"pageCode\":\"reader_admin_page\",\"pageType\":\"list\",\"path\":\"/admin/readers\",\"requiresLogin\":true,\"tableName\":\"reader\",\"visibleRoles\":[\"admin\"]},{\"code\":\"carousel_admin\",\"dataScope\":\"ROLE\",\"name\":\"轮播图管理\",\"pageCode\":\"carousel_admin_page\",\"pageType\":\"list\",\"path\":\"/admin/carousels\",\"requiresLogin\":true,\"tableName\":\"carousel\",\"visibleRoles\":[\"admin\"]},{\"code\":\"notice_admin\",\"dataScope\":\"ROLE\",\"name\":\"公告管理\",\"pageCode\":\"notice_admin_page\",\"pageType\":\"list\",\"path\":\"/admin/notices\",\"requiresLogin\":true,\"tableName\":\"notice\",\"visibleRoles\":[\"admin\"]},{\"code\":\"news_admin\",\"dataScope\":\"ROLE\",\"name\":\"新闻管理\",\"pageCode\":\"news_admin_page\",\"pageType\":\"list\",\"path\":\"/admin/news\",\"requiresLogin\":true,\"tableName\":\"news\",\"visibleRoles\":[\"admin\"]},{\"code\":\"admin_profile\",\"dataScope\":\"ROLE\",\"name\":\"个人资料\",\"pageCode\":\"admin_profile_page\",\"pageType\":\"form\",\"path\":\"/admin/profile\",\"requiresLogin\":true,\"tableName\":\"admin\",\"visibleRoles\":[\"admin\"]}],\"frontendMenus\":[{\"code\":\"book_catalog\",\"dataScope\":\"PUBLIC\",\"name\":\"图书目录\",\"pageCode\":\"book_catalog_page\",\"pageType\":\"\",\"path\":\"/books\",\"requiresLogin\":false,\"tableName\":\"\",\"visibleRoles\":[]},{\"code\":\"my_borrows\",\"dataScope\":\"CURRENT_USER\",\"name\":\"我的借阅\",\"pageCode\":\"my_borrows_page\",\"pageType\":\"\",\"path\":\"/my-borrows\",\"requiresLogin\":true,\"tableName\":\"\",\"visibleRoles\":[\"reader\"]},{\"code\":\"my_reservations\",\"dataScope\":\"CURRENT_USER\",\"name\":\"我的预约\",\"pageCode\":\"my_reservation_page\",\"pageType\":\"\",\"path\":\"/my-reservations\",\"requiresLogin\":true,\"tableName\":\"\",\"visibleRoles\":[\"reader\"]},{\"code\":\"reader_profile\",\"dataScope\":\"CURRENT_USER\",\"name\":\"个人资料\",\"pageCode\":\"reader_profile_page\",\"pageType\":\"\",\"path\":\"/profile\",\"requiresLogin\":true,\"tableName\":\"\",\"visibleRoles\":[\"reader\"]},{\"code\":\"notices\",\"dataScope\":\"PUBLIC\",\"name\":\"公告\",\"pageCode\":\"notice_list_page\",\"pageType\":\"\",\"path\":\"/notices\",\"requiresLogin\":false,\"tableName\":\"\",\"visibleRoles\":[]},{\"code\":\"news\",\"dataScope\":\"PUBLIC\",\"name\":\"新闻\",\"pageCode\":\"news_list_page\",\"pageType\":\"\",\"path\":\"/news\",\"requiresLogin\":false,\"tableName\":\"\",\"visibleRoles\":[]}],\"frontendPages\":[{\"code\":\"book_catalog_page\",\"menuCode\":\"book_catalog\",\"name\":\"图书目录\",\"pageType\":\"list\",\"parentPageCode\":\"\",\"path\":\"/books\",\"tableName\":\"book_info\"},{\"code\":\"my_borrows_page\",\"menuCode\":\"my_borrows\",\"name\":\"我的借阅\",\"pageType\":\"current_user_list\",\"parentPageCode\":\"\",\"path\":\"/my-borrows\",\"tableName\":\"borrow_record\"},{\"code\":\"my_reservation_page\",\"menuCode\":\"my_reservations\",\"name\":\"我的预约\",\"pageType\":\"current_user_list\",\"parentPageCode\":\"\",\"path\":\"/my-reservations\",\"tableName\":\"reservation\"},{\"code\":\"reader_profile_page\",\"menuCode\":\"reader_profile\",\"name\":\"个人资料\",\"pageType\":\"form\",\"parentPageCode\":\"\",\"path\":\"/profile\",\"tableName\":\"reader\"},{\"code\":\"notice_list_page\",\"menuCode\":\"notices\",\"name\":\"公告列表\",\"pageType\":\"list\",\"parentPageCode\":\"\",\"path\":\"/notices\",\"tableName\":\"notice\"},{\"code\":\"news_list_page\",\"menuCode\":\"news\",\"name\":\"新闻列表\",\"pageType\":\"list\",\"parentPageCode\":\"\",\"path\":\"/news\",\"tableName\":\"news\"}],\"roles\":[{\"code\":\"admin\",\"description\":\"系统管理员,负责图书、借阅、预约、用户、轮播图、公告、新闻等管理\",\"name\":\"管理员\"},{\"code\":\"reader\",\"description\":\"普通用户,可借书、还书、预约图书、取消预约、查看公告和新闻\",\"name\":\"读者\"}]},\"flowConfig\":{\"actions\":[{\"actor\":\"admin\",\"audit\":{\"timeField\":\"approve_time\",\"userField\":\"approve_user_id\"},\"button\":{\"confirm\":\"确认审核通过吗?\",\"order\":10,\"pageCode\":\"borrow_admin_page\",\"scope\":\"admin\",\"slot\":\"list.rowActions\",\"type\":\"success\"},\"code\":\"approve\",\"effects\":[{\"amount\":\"1\",\"errorMessage\":\"图书库存不足\",\"field\":\"stock\",\"min\":\"0\",\"notFoundMessage\":\"图书不存在\",\"relationField\":\"book_id\",\"table\":\"book_info\",\"type\":\"decrease\",\"values\":{}}],\"from\":\"pending\",\"invalidStateMessage\":\"当前状态不能审核\",\"method\":\"POST\",\"name\":\"审核通过\",\"path\":\"/borrow-record/approve\",\"successMessage\":\"审核成功\",\"to\":\"borrowing\"},{\"actor\":\"admin\",\"audit\":{\"timeField\":\"reject_time\",\"userField\":\"reject_user_id\"},\"button\":{\"confirm\":\"确认拒绝吗?\",\"order\":20,\"pageCode\":\"borrow_admin_page\",\"scope\":\"admin\",\"slot\":\"list.rowActions\",\"type\":\"danger\"},\"code\":\"reject\",\"effects\":[],\"from\":\"pending\",\"invalidStateMessage\":\"当前状态不能拒绝\",\"method\":\"POST\",\"name\":\"拒绝\",\"path\":\"/borrow-record/reject\",\"successMessage\":\"已拒绝\",\"to\":\"rejected\"},{\"actor\":\"admin\",\"audit\":{\"timeField\":\"return_time\",\"userField\":\"return_user_id\"},\"button\":{\"confirm\":\"确认还书吗?\",\"order\":30,\"pageCode\":\"borrow_admin_page\",\"scope\":\"admin\",\"slot\":\"list.rowActions\",\"type\":\"primary\"},\"code\":\"return\",\"effects\":[{\"amount\":\"1\",\"field\":\"stock\",\"min\":\"0\",\"notFoundMessage\":\"图书不存在\",\"relationField\":\"book_id\",\"table\":\"book_info\",\"type\":\"increase\",\"values\":{}}],\"from\":\"borrowing\",\"invalidStateMessage\":\"当前状态不能还书\",\"method\":\"POST\",\"name\":\"还书\",\"path\":\"/borrow-record/return\",\"successMessage\":\"还书成功\",\"to\":\"returned\"}],\"code\":\"borrow_record_flow\",\"mainTable\":\"borrow_record\",\"metrics\":[{\"aggregate\":\"count\",\"code\":\"total_borrows\",\"field\":\"id\",\"name\":\"总借阅数\",\"table\":\"borrow_record\",\"unit\":\"条\"},{\"aggregate\":\"count\",\"code\":\"current_borrows\",\"field\":\"id\",\"name\":\"当前借阅数\",\"status\":\"borrowing\",\"table\":\"borrow_record\",\"unit\":\"条\"}],\"name\":\"借阅管理流程\",\"notFoundMessage\":\"借阅记录不存在\",\"states\":[{\"code\":\"pending\",\"label\":\"待审核\"},{\"code\":\"borrowing\",\"label\":\"借阅中\"},{\"code\":\"returned\",\"label\":\"已归还\"},{\"code\":\"rejected\",\"label\":\"已拒绝\"}],\"statusField\":\"status\",\"version\":\"1.0\"},\"compiledFlowContract\":{\"acceptanceScenarios\":[],\"actions\":[{\"actor\":\"admin\",\"code\":\"approve\",\"name\":\"审核通过\",\"ownerObject\":\"borrow_record\",\"ownerTable\":\"borrow_record\",\"preconditions\":[],\"quantityEffects\":[{\"actionCode\":\"approve\",\"amount\":\"1\",\"effectType\":\"decrease\",\"objectCode\":\"book_info\",\"quantityField\":\"stock\",\"tableName\":\"book_info\"}],\"recordEffects\":[],\"required\":true,\"stateTransitions\":[{\"actionCode\":\"approve\",\"fromState\":\"pending\",\"toState\":\"borrowing\"}]},{\"actor\":\"admin\",\"code\":\"reject\",\"name\":\"拒绝\",\"ownerObject\":\"borrow_record\",\"ownerTable\":\"borrow_record\",\"preconditions\":[],\"quantityEffects\":[],\"recordEffects\":[],\"required\":true,\"stateTransitions\":[{\"actionCode\":\"reject\",\"fromState\":\"pending\",\"toState\":\"rejected\"}]},{\"actor\":\"admin\",\"code\":\"return\",\"name\":\"还书\",\"ownerObject\":\"borrow_record\",\"ownerTable\":\"borrow_record\",\"preconditions\":[],\"quantityEffects\":[{\"actionCode\":\"return\",\"amount\":\"1\",\"effectType\":\"increase\",\"objectCode\":\"book_info\",\"quantityField\":\"stock\",\"tableName\":\"book_info\"}],\"recordEffects\":[],\"required\":true,\"stateTransitions\":[{\"actionCode\":\"return\",\"fromState\":\"borrowing\",\"toState\":\"returned\"}]}],\"businessPolicies\":[],\"coreObjects\":[{\"code\":\"borrow_record\",\"name\":\"借阅管理流程\",\"objectType\":\"main\",\"tableName\":\"borrow_record\"},{\"code\":\"book_info\",\"name\":\"book_info\",\"objectType\":\"related\",\"tableName\":\"book_info\"}],\"domainName\":\"借阅管理流程\",\"metrics\":[{\"aggregate\":\"count\",\"code\":\"total_borrows\",\"field\":\"id\",\"filters\":[],\"name\":\"总借阅数\",\"relatedActionCodes\":[],\"required\":true,\"tableName\":\"borrow_record\",\"unit\":\"条\"},{\"aggregate\":\"count\",\"code\":\"current_borrows\",\"field\":\"id\",\"filters\":[{\"field\":\"status\",\"operator\":\"eq\",\"values\":[\"borrowing\"]}],\"name\":\"当前借阅数\",\"relatedActionCodes\":[],\"required\":true,\"tableName\":\"borrow_record\",\"unit\":\"条\"}],\"pageBindings\":[{\"actionCode\":\"approve\",\"pageCode\":\"borrow_admin_page\",\"slot\":\"list.rowActions\",\"tableName\":\"borrow_record\",\"target\":\"admin\"},{\"actionCode\":\"reject\",\"pageCode\":\"borrow_admin_page\",\"slot\":\"list.rowActions\",\"tableName\":\"borrow_record\",\"target\":\"admin\"},{\"actionCode\":\"return\",\"pageCode\":\"borrow_admin_page\",\"slot\":\"list.rowActions\",\"tableName\":\"borrow_record\",\"target\":\"admin\"}],\"quantityRules\":[{\"actionCode\":\"approve\",\"amount\":\"1\",\"effectType\":\"decrease\",\"objectCode\":\"book_info\",\"quantityField\":\"stock\",\"tableName\":\"book_info\"},{\"actionCode\":\"return\",\"amount\":\"1\",\"effectType\":\"increase\",\"objectCode\":\"book_info\",\"quantityField\":\"stock\",\"tableName\":\"book_info\"}],\"recordRules\":[],\"stateMachines\":[{\"objectCode\":\"borrow_record\",\"states\":[\"pending\",\"borrowing\",\"returned\",\"rejected\"],\"statusField\":\"status\",\"tableName\":\"borrow_record\",\"transitions\":[{\"actionCode\":\"approve\",\"fromState\":\"pending\",\"toState\":\"borrowing\"},{\"actionCode\":\"reject\",\"fromState\":\"pending\",\"toState\":\"rejected\"},{\"actionCode\":\"return\",\"fromState\":\"borrowing\",\"toState\":\"returned\"}]}]},\"canonicalTableRegistry\":[\"book_info\",\"borrow_record\",\"reservation\",\"reader\",\"notice\",\"news\",\"carousel\",\"admin\"],\"limits\":{\"maxTables\":12,\"maxColumnsPerTable\":30}}', '{\n \"tables\": [\n {\n \"tableName\": \"book_info\",\n \"tableComment\": \"图书管理\",\n \"adminMenuName\": \"图书管理\",\n \"operations\": {\n \"add\": true,\n \"edit\": true,\n \"remove\": true,\n \"removeType\": \"physical\",\n \"reason\": \"\"\n },\n \"columns\": [\n {\n \"columnName\": \"id\",\n \"columnLabel\": \"ID\",\n \"columnComment\": \"主键ID\",\n \"columnType\": \"bigint(20)\",\n \"isPk\": \"1\",\n \"isIncrement\": \"1\",\n \"isRequired\": \"1\",\n \"javaType\": \"Long\",\n \"htmlType\": \"input\"\n },\n {\n \"columnName\": \"title\",\n \"columnLabel\": \"书名\",\n \"columnComment\": \"图书书名\",\n \"columnType\": \"varchar(200)\",\n \"isPk\": \"0\",\n \"isIncrement\": \"0\",\n \"isRequired\": \"1\",\n \"javaType\": \"String\",\n \"htmlType\": \"input\"\n },\n {\n \"columnName\": \"author\",\n \"columnLabel\": \"作者\",\n \"columnComment\": \"作者姓名\",\n \"columnType\": \"varchar(100)\",\n \"isPk\": \"0\",\n \"isIncrement\": \"0\",\n \"isRequired\": \"1\",\n \"javaType\": \"String\",\n \"htmlType\": \"input\"\n },\n {\n \"columnName\": \"isbn\",\n \"columnLabel\": \"ISBN\",\n \"columnComment\": \"国际标准书号\",\n \"columnType\": \"varchar(20)\",\n \"isPk\": \"0\",\n \"isIncrement\": \"0\",\n \"isRequired\": \"1\",\n \"javaType\": \"String\",\n \"htmlType\": \"input\"\n },\n {\n \"columnName\": \"publisher\",\n \"columnLabel\": \"出版社\",\n \"columnComment\": \"出版社名称\",\n \"columnType\": \"varchar(100)\",\n \"isPk\": \"0\",\n \"isIncrement\": \"0\",\n \"isRequired\": \"1\",\n \"javaType\": \"String\",\n \"htmlType\": \"input\"\n },\n {\n \"columnName\": \"publish_date\",\n \"columnLabel\": \"出版日期\",\n \"columnComment\": \"出版时间\",\n \"columnType\": \"date\",\n \"isPk\": \"0\",\n \"isIncrement\": \"0\",\n \"isRequired\": \"0\",\n \"javaType\": \"LocalDate\",\n \"htmlType\": \"datetime\"\n },\n {\n \"columnName\": \"category\",\n \"columnLabel\": \"分类\",\n \"columnComment\": \"图书分类,如文学、科技等\",\n \"columnType\": \"varchar(50)\",\n \"isPk\": \"0\",\n \"isIncrement\": \"0\",\n \"isRequired\": \"0\",\n \"javaType\": \"String\",\n \"htmlType\": \"select\",\n \"dictType\": \"local\",\n \"dictOptions\": [\n {\"label\": \"文学\", \"value\": \"literature\"},\n {\"label\": \"科技\", \"value\": \"technology\"},\n {\"label\": \"历史\", \"value\": \"history\"},\n {\"label\": \"哲学\", \"value\": \"philosophy\"},\n {\"label\": \"艺术\", \"value\": \"art\"}\n ]\n },\n {\n \"columnName\": \"stock\",\n \"columnLabel\": \"库存\",\n \"columnComment\": \"当前库存数量默认0\",\n \"columnType\": \"int(11)\",\n \"isPk\": \"0\",\n \"isIncrement\": \"0\",\n \"isRequired\": \"1\",\n \"javaType\": \"Integer\",\n \"htmlType\": \"input\",\n \"defaultValue\": \"0\"\n },\n {\n \"columnName\": \"description\",\n \"columnLabel\": \"简介\",\n \"columnComment\": \"图书简介\",\n \"columnType\": \"text\",\n \"isPk\": \"0\",\n \"isIncrement\": \"0\",\n \"isRequired\": \"0\",\n \"javaType\": \"String\",\n \"htmlType\": \"editor\"\n },\n {\n \"columnName\": \"cover_url\",\n \"columnLabel\": \"封面\",\n \"columnComment\": \"封面图片URL\",\n \"columnType\": \"varchar(500)\",\n \"isPk\": \"0\",\n \"isIncrement\": \"0\",\n \"isRequired\": \"0\",\n \"javaType\": \"String\",\n \"htmlType\": \"imageUpload\"\n },\n {\n \"columnName\": \"status\",\n \"columnLabel\": \"状态\",\n \"columnComment\": \"上架/下架\",\n \"columnType\": \"varchar(20)\",\n \"isPk\": \"0\",\n \"isIncrement\": \"0\",\n \"isRequired\": \"1\",\n \"javaType\": \"String\",\n \"htmlType\": \"select\",\n \"dictType\": \"local\",\n \"dictOptions\": [\n {\"label\": \"上架\", \"value\": \"active\"},\n {\"label\": \"下架\", \"value\": \"inactive\"}\n ],\n \"defaultValue\": \"active\"\n },\n {\n \"columnName\": \"create_time\",\n \"columnLabel\": \"创建时间\",\n \"columnComment\": \"记录创建时间\",\n \"columnType\": \"datetime\",\n \"isPk\": \"0\",\n \"isIncrement\": \"0\",\n \"isRequired\": \"0\",\n \"javaType\": \"LocalDateTime\",\n \"htmlType\": \"datetime\"\n },\n {\n \"columnName\": \"update_time\",\n \"columnLabel\": \"更新时间\",\n \"columnComment\": \"记录更新时间\",\n \"columnType\": \"datetime\",\n \"isPk\": \"0\",\n \"isIncrement\": \"0\",\n \"isRequired\": \"0\",\n \"javaType\": \"LocalDateTime\",\n \"htmlType\": \"datetime\"\n }\n ]\n },\n {\n \"tableName\": \"borrow_record\",\n \"tableComment\": \"借阅管理\",\n \"adminMenuName\": \"借阅管理\",\n \"operations\": {\n \"add\": true,\n \"edit\": false,\n \"remove\": false,\n \"removeType\": \"physical\",\n \"reason\": \"借阅记录不可编辑或删除\"\n },\n \"columns\": [\n {\n \"columnName\": \"id\",\n \"columnLabel\": \"ID\",\n \"columnComment\": \"主键ID\",\n \"columnType\": \"bigint(20)\",\n \"isPk\": \"1\",\n \"isIncrement\": \"1\",\n \"isRequired\": \"1\",\n \"javaType\": \"Long\",\n \"htmlType\": \"input\"\n },\n {\n \"columnName\": \"book_id\",\n \"columnLabel\": \"图书\",\n \"columnComment\": \"关联图书ID\",\n \"columnType\": \"bigint(20)\",\n \"isPk\": \"0\",\n \"isIncrement\": \"0\",\n \"isRequired\": \"1\",\n \"javaType\": \"Long\",\n \"htmlType\": \"select\",\n \"dictType\": \"remote:book_info:id:title\"\n },\n {\n \"columnName\": \"reader_id\",\n \"columnLabel\": \"读者\",\n \"columnComment\": \"关联读者ID\",\n \"columnType\": \"bigint(20)\",\n \"isPk\": \"0\",\n \"isIncrement\": \"0\",\n \"isRequired\": \"1\",\n \"javaType\": \"Long\",\n \"htmlType\": \"select\",\n \"dictType\": \"remote:reader:reader_id:username\"\n },\n {\n \"columnName\": \"borrow_date\",\n \"columnLabel\": \"借书日期\",\n \"columnComment\": \"借书时间\",\n \"columnType\": \"datetime\",\n \"isPk\": \"0\",\n \"isIncrement\": \"0\",\n \"isRequired\": \"1\",\n \"javaType\": \"LocalDateTime\",\n \"htmlType\": \"datetime\"\n },\n {\n \"columnName\": \"due_date\",\n \"columnLabel\": \"应还日期\",\n \"columnComment\": \"应还书时间\",\n \"columnType\": \"datetime\",\n \"isPk\": \"0\",\n \"isIncrement\": \"0\",\n \"isRequired\": \"1\",\n \"javaType\": \"LocalDateTime\",\n \"htmlType\": \"datetime\"\n },\n {\n \"columnName\": \"return_date\",\n \"columnLabel\": \"实际归还\",\n \"columnComment\": \"实际归还日期,空表示未还\",\n \"columnType\": \"datetime\",\n \"isPk\": \"0\",\n \"isIncrement\": \"0\",\n \"isRequired\": \"0\",\n \"javaType\": \"LocalDateTime\",\n \"htmlType\": \"datetime\"\n },\n {\n \"columnName\": \"status\",\n \"columnLabel\": \"状态\",\n \"columnComment\": \"借阅状态pending, borrowing, returned, rejected\",\n \"columnType\": \"varchar(20)\",\n \"isPk\": \"0\",\n \"isIncrement\": \"0\",\n \"isRequired\": \"1\",\n \"javaType\": \"String\",\n \"htmlType\": \"select\",\n \"dictType\": \"local\",\n \"dictOptions\": [\n {\"label\": \"待审核\", \"value\": \"pending\"},\n {\"label\": \"借阅中\", \"value\": \"borrowing\"},\n {\"label\": \"已归还\", \"value\": \"returned\"},\n {\"label\": \"已拒绝\", \"value\": \"rejected\"}\n ],\n \"defaultValue\": \"pending\"\n },\n {\n \"columnName\": \"approve_time\",\n \"columnLabel\": \"审核时间\",\n \"columnComment\": \"管理员审核通过时间\",\n \"columnType\": \"datetime\",\n \"isPk\": \"0\",\n \"isIncrement\": \"0\",\n \"isRequired\": \"0\",\n \"javaType\": \"LocalDateTime\",\n \"htmlType\": \"datetime\"\n },\n {\n \"columnName\": \"approve_user_id\",\n \"columnLabel\": \"审核人\",\n \"columnComment\": \"审核管理员ID\",\n \"columnType\": \"bigint(20)\",\n \"isPk\": \"0\",\n \"isIncrement\": \"0\",\n \"isRequired\": \"0\",\n \"javaType\": \"Long\",\n \"htmlType\": \"select\",\n \"dictType\": \"remote:admin:admin_id:username\"\n },\n {\n \"columnName\": \"reject_time\",\n \"columnLabel\": \"拒绝时间\",\n \"columnComment\": \"管理员拒绝时间\",\n \"columnType\": \"datetime\",\n \"isPk\": \"0\",\n \"isIncrement\": \"0\",\n \"isRequired\": \"0\",\n \"javaType\": \"LocalDateTime\",\n \"htmlType\": \"datetime\"\n },\n {\n \"columnName\": \"reject_user_id\",\n \"columnLabel\": \"拒绝人\",\n \"columnComment\": \"拒绝管理员ID\",\n \"columnType\": \"bigint(20)\",\n \"isPk\": \"0\",\n \"isIncrement\": \"0\",\n \"isRequired\": \"0\",\n \"javaType\": \"Long\",\n \"htmlType\": \"select\",\n \"dictType\": \"remote:admin:admin_id:username\"\n },\n {\n \"columnName\": \"return_time\",\n \"columnLabel\": \"还书操作时间\",\n \"columnComment\": \"管理员执行还书操作的时间\",\n \"columnType\": \"datetime\",\n \"isPk\": \"0\",\n \"isIncrement\": \"0\",\n \"isRequired\": \"0\",\n \"javaType\": \"LocalDateTime\",\n \"htmlType\": \"datetime\"\n },\n {\n \"columnName\": \"return_user_id\",\n \"columnLabel\": \"还书经办人\",\n \"columnComment\": \"执行还书操作的管理员ID\",\n \"columnType\": \"bigint(20)\",\n \"isPk\": \"0\",\n \"isIncrement\": \"0\",\n \"isRequired\": \"0\",\n \"javaType\": \"Long\",\n \"htmlType\": \"select\",\n \"dictType\": \"remote:admin:admin_id:username\"\n },\n {\n \"columnName\": \"create_time\",\n \"columnLabel\": \"创建时间\",\n \"columnComment\": \"记录创建时间\",\n \"columnType\": \"datetime\",\n \"isPk\": \"0\",\n \"isIncrement\": \"0\",\n \"isRequired\": \"0\",\n \"javaType\": \"LocalDateTime\",\n \"htmlType\": \"datetime\"\n },\n {\n \"columnName\": \"update_time\",\n \"columnLabel\": \"更新时间\",\n \"columnComment\": \"记录更新时间\",\n \"columnType\": \"datetime\",\n \"isPk\": \"0\",\n \"isIncrement\": \"0\",\n \"isRequired\": \"0\",\n \"javaType\": \"LocalDateTime\",\n \"htmlType\": \"datetime\"\n }\n ]\n },\n {\n \"tableName\": \"reservation\",\n \"tableComment\": \"预约管理\",\n \"adminMenuName\": \"预约管理\",\n \"operations\": {\n \"add\": true,\n \"edit\": false,\n \"remove\": false,\n \"removeType\": \"physical\",\n \"reason\": \"预约记录不可编辑或删除\"\n },\n \"columns\": [\n {\n \"columnName\": \"id\",\n \"columnLabel\": \"ID\",\n \"columnComment\": \"主键ID\",\n \"columnType\": \"bigint(20)\",\n \"isPk\": \"1\",\n \"isIncrement\": \"1\",\n \"isRequired\": \"1\",\n \"javaType\": \"Long\",\n \"htmlType\": \"input\"\n },\n {\n \"columnName\": \"book_id\",\n \"columnLabel\": \"图书\",\n \"columnComment\": \"关联图书ID\",\n \"columnType\": \"bigint(20)\",\n \"isPk\": \"0\",\n \"isIncrement\": \"0\",\n \"isRequired\": \"1\",\n \"javaType\": \"Long\",\n \"htmlType\": \"select\",\n \"dictType\": \"remote:book_info:id:title\"\n },\n {\n \"columnName\": \"reader_id\",\n \"columnLabel\": \"读者\",\n \"columnComment\": \"关联读者ID\",\n \"columnType\": \"bigint(20)\",\n \"isPk\": \"0\",\n \"isIncrement\": \"0\",\n \"isRequired\": \"1\",\n \"javaType\": \"Long\",\n \"htmlType\": \"select\",\n \"dictType\": \"remote:reader:reader_id:username\"\n },\n {\n \"columnName\": \"reservation_date\",\n \"columnLabel\": \"预约时间\",\n \"columnComment\": \"读者预约时间\",\n \"columnType\": \"datetime\",\n \"isPk\": \"0\",\n \"isIncrement\": \"0\",\n \"isRequired\": \"1\",\n \"javaType\": \"LocalDateTime\",\n \"htmlType\": \"datetime\"\n },\n {\n \"columnName\": \"status\",\n \"columnLabel\": \"状态\",\n \"columnComment\": \"预约状态pending(待取书), fulfilled(已借出), cancelled(已取消)\",\n \"columnType\": \"varchar(20)\",\n \"isPk\": \"0\",\n \"isIncrement\": \"0\",\n \"isRequired\": \"1\",\n \"javaType\": \"String\",\n \"htmlType\": \"select\",\n \"dictType\": \"local\",\n \"dictOptions\": [\n {\"label\": \"待取书\", \"value\": \"pending\"},\n {\"label\": \"已借出\", \"value\": \"fulfilled\"},\n {\"label\": \"已取消\", \"value\": \"cancelled\"}\n ],\n \"defaultValue\": \"pending\"\n },\n {\n \"columnName\": \"create_time\",\n \"columnLabel\": \"创建时间\",\n \"columnComment\": \"记录创建时间\",\n \"columnType\": \"datetime\",\n \"isPk\": \"0\",\n \"isIncrement\": \"0\",\n \"isRequired\": \"0\",\n \"javaType\": \"LocalDateTime\",\n \"htmlType\": \"datetime\"\n },\n {\n \"columnName\": \"update_time\",\n \"columnLabel\": \"更新时间\",\n \"columnComment\": \"记录更新时间\",\n \"columnType\": \"datetime\",\n \"isPk\": \"0\",\n \"isIncrement\": \"0\",\n \"isRequired\": \"0\",\n \"javaType\": \"LocalDateTime\",\n \"htmlType\": \"datetime\"\n }\n ]\n },\n {\n \"tableName\": \"reader\",\n \"tableComment\": \"读者管理\",\n \"adminMenuName\": \"读者管理\",\n \"operations\": {\n \"add\": true,\n \"edit\": true,\n \"remove\": true,\n \"removeType\": \"physical\",\n \"reason\": \"\"\n },\n \"columns\": [\n {\n \"columnName\": \"reader_id\",\n \"columnLabel\": \"读者ID\",\n \"columnComment\": \"主键ID读者账号标识\",\n \"columnType\": \"bigint(20)\",\n \"isPk\": \"1\",\n \"isIncrement\": \"1\",\n \"isRequired\": \"1\",\n \"javaType\": \"Long\",\n \"htmlType\": \"input\"\n },\n {\n \"columnName\": \"username\",\n \"columnLabel\": \"用户名\",\n \"columnComment\": \"登录用户名\",\n \"columnType\": \"varchar(50)\",\n \"isPk\": \"0\",\n \"isIncrement\": \"0\",\n \"isRequired\": \"1\",\n \"javaType\": \"String\",\n \"htmlType\": \"input\"\n },\n {\n \"columnName\": \"password_hash\",\n \"columnLabel\": \"密码\",\n \"columnComment\": \"经过哈希加密的密码\",\n \"columnType\": \"varchar(255)\",\n \"isPk\": \"0\",\n \"isIncrement\": \"0\",\n \"isRequired\": \"1\",\n \"javaType\": \"String\",\n \"htmlType\": \"input\"\n },\n {\n \"columnName\": \"nickname\",\n \"columnLabel\": \"昵称\",\n \"columnComment\": \"显示昵称\",\n \"columnType\": \"varchar(100)\",\n \"isPk\": \"0\",\n \"isIncrement\": \"0\",\n \"isRequired\": \"1\",\n \"javaType\": \"String\",\n \"htmlType\": \"input\"\n },\n {\n \"columnName\": \"email\",\n \"columnLabel\": \"邮箱\",\n \"columnComment\": \"电子邮箱\",\n \"columnType\": \"varchar(100)\",\n \"isPk\": \"0\",\n \"isIncrement\": \"0\",\n \"isRequired\": \"0\",\n \"javaType\": \"String\",\n \"htmlType\": \"input\"\n },\n {\n \"columnName\": \"phone\",\n \"columnLabel\": \"手机号\",\n \"columnComment\": \"手机号码\",\n \"columnType\": \"varchar(20)\",\n \"isPk\": \"0\",\n \"isIncrement\": \"0\",\n \"isRequired\": \"0\",\n \"javaType\": \"String\",\n \"htmlType\": \"input\"\n },\n {\n \"columnName\": \"gender\",\n \"columnLabel\": \"性别\",\n \"columnComment\": \"性别male/female/unknown\",\n \"columnType\": \"varchar(10)\",\n \"isPk\": \"0\",\n \"isIncrement\": \"0\",\n \"isRequired\": \"0\",\n \"javaType\": \"String\",\n \"htmlType\": \"select\",\n \"dictType\": \"local\",\n \"dictOptions\": [\n {\"label\": \"男\", \"value\": \"male\"},\n {\"label\": \"女\", \"value\": \"female\"},\n {\"label\": \"保密\", \"value\": \"unknown\"}\n ]\n },\n {\n \"columnName\": \"status\",\n \"columnLabel\": \"状态\",\n \"columnComment\": \"账号状态active正常disabled禁用\",\n \"columnType\": \"varchar(20)\",\n \"isPk\": \"0\",\n \"isIncrement\": \"0\",\n \"isRequired\": \"1\",\n \"javaType\": \"String\",\n \"htmlType\": \"select\",\n \"dictType\": \"local\",\n \"dictOptions\": [\n {\"label\": \"正常\", \"value\": \"active\"},\n {\"label\": \"禁用\", \"value\": \"disabled\"}\n ],\n \"defaultValue\": \"active\"\n },\n {\n \"columnName\": \"create_time\",\n \"columnLabel\": \"创建时间\",\n \"columnComment\": \"记录创建时间\",\n \"columnType\": \"datetime\",\n \"isPk\": \"0\",\n \"isIncrement\": \"0\",\n \"isRequired\": \"0\",\n \"javaType\": \"LocalDateTime\",\n \"htmlType\": \"datetime\"\n },\n {\n \"columnName\": \"update_time\",\n \"columnLabel\": \"更新时间\",\n \"columnComment\": \"记录更新时间\",\n \"columnType\": \"datetime\",\n \"isPk\": \"0\",\n \"isIncrement\": \"0\",\n \"isRequired\": \"0\",\n \"javaType\": \"LocalDateTime\",\n \"htmlType\": \"datetime\"\n }\n ]\n },\n {\n \"tableName\": \"notice\",\n \"tableComment\": \"公告管理\",\n \"adminMenuName\": \"公告管理\",\n \"operations\": {\n \"add\": true,\n \"edit\": true,\n \"remove\": true,\n \"removeType\": \"physical\",\n \"reason\": \"\"\n },\n \"columns\": [\n {\n \"columnName\": \"id\",\n \"columnLabel\": \"ID\",\n \"columnComment\": \"主键ID\",\n \"columnType\": \"bigint(20)\",\n \"isPk\": \"1\",\n \"isIncrement\": \"1\",\n \"isRequired\": \"1\",\n \"javaType\": \"Long\",\n \"htmlType\": \"input\"\n },\n {\n \"columnName\": \"title\",\n \"columnLabel\": \"标题\",\n \"columnComment\": \"公告标题\",\n \"columnType\": \"varchar(200)\",\n \"isPk\": \"0\",\n \"isIncrement\": \"0\",\n \"isRequired\": \"1\",\n \"javaType\": \"String\",\n \"htmlType\": \"input\"\n },\n {\n \"columnName\": \"content\",\n \"columnLabel\": \"内容\",\n \"columnComment\": \"公告正文\",\n \"columnType\": \"text\",\n \"isPk\": \"0\",\n \"isIncrement\": \"0\",\n \"isRequired\": \"1\",\n \"javaType\": \"String\",\n \"htmlType\": \"editor\"\n },\n {\n \"columnName\": \"publish_date\",\n \"columnLabel\": \"发布日期\",\n \"columnComment\": \"公告发布日期\",\n \"columnType\": \"datetime\",\n \"isPk\": \"0\",\n \"isIncrement\": \"0\",\n \"isRequired\": \"1\",\n \"javaType\": \"LocalDateTime\",\n \"htmlType\": \"datetime\"\n },\n {\n \"columnName\": \"status\",\n \"columnLabel\": \"状态\",\n \"columnComment\": \"发布状态published已发布draft草稿\",\n \"columnType\": \"varchar(20)\",\n \"isPk\": \"0\",\n \"isIncrement\": \"0\",\n \"isRequired\": \"1\",\n \"javaType\": \"String\",\n \"htmlType\": \"select\",\n \"dictType\": \"local\",\n \"dictOptions\": [\n {\"label\": \"已发布\", \"value\": \"published\"},\n {\"label\": \"草稿\", \"value\": \"draft\"}\n ],\n \"defaultValue\": \"published\"\n },\n {\n \"columnName\": \"create_time\",\n \"columnLabel\": \"创建时间\",\n \"columnComment\": \"记录创建时间\",\n \"columnType\": \"datetime\",\n \"isPk\": \"0\",\n \"isIncrement\": \"0\",\n \"isRequired\": \"0\",\n \"javaType\": \"LocalDateTime\",\n \"htmlType\": \"datetime\"\n },\n {\n \"columnName\": \"update_time\",\n \"columnLabel\": \"更新时间\",\n \"columnComment\": \"记录更新时间\",\n \"columnType\": \"datetime\",\n \"isPk\": \"0\",\n \"isIncrement\": \"0\",\n \"isRequired\": \"0\",\n \"javaType\": \"LocalDateTime\",\n \"htmlType\": \"datetime\"\n }\n ]\n },\n {\n \"tableName\": \"news\",\n \"tableComment\": \"新闻管理\",\n \"adminMenuName\": \"新闻管理\",\n \"operations\": {\n \"add\": true,\n \"edit\": true,\n \"remove\": true,\n \"removeType\": \"physical\",\n \"reason\": \"\"\n },\n \"columns\": [\n {\n \"columnName\": \"id\",\n \"columnLabel\": \"ID\",\n \"columnComment\": \"主键ID\",\n \"columnType\": \"bigint(20)\",\n \"isPk\": \"1\",\n \"isIncrement\": \"1\",\n \"isRequired\": \"1\",\n \"javaType\": \"Long\",\n \"htmlType\": \"input\"\n },\n {\n \"columnName\": \"title\",\n \"columnLabel\": \"标题\",\n \"columnComment\": \"新闻标题\",\n \"columnType\": \"varchar(200)\",\n \"isPk\": \"0\",\n \"isIncrement\": \"0\",\n \"isRequired\": \"1\",\n \"javaType\": \"String\",\n \"htmlType\": \"input\"\n },\n {\n \"columnName\": \"content\",\n \"columnLabel\": \"内容\",\n \"columnComment\": \"新闻正文\",\n \"columnType\": \"text\",\n \"isPk\": \"0\",\n \"isIncrement\": \"0\",\n \"isRequired\": \"1\",\n \"javaType\": \"String\",\n \"htmlType\": \"editor\"\n },\n {\n \"columnName\": \"publish_date\",\n \"columnLabel\": \"发布日期\",\n \"columnComment\": \"新闻发布日期\",\n \"columnType\": \"datetime\",\n \"isPk\": \"0\",\n \"isIncrement\": \"0\",\n \"isRequired\": \"1\",\n \"javaType\": \"LocalDateTime\",\n \"htmlType\": \"datetime\"\n },\n {\n \"columnName\": \"source\",\n \"columnLabel\": \"来源\",\n \"columnComment\": \"新闻来源\",\n \"columnType\": \"varchar(100)\",\n \"isPk\": \"0\",\n \"isIncrement\": \"0\",\n \"isRequired\": \"0\",\n \"javaType\": \"String\",\n \"htmlType\": \"input\"\n },\n {\n \"columnName\": \"author\",\n \"columnLabel\": \"作者\",\n \"columnComment\": \"新闻作者\",\n \"columnType\": \"varchar(100)\",\n \"isPk\": \"0\",\n \"isIncrement\": \"0\",\n \"isRequired\": \"0\",\n \"javaType\": \"String\",\n \"htmlType\": \"input\"\n },\n {\n \"columnName\": \"status\",\n \"columnLabel\": \"状态\",\n \"columnComment\": \"发布状态published已发布draft草稿\",\n \"columnType\": \"varchar(20)\",\n \"isPk\": \"0\",\n \"isIncrement\": \"0\",\n \"isRequired\": \"1\",\n \"javaType\": \"String\",\n \"htmlType\": \"select\",\n \"dictType\": \"local\",\n \"dictOptions\": [\n {\"label\": \"已发布\", \"value\": \"published\"},\n {\"label\": \"草稿\", \"value\": \"draft\"}\n ],\n \"defaultValue\": \"published\"\n },\n {\n \"columnName\": \"create_time\",\n \"columnLabel\": \"创建时间\",\n \"columnComment\": \"记录创建时间\",\n \"columnType\": \"datetime\",\n \"isPk\": \"0\",\n \"isIncrement\": \"0\",\n \"isRequired\": \"0\",\n \"javaType\": \"LocalDateTime\",\n \"htmlType\": \"datetime\"\n },\n {\n \"columnName\": \"update_time\",\n \"columnLabel\": \"更新时间\",\n \"columnComment\": \"记录更新时间\",\n \"columnType\": \"datetime\",\n \"isPk\": \"0\",\n \"isIncrement\": \"0\",\n \"isRequired\": \"0\",\n \"javaType\": \"LocalDateTime\",\n \"htmlType\": \"datetime\"\n }\n ]\n },\n {\n \"tableName\": \"carousel\",\n \"tableComment\": \"轮播图管理\",\n \"adminMenuName\": \"轮播图管理\",\n \"operations\": {\n \"add\": true,\n \"edit\": true,\n \"remove\": true,\n \"removeType\": \"physical\",\n \"reason\": \"\"\n },\n \"columns\": [\n {\n \"columnName\": \"id\",\n \"columnLabel\": \"ID\",\n \"columnComment\": \"主键ID\",\n \"columnType\": \"bigint(20)\",\n \"isPk\": \"1\",\n \"isIncrement\": \"1\",\n \"isRequired\": \"1\",\n \"javaType\": \"Long\",\n \"htmlType\": \"input\"\n },\n {\n \"columnName\": \"image_url\",\n \"columnLabel\": \"图片\",\n \"columnComment\": \"轮播图片URL\",\n \"columnType\": \"varchar(500)\",\n \"isPk\": \"0\",\n \"isIncrement\": \"0\",\n \"isRequired\": \"1\",\n \"javaType\": \"String\",\n \"htmlType\": \"imageUpload\"\n },\n {\n \"columnName\": \"link_url\",\n \"columnLabel\": \"链接\",\n \"columnComment\": \"点击跳转链接\",\n \"columnType\": \"varchar(500)\",\n \"isPk\": \"0\",\n \"isIncrement\": \"0\",\n \"isRequired\": \"0\",\n \"javaType\": \"String\",\n \"htmlType\": \"input\"\n },\n {\n \"columnName\": \"sort_order\",\n \"columnLabel\": \"排序\",\n \"columnComment\": \"显示顺序,数字越小越靠前\",\n \"columnType\": \"int(11)\",\n \"isPk\": \"0\",\n \"isIncrement\": \"0\",\n \"isRequired\": \"1\",\n \"javaType\": \"Integer\",\n \"htmlType\": \"input\",\n \"defaultValue\": \"0\"\n },\n {\n \"columnName\": \"title\",\n \"columnLabel\": \"标题\",\n \"columnComment\": \"轮播图标题(可选)\",\n \"columnType\": \"varchar(200)\",\n \"isPk\": \"0\",\n \"isIncrement\": \"0\",\n \"isRequired\": \"0\",\n \"javaType\": \"String\",\n \"htmlType\": \"input\"\n },\n {\n \"columnName\": \"status\",\n \"columnLabel\": \"状态\",\n \"columnComment\": \"显示状态show显示hide隐藏\",\n \"columnType\": \"varchar(20)\",\n \"isPk\": \"0\",\n \"isIncrement\": \"0\",\n \"isRequired\": \"1\",\n \"javaType\": \"String\",\n \"htmlType\": \"select\",\n \"dictType\": \"local\",\n \"dictOptions\": [\n {\"label\": \"显示\", \"value\": \"show\"},\n {\"label\": \"隐藏\", \"value\": \"hide\"}\n ],\n \"defaultValue\": \"show\"\n },\n {\n \"columnName\": \"create_time\",\n \"columnLabel\": \"创建时间\",\n \"columnComment\": \"记录创建时间\",\n \"columnType\": \"datetime\",\n \"isPk\": \"0\",\n \"isIncrement\": \"0\",\n \"isRequired\": \"0\",\n \"javaType\": \"LocalDateTime\",\n \"htmlType\": \"datetime\"\n },\n {\n \"columnName\": \"update_time\",\n \"columnLabel\": \"更新时间\",\n \"columnComment\": \"记录更新时间\",\n \"columnType\": \"datetime\",\n \"isPk\": \"0\",\n \"isIncrement\": \"0\",\n \"isRequired\": \"0\",\n \"javaType\": \"LocalDateTime\",\n \"htmlType\": \"datetime\"\n }\n ]\n },\n {\n \"tableName\": \"admin\",\n \"tableComment\": \"管理员账号\",\n \"adminMenuName\": \"管理员账号\",\n \"operations\": {\n \"add\": false,\n \"edit\": true,\n \"remove\": false,\n \"removeType\": \"physical\",\n \"reason\": \"管理员账号仅可编辑\"\n },\n \"columns\": [\n {\n \"columnName\": \"admin_id\",\n \"columnLabel\": \"管理员ID\",\n \"columnComment\": \"主键ID\",\n \"columnType\": \"bigint(20)\",\n \"isPk\": \"1\",\n \"isIncrement\": \"1\",\n \"isRequired\": \"1\",\n \"javaType\": \"Long\",\n \"htmlType\": \"input\"\n },\n {\n \"columnName\": \"username\",\n \"columnLabel\": \"用户名\",\n \"columnComment\": \"登录用户名\",\n \"columnType\": \"varchar(50)\",\n \"isPk\": \"0\",\n \"isIncrement\": \"0\",\n \"isRequired\": \"1\",\n \"javaType\": \"String\",\n \"htmlType\": \"input\"\n },\n {\n \"columnName\": \"password_hash\",\n \"columnLabel\": \"密码\",\n \"columnComment\": \"加密后的密码\",\n \"columnType\": \"varchar(255)\",\n \"isPk\": \"0\",\n \"isIncrement\": \"0\",\n \"isRequired\": \"1\",\n \"javaType\": \"String\",\n \"htmlType\": \"input\"\n },\n {\n \"columnName\": \"nickname\",\n \"columnLabel\": \"昵称\",\n \"columnComment\": \"管理员显示名称\",\n \"columnType\": \"varchar(100)\",\n \"isPk\": \"0\",\n \"isIncrement\": \"0\",\n \"isRequired\": \"1\",\n \"javaType\": \"String\",\n \"htmlType\": \"input\"\n },\n {\n \"columnName\": \"email\",\n \"columnLabel\": \"邮箱\",\n \"columnComment\": \"电子邮箱\",\n \"columnType\": \"varchar(100)\",\n \"isPk\": \"0\",\n \"isIncrement\": \"0\",\n \"isRequired\": \"0\",\n \"javaType\": \"String\",\n \"htmlType\": \"input\"\n },\n {\n \"columnName\": \"status\",\n \"columnLabel\": \"状态\",\n \"columnComment\": \"账号状态active正常disabled禁用\",\n \"columnType\": \"varchar(20)\",\n \"isPk\": \"0\",\n \"isIncrement\": \"0\",\n \"isRequired\": \"1\",\n \"javaType\": \"String\",\n \"htmlType\": \"select\",\n \"dictType\": \"local\",\n \"dictOptions\": [\n {\"label\": \"正常\", \"value\": \"active\"},\n {\"label\": \"禁用\", \"value\": \"disabled\"}\n ],\n \"defaultValue\": \"active\"\n },\n {\n \"columnName\": \"create_time\",\n \"columnLabel\": \"创建时间\",\n \"columnComment\": \"记录创建时间\",\n \"columnType\": \"datetime\",\n \"isPk\": \"0\",\n \"isIncrement\": \"0\",\n \"isRequired\": \"0\",\n \"javaType\": \"LocalDateTime\",\n \"htmlType\": \"datetime\"\n },\n {\n \"columnName\": \"update_time\",\n \"columnLabel\": \"更新时间\",\n \"columnComment\": \"记录更新时间\",\n \"columnType\": \"datetime\",\n \"isPk\": \"0\",\n \"isIncrement\": \"0\",\n \"isRequired\": \"0\",\n \"javaType\": \"LocalDateTime\",\n \"htmlType\": \"datetime\"\n }\n ]\n }\n ]\n}', '0', 65280, 3815, 1024, 2791, 11129, 3264, 3815, 11129, 14944, 3, 0.02506948, '1', NULL, '2026-07-14 17:57:35');
INSERT INTO `front_ai_usage_ledger` VALUES (134, 109, 109, 106, 100, 'app_blueprint', 'deepseek', 'deepseek-v4-flash', 'front.app_blueprint', 'V1', 'c3ee0180ed446fe83055bd1c272ed1b6e3978584fe52f98f5e78e14e2cfc8f29', '你是应用蓝图架构师。只输出符合用户消息结构的 JSON规划业务角色、前台菜单与页面、后台菜单和运营看板。保持 pageCode、tableName、角色数据范围和登录要求前后一致只描述静态蓝图不生成数据库、权限表、菜单表或代码。角色名称使用简体中文技术标识使用稳定的小写 snake_case。', '根据项目输入 JSON 生成应用蓝图,只返回 JSON不要 Markdown 围栏或解释。\n输出结构{\"roles\":[{\"code\":\"reader\",\"name\":\"读者\",\"description\":\"\"}],\"frontendMenus\":[{\"code\":\"book_catalog\",\"name\":\"图书目录\",\"path\":\"/books\",\"pageCode\":\"book_catalog_page\",\"requiresLogin\":false,\"visibleRoles\":[],\"dataScope\":\"PUBLIC\"}],\"frontendPages\":[{\"code\":\"book_catalog_page\",\"name\":\"图书目录\",\"menuCode\":\"book_catalog\",\"path\":\"/books\",\"pageType\":\"list\",\"tableName\":\"book_info\"}],\"adminMenus\":[{\"code\":\"book_admin\",\"name\":\"图书管理\",\"path\":\"/admin/books\",\"pageCode\":\"book_admin_page\",\"tableName\":\"book_info\",\"pageType\":\"list\",\"requiresLogin\":true,\"visibleRoles\":[\"admin\"],\"dataScope\":\"ROLE\"}],\"adminHomeDashboard\":{\"title\":\"运营总览\",\"description\":\"核心业务数据\",\"metrics\":[],\"charts\":[]}}。\n蓝图描述目标生成项目而不是当前 EasyCode/RuoYi 平台。不要生成数据库表、菜单表、角色表、权限表或代码。\nrole.name 使用简体中文role.code 使用小写 snake_case。只有 role.code=admin 是系统管理员;名称含“管理员”或“后台”的业务角色仍保持独立。\nrole.name must be Simplified Chinese. Only role.code=admin is the system administrator.\n每个菜单必须包含 requiresLogin、visibleRoles、dataScopedataScope 只能是 PUBLIC、CURRENT_USER 或 ROLE。\nadminMenus 必须包含 pageCode、tableName、pageType个人资料使用 form普通管理使用 list。\nadminMenus must include pageCode, tableName, and pageType.\nfrontendMenus 顶层菜单应指向 pageCode详情页作为子页面不创建顶层详情菜单。\n不要为轮播图、banner、公告滚动条等首页装饰创建顶层菜单可放在首页业务块或作为后台维护数据。\nfrontendPages.pageType 只能是 list、current_user_list、detail、formtableName 必须是页面展示的业务表。\n同一业务对象只使用一个稳定 tableName后续数据库、闭环、页面、看板、动作必须复用不能使用同义表名。\nadminHomeDashboard 尽量包含 4 个业务指标和至少 2 张图表趋势图与分布图所有表字段必须可由后续数据库步骤创建。semantic 只能使用 money、order、user、task、warning、inventory、content、default。\n每个非 admin 角色使用表名等于 role.code 的独立账号表,不得创建共享 user、user_info、member 或 account 表。\nNever invent a shared user, user_info, member, or account table for role accounts.\n需要个人资料页时为每个非 admin 角色创建独立 form 页面和菜单tableName 绑定 role.codepageCode/path 带角色前缀visibleRoles 只包含该角色。\nCreate one form page and one menu per non-admin role when profile pages are needed.\n个人订单、借阅、资料、预约、支付等页面必须 requiresLogin=true 且 dataScope=CURRENT_USER。\n项目输入 JSON\n{\"projectName\":\"图书管理系统\",\"projectDescription\":\"功能:借书、还书、预约、取消预约\\n角色用户、管理员\\n其他模块轮播图、公告、新闻\",\"industryTemplate\":\"\",\"stylePreset\":\"dark-tech\",\"extraRequirements\":\"\"}', '{\n \"roles\": [\n {\n \"code\": \"admin\",\n \"name\": \"管理员\",\n \"description\": \"系统管理员,拥有所有后台管理权限\"\n },\n {\n \"code\": \"reader\",\n \"name\": \"读者\",\n \"description\": \"普通用户,可以借书、还书、预约、取消预约\"\n }\n ],\n \"frontendMenus\": [\n {\n \"code\": \"home\",\n \"name\": \"首页\",\n \"path\": \"/home\",\n \"pageCode\": \"home_page\",\n \"requiresLogin\": false,\n \"visibleRoles\": [],\n \"dataScope\": \"PUBLIC\"\n },\n {\n \"code\": \"book_catalog\",\n \"name\": \"图书目录\",\n \"path\": \"/books\",\n \"pageCode\": \"book_catalog_page\",\n \"requiresLogin\": false,\n \"visibleRoles\": [],\n \"dataScope\": \"PUBLIC\"\n },\n {\n \"code\": \"my_borrows\",\n \"name\": \"我的借阅\",\n \"path\": \"/my-borrows\",\n \"pageCode\": \"my_borrows_page\",\n \"requiresLogin\": true,\n \"visibleRoles\": [\"reader\"],\n \"dataScope\": \"CURRENT_USER\"\n },\n {\n \"code\": \"my_profile\",\n \"name\": \"个人资料\",\n \"path\": \"/my-profile\",\n \"pageCode\": \"my_profile_page\",\n \"requiresLogin\": true,\n \"visibleRoles\": [\"reader\"],\n \"dataScope\": \"CURRENT_USER\"\n }\n ],\n \"frontendPages\": [\n {\n \"code\": \"home_page\",\n \"name\": \"首页\",\n \"menuCode\": \"home\",\n \"path\": \"/home\",\n \"pageType\": \"list\",\n \"tableName\": \"banner\"\n },\n {\n \"code\": \"book_catalog_page\",\n \"name\": \"图书目录\",\n \"menuCode\": \"book_catalog\",\n \"path\": \"/books\",\n \"pageType\": \"list\",\n \"tableName\": \"book_info\"\n },\n {\n \"code\": \"book_detail_page\",\n \"name\": \"图书详情\",\n \"menuCode\": \"book_catalog\",\n \"path\": \"/books/:id\",\n \"pageType\": \"detail\",\n \"tableName\": \"book_info\"\n },\n {\n \"code\": \"my_borrows_page\",\n \"name\": \"我的借阅\",\n \"menuCode\": \"my_borrows\",\n \"path\": \"/my-borrows\",\n \"pageType\": \"current_user_list\",\n \"tableName\": \"borrow_record\"\n },\n {\n \"code\": \"my_profile_page\",\n \"name\": \"个人资料\",\n \"menuCode\": \"my_profile\",\n \"path\": \"/my-profile\",\n \"pageType\": \"form\",\n \"tableName\": \"reader\"\n }\n ],\n \"adminMenus\": [\n {\n \"code\": \"book_admin\",\n \"name\": \"图书管理\",\n \"path\": \"/admin/books\",\n \"pageCode\": \"book_admin_page\",\n \"tableName\": \"book_info\",\n \"pageType\": \"list\",\n \"requiresLogin\": true,\n \"visibleRoles\": [\"admin\"],\n \"dataScope\": \"ROLE\"\n },\n {\n \"code\": \"borrow_admin\",\n \"name\": \"借阅管理\",\n \"path\": \"/admin/borrows\",\n \"pageCode\": \"borrow_admin_page\",\n \"tableName\": \"borrow_record\",\n \"pageType\": \"list\",\n \"requiresLogin\": true,\n \"visibleRoles\": [\"admin\"],\n \"dataScope\": \"ROLE\"\n },\n {\n \"code\": \"banner_admin\",\n \"name\": \"轮播图管理\",\n \"path\": \"/admin/banners\",\n \"pageCode\": \"banner_admin_page\",\n \"tableName\": \"banner\",\n \"pageType\": \"list\",\n \"requiresLogin\": true,\n \"visibleRoles\": [\"admin\"],\n \"dataScope\": \"ROLE\"\n },\n {\n \"code\": \"notice_admin\",\n \"name\": \"公告管理\",\n \"path\": \"/admin/notices\",\n \"pageCode\": \"notice_admin_page\",\n \"tableName\": \"notice\",\n \"pageType\": \"list\",\n \"requiresLogin\": true,\n \"visibleRoles\": [\"admin\"],\n \"dataScope\": \"ROLE\"\n },\n {\n \"code\": \"news_admin\",\n \"name\": \"新闻管理\",\n \"path\": \"/admin/news\",\n \"pageCode\": \"news_admin_page\",\n \"tableName\": \"news\",\n \"pageType\": \"list\",\n \"requiresLogin\": true,\n \"visibleRoles\": [\"admin\"],\n \"dataScope\": \"ROLE\"\n }\n ],\n \"adminHomeDashboard\": {\n \"title\": \"运营总览\",\n \"description\": \"核心业务数据\",\n \"metrics\": [\n {\n \"label\": \"总图书数\",\n \"semantic\": \"inventory\",\n \"description\": \"馆藏图书总量\"\n },\n {\n \"label\": \"总借出数\",\n \"semantic\": \"order\",\n \"description\": \"当前正在借出的图书数量\"\n },\n {\n \"label\": \"总读者数\",\n \"semantic\": \"user\",\n \"description\": \"注册读者总数\"\n },\n {\n \"label\": \"待归还数\",\n \"semantic\": \"warning\",\n \"description\": \"已超期未归还的图书数量\"\n }\n ],\n \"charts\": [\n {\n \"title\": \"借阅趋势\",\n \"type\": \"line\",\n \"semantic\": \"order\",\n \"description\": \"每日借阅量变化趋势\"\n },\n {\n \"title\": \"图书分类分布\",\n \"type\": \"pie\",\n \"semantic\": \"content\",\n \"description\": \"各分类图书数量占比\"\n }\n ]\n }\n}', '0', 44493, 817, 768, 49, 4216, 2917, 817, 4216, 5033, 1, 0.00849636, '1', NULL, '2026-07-14 19:48:57');
INSERT INTO `front_ai_usage_ledger` VALUES (135, 109, 109, 106, 100, 'flow_config', 'deepseek', 'deepseek-v4-flash', 'front.flow_config', 'V1', '247495840c67968896ccad2db0a599bd4fc594d0189157dce888b8ede90b3257', '你是业务流程配置设计器。只输出一个合法 JSON 对象,不输出 Markdown、解释或 SQL。\n\n目标用最小 flow_config 描述状态流转、显式 Java 业务动作、多表数量联动、按钮和统计。不要输出 CRUD不要输出通用规则 DSL。\n\n固定结构\n{\n \"version\":\"1.0\",\n \"code\":\"snake_case\",\n \"name\":\"中文业务名\",\n \"mainTable\":\"snake_case\",\n \"statusField\":\"status\",\n \"notFoundMessage\":\"主记录不存在\",\n \"states\":[{\"code\":\"pending\",\"label\":\"待审核\"}],\n \"actions\":[{\n \"code\":\"approve\",\n \"name\":\"审核通过\",\n \"from\":\"pending\",\n \"to\":\"borrowing\",\n \"actor\":\"admin\",\n \"method\":\"POST\",\n \"path\":\"/borrow-record/approve\",\n \"invalidStateMessage\":\"当前状态不能审核\",\n \"successMessage\":\"审核成功\",\n \"audit\":{\"userField\":\"approve_user_id\",\"timeField\":\"approve_time\"},\n \"effects\":[{\n \"type\":\"decrease\",\n \"table\":\"book\",\n \"relationField\":\"book_id\",\n \"field\":\"stock\",\n \"amount\":\"1\",\n \"min\":\"0\",\n \"notFoundMessage\":\"图书不存在\",\n \"errorMessage\":\"图书库存不足\"\n }],\n \"button\":{\"scope\":\"admin\",\"pageCode\":\"borrow_record_list\",\"slot\":\"list.rowActions\",\"type\":\"success\",\"confirm\":\"确认审核通过吗?\",\"order\":10}\n }],\n \"metrics\":[{\"code\":\"borrowing_count\",\"name\":\"借阅中数量\",\"table\":\"borrow_record\",\"aggregate\":\"count\",\"field\":\"id\",\"status\":\"borrowing\",\"unit\":\"条\"}]\n}\n\n约束\n1. code、表名、字段名全部使用小写 snake_case状态 code 使用稳定英文编码label 使用中文。\n2. 每个 action 必须有 from 和 to且二者存在于 states 中并且不相同。\n3. effects.type 只能是 decrease、increase、update_related、create_record。\n4. decrease/increase 必须给 table、relationField、field、amountdecrease 还要给 min。\n5. update_related/create_record 使用 values值可为 currentUserId、now、record.字段名或常量。\n6. 审核人等身份只能通过 audit.userField 表达,由后端登录态注入,不能作为前端可传字段。\n7. 覆盖需求中的完整正向闭环和关键回退/拒绝动作,但不要为普通 CRUD 创建 action。', '请根据以下 JSON 上下文生成 flow_config。appBlueprint 是已确认的页面、角色和菜单范围,必须与它保持一致:\n{\"mode\":\"generate\",\"projectName\":\"图书管理系统\",\"projectDescription\":\"功能:借书、还书、预约、取消预约\\n角色用户、管理员\\n其他模块轮播图、公告、新闻\",\"industryTemplate\":\"\",\"stylePreset\":\"dark-tech\",\"extraRequirements\":\"\",\"confirmedAppBlueprint\":{\"adminHomeDashboard\":{\"charts\":[{\"filters\":[],\"metrics\":[{\"aggregate\":\"count\",\"label\":\"借阅趋势\"}],\"semantic\":\"order\",\"title\":\"借阅趋势\",\"type\":\"line\"},{\"filters\":[],\"metrics\":[{\"aggregate\":\"count\",\"label\":\"图书分类分布\"}],\"semantic\":\"content\",\"title\":\"图书分类分布\",\"type\":\"pie\"}],\"description\":\"核心业务数据\",\"metrics\":[{\"aggregate\":\"count\",\"filters\":[],\"semantic\":\"inventory\"},{\"aggregate\":\"count\",\"filters\":[],\"semantic\":\"order\"},{\"aggregate\":\"count\",\"filters\":[],\"semantic\":\"user\"},{\"aggregate\":\"count\",\"filters\":[],\"semantic\":\"warning\"}],\"title\":\"运营总览\"},\"adminMenus\":[{\"code\":\"book_admin\",\"dataScope\":\"ROLE\",\"name\":\"图书管理\",\"pageCode\":\"book_admin_page\",\"pageType\":\"list\",\"path\":\"/admin/books\",\"requiresLogin\":true,\"tableName\":\"book_info\",\"visibleRoles\":[\"admin\"]},{\"code\":\"borrow_admin\",\"dataScope\":\"ROLE\",\"name\":\"借阅管理\",\"pageCode\":\"borrow_admin_page\",\"pageType\":\"list\",\"path\":\"/admin/borrows\",\"requiresLogin\":true,\"tableName\":\"borrow_record\",\"visibleRoles\":[\"admin\"]},{\"code\":\"banner_admin\",\"dataScope\":\"ROLE\",\"name\":\"轮播图管理\",\"pageCode\":\"banner_admin_page\",\"pageType\":\"list\",\"path\":\"/admin/banners\",\"requiresLogin\":true,\"tableName\":\"banner\",\"visibleRoles\":[\"admin\"]},{\"code\":\"notice_admin\",\"dataScope\":\"ROLE\",\"name\":\"公告管理\",\"pageCode\":\"notice_admin_page\",\"pageType\":\"list\",\"path\":\"/admin/notices\",\"requiresLogin\":true,\"tableName\":\"notice\",\"visibleRoles\":[\"admin\"]},{\"code\":\"news_admin\",\"dataScope\":\"ROLE\",\"name\":\"新闻管理\",\"pageCode\":\"news_admin_page\",\"pageType\":\"list\",\"path\":\"/admin/news\",\"requiresLogin\":true,\"tableName\":\"news\",\"visibleRoles\":[\"admin\"]}],\"frontendMenus\":[{\"code\":\"home\",\"dataScope\":\"PUBLIC\",\"name\":\"首页\",\"pageCode\":\"home_page\",\"pageType\":\"\",\"path\":\"/home\",\"requiresLogin\":false,\"tableName\":\"\",\"visibleRoles\":[]},{\"code\":\"book_catalog\",\"dataScope\":\"PUBLIC\",\"name\":\"图书目录\",\"pageCode\":\"book_catalog_page\",\"pageType\":\"\",\"path\":\"/books\",\"requiresLogin\":false,\"tableName\":\"\",\"visibleRoles\":[]},{\"code\":\"my_borrows\",\"dataScope\":\"CURRENT_USER\",\"name\":\"我的借阅\",\"pageCode\":\"my_borrows_page\",\"pageType\":\"\",\"path\":\"/my-borrows\",\"requiresLogin\":true,\"tableName\":\"\",\"visibleRoles\":[\"reader\"]},{\"code\":\"my_profile\",\"dataScope\":\"CURRENT_USER\",\"name\":\"个人资料\",\"pageCode\":\"my_profile_page\",\"pageType\":\"\",\"path\":\"/my-profile\",\"requiresLogin\":true,\"tableName\":\"\",\"visibleRoles\":[\"reader\"]}],\"frontendPages\":[{\"code\":\"home_page\",\"menuCode\":\"home\",\"name\":\"首页\",\"pageType\":\"list\",\"parentPageCode\":\"\",\"path\":\"/home\",\"tableName\":\"banner\"},{\"code\":\"book_catalog_page\",\"menuCode\":\"book_catalog\",\"name\":\"图书目录\",\"pageType\":\"list\",\"parentPageCode\":\"\",\"path\":\"/books\",\"tableName\":\"book_info\"},{\"code\":\"book_detail_page\",\"menuCode\":\"book_catalog\",\"name\":\"图书详情\",\"pageType\":\"detail\",\"parentPageCode\":\"\",\"path\":\"/books/:id\",\"tableName\":\"book_info\"},{\"code\":\"my_borrows_page\",\"menuCode\":\"my_borrows\",\"name\":\"我的借阅\",\"pageType\":\"current_user_list\",\"parentPageCode\":\"\",\"path\":\"/my-borrows\",\"tableName\":\"borrow_record\"},{\"code\":\"my_profile_page\",\"menuCode\":\"my_profile\",\"name\":\"个人资料\",\"pageType\":\"form\",\"parentPageCode\":\"\",\"path\":\"/my-profile\",\"tableName\":\"reader\"}],\"roles\":[{\"code\":\"admin\",\"description\":\"系统管理员,拥有所有后台管理权限\",\"name\":\"管理员\"},{\"code\":\"reader\",\"description\":\"普通用户,可以借书、还书、预约、取消预约\",\"name\":\"读者\"}]}}', '{\n \"version\": \"1.0\",\n \"code\": \"borrow_flow\",\n \"name\": \"借阅流程\",\n \"mainTable\": \"borrow_record\",\n \"statusField\": \"status\",\n \"notFoundMessage\": \"借阅记录不存在\",\n \"states\": [\n {\"code\": \"init\", \"label\": \"初始\"},\n {\"code\": \"reserved\", \"label\": \"已预约\"},\n {\"code\": \"borrowing\", \"label\": \"借阅中\"},\n {\"code\": \"returned\", \"label\": \"已归还\"},\n {\"code\": \"cancelled\", \"label\": \"已取消\"}\n ],\n \"actions\": [\n {\n \"code\": \"reserve\",\n \"name\": \"预约图书\",\n \"from\": \"init\",\n \"to\": \"reserved\",\n \"actor\": \"reader\",\n \"method\": \"POST\",\n \"path\": \"/borrow-record/reserve\",\n \"invalidStateMessage\": \"该图书不可预约\",\n \"successMessage\": \"预约成功\",\n \"effects\": [\n {\n \"type\": \"create_record\",\n \"table\": \"borrow_record\",\n \"values\": {\n \"status\": \"reserved\",\n \"reader_id\": \"currentUserId\",\n \"book_id\": \"record.book_id\",\n \"borrow_date\": \"now\"\n }\n }\n ],\n \"button\": {\n \"scope\": \"reader\",\n \"pageCode\": \"book_detail_page\",\n \"slot\": \"page.actions\",\n \"type\": \"primary\",\n \"confirm\": \"确认预约该书?\",\n \"order\": 10\n }\n },\n {\n \"code\": \"cancel_reserve\",\n \"name\": \"取消预约\",\n \"from\": \"reserved\",\n \"to\": \"cancelled\",\n \"actor\": \"reader\",\n \"method\": \"POST\",\n \"path\": \"/borrow-record/cancel-reserve\",\n \"invalidStateMessage\": \"当前状态不能取消\",\n \"successMessage\": \"取消预约成功\",\n \"button\": {\n \"scope\": \"reader\",\n \"pageCode\": \"my_borrows_page\",\n \"slot\": \"list.rowActions\",\n \"type\": \"warning\",\n \"confirm\": \"确认取消预约?\",\n \"order\": 10\n }\n },\n {\n \"code\": \"lend\",\n \"name\": \"借出\",\n \"from\": \"reserved\",\n \"to\": \"borrowing\",\n \"actor\": \"admin\",\n \"method\": \"POST\",\n \"path\": \"/borrow-record/lend\",\n \"invalidStateMessage\": \"该记录已借出或已取消\",\n \"successMessage\": \"借出成功\",\n \"audit\": {\n \"userField\": \"approve_user_id\",\n \"timeField\": \"approve_time\"\n },\n \"effects\": [\n {\n \"type\": \"decrease\",\n \"table\": \"book_info\",\n \"relationField\": \"book_id\",\n \"field\": \"stock\",\n \"amount\": \"1\",\n \"min\": \"0\",\n \"notFoundMessage\": \"图书不存在\",\n \"errorMessage\": \"图书库存不足\"\n }\n ],\n \"button\": {\n \"scope\": \"admin\",\n \"pageCode\": \"borrow_admin_page\",\n \"slot\": \"list.rowActions\",\n \"type\": \"success\",\n \"confirm\": \"确认借出该书?\",\n \"order\": 10\n }\n },\n {\n \"code\": \"return_book\",\n \"name\": \"归还\",\n \"from\": \"borrowing\",\n \"to\": \"returned\",\n \"actor\": \"admin\",\n \"method\": \"POST\",\n \"path\": \"/borrow-record/return\",\n \"invalidStateMessage\": \"当前状态不能归还\",\n \"successMessage\": \"归还成功\",\n \"audit\": {\n \"userField\": \"return_user_id\",\n \"timeField\": \"return_time\"\n },\n \"effects\": [\n {\n \"type\": \"increase\",\n \"table\": \"book_info\",\n \"relationField\": \"book_id\",\n \"field\": \"stock\",\n \"amount\": \"1\",\n \"notFoundMessage\": \"图书不存在\"\n }\n ],\n \"button\": {\n \"scope\": \"admin\",\n \"pageCode\": \"borrow_admin_page\",\n \"slot\": \"list.rowActions\",\n \"type\": \"primary\",\n \"confirm\": \"确认归还该书?\",\n \"order\": 20\n }\n }\n ],\n \"metrics\": [\n {\n \"code\": \"borrowing_count\",\n \"name\": \"借阅中数量\",\n \"table\": \"borrow_record\",\n \"aggregate\": \"count\",\n \"field\": \"id\",\n \"status\": \"borrowing\",\n \"unit\": \"条\"\n },\n {\n \"code\": \"reserved_count\",\n \"name\": \"预约中数量\",\n \"table\": \"borrow_record\",\n \"aggregate\": \"count\",\n \"field\": \"id\",\n \"status\": \"reserved\",\n \"unit\": \"条\"\n },\n {\n \"code\": \"returned_count\",\n \"name\": \"已归还数量\",\n \"table\": \"borrow_record\",\n \"aggregate\": \"count\",\n \"field\": \"id\",\n \"status\": \"returned\",\n \"unit\": \"条\"\n },\n {\n \"code\": \"cancelled_count\",\n \"name\": \"已取消数量\",\n \"table\": \"borrow_record\",\n \"aggregate\": \"count\",\n \"field\": \"id\",\n \"status\": \"cancelled\",\n \"unit\": \"条\"\n },\n {\n \"code\": \"book_total\",\n \"name\": \"图书总数\",\n \"table\": \"book_info\",\n \"aggregate\": \"count\",\n \"field\": \"id\",\n \"unit\": \"本\"\n },\n {\n \"code\": \"book_stock_sum\",\n \"name\": \"总库存\",\n \"table\": \"book_info\",\n \"aggregate\": \"sum\",\n \"field\": \"stock\",\n \"unit\": \"本\"\n }\n ]\n}', '0', 68295, 1549, 640, 909, 5707, 4369, 1549, 5707, 7256, 2, 0.01233580, '1', NULL, '2026-07-14 19:50:05');
INSERT INTO `front_ai_usage_ledger` VALUES (136, 109, 109, 106, 100, 'database', 'deepseek', 'deepseek-v4-flash', 'front.database', 'V1', '14dcad479b01de068e5c5bc39b5cd7a591a09d334ee6812483d8ac00dd8c9d61', '你是 MySQL 业务数据库设计专家。只输出符合用户消息结构的 JSON根据已确认的应用蓝图和业务闭环生成可直接落地的表、字段、主外键、字典和表操作策略。字段必须业务化且类型合法所有蓝图与闭环引用必须有真实表字段承载不得生成菜单、权限关系、代码或业务动作。', '根据项目输入 JSON 生成 MySQL 数据库设计 JSON只返回 JSON不要 Markdown 围栏或解释。\nConfirmed app blueprint JSON and Confirmed business loop plan JSON are supplied in the input.\nDatabase generation constraints from the business loop plan must be enforced.\nEvery confirmedBusinessLoopPlan.metrics tableName, field, and filters.field must exist in the generated schema. Numeric sum/avg/min/max metric fields must use a compatible numeric column type. Status-filter metric values must remain compatible with the matching stateMachines.states.\nIf input.mode is correction, repair input.originalResponse according to input.validationError and return the complete corrected database JSON. Do not drop unrelated valid tables or fields.\n输出结构{\"tables\":[{\"tableName\":\"car_info\",\"tableComment\":\"车辆信息表\",\"adminMenuName\":\"车辆管理\",\"operations\":{\"add\":true,\"edit\":true,\"remove\":true,\"removeType\":\"physical\",\"reason\":\"\"},\"columns\":[{\"columnName\":\"id\",\"columnLabel\":\"ID\",\"columnComment\":\"主键ID\",\"columnType\":\"bigint(20)\",\"isPk\":\"1\",\"isIncrement\":\"1\",\"isRequired\":\"1\"}]}]}。\n不要使用 field_1 等占位字段;每个表必须包含非空 columns以及 adminMenuName 和 operations.add/edit/remove/removeType/reason。\nadminMenuName 必须来自本表 tableComment/tableName不得复用其他表或宽泛模块名称。\nadminMenuName must come from that table\'s own tableComment or tableName.\n字段数组名称只能是 columns不能使用 fields、fieldDesign、fieldList、columnList。\nEvery table must include a non-empty columns array; use columns exactly.\n每个字段必须包含 columnName、columnLabel、columnComment、columnType、isPk、isIncrement、isRequired。columnLabel 是短 UI 标签columnComment 是完整数据库说明。\n可提供 javaType、htmlTypehtmlType 只能是 input、textarea、select、radio、checkbox、datetime、imageUpload、fileUpload、editor。\nselect/radio/checkbox 应提供 dictType 和 dictOptions。关联选择使用 remote:target_table:value_field:label_field且目标表和值/标签字段必须都存在于本次 tables JSON。\n非主键外键字段应在目标表存在时使用 remote select无目标表的分类、类型、状态使用本地 dictOptions 或普通输入。\n普通主数据表除唯一主键外至少包含 4 个业务字段。\n订单、支付、借还、审批、流程、任务、库存记录等动作记录表使用仅新增关系、审计、日志、历史表使用只读普通主数据表使用完整 CRUD。\n不要生成 businessActions、业务动作、工作流、代码、菜单表、user_role、角色权限表或权限表。\nDo not generate menu tables, user_role tables, role-permission tables, or permission tables.\n表名字段名只使用小写字母、数字、下划线每表必须且只能有一个主键。字段类型只能使用 bigint(20)、int(11)、varchar(n)、char(n)、decimal(p,s)、datetime、date、text、longtext。\n为 confirmedAppBlueprint.roles 中每个角色创建独立账号表admin 使用 admin其他角色使用 role.code。不得使用共享用户表或 role_id/role_code/user_role。\n角色账号表包含 `<role_code>_id` 自增主键、username、password_hash、nickname、status、create_time。admin 只能登录后台,非 admin 角色登录前台。\n生成 frontendPages.tableName 引用的全部表;个人资料页必须绑定对应非 admin 角色账号表。requiresLogin=true 且 dataScope=CURRENT_USER 的业务数据通常包含 user_id。\ncanonicalTableRegistry 中的名称是最终规范表名。confirmedBusinessLoopPlan 若出现与其指向同一业务对象的同义表名,必须使用 canonicalTableRegistry 中的名称,不得同时生成两张同义表。\n根据 confirmedBusinessLoopPlan 创建 coreObjects.tableName、actions.ownerTable补齐 stateMachines.statusField、quantityRules.quantityField 以及 recordRules 和动作前置条件需要的字段。状态值不得超出 stateMachines.states。\n严格实现 confirmedBusinessLoopPlan.businessPoliciesTIME_LIMIT 的 startField、dueField 使用 datetimeOVERDUE_FEE 的 dueField 使用 datetime、daysTargetField 使用 int(11)、targetField 使用 decimal(10,2)QUANTITY_LIMIT 的 targetField 使用 int(11) 且默认值为 0。所有政策字段必须位于政策指定的 tableName禁止只把期限或公式写进 columnComment 而不创建字段。\nDo not invent status values outside stateMachines.states.\n严格遵守 input.limits.maxTables 和 maxColumnsPerTable。\n项目输入 JSON\n{\"mode\":\"generate\",\"projectName\":\"图书管理系统\",\"projectDescription\":\"功能:借书、还书、预约、取消预约\\n角色用户、管理员\\n其他模块轮播图、公告、新闻\",\"industryTemplate\":\"\",\"stylePreset\":\"dark-tech\",\"extraRequirements\":\"\",\"confirmedAppBlueprint\":{\"adminHomeDashboard\":{\"charts\":[{\"filters\":[],\"metrics\":[{\"aggregate\":\"count\",\"label\":\"借阅趋势\"}],\"semantic\":\"order\",\"title\":\"借阅趋势\",\"type\":\"line\"},{\"filters\":[],\"metrics\":[{\"aggregate\":\"count\",\"label\":\"图书分类分布\"}],\"semantic\":\"content\",\"title\":\"图书分类分布\",\"type\":\"pie\"}],\"description\":\"核心业务数据\",\"metrics\":[{\"aggregate\":\"count\",\"filters\":[],\"semantic\":\"inventory\"},{\"aggregate\":\"count\",\"filters\":[],\"semantic\":\"order\"},{\"aggregate\":\"count\",\"filters\":[],\"semantic\":\"user\"},{\"aggregate\":\"count\",\"filters\":[],\"semantic\":\"warning\"}],\"title\":\"运营总览\"},\"adminMenus\":[{\"code\":\"book_admin\",\"dataScope\":\"ROLE\",\"name\":\"图书管理\",\"pageCode\":\"book_admin_page\",\"pageType\":\"list\",\"path\":\"/admin/books\",\"requiresLogin\":true,\"tableName\":\"book_info\",\"visibleRoles\":[\"admin\"]},{\"code\":\"borrow_admin\",\"dataScope\":\"ROLE\",\"name\":\"借阅管理\",\"pageCode\":\"borrow_admin_page\",\"pageType\":\"list\",\"path\":\"/admin/borrows\",\"requiresLogin\":true,\"tableName\":\"borrow_record\",\"visibleRoles\":[\"admin\"]},{\"code\":\"banner_admin\",\"dataScope\":\"ROLE\",\"name\":\"轮播图管理\",\"pageCode\":\"banner_admin_page\",\"pageType\":\"list\",\"path\":\"/admin/banners\",\"requiresLogin\":true,\"tableName\":\"banner\",\"visibleRoles\":[\"admin\"]},{\"code\":\"notice_admin\",\"dataScope\":\"ROLE\",\"name\":\"公告管理\",\"pageCode\":\"notice_admin_page\",\"pageType\":\"list\",\"path\":\"/admin/notices\",\"requiresLogin\":true,\"tableName\":\"notice\",\"visibleRoles\":[\"admin\"]},{\"code\":\"news_admin\",\"dataScope\":\"ROLE\",\"name\":\"新闻管理\",\"pageCode\":\"news_admin_page\",\"pageType\":\"list\",\"path\":\"/admin/news\",\"requiresLogin\":true,\"tableName\":\"news\",\"visibleRoles\":[\"admin\"]}],\"frontendMenus\":[{\"code\":\"home\",\"dataScope\":\"PUBLIC\",\"name\":\"首页\",\"pageCode\":\"home_page\",\"pageType\":\"\",\"path\":\"/home\",\"requiresLogin\":false,\"tableName\":\"\",\"visibleRoles\":[]},{\"code\":\"book_catalog\",\"dataScope\":\"PUBLIC\",\"name\":\"图书目录\",\"pageCode\":\"book_catalog_page\",\"pageType\":\"\",\"path\":\"/books\",\"requiresLogin\":false,\"tableName\":\"\",\"visibleRoles\":[]},{\"code\":\"my_borrows\",\"dataScope\":\"CURRENT_USER\",\"name\":\"我的借阅\",\"pageCode\":\"my_borrows_page\",\"pageType\":\"\",\"path\":\"/my-borrows\",\"requiresLogin\":true,\"tableName\":\"\",\"visibleRoles\":[\"reader\"]},{\"code\":\"my_profile\",\"dataScope\":\"CURRENT_USER\",\"name\":\"个人资料\",\"pageCode\":\"my_profile_page\",\"pageType\":\"\",\"path\":\"/my-profile\",\"requiresLogin\":true,\"tableName\":\"\",\"visibleRoles\":[\"reader\"]}],\"frontendPages\":[{\"code\":\"home_page\",\"menuCode\":\"home\",\"name\":\"首页\",\"pageType\":\"list\",\"parentPageCode\":\"\",\"path\":\"/home\",\"tableName\":\"banner\"},{\"code\":\"book_catalog_page\",\"menuCode\":\"book_catalog\",\"name\":\"图书目录\",\"pageType\":\"list\",\"parentPageCode\":\"\",\"path\":\"/books\",\"tableName\":\"book_info\"},{\"code\":\"book_detail_page\",\"menuCode\":\"book_catalog\",\"name\":\"图书详情\",\"pageType\":\"detail\",\"parentPageCode\":\"\",\"path\":\"/books/:id\",\"tableName\":\"book_info\"},{\"code\":\"my_borrows_page\",\"menuCode\":\"my_borrows\",\"name\":\"我的借阅\",\"pageType\":\"current_user_list\",\"parentPageCode\":\"\",\"path\":\"/my-borrows\",\"tableName\":\"borrow_record\"},{\"code\":\"my_profile_page\",\"menuCode\":\"my_profile\",\"name\":\"个人资料\",\"pageType\":\"form\",\"parentPageCode\":\"\",\"path\":\"/my-profile\",\"tableName\":\"reader\"}],\"roles\":[{\"code\":\"admin\",\"description\":\"系统管理员,拥有所有后台管理权限\",\"name\":\"管理员\"},{\"code\":\"reader\",\"description\":\"普通用户,可以借书、还书、预约、取消预约\",\"name\":\"读者\"}]},\"flowConfig\":{\"actions\":[{\"actor\":\"reader\",\"button\":{\"confirm\":\"确认预约该书?\",\"order\":10,\"pageCode\":\"book_detail_page\",\"scope\":\"reader\",\"slot\":\"page.actions\",\"type\":\"primary\"},\"code\":\"reserve\",\"effects\":[{\"amount\":\"1\",\"min\":\"0\",\"table\":\"borrow_record\",\"type\":\"create_record\",\"values\":{\"reader_id\":\"currentUserId\",\"borrow_date\":\"now\",\"book_id\":\"record.book_id\",\"status\":\"reserved\"}}],\"from\":\"init\",\"invalidStateMessage\":\"该图书不可预约\",\"method\":\"POST\",\"name\":\"预约图书\",\"path\":\"/borrow-record/reserve\",\"successMessage\":\"预约成功\",\"to\":\"reserved\"},{\"actor\":\"reader\",\"button\":{\"confirm\":\"确认取消预约?\",\"order\":10,\"pageCode\":\"my_borrows_page\",\"scope\":\"reader\",\"slot\":\"list.rowActions\",\"type\":\"warning\"},\"code\":\"cancel_reserve\",\"effects\":[],\"from\":\"reserved\",\"invalidStateMessage\":\"当前状态不能取消\",\"method\":\"POST\",\"name\":\"取消预约\",\"path\":\"/borrow-record/cancel-reserve\",\"successMessage\":\"取消预约成功\",\"to\":\"cancelled\"},{\"actor\":\"admin\",\"audit\":{\"timeField\":\"approve_time\",\"userField\":\"approve_user_id\"},\"button\":{\"confirm\":\"确认借出该书?\",\"order\":10,\"pageCode\":\"borrow_admin_page\",\"scope\":\"admin\",\"slot\":\"list.rowActions\",\"type\":\"success\"},\"code\":\"lend\",\"effects\":[{\"amount\":\"1\",\"errorMessage\":\"图书库存不足\",\"field\":\"stock\",\"min\":\"0\",\"notFoundMessage\":\"图书不存在\",\"relationField\":\"book_id\",\"table\":\"book_info\",\"type\":\"decrease\",\"values\":{}}],\"from\":\"reserved\",\"invalidStateMessage\":\"该记录已借出或已取消\",\"method\":\"POST\",\"name\":\"借出\",\"path\":\"/borrow-record/lend\",\"successMessage\":\"借出成功\",\"to\":\"borrowing\"},{\"actor\":\"admin\",\"audit\":{\"timeField\":\"return_time\",\"userField\":\"return_user_id\"},\"button\":{\"confirm\":\"确认归还该书?\",\"order\":20,\"pageCode\":\"borrow_admin_page\",\"scope\":\"admin\",\"slot\":\"list.rowActions\",\"type\":\"primary\"},\"code\":\"return_book\",\"effects\":[{\"amount\":\"1\",\"field\":\"stock\",\"min\":\"0\",\"notFoundMessage\":\"图书不存在\",\"relationField\":\"book_id\",\"table\":\"book_info\",\"type\":\"increase\",\"values\":{}}],\"from\":\"borrowing\",\"invalidStateMessage\":\"当前状态不能归还\",\"method\":\"POST\",\"name\":\"归还\",\"path\":\"/borrow-record/return\",\"successMessage\":\"归还成功\",\"to\":\"returned\"}],\"code\":\"borrow_flow\",\"mainTable\":\"borrow_record\",\"metrics\":[{\"aggregate\":\"count\",\"code\":\"borrowing_count\",\"field\":\"id\",\"name\":\"借阅中数量\",\"status\":\"borrowing\",\"table\":\"borrow_record\",\"unit\":\"条\"},{\"aggregate\":\"count\",\"code\":\"reserved_count\",\"field\":\"id\",\"name\":\"预约中数量\",\"status\":\"reserved\",\"table\":\"borrow_record\",\"unit\":\"条\"},{\"aggregate\":\"count\",\"code\":\"returned_count\",\"field\":\"id\",\"name\":\"已归还数量\",\"status\":\"returned\",\"table\":\"borrow_record\",\"unit\":\"条\"},{\"aggregate\":\"count\",\"code\":\"cancelled_count\",\"field\":\"id\",\"name\":\"已取消数量\",\"status\":\"cancelled\",\"table\":\"borrow_record\",\"unit\":\"条\"},{\"aggregate\":\"count\",\"code\":\"book_total\",\"field\":\"id\",\"name\":\"图书总数\",\"table\":\"book_info\",\"unit\":\"本\"},{\"aggregate\":\"sum\",\"code\":\"book_stock_sum\",\"field\":\"stock\",\"name\":\"总库存\",\"table\":\"book_info\",\"unit\":\"本\"}],\"name\":\"借阅流程\",\"notFoundMessage\":\"借阅记录不存在\",\"states\":[{\"code\":\"init\",\"label\":\"初始\"},{\"code\":\"reserved\",\"label\":\"已预约\"},{\"code\":\"borrowing\",\"label\":\"借阅中\"},{\"code\":\"returned\",\"label\":\"已归还\"},{\"code\":\"cancelled\",\"label\":\"已取消\"}],\"statusField\":\"status\",\"version\":\"1.0\"},\"compiledFlowContract\":{\"acceptanceScenarios\":[],\"actions\":[{\"actor\":\"reader\",\"code\":\"reserve\",\"name\":\"预约图书\",\"ownerObject\":\"borrow_record\",\"ownerTable\":\"borrow_record\",\"preconditions\":[],\"quantityEffects\":[],\"recordEffects\":[],\"required\":true,\"stateTransitions\":[{\"actionCode\":\"reserve\",\"fromState\":\"init\",\"toState\":\"reserved\"}]},{\"actor\":\"reader\",\"code\":\"cancel_reserve\",\"name\":\"取消预约\",\"ownerObject\":\"borrow_record\",\"ownerTable\":\"borrow_record\",\"preconditions\":[],\"quantityEffects\":[],\"recordEffects\":[],\"required\":true,\"stateTransitions\":[{\"actionCode\":\"cancel_reserve\",\"fromState\":\"reserved\",\"toState\":\"cancelled\"}]},{\"actor\":\"admin\",\"code\":\"lend\",\"name\":\"借出\",\"ownerObject\":\"borrow_record\",\"ownerTable\":\"borrow_record\",\"preconditions\":[],\"quantityEffects\":[{\"actionCode\":\"lend\",\"amount\":\"1\",\"effectType\":\"decrease\",\"objectCode\":\"book_info\",\"quantityField\":\"stock\",\"tableName\":\"book_info\"}],\"recordEffects\":[],\"required\":true,\"stateTransitions\":[{\"actionCode\":\"lend\",\"fromState\":\"reserved\",\"toState\":\"borrowing\"}]},{\"actor\":\"admin\",\"code\":\"return_book\",\"name\":\"归还\",\"ownerObject\":\"borrow_record\",\"ownerTable\":\"borrow_record\",\"preconditions\":[],\"quantityEffects\":[{\"actionCode\":\"return_book\",\"amount\":\"1\",\"effectType\":\"increase\",\"objectCode\":\"book_info\",\"quantityField\":\"stock\",\"tableName\":\"book_info\"}],\"recordEffects\":[],\"required\":true,\"stateTransitions\":[{\"actionCode\":\"return_book\",\"fromState\":\"borrowing\",\"toState\":\"returned\"}]}],\"businessPolicies\":[],\"coreObjects\":[{\"code\":\"borrow_record\",\"name\":\"借阅流程\",\"objectType\":\"main\",\"tableName\":\"borrow_record\"},{\"code\":\"book_info\",\"name\":\"book_info\",\"objectType\":\"related\",\"tableName\":\"book_info\"}],\"domainName\":\"借阅流程\",\"metrics\":[{\"aggregate\":\"count\",\"code\":\"borrowing_count\",\"field\":\"id\",\"filters\":[{\"field\":\"status\",\"operator\":\"eq\",\"values\":[\"borrowing\"]}],\"name\":\"借阅中数量\",\"relatedActionCodes\":[],\"required\":true,\"tableName\":\"borrow_record\",\"unit\":\"条\"},{\"aggregate\":\"count\",\"code\":\"reserved_count\",\"field\":\"id\",\"filters\":[{\"field\":\"status\",\"operator\":\"eq\",\"values\":[\"reserved\"]}],\"name\":\"预约中数量\",\"relatedActionCodes\":[],\"required\":true,\"tableName\":\"borrow_record\",\"unit\":\"条\"},{\"aggregate\":\"count\",\"code\":\"returned_count\",\"field\":\"id\",\"filters\":[{\"field\":\"status\",\"operator\":\"eq\",\"values\":[\"returned\"]}],\"name\":\"已归还数量\",\"relatedActionCodes\":[],\"required\":true,\"tableName\":\"borrow_record\",\"unit\":\"条\"},{\"aggregate\":\"count\",\"code\":\"cancelled_count\",\"field\":\"id\",\"filters\":[{\"field\":\"status\",\"operator\":\"eq\",\"values\":[\"cancelled\"]}],\"name\":\"已取消数量\",\"relatedActionCodes\":[],\"required\":true,\"tableName\":\"borrow_record\",\"unit\":\"条\"},{\"aggregate\":\"count\",\"code\":\"book_total\",\"field\":\"id\",\"filters\":[],\"name\":\"图书总数\",\"relatedActionCodes\":[],\"required\":true,\"tableName\":\"book_info\",\"unit\":\"本\"},{\"aggregate\":\"sum\",\"code\":\"book_stock_sum\",\"field\":\"stock\",\"filters\":[],\"name\":\"总库存\",\"relatedActionCodes\":[],\"required\":true,\"tableName\":\"book_info\",\"unit\":\"本\"}],\"pageBindings\":[{\"actionCode\":\"reserve\",\"pageCode\":\"book_detail_page\",\"slot\":\"page.actions\",\"tableName\":\"borrow_record\",\"target\":\"frontend\"},{\"actionCode\":\"cancel_reserve\",\"pageCode\":\"my_borrows_page\",\"slot\":\"list.rowActions\",\"tableName\":\"borrow_record\",\"target\":\"frontend\"},{\"actionCode\":\"lend\",\"pageCode\":\"borrow_admin_page\",\"slot\":\"list.rowActions\",\"tableName\":\"borrow_record\",\"target\":\"admin\"},{\"actionCode\":\"return_book\",\"pageCode\":\"borrow_admin_page\",\"slot\":\"list.rowActions\",\"tableName\":\"borrow_record\",\"target\":\"admin\"}],\"quantityRules\":[{\"actionCode\":\"lend\",\"amount\":\"1\",\"effectType\":\"decrease\",\"objectCode\":\"book_info\",\"quantityField\":\"stock\",\"tableName\":\"book_info\"},{\"actionCode\":\"return_book\",\"amount\":\"1\",\"effectType\":\"increase\",\"objectCode\":\"book_info\",\"quantityField\":\"stock\",\"tableName\":\"book_info\"}],\"recordRules\":[],\"stateMachines\":[{\"objectCode\":\"borrow_record\",\"states\":[\"init\",\"reserved\",\"borrowing\",\"returned\",\"cancelled\"],\"statusField\":\"status\",\"tableName\":\"borrow_record\",\"transitions\":[{\"actionCode\":\"reserve\",\"fromState\":\"init\",\"toState\":\"reserved\"},{\"actionCode\":\"cancel_reserve\",\"fromState\":\"reserved\",\"toState\":\"cancelled\"},{\"actionCode\":\"lend\",\"fromState\":\"reserved\",\"toState\":\"borrowing\"},{\"actionCode\":\"return_book\",\"fromState\":\"borrowing\",\"toState\":\"returned\"}]}]},\"canonicalTableRegistry\":[\"banner\",\"book_info\",\"borrow_record\",\"reader\",\"notice\",\"news\"],\"limits\":{\"maxTables\":12,\"maxColumnsPerTable\":30}}', '{\n \"tables\": [\n {\n \"tableName\": \"banner\",\n \"tableComment\": \"轮播图\",\n \"adminMenuName\": \"轮播图\",\n \"operations\": {\n \"add\": true,\n \"edit\": true,\n \"remove\": true,\n \"removeType\": \"physical\",\n \"reason\": \"\"\n },\n \"columns\": [\n {\n \"columnName\": \"id\",\n \"columnLabel\": \"ID\",\n \"columnComment\": \"主键ID\",\n \"columnType\": \"bigint(20)\",\n \"isPk\": \"1\",\n \"isIncrement\": \"1\",\n \"isRequired\": \"1\"\n },\n {\n \"columnName\": \"title\",\n \"columnLabel\": \"标题\",\n \"columnComment\": \"轮播图标题\",\n \"columnType\": \"varchar(100)\",\n \"isPk\": \"0\",\n \"isIncrement\": \"0\",\n \"isRequired\": \"1\"\n },\n {\n \"columnName\": \"image_url\",\n \"columnLabel\": \"图片URL\",\n \"columnComment\": \"轮播图图片地址\",\n \"columnType\": \"varchar(500)\",\n \"isPk\": \"0\",\n \"isIncrement\": \"0\",\n \"isRequired\": \"1\"\n },\n {\n \"columnName\": \"link_url\",\n \"columnLabel\": \"链接URL\",\n \"columnComment\": \"点击轮播图跳转地址\",\n \"columnType\": \"varchar(500)\",\n \"isPk\": \"0\",\n \"isIncrement\": \"0\",\n \"isRequired\": \"0\"\n },\n {\n \"columnName\": \"sort_order\",\n \"columnLabel\": \"排序\",\n \"columnComment\": \"显示顺序,越小越靠前\",\n \"columnType\": \"int(11)\",\n \"isPk\": \"0\",\n \"isIncrement\": \"0\",\n \"isRequired\": \"1\"\n },\n {\n \"columnName\": \"status\",\n \"columnLabel\": \"状态\",\n \"columnComment\": \"启用状态 0禁用 1启用\",\n \"columnType\": \"char(1)\",\n \"isPk\": \"0\",\n \"isIncrement\": \"0\",\n \"isRequired\": \"1\",\n \"htmlType\": \"radio\",\n \"dictType\": \"banner_status\",\n \"dictOptions\": [\n {\"value\": \"0\", \"label\": \"禁用\"},\n {\"value\": \"1\", \"label\": \"启用\"}\n ]\n },\n {\n \"columnName\": \"create_time\",\n \"columnLabel\": \"创建时间\",\n \"columnComment\": \"记录创建时间\",\n \"columnType\": \"datetime\",\n \"isPk\": \"0\",\n \"isIncrement\": \"0\",\n \"isRequired\": \"1\"\n }\n ]\n },\n {\n \"tableName\": \"book_info\",\n \"tableComment\": \"图书信息\",\n \"adminMenuName\": \"图书\",\n \"operations\": {\n \"add\": true,\n \"edit\": true,\n \"remove\": true,\n \"removeType\": \"physical\",\n \"reason\": \"\"\n },\n \"columns\": [\n {\n \"columnName\": \"id\",\n \"columnLabel\": \"ID\",\n \"columnComment\": \"主键ID\",\n \"columnType\": \"bigint(20)\",\n \"isPk\": \"1\",\n \"isIncrement\": \"1\",\n \"isRequired\": \"1\"\n },\n {\n \"columnName\": \"title\",\n \"columnLabel\": \"书名\",\n \"columnComment\": \"图书名称\",\n \"columnType\": \"varchar(200)\",\n \"isPk\": \"0\",\n \"isIncrement\": \"0\",\n \"isRequired\": \"1\"\n },\n {\n \"columnName\": \"author\",\n \"columnLabel\": \"作者\",\n \"columnComment\": \"图书作者\",\n \"columnType\": \"varchar(100)\",\n \"isPk\": \"0\",\n \"isIncrement\": \"0\",\n \"isRequired\": \"1\"\n },\n {\n \"columnName\": \"isbn\",\n \"columnLabel\": \"ISBN\",\n \"columnComment\": \"国际标准书号\",\n \"columnType\": \"varchar(20)\",\n \"isPk\": \"0\",\n \"isIncrement\": \"0\",\n \"isRequired\": \"1\"\n },\n {\n \"columnName\": \"stock\",\n \"columnLabel\": \"库存\",\n \"columnComment\": \"当前库存数量默认0\",\n \"columnType\": \"int(11)\",\n \"isPk\": \"0\",\n \"isIncrement\": \"0\",\n \"isRequired\": \"1\",\n \"defaultValue\": 0\n },\n {\n \"columnName\": \"category\",\n \"columnLabel\": \"分类\",\n \"columnComment\": \"图书分类,如文学、科技\",\n \"columnType\": \"varchar(50)\",\n \"isPk\": \"0\",\n \"isIncrement\": \"0\",\n \"isRequired\": \"1\"\n },\n {\n \"columnName\": \"cover_image\",\n \"columnLabel\": \"封面图片\",\n \"columnComment\": \"图书封面图片URL\",\n \"columnType\": \"varchar(500)\",\n \"isPk\": \"0\",\n \"isIncrement\": \"0\",\n \"isRequired\": \"0\"\n },\n {\n \"columnName\": \"description\",\n \"columnLabel\": \"简介\",\n \"columnComment\": \"图书简介\",\n \"columnType\": \"text\",\n \"isPk\": \"0\",\n \"isIncrement\": \"0\",\n \"isRequired\": \"0\"\n },\n {\n \"columnName\": \"status\",\n \"columnLabel\": \"状态\",\n \"columnComment\": \"上架状态 0下架 1上架\",\n \"columnType\": \"char(1)\",\n \"isPk\": \"0\",\n \"isIncrement\": \"0\",\n \"isRequired\": \"1\",\n \"htmlType\": \"radio\",\n \"dictType\": \"book_status\",\n \"dictOptions\": [\n {\"value\": \"0\", \"label\": \"下架\"},\n {\"value\": \"1\", \"label\": \"上架\"}\n ]\n },\n {\n \"columnName\": \"create_time\",\n \"columnLabel\": \"创建时间\",\n \"columnComment\": \"记录创建时间\",\n \"columnType\": \"datetime\",\n \"isPk\": \"0\",\n \"isIncrement\": \"0\",\n \"isRequired\": \"1\"\n },\n {\n \"columnName\": \"update_time\",\n \"columnLabel\": \"更新时间\",\n \"columnComment\": \"最后修改时间\",\n \"columnType\": \"datetime\",\n \"isPk\": \"0\",\n \"isIncrement\": \"0\",\n \"isRequired\": \"0\"\n }\n ]\n },\n {\n \"tableName\": \"borrow_record\",\n \"tableComment\": \"借阅记录\",\n \"adminMenuName\": \"借阅\",\n \"operations\": {\n \"add\": true,\n \"edit\": false,\n \"remove\": false,\n \"removeType\": \"physical\",\n \"reason\": \"借阅记录仅允许新增,不允许修改或删除\"\n },\n \"columns\": [\n {\n \"columnName\": \"id\",\n \"columnLabel\": \"ID\",\n \"columnComment\": \"主键ID\",\n \"columnType\": \"bigint(20)\",\n \"isPk\": \"1\",\n \"isIncrement\": \"1\",\n \"isRequired\": \"1\"\n },\n {\n \"columnName\": \"reader_id\",\n \"columnLabel\": \"读者\",\n \"columnComment\": \"关联读者账号ID\",\n \"columnType\": \"bigint(20)\",\n \"isPk\": \"0\",\n \"isIncrement\": \"0\",\n \"isRequired\": \"1\",\n \"htmlType\": \"select\",\n \"dictType\": \"remote:reader:reader_id:nickname\"\n },\n {\n \"columnName\": \"book_id\",\n \"columnLabel\": \"图书\",\n \"columnComment\": \"关联图书ID\",\n \"columnType\": \"bigint(20)\",\n \"isPk\": \"0\",\n \"isIncrement\": \"0\",\n \"isRequired\": \"1\",\n \"htmlType\": \"select\",\n \"dictType\": \"remote:book_info:id:title\"\n },\n {\n \"columnName\": \"borrow_date\",\n \"columnLabel\": \"借阅日期\",\n \"columnComment\": \"预约或借阅日期datetime类型\",\n \"columnType\": \"datetime\",\n \"isPk\": \"0\",\n \"isIncrement\": \"0\",\n \"isRequired\": \"1\"\n },\n {\n \"columnName\": \"return_time\",\n \"columnLabel\": \"归还时间\",\n \"columnComment\": \"实际归还时间(由管理员操作时记录)\",\n \"columnType\": \"datetime\",\n \"isPk\": \"0\",\n \"isIncrement\": \"0\",\n \"isRequired\": \"0\"\n },\n {\n \"columnName\": \"approve_time\",\n \"columnLabel\": \"审核时间\",\n \"columnComment\": \"管理员借出审核时间\",\n \"columnType\": \"datetime\",\n \"isPk\": \"0\",\n \"isIncrement\": \"0\",\n \"isRequired\": \"0\"\n },\n {\n \"columnName\": \"approve_user_id\",\n \"columnLabel\": \"审核人\",\n \"columnComment\": \"执行借出操作的管理员ID\",\n \"columnType\": \"bigint(20)\",\n \"isPk\": \"0\",\n \"isIncrement\": \"0\",\n \"isRequired\": \"0\",\n \"htmlType\": \"select\",\n \"dictType\": \"remote:admin:admin_id:nickname\"\n },\n {\n \"columnName\": \"return_user_id\",\n \"columnLabel\": \"归还操作人\",\n \"columnComment\": \"执行归还操作的管理员ID\",\n \"columnType\": \"bigint(20)\",\n \"isPk\": \"0\",\n \"isIncrement\": \"0\",\n \"isRequired\": \"0\",\n \"htmlType\": \"select\",\n \"dictType\": \"remote:admin:admin_id:nickname\"\n },\n {\n \"columnName\": \"status\",\n \"columnLabel\": \"状态\",\n \"columnComment\": \"借阅流程状态init-初始,reserved-已预约,borrowing-借阅中,returned-已归还,cancelled-已取消\",\n \"columnType\": \"varchar(20)\",\n \"isPk\": \"0\",\n \"isIncrement\": \"0\",\n \"isRequired\": \"1\",\n \"htmlType\": \"select\",\n \"dictType\": \"borrow_status\",\n \"dictOptions\": [\n {\"value\": \"init\", \"label\": \"初始\"},\n {\"value\": \"reserved\", \"label\": \"已预约\"},\n {\"value\": \"borrowing\", \"label\": \"借阅中\"},\n {\"value\": \"returned\", \"label\": \"已归还\"},\n {\"value\": \"cancelled\", \"label\": \"已取消\"}\n ]\n },\n {\n \"columnName\": \"create_time\",\n \"columnLabel\": \"创建时间\",\n \"columnComment\": \"记录创建时间\",\n \"columnType\": \"datetime\",\n \"isPk\": \"0\",\n \"isIncrement\": \"0\",\n \"isRequired\": \"1\"\n }\n ]\n },\n {\n \"tableName\": \"reader\",\n \"tableComment\": \"读者账号\",\n \"adminMenuName\": \"读者\",\n \"operations\": {\n \"add\": true,\n \"edit\": true,\n \"remove\": true,\n \"removeType\": \"physical\",\n \"reason\": \"\"\n },\n \"columns\": [\n {\n \"columnName\": \"reader_id\",\n \"columnLabel\": \"读者ID\",\n \"columnComment\": \"主键ID自增\",\n \"columnType\": \"bigint(20)\",\n \"isPk\": \"1\",\n \"isIncrement\": \"1\",\n \"isRequired\": \"1\"\n },\n {\n \"columnName\": \"username\",\n \"columnLabel\": \"用户名\",\n \"columnComment\": \"登录用户名,唯一\",\n \"columnType\": \"varchar(50)\",\n \"isPk\": \"0\",\n \"isIncrement\": \"0\",\n \"isRequired\": \"1\"\n },\n {\n \"columnName\": \"password_hash\",\n \"columnLabel\": \"密码哈希\",\n \"columnComment\": \"加密后的密码\",\n \"columnType\": \"varchar(255)\",\n \"isPk\": \"0\",\n \"isIncrement\": \"0\",\n \"isRequired\": \"1\"\n },\n {\n \"columnName\": \"nickname\",\n \"columnLabel\": \"昵称\",\n \"columnComment\": \"用户昵称,用于显示\",\n \"columnType\": \"varchar(50)\",\n \"isPk\": \"0\",\n \"isIncrement\": \"0\",\n \"isRequired\": \"1\"\n },\n {\n \"columnName\": \"status\",\n \"columnLabel\": \"状态\",\n \"columnComment\": \"账号状态 0禁用 1启用\",\n \"columnType\": \"char(1)\",\n \"isPk\": \"0\",\n \"isIncrement\": \"0\",\n \"isRequired\": \"1\",\n \"htmlType\": \"radio\",\n \"dictType\": \"account_status\",\n \"dictOptions\": [\n {\"value\": \"0\", \"label\": \"禁用\"},\n {\"value\": \"1\", \"label\": \"启用\"}\n ]\n },\n {\n \"columnName\": \"create_time\",\n \"columnLabel\": \"创建时间\",\n \"columnComment\": \"账号创建时间\",\n \"columnType\": \"datetime\",\n \"isPk\": \"0\",\n \"isIncrement\": \"0\",\n \"isRequired\": \"1\"\n }\n ]\n },\n {\n \"tableName\": \"notice\",\n \"tableComment\": \"公告\",\n \"adminMenuName\": \"公告\",\n \"operations\": {\n \"add\": true,\n \"edit\": true,\n \"remove\": true,\n \"removeType\": \"physical\",\n \"reason\": \"\"\n },\n \"columns\": [\n {\n \"columnName\": \"id\",\n \"columnLabel\": \"ID\",\n \"columnComment\": \"主键ID\",\n \"columnType\": \"bigint(20)\",\n \"isPk\": \"1\",\n \"isIncrement\": \"1\",\n \"isRequired\": \"1\"\n },\n {\n \"columnName\": \"title\",\n \"columnLabel\": \"标题\",\n \"columnComment\": \"公告标题\",\n \"columnType\": \"varchar(200)\",\n \"isPk\": \"0\",\n \"isIncrement\": \"0\",\n \"isRequired\": \"1\"\n },\n {\n \"columnName\": \"content\",\n \"columnLabel\": \"内容\",\n \"columnComment\": \"公告正文\",\n \"columnType\": \"longtext\",\n \"isPk\": \"0\",\n \"isIncrement\": \"0\",\n \"isRequired\": \"1\"\n },\n {\n \"columnName\": \"publish_time\",\n \"columnLabel\": \"发布时间\",\n \"columnComment\": \"公告发布时间\",\n \"columnType\": \"datetime\",\n \"isPk\": \"0\",\n \"isIncrement\": \"0\",\n \"isRequired\": \"1\"\n },\n {\n \"columnName\": \"status\",\n \"columnLabel\": \"状态\",\n \"columnComment\": \"发布状态 0草稿 1已发布\",\n \"columnType\": \"char(1)\",\n \"isPk\": \"0\",\n \"isIncrement\": \"0\",\n \"isRequired\": \"1\",\n \"htmlType\": \"radio\",\n \"dictType\": \"publish_status\",\n \"dictOptions\": [\n {\"value\": \"0\", \"label\": \"草稿\"},\n {\"value\": \"1\", \"label\": \"已发布\"}\n ]\n },\n {\n \"columnName\": \"create_time\",\n \"columnLabel\": \"创建时间\",\n \"columnComment\": \"记录创建时间\",\n \"columnType\": \"datetime\",\n \"isPk\": \"0\",\n \"isIncrement\": \"0\",\n \"isRequired\": \"1\"\n }\n ]\n },\n {\n \"tableName\": \"news\",\n \"tableComment\": \"新闻\",\n \"adminMenuName\": \"新闻\",\n \"operations\": {\n \"add\": true,\n \"edit\": true,\n \"remove\": true,\n \"removeType\": \"physical\",\n \"reason\": \"\"\n },\n \"columns\": [\n {\n \"columnName\": \"id\",\n \"columnLabel\": \"ID\",\n \"columnComment\": \"主键ID\",\n \"columnType\": \"bigint(20)\",\n \"isPk\": \"1\",\n \"isIncrement\": \"1\",\n \"isRequired\": \"1\"\n },\n {\n \"columnName\": \"title\",\n \"columnLabel\": \"标题\",\n \"columnComment\": \"新闻标题\",\n \"columnType\": \"varchar(200)\",\n \"isPk\": \"0\",\n \"isIncrement\": \"0\",\n \"isRequired\": \"1\"\n },\n {\n \"columnName\": \"content\",\n \"columnLabel\": \"内容\",\n \"columnComment\": \"新闻正文\",\n \"columnType\": \"longtext\",\n \"isPk\": \"0\",\n \"isIncrement\": \"0\",\n \"isRequired\": \"1\"\n },\n {\n \"columnName\": \"publish_time\",\n \"columnLabel\": \"发布时间\",\n \"columnComment\": \"新闻发布时间\",\n \"columnType\": \"datetime\",\n \"isPk\": \"0\",\n \"isIncrement\": \"0\",\n \"isRequired\": \"1\"\n },\n {\n \"columnName\": \"status\",\n \"columnLabel\": \"状态\",\n \"columnComment\": \"发布状态 0草稿 1已发布\",\n \"columnType\": \"char(1)\",\n \"isPk\": \"0\",\n \"isIncrement\": \"0\",\n \"isRequired\": \"1\",\n \"htmlType\": \"radio\",\n \"dictType\": \"publish_status\",\n \"dictOptions\": [\n {\"value\": \"0\", \"label\": \"草稿\"},\n {\"value\": \"1\", \"label\": \"已发布\"}\n ]\n },\n {\n \"columnName\": \"create_time\",\n \"columnLabel\": \"创建时间\",\n \"columnComment\": \"记录创建时间\",\n \"columnType\": \"datetime\",\n \"isPk\": \"0\",\n \"isIncrement\": \"0\",\n \"isRequired\": \"1\"\n }\n ]\n },\n {\n \"tableName\": \"admin\",\n \"tableComment\": \"管理员账号\",\n \"adminMenuName\": \"管理员\",\n \"operations\": {\n \"add\": true,\n \"edit\": true,\n \"remove\": true,\n \"removeType\": \"physical\",\n \"reason\": \"\"\n },\n \"columns\": [\n {\n \"columnName\": \"admin_id\",\n \"columnLabel\": \"管理员ID\",\n \"columnComment\": \"主键ID自增\",\n \"columnType\": \"bigint(20)\",\n \"isPk\": \"1\",\n \"isIncrement\": \"1\",\n \"isRequired\": \"1\"\n },\n {\n \"columnName\": \"username\",\n \"columnLabel\": \"用户名\",\n \"columnComment\": \"登录用户名,唯一\",\n \"columnType\": \"varchar(50)\",\n \"isPk\": \"0\",\n \"isIncrement\": \"0\",\n \"isRequired\": \"1\"\n },\n {\n \"columnName\": \"password_hash\",\n \"columnLabel\": \"密码哈希\",\n \"columnComment\": \"加密后的密码\",\n \"columnType\": \"varchar(255)\",\n \"isPk\": \"0\",\n \"isIncrement\": \"0\",\n \"isRequired\": \"1\"\n },\n {\n \"columnName\": \"nickname\",\n \"columnLabel\": \"昵称\",\n \"columnComment\": \"管理员昵称\",\n \"columnType\": \"varchar(50)\",\n \"isPk\": \"0\",\n \"isIncrement\": \"0\",\n \"isRequired\": \"1\"\n },\n {\n \"columnName\": \"status\",\n \"columnLabel\": \"状态\",\n \"columnComment\": \"账号状态 0禁用 1启用\",\n \"columnType\": \"char(1)\",\n \"isPk\": \"0\",\n \"isIncrement\": \"0\",\n \"isRequired\": \"1\",\n \"htmlType\": \"radio\",\n \"dictType\": \"account_status\",\n \"dictOptions\": [\n {\"value\": \"0\", \"label\": \"禁用\"},\n {\"value\": \"1\", \"label\": \"启用\"}\n ]\n },\n {\n \"columnName\": \"create_time\",\n \"columnLabel\": \"创建时间\",\n \"columnComment\": \"账号创建时间\",\n \"columnType\": \"datetime\",\n \"isPk\": \"0\",\n \"isIncrement\": \"0\",\n \"isRequired\": \"1\"\n }\n ]\n }\n ]\n}', '0', 61344, 4105, 1152, 2953, 9000, 4328, 4105, 9000, 13105, 3, 0.02097604, '1', NULL, '2026-07-14 19:51:06');
INSERT INTO `front_ai_usage_ledger` VALUES (137, 110, 110, 106, 100, 'app_blueprint', 'deepseek', 'deepseek-v4-flash', 'front.app_blueprint', 'V1', 'c3ee0180ed446fe83055bd1c272ed1b6e3978584fe52f98f5e78e14e2cfc8f29', '你是应用蓝图架构师。只输出符合用户消息结构的 JSON规划业务角色、前台菜单与页面、后台菜单和运营看板。保持 pageCode、tableName、角色数据范围和登录要求前后一致只描述静态蓝图不生成数据库、权限表、菜单表或代码。角色名称使用简体中文技术标识使用稳定的小写 snake_case。', '根据项目输入 JSON 生成应用蓝图,只返回 JSON不要 Markdown 围栏或解释。\n输出结构{\"roles\":[{\"code\":\"reader\",\"name\":\"读者\",\"description\":\"\"}],\"frontendMenus\":[{\"code\":\"book_catalog\",\"name\":\"图书目录\",\"path\":\"/books\",\"pageCode\":\"book_catalog_page\",\"requiresLogin\":false,\"visibleRoles\":[],\"dataScope\":\"PUBLIC\"}],\"frontendPages\":[{\"code\":\"book_catalog_page\",\"name\":\"图书目录\",\"menuCode\":\"book_catalog\",\"path\":\"/books\",\"pageType\":\"list\",\"tableName\":\"book_info\"}],\"adminMenus\":[{\"code\":\"book_admin\",\"name\":\"图书管理\",\"path\":\"/admin/books\",\"pageCode\":\"book_admin_page\",\"tableName\":\"book_info\",\"pageType\":\"list\",\"requiresLogin\":true,\"visibleRoles\":[\"admin\"],\"dataScope\":\"ROLE\"}],\"adminHomeDashboard\":{\"title\":\"运营总览\",\"description\":\"核心业务数据\",\"metrics\":[],\"charts\":[]}}。\n蓝图描述目标生成项目而不是当前 EasyCode/RuoYi 平台。不要生成数据库表、菜单表、角色表、权限表或代码。\nrole.name 使用简体中文role.code 使用小写 snake_case。只有 role.code=admin 是系统管理员;名称含“管理员”或“后台”的业务角色仍保持独立。\nrole.name must be Simplified Chinese. Only role.code=admin is the system administrator.\n每个菜单必须包含 requiresLogin、visibleRoles、dataScopedataScope 只能是 PUBLIC、CURRENT_USER 或 ROLE。\nadminMenus 必须包含 pageCode、tableName、pageType个人资料使用 form普通管理使用 list。\nadminMenus must include pageCode, tableName, and pageType.\nfrontendMenus 顶层菜单应指向 pageCode详情页作为子页面不创建顶层详情菜单。\n不要为轮播图、banner、公告滚动条等首页装饰创建顶层菜单可放在首页业务块或作为后台维护数据。\nfrontendPages.pageType 只能是 list、current_user_list、detail、formtableName 必须是页面展示的业务表。\n同一业务对象只使用一个稳定 tableName后续数据库、闭环、页面、看板、动作必须复用不能使用同义表名。\nadminHomeDashboard 尽量包含 4 个业务指标和至少 2 张图表趋势图与分布图所有表字段必须可由后续数据库步骤创建。semantic 只能使用 money、order、user、task、warning、inventory、content、default。\n每个非 admin 角色使用表名等于 role.code 的独立账号表,不得创建共享 user、user_info、member 或 account 表。\nNever invent a shared user, user_info, member, or account table for role accounts.\n需要个人资料页时为每个非 admin 角色创建独立 form 页面和菜单tableName 绑定 role.codepageCode/path 带角色前缀visibleRoles 只包含该角色。\nCreate one form page and one menu per non-admin role when profile pages are needed.\n个人订单、借阅、资料、预约、支付等页面必须 requiresLogin=true 且 dataScope=CURRENT_USER。\n项目输入 JSON\n{\"projectName\":\"图书管理系统\",\"projectDescription\":\"功能:借书、还书、预约、取消预约\\n角色用户、管理员\\n其他模块轮播图、公告、新闻\",\"industryTemplate\":\"\",\"stylePreset\":\"dark-tech\",\"extraRequirements\":\"\"}', '{\n \"roles\": [\n {\n \"code\": \"admin\",\n \"name\": \"管理员\",\n \"description\": \"系统管理员,管理图书、用户、借阅等所有后台业务\"\n },\n {\n \"code\": \"user\",\n \"name\": \"用户\",\n \"description\": \"普通用户,可借书、还书、预约、取消预约\"\n }\n ],\n \"frontendMenus\": [\n {\n \"code\": \"book_catalog\",\n \"name\": \"图书目录\",\n \"path\": \"/books\",\n \"pageCode\": \"book_catalog_page\",\n \"requiresLogin\": false,\n \"visibleRoles\": [],\n \"dataScope\": \"PUBLIC\"\n },\n {\n \"code\": \"my_borrowings\",\n \"name\": \"我的借阅\",\n \"path\": \"/my/borrowings\",\n \"pageCode\": \"my_borrowings_page\",\n \"requiresLogin\": true,\n \"visibleRoles\": [\"user\"],\n \"dataScope\": \"CURRENT_USER\"\n },\n {\n \"code\": \"my_reservations\",\n \"name\": \"我的预约\",\n \"path\": \"/my/reservations\",\n \"pageCode\": \"my_reservations_page\",\n \"requiresLogin\": true,\n \"visibleRoles\": [\"user\"],\n \"dataScope\": \"CURRENT_USER\"\n },\n {\n \"code\": \"user_profile\",\n \"name\": \"个人资料\",\n \"path\": \"/my/profile\",\n \"pageCode\": \"user_profile_page\",\n \"requiresLogin\": true,\n \"visibleRoles\": [\"user\"],\n \"dataScope\": \"CURRENT_USER\"\n }\n ],\n \"frontendPages\": [\n {\n \"code\": \"book_catalog_page\",\n \"name\": \"图书目录\",\n \"menuCode\": \"book_catalog\",\n \"path\": \"/books\",\n \"pageType\": \"list\",\n \"tableName\": \"book_info\"\n },\n {\n \"code\": \"book_detail_page\",\n \"name\": \"图书详情\",\n \"menuCode\": \"book_catalog\",\n \"path\": \"/books/:id\",\n \"pageType\": \"detail\",\n \"tableName\": \"book_info\"\n },\n {\n \"code\": \"my_borrowings_page\",\n \"name\": \"我的借阅\",\n \"menuCode\": \"my_borrowings\",\n \"path\": \"/my/borrowings\",\n \"pageType\": \"current_user_list\",\n \"tableName\": \"borrowing_record\"\n },\n {\n \"code\": \"my_reservations_page\",\n \"name\": \"我的预约\",\n \"menuCode\": \"my_reservations\",\n \"path\": \"/my/reservations\",\n \"pageType\": \"current_user_list\",\n \"tableName\": \"reservation\"\n },\n {\n \"code\": \"user_profile_page\",\n \"name\": \"个人资料\",\n \"menuCode\": \"user_profile\",\n \"path\": \"/my/profile\",\n \"pageType\": \"form\",\n \"tableName\": \"user\"\n }\n ],\n \"adminMenus\": [\n {\n \"code\": \"book_admin\",\n \"name\": \"图书管理\",\n \"path\": \"/admin/books\",\n \"pageCode\": \"book_admin_page\",\n \"tableName\": \"book_info\",\n \"pageType\": \"list\",\n \"requiresLogin\": true,\n \"visibleRoles\": [\"admin\"],\n \"dataScope\": \"ROLE\"\n },\n {\n \"code\": \"user_admin\",\n \"name\": \"用户管理\",\n \"path\": \"/admin/users\",\n \"pageCode\": \"user_admin_page\",\n \"tableName\": \"user\",\n \"pageType\": \"list\",\n \"requiresLogin\": true,\n \"visibleRoles\": [\"admin\"],\n \"dataScope\": \"ROLE\"\n },\n {\n \"code\": \"borrowing_admin\",\n \"name\": \"借阅管理\",\n \"path\": \"/admin/borrowings\",\n \"pageCode\": \"borrowing_admin_page\",\n \"tableName\": \"borrowing_record\",\n \"pageType\": \"list\",\n \"requiresLogin\": true,\n \"visibleRoles\": [\"admin\"],\n \"dataScope\": \"ROLE\"\n },\n {\n \"code\": \"reservation_admin\",\n \"name\": \"预约管理\",\n \"path\": \"/admin/reservations\",\n \"pageCode\": \"reservation_admin_page\",\n \"tableName\": \"reservation\",\n \"pageType\": \"list\",\n \"requiresLogin\": true,\n \"visibleRoles\": [\"admin\"],\n \"dataScope\": \"ROLE\"\n },\n {\n \"code\": \"carousel_admin\",\n \"name\": \"轮播图管理\",\n \"path\": \"/admin/carousels\",\n \"pageCode\": \"carousel_admin_page\",\n \"tableName\": \"carousel\",\n \"pageType\": \"list\",\n \"requiresLogin\": true,\n \"visibleRoles\": [\"admin\"],\n \"dataScope\": \"ROLE\"\n },\n {\n \"code\": \"announcement_admin\",\n \"name\": \"公告管理\",\n \"path\": \"/admin/announcements\",\n \"pageCode\": \"announcement_admin_page\",\n \"tableName\": \"announcement\",\n \"pageType\": \"list\",\n \"requiresLogin\": true,\n \"visibleRoles\": [\"admin\"],\n \"dataScope\": \"ROLE\"\n },\n {\n \"code\": \"news_admin\",\n \"name\": \"新闻管理\",\n \"path\": \"/admin/news\",\n \"pageCode\": \"news_admin_page\",\n \"tableName\": \"news\",\n \"pageType\": \"list\",\n \"requiresLogin\": true,\n \"visibleRoles\": [\"admin\"],\n \"dataScope\": \"ROLE\"\n },\n {\n \"code\": \"admin_profile\",\n \"name\": \"管理员个人资料\",\n \"path\": \"/admin/profile\",\n \"pageCode\": \"admin_profile_page\",\n \"tableName\": \"admin\",\n \"pageType\": \"form\",\n \"requiresLogin\": true,\n \"visibleRoles\": [\"admin\"],\n \"dataScope\": \"ROLE\"\n }\n ],\n \"adminHomeDashboard\": {\n \"title\": \"运营总览\",\n \"description\": \"核心业务数据\",\n \"metrics\": [\n {\n \"code\": \"metric_book_total\",\n \"name\": \"图书总量\",\n \"tableName\": \"book_info\",\n \"semantic\": \"content\",\n \"aggregation\": \"COUNT\"\n },\n {\n \"code\": \"metric_user_total\",\n \"name\": \"用户总量\",\n \"tableName\": \"user\",\n \"semantic\": \"user\",\n \"aggregation\": \"COUNT\"\n },\n {\n \"code\": \"metric_borrow_total\",\n \"name\": \"借出总量\",\n \"tableName\": \"borrowing_record\",\n \"semantic\": \"order\",\n \"aggregation\": \"COUNT\"\n },\n {\n \"code\": \"metric_pending_reservation\",\n \"name\": \"待处理预约\",\n \"tableName\": \"reservation\",\n \"semantic\": \"task\",\n \"aggregation\": \"COUNT\",\n \"filter\": \"status=\'pending\'\"\n }\n ],\n \"charts\": [\n {\n \"code\": \"chart_borrow_trend\",\n \"name\": \"借阅趋势\",\n \"chartType\": \"trend\",\n \"tableName\": \"borrowing_record\",\n \"semantic\": \"order\",\n \"dimension\": \"date\",\n \"measure\": \"count\"\n },\n {\n \"code\": \"chart_category_distribution\",\n \"name\": \"图书分类分布\",\n \"chartType\": \"distribution\",\n \"tableName\": \"book_info\",\n \"semantic\": \"content\",\n \"dimension\": \"category\",\n \"measure\": \"count\"\n }\n ]\n }\n}', '0', 33156, 817, 768, 49, 4692, 2987, 817, 4692, 5509, 1, 0.00944836, '1', NULL, '2026-07-14 21:22:58');
INSERT INTO `front_ai_usage_ledger` VALUES (138, 110, 110, 106, 100, 'flow_config', 'deepseek', 'deepseek-v4-flash', 'front.flow_config', 'V2', '493bfe3aa6bafe555f3fedab46a75c8364c303c2a589b1ffaa01196a93c6472f', '你是业务流程配置设计器。只输出一个合法 JSON 对象,不输出 Markdown、解释或 SQL。\n\n目标用最小 flow_config 描述状态流转、显式 Java 业务动作、多表数量联动、按钮和统计。不要输出 CRUD不要输出通用规则 DSL。\n\n固定结构\n{\n \"version\":\"1.0\",\n \"code\":\"snake_case\",\n \"name\":\"中文业务名\",\n \"mainTable\":\"snake_case\",\n \"statusField\":\"status\",\n \"notFoundMessage\":\"主记录不存在\",\n \"states\":[{\"code\":\"pending\",\"label\":\"待审核\"}],\n \"actions\":[{\n \"code\":\"approve\",\n \"name\":\"审核通过\",\n \"from\":\"pending\",\n \"to\":\"borrowing\",\n \"actor\":\"admin\",\n \"method\":\"POST\",\n \"path\":\"/borrow-record/approve\",\n \"invalidStateMessage\":\"当前状态不能审核\",\n \"successMessage\":\"审核成功\",\n \"audit\":{\"userField\":\"approve_user_id\",\"timeField\":\"approve_time\"},\n \"effects\":[{\n \"type\":\"decrease\",\n \"table\":\"book\",\n \"relationField\":\"book_id\",\n \"field\":\"stock\",\n \"amount\":\"1\",\n \"min\":\"0\",\n \"notFoundMessage\":\"图书不存在\",\n \"errorMessage\":\"图书库存不足\"\n }],\n \"button\":{\"scope\":\"admin\",\"pageCode\":\"borrow_record_list\",\"slot\":\"list.rowActions\",\"type\":\"success\",\"confirm\":\"确认审核通过吗?\",\"order\":10}\n }],\n \"metrics\":[{\"code\":\"borrowing_count\",\"name\":\"借阅中数量\",\"table\":\"borrow_record\",\"aggregate\":\"count\",\"field\":\"id\",\"status\":\"borrowing\",\"unit\":\"条\"}]\n}\n\n约束\n1. code、表名、字段名全部使用小写 snake_case状态 code 使用稳定英文编码label 使用中文。\n2. 每个 action 必须有 from 和 to且二者存在于 states 中并且不相同。\n3. effects.type 只能是 decrease、increase、update_related、create_record。\n4. decrease/increase 必须给 table、relationField、field、amountdecrease 还要给 min。\n5. update_related/create_record 使用 values值可为 currentUserId、now、record.字段名或常量。\n6. 审核人等身份只能通过 audit.userField 表达,由后端登录态注入,不能作为前端可传字段。\n7. 覆盖需求中的完整正向闭环和关键回退/拒绝动作,但不要为普通 CRUD 创建 action。\n8. metrics.status 如果填写,必须完全等于 states 中某个 code统计全状态数据或不能确定状态时省略 status。\n9. button.pageCode 必须引用 appBlueprint 中已有页面button.slot 只能是 list.toolbarActions、list.rowActions、detail.primaryActions、detail.secondaryActions、form.footerActions。详情页主操作使用 detail.primaryActions列表记录操作使用 list.rowActions禁止使用 page.actions 等自定义值。', '请根据以下 JSON 上下文生成 flow_config。appBlueprint 是已确认的页面、角色和菜单范围,必须与它保持一致:\n{\"mode\":\"generate\",\"projectName\":\"图书管理系统\",\"projectDescription\":\"功能:借书、还书、预约、取消预约\\n角色用户、管理员\\n其他模块轮播图、公告、新闻\",\"industryTemplate\":\"\",\"stylePreset\":\"dark-tech\",\"extraRequirements\":\"\",\"confirmedAppBlueprint\":{\"adminHomeDashboard\":{\"charts\":[{\"code\":\"chart_borrow_trend\",\"dimension\":{\"field\":\"date\"},\"filters\":[],\"metrics\":[{\"aggregate\":\"count\"}],\"semantic\":\"order\",\"tableName\":\"borrowing_record\"},{\"code\":\"chart_category_distribution\",\"dimension\":{\"field\":\"category\"},\"filters\":[],\"metrics\":[{\"aggregate\":\"count\"}],\"semantic\":\"content\",\"tableName\":\"book_info\"}],\"description\":\"核心业务数据\",\"metrics\":[{\"aggregate\":\"count\",\"code\":\"metric_book_total\",\"filters\":[],\"semantic\":\"content\",\"tableName\":\"book_info\",\"title\":\"图书总量\"},{\"aggregate\":\"count\",\"code\":\"metric_user_total\",\"filters\":[],\"semantic\":\"user\",\"tableName\":\"user\",\"title\":\"用户总量\"},{\"aggregate\":\"count\",\"code\":\"metric_borrow_total\",\"filters\":[],\"semantic\":\"order\",\"tableName\":\"borrowing_record\",\"title\":\"借出总量\"},{\"aggregate\":\"count\",\"code\":\"metric_pending_reservation\",\"filters\":[],\"semantic\":\"task\",\"tableName\":\"reservation\",\"title\":\"待处理预约\"}],\"title\":\"运营总览\"},\"adminMenus\":[{\"code\":\"book_admin\",\"dataScope\":\"ROLE\",\"name\":\"图书管理\",\"pageCode\":\"book_admin_page\",\"pageType\":\"list\",\"path\":\"/admin/books\",\"requiresLogin\":true,\"tableName\":\"book_info\",\"visibleRoles\":[\"admin\"]},{\"code\":\"user_admin\",\"dataScope\":\"ROLE\",\"name\":\"用户管理\",\"pageCode\":\"user_admin_page\",\"pageType\":\"list\",\"path\":\"/admin/users\",\"requiresLogin\":true,\"tableName\":\"user\",\"visibleRoles\":[\"admin\"]},{\"code\":\"borrowing_admin\",\"dataScope\":\"ROLE\",\"name\":\"借阅管理\",\"pageCode\":\"borrowing_admin_page\",\"pageType\":\"list\",\"path\":\"/admin/borrowings\",\"requiresLogin\":true,\"tableName\":\"borrowing_record\",\"visibleRoles\":[\"admin\"]},{\"code\":\"reservation_admin\",\"dataScope\":\"ROLE\",\"name\":\"预约管理\",\"pageCode\":\"reservation_admin_page\",\"pageType\":\"list\",\"path\":\"/admin/reservations\",\"requiresLogin\":true,\"tableName\":\"reservation\",\"visibleRoles\":[\"admin\"]},{\"code\":\"carousel_admin\",\"dataScope\":\"ROLE\",\"name\":\"轮播图管理\",\"pageCode\":\"carousel_admin_page\",\"pageType\":\"list\",\"path\":\"/admin/carousels\",\"requiresLogin\":true,\"tableName\":\"carousel\",\"visibleRoles\":[\"admin\"]},{\"code\":\"announcement_admin\",\"dataScope\":\"ROLE\",\"name\":\"公告管理\",\"pageCode\":\"announcement_admin_page\",\"pageType\":\"list\",\"path\":\"/admin/announcements\",\"requiresLogin\":true,\"tableName\":\"announcement\",\"visibleRoles\":[\"admin\"]},{\"code\":\"news_admin\",\"dataScope\":\"ROLE\",\"name\":\"新闻管理\",\"pageCode\":\"news_admin_page\",\"pageType\":\"list\",\"path\":\"/admin/news\",\"requiresLogin\":true,\"tableName\":\"news\",\"visibleRoles\":[\"admin\"]},{\"code\":\"admin_profile\",\"dataScope\":\"ROLE\",\"name\":\"管理员个人资料\",\"pageCode\":\"admin_profile_page\",\"pageType\":\"form\",\"path\":\"/admin/profile\",\"requiresLogin\":true,\"tableName\":\"admin\",\"visibleRoles\":[\"admin\"]}],\"frontendMenus\":[{\"code\":\"book_catalog\",\"dataScope\":\"PUBLIC\",\"name\":\"图书目录\",\"pageCode\":\"book_catalog_page\",\"pageType\":\"\",\"path\":\"/books\",\"requiresLogin\":false,\"tableName\":\"\",\"visibleRoles\":[]},{\"code\":\"my_borrowings\",\"dataScope\":\"CURRENT_USER\",\"name\":\"我的借阅\",\"pageCode\":\"my_borrowings_page\",\"pageType\":\"\",\"path\":\"/my/borrowings\",\"requiresLogin\":true,\"tableName\":\"\",\"visibleRoles\":[\"user\"]},{\"code\":\"my_reservations\",\"dataScope\":\"CURRENT_USER\",\"name\":\"我的预约\",\"pageCode\":\"my_reservations_page\",\"pageType\":\"\",\"path\":\"/my/reservations\",\"requiresLogin\":true,\"tableName\":\"\",\"visibleRoles\":[\"user\"]},{\"code\":\"user_profile\",\"dataScope\":\"CURRENT_USER\",\"name\":\"个人资料\",\"pageCode\":\"user_profile_page\",\"pageType\":\"\",\"path\":\"/my/profile\",\"requiresLogin\":true,\"tableName\":\"\",\"visibleRoles\":[\"user\"]}],\"frontendPages\":[{\"code\":\"book_catalog_page\",\"menuCode\":\"book_catalog\",\"name\":\"图书目录\",\"pageType\":\"list\",\"parentPageCode\":\"\",\"path\":\"/books\",\"tableName\":\"book_info\"},{\"code\":\"book_detail_page\",\"menuCode\":\"book_catalog\",\"name\":\"图书详情\",\"pageType\":\"detail\",\"parentPageCode\":\"\",\"path\":\"/books/:id\",\"tableName\":\"book_info\"},{\"code\":\"my_borrowings_page\",\"menuCode\":\"my_borrowings\",\"name\":\"我的借阅\",\"pageType\":\"current_user_list\",\"parentPageCode\":\"\",\"path\":\"/my/borrowings\",\"tableName\":\"borrowing_record\"},{\"code\":\"my_reservations_page\",\"menuCode\":\"my_reservations\",\"name\":\"我的预约\",\"pageType\":\"current_user_list\",\"parentPageCode\":\"\",\"path\":\"/my/reservations\",\"tableName\":\"reservation\"},{\"code\":\"user_profile_page\",\"menuCode\":\"user_profile\",\"name\":\"个人资料\",\"pageType\":\"form\",\"parentPageCode\":\"\",\"path\":\"/my/profile\",\"tableName\":\"user\"}],\"roles\":[{\"code\":\"admin\",\"description\":\"系统管理员,管理图书、用户、借阅等所有后台业务\",\"name\":\"管理员\"},{\"code\":\"user\",\"description\":\"普通用户,可借书、还书、预约、取消预约\",\"name\":\"用户\"}]}}', '{\n \"version\": \"1.0\",\n \"code\": \"borrowing_flow\",\n \"name\": \"借阅管理流程\",\n \"mainTable\": \"borrowing_record\",\n \"statusField\": \"status\",\n \"notFoundMessage\": \"借阅记录不存在\",\n \"states\": [\n {\"code\": \"pending\", \"label\": \"待借出\"},\n {\"code\": \"borrowing\", \"label\": \"借阅中\"},\n {\"code\": \"returned\", \"label\": \"已归还\"},\n {\"code\": \"overdue\", \"label\": \"逾期\"}\n ],\n \"actions\": [\n {\n \"code\": \"lend_out\",\n \"name\": \"借出\",\n \"from\": \"pending\",\n \"to\": \"borrowing\",\n \"actor\": \"admin\",\n \"method\": \"POST\",\n \"path\": \"/borrowing-record/lend-out\",\n \"invalidStateMessage\": \"当前状态不能借出\",\n \"successMessage\": \"借出成功\",\n \"audit\": {\"userField\": \"lend_user_id\", \"timeField\": \"lend_time\"},\n \"effects\": [\n {\n \"type\": \"decrease\",\n \"table\": \"book_info\",\n \"relationField\": \"book_id\",\n \"field\": \"stock\",\n \"amount\": \"1\",\n \"min\": \"0\",\n \"notFoundMessage\": \"图书不存在\",\n \"errorMessage\": \"图书库存不足\"\n }\n ],\n \"button\": {\n \"scope\": \"admin\",\n \"pageCode\": \"borrowing_admin_page\",\n \"slot\": \"list.rowActions\",\n \"type\": \"primary\",\n \"confirm\": \"确认借出该图书给用户吗?\",\n \"order\": 10\n }\n },\n {\n \"code\": \"return_book\",\n \"name\": \"归还\",\n \"from\": \"borrowing\",\n \"to\": \"returned\",\n \"actor\": \"admin\",\n \"method\": \"POST\",\n \"path\": \"/borrowing-record/return\",\n \"invalidStateMessage\": \"当前状态不能归还\",\n \"successMessage\": \"归还成功\",\n \"audit\": {\"userField\": \"return_user_id\", \"timeField\": \"return_time\"},\n \"effects\": [\n {\n \"type\": \"increase\",\n \"table\": \"book_info\",\n \"relationField\": \"book_id\",\n \"field\": \"stock\",\n \"amount\": \"1\",\n \"notFoundMessage\": \"图书不存在\"\n }\n ],\n \"button\": {\n \"scope\": \"admin\",\n \"pageCode\": \"borrowing_admin_page\",\n \"slot\": \"list.rowActions\",\n \"type\": \"success\",\n \"confirm\": \"确认归还吗?\",\n \"order\": 20\n }\n },\n {\n \"code\": \"renew\",\n \"name\": \"续借\",\n \"from\": \"borrowing\",\n \"to\": \"borrowing\",\n \"actor\": \"admin\",\n \"method\": \"POST\",\n \"path\": \"/borrowing-record/renew\",\n \"invalidStateMessage\": \"当前状态不能续借\",\n \"successMessage\": \"续借成功\",\n \"audit\": {\"userField\": \"renew_user_id\", \"timeField\": \"renew_time\"},\n \"effects\": [],\n \"button\": {\n \"scope\": \"admin\",\n \"pageCode\": \"my_borrowings_page\",\n \"slot\": \"list.rowActions\",\n \"type\": \"warning\",\n \"confirm\": \"确认续借吗?续借将延长借阅期限。\",\n \"order\": 30\n }\n }\n ],\n \"metrics\": [\n {\"code\": \"borrowing_count\", \"name\": \"借阅中数量\", \"table\": \"borrowing_record\", \"aggregate\": \"count\", \"field\": \"id\", \"status\": \"borrowing\", \"unit\": \"条\"},\n {\"code\": \"overdue_count\", \"name\": \"逾期未还数量\", \"table\": \"borrowing_record\", \"aggregate\": \"count\", \"field\": \"id\", \"status\": \"overdue\", \"unit\": \"条\"}\n ]\n}', '0', 27878, 1942, 512, 1430, 2896, 1998, 1942, 2896, 4838, 1, 0.00723224, '1', NULL, '2026-07-14 21:23:26');
INSERT INTO `front_ai_usage_ledger` VALUES (139, 110, 110, 106, 100, 'flow_config', 'deepseek', 'deepseek-v4-flash', 'front.flow_config', 'V2', '493bfe3aa6bafe555f3fedab46a75c8364c303c2a589b1ffaa01196a93c6472f', '你是业务流程配置设计器。只输出一个合法 JSON 对象,不输出 Markdown、解释或 SQL。\n\n目标用最小 flow_config 描述状态流转、显式 Java 业务动作、多表数量联动、按钮和统计。不要输出 CRUD不要输出通用规则 DSL。\n\n固定结构\n{\n \"version\":\"1.0\",\n \"code\":\"snake_case\",\n \"name\":\"中文业务名\",\n \"mainTable\":\"snake_case\",\n \"statusField\":\"status\",\n \"notFoundMessage\":\"主记录不存在\",\n \"states\":[{\"code\":\"pending\",\"label\":\"待审核\"}],\n \"actions\":[{\n \"code\":\"approve\",\n \"name\":\"审核通过\",\n \"from\":\"pending\",\n \"to\":\"borrowing\",\n \"actor\":\"admin\",\n \"method\":\"POST\",\n \"path\":\"/borrow-record/approve\",\n \"invalidStateMessage\":\"当前状态不能审核\",\n \"successMessage\":\"审核成功\",\n \"audit\":{\"userField\":\"approve_user_id\",\"timeField\":\"approve_time\"},\n \"effects\":[{\n \"type\":\"decrease\",\n \"table\":\"book\",\n \"relationField\":\"book_id\",\n \"field\":\"stock\",\n \"amount\":\"1\",\n \"min\":\"0\",\n \"notFoundMessage\":\"图书不存在\",\n \"errorMessage\":\"图书库存不足\"\n }],\n \"button\":{\"scope\":\"admin\",\"pageCode\":\"borrow_record_list\",\"slot\":\"list.rowActions\",\"type\":\"success\",\"confirm\":\"确认审核通过吗?\",\"order\":10}\n }],\n \"metrics\":[{\"code\":\"borrowing_count\",\"name\":\"借阅中数量\",\"table\":\"borrow_record\",\"aggregate\":\"count\",\"field\":\"id\",\"status\":\"borrowing\",\"unit\":\"条\"}]\n}\n\n约束\n1. code、表名、字段名全部使用小写 snake_case状态 code 使用稳定英文编码label 使用中文。\n2. 每个 action 必须有 from 和 to且二者存在于 states 中并且不相同。\n3. effects.type 只能是 decrease、increase、update_related、create_record。\n4. decrease/increase 必须给 table、relationField、field、amountdecrease 还要给 min。\n5. update_related/create_record 使用 values值可为 currentUserId、now、record.字段名或常量。\n6. 审核人等身份只能通过 audit.userField 表达,由后端登录态注入,不能作为前端可传字段。\n7. 覆盖需求中的完整正向闭环和关键回退/拒绝动作,但不要为普通 CRUD 创建 action。\n8. metrics.status 如果填写,必须完全等于 states 中某个 code统计全状态数据或不能确定状态时省略 status。\n9. button.pageCode 必须引用 appBlueprint 中已有页面button.slot 只能是 list.toolbarActions、list.rowActions、detail.primaryActions、detail.secondaryActions、form.footerActions。详情页主操作使用 detail.primaryActions列表记录操作使用 list.rowActions禁止使用 page.actions 等自定义值。', '请根据以下 JSON 上下文生成 flow_config。appBlueprint 是已确认的页面、角色和菜单范围,必须与它保持一致:\n{\"mode\":\"correction\",\"projectName\":\"图书管理系统\",\"projectDescription\":\"功能:借书、还书、预约、取消预约\\n角色用户、管理员\\n其他模块轮播图、公告、新闻\",\"industryTemplate\":\"\",\"stylePreset\":\"dark-tech\",\"extraRequirements\":\"\",\"confirmedAppBlueprint\":{\"adminHomeDashboard\":{\"charts\":[{\"code\":\"chart_borrow_trend\",\"dimension\":{\"field\":\"date\"},\"filters\":[],\"metrics\":[{\"aggregate\":\"count\"}],\"semantic\":\"order\",\"tableName\":\"borrowing_record\"},{\"code\":\"chart_category_distribution\",\"dimension\":{\"field\":\"category\"},\"filters\":[],\"metrics\":[{\"aggregate\":\"count\"}],\"semantic\":\"content\",\"tableName\":\"book_info\"}],\"description\":\"核心业务数据\",\"metrics\":[{\"aggregate\":\"count\",\"code\":\"metric_book_total\",\"filters\":[],\"semantic\":\"content\",\"tableName\":\"book_info\",\"title\":\"图书总量\"},{\"aggregate\":\"count\",\"code\":\"metric_user_total\",\"filters\":[],\"semantic\":\"user\",\"tableName\":\"user\",\"title\":\"用户总量\"},{\"aggregate\":\"count\",\"code\":\"metric_borrow_total\",\"filters\":[],\"semantic\":\"order\",\"tableName\":\"borrowing_record\",\"title\":\"借出总量\"},{\"aggregate\":\"count\",\"code\":\"metric_pending_reservation\",\"filters\":[],\"semantic\":\"task\",\"tableName\":\"reservation\",\"title\":\"待处理预约\"}],\"title\":\"运营总览\"},\"adminMenus\":[{\"code\":\"book_admin\",\"dataScope\":\"ROLE\",\"name\":\"图书管理\",\"pageCode\":\"book_admin_page\",\"pageType\":\"list\",\"path\":\"/admin/books\",\"requiresLogin\":true,\"tableName\":\"book_info\",\"visibleRoles\":[\"admin\"]},{\"code\":\"user_admin\",\"dataScope\":\"ROLE\",\"name\":\"用户管理\",\"pageCode\":\"user_admin_page\",\"pageType\":\"list\",\"path\":\"/admin/users\",\"requiresLogin\":true,\"tableName\":\"user\",\"visibleRoles\":[\"admin\"]},{\"code\":\"borrowing_admin\",\"dataScope\":\"ROLE\",\"name\":\"借阅管理\",\"pageCode\":\"borrowing_admin_page\",\"pageType\":\"list\",\"path\":\"/admin/borrowings\",\"requiresLogin\":true,\"tableName\":\"borrowing_record\",\"visibleRoles\":[\"admin\"]},{\"code\":\"reservation_admin\",\"dataScope\":\"ROLE\",\"name\":\"预约管理\",\"pageCode\":\"reservation_admin_page\",\"pageType\":\"list\",\"path\":\"/admin/reservations\",\"requiresLogin\":true,\"tableName\":\"reservation\",\"visibleRoles\":[\"admin\"]},{\"code\":\"carousel_admin\",\"dataScope\":\"ROLE\",\"name\":\"轮播图管理\",\"pageCode\":\"carousel_admin_page\",\"pageType\":\"list\",\"path\":\"/admin/carousels\",\"requiresLogin\":true,\"tableName\":\"carousel\",\"visibleRoles\":[\"admin\"]},{\"code\":\"announcement_admin\",\"dataScope\":\"ROLE\",\"name\":\"公告管理\",\"pageCode\":\"announcement_admin_page\",\"pageType\":\"list\",\"path\":\"/admin/announcements\",\"requiresLogin\":true,\"tableName\":\"announcement\",\"visibleRoles\":[\"admin\"]},{\"code\":\"news_admin\",\"dataScope\":\"ROLE\",\"name\":\"新闻管理\",\"pageCode\":\"news_admin_page\",\"pageType\":\"list\",\"path\":\"/admin/news\",\"requiresLogin\":true,\"tableName\":\"news\",\"visibleRoles\":[\"admin\"]},{\"code\":\"admin_profile\",\"dataScope\":\"ROLE\",\"name\":\"管理员个人资料\",\"pageCode\":\"admin_profile_page\",\"pageType\":\"form\",\"path\":\"/admin/profile\",\"requiresLogin\":true,\"tableName\":\"admin\",\"visibleRoles\":[\"admin\"]}],\"frontendMenus\":[{\"code\":\"book_catalog\",\"dataScope\":\"PUBLIC\",\"name\":\"图书目录\",\"pageCode\":\"book_catalog_page\",\"pageType\":\"\",\"path\":\"/books\",\"requiresLogin\":false,\"tableName\":\"\",\"visibleRoles\":[]},{\"code\":\"my_borrowings\",\"dataScope\":\"CURRENT_USER\",\"name\":\"我的借阅\",\"pageCode\":\"my_borrowings_page\",\"pageType\":\"\",\"path\":\"/my/borrowings\",\"requiresLogin\":true,\"tableName\":\"\",\"visibleRoles\":[\"user\"]},{\"code\":\"my_reservations\",\"dataScope\":\"CURRENT_USER\",\"name\":\"我的预约\",\"pageCode\":\"my_reservations_page\",\"pageType\":\"\",\"path\":\"/my/reservations\",\"requiresLogin\":true,\"tableName\":\"\",\"visibleRoles\":[\"user\"]},{\"code\":\"user_profile\",\"dataScope\":\"CURRENT_USER\",\"name\":\"个人资料\",\"pageCode\":\"user_profile_page\",\"pageType\":\"\",\"path\":\"/my/profile\",\"requiresLogin\":true,\"tableName\":\"\",\"visibleRoles\":[\"user\"]}],\"frontendPages\":[{\"code\":\"book_catalog_page\",\"menuCode\":\"book_catalog\",\"name\":\"图书目录\",\"pageType\":\"list\",\"parentPageCode\":\"\",\"path\":\"/books\",\"tableName\":\"book_info\"},{\"code\":\"book_detail_page\",\"menuCode\":\"book_catalog\",\"name\":\"图书详情\",\"pageType\":\"detail\",\"parentPageCode\":\"\",\"path\":\"/books/:id\",\"tableName\":\"book_info\"},{\"code\":\"my_borrowings_page\",\"menuCode\":\"my_borrowings\",\"name\":\"我的借阅\",\"pageType\":\"current_user_list\",\"parentPageCode\":\"\",\"path\":\"/my/borrowings\",\"tableName\":\"borrowing_record\"},{\"code\":\"my_reservations_page\",\"menuCode\":\"my_reservations\",\"name\":\"我的预约\",\"pageType\":\"current_user_list\",\"parentPageCode\":\"\",\"path\":\"/my/reservations\",\"tableName\":\"reservation\"},{\"code\":\"user_profile_page\",\"menuCode\":\"user_profile\",\"name\":\"个人资料\",\"pageType\":\"form\",\"parentPageCode\":\"\",\"path\":\"/my/profile\",\"tableName\":\"user\"}],\"roles\":[{\"code\":\"admin\",\"description\":\"系统管理员,管理图书、用户、借阅等所有后台业务\",\"name\":\"管理员\"},{\"code\":\"user\",\"description\":\"普通用户,可借书、还书、预约、取消预约\",\"name\":\"用户\"}]},\"validationError\":\"动作状态必须发生变化: renew\",\"originalResponse\":{\"version\":\"1.0\",\"code\":\"borrowing_flow\",\"name\":\"借阅管理流程\",\"mainTable\":\"borrowing_record\",\"statusField\":\"status\",\"notFoundMessage\":\"借阅记录不存在\",\"states\":[{\"code\":\"pending\",\"label\":\"待借出\"},{\"code\":\"borrowing\",\"label\":\"借阅中\"},{\"code\":\"returned\",\"label\":\"已归还\"},{\"code\":\"overdue\",\"label\":\"逾期\"}],\"actions\":[{\"code\":\"lend_out\",\"name\":\"借出\",\"from\":\"pending\",\"to\":\"borrowing\",\"actor\":\"admin\",\"method\":\"POST\",\"path\":\"/borrowing-record/lend-out\",\"invalidStateMessage\":\"当前状态不能借出\",\"successMessage\":\"借出成功\",\"audit\":{\"userField\":\"lend_user_id\",\"timeField\":\"lend_time\"},\"effects\":[{\"type\":\"decrease\",\"table\":\"book_info\",\"relationField\":\"book_id\",\"field\":\"stock\",\"amount\":\"1\",\"min\":\"0\",\"notFoundMessage\":\"图书不存在\",\"errorMessage\":\"图书库存不足\"}],\"button\":{\"scope\":\"admin\",\"pageCode\":\"borrowing_admin_page\",\"slot\":\"list.rowActions\",\"type\":\"primary\",\"confirm\":\"确认借出该图书给用户吗?\",\"order\":10}},{\"code\":\"return_book\",\"name\":\"归还\",\"from\":\"borrowing\",\"to\":\"returned\",\"actor\":\"admin\",\"method\":\"POST\",\"path\":\"/borrowing-record/return\",\"invalidStateMessage\":\"当前状态不能归还\",\"successMessage\":\"归还成功\",\"audit\":{\"userField\":\"return_user_id\",\"timeField\":\"return_time\"},\"effects\":[{\"type\":\"increase\",\"table\":\"book_info\",\"relationField\":\"book_id\",\"field\":\"stock\",\"amount\":\"1\",\"notFoundMessage\":\"图书不存在\"}],\"button\":{\"scope\":\"admin\",\"pageCode\":\"borrowing_admin_page\",\"slot\":\"list.rowActions\",\"type\":\"success\",\"confirm\":\"确认归还吗?\",\"order\":20}},{\"code\":\"renew\",\"name\":\"续借\",\"from\":\"borrowing\",\"to\":\"borrowing\",\"actor\":\"admin\",\"method\":\"POST\",\"path\":\"/borrowing-record/renew\",\"invalidStateMessage\":\"当前状态不能续借\",\"successMessage\":\"续借成功\",\"audit\":{\"userField\":\"renew_user_id\",\"timeField\":\"renew_time\"},\"effects\":[],\"button\":{\"scope\":\"admin\",\"pageCode\":\"my_borrowings_page\",\"slot\":\"list.rowActions\",\"type\":\"warning\",\"confirm\":\"确认续借吗?续借将延长借阅期限。\",\"order\":30}}],\"metrics\":[{\"code\":\"borrowing_count\",\"name\":\"借阅中数量\",\"table\":\"borrowing_record\",\"aggregate\":\"count\",\"field\":\"id\",\"status\":\"borrowing\",\"unit\":\"条\"},{\"code\":\"overdue_count\",\"name\":\"逾期未还数量\",\"table\":\"borrowing_record\",\"aggregate\":\"count\",\"field\":\"id\",\"status\":\"overdue\",\"unit\":\"条\"}]}}', '{\n \"version\": \"1.0\",\n \"code\": \"borrowing_flow\",\n \"name\": \"借阅管理流程\",\n \"mainTable\": \"borrowing_record\",\n \"statusField\": \"status\",\n \"notFoundMessage\": \"借阅记录不存在\",\n \"states\": [\n { \"code\": \"pending\", \"label\": \"待借出\" },\n { \"code\": \"borrowing\", \"label\": \"借阅中\" },\n { \"code\": \"returned\", \"label\": \"已归还\" },\n { \"code\": \"overdue\", \"label\": \"逾期\" }\n ],\n \"actions\": [\n {\n \"code\": \"lend_out\",\n \"name\": \"借出\",\n \"from\": \"pending\",\n \"to\": \"borrowing\",\n \"actor\": \"admin\",\n \"method\": \"POST\",\n \"path\": \"/borrowing-record/lend-out\",\n \"invalidStateMessage\": \"当前状态不能借出\",\n \"successMessage\": \"借出成功\",\n \"audit\": { \"userField\": \"lend_user_id\", \"timeField\": \"lend_time\" },\n \"effects\": [\n {\n \"type\": \"decrease\",\n \"table\": \"book_info\",\n \"relationField\": \"book_id\",\n \"field\": \"stock\",\n \"amount\": \"1\",\n \"min\": \"0\",\n \"notFoundMessage\": \"图书不存在\",\n \"errorMessage\": \"图书库存不足\"\n }\n ],\n \"button\": {\n \"scope\": \"admin\",\n \"pageCode\": \"borrowing_admin_page\",\n \"slot\": \"list.rowActions\",\n \"type\": \"primary\",\n \"confirm\": \"确认借出该图书给用户吗?\",\n \"order\": 10\n }\n },\n {\n \"code\": \"return_book\",\n \"name\": \"归还\",\n \"from\": \"borrowing\",\n \"to\": \"returned\",\n \"actor\": \"admin\",\n \"method\": \"POST\",\n \"path\": \"/borrowing-record/return\",\n \"invalidStateMessage\": \"当前状态不能归还\",\n \"successMessage\": \"归还成功\",\n \"audit\": { \"userField\": \"return_user_id\", \"timeField\": \"return_time\" },\n \"effects\": [\n {\n \"type\": \"increase\",\n \"table\": \"book_info\",\n \"relationField\": \"book_id\",\n \"field\": \"stock\",\n \"amount\": \"1\",\n \"notFoundMessage\": \"图书不存在\"\n }\n ],\n \"button\": {\n \"scope\": \"admin\",\n \"pageCode\": \"borrowing_admin_page\",\n \"slot\": \"list.rowActions\",\n \"type\": \"success\",\n \"confirm\": \"确认归还吗?\",\n \"order\": 20\n }\n }\n ],\n \"metrics\": [\n {\n \"code\": \"borrowing_count\",\n \"name\": \"借阅中数量\",\n \"table\": \"borrowing_record\",\n \"aggregate\": \"count\",\n \"field\": \"id\",\n \"status\": \"borrowing\",\n \"unit\": \"条\"\n },\n {\n \"code\": \"overdue_count\",\n \"name\": \"逾期未还数量\",\n \"table\": \"borrowing_record\",\n \"aggregate\": \"count\",\n \"field\": \"id\",\n \"status\": \"overdue\",\n \"unit\": \"条\"\n }\n ]\n}', '0', 31631, 2551, 512, 2039, 3221, 2473, 2551, 3221, 5772, 1, 0.00849124, '1', NULL, '2026-07-14 21:23:57');
INSERT INTO `front_ai_usage_ledger` VALUES (142, 111, 111, 107, 100, 'app_blueprint', 'deepseek', 'deepseek-v4-flash', 'front.app_blueprint', 'V1', 'c3ee0180ed446fe83055bd1c272ed1b6e3978584fe52f98f5e78e14e2cfc8f29', '你是应用蓝图架构师。只输出符合用户消息结构的 JSON规划业务角色、前台菜单与页面、后台菜单和运营看板。保持 pageCode、tableName、角色数据范围和登录要求前后一致只描述静态蓝图不生成数据库、权限表、菜单表或代码。角色名称使用简体中文技术标识使用稳定的小写 snake_case。', '根据项目输入 JSON 生成应用蓝图,只返回 JSON不要 Markdown 围栏或解释。\n输出结构{\"roles\":[{\"code\":\"reader\",\"name\":\"读者\",\"description\":\"\"}],\"frontendMenus\":[{\"code\":\"book_catalog\",\"name\":\"图书目录\",\"path\":\"/books\",\"pageCode\":\"book_catalog_page\",\"requiresLogin\":false,\"visibleRoles\":[],\"dataScope\":\"PUBLIC\"}],\"frontendPages\":[{\"code\":\"book_catalog_page\",\"name\":\"图书目录\",\"menuCode\":\"book_catalog\",\"path\":\"/books\",\"pageType\":\"list\",\"tableName\":\"book_info\"}],\"adminMenus\":[{\"code\":\"book_admin\",\"name\":\"图书管理\",\"path\":\"/admin/books\",\"pageCode\":\"book_admin_page\",\"tableName\":\"book_info\",\"pageType\":\"list\",\"requiresLogin\":true,\"visibleRoles\":[\"admin\"],\"dataScope\":\"ROLE\"}],\"adminHomeDashboard\":{\"title\":\"运营总览\",\"description\":\"核心业务数据\",\"metrics\":[],\"charts\":[]}}。\n蓝图描述目标生成项目而不是当前 EasyCode/RuoYi 平台。不要生成数据库表、菜单表、角色表、权限表或代码。\nrole.name 使用简体中文role.code 使用小写 snake_case。只有 role.code=admin 是系统管理员;名称含“管理员”或“后台”的业务角色仍保持独立。\nrole.name must be Simplified Chinese. Only role.code=admin is the system administrator.\n每个菜单必须包含 requiresLogin、visibleRoles、dataScopedataScope 只能是 PUBLIC、CURRENT_USER 或 ROLE。\nadminMenus 必须包含 pageCode、tableName、pageType个人资料使用 form普通管理使用 list。\nadminMenus must include pageCode, tableName, and pageType.\nfrontendMenus 顶层菜单应指向 pageCode详情页作为子页面不创建顶层详情菜单。\n不要为轮播图、banner、公告滚动条等首页装饰创建顶层菜单可放在首页业务块或作为后台维护数据。\nfrontendPages.pageType 只能是 list、current_user_list、detail、formtableName 必须是页面展示的业务表。\n同一业务对象只使用一个稳定 tableName后续数据库、闭环、页面、看板、动作必须复用不能使用同义表名。\nadminHomeDashboard 尽量包含 4 个业务指标和至少 2 张图表趋势图与分布图所有表字段必须可由后续数据库步骤创建。semantic 只能使用 money、order、user、task、warning、inventory、content、default。\n每个非 admin 角色使用表名等于 role.code 的独立账号表,不得创建共享 user、user_info、member 或 account 表。\nNever invent a shared user, user_info, member, or account table for role accounts.\n需要个人资料页时为每个非 admin 角色创建独立 form 页面和菜单tableName 绑定 role.codepageCode/path 带角色前缀visibleRoles 只包含该角色。\nCreate one form page and one menu per non-admin role when profile pages are needed.\n个人订单、借阅、资料、预约、支付等页面必须 requiresLogin=true 且 dataScope=CURRENT_USER。\n项目输入 JSON\n{\"projectName\":\"图书管理系统\",\"projectDescription\":\"功能:借书、还书、预约、取消预约\\n角色用户、管理员\\n其他模块轮播图、公告、新闻\",\"industryTemplate\":\"\",\"stylePreset\":\"dark-tech\",\"extraRequirements\":\"\"}', '{\"roles\":[{\"code\":\"admin\",\"name\":\"管理员\",\"description\":\"系统管理员,管理图书、借阅、预约及内容维护\"},{\"code\":\"reader\",\"name\":\"读者\",\"description\":\"普通用户,可浏览图书、借阅、预约\"}],\"frontendMenus\":[{\"code\":\"book_catalog\",\"name\":\"图书目录\",\"path\":\"/books\",\"pageCode\":\"book_catalog_page\",\"requiresLogin\":false,\"visibleRoles\":[],\"dataScope\":\"PUBLIC\"},{\"code\":\"reader_profile\",\"name\":\"个人资料\",\"path\":\"/reader/profile\",\"pageCode\":\"reader_profile_page\",\"requiresLogin\":true,\"visibleRoles\":[\"reader\"],\"dataScope\":\"CURRENT_USER\"},{\"code\":\"my_borrows\",\"name\":\"我的借阅\",\"path\":\"/reader/borrows\",\"pageCode\":\"my_borrows_page\",\"requiresLogin\":true,\"visibleRoles\":[\"reader\"],\"dataScope\":\"CURRENT_USER\"},{\"code\":\"my_reservations\",\"name\":\"我的预约\",\"path\":\"/reader/reservations\",\"pageCode\":\"my_reservations_page\",\"requiresLogin\":true,\"visibleRoles\":[\"reader\"],\"dataScope\":\"CURRENT_USER\"}],\"frontendPages\":[{\"code\":\"book_catalog_page\",\"name\":\"图书目录\",\"menuCode\":\"book_catalog\",\"path\":\"/books\",\"pageType\":\"list\",\"tableName\":\"book_info\"},{\"code\":\"reader_profile_page\",\"name\":\"个人资料\",\"menuCode\":\"reader_profile\",\"path\":\"/reader/profile\",\"pageType\":\"form\",\"tableName\":\"reader\"},{\"code\":\"my_borrows_page\",\"name\":\"我的借阅\",\"menuCode\":\"my_borrows\",\"path\":\"/reader/borrows\",\"pageType\":\"current_user_list\",\"tableName\":\"borrow_record\"},{\"code\":\"my_reservations_page\",\"name\":\"我的预约\",\"menuCode\":\"my_reservations\",\"path\":\"/reader/reservations\",\"pageType\":\"current_user_list\",\"tableName\":\"reservation\"}],\"adminMenus\":[{\"code\":\"book_admin\",\"name\":\"图书管理\",\"path\":\"/admin/books\",\"pageCode\":\"book_admin_page\",\"tableName\":\"book_info\",\"pageType\":\"list\",\"requiresLogin\":true,\"visibleRoles\":[\"admin\"],\"dataScope\":\"ROLE\"},{\"code\":\"borrow_admin\",\"name\":\"借阅管理\",\"path\":\"/admin/borrows\",\"pageCode\":\"borrow_admin_page\",\"tableName\":\"borrow_record\",\"pageType\":\"list\",\"requiresLogin\":true,\"visibleRoles\":[\"admin\"],\"dataScope\":\"ROLE\"},{\"code\":\"reservation_admin\",\"name\":\"预约管理\",\"path\":\"/admin/reservations\",\"pageCode\":\"reservation_admin_page\",\"tableName\":\"reservation\",\"pageType\":\"list\",\"requiresLogin\":true,\"visibleRoles\":[\"admin\"],\"dataScope\":\"ROLE\"},{\"code\":\"carousel_admin\",\"name\":\"轮播图管理\",\"path\":\"/admin/carousels\",\"pageCode\":\"carousel_admin_page\",\"tableName\":\"carousel\",\"pageType\":\"list\",\"requiresLogin\":true,\"visibleRoles\":[\"admin\"],\"dataScope\":\"ROLE\"},{\"code\":\"announcement_admin\",\"name\":\"公告管理\",\"path\":\"/admin/announcements\",\"pageCode\":\"announcement_admin_page\",\"tableName\":\"announcement\",\"pageType\":\"list\",\"requiresLogin\":true,\"visibleRoles\":[\"admin\"],\"dataScope\":\"ROLE\"},{\"code\":\"news_admin\",\"name\":\"新闻管理\",\"path\":\"/admin/news\",\"pageCode\":\"news_admin_page\",\"tableName\":\"news\",\"pageType\":\"list\",\"requiresLogin\":true,\"visibleRoles\":[\"admin\"],\"dataScope\":\"ROLE\"}],\"adminHomeDashboard\":{\"title\":\"运营总览\",\"description\":\"核心业务数据\",\"metrics\":[{\"label\":\"总图书数\",\"valueKey\":\"total_books\",\"tableName\":\"book_info\",\"aggregation\":\"COUNT\",\"semantic\":\"content\"},{\"label\":\"总借阅次数\",\"valueKey\":\"total_borrows\",\"tableName\":\"borrow_record\",\"aggregation\":\"COUNT\",\"semantic\":\"order\"},{\"label\":\"总预约次数\",\"valueKey\":\"total_reservations\",\"tableName\":\"reservation\",\"aggregation\":\"COUNT\",\"semantic\":\"task\"},{\"label\":\"活跃读者数\",\"valueKey\":\"active_readers\",\"tableName\":\"reader\",\"aggregation\":\"COUNT\",\"semantic\":\"user\"}],\"charts\":[{\"title\":\"借阅趋势\",\"type\":\"line\",\"dataSource\":{\"tableName\":\"borrow_record\",\"xField\":\"borrow_date\",\"yField\":\"count\",\"aggregation\":\"COUNT\",\"semantic\":\"order\"},\"description\":\"每日借阅数量变化\"},{\"title\":\"预约状态分布\",\"type\":\"pie\",\"dataSource\":{\"tableName\":\"reservation\",\"xField\":\"status\",\"yField\":\"count\",\"aggregation\":\"COUNT\",\"semantic\":\"task\"},\"description\":\"预约各状态占比\"}]}}', '0', 24085, 817, 768, 49, 2763, 1765, 817, 2763, 3580, 1, 0.00559036, '1', NULL, '2026-07-14 22:03:21');
INSERT INTO `front_ai_usage_ledger` VALUES (143, 111, 111, 107, 100, 'flow_config', 'deepseek', 'deepseek-v4-flash', 'front.flow_config', 'V2', '493bfe3aa6bafe555f3fedab46a75c8364c303c2a589b1ffaa01196a93c6472f', '你是业务流程配置设计器。只输出一个合法 JSON 对象,不输出 Markdown、解释或 SQL。\n\n目标用最小 flow_config 描述状态流转、显式 Java 业务动作、多表数量联动、按钮和统计。不要输出 CRUD不要输出通用规则 DSL。\n\n固定结构\n{\n \"version\":\"1.0\",\n \"code\":\"snake_case\",\n \"name\":\"中文业务名\",\n \"mainTable\":\"snake_case\",\n \"statusField\":\"status\",\n \"notFoundMessage\":\"主记录不存在\",\n \"states\":[{\"code\":\"pending\",\"label\":\"待审核\"}],\n \"actions\":[{\n \"code\":\"approve\",\n \"name\":\"审核通过\",\n \"from\":\"pending\",\n \"to\":\"borrowing\",\n \"actor\":\"admin\",\n \"method\":\"POST\",\n \"path\":\"/borrow-record/approve\",\n \"invalidStateMessage\":\"当前状态不能审核\",\n \"successMessage\":\"审核成功\",\n \"audit\":{\"userField\":\"approve_user_id\",\"timeField\":\"approve_time\"},\n \"effects\":[{\n \"type\":\"decrease\",\n \"table\":\"book\",\n \"relationField\":\"book_id\",\n \"field\":\"stock\",\n \"amount\":\"1\",\n \"min\":\"0\",\n \"notFoundMessage\":\"图书不存在\",\n \"errorMessage\":\"图书库存不足\"\n }],\n \"button\":{\"scope\":\"admin\",\"pageCode\":\"borrow_record_list\",\"slot\":\"list.rowActions\",\"type\":\"success\",\"confirm\":\"确认审核通过吗?\",\"order\":10}\n }],\n \"metrics\":[{\"code\":\"borrowing_count\",\"name\":\"借阅中数量\",\"table\":\"borrow_record\",\"aggregate\":\"count\",\"field\":\"id\",\"status\":\"borrowing\",\"unit\":\"条\"}]\n}\n\n约束\n1. code、表名、字段名全部使用小写 snake_case状态 code 使用稳定英文编码label 使用中文。\n2. 每个 action 必须有 from 和 to且二者存在于 states 中并且不相同。\n3. effects.type 只能是 decrease、increase、update_related、create_record。\n4. decrease/increase 必须给 table、relationField、field、amountdecrease 还要给 min。\n5. update_related/create_record 使用 values值可为 currentUserId、now、record.字段名或常量。\n6. 审核人等身份只能通过 audit.userField 表达,由后端登录态注入,不能作为前端可传字段。\n7. 覆盖需求中的完整正向闭环和关键回退/拒绝动作,但不要为普通 CRUD 创建 action。\n8. metrics.status 如果填写,必须完全等于 states 中某个 code统计全状态数据或不能确定状态时省略 status。\n9. button.pageCode 必须引用 appBlueprint 中已有页面button.slot 只能是 list.toolbarActions、list.rowActions、detail.primaryActions、detail.secondaryActions、form.footerActions。详情页主操作使用 detail.primaryActions列表记录操作使用 list.rowActions禁止使用 page.actions 等自定义值。', '请根据以下 JSON 上下文生成 flow_config。appBlueprint 是已确认的页面、角色和菜单范围,必须与它保持一致:\n{\"mode\":\"generate\",\"projectName\":\"图书管理系统\",\"projectDescription\":\"功能:借书、还书、预约、取消预约\\n角色用户、管理员\\n其他模块轮播图、公告、新闻\",\"industryTemplate\":\"\",\"stylePreset\":\"dark-tech\",\"extraRequirements\":\"\",\"confirmedAppBlueprint\":{\"adminHomeDashboard\":{\"charts\":[{\"filters\":[],\"metrics\":[{\"aggregate\":\"count\",\"label\":\"借阅趋势\"}],\"title\":\"借阅趋势\",\"type\":\"line\"},{\"filters\":[],\"metrics\":[{\"aggregate\":\"count\",\"label\":\"预约状态分布\"}],\"title\":\"预约状态分布\",\"type\":\"pie\"}],\"description\":\"核心业务数据\",\"metrics\":[{\"aggregate\":\"count\",\"code\":\"total_books\",\"filters\":[],\"semantic\":\"content\",\"tableName\":\"book_info\"},{\"aggregate\":\"count\",\"code\":\"total_borrows\",\"filters\":[],\"semantic\":\"order\",\"tableName\":\"borrow_record\"},{\"aggregate\":\"count\",\"code\":\"total_reservations\",\"filters\":[],\"semantic\":\"task\",\"tableName\":\"reservation\"},{\"aggregate\":\"count\",\"code\":\"active_readers\",\"filters\":[],\"semantic\":\"user\",\"tableName\":\"reader\"}],\"title\":\"运营总览\"},\"adminMenus\":[{\"code\":\"book_admin\",\"dataScope\":\"ROLE\",\"name\":\"图书管理\",\"pageCode\":\"book_admin_page\",\"pageType\":\"list\",\"path\":\"/admin/books\",\"requiresLogin\":true,\"tableName\":\"book_info\",\"visibleRoles\":[\"admin\"]},{\"code\":\"borrow_admin\",\"dataScope\":\"ROLE\",\"name\":\"借阅管理\",\"pageCode\":\"borrow_admin_page\",\"pageType\":\"list\",\"path\":\"/admin/borrows\",\"requiresLogin\":true,\"tableName\":\"borrow_record\",\"visibleRoles\":[\"admin\"]},{\"code\":\"reservation_admin\",\"dataScope\":\"ROLE\",\"name\":\"预约管理\",\"pageCode\":\"reservation_admin_page\",\"pageType\":\"list\",\"path\":\"/admin/reservations\",\"requiresLogin\":true,\"tableName\":\"reservation\",\"visibleRoles\":[\"admin\"]},{\"code\":\"carousel_admin\",\"dataScope\":\"ROLE\",\"name\":\"轮播图管理\",\"pageCode\":\"carousel_admin_page\",\"pageType\":\"list\",\"path\":\"/admin/carousels\",\"requiresLogin\":true,\"tableName\":\"carousel\",\"visibleRoles\":[\"admin\"]},{\"code\":\"announcement_admin\",\"dataScope\":\"ROLE\",\"name\":\"公告管理\",\"pageCode\":\"announcement_admin_page\",\"pageType\":\"list\",\"path\":\"/admin/announcements\",\"requiresLogin\":true,\"tableName\":\"announcement\",\"visibleRoles\":[\"admin\"]},{\"code\":\"news_admin\",\"dataScope\":\"ROLE\",\"name\":\"新闻管理\",\"pageCode\":\"news_admin_page\",\"pageType\":\"list\",\"path\":\"/admin/news\",\"requiresLogin\":true,\"tableName\":\"news\",\"visibleRoles\":[\"admin\"]}],\"frontendMenus\":[{\"code\":\"book_catalog\",\"dataScope\":\"PUBLIC\",\"name\":\"图书目录\",\"pageCode\":\"book_catalog_page\",\"pageType\":\"\",\"path\":\"/books\",\"requiresLogin\":false,\"tableName\":\"\",\"visibleRoles\":[]},{\"code\":\"reader_profile\",\"dataScope\":\"CURRENT_USER\",\"name\":\"个人资料\",\"pageCode\":\"reader_profile_page\",\"pageType\":\"\",\"path\":\"/reader/profile\",\"requiresLogin\":true,\"tableName\":\"\",\"visibleRoles\":[\"reader\"]},{\"code\":\"my_borrows\",\"dataScope\":\"CURRENT_USER\",\"name\":\"我的借阅\",\"pageCode\":\"my_borrows_page\",\"pageType\":\"\",\"path\":\"/reader/borrows\",\"requiresLogin\":true,\"tableName\":\"\",\"visibleRoles\":[\"reader\"]},{\"code\":\"my_reservations\",\"dataScope\":\"CURRENT_USER\",\"name\":\"我的预约\",\"pageCode\":\"my_reservations_page\",\"pageType\":\"\",\"path\":\"/reader/reservations\",\"requiresLogin\":true,\"tableName\":\"\",\"visibleRoles\":[\"reader\"]}],\"frontendPages\":[{\"code\":\"book_catalog_page\",\"menuCode\":\"book_catalog\",\"name\":\"图书目录\",\"pageType\":\"list\",\"parentPageCode\":\"\",\"path\":\"/books\",\"tableName\":\"book_info\"},{\"code\":\"reader_profile_page\",\"menuCode\":\"reader_profile\",\"name\":\"个人资料\",\"pageType\":\"form\",\"parentPageCode\":\"\",\"path\":\"/reader/profile\",\"tableName\":\"reader\"},{\"code\":\"my_borrows_page\",\"menuCode\":\"my_borrows\",\"name\":\"我的借阅\",\"pageType\":\"current_user_list\",\"parentPageCode\":\"\",\"path\":\"/reader/borrows\",\"tableName\":\"borrow_record\"},{\"code\":\"my_reservations_page\",\"menuCode\":\"my_reservations\",\"name\":\"我的预约\",\"pageType\":\"current_user_list\",\"parentPageCode\":\"\",\"path\":\"/reader/reservations\",\"tableName\":\"reservation\"}],\"roles\":[{\"code\":\"admin\",\"description\":\"系统管理员,管理图书、借阅、预约及内容维护\",\"name\":\"管理员\"},{\"code\":\"reader\",\"description\":\"普通用户,可浏览图书、借阅、预约\",\"name\":\"读者\"}]}}', '{\n \"version\": \"1.0\",\n \"code\": \"borrow_flow\",\n \"name\": \"借阅流程\",\n \"mainTable\": \"borrow_record\",\n \"statusField\": \"status\",\n \"notFoundMessage\": \"借阅记录不存在\",\n \"states\": [\n {\"code\": \"pending\", \"label\": \"待审核\"},\n {\"code\": \"borrowing\", \"label\": \"借阅中\"},\n {\"code\": \"returned\", \"label\": \"已归还\"},\n {\"code\": \"rejected\", \"label\": \"已拒绝\"}\n ],\n \"actions\": [\n {\n \"code\": \"approve\",\n \"name\": \"审核通过\",\n \"from\": \"pending\",\n \"to\": \"borrowing\",\n \"actor\": \"admin\",\n \"method\": \"POST\",\n \"path\": \"/borrow-record/approve\",\n \"invalidStateMessage\": \"当前状态不能审核\",\n \"successMessage\": \"审核成功\",\n \"audit\": {\"userField\": \"approve_user_id\", \"timeField\": \"approve_time\"},\n \"effects\": [\n {\n \"type\": \"decrease\",\n \"table\": \"book_info\",\n \"relationField\": \"book_id\",\n \"field\": \"stock\",\n \"amount\": \"1\",\n \"min\": \"0\",\n \"notFoundMessage\": \"图书不存在\",\n \"errorMessage\": \"图书库存不足\"\n }\n ],\n \"button\": {\n \"scope\": \"admin\",\n \"pageCode\": \"borrow_admin_page\",\n \"slot\": \"list.rowActions\",\n \"type\": \"success\",\n \"confirm\": \"确认审核通过?\",\n \"order\": 10\n }\n },\n {\n \"code\": \"reject\",\n \"name\": \"审核拒绝\",\n \"from\": \"pending\",\n \"to\": \"rejected\",\n \"actor\": \"admin\",\n \"method\": \"POST\",\n \"path\": \"/borrow-record/reject\",\n \"invalidStateMessage\": \"当前状态不能拒绝\",\n \"successMessage\": \"已拒绝\",\n \"audit\": {\"userField\": \"reject_user_id\", \"timeField\": \"reject_time\"},\n \"effects\": [],\n \"button\": {\n \"scope\": \"admin\",\n \"pageCode\": \"borrow_admin_page\",\n \"slot\": \"list.rowActions\",\n \"type\": \"danger\",\n \"confirm\": \"确认拒绝?\",\n \"order\": 20\n }\n },\n {\n \"code\": \"return\",\n \"name\": \"确认还书\",\n \"from\": \"borrowing\",\n \"to\": \"returned\",\n \"actor\": \"admin\",\n \"method\": \"POST\",\n \"path\": \"/borrow-record/return\",\n \"invalidStateMessage\": \"当前状态不能还书\",\n \"successMessage\": \"还书成功\",\n \"audit\": {\"userField\": \"return_user_id\", \"timeField\": \"return_time\"},\n \"effects\": [\n {\n \"type\": \"increase\",\n \"table\": \"book_info\",\n \"relationField\": \"book_id\",\n \"field\": \"stock\",\n \"amount\": \"1\",\n \"notFoundMessage\": \"图书不存在\"\n }\n ],\n \"button\": {\n \"scope\": \"admin\",\n \"pageCode\": \"borrow_admin_page\",\n \"slot\": \"list.rowActions\",\n \"type\": \"primary\",\n \"confirm\": \"确认还书?\",\n \"order\": 30\n }\n }\n ],\n \"metrics\": [\n {\n \"code\": \"borrowing_count\",\n \"name\": \"借阅中数量\",\n \"table\": \"borrow_record\",\n \"aggregate\": \"count\",\n \"field\": \"id\",\n \"status\": \"borrowing\",\n \"unit\": \"条\"\n },\n {\n \"code\": \"total_borrowed\",\n \"name\": \"总借阅次数\",\n \"table\": \"borrow_record\",\n \"aggregate\": \"count\",\n \"field\": \"id\",\n \"unit\": \"次\"\n },\n {\n \"code\": \"reserved_count\",\n \"name\": \"预约中数量\",\n \"table\": \"reservation\",\n \"aggregate\": \"count\",\n \"field\": \"id\",\n \"status\": \"reserved\",\n \"unit\": \"条\"\n }\n ]\n}', '0', 44798, 1739, 640, 1099, 5149, 4199, 1739, 5149, 6888, 2, 0.01140980, '1', NULL, '2026-07-14 22:04:06');
INSERT INTO `front_ai_usage_ledger` VALUES (144, 111, 111, 107, 100, 'database', 'deepseek', 'deepseek-v4-flash', 'front.database', 'V2', 'c7d0a32ce0b0055ac80348fb10c1beb758034b9c5b5637694725425bb7937cbc', '你是 MySQL 业务数据库设计专家。只输出符合用户消息结构的 JSON根据已确认的应用蓝图和业务闭环生成可直接落地的表、字段、主外键、字典和表操作策略。字段必须业务化且类型合法所有蓝图与闭环引用必须有真实表字段承载不得生成菜单、权限关系、代码或业务动作。flowConfig.actions[].audit 中非空的 userField 和 timeField 必须是 mainTable 的真实字段userField 使用 bigint(20)timeField 使用 datetime。', '根据项目输入 JSON 生成 MySQL 数据库设计 JSON只返回 JSON不要 Markdown 围栏或解释。\nConfirmed app blueprint JSON and Confirmed business loop plan JSON are supplied in the input.\nDatabase generation constraints from the business loop plan must be enforced.\nEvery confirmedBusinessLoopPlan.metrics tableName, field, and filters.field must exist in the generated schema. Numeric sum/avg/min/max metric fields must use a compatible numeric column type. Status-filter metric values must remain compatible with the matching stateMachines.states.\nIf input.mode is correction, repair input.originalResponse according to input.validationError and return the complete corrected database JSON. Do not drop unrelated valid tables or fields.\n输出结构{\"tables\":[{\"tableName\":\"car_info\",\"tableComment\":\"车辆信息表\",\"adminMenuName\":\"车辆管理\",\"operations\":{\"add\":true,\"edit\":true,\"remove\":true,\"removeType\":\"physical\",\"reason\":\"\"},\"columns\":[{\"columnName\":\"id\",\"columnLabel\":\"ID\",\"columnComment\":\"主键ID\",\"columnType\":\"bigint(20)\",\"isPk\":\"1\",\"isIncrement\":\"1\",\"isRequired\":\"1\"}]}]}。\n不要使用 field_1 等占位字段;每个表必须包含非空 columns以及 adminMenuName 和 operations.add/edit/remove/removeType/reason。\nadminMenuName 必须来自本表 tableComment/tableName不得复用其他表或宽泛模块名称。\nadminMenuName must come from that table\'s own tableComment or tableName.\n字段数组名称只能是 columns不能使用 fields、fieldDesign、fieldList、columnList。\nEvery table must include a non-empty columns array; use columns exactly.\n每个字段必须包含 columnName、columnLabel、columnComment、columnType、isPk、isIncrement、isRequired。columnLabel 是短 UI 标签columnComment 是完整数据库说明。\n可提供 javaType、htmlTypehtmlType 只能是 input、textarea、select、radio、checkbox、datetime、imageUpload、fileUpload、editor。\nselect/radio/checkbox 应提供 dictType 和 dictOptions。关联选择使用 remote:target_table:value_field:label_field且目标表和值/标签字段必须都存在于本次 tables JSON。\n非主键外键字段应在目标表存在时使用 remote select无目标表的分类、类型、状态使用本地 dictOptions 或普通输入。\n普通主数据表除唯一主键外至少包含 4 个业务字段。\n订单、支付、借还、审批、流程、任务、库存记录等动作记录表使用仅新增关系、审计、日志、历史表使用只读普通主数据表使用完整 CRUD。\n不要生成 businessActions、业务动作、工作流、代码、菜单表、user_role、角色权限表或权限表。\nDo not generate menu tables, user_role tables, role-permission tables, or permission tables.\n表名字段名只使用小写字母、数字、下划线每表必须且只能有一个主键。字段类型只能使用 bigint(20)、int(11)、varchar(n)、char(n)、decimal(p,s)、datetime、date、text、longtext。\n为 confirmedAppBlueprint.roles 中每个角色创建独立账号表admin 使用 admin其他角色使用 role.code。不得使用共享用户表或 role_id/role_code/user_role。\n角色账号表包含 `<role_code>_id` 自增主键、username、password_hash、nickname、status、create_time。admin 只能登录后台,非 admin 角色登录前台。\n生成 frontendPages.tableName 引用的全部表;个人资料页必须绑定对应非 admin 角色账号表。requiresLogin=true 且 dataScope=CURRENT_USER 的业务数据通常包含 user_id。\ncanonicalTableRegistry 中的名称是最终规范表名。confirmedBusinessLoopPlan 若出现与其指向同一业务对象的同义表名,必须使用 canonicalTableRegistry 中的名称,不得同时生成两张同义表。\n根据 confirmedBusinessLoopPlan 创建 coreObjects.tableName、actions.ownerTable补齐 stateMachines.statusField、quantityRules.quantityField 以及 recordRules 和动作前置条件需要的字段。状态值不得超出 stateMachines.states。\n严格实现 confirmedBusinessLoopPlan.businessPoliciesTIME_LIMIT 的 startField、dueField 使用 datetimeOVERDUE_FEE 的 dueField 使用 datetime、daysTargetField 使用 int(11)、targetField 使用 decimal(10,2)QUANTITY_LIMIT 的 targetField 使用 int(11) 且默认值为 0。所有政策字段必须位于政策指定的 tableName禁止只把期限或公式写进 columnComment 而不创建字段。\nDo not invent status values outside stateMachines.states.\n严格遵守 input.limits.maxTables 和 maxColumnsPerTable。\n项目输入 JSON\n{\"mode\":\"generate\",\"projectName\":\"图书管理系统\",\"projectDescription\":\"功能:借书、还书、预约、取消预约\\n角色用户、管理员\\n其他模块轮播图、公告、新闻\",\"industryTemplate\":\"\",\"stylePreset\":\"dark-tech\",\"extraRequirements\":\"\",\"confirmedAppBlueprint\":{\"adminHomeDashboard\":{\"charts\":[{\"filters\":[],\"metrics\":[{\"aggregate\":\"count\",\"label\":\"借阅趋势\"}],\"title\":\"借阅趋势\",\"type\":\"line\"},{\"filters\":[],\"metrics\":[{\"aggregate\":\"count\",\"label\":\"预约状态分布\"}],\"title\":\"预约状态分布\",\"type\":\"pie\"}],\"description\":\"核心业务数据\",\"metrics\":[{\"aggregate\":\"count\",\"code\":\"total_books\",\"filters\":[],\"semantic\":\"content\",\"tableName\":\"book_info\"},{\"aggregate\":\"count\",\"code\":\"total_borrows\",\"filters\":[],\"semantic\":\"order\",\"tableName\":\"borrow_record\"},{\"aggregate\":\"count\",\"code\":\"total_reservations\",\"filters\":[],\"semantic\":\"task\",\"tableName\":\"reservation\"},{\"aggregate\":\"count\",\"code\":\"active_readers\",\"filters\":[],\"semantic\":\"user\",\"tableName\":\"reader\"}],\"title\":\"运营总览\"},\"adminMenus\":[{\"code\":\"book_admin\",\"dataScope\":\"ROLE\",\"name\":\"图书管理\",\"pageCode\":\"book_admin_page\",\"pageType\":\"list\",\"path\":\"/admin/books\",\"requiresLogin\":true,\"tableName\":\"book_info\",\"visibleRoles\":[\"admin\"]},{\"code\":\"borrow_admin\",\"dataScope\":\"ROLE\",\"name\":\"借阅管理\",\"pageCode\":\"borrow_admin_page\",\"pageType\":\"list\",\"path\":\"/admin/borrows\",\"requiresLogin\":true,\"tableName\":\"borrow_record\",\"visibleRoles\":[\"admin\"]},{\"code\":\"reservation_admin\",\"dataScope\":\"ROLE\",\"name\":\"预约管理\",\"pageCode\":\"reservation_admin_page\",\"pageType\":\"list\",\"path\":\"/admin/reservations\",\"requiresLogin\":true,\"tableName\":\"reservation\",\"visibleRoles\":[\"admin\"]},{\"code\":\"carousel_admin\",\"dataScope\":\"ROLE\",\"name\":\"轮播图管理\",\"pageCode\":\"carousel_admin_page\",\"pageType\":\"list\",\"path\":\"/admin/carousels\",\"requiresLogin\":true,\"tableName\":\"carousel\",\"visibleRoles\":[\"admin\"]},{\"code\":\"announcement_admin\",\"dataScope\":\"ROLE\",\"name\":\"公告管理\",\"pageCode\":\"announcement_admin_page\",\"pageType\":\"list\",\"path\":\"/admin/announcements\",\"requiresLogin\":true,\"tableName\":\"announcement\",\"visibleRoles\":[\"admin\"]},{\"code\":\"news_admin\",\"dataScope\":\"ROLE\",\"name\":\"新闻管理\",\"pageCode\":\"news_admin_page\",\"pageType\":\"list\",\"path\":\"/admin/news\",\"requiresLogin\":true,\"tableName\":\"news\",\"visibleRoles\":[\"admin\"]}],\"frontendMenus\":[{\"code\":\"book_catalog\",\"dataScope\":\"PUBLIC\",\"name\":\"图书目录\",\"pageCode\":\"book_catalog_page\",\"pageType\":\"\",\"path\":\"/books\",\"requiresLogin\":false,\"tableName\":\"\",\"visibleRoles\":[]},{\"code\":\"reader_profile\",\"dataScope\":\"CURRENT_USER\",\"name\":\"个人资料\",\"pageCode\":\"reader_profile_page\",\"pageType\":\"\",\"path\":\"/reader/profile\",\"requiresLogin\":true,\"tableName\":\"\",\"visibleRoles\":[\"reader\"]},{\"code\":\"my_borrows\",\"dataScope\":\"CURRENT_USER\",\"name\":\"我的借阅\",\"pageCode\":\"my_borrows_page\",\"pageType\":\"\",\"path\":\"/reader/borrows\",\"requiresLogin\":true,\"tableName\":\"\",\"visibleRoles\":[\"reader\"]},{\"code\":\"my_reservations\",\"dataScope\":\"CURRENT_USER\",\"name\":\"我的预约\",\"pageCode\":\"my_reservations_page\",\"pageType\":\"\",\"path\":\"/reader/reservations\",\"requiresLogin\":true,\"tableName\":\"\",\"visibleRoles\":[\"reader\"]}],\"frontendPages\":[{\"code\":\"book_catalog_page\",\"menuCode\":\"book_catalog\",\"name\":\"图书目录\",\"pageType\":\"list\",\"parentPageCode\":\"\",\"path\":\"/books\",\"tableName\":\"book_info\"},{\"code\":\"reader_profile_page\",\"menuCode\":\"reader_profile\",\"name\":\"个人资料\",\"pageType\":\"form\",\"parentPageCode\":\"\",\"path\":\"/reader/profile\",\"tableName\":\"reader\"},{\"code\":\"my_borrows_page\",\"menuCode\":\"my_borrows\",\"name\":\"我的借阅\",\"pageType\":\"current_user_list\",\"parentPageCode\":\"\",\"path\":\"/reader/borrows\",\"tableName\":\"borrow_record\"},{\"code\":\"my_reservations_page\",\"menuCode\":\"my_reservations\",\"name\":\"我的预约\",\"pageType\":\"current_user_list\",\"parentPageCode\":\"\",\"path\":\"/reader/reservations\",\"tableName\":\"reservation\"}],\"roles\":[{\"code\":\"admin\",\"description\":\"系统管理员,管理图书、借阅、预约及内容维护\",\"name\":\"管理员\"},{\"code\":\"reader\",\"description\":\"普通用户,可浏览图书、借阅、预约\",\"name\":\"读者\"}]},\"flowConfig\":{\"actions\":[{\"actor\":\"admin\",\"audit\":{\"timeField\":\"approve_time\",\"userField\":\"approve_user_id\"},\"button\":{\"confirm\":\"确认审核通过?\",\"order\":10,\"pageCode\":\"borrow_admin_page\",\"scope\":\"admin\",\"slot\":\"list.rowActions\",\"type\":\"success\"},\"code\":\"approve\",\"effects\":[{\"amount\":\"1\",\"errorMessage\":\"图书库存不足\",\"field\":\"stock\",\"min\":\"0\",\"notFoundMessage\":\"图书不存在\",\"relationField\":\"book_id\",\"table\":\"book_info\",\"type\":\"decrease\",\"values\":{}}],\"from\":\"pending\",\"invalidStateMessage\":\"当前状态不能审核\",\"method\":\"POST\",\"name\":\"审核通过\",\"path\":\"/borrow-record/approve\",\"successMessage\":\"审核成功\",\"to\":\"borrowing\"},{\"actor\":\"admin\",\"audit\":{\"timeField\":\"reject_time\",\"userField\":\"reject_user_id\"},\"button\":{\"confirm\":\"确认拒绝?\",\"order\":20,\"pageCode\":\"borrow_admin_page\",\"scope\":\"admin\",\"slot\":\"list.rowActions\",\"type\":\"danger\"},\"code\":\"reject\",\"effects\":[],\"from\":\"pending\",\"invalidStateMessage\":\"当前状态不能拒绝\",\"method\":\"POST\",\"name\":\"审核拒绝\",\"path\":\"/borrow-record/reject\",\"successMessage\":\"已拒绝\",\"to\":\"rejected\"},{\"actor\":\"admin\",\"audit\":{\"timeField\":\"return_time\",\"userField\":\"return_user_id\"},\"button\":{\"confirm\":\"确认还书?\",\"order\":30,\"pageCode\":\"borrow_admin_page\",\"scope\":\"admin\",\"slot\":\"list.rowActions\",\"type\":\"primary\"},\"code\":\"return\",\"effects\":[{\"amount\":\"1\",\"field\":\"stock\",\"min\":\"0\",\"notFoundMessage\":\"图书不存在\",\"relationField\":\"book_id\",\"table\":\"book_info\",\"type\":\"increase\",\"values\":{}}],\"from\":\"borrowing\",\"invalidStateMessage\":\"当前状态不能还书\",\"method\":\"POST\",\"name\":\"确认还书\",\"path\":\"/borrow-record/return\",\"successMessage\":\"还书成功\",\"to\":\"returned\"}],\"code\":\"borrow_flow\",\"mainTable\":\"borrow_record\",\"metrics\":[{\"aggregate\":\"count\",\"code\":\"borrowing_count\",\"field\":\"id\",\"name\":\"借阅中数量\",\"status\":\"borrowing\",\"table\":\"borrow_record\",\"unit\":\"条\"},{\"aggregate\":\"count\",\"code\":\"total_borrowed\",\"field\":\"id\",\"name\":\"总借阅次数\",\"table\":\"borrow_record\",\"unit\":\"次\"},{\"aggregate\":\"count\",\"code\":\"reserved_count\",\"field\":\"id\",\"name\":\"预约中数量\",\"table\":\"reservation\",\"unit\":\"条\"}],\"name\":\"借阅流程\",\"notFoundMessage\":\"借阅记录不存在\",\"states\":[{\"code\":\"pending\",\"label\":\"待审核\"},{\"code\":\"borrowing\",\"label\":\"借阅中\"},{\"code\":\"returned\",\"label\":\"已归还\"},{\"code\":\"rejected\",\"label\":\"已拒绝\"}],\"statusField\":\"status\",\"version\":\"1.0\"},\"compiledFlowContract\":{\"acceptanceScenarios\":[],\"actions\":[{\"actor\":\"admin\",\"code\":\"approve\",\"name\":\"审核通过\",\"ownerObject\":\"borrow_record\",\"ownerTable\":\"borrow_record\",\"preconditions\":[],\"quantityEffects\":[{\"actionCode\":\"approve\",\"amount\":\"1\",\"effectType\":\"decrease\",\"objectCode\":\"book_info\",\"quantityField\":\"stock\",\"tableName\":\"book_info\"}],\"recordEffects\":[],\"required\":true,\"stateTransitions\":[{\"actionCode\":\"approve\",\"fromState\":\"pending\",\"toState\":\"borrowing\"}]},{\"actor\":\"admin\",\"code\":\"reject\",\"name\":\"审核拒绝\",\"ownerObject\":\"borrow_record\",\"ownerTable\":\"borrow_record\",\"preconditions\":[],\"quantityEffects\":[],\"recordEffects\":[],\"required\":true,\"stateTransitions\":[{\"actionCode\":\"reject\",\"fromState\":\"pending\",\"toState\":\"rejected\"}]},{\"actor\":\"admin\",\"code\":\"return\",\"name\":\"确认还书\",\"ownerObject\":\"borrow_record\",\"ownerTable\":\"borrow_record\",\"preconditions\":[],\"quantityEffects\":[{\"actionCode\":\"return\",\"amount\":\"1\",\"effectType\":\"increase\",\"objectCode\":\"book_info\",\"quantityField\":\"stock\",\"tableName\":\"book_info\"}],\"recordEffects\":[],\"required\":true,\"stateTransitions\":[{\"actionCode\":\"return\",\"fromState\":\"borrowing\",\"toState\":\"returned\"}]}],\"businessPolicies\":[],\"coreObjects\":[{\"code\":\"borrow_record\",\"name\":\"借阅流程\",\"objectType\":\"main\",\"tableName\":\"borrow_record\"},{\"code\":\"book_info\",\"name\":\"book_info\",\"objectType\":\"related\",\"tableName\":\"book_info\"}],\"domainName\":\"借阅流程\",\"metrics\":[{\"aggregate\":\"count\",\"code\":\"borrowing_count\",\"field\":\"id\",\"filters\":[{\"field\":\"status\",\"operator\":\"eq\",\"values\":[\"borrowing\"]}],\"name\":\"借阅中数量\",\"relatedActionCodes\":[],\"required\":true,\"tableName\":\"borrow_record\",\"unit\":\"条\"},{\"aggregate\":\"count\",\"code\":\"total_borrowed\",\"field\":\"id\",\"filters\":[],\"name\":\"总借阅次数\",\"relatedActionCodes\":[],\"required\":true,\"tableName\":\"borrow_record\",\"unit\":\"次\"},{\"aggregate\":\"count\",\"code\":\"reserved_count\",\"field\":\"id\",\"filters\":[],\"name\":\"预约中数量\",\"relatedActionCodes\":[],\"required\":true,\"tableName\":\"reservation\",\"unit\":\"条\"}],\"pageBindings\":[{\"actionCode\":\"approve\",\"pageCode\":\"borrow_admin_page\",\"slot\":\"list.rowActions\",\"tableName\":\"borrow_record\",\"target\":\"admin\"},{\"actionCode\":\"reject\",\"pageCode\":\"borrow_admin_page\",\"slot\":\"list.rowActions\",\"tableName\":\"borrow_record\",\"target\":\"admin\"},{\"actionCode\":\"return\",\"pageCode\":\"borrow_admin_page\",\"slot\":\"list.rowActions\",\"tableName\":\"borrow_record\",\"target\":\"admin\"}],\"quantityRules\":[{\"actionCode\":\"approve\",\"amount\":\"1\",\"effectType\":\"decrease\",\"objectCode\":\"book_info\",\"quantityField\":\"stock\",\"tableName\":\"book_info\"},{\"actionCode\":\"return\",\"amount\":\"1\",\"effectType\":\"increase\",\"objectCode\":\"book_info\",\"quantityField\":\"stock\",\"tableName\":\"book_info\"}],\"recordRules\":[],\"stateMachines\":[{\"objectCode\":\"borrow_record\",\"states\":[\"pending\",\"borrowing\",\"returned\",\"rejected\"],\"statusField\":\"status\",\"tableName\":\"borrow_record\",\"transitions\":[{\"actionCode\":\"approve\",\"fromState\":\"pending\",\"toState\":\"borrowing\"},{\"actionCode\":\"reject\",\"fromState\":\"pending\",\"toState\":\"rejected\"},{\"actionCode\":\"return\",\"fromState\":\"borrowing\",\"toState\":\"returned\"}]}]},\"canonicalTableRegistry\":[\"book_info\",\"reader\",\"borrow_record\",\"reservation\",\"carousel\",\"announcement\",\"news\"],\"limits\":{\"maxTables\":12,\"maxColumnsPerTable\":30}}', '{\n \"tables\": [\n {\n \"tableName\": \"admin\",\n \"tableComment\": \"管理员账号表\",\n \"adminMenuName\": \"管理员管理\",\n \"operations\": {\n \"add\": true,\n \"edit\": true,\n \"remove\": true,\n \"removeType\": \"physical\",\n \"reason\": \"\"\n },\n \"columns\": [\n {\n \"columnName\": \"admin_id\",\n \"columnLabel\": \"管理员ID\",\n \"columnComment\": \"主键ID\",\n \"columnType\": \"bigint(20)\",\n \"isPk\": \"1\",\n \"isIncrement\": \"1\",\n \"isRequired\": \"1\"\n },\n {\n \"columnName\": \"username\",\n \"columnLabel\": \"用户名\",\n \"columnComment\": \"登录用户名\",\n \"columnType\": \"varchar(50)\",\n \"isPk\": \"0\",\n \"isIncrement\": \"0\",\n \"isRequired\": \"1\"\n },\n {\n \"columnName\": \"password_hash\",\n \"columnLabel\": \"密码哈希\",\n \"columnComment\": \"加密后的密码\",\n \"columnType\": \"varchar(255)\",\n \"isPk\": \"0\",\n \"isIncrement\": \"0\",\n \"isRequired\": \"1\"\n },\n {\n \"columnName\": \"nickname\",\n \"columnLabel\": \"昵称\",\n \"columnComment\": \"管理员显示名称\",\n \"columnType\": \"varchar(50)\",\n \"isPk\": \"0\",\n \"isIncrement\": \"0\",\n \"isRequired\": \"1\"\n },\n {\n \"columnName\": \"status\",\n \"columnLabel\": \"状态\",\n \"columnComment\": \"账号状态1启用 0禁用\",\n \"columnType\": \"char(1)\",\n \"isPk\": \"0\",\n \"isIncrement\": \"0\",\n \"isRequired\": \"1\",\n \"htmlType\": \"radio\",\n \"dictOptions\": [\n {\n \"label\": \"启用\",\n \"value\": \"1\"\n },\n {\n \"label\": \"禁用\",\n \"value\": \"0\"\n }\n ]\n },\n {\n \"columnName\": \"create_time\",\n \"columnLabel\": \"创建时间\",\n \"columnComment\": \"账号创建时间\",\n \"columnType\": \"datetime\",\n \"isPk\": \"0\",\n \"isIncrement\": \"0\",\n \"isRequired\": \"1\"\n }\n ]\n },\n {\n \"tableName\": \"reader\",\n \"tableComment\": \"读者账号表\",\n \"adminMenuName\": \"读者管理\",\n \"operations\": {\n \"add\": true,\n \"edit\": true,\n \"remove\": true,\n \"removeType\": \"physical\",\n \"reason\": \"\"\n },\n \"columns\": [\n {\n \"columnName\": \"reader_id\",\n \"columnLabel\": \"读者ID\",\n \"columnComment\": \"主键ID\",\n \"columnType\": \"bigint(20)\",\n \"isPk\": \"1\",\n \"isIncrement\": \"1\",\n \"isRequired\": \"1\"\n },\n {\n \"columnName\": \"username\",\n \"columnLabel\": \"用户名\",\n \"columnComment\": \"登录用户名\",\n \"columnType\": \"varchar(50)\",\n \"isPk\": \"0\",\n \"isIncrement\": \"0\",\n \"isRequired\": \"1\"\n },\n {\n \"columnName\": \"password_hash\",\n \"columnLabel\": \"密码哈希\",\n \"columnComment\": \"加密后的密码\",\n \"columnType\": \"varchar(255)\",\n \"isPk\": \"0\",\n \"isIncrement\": \"0\",\n \"isRequired\": \"1\"\n },\n {\n \"columnName\": \"nickname\",\n \"columnLabel\": \"昵称\",\n \"columnComment\": \"读者显示名称\",\n \"columnType\": \"varchar(50)\",\n \"isPk\": \"0\",\n \"isIncrement\": \"0\",\n \"isRequired\": \"1\"\n },\n {\n \"columnName\": \"email\",\n \"columnLabel\": \"邮箱\",\n \"columnComment\": \"电子邮箱\",\n \"columnType\": \"varchar(100)\",\n \"isPk\": \"0\",\n \"isIncrement\": \"0\",\n \"isRequired\": \"0\"\n },\n {\n \"columnName\": \"phone\",\n \"columnLabel\": \"手机号\",\n \"columnComment\": \"手机号码\",\n \"columnType\": \"varchar(20)\",\n \"isPk\": \"0\",\n \"isIncrement\": \"0\",\n \"isRequired\": \"0\"\n },\n {\n \"columnName\": \"avatar\",\n \"columnLabel\": \"头像\",\n \"columnComment\": \"头像图片URL\",\n \"columnType\": \"varchar(255)\",\n \"isPk\": \"0\",\n \"isIncrement\": \"0\",\n \"isRequired\": \"0\"\n },\n {\n \"columnName\": \"status\",\n \"columnLabel\": \"状态\",\n \"columnComment\": \"账号状态1启用 0禁用\",\n \"columnType\": \"char(1)\",\n \"isPk\": \"0\",\n \"isIncrement\": \"0\",\n \"isRequired\": \"1\",\n \"htmlType\": \"radio\",\n \"dictOptions\": [\n {\n \"label\": \"启用\",\n \"value\": \"1\"\n },\n {\n \"label\": \"禁用\",\n \"value\": \"0\"\n }\n ]\n },\n {\n \"columnName\": \"create_time\",\n \"columnLabel\": \"创建时间\",\n \"columnComment\": \"账号创建时间\",\n \"columnType\": \"datetime\",\n \"isPk\": \"0\",\n \"isIncrement\": \"0\",\n \"isRequired\": \"1\"\n }\n ]\n },\n {\n \"tableName\": \"book_info\",\n \"tableComment\": \"图书信息表\",\n \"adminMenuName\": \"图书管理\",\n \"operations\": {\n \"add\": true,\n \"edit\": true,\n \"remove\": true,\n \"removeType\": \"physical\",\n \"reason\": \"\"\n },\n \"columns\": [\n {\n \"columnName\": \"id\",\n \"columnLabel\": \"图书ID\",\n \"columnComment\": \"主键ID\",\n \"columnType\": \"bigint(20)\",\n \"isPk\": \"1\",\n \"isIncrement\": \"1\",\n \"isRequired\": \"1\"\n },\n {\n \"columnName\": \"isbn\",\n \"columnLabel\": \"ISBN\",\n \"columnComment\": \"国际标准书号\",\n \"columnType\": \"varchar(20)\",\n \"isPk\": \"0\",\n \"isIncrement\": \"0\",\n \"isRequired\": \"1\"\n },\n {\n \"columnName\": \"title\",\n \"columnLabel\": \"书名\",\n \"columnComment\": \"图书标题\",\n \"columnType\": \"varchar(200)\",\n \"isPk\": \"0\",\n \"isIncrement\": \"0\",\n \"isRequired\": \"1\"\n },\n {\n \"columnName\": \"author\",\n \"columnLabel\": \"作者\",\n \"columnComment\": \"图书作者\",\n \"columnType\": \"varchar(100)\",\n \"isPk\": \"0\",\n \"isIncrement\": \"0\",\n \"isRequired\": \"1\"\n },\n {\n \"columnName\": \"publisher\",\n \"columnLabel\": \"出版社\",\n \"columnComment\": \"出版机构\",\n \"columnType\": \"varchar(100)\",\n \"isPk\": \"0\",\n \"isIncrement\": \"0\",\n \"isRequired\": \"0\"\n },\n {\n \"columnName\": \"publish_year\",\n \"columnLabel\": \"出版年份\",\n \"columnComment\": \"出版年份\",\n \"columnType\": \"varchar(10)\",\n \"isPk\": \"0\",\n \"isIncrement\": \"0\",\n \"isRequired\": \"0\"\n },\n {\n \"columnName\": \"category\",\n \"columnLabel\": \"分类\",\n \"columnComment\": \"图书分类\",\n \"columnType\": \"varchar(50)\",\n \"isPk\": \"0\",\n \"isIncrement\": \"0\",\n \"isRequired\": \"0\",\n \"htmlType\": \"select\",\n \"dictOptions\": [\n {\n \"label\": \"文学\",\n \"value\": \"literature\"\n },\n {\n \"label\": \"科技\",\n \"value\": \"technology\"\n },\n {\n \"label\": \"历史\",\n \"value\": \"history\"\n },\n {\n \"label\": \"艺术\",\n \"value\": \"art\"\n },\n {\n \"label\": \"其他\",\n \"value\": \"other\"\n }\n ]\n },\n {\n \"columnName\": \"stock\",\n \"columnLabel\": \"库存\",\n \"columnComment\": \"当前可借数量\",\n \"columnType\": \"int(11)\",\n \"isPk\": \"0\",\n \"isIncrement\": \"0\",\n \"isRequired\": \"1\"\n },\n {\n \"columnName\": \"description\",\n \"columnLabel\": \"简介\",\n \"columnComment\": \"图书内容简介\",\n \"columnType\": \"text\",\n \"isPk\": \"0\",\n \"isIncrement\": \"0\",\n \"isRequired\": \"0\"\n },\n {\n \"columnName\": \"cover_image\",\n \"columnLabel\": \"封面图片\",\n \"columnComment\": \"封面图片URL\",\n \"columnType\": \"varchar(255)\",\n \"isPk\": \"0\",\n \"isIncrement\": \"0\",\n \"isRequired\": \"0\"\n },\n {\n \"columnName\": \"status\",\n \"columnLabel\": \"状态\",\n \"columnComment\": \"上架状态1上架 0下架\",\n \"columnType\": \"char(1)\",\n \"isPk\": \"0\",\n \"isIncrement\": \"0\",\n \"isRequired\": \"1\",\n \"htmlType\": \"radio\",\n \"dictOptions\": [\n {\n \"label\": \"上架\",\n \"value\": \"1\"\n },\n {\n \"label\": \"下架\",\n \"value\": \"0\"\n }\n ]\n },\n {\n \"columnName\": \"create_time\",\n \"columnLabel\": \"创建时间\",\n \"columnComment\": \"记录创建时间\",\n \"columnType\": \"datetime\",\n \"isPk\": \"0\",\n \"isIncrement\": \"0\",\n \"isRequired\": \"1\"\n },\n {\n \"columnName\": \"update_time\",\n \"columnLabel\": \"更新时间\",\n \"columnComment\": \"记录更新时间\",\n \"columnType\": \"datetime\",\n \"isPk\": \"0\",\n \"isIncrement\": \"0\",\n \"isRequired\": \"0\"\n }\n ]\n },\n {\n \"tableName\": \"borrow_record\",\n \"tableComment\": \"借阅记录表\",\n \"adminMenuName\": \"借阅管理\",\n \"operations\": {\n \"add\": true,\n \"edit\": false,\n \"remove\": false,\n \"removeType\": \"physical\",\n \"reason\": \"借阅记录仅可新增,不可编辑或删除\"\n },\n \"columns\": [\n {\n \"columnName\": \"id\",\n \"columnLabel\": \"记录ID\",\n \"columnComment\": \"主键ID\",\n \"columnType\": \"bigint(20)\",\n \"isPk\": \"1\",\n \"isIncrement\": \"1\",\n \"isRequired\": \"1\"\n },\n {\n \"columnName\": \"reader_id\",\n \"columnLabel\": \"读者ID\",\n \"columnComment\": \"借阅者关联reader表\",\n \"columnType\": \"bigint(20)\",\n \"isPk\": \"0\",\n \"isIncrement\": \"0\",\n \"isRequired\": \"1\",\n \"htmlType\": \"select\",\n \"dictType\": \"remote:reader:reader_id:nickname\"\n },\n {\n \"columnName\": \"book_id\",\n \"columnLabel\": \"图书ID\",\n \"columnComment\": \"被借图书关联book_info表\",\n \"columnType\": \"bigint(20)\",\n \"isPk\": \"0\",\n \"isIncrement\": \"0\",\n \"isRequired\": \"1\",\n \"htmlType\": \"select\",\n \"dictType\": \"remote:book_info:id:title\"\n },\n {\n \"columnName\": \"status\",\n \"columnLabel\": \"状态\",\n \"columnComment\": \"借阅状态pending待审核, borrowing借阅中, returned已归还, rejected已拒绝\",\n \"columnType\": \"varchar(20)\",\n \"isPk\": \"0\",\n \"isIncrement\": \"0\",\n \"isRequired\": \"1\",\n \"htmlType\": \"select\",\n \"dictOptions\": [\n {\n \"label\": \"待审核\",\n \"value\": \"pending\"\n },\n {\n \"label\": \"借阅中\",\n \"value\": \"borrowing\"\n },\n {\n \"label\": \"已归还\",\n \"value\": \"returned\"\n },\n {\n \"label\": \"已拒绝\",\n \"value\": \"rejected\"\n }\n ]\n },\n {\n \"columnName\": \"borrow_date\",\n \"columnLabel\": \"借阅日期\",\n \"columnComment\": \"开始借阅时间\",\n \"columnType\": \"datetime\",\n \"isPk\": \"0\",\n \"isIncrement\": \"0\",\n \"isRequired\": \"1\"\n },\n {\n \"columnName\": \"due_date\",\n \"columnLabel\": \"应还日期\",\n \"columnComment\": \"应归还时间\",\n \"columnType\": \"datetime\",\n \"isPk\": \"0\",\n \"isIncrement\": \"0\",\n \"isRequired\": \"1\"\n },\n {\n \"columnName\": \"return_date\",\n \"columnLabel\": \"实际归还日期\",\n \"columnComment\": \"实际归还时间\",\n \"columnType\": \"datetime\",\n \"isPk\": \"0\",\n \"isIncrement\": \"0\",\n \"isRequired\": \"0\"\n },\n {\n \"columnName\": \"approve_time\",\n \"columnLabel\": \"审核时间\",\n \"columnComment\": \"管理员审核通过的时间\",\n \"columnType\": \"datetime\",\n \"isPk\": \"0\",\n \"isIncrement\": \"0\",\n \"isRequired\": \"0\"\n },\n {\n \"columnName\": \"approve_user_id\",\n \"columnLabel\": \"审核人ID\",\n \"columnComment\": \"审核通过的管理员关联admin表\",\n \"columnType\": \"bigint(20)\",\n \"isPk\": \"0\",\n \"isIncrement\": \"0\",\n \"isRequired\": \"0\",\n \"htmlType\": \"select\",\n \"dictType\": \"remote:admin:admin_id:username\"\n },\n {\n \"columnName\": \"reject_time\",\n \"columnLabel\": \"拒绝时间\",\n \"columnComment\": \"管理员拒绝的时间\",\n \"columnType\": \"datetime\",\n \"isPk\": \"0\",\n \"isIncrement\": \"0\",\n \"isRequired\": \"0\"\n },\n {\n \"columnName\": \"reject_user_id\",\n \"columnLabel\": \"拒绝人ID\",\n \"columnComment\": \"拒绝的管理员关联admin表\",\n \"columnType\": \"bigint(20)\",\n \"isPk\": \"0\",\n \"isIncrement\": \"0\",\n \"isRequired\": \"0\",\n \"htmlType\": \"select\",\n \"dictType\": \"remote:admin:admin_id:username\"\n },\n {\n \"columnName\": \"return_time\",\n \"columnLabel\": \"归还确认时间\",\n \"columnComment\": \"管理员确认归还的时间\",\n \"columnType\": \"datetime\",\n \"isPk\": \"0\",\n \"isIncrement\": \"0\",\n \"isRequired\": \"0\"\n },\n {\n \"columnName\": \"return_user_id\",\n \"columnLabel\": \"归还确认人ID\",\n \"columnComment\": \"确认归还的管理员关联admin表\",\n \"columnType\": \"bigint(20)\",\n \"isPk\": \"0\",\n \"isIncrement\": \"0\",\n \"isRequired\": \"0\",\n \"htmlType\": \"select\",\n \"dictType\": \"remote:admin:admin_id:username\"\n },\n {\n \"columnName\": \"create_time\",\n \"columnLabel\": \"创建时间\",\n \"columnComment\": \"记录创建时间\",\n \"columnType\": \"datetime\",\n \"isPk\": \"0\",\n \"isIncrement\": \"0\",\n \"isRequired\": \"1\"\n }\n ]\n },\n {\n \"tableName\": \"reservation\",\n \"tableComment\": \"预约记录表\",\n \"adminMenuName\": \"预约管理\",\n \"operations\": {\n \"add\": true,\n \"edit\": false,\n \"remove\": false,\n \"removeType\": \"physical\",\n \"reason\": \"预约记录仅可新增,不可编辑或删除\"\n },\n \"columns\": [\n {\n \"columnName\": \"id\",\n \"columnLabel\": \"预约ID\",\n \"columnComment\": \"主键ID\",\n \"columnType\": \"bigint(20)\",\n \"isPk\": \"1\",\n \"isIncrement\": \"1\",\n \"isRequired\": \"1\"\n },\n {\n \"columnName\": \"reader_id\",\n \"columnLabel\": \"读者ID\",\n \"columnComment\": \"预约者关联reader表\",\n \"columnType\": \"bigint(20)\",\n \"isPk\": \"0\",\n \"isIncrement\": \"0\",\n \"isRequired\": \"1\",\n \"htmlType\": \"select\",\n \"dictType\": \"remote:reader:reader_id:nickname\"\n },\n {\n \"columnName\": \"book_id\",\n \"columnLabel\": \"图书ID\",\n \"columnComment\": \"被预约图书关联book_info表\",\n \"columnType\": \"bigint(20)\",\n \"isPk\": \"0\",\n \"isIncrement\": \"0\",\n \"isRequired\": \"1\",\n \"htmlType\": \"select\",\n \"dictType\": \"remote:book_info:id:title\"\n },\n {\n \"columnName\": \"status\",\n \"columnLabel\": \"状态\",\n \"columnComment\": \"预约状态active预约中, fulfilled已借出, cancelled已取消\",\n \"columnType\": \"varchar(20)\",\n \"isPk\": \"0\",\n \"isIncrement\": \"0\",\n \"isRequired\": \"1\",\n \"htmlType\": \"select\",\n \"dictOptions\": [\n {\n \"label\": \"预约中\",\n \"value\": \"active\"\n },\n {\n \"label\": \"已借出\",\n \"value\": \"fulfilled\"\n },\n {\n \"label\": \"已取消\",\n \"value\": \"cancelled\"\n }\n ]\n },\n {\n \"columnName\": \"reserve_time\",\n \"columnLabel\": \"预约时间\",\n \"columnComment\": \"发起预约的时间\",\n \"columnType\": \"datetime\",\n \"isPk\": \"0\",\n \"isIncrement\": \"0\",\n \"isRequired\": \"1\"\n },\n {\n \"columnName\": \"expire_time\",\n \"columnLabel\": \"过期时间\",\n \"columnComment\": \"预约有效期截止时间\",\n \"columnType\": \"datetime\",\n \"isPk\": \"0\",\n \"isIncrement\": \"0\",\n \"isRequired\": \"0\"\n },\n {\n \"columnName\": \"create_time\",\n \"columnLabel\": \"创建时间\",\n \"columnComment\": \"记录创建时间\",\n \"columnType\": \"datetime\",\n \"isPk\": \"0\",\n \"isIncrement\": \"0\",\n \"isRequired\": \"1\"\n }\n ]\n },\n {\n \"tableName\": \"carousel\",\n \"tableComment\": \"轮播图表\",\n \"adminMenuName\": \"轮播图管理\",\n \"operations\": {\n \"add\": true,\n \"edit\": true,\n \"remove\": true,\n \"removeType\": \"physical\",\n \"reason\": \"\"\n },\n \"columns\": [\n {\n \"columnName\": \"id\",\n \"columnLabel\": \"轮播图ID\",\n \"columnComment\": \"主键ID\",\n \"columnType\": \"bigint(20)\",\n \"isPk\": \"1\",\n \"isIncrement\": \"1\",\n \"isRequired\": \"1\"\n },\n {\n \"columnName\": \"title\",\n \"columnLabel\": \"标题\",\n \"columnComment\": \"轮播图标题\",\n \"columnType\": \"varchar(200)\",\n \"isPk\": \"0\",\n \"isIncrement\": \"0\",\n \"isRequired\": \"1\"\n },\n {\n \"columnName\": \"image_url\",\n \"columnLabel\": \"图片URL\",\n \"columnComment\": \"图片地址\",\n \"columnType\": \"varchar(500)\",\n \"isPk\": \"0\",\n \"isIncrement\": \"0\",\n \"isRequired\": \"1\"\n },\n {\n \"columnName\": \"link_url\",\n \"columnLabel\": \"链接URL\",\n \"columnComment\": \"点击跳转链接\",\n \"columnType\": \"varchar(500)\",\n \"isPk\": \"0\",\n \"isIncrement\": \"0\",\n \"isRequired\": \"0\"\n },\n {\n \"columnName\": \"sort_order\",\n \"columnLabel\": \"排序\",\n \"columnComment\": \"显示顺序,数值越小越靠前\",\n \"columnType\": \"int(11)\",\n \"isPk\": \"0\",\n \"isIncrement\": \"0\",\n \"isRequired\": \"0\"\n },\n {\n \"columnName\": \"status\",\n \"columnLabel\": \"状态\",\n \"columnComment\": \"启用状态1启用 0禁用\",\n \"columnType\": \"char(1)\",\n \"isPk\": \"0\",\n \"isIncrement\": \"0\",\n \"isRequired\": \"1\",\n \"htmlType\": \"radio\",\n \"dictOptions\": [\n {\n \"label\": \"启用\",\n \"value\": \"1\"\n },\n {\n \"label\": \"禁用\",\n \"value\": \"0\"\n }\n ]\n },\n {\n \"columnName\": \"create_time\",\n \"columnLabel\": \"创建时间\",\n \"columnComment\": \"记录创建时间\",\n \"columnType\": \"datetime\",\n \"isPk\": \"0\",\n \"isIncrement\": \"0\",\n \"isRequired\": \"1\"\n },\n {\n \"columnName\": \"update_time\",\n \"columnLabel\": \"更新时间\",\n \"columnComment\": \"记录更新时间\",\n \"columnType\": \"datetime\",\n \"isPk\": \"0\",\n \"isIncrement\": \"0\",\n \"isRequired\": \"0\"\n }\n ]\n },\n {\n \"tableName\": \"announcement\",\n \"tableComment\": \"公告表\",\n \"adminMenuName\": \"公告管理\",\n \"operations\": {\n \"add\": true,\n \"edit\": true,\n \"remove\": true,\n \"removeType\": \"physical\",\n \"reason\": \"\"\n },\n \"columns\": [\n {\n \"columnName\": \"id\",\n \"columnLabel\": \"公告ID\",\n \"columnComment\": \"主键ID\",\n \"columnType\": \"bigint(20)\",\n \"isPk\": \"1\",\n \"isIncrement\": \"1\",\n \"isRequired\": \"1\"\n },\n {\n \"columnName\": \"title\",\n \"columnLabel\": \"标题\",\n \"columnComment\": \"公告标题\",\n \"columnType\": \"varchar(200)\",\n \"isPk\": \"0\",\n \"isIncrement\": \"0\",\n \"isRequired\": \"1\"\n },\n {\n \"columnName\": \"content\",\n \"columnLabel\": \"内容\",\n \"columnComment\": \"公告正文\",\n \"columnType\": \"text\",\n \"isPk\": \"0\",\n \"isIncrement\": \"0\",\n \"isRequired\": \"1\"\n },\n {\n \"columnName\": \"publish_time\",\n \"columnLabel\": \"发布时间\",\n \"columnComment\": \"公告发布时间\",\n \"columnType\": \"datetime\",\n \"isPk\": \"0\",\n \"isIncrement\": \"0\",\n \"isRequired\": \"0\"\n },\n {\n \"columnName\": \"status\",\n \"columnLabel\": \"状态\",\n \"columnComment\": \"发布状态1发布 0草稿\",\n \"columnType\": \"char(1)\",\n \"isPk\": \"0\",\n \"isIncrement\": \"0\",\n \"isRequired\": \"1\",\n \"htmlType\": \"radio\",\n \"dictOptions\": [\n {\n \"label\": \"发布\",\n \"value\": \"1\"\n },\n {\n \"label\": \"草稿\",\n \"value\": \"0\"\n }\n ]\n },\n {\n \"columnName\": \"create_time\",\n \"columnLabel\": \"创建时间\",\n \"columnComment\": \"记录创建时间\",\n \"columnType\": \"datetime\",\n \"isPk\": \"0\",\n \"isIncrement\": \"0\",\n \"isRequired\": \"1\"\n },\n {\n \"columnName\": \"update_time\",\n \"columnLabel\": \"更新时间\",\n \"columnComment\": \"记录更新时间\",\n \"columnType\": \"datetime\",\n \"isPk\": \"0\",\n \"isIncrement\": \"0\",\n \"isRequired\": \"0\"\n }\n ]\n },\n {\n \"tableName\": \"news\",\n \"tableComment\": \"新闻表\",\n \"adminMenuName\": \"新闻管理\",\n \"operations\": {\n \"add\": true,\n \"edit\": true,\n \"remove\": true,\n \"removeType\": \"physical\",\n \"reason\": \"\"\n },\n \"columns\": [\n {\n \"columnName\": \"id\",\n \"columnLabel\": \"新闻ID\",\n \"columnComment\": \"主键ID\",\n \"columnType\": \"bigint(20)\",\n \"isPk\": \"1\",\n \"isIncrement\": \"1\",\n \"isRequired\": \"1\"\n },\n {\n \"columnName\": \"title\",\n \"columnLabel\": \"标题\",\n \"columnComment\": \"新闻标题\",\n \"columnType\": \"varchar(200)\",\n \"isPk\": \"0\",\n \"isIncrement\": \"0\",\n \"isRequired\": \"1\"\n },\n {\n \"columnName\": \"content\",\n \"columnLabel\": \"内容\",\n \"columnComment\": \"新闻正文\",\n \"columnType\": \"text\",\n \"isPk\": \"0\",\n \"isIncrement\": \"0\",\n \"isRequired\": \"1\"\n },\n {\n \"columnName\": \"source\",\n \"columnLabel\": \"来源\",\n \"columnComment\": \"新闻来源\",\n \"columnType\": \"varchar(100)\",\n \"isPk\": \"0\",\n \"isIncrement\": \"0\",\n \"isRequired\": \"0\"\n },\n {\n \"columnName\": \"publish_time\",\n \"columnLabel\": \"发布时间\",\n \"columnComment\": \"新闻发布时间\",\n \"columnType\": \"datetime\",\n \"isPk\": \"0\",\n \"isIncrement\": \"0\",\n \"isRequired\": \"0\"\n },\n {\n \"columnName\": \"status\",\n \"columnLabel\": \"状态\",\n \"columnComment\": \"发布状态1发布 0草稿\",\n \"columnType\": \"char(1)\",\n \"isPk\": \"0\",\n \"isIncrement\": \"0\",\n \"isRequired\": \"1\",\n \"htmlType\": \"radio\",\n \"dictOptions\": [\n {\n \"label\": \"发布\",\n \"value\": \"1\"\n },\n {\n \"label\": \"草稿\",\n \"value\": \"0\"\n }\n ]\n },\n {\n \"columnName\": \"create_time\",\n \"columnLabel\": \"创建时间\",\n \"columnComment\": \"记录创建时间\",\n \"columnType\": \"datetime\",\n \"isPk\": \"0\",\n \"isIncrement\": \"0\",\n \"isRequired\": \"1\"\n },\n {\n \"columnName\": \"update_time\",\n \"columnLabel\": \"更新时间\",\n \"columnComment\": \"记录更新时间\",\n \"columnType\": \"datetime\",\n \"isPk\": \"0\",\n \"isIncrement\": \"0\",\n \"isRequired\": \"0\"\n }\n ]\n }\n ]\n}', '0', 55444, 3664, NULL, 3664, 9329, 2980, 3664, 9329, 12993, 3, 0.02232200, '1', NULL, '2026-07-14 22:05:01');
INSERT INTO `front_ai_usage_ledger` VALUES (145, 112, 112, 108, 100, 'app_blueprint', 'deepseek', 'deepseek-v4-flash', 'front.app_blueprint', 'V1', 'c3ee0180ed446fe83055bd1c272ed1b6e3978584fe52f98f5e78e14e2cfc8f29', '你是应用蓝图架构师。只输出符合用户消息结构的 JSON规划业务角色、前台菜单与页面、后台菜单和运营看板。保持 pageCode、tableName、角色数据范围和登录要求前后一致只描述静态蓝图不生成数据库、权限表、菜单表或代码。角色名称使用简体中文技术标识使用稳定的小写 snake_case。', '根据项目输入 JSON 生成应用蓝图,只返回 JSON不要 Markdown 围栏或解释。\n输出结构{\"roles\":[{\"code\":\"reader\",\"name\":\"读者\",\"description\":\"\"}],\"frontendMenus\":[{\"code\":\"book_catalog\",\"name\":\"图书目录\",\"path\":\"/books\",\"pageCode\":\"book_catalog_page\",\"requiresLogin\":false,\"visibleRoles\":[],\"dataScope\":\"PUBLIC\"}],\"frontendPages\":[{\"code\":\"book_catalog_page\",\"name\":\"图书目录\",\"menuCode\":\"book_catalog\",\"path\":\"/books\",\"pageType\":\"list\",\"tableName\":\"book_info\"}],\"adminMenus\":[{\"code\":\"book_admin\",\"name\":\"图书管理\",\"path\":\"/admin/books\",\"pageCode\":\"book_admin_page\",\"tableName\":\"book_info\",\"pageType\":\"list\",\"requiresLogin\":true,\"visibleRoles\":[\"admin\"],\"dataScope\":\"ROLE\"}],\"adminHomeDashboard\":{\"title\":\"运营总览\",\"description\":\"核心业务数据\",\"metrics\":[],\"charts\":[]}}。\n蓝图描述目标生成项目而不是当前 EasyCode/RuoYi 平台。不要生成数据库表、菜单表、角色表、权限表或代码。\nrole.name 使用简体中文role.code 使用小写 snake_case。只有 role.code=admin 是系统管理员;名称含“管理员”或“后台”的业务角色仍保持独立。\nrole.name must be Simplified Chinese. Only role.code=admin is the system administrator.\n每个菜单必须包含 requiresLogin、visibleRoles、dataScopedataScope 只能是 PUBLIC、CURRENT_USER 或 ROLE。\nadminMenus 必须包含 pageCode、tableName、pageType个人资料使用 form普通管理使用 list。\nadminMenus must include pageCode, tableName, and pageType.\nfrontendMenus 顶层菜单应指向 pageCode详情页作为子页面不创建顶层详情菜单。\n不要为轮播图、banner、公告滚动条等首页装饰创建顶层菜单可放在首页业务块或作为后台维护数据。\nfrontendPages.pageType 只能是 list、current_user_list、detail、formtableName 必须是页面展示的业务表。\n同一业务对象只使用一个稳定 tableName后续数据库、闭环、页面、看板、动作必须复用不能使用同义表名。\nadminHomeDashboard 尽量包含 4 个业务指标和至少 2 张图表趋势图与分布图所有表字段必须可由后续数据库步骤创建。semantic 只能使用 money、order、user、task、warning、inventory、content、default。\n每个非 admin 角色使用表名等于 role.code 的独立账号表,不得创建共享 user、user_info、member 或 account 表。\nNever invent a shared user, user_info, member, or account table for role accounts.\n需要个人资料页时为每个非 admin 角色创建独立 form 页面和菜单tableName 绑定 role.codepageCode/path 带角色前缀visibleRoles 只包含该角色。\nCreate one form page and one menu per non-admin role when profile pages are needed.\n个人订单、借阅、资料、预约、支付等页面必须 requiresLogin=true 且 dataScope=CURRENT_USER。\n项目输入 JSON\n{\"projectName\":\"图书管理系统\",\"projectDescription\":\"功能:借书、还书、预约、取消预约\\n角色用户、管理员\\n其他模块轮播图、公告、新闻\",\"industryTemplate\":\"\",\"stylePreset\":\"business_clean\",\"extraRequirements\":\"\"}', '{\n \"roles\": [\n {\n \"code\": \"admin\",\n \"name\": \"管理员\",\n \"description\": \"系统管理员,管理图书、借阅、公告等\"\n },\n {\n \"code\": \"reader\",\n \"name\": \"读者\",\n \"description\": \"普通用户,借书、还书、预约图书\"\n }\n ],\n \"frontendMenus\": [\n {\n \"code\": \"book_catalog\",\n \"name\": \"图书目录\",\n \"path\": \"/books\",\n \"pageCode\": \"book_catalog_page\",\n \"requiresLogin\": false,\n \"visibleRoles\": [],\n \"dataScope\": \"PUBLIC\"\n },\n {\n \"code\": \"announcements\",\n \"name\": \"公告\",\n \"path\": \"/announcements\",\n \"pageCode\": \"announcement_list_page\",\n \"requiresLogin\": false,\n \"visibleRoles\": [],\n \"dataScope\": \"PUBLIC\"\n },\n {\n \"code\": \"news\",\n \"name\": \"新闻\",\n \"path\": \"/news\",\n \"pageCode\": \"news_list_page\",\n \"requiresLogin\": false,\n \"visibleRoles\": [],\n \"dataScope\": \"PUBLIC\"\n },\n {\n \"code\": \"my_borrows\",\n \"name\": \"我的借阅\",\n \"path\": \"/my-borrows\",\n \"pageCode\": \"my_borrows_page\",\n \"requiresLogin\": true,\n \"visibleRoles\": [\"reader\"],\n \"dataScope\": \"CURRENT_USER\"\n },\n {\n \"code\": \"my_reservations\",\n \"name\": \"我的预约\",\n \"path\": \"/my-reservations\",\n \"pageCode\": \"my_reservations_page\",\n \"requiresLogin\": true,\n \"visibleRoles\": [\"reader\"],\n \"dataScope\": \"CURRENT_USER\"\n },\n {\n \"code\": \"reader_profile\",\n \"name\": \"个人中心\",\n \"path\": \"/reader/profile\",\n \"pageCode\": \"reader_profile_page\",\n \"requiresLogin\": true,\n \"visibleRoles\": [\"reader\"],\n \"dataScope\": \"CURRENT_USER\"\n }\n ],\n \"frontendPages\": [\n {\n \"code\": \"book_catalog_page\",\n \"name\": \"图书目录\",\n \"menuCode\": \"book_catalog\",\n \"path\": \"/books\",\n \"pageType\": \"list\",\n \"tableName\": \"book_info\"\n },\n {\n \"code\": \"book_detail_page\",\n \"name\": \"图书详情\",\n \"menuCode\": \"book_catalog\",\n \"path\": \"/books/:id\",\n \"pageType\": \"detail\",\n \"tableName\": \"book_info\"\n },\n {\n \"code\": \"announcement_list_page\",\n \"name\": \"公告列表\",\n \"menuCode\": \"announcements\",\n \"path\": \"/announcements\",\n \"pageType\": \"list\",\n \"tableName\": \"announcement\"\n },\n {\n \"code\": \"news_list_page\",\n \"name\": \"新闻列表\",\n \"menuCode\": \"news\",\n \"path\": \"/news\",\n \"pageType\": \"list\",\n \"tableName\": \"news\"\n },\n {\n \"code\": \"my_borrows_page\",\n \"name\": \"我的借阅\",\n \"menuCode\": \"my_borrows\",\n \"path\": \"/my-borrows\",\n \"pageType\": \"current_user_list\",\n \"tableName\": \"borrow_record\"\n },\n {\n \"code\": \"my_reservations_page\",\n \"name\": \"我的预约\",\n \"menuCode\": \"my_reservations\",\n \"path\": \"/my-reservations\",\n \"pageType\": \"current_user_list\",\n \"tableName\": \"reservation\"\n },\n {\n \"code\": \"reader_profile_page\",\n \"name\": \"个人资料\",\n \"menuCode\": \"reader_profile\",\n \"path\": \"/reader/profile\",\n \"pageType\": \"form\",\n \"tableName\": \"reader\"\n }\n ],\n \"adminMenus\": [\n {\n \"code\": \"book_admin\",\n \"name\": \"图书管理\",\n \"path\": \"/admin/books\",\n \"pageCode\": \"book_admin_page\",\n \"tableName\": \"book_info\",\n \"pageType\": \"list\",\n \"requiresLogin\": true,\n \"visibleRoles\": [\"admin\"],\n \"dataScope\": \"ROLE\"\n },\n {\n \"code\": \"borrow_admin\",\n \"name\": \"借阅管理\",\n \"path\": \"/admin/borrows\",\n \"pageCode\": \"borrow_admin_page\",\n \"tableName\": \"borrow_record\",\n \"pageType\": \"list\",\n \"requiresLogin\": true,\n \"visibleRoles\": [\"admin\"],\n \"dataScope\": \"ROLE\"\n },\n {\n \"code\": \"reservation_admin\",\n \"name\": \"预约管理\",\n \"path\": \"/admin/reservations\",\n \"pageCode\": \"reservation_admin_page\",\n \"tableName\": \"reservation\",\n \"pageType\": \"list\",\n \"requiresLogin\": true,\n \"visibleRoles\": [\"admin\"],\n \"dataScope\": \"ROLE\"\n },\n {\n \"code\": \"announcement_admin\",\n \"name\": \"公告管理\",\n \"path\": \"/admin/announcements\",\n \"pageCode\": \"announcement_admin_page\",\n \"tableName\": \"announcement\",\n \"pageType\": \"list\",\n \"requiresLogin\": true,\n \"visibleRoles\": [\"admin\"],\n \"dataScope\": \"ROLE\"\n },\n {\n \"code\": \"news_admin\",\n \"name\": \"新闻管理\",\n \"path\": \"/admin/news\",\n \"pageCode\": \"news_admin_page\",\n \"tableName\": \"news\",\n \"pageType\": \"list\",\n \"requiresLogin\": true,\n \"visibleRoles\": [\"admin\"],\n \"dataScope\": \"ROLE\"\n },\n {\n \"code\": \"carousel_admin\",\n \"name\": \"轮播图管理\",\n \"path\": \"/admin/carousels\",\n \"pageCode\": \"carousel_admin_page\",\n \"tableName\": \"carousel\",\n \"pageType\": \"list\",\n \"requiresLogin\": true,\n \"visibleRoles\": [\"admin\"],\n \"dataScope\": \"ROLE\"\n },\n {\n \"code\": \"admin_profile\",\n \"name\": \"个人资料\",\n \"path\": \"/admin/profile\",\n \"pageCode\": \"admin_profile_page\",\n \"tableName\": \"admin\",\n \"pageType\": \"form\",\n \"requiresLogin\": true,\n \"visibleRoles\": [\"admin\"],\n \"dataScope\": \"ROLE\"\n }\n ],\n \"adminHomeDashboard\": {\n \"title\": \"运营总览\",\n \"description\": \"核心业务数据\",\n \"metrics\": [\n {\n \"label\": \"总图书数\",\n \"value\": null,\n \"fieldName\": \"id\",\n \"tableName\": \"book_info\",\n \"aggregate\": \"COUNT\",\n \"filter\": null,\n \"semantic\": \"inventory\"\n },\n {\n \"label\": \"总借阅次数\",\n \"value\": null,\n \"fieldName\": \"id\",\n \"tableName\": \"borrow_record\",\n \"aggregate\": \"COUNT\",\n \"filter\": null,\n \"semantic\": \"order\"\n },\n {\n \"label\": \"当前借出\",\n \"value\": null,\n \"fieldName\": \"id\",\n \"tableName\": \"borrow_record\",\n \"aggregate\": \"COUNT\",\n \"filter\": \"return_date IS NULL\",\n \"semantic\": \"task\"\n },\n {\n \"label\": \"待处理预约\",\n \"value\": null,\n \"fieldName\": \"id\",\n \"tableName\": \"reservation\",\n \"aggregate\": \"COUNT\",\n \"filter\": \"status=\'pending\'\",\n \"semantic\": \"warning\"\n }\n ],\n \"charts\": [\n {\n \"type\": \"line\",\n \"title\": \"近7天借阅趋势\",\n \"tableName\": \"borrow_record\",\n \"fieldName\": \"borrow_date\",\n \"aggregate\": \"COUNT\",\n \"timeRange\": \"last7days\",\n \"semantic\": \"order\"\n },\n {\n \"type\": \"pie\",\n \"title\": \"图书分类分布\",\n \"tableName\": \"book_info\",\n \"fieldName\": \"category\",\n \"aggregate\": \"COUNT\",\n \"timeRange\": null,\n \"semantic\": \"content\"\n }\n ]\n }\n}', '0', 44156, 818, 768, 50, 5216, 3328, 818, 5216, 6034, 2, 0.01049736, '1', NULL, '2026-07-14 22:23:07');
INSERT INTO `front_ai_usage_ledger` VALUES (146, 112, 112, 108, 100, 'flow_config', 'deepseek', 'deepseek-v4-flash', 'front.flow_config', 'V2', '493bfe3aa6bafe555f3fedab46a75c8364c303c2a589b1ffaa01196a93c6472f', '你是业务流程配置设计器。只输出一个合法 JSON 对象,不输出 Markdown、解释或 SQL。\n\n目标用最小 flow_config 描述状态流转、显式 Java 业务动作、多表数量联动、按钮和统计。不要输出 CRUD不要输出通用规则 DSL。\n\n固定结构\n{\n \"version\":\"1.0\",\n \"code\":\"snake_case\",\n \"name\":\"中文业务名\",\n \"mainTable\":\"snake_case\",\n \"statusField\":\"status\",\n \"notFoundMessage\":\"主记录不存在\",\n \"states\":[{\"code\":\"pending\",\"label\":\"待审核\"}],\n \"actions\":[{\n \"code\":\"approve\",\n \"name\":\"审核通过\",\n \"from\":\"pending\",\n \"to\":\"borrowing\",\n \"actor\":\"admin\",\n \"method\":\"POST\",\n \"path\":\"/borrow-record/approve\",\n \"invalidStateMessage\":\"当前状态不能审核\",\n \"successMessage\":\"审核成功\",\n \"audit\":{\"userField\":\"approve_user_id\",\"timeField\":\"approve_time\"},\n \"effects\":[{\n \"type\":\"decrease\",\n \"table\":\"book\",\n \"relationField\":\"book_id\",\n \"field\":\"stock\",\n \"amount\":\"1\",\n \"min\":\"0\",\n \"notFoundMessage\":\"图书不存在\",\n \"errorMessage\":\"图书库存不足\"\n }],\n \"button\":{\"scope\":\"admin\",\"pageCode\":\"borrow_record_list\",\"slot\":\"list.rowActions\",\"type\":\"success\",\"confirm\":\"确认审核通过吗?\",\"order\":10}\n }],\n \"metrics\":[{\"code\":\"borrowing_count\",\"name\":\"借阅中数量\",\"table\":\"borrow_record\",\"aggregate\":\"count\",\"field\":\"id\",\"status\":\"borrowing\",\"unit\":\"条\"}]\n}\n\n约束\n1. code、表名、字段名全部使用小写 snake_case状态 code 使用稳定英文编码label 使用中文。\n2. 每个 action 必须有 from 和 to且二者存在于 states 中并且不相同。\n3. effects.type 只能是 decrease、increase、update_related、create_record。\n4. decrease/increase 必须给 table、relationField、field、amountdecrease 还要给 min。\n5. update_related/create_record 使用 values值可为 currentUserId、now、record.字段名或常量。\n6. 审核人等身份只能通过 audit.userField 表达,由后端登录态注入,不能作为前端可传字段。\n7. 覆盖需求中的完整正向闭环和关键回退/拒绝动作,但不要为普通 CRUD 创建 action。\n8. metrics.status 如果填写,必须完全等于 states 中某个 code统计全状态数据或不能确定状态时省略 status。\n9. button.pageCode 必须引用 appBlueprint 中已有页面button.slot 只能是 list.toolbarActions、list.rowActions、detail.primaryActions、detail.secondaryActions、form.footerActions。详情页主操作使用 detail.primaryActions列表记录操作使用 list.rowActions禁止使用 page.actions 等自定义值。', '请根据以下 JSON 上下文生成 flow_config。appBlueprint 是已确认的页面、角色和菜单范围,必须与它保持一致:\n{\"mode\":\"generate\",\"projectName\":\"图书管理系统\",\"projectDescription\":\"功能:借书、还书、预约、取消预约\\n角色用户、管理员\\n其他模块轮播图、公告、新闻\",\"industryTemplate\":\"\",\"stylePreset\":\"business_clean\",\"extraRequirements\":\"\",\"confirmedAppBlueprint\":{\"adminHomeDashboard\":{\"charts\":[{\"filters\":[],\"metrics\":[{\"aggregate\":\"count\",\"label\":\"近7天借阅趋势\"}],\"semantic\":\"order\",\"tableName\":\"borrow_record\",\"title\":\"近7天借阅趋势\",\"type\":\"line\"},{\"filters\":[],\"metrics\":[{\"aggregate\":\"count\",\"label\":\"图书分类分布\"}],\"semantic\":\"content\",\"tableName\":\"book_info\",\"title\":\"图书分类分布\",\"type\":\"pie\"}],\"description\":\"核心业务数据\",\"metrics\":[{\"aggregate\":\"COUNT\",\"filters\":[],\"semantic\":\"inventory\",\"tableName\":\"book_info\"},{\"aggregate\":\"COUNT\",\"filters\":[],\"semantic\":\"order\",\"tableName\":\"borrow_record\"},{\"aggregate\":\"COUNT\",\"filters\":[],\"semantic\":\"task\",\"tableName\":\"borrow_record\"},{\"aggregate\":\"COUNT\",\"filters\":[],\"semantic\":\"warning\",\"tableName\":\"reservation\"}],\"title\":\"运营总览\"},\"adminMenus\":[{\"code\":\"book_admin\",\"dataScope\":\"ROLE\",\"name\":\"图书管理\",\"pageCode\":\"book_admin_page\",\"pageType\":\"list\",\"path\":\"/admin/books\",\"requiresLogin\":true,\"tableName\":\"book_info\",\"visibleRoles\":[\"admin\"]},{\"code\":\"borrow_admin\",\"dataScope\":\"ROLE\",\"name\":\"借阅管理\",\"pageCode\":\"borrow_admin_page\",\"pageType\":\"list\",\"path\":\"/admin/borrows\",\"requiresLogin\":true,\"tableName\":\"borrow_record\",\"visibleRoles\":[\"admin\"]},{\"code\":\"reservation_admin\",\"dataScope\":\"ROLE\",\"name\":\"预约管理\",\"pageCode\":\"reservation_admin_page\",\"pageType\":\"list\",\"path\":\"/admin/reservations\",\"requiresLogin\":true,\"tableName\":\"reservation\",\"visibleRoles\":[\"admin\"]},{\"code\":\"announcement_admin\",\"dataScope\":\"ROLE\",\"name\":\"公告管理\",\"pageCode\":\"announcement_admin_page\",\"pageType\":\"list\",\"path\":\"/admin/announcements\",\"requiresLogin\":true,\"tableName\":\"announcement\",\"visibleRoles\":[\"admin\"]},{\"code\":\"news_admin\",\"dataScope\":\"ROLE\",\"name\":\"新闻管理\",\"pageCode\":\"news_admin_page\",\"pageType\":\"list\",\"path\":\"/admin/news\",\"requiresLogin\":true,\"tableName\":\"news\",\"visibleRoles\":[\"admin\"]},{\"code\":\"carousel_admin\",\"dataScope\":\"ROLE\",\"name\":\"轮播图管理\",\"pageCode\":\"carousel_admin_page\",\"pageType\":\"list\",\"path\":\"/admin/carousels\",\"requiresLogin\":true,\"tableName\":\"carousel\",\"visibleRoles\":[\"admin\"]},{\"code\":\"admin_profile\",\"dataScope\":\"ROLE\",\"name\":\"个人资料\",\"pageCode\":\"admin_profile_page\",\"pageType\":\"form\",\"path\":\"/admin/profile\",\"requiresLogin\":true,\"tableName\":\"admin\",\"visibleRoles\":[\"admin\"]}],\"frontendMenus\":[{\"code\":\"book_catalog\",\"dataScope\":\"PUBLIC\",\"name\":\"图书目录\",\"pageCode\":\"book_catalog_page\",\"pageType\":\"\",\"path\":\"/books\",\"requiresLogin\":false,\"tableName\":\"\",\"visibleRoles\":[]},{\"code\":\"announcements\",\"dataScope\":\"PUBLIC\",\"name\":\"公告\",\"pageCode\":\"announcement_list_page\",\"pageType\":\"\",\"path\":\"/announcements\",\"requiresLogin\":false,\"tableName\":\"\",\"visibleRoles\":[]},{\"code\":\"news\",\"dataScope\":\"PUBLIC\",\"name\":\"新闻\",\"pageCode\":\"news_list_page\",\"pageType\":\"\",\"path\":\"/news\",\"requiresLogin\":false,\"tableName\":\"\",\"visibleRoles\":[]},{\"code\":\"my_borrows\",\"dataScope\":\"CURRENT_USER\",\"name\":\"我的借阅\",\"pageCode\":\"my_borrows_page\",\"pageType\":\"\",\"path\":\"/my-borrows\",\"requiresLogin\":true,\"tableName\":\"\",\"visibleRoles\":[\"reader\"]},{\"code\":\"my_reservations\",\"dataScope\":\"CURRENT_USER\",\"name\":\"我的预约\",\"pageCode\":\"my_reservations_page\",\"pageType\":\"\",\"path\":\"/my-reservations\",\"requiresLogin\":true,\"tableName\":\"\",\"visibleRoles\":[\"reader\"]},{\"code\":\"reader_profile\",\"dataScope\":\"CURRENT_USER\",\"name\":\"个人中心\",\"pageCode\":\"reader_profile_page\",\"pageType\":\"\",\"path\":\"/reader/profile\",\"requiresLogin\":true,\"tableName\":\"\",\"visibleRoles\":[\"reader\"]}],\"frontendPages\":[{\"code\":\"book_catalog_page\",\"menuCode\":\"book_catalog\",\"name\":\"图书目录\",\"pageType\":\"list\",\"parentPageCode\":\"\",\"path\":\"/books\",\"tableName\":\"book_info\"},{\"code\":\"book_detail_page\",\"menuCode\":\"book_catalog\",\"name\":\"图书详情\",\"pageType\":\"detail\",\"parentPageCode\":\"\",\"path\":\"/books/:id\",\"tableName\":\"book_info\"},{\"code\":\"announcement_list_page\",\"menuCode\":\"announcements\",\"name\":\"公告列表\",\"pageType\":\"list\",\"parentPageCode\":\"\",\"path\":\"/announcements\",\"tableName\":\"announcement\"},{\"code\":\"news_list_page\",\"menuCode\":\"news\",\"name\":\"新闻列表\",\"pageType\":\"list\",\"parentPageCode\":\"\",\"path\":\"/news\",\"tableName\":\"news\"},{\"code\":\"my_borrows_page\",\"menuCode\":\"my_borrows\",\"name\":\"我的借阅\",\"pageType\":\"current_user_list\",\"parentPageCode\":\"\",\"path\":\"/my-borrows\",\"tableName\":\"borrow_record\"},{\"code\":\"my_reservations_page\",\"menuCode\":\"my_reservations\",\"name\":\"我的预约\",\"pageType\":\"current_user_list\",\"parentPageCode\":\"\",\"path\":\"/my-reservations\",\"tableName\":\"reservation\"},{\"code\":\"reader_profile_page\",\"menuCode\":\"reader_profile\",\"name\":\"个人资料\",\"pageType\":\"form\",\"parentPageCode\":\"\",\"path\":\"/reader/profile\",\"tableName\":\"reader\"}],\"roles\":[{\"code\":\"admin\",\"description\":\"系统管理员,管理图书、借阅、公告等\",\"name\":\"管理员\"},{\"code\":\"reader\",\"description\":\"普通用户,借书、还书、预约图书\",\"name\":\"读者\"}]}}', '[\n {\n \"version\": \"1.0\",\n \"code\": \"borrow_record_flow\",\n \"name\": \"借阅管理流程\",\n \"mainTable\": \"borrow_record\",\n \"statusField\": \"status\",\n \"notFoundMessage\": \"借阅记录不存在\",\n \"states\": [\n {\"code\": \"pending\", \"label\": \"待审核\"},\n {\"code\": \"borrowing\", \"label\": \"借阅中\"},\n {\"code\": \"returned\", \"label\": \"已归还\"},\n {\"code\": \"rejected\", \"label\": \"已拒绝\"}\n ],\n \"actions\": [\n {\n \"code\": \"approve_borrow\",\n \"name\": \"审核通过\",\n \"from\": \"pending\",\n \"to\": \"borrowing\",\n \"actor\": \"admin\",\n \"method\": \"POST\",\n \"path\": \"/borrow-record/approve\",\n \"invalidStateMessage\": \"当前状态不能审核\",\n \"successMessage\": \"借书审核通过\",\n \"audit\": {\"userField\": \"approve_user_id\", \"timeField\": \"approve_time\"},\n \"effects\": [\n {\n \"type\": \"decrease\",\n \"table\": \"book_info\",\n \"relationField\": \"book_id\",\n \"field\": \"stock\",\n \"amount\": \"1\",\n \"min\": \"0\",\n \"notFoundMessage\": \"图书不存在\",\n \"errorMessage\": \"图书库存不足\"\n }\n ],\n \"button\": {\n \"scope\": \"admin\",\n \"pageCode\": \"borrow_admin_page\",\n \"slot\": \"list.rowActions\",\n \"type\": \"primary\",\n \"confirm\": \"确认审核通过吗?\",\n \"order\": 10\n }\n },\n {\n \"code\": \"reject_borrow\",\n \"name\": \"拒绝借书\",\n \"from\": \"pending\",\n \"to\": \"rejected\",\n \"actor\": \"admin\",\n \"method\": \"POST\",\n \"path\": \"/borrow-record/reject\",\n \"invalidStateMessage\": \"当前状态不能拒绝\",\n \"successMessage\": \"已拒绝借书申请\",\n \"audit\": {\"userField\": \"approve_user_id\", \"timeField\": \"approve_time\"},\n \"effects\": [],\n \"button\": {\n \"scope\": \"admin\",\n \"pageCode\": \"borrow_admin_page\",\n \"slot\": \"list.rowActions\",\n \"type\": \"danger\",\n \"confirm\": \"确认拒绝吗?\",\n \"order\": 20\n }\n },\n {\n \"code\": \"return_book\",\n \"name\": \"归还图书\",\n \"from\": \"borrowing\",\n \"to\": \"returned\",\n \"actor\": \"admin\",\n \"method\": \"POST\",\n \"path\": \"/borrow-record/return\",\n \"invalidStateMessage\": \"当前状态不能归还\",\n \"successMessage\": \"归还成功\",\n \"audit\": {\"userField\": \"return_user_id\", \"timeField\": \"return_time\"},\n \"effects\": [\n {\n \"type\": \"increase\",\n \"table\": \"book_info\",\n \"relationField\": \"book_id\",\n \"field\": \"stock\",\n \"amount\": \"1\",\n \"notFoundMessage\": \"图书不存在\",\n \"errorMessage\": \"归还失败\"\n }\n ],\n \"button\": {\n \"scope\": \"admin\",\n \"pageCode\": \"borrow_admin_page\",\n \"slot\": \"list.rowActions\",\n \"type\": \"success\",\n \"confirm\": \"确认归还吗?\",\n \"order\": 30\n }\n }\n ],\n \"metrics\": [\n {\n \"code\": \"borrowing_count\",\n \"name\": \"借阅中数量\",\n \"table\": \"borrow_record\",\n \"aggregate\": \"count\",\n \"field\": \"id\",\n \"status\": \"borrowing\",\n \"unit\": \"条\"\n },\n {\n \"code\": \"pending_count\",\n \"name\": \"待审核数量\",\n \"table\": \"borrow_record\",\n \"aggregate\": \"count\",\n \"field\": \"id\",\n \"status\": \"pending\",\n \"unit\": \"条\"\n }\n ]\n },\n {\n \"version\": \"1.0\",\n \"code\": \"reservation_flow\",\n \"name\": \"预约管理流程\",\n \"mainTable\": \"reservation\",\n \"statusField\": \"status\",\n \"notFoundMessage\": \"预约记录不存在\",\n \"states\": [\n {\"code\": \"reserved\", \"label\": \"已预约\"},\n {\"code\": \"cancelled\", \"label\": \"已取消\"},\n {\"code\": \"concluded\", \"label\": \"已完成\"}\n ],\n \"actions\": [\n {\n \"code\": \"reader_cancel_reservation\",\n \"name\": \"取消预约\",\n \"from\": \"reserved\",\n \"to\": \"cancelled\",\n \"actor\": \"reader\",\n \"method\": \"POST\",\n \"path\": \"/reservation/cancel\",\n \"invalidStateMessage\": \"当前状态不能取消\",\n \"successMessage\": \"预约取消成功\",\n \"audit\": {\"userField\": \"cancel_user_id\", \"timeField\": \"cancel_time\"},\n \"effects\": [],\n \"button\": {\n \"scope\": \"self\",\n \"pageCode\": \"my_reservations_page\",\n \"slot\": \"list.rowActions\",\n \"type\": \"default\",\n \"confirm\": \"确认取消预约吗?\",\n \"order\": 10\n }\n },\n {\n \"code\": \"admin_cancel_reservation\",\n \"name\": \"取消预约\",\n \"from\": \"reserved\",\n \"to\": \"cancelled\",\n \"actor\": \"admin\",\n \"method\": \"POST\",\n \"path\": \"/reservation/cancel\",\n \"invalidStateMessage\": \"当前状态不能取消\",\n \"successMessage\": \"预约取消成功\",\n \"audit\": {\"userField\": \"cancel_user_id\", \"timeField\": \"cancel_time\"},\n \"effects\": [],\n \"button\": {\n \"scope\": \"admin\",\n \"pageCode\": \"reservation_admin_page\",\n \"slot\": \"list.rowActions\",\n \"type\": \"default\",\n \"confirm\": \"确认取消预约吗?\",\n \"order\": 10\n }\n },\n {\n \"code\": \"confirm_reservation\",\n \"name\": \"确认取书\",\n \"from\": \"reserved\",\n \"to\": \"concluded\",\n \"actor\": \"admin\",\n \"method\": \"POST\",\n \"path\": \"/reservation/confirm\",\n \"invalidStateMessage\": \"当前状态不能确认\",\n \"successMessage\": \"取书确认成功\",\n \"audit\": {\"userField\": \"confirm_user_id\", \"timeField\": \"confirm_time\"},\n \"effects\": [],\n \"button\": {\n \"scope\": \"admin\",\n \"pageCode\": \"reservation_admin_page\",\n \"slot\": \"list.rowActions\",\n \"type\": \"primary\",\n \"confirm\": \"确认取书吗?\",\n \"order\": 20\n }\n }\n ],\n \"metrics\": [\n {\n \"code\": \"reserved_count\",\n \"name\": \"预约中数量\",\n \"table\": \"reservation\",\n \"aggregate\": \"count\",\n \"field\": \"id\",\n \"status\": \"reserved\",\n \"unit\": \"条\"\n }\n ]\n }\n]', '0', 81571, 2013, 640, 1373, 8776, 7153, 2013, 8776, 10789, 2, 0.01893780, '1', NULL, '2026-07-14 22:24:29');
INSERT INTO `front_ai_usage_ledger` VALUES (147, 112, 112, 108, 100, 'flow_config', 'deepseek', 'deepseek-v4-flash', 'front.flow_config', 'V2', '493bfe3aa6bafe555f3fedab46a75c8364c303c2a589b1ffaa01196a93c6472f', '你是业务流程配置设计器。只输出一个合法 JSON 对象,不输出 Markdown、解释或 SQL。\n\n目标用最小 flow_config 描述状态流转、显式 Java 业务动作、多表数量联动、按钮和统计。不要输出 CRUD不要输出通用规则 DSL。\n\n固定结构\n{\n \"version\":\"1.0\",\n \"code\":\"snake_case\",\n \"name\":\"中文业务名\",\n \"mainTable\":\"snake_case\",\n \"statusField\":\"status\",\n \"notFoundMessage\":\"主记录不存在\",\n \"states\":[{\"code\":\"pending\",\"label\":\"待审核\"}],\n \"actions\":[{\n \"code\":\"approve\",\n \"name\":\"审核通过\",\n \"from\":\"pending\",\n \"to\":\"borrowing\",\n \"actor\":\"admin\",\n \"method\":\"POST\",\n \"path\":\"/borrow-record/approve\",\n \"invalidStateMessage\":\"当前状态不能审核\",\n \"successMessage\":\"审核成功\",\n \"audit\":{\"userField\":\"approve_user_id\",\"timeField\":\"approve_time\"},\n \"effects\":[{\n \"type\":\"decrease\",\n \"table\":\"book\",\n \"relationField\":\"book_id\",\n \"field\":\"stock\",\n \"amount\":\"1\",\n \"min\":\"0\",\n \"notFoundMessage\":\"图书不存在\",\n \"errorMessage\":\"图书库存不足\"\n }],\n \"button\":{\"scope\":\"admin\",\"pageCode\":\"borrow_record_list\",\"slot\":\"list.rowActions\",\"type\":\"success\",\"confirm\":\"确认审核通过吗?\",\"order\":10}\n }],\n \"metrics\":[{\"code\":\"borrowing_count\",\"name\":\"借阅中数量\",\"table\":\"borrow_record\",\"aggregate\":\"count\",\"field\":\"id\",\"status\":\"borrowing\",\"unit\":\"条\"}]\n}\n\n约束\n1. code、表名、字段名全部使用小写 snake_case状态 code 使用稳定英文编码label 使用中文。\n2. 每个 action 必须有 from 和 to且二者存在于 states 中并且不相同。\n3. effects.type 只能是 decrease、increase、update_related、create_record。\n4. decrease/increase 必须给 table、relationField、field、amountdecrease 还要给 min。\n5. update_related/create_record 使用 values值可为 currentUserId、now、record.字段名或常量。\n6. 审核人等身份只能通过 audit.userField 表达,由后端登录态注入,不能作为前端可传字段。\n7. 覆盖需求中的完整正向闭环和关键回退/拒绝动作,但不要为普通 CRUD 创建 action。\n8. metrics.status 如果填写,必须完全等于 states 中某个 code统计全状态数据或不能确定状态时省略 status。\n9. button.pageCode 必须引用 appBlueprint 中已有页面button.slot 只能是 list.toolbarActions、list.rowActions、detail.primaryActions、detail.secondaryActions、form.footerActions。详情页主操作使用 detail.primaryActions列表记录操作使用 list.rowActions禁止使用 page.actions 等自定义值。', '请根据以下 JSON 上下文生成 flow_config。appBlueprint 是已确认的页面、角色和菜单范围,必须与它保持一致:\n{\"mode\":\"correction\",\"projectName\":\"图书管理系统\",\"projectDescription\":\"功能:借书、还书、预约、取消预约\\n角色用户、管理员\\n其他模块轮播图、公告、新闻\",\"industryTemplate\":\"\",\"stylePreset\":\"business_clean\",\"extraRequirements\":\"\",\"confirmedAppBlueprint\":{\"adminHomeDashboard\":{\"charts\":[{\"filters\":[],\"metrics\":[{\"aggregate\":\"count\",\"label\":\"近7天借阅趋势\"}],\"semantic\":\"order\",\"tableName\":\"borrow_record\",\"title\":\"近7天借阅趋势\",\"type\":\"line\"},{\"filters\":[],\"metrics\":[{\"aggregate\":\"count\",\"label\":\"图书分类分布\"}],\"semantic\":\"content\",\"tableName\":\"book_info\",\"title\":\"图书分类分布\",\"type\":\"pie\"}],\"description\":\"核心业务数据\",\"metrics\":[{\"aggregate\":\"COUNT\",\"filters\":[],\"semantic\":\"inventory\",\"tableName\":\"book_info\"},{\"aggregate\":\"COUNT\",\"filters\":[],\"semantic\":\"order\",\"tableName\":\"borrow_record\"},{\"aggregate\":\"COUNT\",\"filters\":[],\"semantic\":\"task\",\"tableName\":\"borrow_record\"},{\"aggregate\":\"COUNT\",\"filters\":[],\"semantic\":\"warning\",\"tableName\":\"reservation\"}],\"title\":\"运营总览\"},\"adminMenus\":[{\"code\":\"book_admin\",\"dataScope\":\"ROLE\",\"name\":\"图书管理\",\"pageCode\":\"book_admin_page\",\"pageType\":\"list\",\"path\":\"/admin/books\",\"requiresLogin\":true,\"tableName\":\"book_info\",\"visibleRoles\":[\"admin\"]},{\"code\":\"borrow_admin\",\"dataScope\":\"ROLE\",\"name\":\"借阅管理\",\"pageCode\":\"borrow_admin_page\",\"pageType\":\"list\",\"path\":\"/admin/borrows\",\"requiresLogin\":true,\"tableName\":\"borrow_record\",\"visibleRoles\":[\"admin\"]},{\"code\":\"reservation_admin\",\"dataScope\":\"ROLE\",\"name\":\"预约管理\",\"pageCode\":\"reservation_admin_page\",\"pageType\":\"list\",\"path\":\"/admin/reservations\",\"requiresLogin\":true,\"tableName\":\"reservation\",\"visibleRoles\":[\"admin\"]},{\"code\":\"announcement_admin\",\"dataScope\":\"ROLE\",\"name\":\"公告管理\",\"pageCode\":\"announcement_admin_page\",\"pageType\":\"list\",\"path\":\"/admin/announcements\",\"requiresLogin\":true,\"tableName\":\"announcement\",\"visibleRoles\":[\"admin\"]},{\"code\":\"news_admin\",\"dataScope\":\"ROLE\",\"name\":\"新闻管理\",\"pageCode\":\"news_admin_page\",\"pageType\":\"list\",\"path\":\"/admin/news\",\"requiresLogin\":true,\"tableName\":\"news\",\"visibleRoles\":[\"admin\"]},{\"code\":\"carousel_admin\",\"dataScope\":\"ROLE\",\"name\":\"轮播图管理\",\"pageCode\":\"carousel_admin_page\",\"pageType\":\"list\",\"path\":\"/admin/carousels\",\"requiresLogin\":true,\"tableName\":\"carousel\",\"visibleRoles\":[\"admin\"]},{\"code\":\"admin_profile\",\"dataScope\":\"ROLE\",\"name\":\"个人资料\",\"pageCode\":\"admin_profile_page\",\"pageType\":\"form\",\"path\":\"/admin/profile\",\"requiresLogin\":true,\"tableName\":\"admin\",\"visibleRoles\":[\"admin\"]}],\"frontendMenus\":[{\"code\":\"book_catalog\",\"dataScope\":\"PUBLIC\",\"name\":\"图书目录\",\"pageCode\":\"book_catalog_page\",\"pageType\":\"\",\"path\":\"/books\",\"requiresLogin\":false,\"tableName\":\"\",\"visibleRoles\":[]},{\"code\":\"announcements\",\"dataScope\":\"PUBLIC\",\"name\":\"公告\",\"pageCode\":\"announcement_list_page\",\"pageType\":\"\",\"path\":\"/announcements\",\"requiresLogin\":false,\"tableName\":\"\",\"visibleRoles\":[]},{\"code\":\"news\",\"dataScope\":\"PUBLIC\",\"name\":\"新闻\",\"pageCode\":\"news_list_page\",\"pageType\":\"\",\"path\":\"/news\",\"requiresLogin\":false,\"tableName\":\"\",\"visibleRoles\":[]},{\"code\":\"my_borrows\",\"dataScope\":\"CURRENT_USER\",\"name\":\"我的借阅\",\"pageCode\":\"my_borrows_page\",\"pageType\":\"\",\"path\":\"/my-borrows\",\"requiresLogin\":true,\"tableName\":\"\",\"visibleRoles\":[\"reader\"]},{\"code\":\"my_reservations\",\"dataScope\":\"CURRENT_USER\",\"name\":\"我的预约\",\"pageCode\":\"my_reservations_page\",\"pageType\":\"\",\"path\":\"/my-reservations\",\"requiresLogin\":true,\"tableName\":\"\",\"visibleRoles\":[\"reader\"]},{\"code\":\"reader_profile\",\"dataScope\":\"CURRENT_USER\",\"name\":\"个人中心\",\"pageCode\":\"reader_profile_page\",\"pageType\":\"\",\"path\":\"/reader/profile\",\"requiresLogin\":true,\"tableName\":\"\",\"visibleRoles\":[\"reader\"]}],\"frontendPages\":[{\"code\":\"book_catalog_page\",\"menuCode\":\"book_catalog\",\"name\":\"图书目录\",\"pageType\":\"list\",\"parentPageCode\":\"\",\"path\":\"/books\",\"tableName\":\"book_info\"},{\"code\":\"book_detail_page\",\"menuCode\":\"book_catalog\",\"name\":\"图书详情\",\"pageType\":\"detail\",\"parentPageCode\":\"\",\"path\":\"/books/:id\",\"tableName\":\"book_info\"},{\"code\":\"announcement_list_page\",\"menuCode\":\"announcements\",\"name\":\"公告列表\",\"pageType\":\"list\",\"parentPageCode\":\"\",\"path\":\"/announcements\",\"tableName\":\"announcement\"},{\"code\":\"news_list_page\",\"menuCode\":\"news\",\"name\":\"新闻列表\",\"pageType\":\"list\",\"parentPageCode\":\"\",\"path\":\"/news\",\"tableName\":\"news\"},{\"code\":\"my_borrows_page\",\"menuCode\":\"my_borrows\",\"name\":\"我的借阅\",\"pageType\":\"current_user_list\",\"parentPageCode\":\"\",\"path\":\"/my-borrows\",\"tableName\":\"borrow_record\"},{\"code\":\"my_reservations_page\",\"menuCode\":\"my_reservations\",\"name\":\"我的预约\",\"pageType\":\"current_user_list\",\"parentPageCode\":\"\",\"path\":\"/my-reservations\",\"tableName\":\"reservation\"},{\"code\":\"reader_profile_page\",\"menuCode\":\"reader_profile\",\"name\":\"个人资料\",\"pageType\":\"form\",\"parentPageCode\":\"\",\"path\":\"/reader/profile\",\"tableName\":\"reader\"}],\"roles\":[{\"code\":\"admin\",\"description\":\"系统管理员,管理图书、借阅、公告等\",\"name\":\"管理员\"},{\"code\":\"reader\",\"description\":\"普通用户,借书、还书、预约图书\",\"name\":\"读者\"}]},\"validationError\":\"expect {, but [, class com.ruoyi.generator.domain.front.dto.SimpleFlowConfig, offset 1, character [, line 1, column 1, fastjson-version 2.0.53 [\\n {\\n \\\"version\\\": \\\"1.0\\\",\\n \\\"code\\\": \\\"borrow_record_flow\\\",\\n \\\"name\\\": \\\"借阅管理流程\\\",\\n \\\"mainTable\\\": \\\"borrow_record\\\",\\n \\\"statusField\\\": \\\"status\\\",\\n \\\"notFoundMessage\\\": \\\"借阅记录不存在\\\",\\n \\\"states\\\": [\\n {\\\"code\\\": \\\"pending\\\", \\\"label\\\": \\\"待审核\\\"},\\n {\\\"code\\\": \\\"borrowing\\\", \\\"label\\\": \\\"借阅中\\\"},\\n {\\\"code\\\": \\\"returned\\\", \\\"label\\\": \\\"已归还\\\"},\\n {\\\"code\\\": \\\"rejected\\\", \\\"label\\\": \\\"已拒绝\\\"}\\n ],\\n \\\"actions\\\": [\\n {\\n \\\"code\\\": \\\"approve_borrow\\\",\\n \\\"name\\\": \\\"审核通过\\\",\\n \\\"from\\\": \\\"pending\\\",\\n \\\"to\\\": \\\"borrowing\\\",\\n \\\"actor\\\": \\\"admin\\\",\\n \\\"method\\\": \\\"POST\\\",\\n \\\"path\\\": \\\"/borrow-record/approve\\\",\\n \\\"invalidStateMessage\\\": \\\"当前状态不能审核\\\",\\n \\\"successMessage\\\": \\\"借书审核通过\\\",\\n \\\"audit\\\": {\\\"userField\\\": \\\"approve_user_id\\\", \\\"timeField\\\": \\\"approve_time\\\"},\\n \\\"effects\\\": [\\n {\\n \\\"type\\\": \\\"decrease\\\",\\n \\\"table\\\": \\\"book_info\\\",\\n \\\"relationField\\\": \\\"book_id\\\",\\n \\\"field\\\": \\\"stock\\\",\\n \\\"amount\\\": \\\"1\\\",\\n \\\"min\\\": \\\"0\\\",\\n \\\"notFoundMessage\\\": \\\"图书不存在\\\",\\n \\\"errorMessage\\\": \\\"图书库存不足\\\"\\n }\\n ],\\n \\\"button\\\": {\\n \\\"scope\\\": \\\"admin\\\",\\n \\\"pageCode\\\": \\\"borrow_admin_page\\\",\\n \\\"slot\\\": \\\"list.rowActions\\\",\\n \\\"type\\\": \\\"primary\\\",\\n \\\"confirm\\\": \\\"确认审核通过吗?\\\",\\n \\\"order\\\": 10\\n }\\n },\\n {\\n \\\"code\\\": \\\"reject_borrow\\\",\\n \\\"name\\\": \\\"拒绝借书\\\",\\n \\\"from\\\": \\\"pending\\\",\\n \\\"to\\\": \\\"rejected\\\",\\n \\\"actor\\\": \\\"admin\\\",\\n \\\"method\\\": \\\"POST\\\",\\n \\\"path\\\": \\\"/borrow-record/reject\\\",\\n \\\"invalidStateMessage\\\": \\\"当前状态不能拒绝\\\",\\n \\\"successMessage\\\": \\\"已拒绝借书申请\\\",\\n \\\"audit\\\": {\\\"userField\\\": \\\"approve_user_id\\\", \\\"timeField\\\": \\\"approve_time\\\"},\\n \\\"effects\\\": [],\\n \\\"button\\\": {\\n \\\"scope\\\": \\\"admin\\\",\\n \\\"pageCode\\\": \\\"borrow_admin_page\\\",\\n \\\"slot\\\": \\\"list.rowActions\\\",\\n \\\"type\\\": \\\"danger\\\",\\n \\\"confirm\\\": \\\"确认拒绝吗?\\\",\\n \\\"order\\\": 20\\n }\\n },\\n {\\n \\\"code\\\": \\\"return_book\\\",\\n \\\"name\\\": \\\"归还图书\\\",\\n \\\"from\\\": \\\"borrowing\\\",\\n \\\"to\\\": \\\"returned\\\",\\n \\\"actor\\\": \\\"admin\\\",\\n \\\"method\\\": \\\"POST\\\",\\n \\\"path\\\": \\\"/borrow-record/return\\\",\\n \\\"invalidStateMessage\\\": \\\"当前状态不能归还\\\",\\n \\\"successMessage\\\": \\\"归还成功\\\",\\n \\\"audit\\\": {\\\"userField\\\": \\\"return_user_id\\\", \\\"timeField\\\": \\\"return_time\\\"},\\n \\\"effects\\\": [\\n {\\n \\\"type\\\": \\\"increase\\\",\\n \\\"table\\\": \\\"book_info\\\",\\n \\\"relationField\\\": \\\"book_id\\\",\\n \\\"field\\\": \\\"stock\\\",\\n \\\"amount\\\": \\\"1\\\",\\n \\\"notFoundMessage\\\": \\\"图书不存在\\\",\\n \\\"errorMessage\\\": \\\"归还失败\\\"\\n }\\n ],\\n \\\"button\\\": {\\n \\\"scope\\\": \\\"admin\\\",\\n \\\"pageCode\\\": \\\"borrow_admin_page\\\",\\n \\\"slot\\\": \\\"list.rowActions\\\",\\n \\\"type\\\": \\\"success\\\",\\n \\\"confirm\\\": \\\"确认归还吗?\\\",\\n \\\"order\\\": 30\\n }\\n }\\n ],\\n \\\"metrics\\\": [\\n {\\n \\\"code\\\": \\\"borrowing_count\\\",\\n \\\"name\\\": \\\"借阅中数量\\\",\\n \\\"table\\\": \\\"borrow_record\\\",\\n \\\"aggregate\\\": \\\"count\\\",\\n \\\"field\\\": \\\"id\\\",\\n \\\"status\\\": \\\"borrowing\\\",\\n \\\"unit\\\": \\\"条\\\"\\n },\\n {\\n \\\"code\\\": \\\"pending_count\\\",\\n \\\"name\\\": \\\"待审核数量\\\",\\n \\\"table\\\": \\\"borrow_record\\\",\\n \\\"aggregate\\\": \\\"count\\\",\\n \\\"field\\\": \\\"id\\\",\\n \\\"status\\\": \\\"pending\\\",\\n \\\"unit\\\": \\\"条\\\"\\n }\\n ]\\n },\\n {\\n \\\"version\\\": \\\"1.0\\\",\\n \\\"code\\\": \\\"reservation_flow\\\",\\n \\\"name\\\": \\\"预约管理流程\\\",\\n \\\"mainTable\\\": \\\"reservation\\\",\\n \\\"statusField\\\": \\\"status\\\",\\n \\\"notFoundMessage\\\": \\\"预约记录不存在\\\",\\n \\\"states\\\": [\\n {\\\"code\\\": \\\"reserved\\\", \\\"label\\\": \\\"已预约\\\"},\\n {\\\"code\\\": \\\"cancelled\\\", \\\"label\\\": \\\"已取消\\\"},\\n {\\\"code\\\": \\\"concluded\\\", \\\"label\\\": \\\"已完成\\\"}\\n ],\\n \\\"actions\\\": [\\n {\\n \\\"code\\\": \\\"reader_cancel_reservation\\\",\\n \\\"name\\\": \\\"取消预约\\\",\\n \\\"from\\\": \\\"reserved\\\",\\n \\\"to\\\": \\\"cancelled\\\",\\n \\\"actor\\\": \\\"reader\\\",\\n \\\"method\\\": \\\"POST\\\",\\n \\\"path\\\": \\\"/reservation/cancel\\\",\\n \\\"invalidStateMessage\\\": \\\"当前状态不能取消\\\",\\n \\\"successMessage\\\": \\\"预约取消成功\\\",\\n \\\"audit\\\": {\\\"userField\\\": \\\"cancel_user_id\\\", \\\"timeField\\\": \\\"cancel_time\\\"},\\n \\\"effects\\\": [],\\n \\\"button\\\": {\\n \\\"scope\\\": \\\"self\\\",\\n \\\"pageCode\\\": \\\"my_reservations_page\\\",\\n \\\"slot\\\": \\\"list.rowActions\\\",\\n \\\"type\\\": \\\"default\\\",\\n \\\"confirm\\\": \\\"确认取消预约吗?\\\",\\n \\\"order\\\": 10\\n }\\n },\\n {\\n \\\"code\\\": \\\"admin_cancel_reservation\\\",\\n \\\"name\\\": \\\"取消预约\\\",\\n \\\"from\\\": \\\"reserved\\\",\\n \\\"to\\\": \\\"cancelled\\\",\\n \\\"actor\\\": \\\"admin\\\",\\n \\\"method\\\": \\\"POST\\\",\\n \\\"path\\\": \\\"/reservation/cancel\\\",\\n \\\"invalidStateMessage\\\": \\\"当前状态不能取消\\\",\\n \\\"successMessage\\\": \\\"预约取消成功\\\",\\n \\\"audit\\\": {\\\"userField\\\": \\\"cancel_user_id\\\", \\\"timeField\\\": \\\"cancel_time\\\"},\\n \\\"effects\\\": [],\\n \\\"button\\\": {\\n \\\"scope\\\": \\\"admin\\\",\\n \\\"pageCode\\\": \\\"reservation_admin_page\\\",\\n \\\"slot\\\": \\\"list.rowActions\\\",\\n \\\"type\\\": \\\"default\\\",\\n \\\"confirm\\\": \\\"确认取消预约吗?\\\",\\n \\\"order\\\": 10\\n }\\n },\\n {\\n \\\"code\\\": \\\"confirm_reservation\\\",\\n \\\"name\\\": \\\"确认取书\\\",\\n \\\"from\\\": \\\"reserved\\\",\\n \\\"to\\\": \\\"concluded\\\",\\n \\\"actor\\\": \\\"admin\\\",\\n \\\"method\\\": \\\"POST\\\",\\n \\\"path\\\": \\\"/reservation/confirm\\\",\\n \\\"invalidStateMessage\\\": \\\"当前状态不能确认\\\",\\n \\\"successMessage\\\": \\\"取书确认成功\\\",\\n \\\"audit\\\": {\\\"userField\\\": \\\"confirm_user_id\\\", \\\"timeField\\\": \\\"confirm_time\\\"},\\n \\\"effects\\\": [],\\n \\\"button\\\": {\\n \\\"scope\\\": \\\"admin\\\",\\n \\\"pageCode\\\": \\\"reservation_admin_page\\\",\\n \\\"slot\\\": \\\"list.rowActions\\\",\\n \\\"type\\\": \\\"primary\\\",\\n \\\"confirm\\\": \\\"确认取书吗?\\\",\\n \\\"order\\\": 20\\n }\\n }\\n ],\\n \\\"metrics\\\": [\\n {\\n \\\"code\\\": \\\"reserved_count\\\",\\n \\\"name\\\": \\\"预约中数量\\\",\\n \\\"table\\\": \\\"reservation\\\",\\n \\\"aggregate\\\": \\\"count\\\",\\n \\\"field\\\": \\\"id\\\",\\n \\\"status\\\": \\\"reserved\\\",\\n \\\"unit\\\": \\\"条\\\"\\n }\\n ]\\n }\\n]\",\"originalResponse\":[{\"version\":\"1.0\",\"code\":\"borrow_record_flow\",\"name\":\"借阅管理流程\",\"mainTable\":\"borrow_record\",\"statusField\":\"status\",\"notFoundMessage\":\"借阅记录不存在\",\"states\":[{\"code\":\"pending\",\"label\":\"待审核\"},{\"code\":\"borrowing\",\"label\":\"借阅中\"},{\"code\":\"returned\",\"label\":\"已归还\"},{\"code\":\"rejected\",\"label\":\"已拒绝\"}],\"actions\":[{\"code\":\"approve_borrow\",\"name\":\"审核通过\",\"from\":\"pending\",\"to\":\"borrowing\",\"actor\":\"admin\",\"method\":\"POST\",\"path\":\"/borrow-record/approve\",\"invalidStateMessage\":\"当前状态不能审核\",\"successMessage\":\"借书审核通过\",\"audit\":{\"userField\":\"approve_user_id\",\"timeField\":\"approve_time\"},\"effects\":[{\"type\":\"decrease\",\"table\":\"book_info\",\"relationField\":\"book_id\",\"field\":\"stock\",\"amount\":\"1\",\"min\":\"0\",\"notFoundMessage\":\"图书不存在\",\"errorMessage\":\"图书库存不足\"}],\"button\":{\"scope\":\"admin\",\"pageCode\":\"borrow_admin_page\",\"slot\":\"list.rowActions\",\"type\":\"primary\",\"confirm\":\"确认审核通过吗?\",\"order\":10}},{\"code\":\"reject_borrow\",\"name\":\"拒绝借书\",\"from\":\"pending\",\"to\":\"rejected\",\"actor\":\"admin\",\"method\":\"POST\",\"path\":\"/borrow-record/reject\",\"invalidStateMessage\":\"当前状态不能拒绝\",\"successMessage\":\"已拒绝借书申请\",\"audit\":{\"userField\":\"approve_user_id\",\"timeField\":\"approve_time\"},\"effects\":[],\"button\":{\"scope\":\"admin\",\"pageCode\":\"borrow_admin_page\",\"slot\":\"list.rowActions\",\"type\":\"danger\",\"confirm\":\"确认拒绝吗?\",\"order\":20}},{\"code\":\"return_book\",\"name\":\"归还图书\",\"from\":\"borrowing\",\"to\":\"returned\",\"actor\":\"admin\",\"method\":\"POST\",\"path\":\"/borrow-record/return\",\"invalidStateMessage\":\"当前状态不能归还\",\"successMessage\":\"归还成功\",\"audit\":{\"userField\":\"return_user_id\",\"timeField\":\"return_time\"},\"effects\":[{\"type\":\"increase\",\"table\":\"book_info\",\"relationField\":\"book_id\",\"field\":\"stock\",\"amount\":\"1\",\"notFoundMessage\":\"图书不存在\",\"errorMessage\":\"归还失败\"}],\"button\":{\"scope\":\"admin\",\"pageCode\":\"borrow_admin_page\",\"slot\":\"list.rowActions\",\"type\":\"success\",\"confirm\":\"确认归还吗?\",\"order\":30}}],\"metrics\":[{\"code\":\"borrowing_count\",\"name\":\"借阅中数量\",\"table\":\"borrow_record\",\"aggregate\":\"count\",\"field\":\"id\",\"status\":\"borrowing\",\"unit\":\"条\"},{\"code\":\"pending_count\",\"name\":\"待审核数量\",\"table\":\"borrow_record\",\"aggregate\":\"count\",\"field\":\"id\",\"status\":\"pending\",\"unit\":\"条\"}]},{\"version\":\"1.0\",\"code\":\"reservation_flow\",\"name\":\"预约管理流程\",\"mainTable\":\"reservation\",\"statusField\":\"status\",\"notFoundMessage\":\"预约记录不存在\",\"states\":[{\"code\":\"reserved\",\"label\":\"已预约\"},{\"code\":\"cancelled\",\"label\":\"已取消\"},{\"code\":\"concluded\",\"label\":\"已完成\"}],\"actions\":[{\"code\":\"reader_cancel_reservation\",\"name\":\"取消预约\",\"from\":\"reserved\",\"to\":\"cancelled\",\"actor\":\"reader\",\"method\":\"POST\",\"path\":\"/reservation/cancel\",\"invalidStateMessage\":\"当前状态不能取消\",\"successMessage\":\"预约取消成功\",\"audit\":{\"userField\":\"cancel_user_id\",\"timeField\":\"cancel_time\"},\"effects\":[],\"button\":{\"scope\":\"self\",\"pageCode\":\"my_reservations_page\",\"slot\":\"list.rowActions\",\"type\":\"default\",\"confirm\":\"确认取消预约吗?\",\"order\":10}},{\"code\":\"admin_cancel_reservation\",\"name\":\"取消预约\",\"from\":\"reserved\",\"to\":\"cancelled\",\"actor\":\"admin\",\"method\":\"POST\",\"path\":\"/reservation/cancel\",\"invalidStateMessage\":\"当前状态不能取消\",\"successMessage\":\"预约取消成功\",\"audit\":{\"userField\":\"cancel_user_id\",\"timeField\":\"cancel_time\"},\"effects\":[],\"button\":{\"scope\":\"admin\",\"pageCode\":\"reservation_admin_page\",\"slot\":\"list.rowActions\",\"type\":\"default\",\"confirm\":\"确认取消预约吗?\",\"order\":10}},{\"code\":\"confirm_reservation\",\"name\":\"确认取书\",\"from\":\"reserved\",\"to\":\"concluded\",\"actor\":\"admin\",\"method\":\"POST\",\"path\":\"/reservation/confirm\",\"invalidStateMessage\":\"当前状态不能确认\",\"successMessage\":\"取书确认成功\",\"audit\":{\"userField\":\"confirm_user_id\",\"timeField\":\"confirm_time\"},\"effects\":[],\"button\":{\"scope\":\"admin\",\"pageCode\":\"reservation_admin_page\",\"slot\":\"list.rowActions\",\"type\":\"primary\",\"confirm\":\"确认取书吗?\",\"order\":20}}],\"metrics\":[{\"code\":\"reserved_count\",\"name\":\"预约中数量\",\"table\":\"reservation\",\"aggregate\":\"count\",\"field\":\"id\",\"status\":\"reserved\",\"unit\":\"条\"}]}]}', '{\n \"version\": \"1.0\",\n \"code\": \"borrow_record_flow\",\n \"name\": \"借阅管理流程\",\n \"mainTable\": \"borrow_record\",\n \"statusField\": \"status\",\n \"notFoundMessage\": \"借阅记录不存在\",\n \"states\": [\n {\"code\": \"pending\", \"label\": \"待审核\"},\n {\"code\": \"borrowing\", \"label\": \"借阅中\"},\n {\"code\": \"returned\", \"label\": \"已归还\"},\n {\"code\": \"rejected\", \"label\": \"已拒绝\"}\n ],\n \"actions\": [\n {\n \"code\": \"approve_borrow\",\n \"name\": \"审核通过\",\n \"from\": \"pending\",\n \"to\": \"borrowing\",\n \"actor\": \"admin\",\n \"method\": \"POST\",\n \"path\": \"/borrow-record/approve\",\n \"invalidStateMessage\": \"当前状态不能审核\",\n \"successMessage\": \"借书审核通过\",\n \"audit\": {\"userField\": \"approve_user_id\", \"timeField\": \"approve_time\"},\n \"effects\": [\n {\n \"type\": \"decrease\",\n \"table\": \"book_info\",\n \"relationField\": \"book_id\",\n \"field\": \"stock\",\n \"amount\": \"1\",\n \"min\": \"0\",\n \"notFoundMessage\": \"图书不存在\",\n \"errorMessage\": \"图书库存不足\"\n }\n ],\n \"button\": {\n \"scope\": \"admin\",\n \"pageCode\": \"borrow_admin_page\",\n \"slot\": \"list.rowActions\",\n \"type\": \"primary\",\n \"confirm\": \"确认审核通过吗?\",\n \"order\": 10\n }\n },\n {\n \"code\": \"reject_borrow\",\n \"name\": \"拒绝借书\",\n \"from\": \"pending\",\n \"to\": \"rejected\",\n \"actor\": \"admin\",\n \"method\": \"POST\",\n \"path\": \"/borrow-record/reject\",\n \"invalidStateMessage\": \"当前状态不能拒绝\",\n \"successMessage\": \"已拒绝借书申请\",\n \"audit\": {\"userField\": \"approve_user_id\", \"timeField\": \"approve_time\"},\n \"effects\": [],\n \"button\": {\n \"scope\": \"admin\",\n \"pageCode\": \"borrow_admin_page\",\n \"slot\": \"list.rowActions\",\n \"type\": \"danger\",\n \"confirm\": \"确认拒绝吗?\",\n \"order\": 20\n }\n },\n {\n \"code\": \"return_book\",\n \"name\": \"归还图书\",\n \"from\": \"borrowing\",\n \"to\": \"returned\",\n \"actor\": \"admin\",\n \"method\": \"POST\",\n \"path\": \"/borrow-record/return\",\n \"invalidStateMessage\": \"当前状态不能归还\",\n \"successMessage\": \"归还成功\",\n \"audit\": {\"userField\": \"return_user_id\", \"timeField\": \"return_time\"},\n \"effects\": [\n {\n \"type\": \"increase\",\n \"table\": \"book_info\",\n \"relationField\": \"book_id\",\n \"field\": \"stock\",\n \"amount\": \"1\",\n \"notFoundMessage\": \"图书不存在\",\n \"errorMessage\": \"归还失败\"\n }\n ],\n \"button\": {\n \"scope\": \"admin\",\n \"pageCode\": \"borrow_admin_page\",\n \"slot\": \"list.rowActions\",\n \"type\": \"success\",\n \"confirm\": \"确认归还吗?\",\n \"order\": 30\n }\n }\n ],\n \"metrics\": [\n {\n \"code\": \"borrowing_count\",\n \"name\": \"借阅中数量\",\n \"table\": \"borrow_record\",\n \"aggregate\": \"count\",\n \"field\": \"id\",\n \"status\": \"borrowing\",\n \"unit\": \"条\"\n },\n {\n \"code\": \"pending_count\",\n \"name\": \"待审核数量\",\n \"table\": \"borrow_record\",\n \"aggregate\": \"count\",\n \"field\": \"id\",\n \"status\": \"pending\",\n \"unit\": \"条\"\n }\n ]\n}', '0', 21411, 5134, 640, 4494, 2327, 1410, 5134, 2327, 7461, 1, 0.00916080, '1', NULL, '2026-07-14 22:24:50');
INSERT INTO `front_ai_usage_ledger` VALUES (148, 112, 112, 108, 100, 'database', 'deepseek', 'deepseek-v4-flash', 'front.database', 'V2', 'c7d0a32ce0b0055ac80348fb10c1beb758034b9c5b5637694725425bb7937cbc', '你是 MySQL 业务数据库设计专家。只输出符合用户消息结构的 JSON根据已确认的应用蓝图和业务闭环生成可直接落地的表、字段、主外键、字典和表操作策略。字段必须业务化且类型合法所有蓝图与闭环引用必须有真实表字段承载不得生成菜单、权限关系、代码或业务动作。flowConfig.actions[].audit 中非空的 userField 和 timeField 必须是 mainTable 的真实字段userField 使用 bigint(20)timeField 使用 datetime。', '根据项目输入 JSON 生成 MySQL 数据库设计 JSON只返回 JSON不要 Markdown 围栏或解释。\nConfirmed app blueprint JSON and Confirmed business loop plan JSON are supplied in the input.\nDatabase generation constraints from the business loop plan must be enforced.\nEvery confirmedBusinessLoopPlan.metrics tableName, field, and filters.field must exist in the generated schema. Numeric sum/avg/min/max metric fields must use a compatible numeric column type. Status-filter metric values must remain compatible with the matching stateMachines.states.\nIf input.mode is correction, repair input.originalResponse according to input.validationError and return the complete corrected database JSON. Do not drop unrelated valid tables or fields.\n输出结构{\"tables\":[{\"tableName\":\"car_info\",\"tableComment\":\"车辆信息表\",\"adminMenuName\":\"车辆管理\",\"operations\":{\"add\":true,\"edit\":true,\"remove\":true,\"removeType\":\"physical\",\"reason\":\"\"},\"columns\":[{\"columnName\":\"id\",\"columnLabel\":\"ID\",\"columnComment\":\"主键ID\",\"columnType\":\"bigint(20)\",\"isPk\":\"1\",\"isIncrement\":\"1\",\"isRequired\":\"1\"}]}]}。\n不要使用 field_1 等占位字段;每个表必须包含非空 columns以及 adminMenuName 和 operations.add/edit/remove/removeType/reason。\nadminMenuName 必须来自本表 tableComment/tableName不得复用其他表或宽泛模块名称。\nadminMenuName must come from that table\'s own tableComment or tableName.\n字段数组名称只能是 columns不能使用 fields、fieldDesign、fieldList、columnList。\nEvery table must include a non-empty columns array; use columns exactly.\n每个字段必须包含 columnName、columnLabel、columnComment、columnType、isPk、isIncrement、isRequired。columnLabel 是短 UI 标签columnComment 是完整数据库说明。\n可提供 javaType、htmlTypehtmlType 只能是 input、textarea、select、radio、checkbox、datetime、imageUpload、fileUpload、editor。\nselect/radio/checkbox 应提供 dictType 和 dictOptions。关联选择使用 remote:target_table:value_field:label_field且目标表和值/标签字段必须都存在于本次 tables JSON。\n非主键外键字段应在目标表存在时使用 remote select无目标表的分类、类型、状态使用本地 dictOptions 或普通输入。\n普通主数据表除唯一主键外至少包含 4 个业务字段。\n订单、支付、借还、审批、流程、任务、库存记录等动作记录表使用仅新增关系、审计、日志、历史表使用只读普通主数据表使用完整 CRUD。\n不要生成 businessActions、业务动作、工作流、代码、菜单表、user_role、角色权限表或权限表。\nDo not generate menu tables, user_role tables, role-permission tables, or permission tables.\n表名字段名只使用小写字母、数字、下划线每表必须且只能有一个主键。字段类型只能使用 bigint(20)、int(11)、varchar(n)、char(n)、decimal(p,s)、datetime、date、text、longtext。\n为 confirmedAppBlueprint.roles 中每个角色创建独立账号表admin 使用 admin其他角色使用 role.code。不得使用共享用户表或 role_id/role_code/user_role。\n角色账号表包含 `<role_code>_id` 自增主键、username、password_hash、nickname、status、create_time。admin 只能登录后台,非 admin 角色登录前台。\n生成 frontendPages.tableName 引用的全部表;个人资料页必须绑定对应非 admin 角色账号表。requiresLogin=true 且 dataScope=CURRENT_USER 的业务数据通常包含 user_id。\ncanonicalTableRegistry 中的名称是最终规范表名。confirmedBusinessLoopPlan 若出现与其指向同一业务对象的同义表名,必须使用 canonicalTableRegistry 中的名称,不得同时生成两张同义表。\n根据 confirmedBusinessLoopPlan 创建 coreObjects.tableName、actions.ownerTable补齐 stateMachines.statusField、quantityRules.quantityField 以及 recordRules 和动作前置条件需要的字段。状态值不得超出 stateMachines.states。\n严格实现 confirmedBusinessLoopPlan.businessPoliciesTIME_LIMIT 的 startField、dueField 使用 datetimeOVERDUE_FEE 的 dueField 使用 datetime、daysTargetField 使用 int(11)、targetField 使用 decimal(10,2)QUANTITY_LIMIT 的 targetField 使用 int(11) 且默认值为 0。所有政策字段必须位于政策指定的 tableName禁止只把期限或公式写进 columnComment 而不创建字段。\nDo not invent status values outside stateMachines.states.\n严格遵守 input.limits.maxTables 和 maxColumnsPerTable。\n项目输入 JSON\n{\"mode\":\"generate\",\"projectName\":\"图书管理系统\",\"projectDescription\":\"功能:借书、还书、预约、取消预约\\n角色用户、管理员\\n其他模块轮播图、公告、新闻\",\"industryTemplate\":\"\",\"stylePreset\":\"business_clean\",\"extraRequirements\":\"\",\"confirmedAppBlueprint\":{\"adminHomeDashboard\":{\"charts\":[{\"filters\":[],\"metrics\":[{\"aggregate\":\"count\",\"label\":\"近7天借阅趋势\"}],\"semantic\":\"order\",\"tableName\":\"borrow_record\",\"title\":\"近7天借阅趋势\",\"type\":\"line\"},{\"filters\":[],\"metrics\":[{\"aggregate\":\"count\",\"label\":\"图书分类分布\"}],\"semantic\":\"content\",\"tableName\":\"book_info\",\"title\":\"图书分类分布\",\"type\":\"pie\"}],\"description\":\"核心业务数据\",\"metrics\":[{\"aggregate\":\"COUNT\",\"filters\":[],\"semantic\":\"inventory\",\"tableName\":\"book_info\"},{\"aggregate\":\"COUNT\",\"filters\":[],\"semantic\":\"order\",\"tableName\":\"borrow_record\"},{\"aggregate\":\"COUNT\",\"filters\":[],\"semantic\":\"task\",\"tableName\":\"borrow_record\"},{\"aggregate\":\"COUNT\",\"filters\":[],\"semantic\":\"warning\",\"tableName\":\"reservation\"}],\"title\":\"运营总览\"},\"adminMenus\":[{\"code\":\"book_admin\",\"dataScope\":\"ROLE\",\"name\":\"图书管理\",\"pageCode\":\"book_admin_page\",\"pageType\":\"list\",\"path\":\"/admin/books\",\"requiresLogin\":true,\"tableName\":\"book_info\",\"visibleRoles\":[\"admin\"]},{\"code\":\"borrow_admin\",\"dataScope\":\"ROLE\",\"name\":\"借阅管理\",\"pageCode\":\"borrow_admin_page\",\"pageType\":\"list\",\"path\":\"/admin/borrows\",\"requiresLogin\":true,\"tableName\":\"borrow_record\",\"visibleRoles\":[\"admin\"]},{\"code\":\"reservation_admin\",\"dataScope\":\"ROLE\",\"name\":\"预约管理\",\"pageCode\":\"reservation_admin_page\",\"pageType\":\"list\",\"path\":\"/admin/reservations\",\"requiresLogin\":true,\"tableName\":\"reservation\",\"visibleRoles\":[\"admin\"]},{\"code\":\"announcement_admin\",\"dataScope\":\"ROLE\",\"name\":\"公告管理\",\"pageCode\":\"announcement_admin_page\",\"pageType\":\"list\",\"path\":\"/admin/announcements\",\"requiresLogin\":true,\"tableName\":\"announcement\",\"visibleRoles\":[\"admin\"]},{\"code\":\"news_admin\",\"dataScope\":\"ROLE\",\"name\":\"新闻管理\",\"pageCode\":\"news_admin_page\",\"pageType\":\"list\",\"path\":\"/admin/news\",\"requiresLogin\":true,\"tableName\":\"news\",\"visibleRoles\":[\"admin\"]},{\"code\":\"carousel_admin\",\"dataScope\":\"ROLE\",\"name\":\"轮播图管理\",\"pageCode\":\"carousel_admin_page\",\"pageType\":\"list\",\"path\":\"/admin/carousels\",\"requiresLogin\":true,\"tableName\":\"carousel\",\"visibleRoles\":[\"admin\"]},{\"code\":\"admin_profile\",\"dataScope\":\"ROLE\",\"name\":\"个人资料\",\"pageCode\":\"admin_profile_page\",\"pageType\":\"form\",\"path\":\"/admin/profile\",\"requiresLogin\":true,\"tableName\":\"admin\",\"visibleRoles\":[\"admin\"]}],\"frontendMenus\":[{\"code\":\"book_catalog\",\"dataScope\":\"PUBLIC\",\"name\":\"图书目录\",\"pageCode\":\"book_catalog_page\",\"pageType\":\"\",\"path\":\"/books\",\"requiresLogin\":false,\"tableName\":\"\",\"visibleRoles\":[]},{\"code\":\"announcements\",\"dataScope\":\"PUBLIC\",\"name\":\"公告\",\"pageCode\":\"announcement_list_page\",\"pageType\":\"\",\"path\":\"/announcements\",\"requiresLogin\":false,\"tableName\":\"\",\"visibleRoles\":[]},{\"code\":\"news\",\"dataScope\":\"PUBLIC\",\"name\":\"新闻\",\"pageCode\":\"news_list_page\",\"pageType\":\"\",\"path\":\"/news\",\"requiresLogin\":false,\"tableName\":\"\",\"visibleRoles\":[]},{\"code\":\"my_borrows\",\"dataScope\":\"CURRENT_USER\",\"name\":\"我的借阅\",\"pageCode\":\"my_borrows_page\",\"pageType\":\"\",\"path\":\"/my-borrows\",\"requiresLogin\":true,\"tableName\":\"\",\"visibleRoles\":[\"reader\"]},{\"code\":\"my_reservations\",\"dataScope\":\"CURRENT_USER\",\"name\":\"我的预约\",\"pageCode\":\"my_reservations_page\",\"pageType\":\"\",\"path\":\"/my-reservations\",\"requiresLogin\":true,\"tableName\":\"\",\"visibleRoles\":[\"reader\"]},{\"code\":\"reader_profile\",\"dataScope\":\"CURRENT_USER\",\"name\":\"个人中心\",\"pageCode\":\"reader_profile_page\",\"pageType\":\"\",\"path\":\"/reader/profile\",\"requiresLogin\":true,\"tableName\":\"\",\"visibleRoles\":[\"reader\"]}],\"frontendPages\":[{\"code\":\"book_catalog_page\",\"menuCode\":\"book_catalog\",\"name\":\"图书目录\",\"pageType\":\"list\",\"parentPageCode\":\"\",\"path\":\"/books\",\"tableName\":\"book_info\"},{\"code\":\"book_detail_page\",\"menuCode\":\"book_catalog\",\"name\":\"图书详情\",\"pageType\":\"detail\",\"parentPageCode\":\"\",\"path\":\"/books/:id\",\"tableName\":\"book_info\"},{\"code\":\"announcement_list_page\",\"menuCode\":\"announcements\",\"name\":\"公告列表\",\"pageType\":\"list\",\"parentPageCode\":\"\",\"path\":\"/announcements\",\"tableName\":\"announcement\"},{\"code\":\"news_list_page\",\"menuCode\":\"news\",\"name\":\"新闻列表\",\"pageType\":\"list\",\"parentPageCode\":\"\",\"path\":\"/news\",\"tableName\":\"news\"},{\"code\":\"my_borrows_page\",\"menuCode\":\"my_borrows\",\"name\":\"我的借阅\",\"pageType\":\"current_user_list\",\"parentPageCode\":\"\",\"path\":\"/my-borrows\",\"tableName\":\"borrow_record\"},{\"code\":\"my_reservations_page\",\"menuCode\":\"my_reservations\",\"name\":\"我的预约\",\"pageType\":\"current_user_list\",\"parentPageCode\":\"\",\"path\":\"/my-reservations\",\"tableName\":\"reservation\"},{\"code\":\"reader_profile_page\",\"menuCode\":\"reader_profile\",\"name\":\"个人资料\",\"pageType\":\"form\",\"parentPageCode\":\"\",\"path\":\"/reader/profile\",\"tableName\":\"reader\"}],\"roles\":[{\"code\":\"admin\",\"description\":\"系统管理员,管理图书、借阅、公告等\",\"name\":\"管理员\"},{\"code\":\"reader\",\"description\":\"普通用户,借书、还书、预约图书\",\"name\":\"读者\"}]},\"flowConfig\":{\"actions\":[{\"actor\":\"admin\",\"audit\":{\"timeField\":\"approve_time\",\"userField\":\"approve_user_id\"},\"button\":{\"confirm\":\"确认审核通过吗?\",\"order\":10,\"pageCode\":\"borrow_admin_page\",\"scope\":\"admin\",\"slot\":\"list.rowActions\",\"type\":\"primary\"},\"code\":\"approve_borrow\",\"effects\":[{\"amount\":\"1\",\"errorMessage\":\"图书库存不足\",\"field\":\"stock\",\"min\":\"0\",\"notFoundMessage\":\"图书不存在\",\"relationField\":\"book_id\",\"table\":\"book_info\",\"type\":\"decrease\",\"values\":{}}],\"from\":\"pending\",\"invalidStateMessage\":\"当前状态不能审核\",\"method\":\"POST\",\"name\":\"审核通过\",\"path\":\"/borrow-record/approve\",\"successMessage\":\"借书审核通过\",\"to\":\"borrowing\"},{\"actor\":\"admin\",\"audit\":{\"timeField\":\"approve_time\",\"userField\":\"approve_user_id\"},\"button\":{\"confirm\":\"确认拒绝吗?\",\"order\":20,\"pageCode\":\"borrow_admin_page\",\"scope\":\"admin\",\"slot\":\"list.rowActions\",\"type\":\"danger\"},\"code\":\"reject_borrow\",\"effects\":[],\"from\":\"pending\",\"invalidStateMessage\":\"当前状态不能拒绝\",\"method\":\"POST\",\"name\":\"拒绝借书\",\"path\":\"/borrow-record/reject\",\"successMessage\":\"已拒绝借书申请\",\"to\":\"rejected\"},{\"actor\":\"admin\",\"audit\":{\"timeField\":\"return_time\",\"userField\":\"return_user_id\"},\"button\":{\"confirm\":\"确认归还吗?\",\"order\":30,\"pageCode\":\"borrow_admin_page\",\"scope\":\"admin\",\"slot\":\"list.rowActions\",\"type\":\"success\"},\"code\":\"return_book\",\"effects\":[{\"amount\":\"1\",\"errorMessage\":\"归还失败\",\"field\":\"stock\",\"min\":\"0\",\"notFoundMessage\":\"图书不存在\",\"relationField\":\"book_id\",\"table\":\"book_info\",\"type\":\"increase\",\"values\":{}}],\"from\":\"borrowing\",\"invalidStateMessage\":\"当前状态不能归还\",\"method\":\"POST\",\"name\":\"归还图书\",\"path\":\"/borrow-record/return\",\"successMessage\":\"归还成功\",\"to\":\"returned\"}],\"code\":\"borrow_record_flow\",\"mainTable\":\"borrow_record\",\"metrics\":[{\"aggregate\":\"count\",\"code\":\"borrowing_count\",\"field\":\"id\",\"name\":\"借阅中数量\",\"status\":\"borrowing\",\"table\":\"borrow_record\",\"unit\":\"条\"},{\"aggregate\":\"count\",\"code\":\"pending_count\",\"field\":\"id\",\"name\":\"待审核数量\",\"status\":\"pending\",\"table\":\"borrow_record\",\"unit\":\"条\"}],\"name\":\"借阅管理流程\",\"notFoundMessage\":\"借阅记录不存在\",\"states\":[{\"code\":\"pending\",\"label\":\"待审核\"},{\"code\":\"borrowing\",\"label\":\"借阅中\"},{\"code\":\"returned\",\"label\":\"已归还\"},{\"code\":\"rejected\",\"label\":\"已拒绝\"}],\"statusField\":\"status\",\"version\":\"1.0\"},\"compiledFlowContract\":{\"acceptanceScenarios\":[],\"actions\":[{\"actor\":\"admin\",\"code\":\"approve_borrow\",\"name\":\"审核通过\",\"ownerObject\":\"borrow_record\",\"ownerTable\":\"borrow_record\",\"preconditions\":[],\"quantityEffects\":[{\"actionCode\":\"approve_borrow\",\"amount\":\"1\",\"effectType\":\"decrease\",\"objectCode\":\"book_info\",\"quantityField\":\"stock\",\"tableName\":\"book_info\"}],\"recordEffects\":[],\"required\":true,\"stateTransitions\":[{\"actionCode\":\"approve_borrow\",\"fromState\":\"pending\",\"toState\":\"borrowing\"}]},{\"actor\":\"admin\",\"code\":\"reject_borrow\",\"name\":\"拒绝借书\",\"ownerObject\":\"borrow_record\",\"ownerTable\":\"borrow_record\",\"preconditions\":[],\"quantityEffects\":[],\"recordEffects\":[],\"required\":true,\"stateTransitions\":[{\"actionCode\":\"reject_borrow\",\"fromState\":\"pending\",\"toState\":\"rejected\"}]},{\"actor\":\"admin\",\"code\":\"return_book\",\"name\":\"归还图书\",\"ownerObject\":\"borrow_record\",\"ownerTable\":\"borrow_record\",\"preconditions\":[],\"quantityEffects\":[{\"actionCode\":\"return_book\",\"amount\":\"1\",\"effectType\":\"increase\",\"objectCode\":\"book_info\",\"quantityField\":\"stock\",\"tableName\":\"book_info\"}],\"recordEffects\":[],\"required\":true,\"stateTransitions\":[{\"actionCode\":\"return_book\",\"fromState\":\"borrowing\",\"toState\":\"returned\"}]}],\"businessPolicies\":[],\"coreObjects\":[{\"code\":\"borrow_record\",\"name\":\"借阅管理流程\",\"objectType\":\"main\",\"tableName\":\"borrow_record\"},{\"code\":\"book_info\",\"name\":\"book_info\",\"objectType\":\"related\",\"tableName\":\"book_info\"}],\"domainName\":\"借阅管理流程\",\"metrics\":[{\"aggregate\":\"count\",\"code\":\"borrowing_count\",\"field\":\"id\",\"filters\":[{\"field\":\"status\",\"operator\":\"eq\",\"values\":[\"borrowing\"]}],\"name\":\"借阅中数量\",\"relatedActionCodes\":[],\"required\":true,\"tableName\":\"borrow_record\",\"unit\":\"条\"},{\"aggregate\":\"count\",\"code\":\"pending_count\",\"field\":\"id\",\"filters\":[{\"field\":\"status\",\"operator\":\"eq\",\"values\":[\"pending\"]}],\"name\":\"待审核数量\",\"relatedActionCodes\":[],\"required\":true,\"tableName\":\"borrow_record\",\"unit\":\"条\"}],\"pageBindings\":[{\"actionCode\":\"approve_borrow\",\"pageCode\":\"borrow_admin_page\",\"slot\":\"list.rowActions\",\"tableName\":\"borrow_record\",\"target\":\"admin\"},{\"actionCode\":\"reject_borrow\",\"pageCode\":\"borrow_admin_page\",\"slot\":\"list.rowActions\",\"tableName\":\"borrow_record\",\"target\":\"admin\"},{\"actionCode\":\"return_book\",\"pageCode\":\"borrow_admin_page\",\"slot\":\"list.rowActions\",\"tableName\":\"borrow_record\",\"target\":\"admin\"}],\"quantityRules\":[{\"actionCode\":\"approve_borrow\",\"amount\":\"1\",\"effectType\":\"decrease\",\"objectCode\":\"book_info\",\"quantityField\":\"stock\",\"tableName\":\"book_info\"},{\"actionCode\":\"return_book\",\"amount\":\"1\",\"effectType\":\"increase\",\"objectCode\":\"book_info\",\"quantityField\":\"stock\",\"tableName\":\"book_info\"}],\"recordRules\":[],\"stateMachines\":[{\"objectCode\":\"borrow_record\",\"states\":[\"pending\",\"borrowing\",\"returned\",\"rejected\"],\"statusField\":\"status\",\"tableName\":\"borrow_record\",\"transitions\":[{\"actionCode\":\"approve_borrow\",\"fromState\":\"pending\",\"toState\":\"borrowing\"},{\"actionCode\":\"reject_borrow\",\"fromState\":\"pending\",\"toState\":\"rejected\"},{\"actionCode\":\"return_book\",\"fromState\":\"borrowing\",\"toState\":\"returned\"}]}]},\"canonicalTableRegistry\":[\"book_info\",\"announcement\",\"news\",\"borrow_record\",\"reservation\",\"reader\",\"carousel\",\"admin\"],\"limits\":{\"maxTables\":12,\"maxColumnsPerTable\":30}}', '{\n \"tables\": [\n {\n \"tableName\": \"book_info\",\n \"tableComment\": \"图书信息表\",\n \"adminMenuName\": \"图书管理\",\n \"operations\": {\n \"add\": true,\n \"edit\": true,\n \"remove\": true,\n \"removeType\": \"physical\",\n \"reason\": \"\"\n },\n \"columns\": [\n {\n \"columnName\": \"id\",\n \"columnLabel\": \"ID\",\n \"columnComment\": \"主键ID\",\n \"columnType\": \"bigint(20)\",\n \"isPk\": \"1\",\n \"isIncrement\": \"1\",\n \"isRequired\": \"1\"\n },\n {\n \"columnName\": \"title\",\n \"columnLabel\": \"书名\",\n \"columnComment\": \"图书名称\",\n \"columnType\": \"varchar(200)\",\n \"isPk\": \"0\",\n \"isIncrement\": \"0\",\n \"isRequired\": \"1\"\n },\n {\n \"columnName\": \"author\",\n \"columnLabel\": \"作者\",\n \"columnComment\": \"图书作者\",\n \"columnType\": \"varchar(100)\",\n \"isPk\": \"0\",\n \"isIncrement\": \"0\",\n \"isRequired\": \"1\"\n },\n {\n \"columnName\": \"isbn\",\n \"columnLabel\": \"ISBN\",\n \"columnComment\": \"国际标准书号\",\n \"columnType\": \"varchar(20)\",\n \"isPk\": \"0\",\n \"isIncrement\": \"0\",\n \"isRequired\": \"1\"\n },\n {\n \"columnName\": \"publisher\",\n \"columnLabel\": \"出版社\",\n \"columnComment\": \"图书出版社\",\n \"columnType\": \"varchar(100)\",\n \"isPk\": \"0\",\n \"isIncrement\": \"0\",\n \"isRequired\": \"0\"\n },\n {\n \"columnName\": \"publish_date\",\n \"columnLabel\": \"出版日期\",\n \"columnComment\": \"图书出版日期\",\n \"columnType\": \"date\",\n \"isPk\": \"0\",\n \"isIncrement\": \"0\",\n \"isRequired\": \"0\"\n },\n {\n \"columnName\": \"category\",\n \"columnLabel\": \"分类\",\n \"columnComment\": \"图书分类\",\n \"columnType\": \"varchar(50)\",\n \"isPk\": \"0\",\n \"isIncrement\": \"0\",\n \"isRequired\": \"0\",\n \"javaType\": \"String\",\n \"htmlType\": \"select\",\n \"dictType\": \"book_category\",\n \"dictOptions\": [\n {\n \"value\": \"文学\",\n \"label\": \"文学\"\n },\n {\n \"value\": \"科技\",\n \"label\": \"科技\"\n },\n {\n \"value\": \"历史\",\n \"label\": \"历史\"\n },\n {\n \"value\": \"教育\",\n \"label\": \"教育\"\n },\n {\n \"value\": \"其他\",\n \"label\": \"其他\"\n }\n ]\n },\n {\n \"columnName\": \"stock\",\n \"columnLabel\": \"库存\",\n \"columnComment\": \"当前库存数量\",\n \"columnType\": \"int(11)\",\n \"isPk\": \"0\",\n \"isIncrement\": \"0\",\n \"isRequired\": \"1\"\n },\n {\n \"columnName\": \"description\",\n \"columnLabel\": \"描述\",\n \"columnComment\": \"图书简介\",\n \"columnType\": \"text\",\n \"isPk\": \"0\",\n \"isIncrement\": \"0\",\n \"isRequired\": \"0\"\n },\n {\n \"columnName\": \"cover_image\",\n \"columnLabel\": \"封面图片\",\n \"columnComment\": \"图书封面图片URL\",\n \"columnType\": \"varchar(500)\",\n \"isPk\": \"0\",\n \"isIncrement\": \"0\",\n \"isRequired\": \"0\",\n \"javaType\": \"String\",\n \"htmlType\": \"imageUpload\"\n }\n ]\n },\n {\n \"tableName\": \"borrow_record\",\n \"tableComment\": \"借阅记录表\",\n \"adminMenuName\": \"借阅管理\",\n \"operations\": {\n \"add\": true,\n \"edit\": false,\n \"remove\": false,\n \"removeType\": \"physical\",\n \"reason\": \"借阅记录通过业务操作生成,不允许直接编辑或删除\"\n },\n \"columns\": [\n {\n \"columnName\": \"id\",\n \"columnLabel\": \"ID\",\n \"columnComment\": \"主键ID\",\n \"columnType\": \"bigint(20)\",\n \"isPk\": \"1\",\n \"isIncrement\": \"1\",\n \"isRequired\": \"1\"\n },\n {\n \"columnName\": \"book_id\",\n \"columnLabel\": \"图书\",\n \"columnComment\": \"借阅图书ID\",\n \"columnType\": \"bigint(20)\",\n \"isPk\": \"0\",\n \"isIncrement\": \"0\",\n \"isRequired\": \"1\",\n \"javaType\": \"Long\",\n \"htmlType\": \"select\",\n \"dictType\": \"remote:book_info:id:title\"\n },\n {\n \"columnName\": \"reader_id\",\n \"columnLabel\": \"读者\",\n \"columnComment\": \"借阅读者ID\",\n \"columnType\": \"bigint(20)\",\n \"isPk\": \"0\",\n \"isIncrement\": \"0\",\n \"isRequired\": \"1\",\n \"javaType\": \"Long\",\n \"htmlType\": \"select\",\n \"dictType\": \"remote:reader:reader_id:nickname\"\n },\n {\n \"columnName\": \"borrow_date\",\n \"columnLabel\": \"借书日期\",\n \"columnComment\": \"借阅开始日期\",\n \"columnType\": \"datetime\",\n \"isPk\": \"0\",\n \"isIncrement\": \"0\",\n \"isRequired\": \"1\"\n },\n {\n \"columnName\": \"due_date\",\n \"columnLabel\": \"应还日期\",\n \"columnComment\": \"应归还日期\",\n \"columnType\": \"datetime\",\n \"isPk\": \"0\",\n \"isIncrement\": \"0\",\n \"isRequired\": \"1\"\n },\n {\n \"columnName\": \"return_date\",\n \"columnLabel\": \"实际归还日期\",\n \"columnComment\": \"实际归还日期未归还为NULL\",\n \"columnType\": \"datetime\",\n \"isPk\": \"0\",\n \"isIncrement\": \"0\",\n \"isRequired\": \"0\"\n },\n {\n \"columnName\": \"status\",\n \"columnLabel\": \"状态\",\n \"columnComment\": \"借阅状态pending待审核/borrowing借阅中/returned已归还/rejected已拒绝\",\n \"columnType\": \"varchar(20)\",\n \"isPk\": \"0\",\n \"isIncrement\": \"0\",\n \"isRequired\": \"1\",\n \"javaType\": \"String\",\n \"htmlType\": \"select\",\n \"dictType\": \"borrow_status\",\n \"dictOptions\": [\n {\n \"value\": \"pending\",\n \"label\": \"待审核\"\n },\n {\n \"value\": \"borrowing\",\n \"label\": \"借阅中\"\n },\n {\n \"value\": \"returned\",\n \"label\": \"已归还\"\n },\n {\n \"value\": \"rejected\",\n \"label\": \"已拒绝\"\n }\n ]\n },\n {\n \"columnName\": \"approve_user_id\",\n \"columnLabel\": \"审核人\",\n \"columnComment\": \"借书审核管理员ID\",\n \"columnType\": \"bigint(20)\",\n \"isPk\": \"0\",\n \"isIncrement\": \"0\",\n \"isRequired\": \"0\",\n \"javaType\": \"Long\",\n \"htmlType\": \"select\",\n \"dictType\": \"remote:admin:admin_id:username\"\n },\n {\n \"columnName\": \"approve_time\",\n \"columnLabel\": \"审核时间\",\n \"columnComment\": \"审核通过/拒绝时间\",\n \"columnType\": \"datetime\",\n \"isPk\": \"0\",\n \"isIncrement\": \"0\",\n \"isRequired\": \"0\"\n },\n {\n \"columnName\": \"return_user_id\",\n \"columnLabel\": \"归还操作人\",\n \"columnComment\": \"归还操作管理员ID\",\n \"columnType\": \"bigint(20)\",\n \"isPk\": \"0\",\n \"isIncrement\": \"0\",\n \"isRequired\": \"0\",\n \"javaType\": \"Long\",\n \"htmlType\": \"select\",\n \"dictType\": \"remote:admin:admin_id:username\"\n },\n {\n \"columnName\": \"return_time\",\n \"columnLabel\": \"归还时间\",\n \"columnComment\": \"归还操作时间\",\n \"columnType\": \"datetime\",\n \"isPk\": \"0\",\n \"isIncrement\": \"0\",\n \"isRequired\": \"0\"\n },\n {\n \"columnName\": \"create_time\",\n \"columnLabel\": \"创建时间\",\n \"columnComment\": \"记录创建时间\",\n \"columnType\": \"datetime\",\n \"isPk\": \"0\",\n \"isIncrement\": \"0\",\n \"isRequired\": \"1\"\n }\n ]\n },\n {\n \"tableName\": \"reservation\",\n \"tableComment\": \"预约记录表\",\n \"adminMenuName\": \"预约管理\",\n \"operations\": {\n \"add\": true,\n \"edit\": false,\n \"remove\": false,\n \"removeType\": \"physical\",\n \"reason\": \"预约记录通过业务操作生成,不允许直接编辑或删除\"\n },\n \"columns\": [\n {\n \"columnName\": \"id\",\n \"columnLabel\": \"ID\",\n \"columnComment\": \"主键ID\",\n \"columnType\": \"bigint(20)\",\n \"isPk\": \"1\",\n \"isIncrement\": \"1\",\n \"isRequired\": \"1\"\n },\n {\n \"columnName\": \"book_id\",\n \"columnLabel\": \"图书\",\n \"columnComment\": \"预约图书ID\",\n \"columnType\": \"bigint(20)\",\n \"isPk\": \"0\",\n \"isIncrement\": \"0\",\n \"isRequired\": \"1\",\n \"javaType\": \"Long\",\n \"htmlType\": \"select\",\n \"dictType\": \"remote:book_info:id:title\"\n },\n {\n \"columnName\": \"reader_id\",\n \"columnLabel\": \"读者\",\n \"columnComment\": \"预约读者ID\",\n \"columnType\": \"bigint(20)\",\n \"isPk\": \"0\",\n \"isIncrement\": \"0\",\n \"isRequired\": \"1\",\n \"javaType\": \"Long\",\n \"htmlType\": \"select\",\n \"dictType\": \"remote:reader:reader_id:nickname\"\n },\n {\n \"columnName\": \"reserve_date\",\n \"columnLabel\": \"预约日期\",\n \"columnComment\": \"预约时间\",\n \"columnType\": \"datetime\",\n \"isPk\": \"0\",\n \"isIncrement\": \"0\",\n \"isRequired\": \"1\"\n },\n {\n \"columnName\": \"expire_date\",\n \"columnLabel\": \"过期日期\",\n \"columnComment\": \"预约过期日期\",\n \"columnType\": \"datetime\",\n \"isPk\": \"0\",\n \"isIncrement\": \"0\",\n \"isRequired\": \"0\"\n },\n {\n \"columnName\": \"status\",\n \"columnLabel\": \"状态\",\n \"columnComment\": \"预约状态pending待确认/confirmed已确认/cancelled已取消/completed已完成\",\n \"columnType\": \"varchar(20)\",\n \"isPk\": \"0\",\n \"isIncrement\": \"0\",\n \"isRequired\": \"1\",\n \"javaType\": \"String\",\n \"htmlType\": \"select\",\n \"dictType\": \"reservation_status\",\n \"dictOptions\": [\n {\n \"value\": \"pending\",\n \"label\": \"待确认\"\n },\n {\n \"value\": \"confirmed\",\n \"label\": \"已确认\"\n },\n {\n \"value\": \"cancelled\",\n \"label\": \"已取消\"\n },\n {\n \"value\": \"completed\",\n \"label\": \"已完成\"\n }\n ]\n },\n {\n \"columnName\": \"create_time\",\n \"columnLabel\": \"创建时间\",\n \"columnComment\": \"记录创建时间\",\n \"columnType\": \"datetime\",\n \"isPk\": \"0\",\n \"isIncrement\": \"0\",\n \"isRequired\": \"1\"\n }\n ]\n },\n {\n \"tableName\": \"announcement\",\n \"tableComment\": \"公告表\",\n \"adminMenuName\": \"公告管理\",\n \"operations\": {\n \"add\": true,\n \"edit\": true,\n \"remove\": true,\n \"removeType\": \"physical\",\n \"reason\": \"\"\n },\n \"columns\": [\n {\n \"columnName\": \"id\",\n \"columnLabel\": \"ID\",\n \"columnComment\": \"主键ID\",\n \"columnType\": \"bigint(20)\",\n \"isPk\": \"1\",\n \"isIncrement\": \"1\",\n \"isRequired\": \"1\"\n },\n {\n \"columnName\": \"title\",\n \"columnLabel\": \"标题\",\n \"columnComment\": \"公告标题\",\n \"columnType\": \"varchar(200)\",\n \"isPk\": \"0\",\n \"isIncrement\": \"0\",\n \"isRequired\": \"1\"\n },\n {\n \"columnName\": \"content\",\n \"columnLabel\": \"内容\",\n \"columnComment\": \"公告正文\",\n \"columnType\": \"text\",\n \"isPk\": \"0\",\n \"isIncrement\": \"0\",\n \"isRequired\": \"1\"\n },\n {\n \"columnName\": \"publish_date\",\n \"columnLabel\": \"发布日期\",\n \"columnComment\": \"公告发布时间\",\n \"columnType\": \"datetime\",\n \"isPk\": \"0\",\n \"isIncrement\": \"0\",\n \"isRequired\": \"1\"\n },\n {\n \"columnName\": \"author\",\n \"columnLabel\": \"作者\",\n \"columnComment\": \"公告发布人\",\n \"columnType\": \"varchar(100)\",\n \"isPk\": \"0\",\n \"isIncrement\": \"0\",\n \"isRequired\": \"0\"\n },\n {\n \"columnName\": \"is_top\",\n \"columnLabel\": \"是否置顶\",\n \"columnComment\": \"是否置顶1是0否\",\n \"columnType\": \"char(1)\",\n \"isPk\": \"0\",\n \"isIncrement\": \"0\",\n \"isRequired\": \"0\"\n },\n {\n \"columnName\": \"status\",\n \"columnLabel\": \"状态\",\n \"columnComment\": \"发布状态published/draft\",\n \"columnType\": \"varchar(10)\",\n \"isPk\": \"0\",\n \"isIncrement\": \"0\",\n \"isRequired\": \"1\",\n \"javaType\": \"String\",\n \"htmlType\": \"select\",\n \"dictType\": \"publish_status\",\n \"dictOptions\": [\n {\n \"value\": \"published\",\n \"label\": \"已发布\"\n },\n {\n \"value\": \"draft\",\n \"label\": \"草稿\"\n }\n ]\n }\n ]\n },\n {\n \"tableName\": \"news\",\n \"tableComment\": \"新闻表\",\n \"adminMenuName\": \"新闻管理\",\n \"operations\": {\n \"add\": true,\n \"edit\": true,\n \"remove\": true,\n \"removeType\": \"physical\",\n \"reason\": \"\"\n },\n \"columns\": [\n {\n \"columnName\": \"id\",\n \"columnLabel\": \"ID\",\n \"columnComment\": \"主键ID\",\n \"columnType\": \"bigint(20)\",\n \"isPk\": \"1\",\n \"isIncrement\": \"1\",\n \"isRequired\": \"1\"\n },\n {\n \"columnName\": \"title\",\n \"columnLabel\": \"标题\",\n \"columnComment\": \"新闻标题\",\n \"columnType\": \"varchar(200)\",\n \"isPk\": \"0\",\n \"isIncrement\": \"0\",\n \"isRequired\": \"1\"\n },\n {\n \"columnName\": \"content\",\n \"columnLabel\": \"内容\",\n \"columnComment\": \"新闻正文\",\n \"columnType\": \"text\",\n \"isPk\": \"0\",\n \"isIncrement\": \"0\",\n \"isRequired\": \"1\"\n },\n {\n \"columnName\": \"publish_date\",\n \"columnLabel\": \"发布日期\",\n \"columnComment\": \"新闻发布时间\",\n \"columnType\": \"datetime\",\n \"isPk\": \"0\",\n \"isIncrement\": \"0\",\n \"isRequired\": \"1\"\n },\n {\n \"columnName\": \"author\",\n \"columnLabel\": \"作者\",\n \"columnComment\": \"新闻发布人\",\n \"columnType\": \"varchar(100)\",\n \"isPk\": \"0\",\n \"isIncrement\": \"0\",\n \"isRequired\": \"0\"\n },\n {\n \"columnName\": \"cover_image\",\n \"columnLabel\": \"封面图片\",\n \"columnComment\": \"新闻封面图片URL\",\n \"columnType\": \"varchar(500)\",\n \"isPk\": \"0\",\n \"isIncrement\": \"0\",\n \"isRequired\": \"0\",\n \"javaType\": \"String\",\n \"htmlType\": \"imageUpload\"\n },\n {\n \"columnName\": \"is_top\",\n \"columnLabel\": \"是否置顶\",\n \"columnComment\": \"是否置顶1是0否\",\n \"columnType\": \"char(1)\",\n \"isPk\": \"0\",\n \"isIncrement\": \"0\",\n \"isRequired\": \"0\"\n },\n {\n \"columnName\": \"status\",\n \"columnLabel\": \"状态\",\n \"columnComment\": \"发布状态published/draft\",\n \"columnType\": \"varchar(10)\",\n \"isPk\": \"0\",\n \"isIncrement\": \"0\",\n \"isRequired\": \"1\",\n \"javaType\": \"String\",\n \"htmlType\": \"select\",\n \"dictType\": \"publish_status\",\n \"dictOptions\": [\n {\n \"value\": \"published\",\n \"label\": \"已发布\"\n },\n {\n \"value\": \"draft\",\n \"label\": \"草稿\"\n }\n ]\n }\n ]\n },\n {\n \"tableName\": \"carousel\",\n \"tableComment\": \"轮播图表\",\n \"adminMenuName\": \"轮播图管理\",\n \"operations\": {\n \"add\": true,\n \"edit\": true,\n \"remove\": true,\n \"removeType\": \"physical\",\n \"reason\": \"\"\n },\n \"columns\": [\n {\n \"columnName\": \"id\",\n \"columnLabel\": \"ID\",\n \"columnComment\": \"主键ID\",\n \"columnType\": \"bigint(20)\",\n \"isPk\": \"1\",\n \"isIncrement\": \"1\",\n \"isRequired\": \"1\"\n },\n {\n \"columnName\": \"image_url\",\n \"columnLabel\": \"图片URL\",\n \"columnComment\": \"轮播图片地址\",\n \"columnType\": \"varchar(500)\",\n \"isPk\": \"0\",\n \"isIncrement\": \"0\",\n \"isRequired\": \"1\",\n \"javaType\": \"String\",\n \"htmlType\": \"imageUpload\"\n },\n {\n \"columnName\": \"link_url\",\n \"columnLabel\": \"链接URL\",\n \"columnComment\": \"点击跳转地址\",\n \"columnType\": \"varchar(500)\",\n \"isPk\": \"0\",\n \"isIncrement\": \"0\",\n \"isRequired\": \"0\"\n },\n {\n \"columnName\": \"title\",\n \"columnLabel\": \"标题\",\n \"columnComment\": \"轮播标题\",\n \"columnType\": \"varchar(200)\",\n \"isPk\": \"0\",\n \"isIncrement\": \"0\",\n \"isRequired\": \"0\"\n },\n {\n \"columnName\": \"sort_order\",\n \"columnLabel\": \"排序\",\n \"columnComment\": \"显示顺序,数字越小越靠前\",\n \"columnType\": \"int(11)\",\n \"isPk\": \"0\",\n \"isIncrement\": \"0\",\n \"isRequired\": \"0\"\n },\n {\n \"columnName\": \"status\",\n \"columnLabel\": \"状态\",\n \"columnComment\": \"启用状态enabled/disabled\",\n \"columnType\": \"varchar(10)\",\n \"isPk\": \"0\",\n \"isIncrement\": \"0\",\n \"isRequired\": \"1\",\n \"javaType\": \"String\",\n \"htmlType\": \"select\",\n \"dictType\": \"enable_status\",\n \"dictOptions\": [\n {\n \"value\": \"enabled\",\n \"label\": \"启用\"\n },\n {\n \"value\": \"disabled\",\n \"label\": \"禁用\"\n }\n ]\n }\n ]\n },\n {\n \"tableName\": \"admin\",\n \"tableComment\": \"管理员账号表\",\n \"adminMenuName\": \"管理员账号\",\n \"operations\": {\n \"add\": false,\n \"edit\": true,\n \"remove\": false,\n \"removeType\": \"physical\",\n \"reason\": \"管理员账号由系统初始化,不允许前台新增或删除\"\n },\n \"columns\": [\n {\n \"columnName\": \"admin_id\",\n \"columnLabel\": \"管理员ID\",\n \"columnComment\": \"主键ID\",\n \"columnType\": \"bigint(20)\",\n \"isPk\": \"1\",\n \"isIncrement\": \"1\",\n \"isRequired\": \"1\"\n },\n {\n \"columnName\": \"username\",\n \"columnLabel\": \"用户名\",\n \"columnComment\": \"登录用户名\",\n \"columnType\": \"varchar(50)\",\n \"isPk\": \"0\",\n \"isIncrement\": \"0\",\n \"isRequired\": \"1\"\n },\n {\n \"columnName\": \"password_hash\",\n \"columnLabel\": \"密码哈希\",\n \"columnComment\": \"加密后的密码\",\n \"columnType\": \"varchar(255)\",\n \"isPk\": \"0\",\n \"isIncrement\": \"0\",\n \"isRequired\": \"1\"\n },\n {\n \"columnName\": \"nickname\",\n \"columnLabel\": \"昵称\",\n \"columnComment\": \"显示名称\",\n \"columnType\": \"varchar(100)\",\n \"isPk\": \"0\",\n \"isIncrement\": \"0\",\n \"isRequired\": \"0\"\n },\n {\n \"columnName\": \"status\",\n \"columnLabel\": \"状态\",\n \"columnComment\": \"账号状态enabled/disabled\",\n \"columnType\": \"varchar(10)\",\n \"isPk\": \"0\",\n \"isIncrement\": \"0\",\n \"isRequired\": \"1\",\n \"javaType\": \"String\",\n \"htmlType\": \"select\",\n \"dictType\": \"account_status\",\n \"dictOptions\": [\n {\n \"value\": \"enabled\",\n \"label\": \"启用\"\n },\n {\n \"value\": \"disabled\",\n \"label\": \"禁用\"\n }\n ]\n },\n {\n \"columnName\": \"create_time\",\n \"columnLabel\": \"创建时间\",\n \"columnComment\": \"账号创建时间\",\n \"columnType\": \"datetime\",\n \"isPk\": \"0\",\n \"isIncrement\": \"0\",\n \"isRequired\": \"1\"\n }\n ]\n },\n {\n \"tableName\": \"reader\",\n \"tableComment\": \"读者账号表\",\n \"adminMenuName\": \"读者账号\",\n \"operations\": {\n \"add\": false,\n \"edit\": true,\n \"remove\": false,\n \"removeType\": \"physical\",\n \"reason\": \"读者账号由注册或导入生成,不允许后台直接新增或删除\"\n },\n \"columns\": [\n {\n \"columnName\": \"reader_id\",\n \"columnLabel\": \"读者ID\",\n \"columnComment\": \"主键ID\",\n \"columnType\": \"bigint(20)\",\n \"isPk\": \"1\",\n \"isIncrement\": \"1\",\n \"isRequired\": \"1\"\n },\n {\n \"columnName\": \"username\",\n \"columnLabel\": \"用户名\",\n \"columnComment\": \"登录用户名\",\n \"columnType\": \"varchar(50)\",\n \"isPk\": \"0\",\n \"isIncrement\": \"0\",\n \"isRequired\": \"1\"\n },\n {\n \"columnName\": \"password_hash\",\n \"columnLabel\": \"密码哈希\",\n \"columnComment\": \"加密后的密码\",\n \"columnType\": \"varchar(255)\",\n \"isPk\": \"0\",\n \"isIncrement\": \"0\",\n \"isRequired\": \"1\"\n },\n {\n \"columnName\": \"nickname\",\n \"columnLabel\": \"昵称\",\n \"columnComment\": \"显示名称\",\n \"columnType\": \"varchar(100)\",\n \"isPk\": \"0\",\n \"isIncrement\": \"0\",\n \"isRequired\": \"0\"\n },\n {\n \"columnName\": \"status\",\n \"columnLabel\": \"状态\",\n \"columnComment\": \"账号状态enabled/disabled\",\n \"columnType\": \"varchar(10)\",\n \"isPk\": \"0\",\n \"isIncrement\": \"0\",\n \"isRequired\": \"1\",\n \"javaType\": \"String\",\n \"htmlType\": \"select\",\n \"dictType\": \"account_status\",\n \"dictOptions\": [\n {\n \"value\": \"enabled\",\n \"label\": \"启用\"\n },\n {\n \"value\": \"disabled\",\n \"label\": \"禁用\"\n }\n ]\n },\n {\n \"columnName\": \"create_time\",\n \"columnLabel\": \"创建时间\",\n \"columnComment\": \"账号创建时间\",\n \"columnType\": \"datetime\",\n \"isPk\": \"0\",\n \"isIncrement\": \"0\",\n \"isRequired\": \"1\"\n }\n ]\n }\n ]\n}', '0', 64139, 3932, NULL, 3932, 9718, 3837, 3932, 9718, 13650, 3, 0.02336800, '1', NULL, '2026-07-14 22:25:55');
INSERT INTO `front_ai_usage_ledger` VALUES (149, 113, 113, 109, 100, 'app_blueprint', 'deepseek', 'deepseek-v4-flash', 'front.app_blueprint', 'V1', 'c3ee0180ed446fe83055bd1c272ed1b6e3978584fe52f98f5e78e14e2cfc8f29', '你是应用蓝图架构师。只输出符合用户消息结构的 JSON规划业务角色、前台菜单与页面、后台菜单和运营看板。保持 pageCode、tableName、角色数据范围和登录要求前后一致只描述静态蓝图不生成数据库、权限表、菜单表或代码。角色名称使用简体中文技术标识使用稳定的小写 snake_case。', '根据项目输入 JSON 生成应用蓝图,只返回 JSON不要 Markdown 围栏或解释。\n输出结构{\"roles\":[{\"code\":\"reader\",\"name\":\"读者\",\"description\":\"\"}],\"frontendMenus\":[{\"code\":\"book_catalog\",\"name\":\"图书目录\",\"path\":\"/books\",\"pageCode\":\"book_catalog_page\",\"requiresLogin\":false,\"visibleRoles\":[],\"dataScope\":\"PUBLIC\"}],\"frontendPages\":[{\"code\":\"book_catalog_page\",\"name\":\"图书目录\",\"menuCode\":\"book_catalog\",\"path\":\"/books\",\"pageType\":\"list\",\"tableName\":\"book_info\"}],\"adminMenus\":[{\"code\":\"book_admin\",\"name\":\"图书管理\",\"path\":\"/admin/books\",\"pageCode\":\"book_admin_page\",\"tableName\":\"book_info\",\"pageType\":\"list\",\"requiresLogin\":true,\"visibleRoles\":[\"admin\"],\"dataScope\":\"ROLE\"}],\"adminHomeDashboard\":{\"title\":\"运营总览\",\"description\":\"核心业务数据\",\"metrics\":[],\"charts\":[]}}。\n蓝图描述目标生成项目而不是当前 EasyCode/RuoYi 平台。不要生成数据库表、菜单表、角色表、权限表或代码。\nrole.name 使用简体中文role.code 使用小写 snake_case。只有 role.code=admin 是系统管理员;名称含“管理员”或“后台”的业务角色仍保持独立。\nrole.name must be Simplified Chinese. Only role.code=admin is the system administrator.\n每个菜单必须包含 requiresLogin、visibleRoles、dataScopedataScope 只能是 PUBLIC、CURRENT_USER 或 ROLE。\nadminMenus 必须包含 pageCode、tableName、pageType个人资料使用 form普通管理使用 list。\nadminMenus must include pageCode, tableName, and pageType.\nfrontendMenus 顶层菜单应指向 pageCode详情页作为子页面不创建顶层详情菜单。\n不要为轮播图、banner、公告滚动条等首页装饰创建顶层菜单可放在首页业务块或作为后台维护数据。\nfrontendPages.pageType 只能是 list、current_user_list、detail、formtableName 必须是页面展示的业务表。\n同一业务对象只使用一个稳定 tableName后续数据库、闭环、页面、看板、动作必须复用不能使用同义表名。\nadminHomeDashboard 尽量包含 4 个业务指标和至少 2 张图表趋势图与分布图所有表字段必须可由后续数据库步骤创建。semantic 只能使用 money、order、user、task、warning、inventory、content、default。\n每个非 admin 角色使用表名等于 role.code 的独立账号表,不得创建共享 user、user_info、member 或 account 表。\nNever invent a shared user, user_info, member, or account table for role accounts.\n需要个人资料页时为每个非 admin 角色创建独立 form 页面和菜单tableName 绑定 role.codepageCode/path 带角色前缀visibleRoles 只包含该角色。\nCreate one form page and one menu per non-admin role when profile pages are needed.\n个人订单、借阅、资料、预约、支付等页面必须 requiresLogin=true 且 dataScope=CURRENT_USER。\n项目输入 JSON\n{\"projectName\":\"图书管理系统\",\"projectDescription\":\"功能:借书、还书、预约、取消预约\\n角色用户、管理员\\n其他模块轮播图、公告、新闻\",\"industryTemplate\":\"\",\"stylePreset\":\"dark-tech\",\"extraRequirements\":\"\"}', '{\"roles\":[{\"code\":\"admin\",\"name\":\"管理员\",\"description\":\"系统管理员,管理所有业务数据\"},{\"code\":\"user\",\"name\":\"用户\",\"description\":\"普通读者,可借书、还书、预约\"}],\"frontendMenus\":[{\"code\":\"book_catalog\",\"name\":\"图书目录\",\"path\":\"/books\",\"pageCode\":\"book_catalog_page\",\"requiresLogin\":false,\"visibleRoles\":[],\"dataScope\":\"PUBLIC\"},{\"code\":\"borrow_history\",\"name\":\"借阅记录\",\"path\":\"/borrow-history\",\"pageCode\":\"borrow_history_page\",\"requiresLogin\":true,\"visibleRoles\":[\"user\"],\"dataScope\":\"CURRENT_USER\"},{\"code\":\"reservation_history\",\"name\":\"预约记录\",\"path\":\"/reservation-history\",\"pageCode\":\"reservation_history_page\",\"requiresLogin\":true,\"visibleRoles\":[\"user\"],\"dataScope\":\"CURRENT_USER\"},{\"code\":\"user_profile\",\"name\":\"个人资料\",\"path\":\"/profile\",\"pageCode\":\"user_profile_page\",\"requiresLogin\":true,\"visibleRoles\":[\"user\"],\"dataScope\":\"CURRENT_USER\"}],\"frontendPages\":[{\"code\":\"book_catalog_page\",\"name\":\"图书目录\",\"menuCode\":\"book_catalog\",\"path\":\"/books\",\"pageType\":\"list\",\"tableName\":\"book_info\"},{\"code\":\"borrow_history_page\",\"name\":\"借阅记录\",\"menuCode\":\"borrow_history\",\"path\":\"/borrow-history\",\"pageType\":\"current_user_list\",\"tableName\":\"borrow_record\"},{\"code\":\"reservation_history_page\",\"name\":\"预约记录\",\"menuCode\":\"reservation_history\",\"path\":\"/reservation-history\",\"pageType\":\"current_user_list\",\"tableName\":\"reservation\"},{\"code\":\"user_profile_page\",\"name\":\"个人资料\",\"menuCode\":\"user_profile\",\"path\":\"/profile\",\"pageType\":\"form\",\"tableName\":\"user\"}],\"adminMenus\":[{\"code\":\"book_admin\",\"name\":\"图书管理\",\"path\":\"/admin/books\",\"pageCode\":\"book_admin_page\",\"tableName\":\"book_info\",\"pageType\":\"list\",\"requiresLogin\":true,\"visibleRoles\":[\"admin\"],\"dataScope\":\"ROLE\"},{\"code\":\"borrow_admin\",\"name\":\"借阅管理\",\"path\":\"/admin/borrows\",\"pageCode\":\"borrow_admin_page\",\"tableName\":\"borrow_record\",\"pageType\":\"list\",\"requiresLogin\":true,\"visibleRoles\":[\"admin\"],\"dataScope\":\"ROLE\"},{\"code\":\"reservation_admin\",\"name\":\"预约管理\",\"path\":\"/admin/reservations\",\"pageCode\":\"reservation_admin_page\",\"tableName\":\"reservation\",\"pageType\":\"list\",\"requiresLogin\":true,\"visibleRoles\":[\"admin\"],\"dataScope\":\"ROLE\"},{\"code\":\"carousel_admin\",\"name\":\"轮播图管理\",\"path\":\"/admin/carousels\",\"pageCode\":\"carousel_admin_page\",\"tableName\":\"carousel\",\"pageType\":\"list\",\"requiresLogin\":true,\"visibleRoles\":[\"admin\"],\"dataScope\":\"ROLE\"},{\"code\":\"announcement_admin\",\"name\":\"公告管理\",\"path\":\"/admin/announcements\",\"pageCode\":\"announcement_admin_page\",\"tableName\":\"announcement\",\"pageType\":\"list\",\"requiresLogin\":true,\"visibleRoles\":[\"admin\"],\"dataScope\":\"ROLE\"},{\"code\":\"news_admin\",\"name\":\"新闻管理\",\"path\":\"/admin/news\",\"pageCode\":\"news_admin_page\",\"tableName\":\"news\",\"pageType\":\"list\",\"requiresLogin\":true,\"visibleRoles\":[\"admin\"],\"dataScope\":\"ROLE\"},{\"code\":\"user_admin\",\"name\":\"用户管理\",\"path\":\"/admin/users\",\"pageCode\":\"user_admin_page\",\"tableName\":\"user\",\"pageType\":\"list\",\"requiresLogin\":true,\"visibleRoles\":[\"admin\"],\"dataScope\":\"ROLE\"},{\"code\":\"admin_profile\",\"name\":\"管理员资料\",\"path\":\"/admin/profile\",\"pageCode\":\"admin_profile_page\",\"tableName\":\"admin\",\"pageType\":\"form\",\"requiresLogin\":true,\"visibleRoles\":[\"admin\"],\"dataScope\":\"CURRENT_USER\"}],\"adminHomeDashboard\":{\"title\":\"运营总览\",\"description\":\"核心业务数据\",\"metrics\":[{\"label\":\"总图书\",\"value\":0,\"semantic\":\"content\"},{\"label\":\"总借阅\",\"value\":0,\"semantic\":\"order\"},{\"label\":\"总预约\",\"value\":0,\"semantic\":\"task\"},{\"label\":\"总用户\",\"value\":0,\"semantic\":\"user\"}],\"charts\":[{\"type\":\"line\",\"title\":\"借阅趋势\",\"description\":\"月度借阅数量\"},{\"type\":\"pie\",\"title\":\"图书分类分布\",\"description\":\"各分类图书占比\"}]}}', '0', 40919, 817, 768, 49, 3567, 2610, 817, 3567, 4384, 1, 0.00719836, '1', NULL, '2026-07-15 08:51:23');
INSERT INTO `front_ai_usage_ledger` VALUES (150, 113, 113, 109, 100, 'flow_config', 'deepseek', 'deepseek-v4-flash', 'front.flow_config', 'V2', '493bfe3aa6bafe555f3fedab46a75c8364c303c2a589b1ffaa01196a93c6472f', '你是业务流程配置设计器。只输出一个合法 JSON 对象,不输出 Markdown、解释或 SQL。\n\n目标用最小 flow_config 描述状态流转、显式 Java 业务动作、多表数量联动、按钮和统计。不要输出 CRUD不要输出通用规则 DSL。\n\n固定结构\n{\n \"version\":\"1.0\",\n \"code\":\"snake_case\",\n \"name\":\"中文业务名\",\n \"mainTable\":\"snake_case\",\n \"statusField\":\"status\",\n \"notFoundMessage\":\"主记录不存在\",\n \"states\":[{\"code\":\"pending\",\"label\":\"待审核\"}],\n \"actions\":[{\n \"code\":\"approve\",\n \"name\":\"审核通过\",\n \"from\":\"pending\",\n \"to\":\"borrowing\",\n \"actor\":\"admin\",\n \"method\":\"POST\",\n \"path\":\"/borrow-record/approve\",\n \"invalidStateMessage\":\"当前状态不能审核\",\n \"successMessage\":\"审核成功\",\n \"audit\":{\"userField\":\"approve_user_id\",\"timeField\":\"approve_time\"},\n \"effects\":[{\n \"type\":\"decrease\",\n \"table\":\"book\",\n \"relationField\":\"book_id\",\n \"field\":\"stock\",\n \"amount\":\"1\",\n \"min\":\"0\",\n \"notFoundMessage\":\"图书不存在\",\n \"errorMessage\":\"图书库存不足\"\n }],\n \"button\":{\"scope\":\"admin\",\"pageCode\":\"borrow_record_list\",\"slot\":\"list.rowActions\",\"type\":\"success\",\"confirm\":\"确认审核通过吗?\",\"order\":10}\n }],\n \"metrics\":[{\"code\":\"borrowing_count\",\"name\":\"借阅中数量\",\"table\":\"borrow_record\",\"aggregate\":\"count\",\"field\":\"id\",\"status\":\"borrowing\",\"unit\":\"条\"}]\n}\n\n约束\n1. code、表名、字段名全部使用小写 snake_case状态 code 使用稳定英文编码label 使用中文。\n2. 每个 action 必须有 from 和 to且二者存在于 states 中并且不相同。\n3. effects.type 只能是 decrease、increase、update_related、create_record。\n4. decrease/increase 必须给 table、relationField、field、amountdecrease 还要给 min。\n5. update_related/create_record 使用 values值可为 currentUserId、now、record.字段名或常量。\n6. 审核人等身份只能通过 audit.userField 表达,由后端登录态注入,不能作为前端可传字段。\n7. 覆盖需求中的完整正向闭环和关键回退/拒绝动作,但不要为普通 CRUD 创建 action。\n8. metrics.status 如果填写,必须完全等于 states 中某个 code统计全状态数据或不能确定状态时省略 status。\n9. button.pageCode 必须引用 appBlueprint 中已有页面button.slot 只能是 list.toolbarActions、list.rowActions、detail.primaryActions、detail.secondaryActions、form.footerActions。详情页主操作使用 detail.primaryActions列表记录操作使用 list.rowActions禁止使用 page.actions 等自定义值。', '请根据以下 JSON 上下文生成 flow_config。appBlueprint 是已确认的页面、角色和菜单范围,必须与它保持一致:\n{\"mode\":\"generate\",\"projectName\":\"图书管理系统\",\"projectDescription\":\"功能:借书、还书、预约、取消预约\\n角色用户、管理员\\n其他模块轮播图、公告、新闻\",\"industryTemplate\":\"\",\"stylePreset\":\"dark-tech\",\"extraRequirements\":\"\",\"confirmedAppBlueprint\":{\"adminHomeDashboard\":{\"charts\":[{\"filters\":[],\"metrics\":[{\"aggregate\":\"count\",\"label\":\"借阅趋势\"}],\"title\":\"借阅趋势\",\"type\":\"line\"},{\"filters\":[],\"metrics\":[{\"aggregate\":\"count\",\"label\":\"图书分类分布\"}],\"title\":\"图书分类分布\",\"type\":\"pie\"}],\"description\":\"核心业务数据\",\"metrics\":[{\"aggregate\":\"count\",\"filters\":[],\"semantic\":\"content\"},{\"aggregate\":\"count\",\"filters\":[],\"semantic\":\"order\"},{\"aggregate\":\"count\",\"filters\":[],\"semantic\":\"task\"},{\"aggregate\":\"count\",\"filters\":[],\"semantic\":\"user\"}],\"title\":\"运营总览\"},\"adminMenus\":[{\"code\":\"book_admin\",\"dataScope\":\"ROLE\",\"name\":\"图书管理\",\"pageCode\":\"book_admin_page\",\"pageType\":\"list\",\"path\":\"/admin/books\",\"requiresLogin\":true,\"tableName\":\"book_info\",\"visibleRoles\":[\"admin\"]},{\"code\":\"borrow_admin\",\"dataScope\":\"ROLE\",\"name\":\"借阅管理\",\"pageCode\":\"borrow_admin_page\",\"pageType\":\"list\",\"path\":\"/admin/borrows\",\"requiresLogin\":true,\"tableName\":\"borrow_record\",\"visibleRoles\":[\"admin\"]},{\"code\":\"reservation_admin\",\"dataScope\":\"ROLE\",\"name\":\"预约管理\",\"pageCode\":\"reservation_admin_page\",\"pageType\":\"list\",\"path\":\"/admin/reservations\",\"requiresLogin\":true,\"tableName\":\"reservation\",\"visibleRoles\":[\"admin\"]},{\"code\":\"carousel_admin\",\"dataScope\":\"ROLE\",\"name\":\"轮播图管理\",\"pageCode\":\"carousel_admin_page\",\"pageType\":\"list\",\"path\":\"/admin/carousels\",\"requiresLogin\":true,\"tableName\":\"carousel\",\"visibleRoles\":[\"admin\"]},{\"code\":\"announcement_admin\",\"dataScope\":\"ROLE\",\"name\":\"公告管理\",\"pageCode\":\"announcement_admin_page\",\"pageType\":\"list\",\"path\":\"/admin/announcements\",\"requiresLogin\":true,\"tableName\":\"announcement\",\"visibleRoles\":[\"admin\"]},{\"code\":\"news_admin\",\"dataScope\":\"ROLE\",\"name\":\"新闻管理\",\"pageCode\":\"news_admin_page\",\"pageType\":\"list\",\"path\":\"/admin/news\",\"requiresLogin\":true,\"tableName\":\"news\",\"visibleRoles\":[\"admin\"]},{\"code\":\"user_admin\",\"dataScope\":\"ROLE\",\"name\":\"用户管理\",\"pageCode\":\"user_admin_page\",\"pageType\":\"list\",\"path\":\"/admin/users\",\"requiresLogin\":true,\"tableName\":\"user\",\"visibleRoles\":[\"admin\"]},{\"code\":\"admin_profile\",\"dataScope\":\"CURRENT_USER\",\"name\":\"管理员资料\",\"pageCode\":\"admin_profile_page\",\"pageType\":\"form\",\"path\":\"/admin/profile\",\"requiresLogin\":true,\"tableName\":\"admin\",\"visibleRoles\":[\"admin\"]}],\"frontendMenus\":[{\"code\":\"book_catalog\",\"dataScope\":\"PUBLIC\",\"name\":\"图书目录\",\"pageCode\":\"book_catalog_page\",\"pageType\":\"\",\"path\":\"/books\",\"requiresLogin\":false,\"tableName\":\"\",\"visibleRoles\":[]},{\"code\":\"borrow_history\",\"dataScope\":\"CURRENT_USER\",\"name\":\"借阅记录\",\"pageCode\":\"borrow_history_page\",\"pageType\":\"\",\"path\":\"/borrow-history\",\"requiresLogin\":true,\"tableName\":\"\",\"visibleRoles\":[\"user\"]},{\"code\":\"reservation_history\",\"dataScope\":\"CURRENT_USER\",\"name\":\"预约记录\",\"pageCode\":\"reservation_history_page\",\"pageType\":\"\",\"path\":\"/reservation-history\",\"requiresLogin\":true,\"tableName\":\"\",\"visibleRoles\":[\"user\"]},{\"code\":\"user_profile\",\"dataScope\":\"CURRENT_USER\",\"name\":\"个人资料\",\"pageCode\":\"user_profile_page\",\"pageType\":\"\",\"path\":\"/profile\",\"requiresLogin\":true,\"tableName\":\"\",\"visibleRoles\":[\"user\"]}],\"frontendPages\":[{\"code\":\"book_catalog_page\",\"menuCode\":\"book_catalog\",\"name\":\"图书目录\",\"pageType\":\"list\",\"parentPageCode\":\"\",\"path\":\"/books\",\"tableName\":\"book_info\"},{\"code\":\"borrow_history_page\",\"menuCode\":\"borrow_history\",\"name\":\"借阅记录\",\"pageType\":\"current_user_list\",\"parentPageCode\":\"\",\"path\":\"/borrow-history\",\"tableName\":\"borrow_record\"},{\"code\":\"reservation_history_page\",\"menuCode\":\"reservation_history\",\"name\":\"预约记录\",\"pageType\":\"current_user_list\",\"parentPageCode\":\"\",\"path\":\"/reservation-history\",\"tableName\":\"reservation\"},{\"code\":\"user_profile_page\",\"menuCode\":\"user_profile\",\"name\":\"个人资料\",\"pageType\":\"form\",\"parentPageCode\":\"\",\"path\":\"/profile\",\"tableName\":\"user\"}],\"roles\":[{\"code\":\"admin\",\"description\":\"系统管理员,管理所有业务数据\",\"name\":\"管理员\"},{\"code\":\"user\",\"description\":\"普通读者,可借书、还书、预约\",\"name\":\"用户\"}]}}', '{\n \"version\": \"1.0\",\n \"code\": \"borrow_and_reservation\",\n \"name\": \"借阅与预约管理\",\n \"mainTable\": \"borrow_record\",\n \"statusField\": \"status\",\n \"notFoundMessage\": \"借阅记录不存在\",\n \"states\": [\n {\"code\": \"pending\", \"label\": \"待审核\"},\n {\"code\": \"borrowing\", \"label\": \"借阅中\"},\n {\"code\": \"returned\", \"label\": \"已归还\"},\n {\"code\": \"rejected\", \"label\": \"已拒绝\"},\n {\"code\": \"reserved\", \"label\": \"已预约\"},\n {\"code\": \"cancelled\", \"label\": \"已取消\"}\n ],\n \"actions\": [\n {\n \"code\": \"approve\",\n \"name\": \"审核通过\",\n \"from\": \"pending\",\n \"to\": \"borrowing\",\n \"actor\": \"admin\",\n \"method\": \"POST\",\n \"path\": \"/borrow-record/approve\",\n \"invalidStateMessage\": \"当前状态不能审核\",\n \"successMessage\": \"借阅审核通过\",\n \"audit\": {\"userField\": \"approve_user_id\", \"timeField\": \"approve_time\"},\n \"effects\": [\n {\n \"type\": \"decrease\",\n \"table\": \"book_info\",\n \"relationField\": \"book_id\",\n \"field\": \"stock\",\n \"amount\": \"1\",\n \"min\": \"0\",\n \"notFoundMessage\": \"图书不存在\",\n \"errorMessage\": \"图书库存不足\"\n }\n ],\n \"button\": {\n \"scope\": \"admin\",\n \"pageCode\": \"borrow_admin_page\",\n \"slot\": \"list.rowActions\",\n \"type\": \"success\",\n \"confirm\": \"确认审核通过并借出图书吗?\",\n \"order\": 10\n }\n },\n {\n \"code\": \"reject\",\n \"name\": \"审核拒绝\",\n \"from\": \"pending\",\n \"to\": \"rejected\",\n \"actor\": \"admin\",\n \"method\": \"POST\",\n \"path\": \"/borrow-record/reject\",\n \"invalidStateMessage\": \"当前状态不能拒绝\",\n \"successMessage\": \"借阅申请已拒绝\",\n \"audit\": {\"userField\": \"reject_user_id\", \"timeField\": \"reject_time\"},\n \"effects\": [],\n \"button\": {\n \"scope\": \"admin\",\n \"pageCode\": \"borrow_admin_page\",\n \"slot\": \"list.rowActions\",\n \"type\": \"danger\",\n \"confirm\": \"确认拒绝该借阅申请吗?\",\n \"order\": 20\n }\n },\n {\n \"code\": \"return_book\",\n \"name\": \"还书\",\n \"from\": \"borrowing\",\n \"to\": \"returned\",\n \"actor\": \"user\",\n \"method\": \"POST\",\n \"path\": \"/borrow-record/return\",\n \"invalidStateMessage\": \"当前状态不能还书\",\n \"successMessage\": \"还书成功\",\n \"audit\": {},\n \"effects\": [\n {\n \"type\": \"increase\",\n \"table\": \"book_info\",\n \"relationField\": \"book_id\",\n \"field\": \"stock\",\n \"amount\": \"1\",\n \"notFoundMessage\": \"图书不存在\",\n \"errorMessage\": \"库存增加失败\"\n },\n {\n \"type\": \"update_related\",\n \"table\": \"borrow_record\",\n \"relationField\": \"id\",\n \"values\": {\n \"return_time\": \"now\",\n \"return_user_id\": \"currentUserId\"\n }\n }\n ],\n \"button\": {\n \"scope\": \"user\",\n \"pageCode\": \"borrow_history_page\",\n \"slot\": \"list.rowActions\",\n \"type\": \"primary\",\n \"confirm\": \"确认还书吗?\",\n \"order\": 10\n }\n },\n {\n \"code\": \"cancel_reservation\",\n \"name\": \"取消预约\",\n \"from\": \"reserved\",\n \"to\": \"cancelled\",\n \"actor\": \"user\",\n \"method\": \"POST\",\n \"path\": \"/reservation/cancel\",\n \"invalidStateMessage\": \"预约已处理不能取消\",\n \"successMessage\": \"预约已取消\",\n \"audit\": {},\n \"effects\": [\n {\n \"type\": \"update_related\",\n \"table\": \"reservation\",\n \"relationField\": \"id\",\n \"values\": {\n \"cancel_time\": \"now\",\n \"cancel_user_id\": \"currentUserId\"\n }\n }\n ],\n \"button\": {\n \"scope\": \"user\",\n \"pageCode\": \"reservation_history_page\",\n \"slot\": \"list.rowActions\",\n \"type\": \"default\",\n \"confirm\": \"确认取消预约吗?\",\n \"order\": 10\n }\n },\n {\n \"code\": \"confirm_reservation\",\n \"name\": \"确认预约借出\",\n \"from\": \"reserved\",\n \"to\": \"borrowing\",\n \"actor\": \"admin\",\n \"method\": \"POST\",\n \"path\": \"/reservation/confirm\",\n \"invalidStateMessage\": \"预约已取消或已借出\",\n \"successMessage\": \"预约已确认,图书已借出\",\n \"audit\": {\"userField\": \"confirm_user_id\", \"timeField\": \"confirm_time\"},\n \"effects\": [\n {\n \"type\": \"decrease\",\n \"table\": \"book_info\",\n \"relationField\": \"book_id\",\n \"field\": \"stock\",\n \"amount\": \"1\",\n \"min\": \"0\",\n \"notFoundMessage\": \"图书不存在\",\n \"errorMessage\": \"图书库存不足\"\n }\n ],\n \"button\": {\n \"scope\": \"admin\",\n \"pageCode\": \"reservation_admin_page\",\n \"slot\": \"list.rowActions\",\n \"type\": \"primary\",\n \"confirm\": \"确认将预约转为借出?\",\n \"order\": 10\n }\n },\n {\n \"code\": \"reject_reservation\",\n \"name\": \"拒绝预约\",\n \"from\": \"reserved\",\n \"to\": \"cancelled\",\n \"actor\": \"admin\",\n \"method\": \"POST\",\n \"path\": \"/reservation/reject\",\n \"invalidStateMessage\": \"预约已取消或已借出\",\n \"successMessage\": \"预约已被拒绝\",\n \"audit\": {\"userField\": \"reject_user_id\", \"timeField\": \"reject_time\"},\n \"effects\": [],\n \"button\": {\n \"scope\": \"admin\",\n \"pageCode\": \"reservation_admin_page\",\n \"slot\": \"list.rowActions\",\n \"type\": \"danger\",\n \"confirm\": \"确认拒绝该预约吗?\",\n \"order\": 20\n }\n }\n ],\n \"metrics\": [\n {\"code\": \"borrowing_count\", \"name\": \"借阅中数量\", \"table\": \"borrow_record\", \"aggregate\": \"count\", \"field\": \"id\", \"status\": \"borrowing\", \"unit\": \"条\"},\n {\"code\": \"pending_count\", \"name\": \"待审核数量\", \"table\": \"borrow_record\", \"aggregate\": \"count\", \"field\": \"id\", \"status\": \"pending\", \"unit\": \"条\"},\n {\"code\": \"returned_count\", \"name\": \"已归还数量\", \"table\": \"borrow_record\", \"aggregate\": \"count\", \"field\": \"id\", \"status\": \"returned\", \"unit\": \"条\"},\n {\"code\": \"reserved_count\", \"name\": \"预约数量\", \"table\": \"borrow_record\", \"aggregate\": \"count\", \"field\": \"id\", \"status\": \"reserved\", \"unit\": \"条\"}\n ]\n}', '0', 87800, 1772, 640, 1132, 7146, 5431, 1772, 7146, 8918, 2, 0.01543680, '1', NULL, '2026-07-15 08:52:51');
INSERT INTO `front_ai_usage_ledger` VALUES (151, 113, 113, 109, 100, 'database', 'deepseek', 'deepseek-v4-flash', 'front.database', 'V2', 'c7d0a32ce0b0055ac80348fb10c1beb758034b9c5b5637694725425bb7937cbc', '你是 MySQL 业务数据库设计专家。只输出符合用户消息结构的 JSON根据已确认的应用蓝图和业务闭环生成可直接落地的表、字段、主外键、字典和表操作策略。字段必须业务化且类型合法所有蓝图与闭环引用必须有真实表字段承载不得生成菜单、权限关系、代码或业务动作。flowConfig.actions[].audit 中非空的 userField 和 timeField 必须是 mainTable 的真实字段userField 使用 bigint(20)timeField 使用 datetime。', '根据项目输入 JSON 生成 MySQL 数据库设计 JSON只返回 JSON不要 Markdown 围栏或解释。\nConfirmed app blueprint JSON and Confirmed business loop plan JSON are supplied in the input.\nDatabase generation constraints from the business loop plan must be enforced.\nEvery confirmedBusinessLoopPlan.metrics tableName, field, and filters.field must exist in the generated schema. Numeric sum/avg/min/max metric fields must use a compatible numeric column type. Status-filter metric values must remain compatible with the matching stateMachines.states.\nIf input.mode is correction, repair input.originalResponse according to input.validationError and return the complete corrected database JSON. Do not drop unrelated valid tables or fields.\n输出结构{\"tables\":[{\"tableName\":\"car_info\",\"tableComment\":\"车辆信息表\",\"adminMenuName\":\"车辆管理\",\"operations\":{\"add\":true,\"edit\":true,\"remove\":true,\"removeType\":\"physical\",\"reason\":\"\"},\"columns\":[{\"columnName\":\"id\",\"columnLabel\":\"ID\",\"columnComment\":\"主键ID\",\"columnType\":\"bigint(20)\",\"isPk\":\"1\",\"isIncrement\":\"1\",\"isRequired\":\"1\"}]}]}。\n不要使用 field_1 等占位字段;每个表必须包含非空 columns以及 adminMenuName 和 operations.add/edit/remove/removeType/reason。\nadminMenuName 必须来自本表 tableComment/tableName不得复用其他表或宽泛模块名称。\nadminMenuName must come from that table\'s own tableComment or tableName.\n字段数组名称只能是 columns不能使用 fields、fieldDesign、fieldList、columnList。\nEvery table must include a non-empty columns array; use columns exactly.\n每个字段必须包含 columnName、columnLabel、columnComment、columnType、isPk、isIncrement、isRequired。columnLabel 是短 UI 标签columnComment 是完整数据库说明。\n可提供 javaType、htmlTypehtmlType 只能是 input、textarea、select、radio、checkbox、datetime、imageUpload、fileUpload、editor。\nselect/radio/checkbox 应提供 dictType 和 dictOptions。关联选择使用 remote:target_table:value_field:label_field且目标表和值/标签字段必须都存在于本次 tables JSON。\n非主键外键字段应在目标表存在时使用 remote select无目标表的分类、类型、状态使用本地 dictOptions 或普通输入。\n普通主数据表除唯一主键外至少包含 4 个业务字段。\n订单、支付、借还、审批、流程、任务、库存记录等动作记录表使用仅新增关系、审计、日志、历史表使用只读普通主数据表使用完整 CRUD。\n不要生成 businessActions、业务动作、工作流、代码、菜单表、user_role、角色权限表或权限表。\nDo not generate menu tables, user_role tables, role-permission tables, or permission tables.\n表名字段名只使用小写字母、数字、下划线每表必须且只能有一个主键。字段类型只能使用 bigint(20)、int(11)、varchar(n)、char(n)、decimal(p,s)、datetime、date、text、longtext。\n为 confirmedAppBlueprint.roles 中每个角色创建独立账号表admin 使用 admin其他角色使用 role.code。不得使用共享用户表或 role_id/role_code/user_role。\n角色账号表包含 `<role_code>_id` 自增主键、username、password_hash、nickname、status、create_time。admin 只能登录后台,非 admin 角色登录前台。\n生成 frontendPages.tableName 引用的全部表;个人资料页必须绑定对应非 admin 角色账号表。requiresLogin=true 且 dataScope=CURRENT_USER 的业务数据通常包含 user_id。\ncanonicalTableRegistry 中的名称是最终规范表名。confirmedBusinessLoopPlan 若出现与其指向同一业务对象的同义表名,必须使用 canonicalTableRegistry 中的名称,不得同时生成两张同义表。\n根据 confirmedBusinessLoopPlan 创建 coreObjects.tableName、actions.ownerTable补齐 stateMachines.statusField、quantityRules.quantityField 以及 recordRules 和动作前置条件需要的字段。状态值不得超出 stateMachines.states。\n严格实现 confirmedBusinessLoopPlan.businessPoliciesTIME_LIMIT 的 startField、dueField 使用 datetimeOVERDUE_FEE 的 dueField 使用 datetime、daysTargetField 使用 int(11)、targetField 使用 decimal(10,2)QUANTITY_LIMIT 的 targetField 使用 int(11) 且默认值为 0。所有政策字段必须位于政策指定的 tableName禁止只把期限或公式写进 columnComment 而不创建字段。\nDo not invent status values outside stateMachines.states.\n严格遵守 input.limits.maxTables 和 maxColumnsPerTable。\n项目输入 JSON\n{\"mode\":\"generate\",\"projectName\":\"图书管理系统\",\"projectDescription\":\"功能:借书、还书、预约、取消预约\\n角色用户、管理员\\n其他模块轮播图、公告、新闻\",\"industryTemplate\":\"\",\"stylePreset\":\"dark-tech\",\"extraRequirements\":\"\",\"confirmedAppBlueprint\":{\"adminHomeDashboard\":{\"charts\":[{\"filters\":[],\"metrics\":[{\"aggregate\":\"count\",\"label\":\"借阅趋势\"}],\"title\":\"借阅趋势\",\"type\":\"line\"},{\"filters\":[],\"metrics\":[{\"aggregate\":\"count\",\"label\":\"图书分类分布\"}],\"title\":\"图书分类分布\",\"type\":\"pie\"}],\"description\":\"核心业务数据\",\"metrics\":[{\"aggregate\":\"count\",\"filters\":[],\"semantic\":\"content\"},{\"aggregate\":\"count\",\"filters\":[],\"semantic\":\"order\"},{\"aggregate\":\"count\",\"filters\":[],\"semantic\":\"task\"},{\"aggregate\":\"count\",\"filters\":[],\"semantic\":\"user\"}],\"title\":\"运营总览\"},\"adminMenus\":[{\"code\":\"book_admin\",\"dataScope\":\"ROLE\",\"name\":\"图书管理\",\"pageCode\":\"book_admin_page\",\"pageType\":\"list\",\"path\":\"/admin/books\",\"requiresLogin\":true,\"tableName\":\"book_info\",\"visibleRoles\":[\"admin\"]},{\"code\":\"borrow_admin\",\"dataScope\":\"ROLE\",\"name\":\"借阅管理\",\"pageCode\":\"borrow_admin_page\",\"pageType\":\"list\",\"path\":\"/admin/borrows\",\"requiresLogin\":true,\"tableName\":\"borrow_record\",\"visibleRoles\":[\"admin\"]},{\"code\":\"reservation_admin\",\"dataScope\":\"ROLE\",\"name\":\"预约管理\",\"pageCode\":\"reservation_admin_page\",\"pageType\":\"list\",\"path\":\"/admin/reservations\",\"requiresLogin\":true,\"tableName\":\"reservation\",\"visibleRoles\":[\"admin\"]},{\"code\":\"carousel_admin\",\"dataScope\":\"ROLE\",\"name\":\"轮播图管理\",\"pageCode\":\"carousel_admin_page\",\"pageType\":\"list\",\"path\":\"/admin/carousels\",\"requiresLogin\":true,\"tableName\":\"carousel\",\"visibleRoles\":[\"admin\"]},{\"code\":\"announcement_admin\",\"dataScope\":\"ROLE\",\"name\":\"公告管理\",\"pageCode\":\"announcement_admin_page\",\"pageType\":\"list\",\"path\":\"/admin/announcements\",\"requiresLogin\":true,\"tableName\":\"announcement\",\"visibleRoles\":[\"admin\"]},{\"code\":\"news_admin\",\"dataScope\":\"ROLE\",\"name\":\"新闻管理\",\"pageCode\":\"news_admin_page\",\"pageType\":\"list\",\"path\":\"/admin/news\",\"requiresLogin\":true,\"tableName\":\"news\",\"visibleRoles\":[\"admin\"]},{\"code\":\"user_admin\",\"dataScope\":\"ROLE\",\"name\":\"用户管理\",\"pageCode\":\"user_admin_page\",\"pageType\":\"list\",\"path\":\"/admin/users\",\"requiresLogin\":true,\"tableName\":\"user\",\"visibleRoles\":[\"admin\"]},{\"code\":\"admin_profile\",\"dataScope\":\"CURRENT_USER\",\"name\":\"管理员资料\",\"pageCode\":\"admin_profile_page\",\"pageType\":\"form\",\"path\":\"/admin/profile\",\"requiresLogin\":true,\"tableName\":\"admin\",\"visibleRoles\":[\"admin\"]}],\"frontendMenus\":[{\"code\":\"book_catalog\",\"dataScope\":\"PUBLIC\",\"name\":\"图书目录\",\"pageCode\":\"book_catalog_page\",\"pageType\":\"\",\"path\":\"/books\",\"requiresLogin\":false,\"tableName\":\"\",\"visibleRoles\":[]},{\"code\":\"borrow_history\",\"dataScope\":\"CURRENT_USER\",\"name\":\"借阅记录\",\"pageCode\":\"borrow_history_page\",\"pageType\":\"\",\"path\":\"/borrow-history\",\"requiresLogin\":true,\"tableName\":\"\",\"visibleRoles\":[\"user\"]},{\"code\":\"reservation_history\",\"dataScope\":\"CURRENT_USER\",\"name\":\"预约记录\",\"pageCode\":\"reservation_history_page\",\"pageType\":\"\",\"path\":\"/reservation-history\",\"requiresLogin\":true,\"tableName\":\"\",\"visibleRoles\":[\"user\"]},{\"code\":\"user_profile\",\"dataScope\":\"CURRENT_USER\",\"name\":\"个人资料\",\"pageCode\":\"user_profile_page\",\"pageType\":\"\",\"path\":\"/profile\",\"requiresLogin\":true,\"tableName\":\"\",\"visibleRoles\":[\"user\"]}],\"frontendPages\":[{\"code\":\"book_catalog_page\",\"menuCode\":\"book_catalog\",\"name\":\"图书目录\",\"pageType\":\"list\",\"parentPageCode\":\"\",\"path\":\"/books\",\"tableName\":\"book_info\"},{\"code\":\"borrow_history_page\",\"menuCode\":\"borrow_history\",\"name\":\"借阅记录\",\"pageType\":\"current_user_list\",\"parentPageCode\":\"\",\"path\":\"/borrow-history\",\"tableName\":\"borrow_record\"},{\"code\":\"reservation_history_page\",\"menuCode\":\"reservation_history\",\"name\":\"预约记录\",\"pageType\":\"current_user_list\",\"parentPageCode\":\"\",\"path\":\"/reservation-history\",\"tableName\":\"reservation\"},{\"code\":\"user_profile_page\",\"menuCode\":\"user_profile\",\"name\":\"个人资料\",\"pageType\":\"form\",\"parentPageCode\":\"\",\"path\":\"/profile\",\"tableName\":\"user\"}],\"roles\":[{\"code\":\"admin\",\"description\":\"系统管理员,管理所有业务数据\",\"name\":\"管理员\"},{\"code\":\"user\",\"description\":\"普通读者,可借书、还书、预约\",\"name\":\"用户\"}]},\"flowConfig\":{\"actions\":[{\"actor\":\"admin\",\"audit\":{\"timeField\":\"approve_time\",\"userField\":\"approve_user_id\"},\"button\":{\"confirm\":\"确认审核通过并借出图书吗?\",\"order\":10,\"pageCode\":\"borrow_admin_page\",\"scope\":\"admin\",\"slot\":\"list.rowActions\",\"type\":\"success\"},\"code\":\"approve\",\"effects\":[{\"amount\":\"1\",\"errorMessage\":\"图书库存不足\",\"field\":\"stock\",\"min\":\"0\",\"notFoundMessage\":\"图书不存在\",\"relationField\":\"book_id\",\"table\":\"book_info\",\"type\":\"decrease\",\"values\":{}}],\"from\":\"pending\",\"invalidStateMessage\":\"当前状态不能审核\",\"method\":\"POST\",\"name\":\"审核通过\",\"path\":\"/borrow-record/approve\",\"requestFields\":[],\"successMessage\":\"借阅审核通过\",\"to\":\"borrowing\"},{\"actor\":\"admin\",\"audit\":{\"timeField\":\"reject_time\",\"userField\":\"reject_user_id\"},\"button\":{\"confirm\":\"确认拒绝该借阅申请吗?\",\"order\":20,\"pageCode\":\"borrow_admin_page\",\"scope\":\"admin\",\"slot\":\"list.rowActions\",\"type\":\"danger\"},\"code\":\"reject\",\"effects\":[],\"from\":\"pending\",\"invalidStateMessage\":\"当前状态不能拒绝\",\"method\":\"POST\",\"name\":\"审核拒绝\",\"path\":\"/borrow-record/reject\",\"requestFields\":[],\"successMessage\":\"借阅申请已拒绝\",\"to\":\"rejected\"},{\"actor\":\"user\",\"audit\":{},\"button\":{\"confirm\":\"确认还书吗?\",\"order\":10,\"pageCode\":\"borrow_history_page\",\"scope\":\"user\",\"slot\":\"list.rowActions\",\"type\":\"primary\"},\"code\":\"return_book\",\"effects\":[{\"amount\":\"1\",\"errorMessage\":\"库存增加失败\",\"field\":\"stock\",\"min\":\"0\",\"notFoundMessage\":\"图书不存在\",\"relationField\":\"book_id\",\"table\":\"book_info\",\"type\":\"increase\",\"values\":{}},{\"amount\":\"1\",\"min\":\"0\",\"relationField\":\"id\",\"table\":\"borrow_record\",\"type\":\"update_related\",\"values\":{\"return_user_id\":\"currentUserId\",\"return_time\":\"now\"}}],\"from\":\"borrowing\",\"invalidStateMessage\":\"当前状态不能还书\",\"method\":\"POST\",\"name\":\"还书\",\"path\":\"/borrow-record/return\",\"requestFields\":[],\"successMessage\":\"还书成功\",\"to\":\"returned\"},{\"actor\":\"user\",\"audit\":{},\"button\":{\"confirm\":\"确认取消预约吗?\",\"order\":10,\"pageCode\":\"reservation_history_page\",\"scope\":\"user\",\"slot\":\"list.rowActions\",\"type\":\"default\"},\"code\":\"cancel_reservation\",\"effects\":[{\"amount\":\"1\",\"min\":\"0\",\"relationField\":\"id\",\"table\":\"reservation\",\"type\":\"update_related\",\"values\":{\"cancel_time\":\"now\",\"cancel_user_id\":\"currentUserId\"}}],\"from\":\"reserved\",\"invalidStateMessage\":\"预约已处理不能取消\",\"method\":\"POST\",\"name\":\"取消预约\",\"path\":\"/reservation/cancel\",\"requestFields\":[],\"successMessage\":\"预约已取消\",\"to\":\"cancelled\"},{\"actor\":\"admin\",\"audit\":{\"timeField\":\"confirm_time\",\"userField\":\"confirm_user_id\"},\"button\":{\"confirm\":\"确认将预约转为借出?\",\"order\":10,\"pageCode\":\"reservation_admin_page\",\"scope\":\"admin\",\"slot\":\"list.rowActions\",\"type\":\"primary\"},\"code\":\"confirm_reservation\",\"effects\":[{\"amount\":\"1\",\"errorMessage\":\"图书库存不足\",\"field\":\"stock\",\"min\":\"0\",\"notFoundMessage\":\"图书不存在\",\"relationField\":\"book_id\",\"table\":\"book_info\",\"type\":\"decrease\",\"values\":{}}],\"from\":\"reserved\",\"invalidStateMessage\":\"预约已取消或已借出\",\"method\":\"POST\",\"name\":\"确认预约借出\",\"path\":\"/reservation/confirm\",\"requestFields\":[],\"successMessage\":\"预约已确认,图书已借出\",\"to\":\"borrowing\"},{\"actor\":\"admin\",\"audit\":{\"timeField\":\"reject_time\",\"userField\":\"reject_user_id\"},\"button\":{\"confirm\":\"确认拒绝该预约吗?\",\"order\":20,\"pageCode\":\"reservation_admin_page\",\"scope\":\"admin\",\"slot\":\"list.rowActions\",\"type\":\"danger\"},\"code\":\"reject_reservation\",\"effects\":[],\"from\":\"reserved\",\"invalidStateMessage\":\"预约已取消或已借出\",\"method\":\"POST\",\"name\":\"拒绝预约\",\"path\":\"/reservation/reject\",\"requestFields\":[],\"successMessage\":\"预约已被拒绝\",\"to\":\"cancelled\"}],\"code\":\"borrow_and_reservation\",\"mainTable\":\"borrow_record\",\"metrics\":[{\"aggregate\":\"count\",\"code\":\"borrowing_count\",\"field\":\"id\",\"name\":\"借阅中数量\",\"status\":\"borrowing\",\"table\":\"borrow_record\",\"unit\":\"条\"},{\"aggregate\":\"count\",\"code\":\"pending_count\",\"field\":\"id\",\"name\":\"待审核数量\",\"status\":\"pending\",\"table\":\"borrow_record\",\"unit\":\"条\"},{\"aggregate\":\"count\",\"code\":\"returned_count\",\"field\":\"id\",\"name\":\"已归还数量\",\"status\":\"returned\",\"table\":\"borrow_record\",\"unit\":\"条\"},{\"aggregate\":\"count\",\"code\":\"reserved_count\",\"field\":\"id\",\"name\":\"预约数量\",\"status\":\"reserved\",\"table\":\"borrow_record\",\"unit\":\"条\"}],\"name\":\"借阅与预约管理\",\"notFoundMessage\":\"借阅记录不存在\",\"states\":[{\"code\":\"pending\",\"label\":\"待审核\"},{\"code\":\"borrowing\",\"label\":\"借阅中\"},{\"code\":\"returned\",\"label\":\"已归还\"},{\"code\":\"rejected\",\"label\":\"已拒绝\"},{\"code\":\"reserved\",\"label\":\"已预约\"},{\"code\":\"cancelled\",\"label\":\"已取消\"}],\"statusField\":\"status\",\"version\":\"1.0\"},\"compiledFlowContract\":{\"acceptanceScenarios\":[],\"actions\":[{\"actor\":\"admin\",\"code\":\"approve\",\"name\":\"审核通过\",\"ownerObject\":\"borrow_record\",\"ownerTable\":\"borrow_record\",\"preconditions\":[],\"quantityEffects\":[{\"actionCode\":\"approve\",\"amount\":\"1\",\"effectType\":\"decrease\",\"objectCode\":\"book_info\",\"quantityField\":\"stock\",\"tableName\":\"book_info\"}],\"recordEffects\":[],\"required\":true,\"stateTransitions\":[{\"actionCode\":\"approve\",\"fromState\":\"pending\",\"toState\":\"borrowing\"}]},{\"actor\":\"admin\",\"code\":\"reject\",\"name\":\"审核拒绝\",\"ownerObject\":\"borrow_record\",\"ownerTable\":\"borrow_record\",\"preconditions\":[],\"quantityEffects\":[],\"recordEffects\":[],\"required\":true,\"stateTransitions\":[{\"actionCode\":\"reject\",\"fromState\":\"pending\",\"toState\":\"rejected\"}]},{\"actor\":\"user\",\"code\":\"return_book\",\"name\":\"还书\",\"ownerObject\":\"borrow_record\",\"ownerTable\":\"borrow_record\",\"preconditions\":[],\"quantityEffects\":[{\"actionCode\":\"return_book\",\"amount\":\"1\",\"effectType\":\"increase\",\"objectCode\":\"book_info\",\"quantityField\":\"stock\",\"tableName\":\"book_info\"}],\"recordEffects\":[{\"actionCode\":\"return_book\",\"objectCode\":\"borrow_record\",\"operation\":\"UPDATE_FIELDS\",\"tableName\":\"borrow_record\"}],\"required\":true,\"stateTransitions\":[{\"actionCode\":\"return_book\",\"fromState\":\"borrowing\",\"toState\":\"returned\"}]},{\"actor\":\"user\",\"code\":\"cancel_reservation\",\"name\":\"取消预约\",\"ownerObject\":\"borrow_record\",\"ownerTable\":\"borrow_record\",\"preconditions\":[],\"quantityEffects\":[],\"recordEffects\":[{\"actionCode\":\"cancel_reservation\",\"objectCode\":\"reservation\",\"operation\":\"UPDATE_FIELDS\",\"tableName\":\"reservation\"}],\"required\":true,\"stateTransitions\":[{\"actionCode\":\"cancel_reservation\",\"fromState\":\"reserved\",\"toState\":\"cancelled\"}]},{\"actor\":\"admin\",\"code\":\"confirm_reservation\",\"name\":\"确认预约借出\",\"ownerObject\":\"borrow_record\",\"ownerTable\":\"borrow_record\",\"preconditions\":[],\"quantityEffects\":[{\"actionCode\":\"confirm_reservation\",\"amount\":\"1\",\"effectType\":\"decrease\",\"objectCode\":\"book_info\",\"quantityField\":\"stock\",\"tableName\":\"book_info\"}],\"recordEffects\":[],\"required\":true,\"stateTransitions\":[{\"actionCode\":\"confirm_reservation\",\"fromState\":\"reserved\",\"toState\":\"borrowing\"}]},{\"actor\":\"admin\",\"code\":\"reject_reservation\",\"name\":\"拒绝预约\",\"ownerObject\":\"borrow_record\",\"ownerTable\":\"borrow_record\",\"preconditions\":[],\"quantityEffects\":[],\"recordEffects\":[],\"required\":true,\"stateTransitions\":[{\"actionCode\":\"reject_reservation\",\"fromState\":\"reserved\",\"toState\":\"cancelled\"}]}],\"businessPolicies\":[],\"coreObjects\":[{\"code\":\"borrow_record\",\"name\":\"借阅与预约管理\",\"objectType\":\"main\",\"tableName\":\"borrow_record\"},{\"code\":\"book_info\",\"name\":\"book_info\",\"objectType\":\"related\",\"tableName\":\"book_info\"},{\"code\":\"reservation\",\"name\":\"reservation\",\"objectType\":\"related\",\"tableName\":\"reservation\"}],\"domainName\":\"借阅与预约管理\",\"metrics\":[{\"aggregate\":\"count\",\"code\":\"borrowing_count\",\"field\":\"id\",\"filters\":[{\"field\":\"status\",\"operator\":\"eq\",\"values\":[\"borrowing\"]}],\"name\":\"借阅中数量\",\"relatedActionCodes\":[],\"required\":true,\"tableName\":\"borrow_record\",\"unit\":\"条\"},{\"aggregate\":\"count\",\"code\":\"pending_count\",\"field\":\"id\",\"filters\":[{\"field\":\"status\",\"operator\":\"eq\",\"values\":[\"pending\"]}],\"name\":\"待审核数量\",\"relatedActionCodes\":[],\"required\":true,\"tableName\":\"borrow_record\",\"unit\":\"条\"},{\"aggregate\":\"count\",\"code\":\"returned_count\",\"field\":\"id\",\"filters\":[{\"field\":\"status\",\"operator\":\"eq\",\"values\":[\"returned\"]}],\"name\":\"已归还数量\",\"relatedActionCodes\":[],\"required\":true,\"tableName\":\"borrow_record\",\"unit\":\"条\"},{\"aggregate\":\"count\",\"code\":\"reserved_count\",\"field\":\"id\",\"filters\":[{\"field\":\"status\",\"operator\":\"eq\",\"values\":[\"reserved\"]}],\"name\":\"预约数量\",\"relatedActionCodes\":[],\"required\":true,\"tableName\":\"borrow_record\",\"unit\":\"条\"}],\"pageBindings\":[{\"actionCode\":\"approve\",\"pageCode\":\"borrow_admin_page\",\"slot\":\"list.rowActions\",\"tableName\":\"borrow_record\",\"target\":\"admin\"},{\"actionCode\":\"reject\",\"pageCode\":\"borrow_admin_page\",\"slot\":\"list.rowActions\",\"tableName\":\"borrow_record\",\"target\":\"admin\"},{\"actionCode\":\"return_book\",\"pageCode\":\"borrow_history_page\",\"slot\":\"list.rowActions\",\"tableName\":\"borrow_record\",\"target\":\"frontend\"},{\"actionCode\":\"cancel_reservation\",\"pageCode\":\"reservation_history_page\",\"slot\":\"list.rowActions\",\"tableName\":\"borrow_record\",\"target\":\"frontend\"},{\"actionCode\":\"confirm_reservation\",\"pageCode\":\"reservation_admin_page\",\"slot\":\"list.rowActions\",\"tableName\":\"borrow_record\",\"target\":\"admin\"},{\"actionCode\":\"reject_reservation\",\"pageCode\":\"reservation_admin_page\",\"slot\":\"list.rowActions\",\"tableName\":\"borrow_record\",\"target\":\"admin\"}],\"quantityRules\":[{\"actionCode\":\"approve\",\"amount\":\"1\",\"effectType\":\"decrease\",\"objectCode\":\"book_info\",\"quantityField\":\"stock\",\"tableName\":\"book_info\"},{\"actionCode\":\"return_book\",\"amount\":\"1\",\"effectType\":\"increase\",\"objectCode\":\"book_info\",\"quantityField\":\"stock\",\"tableName\":\"book_info\"},{\"actionCode\":\"confirm_reservation\",\"amount\":\"1\",\"effectType\":\"decrease\",\"objectCode\":\"book_info\",\"quantityField\":\"stock\",\"tableName\":\"book_info\"}],\"recordRules\":[{\"actionCode\":\"return_book\",\"objectCode\":\"borrow_record\",\"operation\":\"UPDATE_FIELDS\",\"tableName\":\"borrow_record\"},{\"actionCode\":\"cancel_reservation\",\"objectCode\":\"reservation\",\"operation\":\"UPDATE_FIELDS\",\"tableName\":\"reservation\"}],\"stateMachines\":[{\"objectCode\":\"borrow_record\",\"states\":[\"pending\",\"borrowing\",\"returned\",\"rejected\",\"reserved\",\"cancelled\"],\"statusField\":\"status\",\"tableName\":\"borrow_record\",\"transitions\":[{\"actionCode\":\"approve\",\"fromState\":\"pending\",\"toState\":\"borrowing\"},{\"actionCode\":\"reject\",\"fromState\":\"pending\",\"toState\":\"rejected\"},{\"actionCode\":\"return_book\",\"fromState\":\"borrowing\",\"toState\":\"returned\"},{\"actionCode\":\"cancel_reservation\",\"fromState\":\"reserved\",\"toState\":\"cancelled\"},{\"actionCode\":\"confirm_reservation\",\"fromState\":\"reserved\",\"toState\":\"borrowing\"},{\"actionCode\":\"reject_reservation\",\"fromState\":\"reserved\",\"toState\":\"cancelled\"}]}]},\"canonicalTableRegistry\":[\"book_info\",\"borrow_record\",\"reservation\",\"user\",\"carousel\",\"announcement\",\"news\",\"admin\"],\"limits\":{\"maxTables\":12,\"maxColumnsPerTable\":30}}', '{\"tables\":[{\"tableName\":\"book_info\",\"tableComment\":\"图书信息表\",\"adminMenuName\":\"图书管理\",\"operations\":{\"add\":true,\"edit\":true,\"remove\":true,\"removeType\":\"physical\",\"reason\":\"\"},\"columns\":[{\"columnName\":\"id\",\"columnLabel\":\"ID\",\"columnComment\":\"主键ID\",\"columnType\":\"bigint(20)\",\"isPk\":\"1\",\"isIncrement\":\"1\",\"isRequired\":\"1\",\"javaType\":\"Long\",\"htmlType\":\"input\"},{\"columnName\":\"title\",\"columnLabel\":\"书名\",\"columnComment\":\"图书名称\",\"columnType\":\"varchar(200)\",\"isPk\":\"0\",\"isIncrement\":\"0\",\"isRequired\":\"1\",\"javaType\":\"String\",\"htmlType\":\"input\"},{\"columnName\":\"author\",\"columnLabel\":\"作者\",\"columnComment\":\"图书作者\",\"columnType\":\"varchar(100)\",\"isPk\":\"0\",\"isIncrement\":\"0\",\"isRequired\":\"1\",\"javaType\":\"String\",\"htmlType\":\"input\"},{\"columnName\":\"publisher\",\"columnLabel\":\"出版社\",\"columnComment\":\"出版社名称\",\"columnType\":\"varchar(200)\",\"isPk\":\"0\",\"isIncrement\":\"0\",\"isRequired\":\"0\",\"javaType\":\"String\",\"htmlType\":\"input\"},{\"columnName\":\"isbn\",\"columnLabel\":\"ISBN\",\"columnComment\":\"国际标准书号\",\"columnType\":\"varchar(20)\",\"isPk\":\"0\",\"isIncrement\":\"0\",\"isRequired\":\"0\",\"javaType\":\"String\",\"htmlType\":\"input\"},{\"columnName\":\"stock\",\"columnLabel\":\"库存\",\"columnComment\":\"当前可借库存数量\",\"columnType\":\"int(11)\",\"isPk\":\"0\",\"isIncrement\":\"0\",\"isRequired\":\"1\",\"javaType\":\"Integer\",\"htmlType\":\"input\"},{\"columnName\":\"description\",\"columnLabel\":\"简介\",\"columnComment\":\"图书内容简介\",\"columnType\":\"text\",\"isPk\":\"0\",\"isIncrement\":\"0\",\"isRequired\":\"0\",\"javaType\":\"String\",\"htmlType\":\"textarea\"},{\"columnName\":\"cover_image\",\"columnLabel\":\"封面图片\",\"columnComment\":\"图书封面图片URL\",\"columnType\":\"varchar(500)\",\"isPk\":\"0\",\"isIncrement\":\"0\",\"isRequired\":\"0\",\"javaType\":\"String\",\"htmlType\":\"imageUpload\"},{\"columnName\":\"create_time\",\"columnLabel\":\"创建时间\",\"columnComment\":\"记录创建时间\",\"columnType\":\"datetime\",\"isPk\":\"0\",\"isIncrement\":\"0\",\"isRequired\":\"1\",\"javaType\":\"Date\",\"htmlType\":\"datetime\"},{\"columnName\":\"update_time\",\"columnLabel\":\"更新时间\",\"columnComment\":\"记录更新时间\",\"columnType\":\"datetime\",\"isPk\":\"0\",\"isIncrement\":\"0\",\"isRequired\":\"0\",\"javaType\":\"Date\",\"htmlType\":\"datetime\"}]},{\"tableName\":\"borrow_record\",\"tableComment\":\"借阅与预约记录表\",\"adminMenuName\":\"借阅管理\",\"operations\":{\"add\":true,\"edit\":false,\"remove\":false,\"removeType\":\"physical\",\"reason\":\"仅新增动作记录\"},\"columns\":[{\"columnName\":\"id\",\"columnLabel\":\"ID\",\"columnComment\":\"主键ID\",\"columnType\":\"bigint(20)\",\"isPk\":\"1\",\"isIncrement\":\"1\",\"isRequired\":\"1\",\"javaType\":\"Long\",\"htmlType\":\"input\"},{\"columnName\":\"book_id\",\"columnLabel\":\"图书\",\"columnComment\":\"关联图书ID\",\"columnType\":\"bigint(20)\",\"isPk\":\"0\",\"isIncrement\":\"0\",\"isRequired\":\"1\",\"javaType\":\"Long\",\"htmlType\":\"select\",\"dictType\":\"remote:book_info:id:title\"},{\"columnName\":\"user_id\",\"columnLabel\":\"用户\",\"columnComment\":\"关联读者用户ID\",\"columnType\":\"bigint(20)\",\"isPk\":\"0\",\"isIncrement\":\"0\",\"isRequired\":\"1\",\"javaType\":\"Long\",\"htmlType\":\"select\",\"dictType\":\"remote:user:user_id:username\"},{\"columnName\":\"borrow_time\",\"columnLabel\":\"借书时间\",\"columnComment\":\"借出时间\",\"columnType\":\"datetime\",\"isPk\":\"0\",\"isIncrement\":\"0\",\"isRequired\":\"0\",\"javaType\":\"Date\",\"htmlType\":\"datetime\"},{\"columnName\":\"return_time\",\"columnLabel\":\"还书时间\",\"columnComment\":\"实际归还时间\",\"columnType\":\"datetime\",\"isPk\":\"0\",\"isIncrement\":\"0\",\"isRequired\":\"0\",\"javaType\":\"Date\",\"htmlType\":\"datetime\"},{\"columnName\":\"status\",\"columnLabel\":\"状态\",\"columnComment\":\"记录状态pending-待审核 borrowing-借阅中 returned-已归还 rejected-已拒绝 reserved-已预约 cancelled-已取消\",\"columnType\":\"varchar(20)\",\"isPk\":\"0\",\"isIncrement\":\"0\",\"isRequired\":\"1\",\"javaType\":\"String\",\"htmlType\":\"select\",\"dictType\":\"borrow_status\",\"dictOptions\":[{\"label\":\"待审核\",\"value\":\"pending\"},{\"label\":\"借阅中\",\"value\":\"borrowing\"},{\"label\":\"已归还\",\"value\":\"returned\"},{\"label\":\"已拒绝\",\"value\":\"rejected\"},{\"label\":\"已预约\",\"value\":\"reserved\"},{\"label\":\"已取消\",\"value\":\"cancelled\"}]},{\"columnName\":\"approve_user_id\",\"columnLabel\":\"审核人\",\"columnComment\":\"通过借阅审核的管理员ID\",\"columnType\":\"bigint(20)\",\"isPk\":\"0\",\"isIncrement\":\"0\",\"isRequired\":\"0\",\"javaType\":\"Long\",\"htmlType\":\"select\",\"dictType\":\"remote:admin:admin_id:username\"},{\"columnName\":\"approve_time\",\"columnLabel\":\"审核时间\",\"columnComment\":\"借阅通过审核的时间\",\"columnType\":\"datetime\",\"isPk\":\"0\",\"isIncrement\":\"0\",\"isRequired\":\"0\",\"javaType\":\"Date\",\"htmlType\":\"datetime\"},{\"columnName\":\"reject_user_id\",\"columnLabel\":\"拒绝人\",\"columnComment\":\"拒绝借阅或预约的管理员ID\",\"columnType\":\"bigint(20)\",\"isPk\":\"0\",\"isIncrement\":\"0\",\"isRequired\":\"0\",\"javaType\":\"Long\",\"htmlType\":\"select\",\"dictType\":\"remote:admin:admin_id:username\"},{\"columnName\":\"reject_time\",\"columnLabel\":\"拒绝时间\",\"columnComment\":\"拒绝操作的时间\",\"columnType\":\"datetime\",\"isPk\":\"0\",\"isIncrement\":\"0\",\"isRequired\":\"0\",\"javaType\":\"Date\",\"htmlType\":\"datetime\"},{\"columnName\":\"confirm_user_id\",\"columnLabel\":\"确认人\",\"columnComment\":\"确认预约借出的管理员ID\",\"columnType\":\"bigint(20)\",\"isPk\":\"0\",\"isIncrement\":\"0\",\"isRequired\":\"0\",\"javaType\":\"Long\",\"htmlType\":\"select\",\"dictType\":\"remote:admin:admin_id:username\"},{\"columnName\":\"confirm_time\",\"columnLabel\":\"确认时间\",\"columnComment\":\"确认预约借出的时间\",\"columnType\":\"datetime\",\"isPk\":\"0\",\"isIncrement\":\"0\",\"isRequired\":\"0\",\"javaType\":\"Date\",\"htmlType\":\"datetime\"},{\"columnName\":\"return_user_id\",\"columnLabel\":\"还书人\",\"columnComment\":\"执行还书操作的用户ID\",\"columnType\":\"bigint(20)\",\"isPk\":\"0\",\"isIncrement\":\"0\",\"isRequired\":\"0\",\"javaType\":\"Long\",\"htmlType\":\"select\",\"dictType\":\"remote:user:user_id:username\"},{\"columnName\":\"create_time\",\"columnLabel\":\"创建时间\",\"columnComment\":\"记录创建时间\",\"columnType\":\"datetime\",\"isPk\":\"0\",\"isIncrement\":\"0\",\"isRequired\":\"1\",\"javaType\":\"Date\",\"htmlType\":\"datetime\"}]},{\"tableName\":\"reservation\",\"tableComment\":\"预约记录表\",\"adminMenuName\":\"预约管理\",\"operations\":{\"add\":true,\"edit\":false,\"remove\":false,\"removeType\":\"physical\",\"reason\":\"仅新增动作记录\"},\"columns\":[{\"columnName\":\"id\",\"columnLabel\":\"ID\",\"columnComment\":\"主键ID\",\"columnType\":\"bigint(20)\",\"isPk\":\"1\",\"isIncrement\":\"1\",\"isRequired\":\"1\",\"javaType\":\"Long\",\"htmlType\":\"input\"},{\"columnName\":\"book_id\",\"columnLabel\":\"图书\",\"columnComment\":\"关联图书ID\",\"columnType\":\"bigint(20)\",\"isPk\":\"0\",\"isIncrement\":\"0\",\"isRequired\":\"1\",\"javaType\":\"Long\",\"htmlType\":\"select\",\"dictType\":\"remote:book_info:id:title\"},{\"columnName\":\"user_id\",\"columnLabel\":\"用户\",\"columnComment\":\"关联读者用户ID\",\"columnType\":\"bigint(20)\",\"isPk\":\"0\",\"isIncrement\":\"0\",\"isRequired\":\"1\",\"javaType\":\"Long\",\"htmlType\":\"select\",\"dictType\":\"remote:user:user_id:username\"},{\"columnName\":\"status\",\"columnLabel\":\"状态\",\"columnComment\":\"预约状态reserved-已预约 cancelled-已取消\",\"columnType\":\"varchar(20)\",\"isPk\":\"0\",\"isIncrement\":\"0\",\"isRequired\":\"1\",\"javaType\":\"String\",\"htmlType\":\"select\",\"dictType\":\"reservation_status\",\"dictOptions\":[{\"label\":\"已预约\",\"value\":\"reserved\"},{\"label\":\"已取消\",\"value\":\"cancelled\"}]},{\"columnName\":\"cancel_user_id\",\"columnLabel\":\"取消人\",\"columnComment\":\"取消预约的用户ID\",\"columnType\":\"bigint(20)\",\"isPk\":\"0\",\"isIncrement\":\"0\",\"isRequired\":\"0\",\"javaType\":\"Long\",\"htmlType\":\"select\",\"dictType\":\"remote:user:user_id:username\"},{\"columnName\":\"cancel_time\",\"columnLabel\":\"取消时间\",\"columnComment\":\"取消预约的时间\",\"columnType\":\"datetime\",\"isPk\":\"0\",\"isIncrement\":\"0\",\"isRequired\":\"0\",\"javaType\":\"Date\",\"htmlType\":\"datetime\"},{\"columnName\":\"create_time\",\"columnLabel\":\"创建时间\",\"columnComment\":\"预约创建时间\",\"columnType\":\"datetime\",\"isPk\":\"0\",\"isIncrement\":\"0\",\"isRequired\":\"1\",\"javaType\":\"Date\",\"htmlType\":\"datetime\"}]},{\"tableName\":\"user\",\"tableComment\":\"用户账号表\",\"adminMenuName\":\"用户管理\",\"operations\":{\"add\":true,\"edit\":true,\"remove\":true,\"removeType\":\"physical\",\"reason\":\"\"},\"columns\":[{\"columnName\":\"user_id\",\"columnLabel\":\"用户ID\",\"columnComment\":\"自增主键\",\"columnType\":\"bigint(20)\",\"isPk\":\"1\",\"isIncrement\":\"1\",\"isRequired\":\"1\",\"javaType\":\"Long\",\"htmlType\":\"input\"},{\"columnName\":\"username\",\"columnLabel\":\"用户名\",\"columnComment\":\"登录用户名,唯一\",\"columnType\":\"varchar(50)\",\"isPk\":\"0\",\"isIncrement\":\"0\",\"isRequired\":\"1\",\"javaType\":\"String\",\"htmlType\":\"input\"},{\"columnName\":\"password_hash\",\"columnLabel\":\"密码哈希\",\"columnComment\":\"加密后的密码\",\"columnType\":\"varchar(255)\",\"isPk\":\"0\",\"isIncrement\":\"0\",\"isRequired\":\"1\",\"javaType\":\"String\",\"htmlType\":\"input\"},{\"columnName\":\"nickname\",\"columnLabel\":\"昵称\",\"columnComment\":\"用户显示名称\",\"columnType\":\"varchar(50)\",\"isPk\":\"0\",\"isIncrement\":\"0\",\"isRequired\":\"0\",\"javaType\":\"String\",\"htmlType\":\"input\"},{\"columnName\":\"status\",\"columnLabel\":\"状态\",\"columnComment\":\"账号状态1-启用 0-禁用\",\"columnType\":\"int(11)\",\"isPk\":\"0\",\"isIncrement\":\"0\",\"isRequired\":\"1\",\"javaType\":\"Integer\",\"htmlType\":\"select\",\"dictType\":\"user_status\",\"dictOptions\":[{\"label\":\"启用\",\"value\":1},{\"label\":\"禁用\",\"value\":0}]},{\"columnName\":\"create_time\",\"columnLabel\":\"创建时间\",\"columnComment\":\"账号创建时间\",\"columnType\":\"datetime\",\"isPk\":\"0\",\"isIncrement\":\"0\",\"isRequired\":\"1\",\"javaType\":\"Date\",\"htmlType\":\"datetime\"}]},{\"tableName\":\"admin\",\"tableComment\":\"管理员账号表\",\"adminMenuName\":\"管理员资料\",\"operations\":{\"add\":true,\"edit\":true,\"remove\":true,\"removeType\":\"physical\",\"reason\":\"\"},\"columns\":[{\"columnName\":\"admin_id\",\"columnLabel\":\"管理员ID\",\"columnComment\":\"自增主键\",\"columnType\":\"bigint(20)\",\"isPk\":\"1\",\"isIncrement\":\"1\",\"isRequired\":\"1\",\"javaType\":\"Long\",\"htmlType\":\"input\"},{\"columnName\":\"username\",\"columnLabel\":\"用户名\",\"columnComment\":\"登录用户名\",\"columnType\":\"varchar(50)\",\"isPk\":\"0\",\"isIncrement\":\"0\",\"isRequired\":\"1\",\"javaType\":\"String\",\"htmlType\":\"input\"},{\"columnName\":\"password_hash\",\"columnLabel\":\"密码哈希\",\"columnComment\":\"加密后的密码\",\"columnType\":\"varchar(255)\",\"isPk\":\"0\",\"isIncrement\":\"0\",\"isRequired\":\"1\",\"javaType\":\"String\",\"htmlType\":\"input\"},{\"columnName\":\"nickname\",\"columnLabel\":\"昵称\",\"columnComment\":\"管理员显示名称\",\"columnType\":\"varchar(50)\",\"isPk\":\"0\",\"isIncrement\":\"0\",\"isRequired\":\"0\",\"javaType\":\"String\",\"htmlType\":\"input\"},{\"columnName\":\"status\",\"columnLabel\":\"状态\",\"columnComment\":\"账号状态1-启用 0-禁用\",\"columnType\":\"int(11)\",\"isPk\":\"0\",\"isIncrement\":\"0\",\"isRequired\":\"1\",\"javaType\":\"Integer\",\"htmlType\":\"select\",\"dictType\":\"admin_status\",\"dictOptions\":[{\"label\":\"启用\",\"value\":1},{\"label\":\"禁用\",\"value\":0}]},{\"columnName\":\"create_time\",\"columnLabel\":\"创建时间\",\"columnComment\":\"账号创建时间\",\"columnType\":\"datetime\",\"isPk\":\"0\",\"isIncrement\":\"0\",\"isRequired\":\"1\",\"javaType\":\"Date\",\"htmlType\":\"datetime\"}]},{\"tableName\":\"carousel\",\"tableComment\":\"轮播图表\",\"adminMenuName\":\"轮播图管理\",\"operations\":{\"add\":true,\"edit\":true,\"remove\":true,\"removeType\":\"physical\",\"reason\":\"\"},\"columns\":[{\"columnName\":\"id\",\"columnLabel\":\"ID\",\"columnComment\":\"主键ID\",\"columnType\":\"bigint(20)\",\"isPk\":\"1\",\"isIncrement\":\"1\",\"isRequired\":\"1\",\"javaType\":\"Long\",\"htmlType\":\"input\"},{\"columnName\":\"title\",\"columnLabel\":\"标题\",\"columnComment\":\"轮播图标题\",\"columnType\":\"varchar(200)\",\"isPk\":\"0\",\"isIncrement\":\"0\",\"isRequired\":\"0\",\"javaType\":\"String\",\"htmlType\":\"input\"},{\"columnName\":\"image_url\",\"columnLabel\":\"图片地址\",\"columnComment\":\"轮播图片URL\",\"columnType\":\"varchar(500)\",\"isPk\":\"0\",\"isIncrement\":\"0\",\"isRequired\":\"1\",\"javaType\":\"String\",\"htmlType\":\"imageUpload\"},{\"columnName\":\"link_url\",\"columnLabel\":\"链接地址\",\"columnComment\":\"点击跳转链接\",\"columnType\":\"varchar(500)\",\"isPk\":\"0\",\"isIncrement\":\"0\",\"isRequired\":\"0\",\"javaType\":\"String\",\"htmlType\":\"input\"},{\"columnName\":\"sort_order\",\"columnLabel\":\"排序\",\"columnComment\":\"显示顺序\",\"columnType\":\"int(11)\",\"isPk\":\"0\",\"isIncrement\":\"0\",\"isRequired\":\"0\",\"javaType\":\"Integer\",\"htmlType\":\"input\"},{\"columnName\":\"status\",\"columnLabel\":\"状态\",\"columnComment\":\"启用状态1-启用 0-禁用\",\"columnType\":\"int(11)\",\"isPk\":\"0\",\"isIncrement\":\"0\",\"isRequired\":\"1\",\"javaType\":\"Integer\",\"htmlType\":\"select\",\"dictType\":\"carousel_status\",\"dictOptions\":[{\"label\":\"启用\",\"value\":1},{\"label\":\"禁用\",\"value\":0}]},{\"columnName\":\"create_time\",\"columnLabel\":\"创建时间\",\"columnComment\":\"记录创建时间\",\"columnType\":\"datetime\",\"isPk\":\"0\",\"isIncrement\":\"0\",\"isRequired\":\"1\",\"javaType\":\"Date\",\"htmlType\":\"datetime\"},{\"columnName\":\"update_time\",\"columnLabel\":\"更新时间\",\"columnComment\":\"记录更新时间\",\"columnType\":\"datetime\",\"isPk\":\"0\",\"isIncrement\":\"0\",\"isRequired\":\"0\",\"javaType\":\"Date\",\"htmlType\":\"datetime\"}]},{\"tableName\":\"announcement\",\"tableComment\":\"公告表\",\"adminMenuName\":\"公告管理\",\"operations\":{\"add\":true,\"edit\":true,\"remove\":true,\"removeType\":\"physical\",\"reason\":\"\"},\"columns\":[{\"columnName\":\"id\",\"columnLabel\":\"ID\",\"columnComment\":\"主键ID\",\"columnType\":\"bigint(20)\",\"isPk\":\"1\",\"isIncrement\":\"1\",\"isRequired\":\"1\",\"javaType\":\"Long\",\"htmlType\":\"input\"},{\"columnName\":\"title\",\"columnLabel\":\"标题\",\"columnComment\":\"公告标题\",\"columnType\":\"varchar(200)\",\"isPk\":\"0\",\"isIncrement\":\"0\",\"isRequired\":\"1\",\"javaType\":\"String\",\"htmlType\":\"input\"},{\"columnName\":\"content\",\"columnLabel\":\"内容\",\"columnComment\":\"公告详细内容\",\"columnType\":\"text\",\"isPk\":\"0\",\"isIncrement\":\"0\",\"isRequired\":\"1\",\"javaType\":\"String\",\"htmlType\":\"editor\"},{\"columnName\":\"publish_time\",\"columnLabel\":\"发布时间\",\"columnComment\":\"公告正式发布时间\",\"columnType\":\"datetime\",\"isPk\":\"0\",\"isIncrement\":\"0\",\"isRequired\":\"0\",\"javaType\":\"Date\",\"htmlType\":\"datetime\"},{\"columnName\":\"status\",\"columnLabel\":\"状态\",\"columnComment\":\"发布状态draft-草稿 published-已发布\",\"columnType\":\"varchar(20)\",\"isPk\":\"0\",\"isIncrement\":\"0\",\"isRequired\":\"1\",\"javaType\":\"String\",\"htmlType\":\"select\",\"dictType\":\"announcement_status\",\"dictOptions\":[{\"label\":\"草稿\",\"value\":\"draft\"},{\"label\":\"已发布\",\"value\":\"published\"}]},{\"columnName\":\"create_time\",\"columnLabel\":\"创建时间\",\"columnComment\":\"记录创建时间\",\"columnType\":\"datetime\",\"isPk\":\"0\",\"isIncrement\":\"0\",\"isRequired\":\"1\",\"javaType\":\"Date\",\"htmlType\":\"datetime\"},{\"columnName\":\"update_time\",\"columnLabel\":\"更新时间\",\"columnComment\":\"记录更新时间\",\"columnType\":\"datetime\",\"isPk\":\"0\",\"isIncrement\":\"0\",\"isRequired\":\"0\",\"javaType\":\"Date\",\"htmlType\":\"datetime\"}]},{\"tableName\":\"news\",\"tableComment\":\"新闻表\",\"adminMenuName\":\"新闻管理\",\"operations\":{\"add\":true,\"edit\":true,\"remove\":true,\"removeType\":\"physical\",\"reason\":\"\"},\"columns\":[{\"columnName\":\"id\",\"columnLabel\":\"ID\",\"columnComment\":\"主键ID\",\"columnType\":\"bigint(20)\",\"isPk\":\"1\",\"isIncrement\":\"1\",\"isRequired\":\"1\",\"javaType\":\"Long\",\"htmlType\":\"input\"},{\"columnName\":\"title\",\"columnLabel\":\"标题\",\"columnComment\":\"新闻标题\",\"columnType\":\"varchar(200)\",\"isPk\":\"0\",\"isIncrement\":\"0\",\"isRequired\":\"1\",\"javaType\":\"String\",\"htmlType\":\"input\"},{\"columnName\":\"summary\",\"columnLabel\":\"摘要\",\"columnComment\":\"新闻摘要\",\"columnType\":\"varchar(500)\",\"isPk\":\"0\",\"isIncrement\":\"0\",\"isRequired\":\"0\",\"javaType\":\"String\",\"htmlType\":\"textarea\"},{\"columnName\":\"content\",\"columnLabel\":\"内容\",\"columnComment\":\"新闻详细内容\",\"columnType\":\"text\",\"isPk\":\"0\",\"isIncrement\":\"0\",\"isRequired\":\"1\",\"javaType\":\"String\",\"htmlType\":\"editor\"},{\"columnName\":\"author\",\"columnLabel\":\"作者\",\"columnComment\":\"新闻作者\",\"columnType\":\"varchar(100)\",\"isPk\":\"0\",\"isIncrement\":\"0\",\"isRequired\":\"0\",\"javaType\":\"String\",\"htmlType\":\"input\"},{\"columnName\":\"publish_time\",\"columnLabel\":\"发布时间\",\"columnComment\":\"新闻正式发布时间\",\"columnType\":\"datetime\",\"isPk\":\"0\",\"isIncrement\":\"0\",\"isRequired\":\"0\",\"javaType\":\"Date\",\"htmlType\":\"datetime\"},{\"columnName\":\"status\",\"columnLabel\":\"状态\",\"columnComment\":\"发布状态draft-草稿 published-已发布\",\"columnType\":\"varchar(20)\",\"isPk\":\"0\",\"isIncrement\":\"0\",\"isRequired\":\"1\",\"javaType\":\"String\",\"htmlType\":\"select\",\"dictType\":\"news_status\",\"dictOptions\":[{\"label\":\"草稿\",\"value\":\"draft\"},{\"label\":\"已发布\",\"value\":\"published\"}]},{\"columnName\":\"create_time\",\"columnLabel\":\"创建时间\",\"columnComment\":\"记录创建时间\",\"columnType\":\"datetime\",\"isPk\":\"0\",\"isIncrement\":\"0\",\"isRequired\":\"1\",\"javaType\":\"Date\",\"htmlType\":\"datetime\"},{\"columnName\":\"update_time\",\"columnLabel\":\"更新时间\",\"columnComment\":\"记录更新时间\",\"columnType\":\"datetime\",\"isPk\":\"0\",\"isIncrement\":\"0\",\"isRequired\":\"0\",\"javaType\":\"Date\",\"htmlType\":\"datetime\"}]}]}', '0', 89470, 4977, 1152, 3825, 10007, 5547, 4977, 10007, 14984, 3, 0.02386204, '1', NULL, '2026-07-15 08:54:21');
INSERT INTO `front_ai_usage_ledger` VALUES (152, 114, 114, 110, 100, 'app_blueprint', 'deepseek', 'deepseek-v4-flash', 'front.app_blueprint', 'V1', 'c3ee0180ed446fe83055bd1c272ed1b6e3978584fe52f98f5e78e14e2cfc8f29', '你是应用蓝图架构师。只输出符合用户消息结构的 JSON规划业务角色、前台菜单与页面、后台菜单和运营看板。保持 pageCode、tableName、角色数据范围和登录要求前后一致只描述静态蓝图不生成数据库、权限表、菜单表或代码。角色名称使用简体中文技术标识使用稳定的小写 snake_case。', '根据项目输入 JSON 生成应用蓝图,只返回 JSON不要 Markdown 围栏或解释。\n输出结构{\"roles\":[{\"code\":\"reader\",\"name\":\"读者\",\"description\":\"\"}],\"frontendMenus\":[{\"code\":\"book_catalog\",\"name\":\"图书目录\",\"path\":\"/books\",\"pageCode\":\"book_catalog_page\",\"requiresLogin\":false,\"visibleRoles\":[],\"dataScope\":\"PUBLIC\"}],\"frontendPages\":[{\"code\":\"book_catalog_page\",\"name\":\"图书目录\",\"menuCode\":\"book_catalog\",\"path\":\"/books\",\"pageType\":\"list\",\"tableName\":\"book_info\"}],\"adminMenus\":[{\"code\":\"book_admin\",\"name\":\"图书管理\",\"path\":\"/admin/books\",\"pageCode\":\"book_admin_page\",\"tableName\":\"book_info\",\"pageType\":\"list\",\"requiresLogin\":true,\"visibleRoles\":[\"admin\"],\"dataScope\":\"ROLE\"}],\"adminHomeDashboard\":{\"title\":\"运营总览\",\"description\":\"核心业务数据\",\"metrics\":[],\"charts\":[]}}。\n蓝图描述目标生成项目而不是当前 EasyCode/RuoYi 平台。不要生成数据库表、菜单表、角色表、权限表或代码。\nrole.name 使用简体中文role.code 使用小写 snake_case。只有 role.code=admin 是系统管理员;名称含“管理员”或“后台”的业务角色仍保持独立。\nrole.name must be Simplified Chinese. Only role.code=admin is the system administrator.\n每个菜单必须包含 requiresLogin、visibleRoles、dataScopedataScope 只能是 PUBLIC、CURRENT_USER 或 ROLE。\nadminMenus 必须包含 pageCode、tableName、pageType个人资料使用 form普通管理使用 list。\nadminMenus must include pageCode, tableName, and pageType.\nfrontendMenus 顶层菜单应指向 pageCode详情页作为子页面不创建顶层详情菜单。\n不要为轮播图、banner、公告滚动条等首页装饰创建顶层菜单可放在首页业务块或作为后台维护数据。\nfrontendPages.pageType 只能是 list、current_user_list、detail、formtableName 必须是页面展示的业务表。\n同一业务对象只使用一个稳定 tableName后续数据库、闭环、页面、看板、动作必须复用不能使用同义表名。\nadminHomeDashboard 尽量包含 4 个业务指标和至少 2 张图表趋势图与分布图所有表字段必须可由后续数据库步骤创建。semantic 只能使用 money、order、user、task、warning、inventory、content、default。\n每个非 admin 角色使用表名等于 role.code 的独立账号表,不得创建共享 user、user_info、member 或 account 表。\nNever invent a shared user, user_info, member, or account table for role accounts.\n需要个人资料页时为每个非 admin 角色创建独立 form 页面和菜单tableName 绑定 role.codepageCode/path 带角色前缀visibleRoles 只包含该角色。\nCreate one form page and one menu per non-admin role when profile pages are needed.\n个人订单、借阅、资料、预约、支付等页面必须 requiresLogin=true 且 dataScope=CURRENT_USER。\n项目输入 JSON\n{\"projectName\":\"图书管理系统\",\"projectDescription\":\"功能:借书、还书、预约、取消预约\\n角色用户、管理员\\n其他模块轮播图、公告、新闻\",\"industryTemplate\":\"\",\"stylePreset\":\"campus-orange\",\"extraRequirements\":\"\"}', '{\n \"roles\": [\n {\n \"code\": \"admin\",\n \"name\": \"系统管理员\",\n \"description\": \"系统管理员,拥有所有后台管理权限\"\n },\n {\n \"code\": \"reader\",\n \"name\": \"读者\",\n \"description\": \"普通读者,可浏览图书、借书、还书、预约\"\n }\n ],\n \"frontendMenus\": [\n {\n \"code\": \"book_catalog\",\n \"name\": \"图书目录\",\n \"path\": \"/books\",\n \"pageCode\": \"book_catalog_page\",\n \"requiresLogin\": false,\n \"visibleRoles\": [],\n \"dataScope\": \"PUBLIC\"\n },\n {\n \"code\": \"my_borrowings\",\n \"name\": \"我的借阅\",\n \"path\": \"/my-borrowings\",\n \"pageCode\": \"my_borrowings_page\",\n \"requiresLogin\": true,\n \"visibleRoles\": [\"reader\"],\n \"dataScope\": \"CURRENT_USER\"\n },\n {\n \"code\": \"my_reservations\",\n \"name\": \"我的预约\",\n \"path\": \"/my-reservations\",\n \"pageCode\": \"my_reservations_page\",\n \"requiresLogin\": true,\n \"visibleRoles\": [\"reader\"],\n \"dataScope\": \"CURRENT_USER\"\n },\n {\n \"code\": \"reader_profile\",\n \"name\": \"个人中心\",\n \"path\": \"/reader/profile\",\n \"pageCode\": \"reader_profile_page\",\n \"requiresLogin\": true,\n \"visibleRoles\": [\"reader\"],\n \"dataScope\": \"CURRENT_USER\"\n }\n ],\n \"frontendPages\": [\n {\n \"code\": \"book_catalog_page\",\n \"name\": \"图书目录\",\n \"menuCode\": \"book_catalog\",\n \"path\": \"/books\",\n \"pageType\": \"list\",\n \"tableName\": \"book_info\"\n },\n {\n \"code\": \"book_detail_page\",\n \"name\": \"图书详情\",\n \"menuCode\": null,\n \"path\": \"/books/:id\",\n \"pageType\": \"detail\",\n \"tableName\": \"book_info\"\n },\n {\n \"code\": \"my_borrowings_page\",\n \"name\": \"我的借阅\",\n \"menuCode\": \"my_borrowings\",\n \"path\": \"/my-borrowings\",\n \"pageType\": \"list\",\n \"tableName\": \"borrowing\"\n },\n {\n \"code\": \"my_reservations_page\",\n \"name\": \"我的预约\",\n \"menuCode\": \"my_reservations\",\n \"path\": \"/my-reservations\",\n \"pageType\": \"list\",\n \"tableName\": \"reservation\"\n },\n {\n \"code\": \"reader_profile_page\",\n \"name\": \"个人资料\",\n \"menuCode\": \"reader_profile\",\n \"path\": \"/reader/profile\",\n \"pageType\": \"form\",\n \"tableName\": \"reader\"\n }\n ],\n \"adminMenus\": [\n {\n \"code\": \"book_admin\",\n \"name\": \"图书管理\",\n \"path\": \"/admin/books\",\n \"pageCode\": \"book_admin_page\",\n \"tableName\": \"book_info\",\n \"pageType\": \"list\",\n \"requiresLogin\": true,\n \"visibleRoles\": [\"admin\"],\n \"dataScope\": \"ROLE\"\n },\n {\n \"code\": \"borrowing_admin\",\n \"name\": \"借阅管理\",\n \"path\": \"/admin/borrowings\",\n \"pageCode\": \"borrowing_admin_page\",\n \"tableName\": \"borrowing\",\n \"pageType\": \"list\",\n \"requiresLogin\": true,\n \"visibleRoles\": [\"admin\"],\n \"dataScope\": \"ROLE\"\n },\n {\n \"code\": \"reservation_admin\",\n \"name\": \"预约管理\",\n \"path\": \"/admin/reservations\",\n \"pageCode\": \"reservation_admin_page\",\n \"tableName\": \"reservation\",\n \"pageType\": \"list\",\n \"requiresLogin\": true,\n \"visibleRoles\": [\"admin\"],\n \"dataScope\": \"ROLE\"\n },\n {\n \"code\": \"carousel_admin\",\n \"name\": \"轮播图管理\",\n \"path\": \"/admin/carousels\",\n \"pageCode\": \"carousel_admin_page\",\n \"tableName\": \"carousel\",\n \"pageType\": \"list\",\n \"requiresLogin\": true,\n \"visibleRoles\": [\"admin\"],\n \"dataScope\": \"ROLE\"\n },\n {\n \"code\": \"announcement_admin\",\n \"name\": \"公告管理\",\n \"path\": \"/admin/announcements\",\n \"pageCode\": \"announcement_admin_page\",\n \"tableName\": \"announcement\",\n \"pageType\": \"list\",\n \"requiresLogin\": true,\n \"visibleRoles\": [\"admin\"],\n \"dataScope\": \"ROLE\"\n },\n {\n \"code\": \"news_admin\",\n \"name\": \"新闻管理\",\n \"path\": \"/admin/news\",\n \"pageCode\": \"news_admin_page\",\n \"tableName\": \"news\",\n \"pageType\": \"list\",\n \"requiresLogin\": true,\n \"visibleRoles\": [\"admin\"],\n \"dataScope\": \"ROLE\"\n },\n {\n \"code\": \"reader_admin\",\n \"name\": \"读者管理\",\n \"path\": \"/admin/readers\",\n \"pageCode\": \"reader_admin_page\",\n \"tableName\": \"reader\",\n \"pageType\": \"list\",\n \"requiresLogin\": true,\n \"visibleRoles\": [\"admin\"],\n \"dataScope\": \"ROLE\"\n },\n {\n \"code\": \"admin_profile\",\n \"name\": \"个人资料\",\n \"path\": \"/admin/profile\",\n \"pageCode\": \"admin_profile_page\",\n \"tableName\": \"admin\",\n \"pageType\": \"form\",\n \"requiresLogin\": true,\n \"visibleRoles\": [\"admin\"],\n \"dataScope\": \"CURRENT_USER\"\n }\n ],\n \"adminHomeDashboard\": {\n \"title\": \"运营总览\",\n \"description\": \"核心业务数据\",\n \"metrics\": [\n {\n \"label\": \"图书总量\",\n \"value\": 0,\n \"semantic\": \"inventory\",\n \"tableName\": \"book_info\",\n \"field\": \"count\"\n },\n {\n \"label\": \"借阅总量\",\n \"value\": 0,\n \"semantic\": \"order\",\n \"tableName\": \"borrowing\",\n \"field\": \"count\"\n },\n {\n \"label\": \"预约总量\",\n \"value\": 0,\n \"semantic\": \"task\",\n \"tableName\": \"reservation\",\n \"field\": \"count\"\n },\n {\n \"label\": \"读者总量\",\n \"value\": 0,\n \"semantic\": \"user\",\n \"tableName\": \"reader\",\n \"field\": \"count\"\n }\n ],\n \"charts\": [\n {\n \"type\": \"line\",\n \"title\": \"借阅趋势\",\n \"metric\": \"count\",\n \"dimension\": \"date\",\n \"tableName\": \"borrowing\"\n },\n {\n \"type\": \"pie\",\n \"title\": \"图书分类分布\",\n \"metric\": \"count\",\n \"dimension\": \"category\",\n \"tableName\": \"book_info\"\n }\n ]\n }\n}', '0', 30995, 819, 768, 51, 3814, 2192, 819, 3814, 4633, 1, 0.00769436, '1', NULL, '2026-07-15 09:26:20');
INSERT INTO `front_ai_usage_ledger` VALUES (153, 114, 114, 110, 100, 'flow_config', 'deepseek', 'deepseek-v4-flash', 'front.flow_config', 'V2', '493bfe3aa6bafe555f3fedab46a75c8364c303c2a589b1ffaa01196a93c6472f', '你是业务流程配置设计器。只输出一个合法 JSON 对象,不输出 Markdown、解释或 SQL。\n\n目标用最小 flow_config 描述状态流转、显式 Java 业务动作、多表数量联动、按钮和统计。不要输出 CRUD不要输出通用规则 DSL。\n\n固定结构\n{\n \"version\":\"1.0\",\n \"code\":\"snake_case\",\n \"name\":\"中文业务名\",\n \"mainTable\":\"snake_case\",\n \"statusField\":\"status\",\n \"notFoundMessage\":\"主记录不存在\",\n \"states\":[{\"code\":\"pending\",\"label\":\"待审核\"}],\n \"actions\":[{\n \"code\":\"approve\",\n \"name\":\"审核通过\",\n \"from\":\"pending\",\n \"to\":\"borrowing\",\n \"actor\":\"admin\",\n \"method\":\"POST\",\n \"path\":\"/borrow-record/approve\",\n \"invalidStateMessage\":\"当前状态不能审核\",\n \"successMessage\":\"审核成功\",\n \"audit\":{\"userField\":\"approve_user_id\",\"timeField\":\"approve_time\"},\n \"effects\":[{\n \"type\":\"decrease\",\n \"table\":\"book\",\n \"relationField\":\"book_id\",\n \"field\":\"stock\",\n \"amount\":\"1\",\n \"min\":\"0\",\n \"notFoundMessage\":\"图书不存在\",\n \"errorMessage\":\"图书库存不足\"\n }],\n \"button\":{\"scope\":\"admin\",\"pageCode\":\"borrow_record_list\",\"slot\":\"list.rowActions\",\"type\":\"success\",\"confirm\":\"确认审核通过吗?\",\"order\":10}\n }],\n \"metrics\":[{\"code\":\"borrowing_count\",\"name\":\"借阅中数量\",\"table\":\"borrow_record\",\"aggregate\":\"count\",\"field\":\"id\",\"status\":\"borrowing\",\"unit\":\"条\"}]\n}\n\n约束\n1. code、表名、字段名全部使用小写 snake_case状态 code 使用稳定英文编码label 使用中文。\n2. 每个 action 必须有 from 和 to且二者存在于 states 中并且不相同。\n3. effects.type 只能是 decrease、increase、update_related、create_record。\n4. decrease/increase 必须给 table、relationField、field、amountdecrease 还要给 min。\n5. update_related/create_record 使用 values值可为 currentUserId、now、record.字段名或常量。\n6. 审核人等身份只能通过 audit.userField 表达,由后端登录态注入,不能作为前端可传字段。\n7. 覆盖需求中的完整正向闭环和关键回退/拒绝动作,但不要为普通 CRUD 创建 action。\n8. metrics.status 如果填写,必须完全等于 states 中某个 code统计全状态数据或不能确定状态时省略 status。\n9. button.pageCode 必须引用 appBlueprint 中已有页面button.slot 只能是 list.toolbarActions、list.rowActions、detail.primaryActions、detail.secondaryActions、form.footerActions。详情页主操作使用 detail.primaryActions列表记录操作使用 list.rowActions禁止使用 page.actions 等自定义值。', '请根据以下 JSON 上下文生成 flow_config。appBlueprint 是已确认的页面、角色和菜单范围,必须与它保持一致:\n{\"mode\":\"generate\",\"projectName\":\"图书管理系统\",\"projectDescription\":\"功能:借书、还书、预约、取消预约\\n角色用户、管理员\\n其他模块轮播图、公告、新闻\",\"industryTemplate\":\"\",\"stylePreset\":\"campus-orange\",\"extraRequirements\":\"\",\"confirmedAppBlueprint\":{\"adminHomeDashboard\":{\"charts\":[{\"dimension\":{\"field\":\"date\"},\"filters\":[],\"metrics\":[{\"aggregate\":\"count\",\"label\":\"借阅趋势\"}],\"tableName\":\"borrowing\",\"title\":\"借阅趋势\",\"type\":\"line\"},{\"dimension\":{\"field\":\"category\"},\"filters\":[],\"metrics\":[{\"aggregate\":\"count\",\"label\":\"图书分类分布\"}],\"tableName\":\"book_info\",\"title\":\"图书分类分布\",\"type\":\"pie\"}],\"description\":\"核心业务数据\",\"metrics\":[{\"aggregate\":\"count\",\"field\":\"count\",\"filters\":[],\"semantic\":\"inventory\",\"tableName\":\"book_info\"},{\"aggregate\":\"count\",\"field\":\"count\",\"filters\":[],\"semantic\":\"order\",\"tableName\":\"borrowing\"},{\"aggregate\":\"count\",\"field\":\"count\",\"filters\":[],\"semantic\":\"task\",\"tableName\":\"reservation\"},{\"aggregate\":\"count\",\"field\":\"count\",\"filters\":[],\"semantic\":\"user\",\"tableName\":\"reader\"}],\"title\":\"运营总览\"},\"adminMenus\":[{\"code\":\"book_admin\",\"dataScope\":\"ROLE\",\"name\":\"图书管理\",\"pageCode\":\"book_admin_page\",\"pageType\":\"list\",\"path\":\"/admin/books\",\"requiresLogin\":true,\"tableName\":\"book_info\",\"visibleRoles\":[\"admin\"]},{\"code\":\"borrowing_admin\",\"dataScope\":\"ROLE\",\"name\":\"借阅管理\",\"pageCode\":\"borrowing_admin_page\",\"pageType\":\"list\",\"path\":\"/admin/borrowings\",\"requiresLogin\":true,\"tableName\":\"borrowing\",\"visibleRoles\":[\"admin\"]},{\"code\":\"reservation_admin\",\"dataScope\":\"ROLE\",\"name\":\"预约管理\",\"pageCode\":\"reservation_admin_page\",\"pageType\":\"list\",\"path\":\"/admin/reservations\",\"requiresLogin\":true,\"tableName\":\"reservation\",\"visibleRoles\":[\"admin\"]},{\"code\":\"carousel_admin\",\"dataScope\":\"ROLE\",\"name\":\"轮播图管理\",\"pageCode\":\"carousel_admin_page\",\"pageType\":\"list\",\"path\":\"/admin/carousels\",\"requiresLogin\":true,\"tableName\":\"carousel\",\"visibleRoles\":[\"admin\"]},{\"code\":\"announcement_admin\",\"dataScope\":\"ROLE\",\"name\":\"公告管理\",\"pageCode\":\"announcement_admin_page\",\"pageType\":\"list\",\"path\":\"/admin/announcements\",\"requiresLogin\":true,\"tableName\":\"announcement\",\"visibleRoles\":[\"admin\"]},{\"code\":\"news_admin\",\"dataScope\":\"ROLE\",\"name\":\"新闻管理\",\"pageCode\":\"news_admin_page\",\"pageType\":\"list\",\"path\":\"/admin/news\",\"requiresLogin\":true,\"tableName\":\"news\",\"visibleRoles\":[\"admin\"]},{\"code\":\"reader_admin\",\"dataScope\":\"ROLE\",\"name\":\"读者管理\",\"pageCode\":\"reader_admin_page\",\"pageType\":\"list\",\"path\":\"/admin/readers\",\"requiresLogin\":true,\"tableName\":\"reader\",\"visibleRoles\":[\"admin\"]},{\"code\":\"admin_profile\",\"dataScope\":\"CURRENT_USER\",\"name\":\"个人资料\",\"pageCode\":\"admin_profile_page\",\"pageType\":\"form\",\"path\":\"/admin/profile\",\"requiresLogin\":true,\"tableName\":\"admin\",\"visibleRoles\":[\"admin\"]}],\"frontendMenus\":[{\"code\":\"book_catalog\",\"dataScope\":\"PUBLIC\",\"name\":\"图书目录\",\"pageCode\":\"book_catalog_page\",\"pageType\":\"\",\"path\":\"/books\",\"requiresLogin\":false,\"tableName\":\"\",\"visibleRoles\":[]},{\"code\":\"my_borrowings\",\"dataScope\":\"CURRENT_USER\",\"name\":\"我的借阅\",\"pageCode\":\"my_borrowings_page\",\"pageType\":\"\",\"path\":\"/my-borrowings\",\"requiresLogin\":true,\"tableName\":\"\",\"visibleRoles\":[\"reader\"]},{\"code\":\"my_reservations\",\"dataScope\":\"CURRENT_USER\",\"name\":\"我的预约\",\"pageCode\":\"my_reservations_page\",\"pageType\":\"\",\"path\":\"/my-reservations\",\"requiresLogin\":true,\"tableName\":\"\",\"visibleRoles\":[\"reader\"]},{\"code\":\"reader_profile\",\"dataScope\":\"CURRENT_USER\",\"name\":\"个人中心\",\"pageCode\":\"reader_profile_page\",\"pageType\":\"\",\"path\":\"/reader/profile\",\"requiresLogin\":true,\"tableName\":\"\",\"visibleRoles\":[\"reader\"]}],\"frontendPages\":[{\"code\":\"book_catalog_page\",\"menuCode\":\"book_catalog\",\"name\":\"图书目录\",\"pageType\":\"list\",\"parentPageCode\":\"\",\"path\":\"/books\",\"tableName\":\"book_info\"},{\"code\":\"book_detail_page\",\"menuCode\":\"\",\"name\":\"图书详情\",\"pageType\":\"detail\",\"parentPageCode\":\"\",\"path\":\"/books/:id\",\"tableName\":\"book_info\"},{\"code\":\"my_borrowings_page\",\"menuCode\":\"my_borrowings\",\"name\":\"我的借阅\",\"pageType\":\"list\",\"parentPageCode\":\"\",\"path\":\"/my-borrowings\",\"tableName\":\"borrowing\"},{\"code\":\"my_reservations_page\",\"menuCode\":\"my_reservations\",\"name\":\"我的预约\",\"pageType\":\"list\",\"parentPageCode\":\"\",\"path\":\"/my-reservations\",\"tableName\":\"reservation\"},{\"code\":\"reader_profile_page\",\"menuCode\":\"reader_profile\",\"name\":\"个人资料\",\"pageType\":\"form\",\"parentPageCode\":\"\",\"path\":\"/reader/profile\",\"tableName\":\"reader\"}],\"roles\":[{\"code\":\"admin\",\"description\":\"系统管理员,拥有所有后台管理权限\",\"name\":\"系统管理员\"},{\"code\":\"reader\",\"description\":\"普通读者,可浏览图书、借书、还书、预约\",\"name\":\"读者\"}]}}', '{\n \"version\": \"1.0\",\n \"code\": \"reservation_management\",\n \"name\": \"预约管理\",\n \"mainTable\": \"reservation\",\n \"statusField\": \"status\",\n \"notFoundMessage\": \"预约记录不存在\",\n \"states\": [\n {\"code\": \"pending\", \"label\": \"待处理\"},\n {\"code\": \"cancelled\", \"label\": \"已取消\"},\n {\"code\": \"fulfilled\", \"label\": \"已借出\"}\n ],\n \"actions\": [\n {\n \"code\": \"cancel_reservation\",\n \"name\": \"取消预约\",\n \"from\": \"pending\",\n \"to\": \"cancelled\",\n \"actor\": \"reader\",\n \"method\": \"POST\",\n \"path\": \"/reservation/cancel\",\n \"invalidStateMessage\": \"当前状态不可取消预约\",\n \"successMessage\": \"预约已取消\",\n \"button\": {\n \"scope\": \"reader\",\n \"pageCode\": \"my_reservations_page\",\n \"slot\": \"list.rowActions\",\n \"type\": \"danger\",\n \"confirm\": \"确认取消该预约吗?\",\n \"order\": 10\n }\n },\n {\n \"code\": \"admin_cancel_reservation\",\n \"name\": \"取消预约\",\n \"from\": \"pending\",\n \"to\": \"cancelled\",\n \"actor\": \"admin\",\n \"method\": \"POST\",\n \"path\": \"/reservation/admin-cancel\",\n \"invalidStateMessage\": \"当前状态不可取消预约\",\n \"successMessage\": \"预约已取消\",\n \"audit\": {\"userField\": \"cancel_user_id\", \"timeField\": \"cancel_time\"},\n \"button\": {\n \"scope\": \"admin\",\n \"pageCode\": \"reservation_admin_page\",\n \"slot\": \"list.rowActions\",\n \"type\": \"danger\",\n \"confirm\": \"确认取消该预约吗?\",\n \"order\": 10\n }\n },\n {\n \"code\": \"fulfill_reservation\",\n \"name\": \"确认借出\",\n \"from\": \"pending\",\n \"to\": \"fulfilled\",\n \"actor\": \"admin\",\n \"method\": \"POST\",\n \"path\": \"/reservation/fulfill\",\n \"invalidStateMessage\": \"当前状态不可确认借出\",\n \"successMessage\": \"借出成功\",\n \"audit\": {\"userField\": \"fulfill_user_id\", \"timeField\": \"fulfill_time\"},\n \"effects\": [\n {\n \"type\": \"create_record\",\n \"table\": \"borrowing\",\n \"values\": {\n \"book_id\": \"record.book_id\",\n \"reader_id\": \"record.reader_id\",\n \"status\": \"\'borrowing\'\",\n \"borrow_date\": \"now\",\n \"due_date\": \"now + 30\"\n }\n },\n {\n \"type\": \"decrease\",\n \"table\": \"book_info\",\n \"relationField\": \"book_id\",\n \"field\": \"stock\",\n \"amount\": \"1\",\n \"min\": \"0\",\n \"notFoundMessage\": \"图书不存在\",\n \"errorMessage\": \"图书库存不足\"\n }\n ],\n \"button\": {\n \"scope\": \"admin\",\n \"pageCode\": \"reservation_admin_page\",\n \"slot\": \"list.rowActions\",\n \"type\": \"primary\",\n \"confirm\": \"确认借出此预约的图书?\",\n \"order\": 20\n }\n }\n ],\n \"metrics\": [\n {\"code\": \"pending_count\", \"name\": \"待处理预约数\", \"table\": \"reservation\", \"aggregate\": \"count\", \"field\": \"id\", \"status\": \"pending\", \"unit\": \"条\"},\n {\"code\": \"cancelled_count\", \"name\": \"已取消预约数\", \"table\": \"reservation\", \"aggregate\": \"count\", \"field\": \"id\", \"status\": \"cancelled\", \"unit\": \"条\"},\n {\"code\": \"fulfilled_count\", \"name\": \"已借出预约数\", \"table\": \"reservation\", \"aggregate\": \"count\", \"field\": \"id\", \"status\": \"fulfilled\", \"unit\": \"条\"},\n {\"code\": \"total_reservations\", \"name\": \"预约总数\", \"table\": \"reservation\", \"aggregate\": \"count\", \"field\": \"id\", \"unit\": \"条\"}\n ]\n}', '0', 38142, 1901, 640, 1261, 3660, 2697, 1901, 3660, 5561, 1, 0.00859380, '1', NULL, '2026-07-15 09:26:58');
INSERT INTO `front_ai_usage_ledger` VALUES (154, 114, 114, 110, 100, 'database', 'deepseek', 'deepseek-v4-flash', 'front.database', 'V2', 'c7d0a32ce0b0055ac80348fb10c1beb758034b9c5b5637694725425bb7937cbc', '你是 MySQL 业务数据库设计专家。只输出符合用户消息结构的 JSON根据已确认的应用蓝图和业务闭环生成可直接落地的表、字段、主外键、字典和表操作策略。字段必须业务化且类型合法所有蓝图与闭环引用必须有真实表字段承载不得生成菜单、权限关系、代码或业务动作。flowConfig.actions[].audit 中非空的 userField 和 timeField 必须是 mainTable 的真实字段userField 使用 bigint(20)timeField 使用 datetime。', '根据项目输入 JSON 生成 MySQL 数据库设计 JSON只返回 JSON不要 Markdown 围栏或解释。\nConfirmed app blueprint JSON and Confirmed business loop plan JSON are supplied in the input.\nDatabase generation constraints from the business loop plan must be enforced.\nEvery confirmedBusinessLoopPlan.metrics tableName, field, and filters.field must exist in the generated schema. Numeric sum/avg/min/max metric fields must use a compatible numeric column type. Status-filter metric values must remain compatible with the matching stateMachines.states.\nIf input.mode is correction, repair input.originalResponse according to input.validationError and return the complete corrected database JSON. Do not drop unrelated valid tables or fields.\n输出结构{\"tables\":[{\"tableName\":\"car_info\",\"tableComment\":\"车辆信息表\",\"adminMenuName\":\"车辆管理\",\"operations\":{\"add\":true,\"edit\":true,\"remove\":true,\"removeType\":\"physical\",\"reason\":\"\"},\"columns\":[{\"columnName\":\"id\",\"columnLabel\":\"ID\",\"columnComment\":\"主键ID\",\"columnType\":\"bigint(20)\",\"isPk\":\"1\",\"isIncrement\":\"1\",\"isRequired\":\"1\"}]}]}。\n不要使用 field_1 等占位字段;每个表必须包含非空 columns以及 adminMenuName 和 operations.add/edit/remove/removeType/reason。\nadminMenuName 必须来自本表 tableComment/tableName不得复用其他表或宽泛模块名称。\nadminMenuName must come from that table\'s own tableComment or tableName.\n字段数组名称只能是 columns不能使用 fields、fieldDesign、fieldList、columnList。\nEvery table must include a non-empty columns array; use columns exactly.\n每个字段必须包含 columnName、columnLabel、columnComment、columnType、isPk、isIncrement、isRequired。columnLabel 是短 UI 标签columnComment 是完整数据库说明。\n可提供 javaType、htmlTypehtmlType 只能是 input、textarea、select、radio、checkbox、datetime、imageUpload、fileUpload、editor。\nselect/radio/checkbox 应提供 dictType 和 dictOptions。关联选择使用 remote:target_table:value_field:label_field且目标表和值/标签字段必须都存在于本次 tables JSON。\n非主键外键字段应在目标表存在时使用 remote select无目标表的分类、类型、状态使用本地 dictOptions 或普通输入。\n普通主数据表除唯一主键外至少包含 4 个业务字段。\n订单、支付、借还、审批、流程、任务、库存记录等动作记录表使用仅新增关系、审计、日志、历史表使用只读普通主数据表使用完整 CRUD。\n不要生成 businessActions、业务动作、工作流、代码、菜单表、user_role、角色权限表或权限表。\nDo not generate menu tables, user_role tables, role-permission tables, or permission tables.\n表名字段名只使用小写字母、数字、下划线每表必须且只能有一个主键。字段类型只能使用 bigint(20)、int(11)、varchar(n)、char(n)、decimal(p,s)、datetime、date、text、longtext。\n为 confirmedAppBlueprint.roles 中每个角色创建独立账号表admin 使用 admin其他角色使用 role.code。不得使用共享用户表或 role_id/role_code/user_role。\n角色账号表包含 `<role_code>_id` 自增主键、username、password_hash、nickname、status、create_time。admin 只能登录后台,非 admin 角色登录前台。\n生成 frontendPages.tableName 引用的全部表;个人资料页必须绑定对应非 admin 角色账号表。requiresLogin=true 且 dataScope=CURRENT_USER 的业务数据通常包含 user_id。\ncanonicalTableRegistry 中的名称是最终规范表名。confirmedBusinessLoopPlan 若出现与其指向同一业务对象的同义表名,必须使用 canonicalTableRegistry 中的名称,不得同时生成两张同义表。\n根据 confirmedBusinessLoopPlan 创建 coreObjects.tableName、actions.ownerTable补齐 stateMachines.statusField、quantityRules.quantityField 以及 recordRules 和动作前置条件需要的字段。状态值不得超出 stateMachines.states。\n严格实现 confirmedBusinessLoopPlan.businessPoliciesTIME_LIMIT 的 startField、dueField 使用 datetimeOVERDUE_FEE 的 dueField 使用 datetime、daysTargetField 使用 int(11)、targetField 使用 decimal(10,2)QUANTITY_LIMIT 的 targetField 使用 int(11) 且默认值为 0。所有政策字段必须位于政策指定的 tableName禁止只把期限或公式写进 columnComment 而不创建字段。\nDo not invent status values outside stateMachines.states.\n严格遵守 input.limits.maxTables 和 maxColumnsPerTable。\n项目输入 JSON\n{\"mode\":\"generate\",\"projectName\":\"图书管理系统\",\"projectDescription\":\"功能:借书、还书、预约、取消预约\\n角色用户、管理员\\n其他模块轮播图、公告、新闻\",\"industryTemplate\":\"\",\"stylePreset\":\"campus-orange\",\"extraRequirements\":\"\",\"confirmedAppBlueprint\":{\"adminHomeDashboard\":{\"charts\":[{\"dimension\":{\"field\":\"date\"},\"filters\":[],\"metrics\":[{\"aggregate\":\"count\",\"label\":\"借阅趋势\"}],\"tableName\":\"borrowing\",\"title\":\"借阅趋势\",\"type\":\"line\"},{\"dimension\":{\"field\":\"category\"},\"filters\":[],\"metrics\":[{\"aggregate\":\"count\",\"label\":\"图书分类分布\"}],\"tableName\":\"book_info\",\"title\":\"图书分类分布\",\"type\":\"pie\"}],\"description\":\"核心业务数据\",\"metrics\":[{\"aggregate\":\"count\",\"field\":\"count\",\"filters\":[],\"semantic\":\"inventory\",\"tableName\":\"book_info\"},{\"aggregate\":\"count\",\"field\":\"count\",\"filters\":[],\"semantic\":\"order\",\"tableName\":\"borrowing\"},{\"aggregate\":\"count\",\"field\":\"count\",\"filters\":[],\"semantic\":\"task\",\"tableName\":\"reservation\"},{\"aggregate\":\"count\",\"field\":\"count\",\"filters\":[],\"semantic\":\"user\",\"tableName\":\"reader\"}],\"title\":\"运营总览\"},\"adminMenus\":[{\"code\":\"book_admin\",\"dataScope\":\"ROLE\",\"name\":\"图书管理\",\"pageCode\":\"book_admin_page\",\"pageType\":\"list\",\"path\":\"/admin/books\",\"requiresLogin\":true,\"tableName\":\"book_info\",\"visibleRoles\":[\"admin\"]},{\"code\":\"borrowing_admin\",\"dataScope\":\"ROLE\",\"name\":\"借阅管理\",\"pageCode\":\"borrowing_admin_page\",\"pageType\":\"list\",\"path\":\"/admin/borrowings\",\"requiresLogin\":true,\"tableName\":\"borrowing\",\"visibleRoles\":[\"admin\"]},{\"code\":\"reservation_admin\",\"dataScope\":\"ROLE\",\"name\":\"预约管理\",\"pageCode\":\"reservation_admin_page\",\"pageType\":\"list\",\"path\":\"/admin/reservations\",\"requiresLogin\":true,\"tableName\":\"reservation\",\"visibleRoles\":[\"admin\"]},{\"code\":\"carousel_admin\",\"dataScope\":\"ROLE\",\"name\":\"轮播图管理\",\"pageCode\":\"carousel_admin_page\",\"pageType\":\"list\",\"path\":\"/admin/carousels\",\"requiresLogin\":true,\"tableName\":\"carousel\",\"visibleRoles\":[\"admin\"]},{\"code\":\"announcement_admin\",\"dataScope\":\"ROLE\",\"name\":\"公告管理\",\"pageCode\":\"announcement_admin_page\",\"pageType\":\"list\",\"path\":\"/admin/announcements\",\"requiresLogin\":true,\"tableName\":\"announcement\",\"visibleRoles\":[\"admin\"]},{\"code\":\"news_admin\",\"dataScope\":\"ROLE\",\"name\":\"新闻管理\",\"pageCode\":\"news_admin_page\",\"pageType\":\"list\",\"path\":\"/admin/news\",\"requiresLogin\":true,\"tableName\":\"news\",\"visibleRoles\":[\"admin\"]},{\"code\":\"reader_admin\",\"dataScope\":\"ROLE\",\"name\":\"读者管理\",\"pageCode\":\"reader_admin_page\",\"pageType\":\"list\",\"path\":\"/admin/readers\",\"requiresLogin\":true,\"tableName\":\"reader\",\"visibleRoles\":[\"admin\"]},{\"code\":\"admin_profile\",\"dataScope\":\"CURRENT_USER\",\"name\":\"个人资料\",\"pageCode\":\"admin_profile_page\",\"pageType\":\"form\",\"path\":\"/admin/profile\",\"requiresLogin\":true,\"tableName\":\"admin\",\"visibleRoles\":[\"admin\"]}],\"frontendMenus\":[{\"code\":\"book_catalog\",\"dataScope\":\"PUBLIC\",\"name\":\"图书目录\",\"pageCode\":\"book_catalog_page\",\"pageType\":\"\",\"path\":\"/books\",\"requiresLogin\":false,\"tableName\":\"\",\"visibleRoles\":[]},{\"code\":\"my_borrowings\",\"dataScope\":\"CURRENT_USER\",\"name\":\"我的借阅\",\"pageCode\":\"my_borrowings_page\",\"pageType\":\"\",\"path\":\"/my-borrowings\",\"requiresLogin\":true,\"tableName\":\"\",\"visibleRoles\":[\"reader\"]},{\"code\":\"my_reservations\",\"dataScope\":\"CURRENT_USER\",\"name\":\"我的预约\",\"pageCode\":\"my_reservations_page\",\"pageType\":\"\",\"path\":\"/my-reservations\",\"requiresLogin\":true,\"tableName\":\"\",\"visibleRoles\":[\"reader\"]},{\"code\":\"reader_profile\",\"dataScope\":\"CURRENT_USER\",\"name\":\"个人中心\",\"pageCode\":\"reader_profile_page\",\"pageType\":\"\",\"path\":\"/reader/profile\",\"requiresLogin\":true,\"tableName\":\"\",\"visibleRoles\":[\"reader\"]}],\"frontendPages\":[{\"code\":\"book_catalog_page\",\"menuCode\":\"book_catalog\",\"name\":\"图书目录\",\"pageType\":\"list\",\"parentPageCode\":\"\",\"path\":\"/books\",\"tableName\":\"book_info\"},{\"code\":\"book_detail_page\",\"menuCode\":\"\",\"name\":\"图书详情\",\"pageType\":\"detail\",\"parentPageCode\":\"\",\"path\":\"/books/:id\",\"tableName\":\"book_info\"},{\"code\":\"my_borrowings_page\",\"menuCode\":\"my_borrowings\",\"name\":\"我的借阅\",\"pageType\":\"list\",\"parentPageCode\":\"\",\"path\":\"/my-borrowings\",\"tableName\":\"borrowing\"},{\"code\":\"my_reservations_page\",\"menuCode\":\"my_reservations\",\"name\":\"我的预约\",\"pageType\":\"list\",\"parentPageCode\":\"\",\"path\":\"/my-reservations\",\"tableName\":\"reservation\"},{\"code\":\"reader_profile_page\",\"menuCode\":\"reader_profile\",\"name\":\"个人资料\",\"pageType\":\"form\",\"parentPageCode\":\"\",\"path\":\"/reader/profile\",\"tableName\":\"reader\"}],\"roles\":[{\"code\":\"admin\",\"description\":\"系统管理员,拥有所有后台管理权限\",\"name\":\"系统管理员\"},{\"code\":\"reader\",\"description\":\"普通读者,可浏览图书、借书、还书、预约\",\"name\":\"读者\"}]},\"flowConfig\":{\"actions\":[{\"actor\":\"reader\",\"button\":{\"confirm\":\"确认取消该预约吗?\",\"order\":10,\"pageCode\":\"my_reservations_page\",\"scope\":\"reader\",\"slot\":\"list.rowActions\",\"type\":\"danger\"},\"code\":\"cancel_reservation\",\"effects\":[],\"from\":\"pending\",\"invalidStateMessage\":\"当前状态不可取消预约\",\"method\":\"POST\",\"name\":\"取消预约\",\"path\":\"/reservation/cancel\",\"requestFields\":[],\"successMessage\":\"预约已取消\",\"to\":\"cancelled\"},{\"actor\":\"admin\",\"audit\":{\"timeField\":\"cancel_time\",\"userField\":\"cancel_user_id\"},\"button\":{\"confirm\":\"确认取消该预约吗?\",\"order\":10,\"pageCode\":\"reservation_admin_page\",\"scope\":\"admin\",\"slot\":\"list.rowActions\",\"type\":\"danger\"},\"code\":\"admin_cancel_reservation\",\"effects\":[],\"from\":\"pending\",\"invalidStateMessage\":\"当前状态不可取消预约\",\"method\":\"POST\",\"name\":\"取消预约\",\"path\":\"/reservation/admin-cancel\",\"requestFields\":[],\"successMessage\":\"预约已取消\",\"to\":\"cancelled\"},{\"actor\":\"admin\",\"audit\":{\"timeField\":\"fulfill_time\",\"userField\":\"fulfill_user_id\"},\"button\":{\"confirm\":\"确认借出此预约的图书?\",\"order\":20,\"pageCode\":\"reservation_admin_page\",\"scope\":\"admin\",\"slot\":\"list.rowActions\",\"type\":\"primary\"},\"code\":\"fulfill_reservation\",\"effects\":[{\"amount\":\"1\",\"min\":\"0\",\"table\":\"borrowing\",\"type\":\"create_record\",\"values\":{\"reader_id\":\"record.reader_id\",\"due_date\":\"now + 30\",\"borrow_date\":\"now\",\"book_id\":\"record.book_id\",\"status\":\"\'borrowing\'\"}},{\"amount\":\"1\",\"errorMessage\":\"图书库存不足\",\"field\":\"stock\",\"min\":\"0\",\"notFoundMessage\":\"图书不存在\",\"relationField\":\"book_id\",\"table\":\"book_info\",\"type\":\"decrease\",\"values\":{}}],\"from\":\"pending\",\"invalidStateMessage\":\"当前状态不可确认借出\",\"method\":\"POST\",\"name\":\"确认借出\",\"path\":\"/reservation/fulfill\",\"requestFields\":[],\"successMessage\":\"借出成功\",\"to\":\"fulfilled\"}],\"code\":\"reservation_management\",\"mainTable\":\"reservation\",\"metrics\":[{\"aggregate\":\"count\",\"code\":\"pending_count\",\"field\":\"id\",\"name\":\"待处理预约数\",\"status\":\"pending\",\"table\":\"reservation\",\"unit\":\"条\"},{\"aggregate\":\"count\",\"code\":\"cancelled_count\",\"field\":\"id\",\"name\":\"已取消预约数\",\"status\":\"cancelled\",\"table\":\"reservation\",\"unit\":\"条\"},{\"aggregate\":\"count\",\"code\":\"fulfilled_count\",\"field\":\"id\",\"name\":\"已借出预约数\",\"status\":\"fulfilled\",\"table\":\"reservation\",\"unit\":\"条\"},{\"aggregate\":\"count\",\"code\":\"total_reservations\",\"field\":\"id\",\"name\":\"预约总数\",\"table\":\"reservation\",\"unit\":\"条\"}],\"name\":\"预约管理\",\"notFoundMessage\":\"预约记录不存在\",\"states\":[{\"code\":\"pending\",\"label\":\"待处理\"},{\"code\":\"cancelled\",\"label\":\"已取消\"},{\"code\":\"fulfilled\",\"label\":\"已借出\"}],\"statusField\":\"status\",\"version\":\"1.0\"},\"compiledFlowContract\":{\"acceptanceScenarios\":[],\"actions\":[{\"actor\":\"reader\",\"code\":\"cancel_reservation\",\"name\":\"取消预约\",\"ownerObject\":\"reservation\",\"ownerTable\":\"reservation\",\"preconditions\":[],\"quantityEffects\":[],\"recordEffects\":[],\"required\":true,\"stateTransitions\":[{\"actionCode\":\"cancel_reservation\",\"fromState\":\"pending\",\"toState\":\"cancelled\"}]},{\"actor\":\"admin\",\"code\":\"admin_cancel_reservation\",\"name\":\"取消预约\",\"ownerObject\":\"reservation\",\"ownerTable\":\"reservation\",\"preconditions\":[],\"quantityEffects\":[],\"recordEffects\":[],\"required\":true,\"stateTransitions\":[{\"actionCode\":\"admin_cancel_reservation\",\"fromState\":\"pending\",\"toState\":\"cancelled\"}]},{\"actor\":\"admin\",\"code\":\"fulfill_reservation\",\"name\":\"确认借出\",\"ownerObject\":\"reservation\",\"ownerTable\":\"reservation\",\"preconditions\":[],\"quantityEffects\":[{\"actionCode\":\"fulfill_reservation\",\"amount\":\"1\",\"effectType\":\"decrease\",\"objectCode\":\"book_info\",\"quantityField\":\"stock\",\"tableName\":\"book_info\"}],\"recordEffects\":[{\"actionCode\":\"fulfill_reservation\",\"objectCode\":\"borrowing\",\"operation\":\"INSERT_ROW\",\"tableName\":\"borrowing\"}],\"required\":true,\"stateTransitions\":[{\"actionCode\":\"fulfill_reservation\",\"fromState\":\"pending\",\"toState\":\"fulfilled\"}]}],\"businessPolicies\":[],\"coreObjects\":[{\"code\":\"reservation\",\"name\":\"预约管理\",\"objectType\":\"main\",\"tableName\":\"reservation\"},{\"code\":\"borrowing\",\"name\":\"borrowing\",\"objectType\":\"related\",\"tableName\":\"borrowing\"},{\"code\":\"book_info\",\"name\":\"book_info\",\"objectType\":\"related\",\"tableName\":\"book_info\"}],\"domainName\":\"预约管理\",\"metrics\":[{\"aggregate\":\"count\",\"code\":\"pending_count\",\"field\":\"id\",\"filters\":[{\"field\":\"status\",\"operator\":\"eq\",\"values\":[\"pending\"]}],\"name\":\"待处理预约数\",\"relatedActionCodes\":[],\"required\":true,\"tableName\":\"reservation\",\"unit\":\"条\"},{\"aggregate\":\"count\",\"code\":\"cancelled_count\",\"field\":\"id\",\"filters\":[{\"field\":\"status\",\"operator\":\"eq\",\"values\":[\"cancelled\"]}],\"name\":\"已取消预约数\",\"relatedActionCodes\":[],\"required\":true,\"tableName\":\"reservation\",\"unit\":\"条\"},{\"aggregate\":\"count\",\"code\":\"fulfilled_count\",\"field\":\"id\",\"filters\":[{\"field\":\"status\",\"operator\":\"eq\",\"values\":[\"fulfilled\"]}],\"name\":\"已借出预约数\",\"relatedActionCodes\":[],\"required\":true,\"tableName\":\"reservation\",\"unit\":\"条\"},{\"aggregate\":\"count\",\"code\":\"total_reservations\",\"field\":\"id\",\"filters\":[],\"name\":\"预约总数\",\"relatedActionCodes\":[],\"required\":true,\"tableName\":\"reservation\",\"unit\":\"条\"}],\"pageBindings\":[{\"actionCode\":\"cancel_reservation\",\"pageCode\":\"my_reservations_page\",\"slot\":\"list.rowActions\",\"tableName\":\"reservation\",\"target\":\"frontend\"},{\"actionCode\":\"admin_cancel_reservation\",\"pageCode\":\"reservation_admin_page\",\"slot\":\"list.rowActions\",\"tableName\":\"reservation\",\"target\":\"admin\"},{\"actionCode\":\"fulfill_reservation\",\"pageCode\":\"reservation_admin_page\",\"slot\":\"list.rowActions\",\"tableName\":\"reservation\",\"target\":\"admin\"}],\"quantityRules\":[{\"actionCode\":\"fulfill_reservation\",\"amount\":\"1\",\"effectType\":\"decrease\",\"objectCode\":\"book_info\",\"quantityField\":\"stock\",\"tableName\":\"book_info\"}],\"recordRules\":[{\"actionCode\":\"fulfill_reservation\",\"objectCode\":\"borrowing\",\"operation\":\"INSERT_ROW\",\"tableName\":\"borrowing\"}],\"stateMachines\":[{\"objectCode\":\"reservation\",\"states\":[\"pending\",\"cancelled\",\"fulfilled\"],\"statusField\":\"status\",\"tableName\":\"reservation\",\"transitions\":[{\"actionCode\":\"cancel_reservation\",\"fromState\":\"pending\",\"toState\":\"cancelled\"},{\"actionCode\":\"admin_cancel_reservation\",\"fromState\":\"pending\",\"toState\":\"cancelled\"},{\"actionCode\":\"fulfill_reservation\",\"fromState\":\"pending\",\"toState\":\"fulfilled\"}]}]},\"canonicalTableRegistry\":[\"book_info\",\"borrowing\",\"reservation\",\"reader\",\"carousel\",\"announcement\",\"news\",\"admin\"],\"limits\":{\"maxTables\":12,\"maxColumnsPerTable\":30}}', '{\n \"tables\": [\n {\n \"tableName\": \"book_info\",\n \"tableComment\": \"图书信息表\",\n \"adminMenuName\": \"图书管理\",\n \"operations\": {\n \"add\": true,\n \"edit\": true,\n \"remove\": true,\n \"removeType\": \"physical\",\n \"reason\": \"\"\n },\n \"columns\": [\n {\n \"columnName\": \"id\",\n \"columnLabel\": \"ID\",\n \"columnComment\": \"主键ID\",\n \"columnType\": \"bigint(20)\",\n \"isPk\": \"1\",\n \"isIncrement\": \"1\",\n \"isRequired\": \"1\"\n },\n {\n \"columnName\": \"book_name\",\n \"columnLabel\": \"书名\",\n \"columnComment\": \"图书名称\",\n \"columnType\": \"varchar(200)\",\n \"isPk\": \"0\",\n \"isIncrement\": \"0\",\n \"isRequired\": \"1\",\n \"htmlType\": \"input\"\n },\n {\n \"columnName\": \"author\",\n \"columnLabel\": \"作者\",\n \"columnComment\": \"图书作者\",\n \"columnType\": \"varchar(100)\",\n \"isPk\": \"0\",\n \"isIncrement\": \"0\",\n \"isRequired\": \"0\",\n \"htmlType\": \"input\"\n },\n {\n \"columnName\": \"publisher\",\n \"columnLabel\": \"出版社\",\n \"columnComment\": \"出版社\",\n \"columnType\": \"varchar(100)\",\n \"isPk\": \"0\",\n \"isIncrement\": \"0\",\n \"isRequired\": \"0\",\n \"htmlType\": \"input\"\n },\n {\n \"columnName\": \"isbn\",\n \"columnLabel\": \"ISBN\",\n \"columnComment\": \"国际标准书号\",\n \"columnType\": \"varchar(20)\",\n \"isPk\": \"0\",\n \"isIncrement\": \"0\",\n \"isRequired\": \"0\",\n \"htmlType\": \"input\"\n },\n {\n \"columnName\": \"category\",\n \"columnLabel\": \"分类\",\n \"columnComment\": \"图书分类\",\n \"columnType\": \"varchar(50)\",\n \"isPk\": \"0\",\n \"isIncrement\": \"0\",\n \"isRequired\": \"0\",\n \"htmlType\": \"select\",\n \"dictType\": \"\",\n \"dictOptions\": [\n { \"label\": \"文学\", \"value\": \"literature\" },\n { \"label\": \"科学\", \"value\": \"science\" },\n { \"label\": \"历史\", \"value\": \"history\" },\n { \"label\": \"其他\", \"value\": \"other\" }\n ]\n },\n {\n \"columnName\": \"stock\",\n \"columnLabel\": \"库存\",\n \"columnComment\": \"当前库存数量\",\n \"columnType\": \"int(11)\",\n \"isPk\": \"0\",\n \"isIncrement\": \"0\",\n \"isRequired\": \"1\",\n \"htmlType\": \"input\"\n },\n {\n \"columnName\": \"cover_image\",\n \"columnLabel\": \"封面图片\",\n \"columnComment\": \"图书封面图片URL\",\n \"columnType\": \"varchar(500)\",\n \"isPk\": \"0\",\n \"isIncrement\": \"0\",\n \"isRequired\": \"0\",\n \"htmlType\": \"imageUpload\"\n },\n {\n \"columnName\": \"description\",\n \"columnLabel\": \"描述\",\n \"columnComment\": \"图书简介\",\n \"columnType\": \"text\",\n \"isPk\": \"0\",\n \"isIncrement\": \"0\",\n \"isRequired\": \"0\",\n \"htmlType\": \"editor\"\n },\n {\n \"columnName\": \"create_time\",\n \"columnLabel\": \"创建时间\",\n \"columnComment\": \"创建时间\",\n \"columnType\": \"datetime\",\n \"isPk\": \"0\",\n \"isIncrement\": \"0\",\n \"isRequired\": \"0\",\n \"htmlType\": \"datetime\"\n },\n {\n \"columnName\": \"update_time\",\n \"columnLabel\": \"更新时间\",\n \"columnComment\": \"更新时间\",\n \"columnType\": \"datetime\",\n \"isPk\": \"0\",\n \"isIncrement\": \"0\",\n \"isRequired\": \"0\",\n \"htmlType\": \"datetime\"\n }\n ]\n },\n {\n \"tableName\": \"borrowing\",\n \"tableComment\": \"借阅记录表\",\n \"adminMenuName\": \"借阅管理\",\n \"operations\": {\n \"add\": true,\n \"edit\": false,\n \"remove\": false,\n \"removeType\": \"physical\",\n \"reason\": \"借阅记录仅允许新增\"\n },\n \"columns\": [\n {\n \"columnName\": \"id\",\n \"columnLabel\": \"ID\",\n \"columnComment\": \"主键ID\",\n \"columnType\": \"bigint(20)\",\n \"isPk\": \"1\",\n \"isIncrement\": \"1\",\n \"isRequired\": \"1\"\n },\n {\n \"columnName\": \"reader_id\",\n \"columnLabel\": \"读者\",\n \"columnComment\": \"借阅读者ID\",\n \"columnType\": \"bigint(20)\",\n \"isPk\": \"0\",\n \"isIncrement\": \"0\",\n \"isRequired\": \"1\",\n \"htmlType\": \"select\",\n \"dictType\": \"remote:reader:reader_id:nickname\"\n },\n {\n \"columnName\": \"book_id\",\n \"columnLabel\": \"图书\",\n \"columnComment\": \"借阅图书ID\",\n \"columnType\": \"bigint(20)\",\n \"isPk\": \"0\",\n \"isIncrement\": \"0\",\n \"isRequired\": \"1\",\n \"htmlType\": \"select\",\n \"dictType\": \"remote:book_info:id:book_name\"\n },\n {\n \"columnName\": \"borrow_date\",\n \"columnLabel\": \"借书日期\",\n \"columnComment\": \"借书日期\",\n \"columnType\": \"datetime\",\n \"isPk\": \"0\",\n \"isIncrement\": \"0\",\n \"isRequired\": \"1\",\n \"htmlType\": \"datetime\"\n },\n {\n \"columnName\": \"due_date\",\n \"columnLabel\": \"应还日期\",\n \"columnComment\": \"应还日期\",\n \"columnType\": \"datetime\",\n \"isPk\": \"0\",\n \"isIncrement\": \"0\",\n \"isRequired\": \"1\",\n \"htmlType\": \"datetime\"\n },\n {\n \"columnName\": \"return_date\",\n \"columnLabel\": \"实际归还日期\",\n \"columnComment\": \"实际归还日期\",\n \"columnType\": \"datetime\",\n \"isPk\": \"0\",\n \"isIncrement\": \"0\",\n \"isRequired\": \"0\",\n \"htmlType\": \"datetime\"\n },\n {\n \"columnName\": \"status\",\n \"columnLabel\": \"状态\",\n \"columnComment\": \"借阅状态borrowing-借阅中returned-已归还overdue-逾期\",\n \"columnType\": \"varchar(20)\",\n \"isPk\": \"0\",\n \"isIncrement\": \"0\",\n \"isRequired\": \"1\",\n \"htmlType\": \"select\",\n \"dictType\": \"\",\n \"dictOptions\": [\n { \"label\": \"借阅中\", \"value\": \"borrowing\" },\n { \"label\": \"已归还\", \"value\": \"returned\" },\n { \"label\": \"逾期\", \"value\": \"overdue\" }\n ]\n },\n {\n \"columnName\": \"renew_count\",\n \"columnLabel\": \"续借次数\",\n \"columnComment\": \"续借次数\",\n \"columnType\": \"int(11)\",\n \"isPk\": \"0\",\n \"isIncrement\": \"0\",\n \"isRequired\": \"0\",\n \"htmlType\": \"input\"\n },\n {\n \"columnName\": \"create_time\",\n \"columnLabel\": \"创建时间\",\n \"columnComment\": \"创建时间\",\n \"columnType\": \"datetime\",\n \"isPk\": \"0\",\n \"isIncrement\": \"0\",\n \"isRequired\": \"0\",\n \"htmlType\": \"datetime\"\n },\n {\n \"columnName\": \"update_time\",\n \"columnLabel\": \"更新时间\",\n \"columnComment\": \"更新时间\",\n \"columnType\": \"datetime\",\n \"isPk\": \"0\",\n \"isIncrement\": \"0\",\n \"isRequired\": \"0\",\n \"htmlType\": \"datetime\"\n }\n ]\n },\n {\n \"tableName\": \"reservation\",\n \"tableComment\": \"预约记录表\",\n \"adminMenuName\": \"预约管理\",\n \"operations\": {\n \"add\": true,\n \"edit\": false,\n \"remove\": false,\n \"removeType\": \"physical\",\n \"reason\": \"预约记录仅允许新增\"\n },\n \"columns\": [\n {\n \"columnName\": \"id\",\n \"columnLabel\": \"ID\",\n \"columnComment\": \"主键ID\",\n \"columnType\": \"bigint(20)\",\n \"isPk\": \"1\",\n \"isIncrement\": \"1\",\n \"isRequired\": \"1\"\n },\n {\n \"columnName\": \"reader_id\",\n \"columnLabel\": \"读者\",\n \"columnComment\": \"预约读者ID\",\n \"columnType\": \"bigint(20)\",\n \"isPk\": \"0\",\n \"isIncrement\": \"0\",\n \"isRequired\": \"1\",\n \"htmlType\": \"select\",\n \"dictType\": \"remote:reader:reader_id:nickname\"\n },\n {\n \"columnName\": \"book_id\",\n \"columnLabel\": \"图书\",\n \"columnComment\": \"预约图书ID\",\n \"columnType\": \"bigint(20)\",\n \"isPk\": \"0\",\n \"isIncrement\": \"0\",\n \"isRequired\": \"1\",\n \"htmlType\": \"select\",\n \"dictType\": \"remote:book_info:id:book_name\"\n },\n {\n \"columnName\": \"reserve_date\",\n \"columnLabel\": \"预约时间\",\n \"columnComment\": \"预约发起时间\",\n \"columnType\": \"datetime\",\n \"isPk\": \"0\",\n \"isIncrement\": \"0\",\n \"isRequired\": \"1\",\n \"htmlType\": \"datetime\"\n },\n {\n \"columnName\": \"status\",\n \"columnLabel\": \"状态\",\n \"columnComment\": \"预约状态pending-待处理cancelled-已取消fulfilled-已借出\",\n \"columnType\": \"varchar(20)\",\n \"isPk\": \"0\",\n \"isIncrement\": \"0\",\n \"isRequired\": \"1\",\n \"htmlType\": \"select\",\n \"dictType\": \"\",\n \"dictOptions\": [\n { \"label\": \"待处理\", \"value\": \"pending\" },\n { \"label\": \"已取消\", \"value\": \"cancelled\" },\n { \"label\": \"已借出\", \"value\": \"fulfilled\" }\n ]\n },\n {\n \"columnName\": \"cancel_user_id\",\n \"columnLabel\": \"取消操作人\",\n \"columnComment\": \"取消预约的管理员ID\",\n \"columnType\": \"bigint(20)\",\n \"isPk\": \"0\",\n \"isIncrement\": \"0\",\n \"isRequired\": \"0\",\n \"htmlType\": \"select\",\n \"dictType\": \"remote:admin:admin_id:username\"\n },\n {\n \"columnName\": \"cancel_time\",\n \"columnLabel\": \"取消时间\",\n \"columnComment\": \"取消预约的时间\",\n \"columnType\": \"datetime\",\n \"isPk\": \"0\",\n \"isIncrement\": \"0\",\n \"isRequired\": \"0\",\n \"htmlType\": \"datetime\"\n },\n {\n \"columnName\": \"fulfill_user_id\",\n \"columnLabel\": \"确认借出操作人\",\n \"columnComment\": \"确认借出的管理员ID\",\n \"columnType\": \"bigint(20)\",\n \"isPk\": \"0\",\n \"isIncrement\": \"0\",\n \"isRequired\": \"0\",\n \"htmlType\": \"select\",\n \"dictType\": \"remote:admin:admin_id:username\"\n },\n {\n \"columnName\": \"fulfill_time\",\n \"columnLabel\": \"借出时间\",\n \"columnComment\": \"确认借出的时间\",\n \"columnType\": \"datetime\",\n \"isPk\": \"0\",\n \"isIncrement\": \"0\",\n \"isRequired\": \"0\",\n \"htmlType\": \"datetime\"\n },\n {\n \"columnName\": \"create_time\",\n \"columnLabel\": \"创建时间\",\n \"columnComment\": \"创建时间\",\n \"columnType\": \"datetime\",\n \"isPk\": \"0\",\n \"isIncrement\": \"0\",\n \"isRequired\": \"0\",\n \"htmlType\": \"datetime\"\n },\n {\n \"columnName\": \"update_time\",\n \"columnLabel\": \"更新时间\",\n \"columnComment\": \"更新时间\",\n \"columnType\": \"datetime\",\n \"isPk\": \"0\",\n \"isIncrement\": \"0\",\n \"isRequired\": \"0\",\n \"htmlType\": \"datetime\"\n }\n ]\n },\n {\n \"tableName\": \"reader\",\n \"tableComment\": \"读者信息表\",\n \"adminMenuName\": \"读者管理\",\n \"operations\": {\n \"add\": true,\n \"edit\": true,\n \"remove\": true,\n \"removeType\": \"physical\",\n \"reason\": \"读者信息可物理删除\"\n },\n \"columns\": [\n {\n \"columnName\": \"reader_id\",\n \"columnLabel\": \"读者ID\",\n \"columnComment\": \"主键ID\",\n \"columnType\": \"bigint(20)\",\n \"isPk\": \"1\",\n \"isIncrement\": \"1\",\n \"isRequired\": \"1\"\n },\n {\n \"columnName\": \"username\",\n \"columnLabel\": \"用户名\",\n \"columnComment\": \"登录用户名(唯一)\",\n \"columnType\": \"varchar(50)\",\n \"isPk\": \"0\",\n \"isIncrement\": \"0\",\n \"isRequired\": \"1\",\n \"htmlType\": \"input\"\n },\n {\n \"columnName\": \"password_hash\",\n \"columnLabel\": \"密码哈希\",\n \"columnComment\": \"加密后的密码\",\n \"columnType\": \"varchar(255)\",\n \"isPk\": \"0\",\n \"isIncrement\": \"0\",\n \"isRequired\": \"1\",\n \"htmlType\": \"input\"\n },\n {\n \"columnName\": \"nickname\",\n \"columnLabel\": \"昵称\",\n \"columnComment\": \"显示昵称\",\n \"columnType\": \"varchar(100)\",\n \"isPk\": \"0\",\n \"isIncrement\": \"0\",\n \"isRequired\": \"1\",\n \"htmlType\": \"input\"\n },\n {\n \"columnName\": \"real_name\",\n \"columnLabel\": \"真实姓名\",\n \"columnComment\": \"真实姓名\",\n \"columnType\": \"varchar(100)\",\n \"isPk\": \"0\",\n \"isIncrement\": \"0\",\n \"isRequired\": \"0\",\n \"htmlType\": \"input\"\n },\n {\n \"columnName\": \"phone\",\n \"columnLabel\": \"电话\",\n \"columnComment\": \"联系电话\",\n \"columnType\": \"varchar(20)\",\n \"isPk\": \"0\",\n \"isIncrement\": \"0\",\n \"isRequired\": \"0\",\n \"htmlType\": \"input\"\n },\n {\n \"columnName\": \"email\",\n \"columnLabel\": \"邮箱\",\n \"columnComment\": \"电子邮箱\",\n \"columnType\": \"varchar(100)\",\n \"isPk\": \"0\",\n \"isIncrement\": \"0\",\n \"isRequired\": \"0\",\n \"htmlType\": \"input\"\n },\n {\n \"columnName\": \"status\",\n \"columnLabel\": \"状态\",\n \"columnComment\": \"账号状态active-正常inactive-禁用\",\n \"columnType\": \"varchar(20)\",\n \"isPk\": \"0\",\n \"isIncrement\": \"0\",\n \"isRequired\": \"1\",\n \"htmlType\": \"select\",\n \"dictType\": \"\",\n \"dictOptions\": [\n { \"label\": \"正常\", \"value\": \"active\" },\n { \"label\": \"禁用\", \"value\": \"inactive\" }\n ]\n },\n {\n \"columnName\": \"create_time\",\n \"columnLabel\": \"创建时间\",\n \"columnComment\": \"创建时间\",\n \"columnType\": \"datetime\",\n \"isPk\": \"0\",\n \"isIncrement\": \"0\",\n \"isRequired\": \"0\",\n \"htmlType\": \"datetime\"\n },\n {\n \"columnName\": \"update_time\",\n \"columnLabel\": \"更新时间\",\n \"columnComment\": \"更新时间\",\n \"columnType\": \"datetime\",\n \"isPk\": \"0\",\n \"isIncrement\": \"0\",\n \"isRequired\": \"0\",\n \"htmlType\": \"datetime\"\n }\n ]\n },\n {\n \"tableName\": \"carousel\",\n \"tableComment\": \"轮播图表\",\n \"adminMenuName\": \"轮播图管理\",\n \"operations\": {\n \"add\": true,\n \"edit\": true,\n \"remove\": true,\n \"removeType\": \"physical\",\n \"reason\": \"\"\n },\n \"columns\": [\n {\n \"columnName\": \"id\",\n \"columnLabel\": \"ID\",\n \"columnComment\": \"主键ID\",\n \"columnType\": \"bigint(20)\",\n \"isPk\": \"1\",\n \"isIncrement\": \"1\",\n \"isRequired\": \"1\"\n },\n {\n \"columnName\": \"image_url\",\n \"columnLabel\": \"图片URL\",\n \"columnComment\": \"轮播图片地址\",\n \"columnType\": \"varchar(500)\",\n \"isPk\": \"0\",\n \"isIncrement\": \"0\",\n \"isRequired\": \"1\",\n \"htmlType\": \"imageUpload\"\n },\n {\n \"columnName\": \"link_url\",\n \"columnLabel\": \"链接URL\",\n \"columnComment\": \"点击跳转链接\",\n \"columnType\": \"varchar(500)\",\n \"isPk\": \"0\",\n \"isIncrement\": \"0\",\n \"isRequired\": \"0\",\n \"htmlType\": \"input\"\n },\n {\n \"columnName\": \"sort_order\",\n \"columnLabel\": \"排序\",\n \"columnComment\": \"显示顺序,数字越小越靠前\",\n \"columnType\": \"int(11)\",\n \"isPk\": \"0\",\n \"isIncrement\": \"0\",\n \"isRequired\": \"0\",\n \"htmlType\": \"input\"\n },\n {\n \"columnName\": \"status\",\n \"columnLabel\": \"状态\",\n \"columnComment\": \"启用状态active-启用inactive-禁用\",\n \"columnType\": \"varchar(20)\",\n \"isPk\": \"0\",\n \"isIncrement\": \"0\",\n \"isRequired\": \"1\",\n \"htmlType\": \"select\",\n \"dictType\": \"\",\n \"dictOptions\": [\n { \"label\": \"启用\", \"value\": \"active\" },\n { \"label\": \"禁用\", \"value\": \"inactive\" }\n ]\n },\n {\n \"columnName\": \"create_time\",\n \"columnLabel\": \"创建时间\",\n \"columnComment\": \"创建时间\",\n \"columnType\": \"datetime\",\n \"isPk\": \"0\",\n \"isIncrement\": \"0\",\n \"isRequired\": \"0\",\n \"htmlType\": \"datetime\"\n },\n {\n \"columnName\": \"update_time\",\n \"columnLabel\": \"更新时间\",\n \"columnComment\": \"更新时间\",\n \"columnType\": \"datetime\",\n \"isPk\": \"0\",\n \"isIncrement\": \"0\",\n \"isRequired\": \"0\",\n \"htmlType\": \"datetime\"\n }\n ]\n },\n {\n \"tableName\": \"announcement\",\n \"tableComment\": \"公告表\",\n \"adminMenuName\": \"公告管理\",\n \"operations\": {\n \"add\": true,\n \"edit\": true,\n \"remove\": true,\n \"removeType\": \"physical\",\n \"reason\": \"\"\n },\n \"columns\": [\n {\n \"columnName\": \"id\",\n \"columnLabel\": \"ID\",\n \"columnComment\": \"主键ID\",\n \"columnType\": \"bigint(20)\",\n \"isPk\": \"1\",\n \"isIncrement\": \"1\",\n \"isRequired\": \"1\"\n },\n {\n \"columnName\": \"title\",\n \"columnLabel\": \"标题\",\n \"columnComment\": \"公告标题\",\n \"columnType\": \"varchar(200)\",\n \"isPk\": \"0\",\n \"isIncrement\": \"0\",\n \"isRequired\": \"1\",\n \"htmlType\": \"input\"\n },\n {\n \"columnName\": \"content\",\n \"columnLabel\": \"内容\",\n \"columnComment\": \"公告正文\",\n \"columnType\": \"text\",\n \"isPk\": \"0\",\n \"isIncrement\": \"0\",\n \"isRequired\": \"1\",\n \"htmlType\": \"editor\"\n },\n {\n \"columnName\": \"publish_time\",\n \"columnLabel\": \"发布时间\",\n \"columnComment\": \"公告发布时间\",\n \"columnType\": \"datetime\",\n \"isPk\": \"0\",\n \"isIncrement\": \"0\",\n \"isRequired\": \"0\",\n \"htmlType\": \"datetime\"\n },\n {\n \"columnName\": \"status\",\n \"columnLabel\": \"状态\",\n \"columnComment\": \"状态draft-草稿published-已发布\",\n \"columnType\": \"varchar(20)\",\n \"isPk\": \"0\",\n \"isIncrement\": \"0\",\n \"isRequired\": \"1\",\n \"htmlType\": \"select\",\n \"dictType\": \"\",\n \"dictOptions\": [\n { \"label\": \"草稿\", \"value\": \"draft\" },\n { \"label\": \"已发布\", \"value\": \"published\" }\n ]\n },\n {\n \"columnName\": \"create_time\",\n \"columnLabel\": \"创建时间\",\n \"columnComment\": \"创建时间\",\n \"columnType\": \"datetime\",\n \"isPk\": \"0\",\n \"isIncrement\": \"0\",\n \"isRequired\": \"0\",\n \"htmlType\": \"datetime\"\n },\n {\n \"columnName\": \"update_time\",\n \"columnLabel\": \"更新时间\",\n \"columnComment\": \"更新时间\",\n \"columnType\": \"datetime\",\n \"isPk\": \"0\",\n \"isIncrement\": \"0\",\n \"isRequired\": \"0\",\n \"htmlType\": \"datetime\"\n }\n ]\n },\n {\n \"tableName\": \"news\",\n \"tableComment\": \"新闻表\",\n \"adminMenuName\": \"新闻管理\",\n \"operations\": {\n \"add\": true,\n \"edit\": true,\n \"remove\": true,\n \"removeType\": \"physical\",\n \"reason\": \"\"\n },\n \"columns\": [\n {\n \"columnName\": \"id\",\n \"columnLabel\": \"ID\",\n \"columnComment\": \"主键ID\",\n \"columnType\": \"bigint(20)\",\n \"isPk\": \"1\",\n \"isIncrement\": \"1\",\n \"isRequired\": \"1\"\n },\n {\n \"columnName\": \"title\",\n \"columnLabel\": \"标题\",\n \"columnComment\": \"新闻标题\",\n \"columnType\": \"varchar(200)\",\n \"isPk\": \"0\",\n \"isIncrement\": \"0\",\n \"isRequired\": \"1\",\n \"htmlType\": \"input\"\n },\n {\n \"columnName\": \"content\",\n \"columnLabel\": \"内容\",\n \"columnComment\": \"新闻正文\",\n \"columnType\": \"text\",\n \"isPk\": \"0\",\n \"isIncrement\": \"0\",\n \"isRequired\": \"1\",\n \"htmlType\": \"editor\"\n },\n {\n \"columnName\": \"publish_time\",\n \"columnLabel\": \"发布时间\",\n \"columnComment\": \"新闻发布时间\",\n \"columnType\": \"datetime\",\n \"isPk\": \"0\",\n \"isIncrement\": \"0\",\n \"isRequired\": \"0\",\n \"htmlType\": \"datetime\"\n },\n {\n \"columnName\": \"status\",\n \"columnLabel\": \"状态\",\n \"columnComment\": \"状态draft-草稿published-已发布\",\n \"columnType\": \"varchar(20)\",\n \"isPk\": \"0\",\n \"isIncrement\": \"0\",\n \"isRequired\": \"1\",\n \"htmlType\": \"select\",\n \"dictType\": \"\",\n \"dictOptions\": [\n { \"label\": \"草稿\", \"value\": \"draft\" },\n { \"label\": \"已发布\", \"value\": \"published\" }\n ]\n },\n {\n \"columnName\": \"cover_image\",\n \"columnLabel\": \"封面图片\",\n \"columnComment\": \"新闻封面图片URL\",\n \"columnType\": \"varchar(500)\",\n \"isPk\": \"0\",\n \"isIncrement\": \"0\",\n \"isRequired\": \"0\",\n \"htmlType\": \"imageUpload\"\n },\n {\n \"columnName\": \"create_time\",\n \"columnLabel\": \"创建时间\",\n \"columnComment\": \"创建时间\",\n \"columnType\": \"datetime\",\n \"isPk\": \"0\",\n \"isIncrement\": \"0\",\n \"isRequired\": \"0\",\n \"htmlType\": \"datetime\"\n },\n {\n \"columnName\": \"update_time\",\n \"columnLabel\": \"更新时间\",\n \"columnComment\": \"更新时间\",\n \"columnType\": \"datetime\",\n \"isPk\": \"0\",\n \"isIncrement\": \"0\",\n \"isRequired\": \"0\",\n \"htmlType\": \"datetime\"\n }\n ]\n },\n {\n \"tableName\": \"admin\",\n \"tableComment\": \"管理员表\",\n \"adminMenuName\": \"管理员\",\n \"operations\": {\n \"add\": false,\n \"edit\": true,\n \"remove\": false,\n \"removeType\": \"\",\n \"reason\": \"管理员账号仅支持个人编辑\"\n },\n \"columns\": [\n {\n \"columnName\": \"admin_id\",\n \"columnLabel\": \"管理员ID\",\n \"columnComment\": \"主键ID\",\n \"columnType\": \"bigint(20)\",\n \"isPk\": \"1\",\n \"isIncrement\": \"1\",\n \"isRequired\": \"1\"\n },\n {\n \"columnName\": \"username\",\n \"columnLabel\": \"用户名\",\n \"columnComment\": \"登录用户名(唯一)\",\n \"columnType\": \"varchar(50)\",\n \"isPk\": \"0\",\n \"isIncrement\": \"0\",\n \"isRequired\": \"1\",\n \"htmlType\": \"input\"\n },\n {\n \"columnName\": \"password_hash\",\n \"columnLabel\": \"密码哈希\",\n \"columnComment\": \"加密后的密码\",\n \"columnType\": \"varchar(255)\",\n \"isPk\": \"0\",\n \"isIncrement\": \"0\",\n \"isRequired\": \"1\",\n \"htmlType\": \"input\"\n },\n {\n \"columnName\": \"nickname\",\n \"columnLabel\": \"昵称\",\n \"columnComment\": \"显示昵称\",\n \"columnType\": \"varchar(100)\",\n \"isPk\": \"0\",\n \"isIncrement\": \"0\",\n \"isRequired\": \"1\",\n \"htmlType\": \"input\"\n },\n {\n \"columnName\": \"status\",\n \"columnLabel\": \"状态\",\n \"columnComment\": \"账号状态active-正常inactive-禁用\",\n \"columnType\": \"varchar(20)\",\n \"isPk\": \"0\",\n \"isIncrement\": \"0\",\n \"isRequired\": \"1\",\n \"htmlType\": \"select\",\n \"dictType\": \"\",\n \"dictOptions\": [\n { \"label\": \"正常\", \"value\": \"active\" },\n { \"label\": \"禁用\", \"value\": \"inactive\" }\n ]\n },\n {\n \"columnName\": \"create_time\",\n \"columnLabel\": \"创建时间\",\n \"columnComment\": \"创建时间\",\n \"columnType\": \"datetime\",\n \"isPk\": \"0\",\n \"isIncrement\": \"0\",\n \"isRequired\": \"0\",\n \"htmlType\": \"datetime\"\n },\n {\n \"columnName\": \"update_time\",\n \"columnLabel\": \"更新时间\",\n \"columnComment\": \"更新时间\",\n \"columnType\": \"datetime\",\n \"isPk\": \"0\",\n \"isIncrement\": \"0\",\n \"isRequired\": \"0\",\n \"htmlType\": \"datetime\"\n }\n ]\n }\n ]\n}', '0', 93148, 3996, 1152, 2844, 12444, 5929, 3996, 12444, 16440, 3, 0.02775504, '1', NULL, '2026-07-15 09:28:32');
INSERT INTO `front_ai_usage_ledger` VALUES (155, 114, 114, 110, 100, 'database', 'deepseek', 'deepseek-v4-flash', 'front.database', 'V2', 'c7d0a32ce0b0055ac80348fb10c1beb758034b9c5b5637694725425bb7937cbc', '你是 MySQL 业务数据库设计专家。只输出符合用户消息结构的 JSON根据已确认的应用蓝图和业务闭环生成可直接落地的表、字段、主外键、字典和表操作策略。字段必须业务化且类型合法所有蓝图与闭环引用必须有真实表字段承载不得生成菜单、权限关系、代码或业务动作。flowConfig.actions[].audit 中非空的 userField 和 timeField 必须是 mainTable 的真实字段userField 使用 bigint(20)timeField 使用 datetime。', '根据项目输入 JSON 生成 MySQL 数据库设计 JSON只返回 JSON不要 Markdown 围栏或解释。\nConfirmed app blueprint JSON and Confirmed business loop plan JSON are supplied in the input.\nDatabase generation constraints from the business loop plan must be enforced.\nEvery confirmedBusinessLoopPlan.metrics tableName, field, and filters.field must exist in the generated schema. Numeric sum/avg/min/max metric fields must use a compatible numeric column type. Status-filter metric values must remain compatible with the matching stateMachines.states.\nIf input.mode is correction, repair input.originalResponse according to input.validationError and return the complete corrected database JSON. Do not drop unrelated valid tables or fields.\n输出结构{\"tables\":[{\"tableName\":\"car_info\",\"tableComment\":\"车辆信息表\",\"adminMenuName\":\"车辆管理\",\"operations\":{\"add\":true,\"edit\":true,\"remove\":true,\"removeType\":\"physical\",\"reason\":\"\"},\"columns\":[{\"columnName\":\"id\",\"columnLabel\":\"ID\",\"columnComment\":\"主键ID\",\"columnType\":\"bigint(20)\",\"isPk\":\"1\",\"isIncrement\":\"1\",\"isRequired\":\"1\"}]}]}。\n不要使用 field_1 等占位字段;每个表必须包含非空 columns以及 adminMenuName 和 operations.add/edit/remove/removeType/reason。\nadminMenuName 必须来自本表 tableComment/tableName不得复用其他表或宽泛模块名称。\nadminMenuName must come from that table\'s own tableComment or tableName.\n字段数组名称只能是 columns不能使用 fields、fieldDesign、fieldList、columnList。\nEvery table must include a non-empty columns array; use columns exactly.\n每个字段必须包含 columnName、columnLabel、columnComment、columnType、isPk、isIncrement、isRequired。columnLabel 是短 UI 标签columnComment 是完整数据库说明。\n可提供 javaType、htmlTypehtmlType 只能是 input、textarea、select、radio、checkbox、datetime、imageUpload、fileUpload、editor。\nselect/radio/checkbox 应提供 dictType 和 dictOptions。关联选择使用 remote:target_table:value_field:label_field且目标表和值/标签字段必须都存在于本次 tables JSON。\n非主键外键字段应在目标表存在时使用 remote select无目标表的分类、类型、状态使用本地 dictOptions 或普通输入。\n普通主数据表除唯一主键外至少包含 4 个业务字段。\n订单、支付、借还、审批、流程、任务、库存记录等动作记录表使用仅新增关系、审计、日志、历史表使用只读普通主数据表使用完整 CRUD。\n不要生成 businessActions、业务动作、工作流、代码、菜单表、user_role、角色权限表或权限表。\nDo not generate menu tables, user_role tables, role-permission tables, or permission tables.\n表名字段名只使用小写字母、数字、下划线每表必须且只能有一个主键。字段类型只能使用 bigint(20)、int(11)、varchar(n)、char(n)、decimal(p,s)、datetime、date、text、longtext。\n为 confirmedAppBlueprint.roles 中每个角色创建独立账号表admin 使用 admin其他角色使用 role.code。不得使用共享用户表或 role_id/role_code/user_role。\n角色账号表包含 `<role_code>_id` 自增主键、username、password_hash、nickname、status、create_time。admin 只能登录后台,非 admin 角色登录前台。\n生成 frontendPages.tableName 引用的全部表;个人资料页必须绑定对应非 admin 角色账号表。requiresLogin=true 且 dataScope=CURRENT_USER 的业务数据通常包含 user_id。\ncanonicalTableRegistry 中的名称是最终规范表名。confirmedBusinessLoopPlan 若出现与其指向同一业务对象的同义表名,必须使用 canonicalTableRegistry 中的名称,不得同时生成两张同义表。\n根据 confirmedBusinessLoopPlan 创建 coreObjects.tableName、actions.ownerTable补齐 stateMachines.statusField、quantityRules.quantityField 以及 recordRules 和动作前置条件需要的字段。状态值不得超出 stateMachines.states。\n严格实现 confirmedBusinessLoopPlan.businessPoliciesTIME_LIMIT 的 startField、dueField 使用 datetimeOVERDUE_FEE 的 dueField 使用 datetime、daysTargetField 使用 int(11)、targetField 使用 decimal(10,2)QUANTITY_LIMIT 的 targetField 使用 int(11) 且默认值为 0。所有政策字段必须位于政策指定的 tableName禁止只把期限或公式写进 columnComment 而不创建字段。\nDo not invent status values outside stateMachines.states.\n严格遵守 input.limits.maxTables 和 maxColumnsPerTable。\n项目输入 JSON\n{\"industryTemplate\":\"\",\"canonicalTableRegistry\":[\"book_info\",\"borrowing\",\"reservation\",\"reader\",\"carousel\",\"announcement\",\"news\",\"admin\"],\"validationError\":\"Flow config value type is invalid: borrowing.due_date=now + 30\",\"compiledFlowContract\":{\"acceptanceScenarios\":[],\"actions\":[{\"actor\":\"reader\",\"code\":\"cancel_reservation\",\"name\":\"取消预约\",\"ownerObject\":\"reservation\",\"ownerTable\":\"reservation\",\"preconditions\":[],\"quantityEffects\":[],\"recordEffects\":[],\"required\":true,\"stateTransitions\":[{\"actionCode\":\"cancel_reservation\",\"fromState\":\"pending\",\"toState\":\"cancelled\"}]},{\"actor\":\"admin\",\"code\":\"admin_cancel_reservation\",\"name\":\"取消预约\",\"ownerObject\":\"reservation\",\"ownerTable\":\"reservation\",\"preconditions\":[],\"quantityEffects\":[],\"recordEffects\":[],\"required\":true,\"stateTransitions\":[{\"actionCode\":\"admin_cancel_reservation\",\"fromState\":\"pending\",\"toState\":\"cancelled\"}]},{\"actor\":\"admin\",\"code\":\"fulfill_reservation\",\"name\":\"确认借出\",\"ownerObject\":\"reservation\",\"ownerTable\":\"reservation\",\"preconditions\":[],\"quantityEffects\":[{\"actionCode\":\"fulfill_reservation\",\"amount\":\"1\",\"effectType\":\"decrease\",\"objectCode\":\"book_info\",\"quantityField\":\"stock\",\"tableName\":\"book_info\"}],\"recordEffects\":[{\"actionCode\":\"fulfill_reservation\",\"objectCode\":\"borrowing\",\"operation\":\"INSERT_ROW\",\"tableName\":\"borrowing\"}],\"required\":true,\"stateTransitions\":[{\"actionCode\":\"fulfill_reservation\",\"fromState\":\"pending\",\"toState\":\"fulfilled\"}]}],\"businessPolicies\":[],\"coreObjects\":[{\"code\":\"reservation\",\"name\":\"预约管理\",\"objectType\":\"main\",\"tableName\":\"reservation\"},{\"code\":\"borrowing\",\"name\":\"borrowing\",\"objectType\":\"related\",\"tableName\":\"borrowing\"},{\"code\":\"book_info\",\"name\":\"book_info\",\"objectType\":\"related\",\"tableName\":\"book_info\"}],\"domainName\":\"预约管理\",\"metrics\":[{\"aggregate\":\"count\",\"code\":\"pending_count\",\"field\":\"id\",\"filters\":[{\"field\":\"status\",\"operator\":\"eq\",\"values\":[\"pending\"]}],\"name\":\"待处理预约数\",\"relatedActionCodes\":[],\"required\":true,\"tableName\":\"reservation\",\"unit\":\"条\"},{\"aggregate\":\"count\",\"code\":\"cancelled_count\",\"field\":\"id\",\"filters\":[{\"field\":\"status\",\"operator\":\"eq\",\"values\":[\"cancelled\"]}],\"name\":\"已取消预约数\",\"relatedActionCodes\":[],\"required\":true,\"tableName\":\"reservation\",\"unit\":\"条\"},{\"aggregate\":\"count\",\"code\":\"fulfilled_count\",\"field\":\"id\",\"filters\":[{\"field\":\"status\",\"operator\":\"eq\",\"values\":[\"fulfilled\"]}],\"name\":\"已借出预约数\",\"relatedActionCodes\":[],\"required\":true,\"tableName\":\"reservation\",\"unit\":\"条\"},{\"aggregate\":\"count\",\"code\":\"total_reservations\",\"field\":\"id\",\"filters\":[],\"name\":\"预约总数\",\"relatedActionCodes\":[],\"required\":true,\"tableName\":\"reservation\",\"unit\":\"条\"}],\"pageBindings\":[{\"actionCode\":\"cancel_reservation\",\"pageCode\":\"my_reservations_page\",\"slot\":\"list.rowActions\",\"tableName\":\"reservation\",\"target\":\"frontend\"},{\"actionCode\":\"admin_cancel_reservation\",\"pageCode\":\"reservation_admin_page\",\"slot\":\"list.rowActions\",\"tableName\":\"reservation\",\"target\":\"admin\"},{\"actionCode\":\"fulfill_reservation\",\"pageCode\":\"reservation_admin_page\",\"slot\":\"list.rowActions\",\"tableName\":\"reservation\",\"target\":\"admin\"}],\"quantityRules\":[{\"actionCode\":\"fulfill_reservation\",\"amount\":\"1\",\"effectType\":\"decrease\",\"objectCode\":\"book_info\",\"quantityField\":\"stock\",\"tableName\":\"book_info\"}],\"recordRules\":[{\"actionCode\":\"fulfill_reservation\",\"objectCode\":\"borrowing\",\"operation\":\"INSERT_ROW\",\"tableName\":\"borrowing\"}],\"stateMachines\":[{\"objectCode\":\"reservation\",\"states\":[\"pending\",\"cancelled\",\"fulfilled\"],\"statusField\":\"status\",\"tableName\":\"reservation\",\"transitions\":[{\"actionCode\":\"cancel_reservation\",\"fromState\":\"pending\",\"toState\":\"cancelled\"},{\"actionCode\":\"admin_cancel_reservation\",\"fromState\":\"pending\",\"toState\":\"cancelled\"},{\"actionCode\":\"fulfill_reservation\",\"fromState\":\"pending\",\"toState\":\"fulfilled\"}]}]},\"mode\":\"correction\",\"confirmedAppBlueprint\":{\"adminHomeDashboard\":{\"charts\":[{\"dimension\":{\"field\":\"date\"},\"filters\":[],\"metrics\":[{\"aggregate\":\"count\",\"label\":\"借阅趋势\"}],\"tableName\":\"borrowing\",\"title\":\"借阅趋势\",\"type\":\"line\"},{\"dimension\":{\"field\":\"category\"},\"filters\":[],\"metrics\":[{\"aggregate\":\"count\",\"label\":\"图书分类分布\"}],\"tableName\":\"book_info\",\"title\":\"图书分类分布\",\"type\":\"pie\"}],\"description\":\"核心业务数据\",\"metrics\":[{\"aggregate\":\"count\",\"field\":\"count\",\"filters\":[],\"semantic\":\"inventory\",\"tableName\":\"book_info\"},{\"aggregate\":\"count\",\"field\":\"count\",\"filters\":[],\"semantic\":\"order\",\"tableName\":\"borrowing\"},{\"aggregate\":\"count\",\"field\":\"count\",\"filters\":[],\"semantic\":\"task\",\"tableName\":\"reservation\"},{\"aggregate\":\"count\",\"field\":\"count\",\"filters\":[],\"semantic\":\"user\",\"tableName\":\"reader\"}],\"title\":\"运营总览\"},\"adminMenus\":[{\"code\":\"book_admin\",\"dataScope\":\"ROLE\",\"name\":\"图书管理\",\"pageCode\":\"book_admin_page\",\"pageType\":\"list\",\"path\":\"/admin/books\",\"requiresLogin\":true,\"tableName\":\"book_info\",\"visibleRoles\":[\"admin\"]},{\"code\":\"borrowing_admin\",\"dataScope\":\"ROLE\",\"name\":\"借阅管理\",\"pageCode\":\"borrowing_admin_page\",\"pageType\":\"list\",\"path\":\"/admin/borrowings\",\"requiresLogin\":true,\"tableName\":\"borrowing\",\"visibleRoles\":[\"admin\"]},{\"code\":\"reservation_admin\",\"dataScope\":\"ROLE\",\"name\":\"预约管理\",\"pageCode\":\"reservation_admin_page\",\"pageType\":\"list\",\"path\":\"/admin/reservations\",\"requiresLogin\":true,\"tableName\":\"reservation\",\"visibleRoles\":[\"admin\"]},{\"code\":\"carousel_admin\",\"dataScope\":\"ROLE\",\"name\":\"轮播图管理\",\"pageCode\":\"carousel_admin_page\",\"pageType\":\"list\",\"path\":\"/admin/carousels\",\"requiresLogin\":true,\"tableName\":\"carousel\",\"visibleRoles\":[\"admin\"]},{\"code\":\"announcement_admin\",\"dataScope\":\"ROLE\",\"name\":\"公告管理\",\"pageCode\":\"announcement_admin_page\",\"pageType\":\"list\",\"path\":\"/admin/announcements\",\"requiresLogin\":true,\"tableName\":\"announcement\",\"visibleRoles\":[\"admin\"]},{\"code\":\"news_admin\",\"dataScope\":\"ROLE\",\"name\":\"新闻管理\",\"pageCode\":\"news_admin_page\",\"pageType\":\"list\",\"path\":\"/admin/news\",\"requiresLogin\":true,\"tableName\":\"news\",\"visibleRoles\":[\"admin\"]},{\"code\":\"reader_admin\",\"dataScope\":\"ROLE\",\"name\":\"读者管理\",\"pageCode\":\"reader_admin_page\",\"pageType\":\"list\",\"path\":\"/admin/readers\",\"requiresLogin\":true,\"tableName\":\"reader\",\"visibleRoles\":[\"admin\"]},{\"code\":\"admin_profile\",\"dataScope\":\"CURRENT_USER\",\"name\":\"个人资料\",\"pageCode\":\"admin_profile_page\",\"pageType\":\"form\",\"path\":\"/admin/profile\",\"requiresLogin\":true,\"tableName\":\"admin\",\"visibleRoles\":[\"admin\"]}],\"frontendMenus\":[{\"code\":\"book_catalog\",\"dataScope\":\"PUBLIC\",\"name\":\"图书目录\",\"pageCode\":\"book_catalog_page\",\"pageType\":\"\",\"path\":\"/books\",\"requiresLogin\":false,\"tableName\":\"\",\"visibleRoles\":[]},{\"code\":\"my_borrowings\",\"dataScope\":\"CURRENT_USER\",\"name\":\"我的借阅\",\"pageCode\":\"my_borrowings_page\",\"pageType\":\"\",\"path\":\"/my-borrowings\",\"requiresLogin\":true,\"tableName\":\"\",\"visibleRoles\":[\"reader\"]},{\"code\":\"my_reservations\",\"dataScope\":\"CURRENT_USER\",\"name\":\"我的预约\",\"pageCode\":\"my_reservations_page\",\"pageType\":\"\",\"path\":\"/my-reservations\",\"requiresLogin\":true,\"tableName\":\"\",\"visibleRoles\":[\"reader\"]},{\"code\":\"reader_profile\",\"dataScope\":\"CURRENT_USER\",\"name\":\"个人中心\",\"pageCode\":\"reader_profile_page\",\"pageType\":\"\",\"path\":\"/reader/profile\",\"requiresLogin\":true,\"tableName\":\"\",\"visibleRoles\":[\"reader\"]}],\"frontendPages\":[{\"code\":\"book_catalog_page\",\"menuCode\":\"book_catalog\",\"name\":\"图书目录\",\"pageType\":\"list\",\"parentPageCode\":\"\",\"path\":\"/books\",\"tableName\":\"book_info\"},{\"code\":\"book_detail_page\",\"menuCode\":\"\",\"name\":\"图书详情\",\"pageType\":\"detail\",\"parentPageCode\":\"\",\"path\":\"/books/:id\",\"tableName\":\"book_info\"},{\"code\":\"my_borrowings_page\",\"menuCode\":\"my_borrowings\",\"name\":\"我的借阅\",\"pageType\":\"list\",\"parentPageCode\":\"\",\"path\":\"/my-borrowings\",\"tableName\":\"borrowing\"},{\"code\":\"my_reservations_page\",\"menuCode\":\"my_reservations\",\"name\":\"我的预约\",\"pageType\":\"list\",\"parentPageCode\":\"\",\"path\":\"/my-reservations\",\"tableName\":\"reservation\"},{\"code\":\"reader_profile_page\",\"menuCode\":\"reader_profile\",\"name\":\"个人资料\",\"pageType\":\"form\",\"parentPageCode\":\"\",\"path\":\"/reader/profile\",\"tableName\":\"reader\"}],\"roles\":[{\"code\":\"admin\",\"description\":\"系统管理员,拥有所有后台管理权限\",\"name\":\"系统管理员\"},{\"code\":\"reader\",\"description\":\"普通读者,可浏览图书、借书、还书、预约\",\"name\":\"读者\"}]},\"extraRequirements\":\"\",\"projectDescription\":\"功能:借书、还书、预约、取消预约\\n角色用户、管理员\\n其他模块轮播图、公告、新闻\",\"stylePreset\":\"campus-orange\",\"originalResponse\":{\"tables\":[{\"tableName\":\"book_info\",\"tableComment\":\"图书信息表\",\"adminMenuName\":\"图书管理\",\"operations\":{\"add\":true,\"edit\":true,\"remove\":true,\"removeType\":\"physical\",\"reason\":\"\"},\"columns\":[{\"columnName\":\"id\",\"columnLabel\":\"ID\",\"columnComment\":\"主键ID\",\"columnType\":\"bigint(20)\",\"isPk\":\"1\",\"isIncrement\":\"1\",\"isRequired\":\"1\"},{\"columnName\":\"book_name\",\"columnLabel\":\"书名\",\"columnComment\":\"图书名称\",\"columnType\":\"varchar(200)\",\"isPk\":\"0\",\"isIncrement\":\"0\",\"isRequired\":\"1\",\"htmlType\":\"input\"},{\"columnName\":\"author\",\"columnLabel\":\"作者\",\"columnComment\":\"图书作者\",\"columnType\":\"varchar(100)\",\"isPk\":\"0\",\"isIncrement\":\"0\",\"isRequired\":\"0\",\"htmlType\":\"input\"},{\"columnName\":\"publisher\",\"columnLabel\":\"出版社\",\"columnComment\":\"出版社\",\"columnType\":\"varchar(100)\",\"isPk\":\"0\",\"isIncrement\":\"0\",\"isRequired\":\"0\",\"htmlType\":\"input\"},{\"columnName\":\"isbn\",\"columnLabel\":\"ISBN\",\"columnComment\":\"国际标准书号\",\"columnType\":\"varchar(20)\",\"isPk\":\"0\",\"isIncrement\":\"0\",\"isRequired\":\"0\",\"htmlType\":\"input\"},{\"columnName\":\"category\",\"columnLabel\":\"分类\",\"columnComment\":\"图书分类\",\"columnType\":\"varchar(50)\",\"isPk\":\"0\",\"isIncrement\":\"0\",\"isRequired\":\"0\",\"htmlType\":\"select\",\"dictType\":\"\",\"dictOptions\":[{\"label\":\"文学\",\"value\":\"literature\"},{\"label\":\"科学\",\"value\":\"science\"},{\"label\":\"历史\",\"value\":\"history\"},{\"label\":\"其他\",\"value\":\"other\"}]},{\"columnName\":\"stock\",\"columnLabel\":\"库存\",\"columnComment\":\"当前库存数量\",\"columnType\":\"int(11)\",\"isPk\":\"0\",\"isIncrement\":\"0\",\"isRequired\":\"1\",\"htmlType\":\"input\"},{\"columnName\":\"cover_image\",\"columnLabel\":\"封面图片\",\"columnComment\":\"图书封面图片URL\",\"columnType\":\"varchar(500)\",\"isPk\":\"0\",\"isIncrement\":\"0\",\"isRequired\":\"0\",\"htmlType\":\"imageUpload\"},{\"columnName\":\"description\",\"columnLabel\":\"描述\",\"columnComment\":\"图书简介\",\"columnType\":\"text\",\"isPk\":\"0\",\"isIncrement\":\"0\",\"isRequired\":\"0\",\"htmlType\":\"editor\"},{\"columnName\":\"create_time\",\"columnLabel\":\"创建时间\",\"columnComment\":\"创建时间\",\"columnType\":\"datetime\",\"isPk\":\"0\",\"isIncrement\":\"0\",\"isRequired\":\"0\",\"htmlType\":\"datetime\"},{\"columnName\":\"update_time\",\"columnLabel\":\"更新时间\",\"columnComment\":\"更新时间\",\"columnType\":\"datetime\",\"isPk\":\"0\",\"isIncrement\":\"0\",\"isRequired\":\"0\",\"htmlType\":\"datetime\"}]},{\"tableName\":\"borrowing\",\"tableComment\":\"借阅记录表\",\"adminMenuName\":\"借阅管理\",\"operations\":{\"add\":true,\"edit\":false,\"remove\":false,\"removeType\":\"physical\",\"reason\":\"借阅记录仅允许新增\"},\"columns\":[{\"columnName\":\"id\",\"columnLabel\":\"ID\",\"columnComment\":\"主键ID\",\"columnType\":\"bigint(20)\",\"isPk\":\"1\",\"isIncrement\":\"1\",\"isRequired\":\"1\"},{\"columnName\":\"reader_id\",\"columnLabel\":\"读者\",\"columnComment\":\"借阅读者ID\",\"columnType\":\"bigint(20)\",\"isPk\":\"0\",\"isIncrement\":\"0\",\"isRequired\":\"1\",\"htmlType\":\"select\",\"dictType\":\"remote:reader:reader_id:nickname\"},{\"columnName\":\"book_id\",\"columnLabel\":\"图书\",\"columnComment\":\"借阅图书ID\",\"columnType\":\"bigint(20)\",\"isPk\":\"0\",\"isIncrement\":\"0\",\"isRequired\":\"1\",\"htmlType\":\"select\",\"dictType\":\"remote:book_info:id:book_name\"},{\"columnName\":\"borrow_date\",\"columnLabel\":\"借书日期\",\"columnComment\":\"借书日期\",\"columnType\":\"datetime\",\"isPk\":\"0\",\"isIncrement\":\"0\",\"isRequired\":\"1\",\"htmlType\":\"datetime\"},{\"columnName\":\"due_date\",\"columnLabel\":\"应还日期\",\"columnComment\":\"应还日期\",\"columnType\":\"datetime\",\"isPk\":\"0\",\"isIncrement\":\"0\",\"isRequired\":\"1\",\"htmlType\":\"datetime\"},{\"columnName\":\"return_date\",\"columnLabel\":\"实际归还日期\",\"columnComment\":\"实际归还日期\",\"columnType\":\"datetime\",\"isPk\":\"0\",\"isIncrement\":\"0\",\"isRequired\":\"0\",\"htmlType\":\"datetime\"},{\"columnName\":\"status\",\"columnLabel\":\"状态\",\"columnComment\":\"借阅状态borrowing-借阅中returned-已归还overdue-逾期\",\"columnType\":\"varchar(20)\",\"isPk\":\"0\",\"isIncrement\":\"0\",\"isRequired\":\"1\",\"htmlType\":\"select\",\"dictType\":\"\",\"dictOptions\":[{\"label\":\"借阅中\",\"value\":\"borrowing\"},{\"label\":\"已归还\",\"value\":\"returned\"},{\"label\":\"逾期\",\"value\":\"overdue\"}]},{\"columnName\":\"renew_count\",\"columnLabel\":\"续借次数\",\"columnComment\":\"续借次数\",\"columnType\":\"int(11)\",\"isPk\":\"0\",\"isIncrement\":\"0\",\"isRequired\":\"0\",\"htmlType\":\"input\"},{\"columnName\":\"create_time\",\"columnLabel\":\"创建时间\",\"columnComment\":\"创建时间\",\"columnType\":\"datetime\",\"isPk\":\"0\",\"isIncrement\":\"0\",\"isRequired\":\"0\",\"htmlType\":\"datetime\"},{\"columnName\":\"update_time\",\"columnLabel\":\"更新时间\",\"columnComment\":\"更新时间\",\"columnType\":\"datetime\",\"isPk\":\"0\",\"isIncrement\":\"0\",\"isRequired\":\"0\",\"htmlType\":\"datetime\"}]},{\"tableName\":\"reservation\",\"tableComment\":\"预约记录表\",\"adminMenuName\":\"预约管理\",\"operations\":{\"add\":true,\"edit\":false,\"remove\":false,\"removeType\":\"physical\",\"reason\":\"预约记录仅允许新增\"},\"columns\":[{\"columnName\":\"id\",\"columnLabel\":\"ID\",\"columnComment\":\"主键ID\",\"columnType\":\"bigint(20)\",\"isPk\":\"1\",\"isIncrement\":\"1\",\"isRequired\":\"1\"},{\"columnName\":\"reader_id\",\"columnLabel\":\"读者\",\"columnComment\":\"预约读者ID\",\"columnType\":\"bigint(20)\",\"isPk\":\"0\",\"isIncrement\":\"0\",\"isRequired\":\"1\",\"htmlType\":\"select\",\"dictType\":\"remote:reader:reader_id:nickname\"},{\"columnName\":\"book_id\",\"columnLabel\":\"图书\",\"columnComment\":\"预约图书ID\",\"columnType\":\"bigint(20)\",\"isPk\":\"0\",\"isIncrement\":\"0\",\"isRequired\":\"1\",\"htmlType\":\"select\",\"dictType\":\"remote:book_info:id:book_name\"},{\"columnName\":\"reserve_date\",\"columnLabel\":\"预约时间\",\"columnComment\":\"预约发起时间\",\"columnType\":\"datetime\",\"isPk\":\"0\",\"isIncrement\":\"0\",\"isRequired\":\"1\",\"htmlType\":\"datetime\"},{\"columnName\":\"status\",\"columnLabel\":\"状态\",\"columnComment\":\"预约状态pending-待处理cancelled-已取消fulfilled-已借出\",\"columnType\":\"varchar(20)\",\"isPk\":\"0\",\"isIncrement\":\"0\",\"isRequired\":\"1\",\"htmlType\":\"select\",\"dictType\":\"\",\"dictOptions\":[{\"label\":\"待处理\",\"value\":\"pending\"},{\"label\":\"已取消\",\"value\":\"cancelled\"},{\"label\":\"已借出\",\"value\":\"fulfilled\"}]},{\"columnName\":\"cancel_user_id\",\"columnLabel\":\"取消操作人\",\"columnComment\":\"取消预约的管理员ID\",\"columnType\":\"bigint(20)\",\"isPk\":\"0\",\"isIncrement\":\"0\",\"isRequired\":\"0\",\"htmlType\":\"select\",\"dictType\":\"remote:admin:admin_id:username\"},{\"columnName\":\"cancel_time\",\"columnLabel\":\"取消时间\",\"columnComment\":\"取消预约的时间\",\"columnType\":\"datetime\",\"isPk\":\"0\",\"isIncrement\":\"0\",\"isRequired\":\"0\",\"htmlType\":\"datetime\"},{\"columnName\":\"fulfill_user_id\",\"columnLabel\":\"确认借出操作人\",\"columnComment\":\"确认借出的管理员ID\",\"columnType\":\"bigint(20)\",\"isPk\":\"0\",\"isIncrement\":\"0\",\"isRequired\":\"0\",\"htmlType\":\"select\",\"dictType\":\"remote:admin:admin_id:username\"},{\"columnName\":\"fulfill_time\",\"columnLabel\":\"借出时间\",\"columnComment\":\"确认借出的时间\",\"columnType\":\"datetime\",\"isPk\":\"0\",\"isIncrement\":\"0\",\"isRequired\":\"0\",\"htmlType\":\"datetime\"},{\"columnName\":\"create_time\",\"columnLabel\":\"创建时间\",\"columnComment\":\"创建时间\",\"columnType\":\"datetime\",\"isPk\":\"0\",\"isIncrement\":\"0\",\"isRequired\":\"0\",\"htmlType\":\"datetime\"},{\"columnName\":\"update_time\",\"columnLabel\":\"更新时间\",\"columnComment\":\"更新时间\",\"columnType\":\"datetime\",\"isPk\":\"0\",\"isIncrement\":\"0\",\"isRequired\":\"0\",\"htmlType\":\"datetime\"}]},{\"tableName\":\"reader\",\"tableComment\":\"读者信息表\",\"adminMenuName\":\"读者管理\",\"operations\":{\"add\":true,\"edit\":true,\"remove\":true,\"removeType\":\"physical\",\"reason\":\"读者信息可物理删除\"},\"columns\":[{\"columnName\":\"reader_id\",\"columnLabel\":\"读者ID\",\"columnComment\":\"主键ID\",\"columnType\":\"bigint(20)\",\"isPk\":\"1\",\"isIncrement\":\"1\",\"isRequired\":\"1\"},{\"columnName\":\"username\",\"columnLabel\":\"用户名\",\"columnComment\":\"登录用户名(唯一)\",\"columnType\":\"varchar(50)\",\"isPk\":\"0\",\"isIncrement\":\"0\",\"isRequired\":\"1\",\"htmlType\":\"input\"},{\"columnName\":\"password_hash\",\"columnLabel\":\"密码哈希\",\"columnComment\":\"加密后的密码\",\"columnType\":\"varchar(255)\",\"isPk\":\"0\",\"isIncrement\":\"0\",\"isRequired\":\"1\",\"htmlType\":\"input\"},{\"columnName\":\"nickname\",\"columnLabel\":\"昵称\",\"columnComment\":\"显示昵称\",\"columnType\":\"varchar(100)\",\"isPk\":\"0\",\"isIncrement\":\"0\",\"isRequired\":\"1\",\"htmlType\":\"input\"},{\"columnName\":\"real_name\",\"columnLabel\":\"真实姓名\",\"columnComment\":\"真实姓名\",\"columnType\":\"varchar(100)\",\"isPk\":\"0\",\"isIncrement\":\"0\",\"isRequired\":\"0\",\"htmlType\":\"input\"},{\"columnName\":\"phone\",\"columnLabel\":\"电话\",\"columnComment\":\"联系电话\",\"columnType\":\"varchar(20)\",\"isPk\":\"0\",\"isIncrement\":\"0\",\"isRequired\":\"0\",\"htmlType\":\"input\"},{\"columnName\":\"email\",\"columnLabel\":\"邮箱\",\"columnComment\":\"电子邮箱\",\"columnType\":\"varchar(100)\",\"isPk\":\"0\",\"isIncrement\":\"0\",\"isRequired\":\"0\",\"htmlType\":\"input\"},{\"columnName\":\"status\",\"columnLabel\":\"状态\",\"columnComment\":\"账号状态active-正常inactive-禁用\",\"columnType\":\"varchar(20)\",\"isPk\":\"0\",\"isIncrement\":\"0\",\"isRequired\":\"1\",\"htmlType\":\"select\",\"dictType\":\"\",\"dictOptions\":[{\"label\":\"正常\",\"value\":\"active\"},{\"label\":\"禁用\",\"value\":\"inactive\"}]},{\"columnName\":\"create_time\",\"columnLabel\":\"创建时间\",\"columnComment\":\"创建时间\",\"columnType\":\"datetime\",\"isPk\":\"0\",\"isIncrement\":\"0\",\"isRequired\":\"0\",\"htmlType\":\"datetime\"},{\"columnName\":\"update_time\",\"columnLabel\":\"更新时间\",\"columnComment\":\"更新时间\",\"columnType\":\"datetime\",\"isPk\":\"0\",\"isIncrement\":\"0\",\"isRequired\":\"0\",\"htmlType\":\"datetime\"}]},{\"tableName\":\"carousel\",\"tableComment\":\"轮播图表\",\"adminMenuName\":\"轮播图管理\",\"operations\":{\"add\":true,\"edit\":true,\"remove\":true,\"removeType\":\"physical\",\"reason\":\"\"},\"columns\":[{\"columnName\":\"id\",\"columnLabel\":\"ID\",\"columnComment\":\"主键ID\",\"columnType\":\"bigint(20)\",\"isPk\":\"1\",\"isIncrement\":\"1\",\"isRequired\":\"1\"},{\"columnName\":\"image_url\",\"columnLabel\":\"图片URL\",\"columnComment\":\"轮播图片地址\",\"columnType\":\"varchar(500)\",\"isPk\":\"0\",\"isIncrement\":\"0\",\"isRequired\":\"1\",\"htmlType\":\"imageUpload\"},{\"columnName\":\"link_url\",\"columnLabel\":\"链接URL\",\"columnComment\":\"点击跳转链接\",\"columnType\":\"varchar(500)\",\"isPk\":\"0\",\"isIncrement\":\"0\",\"isRequired\":\"0\",\"htmlType\":\"input\"},{\"columnName\":\"sort_order\",\"columnLabel\":\"排序\",\"columnComment\":\"显示顺序,数字越小越靠前\",\"columnType\":\"int(11)\",\"isPk\":\"0\",\"isIncrement\":\"0\",\"isRequired\":\"0\",\"htmlType\":\"input\"},{\"columnName\":\"status\",\"columnLabel\":\"状态\",\"columnComment\":\"启用状态active-启用inactive-禁用\",\"columnType\":\"varchar(20)\",\"isPk\":\"0\",\"isIncrement\":\"0\",\"isRequired\":\"1\",\"htmlType\":\"select\",\"dictType\":\"\",\"dictOptions\":[{\"label\":\"启用\",\"value\":\"active\"},{\"label\":\"禁用\",\"value\":\"inactive\"}]},{\"columnName\":\"create_time\",\"columnLabel\":\"创建时间\",\"columnComment\":\"创建时间\",\"columnType\":\"datetime\",\"isPk\":\"0\",\"isIncrement\":\"0\",\"isRequired\":\"0\",\"htmlType\":\"datetime\"},{\"columnName\":\"update_time\",\"columnLabel\":\"更新时间\",\"columnComment\":\"更新时间\",\"columnType\":\"datetime\",\"isPk\":\"0\",\"isIncrement\":\"0\",\"isRequired\":\"0\",\"htmlType\":\"datetime\"}]},{\"tableName\":\"announcement\",\"tableComment\":\"公告表\",\"adminMenuName\":\"公告管理\",\"operations\":{\"add\":true,\"edit\":true,\"remove\":true,\"removeType\":\"physical\",\"reason\":\"\"},\"columns\":[{\"columnName\":\"id\",\"columnLabel\":\"ID\",\"columnComment\":\"主键ID\",\"columnType\":\"bigint(20)\",\"isPk\":\"1\",\"isIncrement\":\"1\",\"isRequired\":\"1\"},{\"columnName\":\"title\",\"columnLabel\":\"标题\",\"columnComment\":\"公告标题\",\"columnType\":\"varchar(200)\",\"isPk\":\"0\",\"isIncrement\":\"0\",\"isRequired\":\"1\",\"htmlType\":\"input\"},{\"columnName\":\"content\",\"columnLabel\":\"内容\",\"columnComment\":\"公告正文\",\"columnType\":\"text\",\"isPk\":\"0\",\"isIncrement\":\"0\",\"isRequired\":\"1\",\"htmlType\":\"editor\"},{\"columnName\":\"publish_time\",\"columnLabel\":\"发布时间\",\"columnComment\":\"公告发布时间\",\"columnType\":\"datetime\",\"isPk\":\"0\",\"isIncrement\":\"0\",\"isRequired\":\"0\",\"htmlType\":\"datetime\"},{\"columnName\":\"status\",\"columnLabel\":\"状态\",\"columnComment\":\"状态draft-草稿published-已发布\",\"columnType\":\"varchar(20)\",\"isPk\":\"0\",\"isIncrement\":\"0\",\"isRequired\":\"1\",\"htmlType\":\"select\",\"dictType\":\"\",\"dictOptions\":[{\"label\":\"草稿\",\"value\":\"draft\"},{\"label\":\"已发布\",\"value\":\"published\"}]},{\"columnName\":\"create_time\",\"columnLabel\":\"创建时间\",\"columnComment\":\"创建时间\",\"columnType\":\"datetime\",\"isPk\":\"0\",\"isIncrement\":\"0\",\"isRequired\":\"0\",\"htmlType\":\"datetime\"},{\"columnName\":\"update_time\",\"columnLabel\":\"更新时间\",\"columnComment\":\"更新时间\",\"columnType\":\"datetime\",\"isPk\":\"0\",\"isIncrement\":\"0\",\"isRequired\":\"0\",\"htmlType\":\"datetime\"}]},{\"tableName\":\"news\",\"tableComment\":\"新闻表\",\"adminMenuName\":\"新闻管理\",\"operations\":{\"add\":true,\"edit\":true,\"remove\":true,\"removeType\":\"physical\",\"reason\":\"\"},\"columns\":[{\"columnName\":\"id\",\"columnLabel\":\"ID\",\"columnComment\":\"主键ID\",\"columnType\":\"bigint(20)\",\"isPk\":\"1\",\"isIncrement\":\"1\",\"isRequired\":\"1\"},{\"columnName\":\"title\",\"columnLabel\":\"标题\",\"columnComment\":\"新闻标题\",\"columnType\":\"varchar(200)\",\"isPk\":\"0\",\"isIncrement\":\"0\",\"isRequired\":\"1\",\"htmlType\":\"input\"},{\"columnName\":\"content\",\"columnLabel\":\"内容\",\"columnComment\":\"新闻正文\",\"columnType\":\"text\",\"isPk\":\"0\",\"isIncrement\":\"0\",\"isRequired\":\"1\",\"htmlType\":\"editor\"},{\"columnName\":\"publish_time\",\"columnLabel\":\"发布时间\",\"columnComment\":\"新闻发布时间\",\"columnType\":\"datetime\",\"isPk\":\"0\",\"isIncrement\":\"0\",\"isRequired\":\"0\",\"htmlType\":\"datetime\"},{\"columnName\":\"status\",\"columnLabel\":\"状态\",\"columnComment\":\"状态draft-草稿published-已发布\",\"columnType\":\"varchar(20)\",\"isPk\":\"0\",\"isIncrement\":\"0\",\"isRequired\":\"1\",\"htmlType\":\"select\",\"dictType\":\"\",\"dictOptions\":[{\"label\":\"草稿\",\"value\":\"draft\"},{\"label\":\"已发布\",\"value\":\"published\"}]},{\"columnName\":\"cover_image\",\"columnLabel\":\"封面图片\",\"columnComment\":\"新闻封面图片URL\",\"columnType\":\"varchar(500)\",\"isPk\":\"0\",\"isIncrement\":\"0\",\"isRequired\":\"0\",\"htmlType\":\"imageUpload\"},{\"columnName\":\"create_time\",\"columnLabel\":\"创建时间\",\"columnComment\":\"创建时间\",\"columnType\":\"datetime\",\"isPk\":\"0\",\"isIncrement\":\"0\",\"isRequired\":\"0\",\"htmlType\":\"datetime\"},{\"columnName\":\"update_time\",\"columnLabel\":\"更新时间\",\"columnComment\":\"更新时间\",\"columnType\":\"datetime\",\"isPk\":\"0\",\"isIncrement\":\"0\",\"isRequired\":\"0\",\"htmlType\":\"datetime\"}]},{\"tableName\":\"admin\",\"tableComment\":\"管理员表\",\"adminMenuName\":\"管理员\",\"operations\":{\"add\":false,\"edit\":true,\"remove\":false,\"removeType\":\"\",\"reason\":\"管理员账号仅支持个人编辑\"},\"columns\":[{\"columnName\":\"admin_id\",\"columnLabel\":\"管理员ID\",\"columnComment\":\"主键ID\",\"columnType\":\"bigint(20)\",\"isPk\":\"1\",\"isIncrement\":\"1\",\"isRequired\":\"1\"},{\"columnName\":\"username\",\"columnLabel\":\"用户名\",\"columnComment\":\"登录用户名(唯一)\",\"columnType\":\"varchar(50)\",\"isPk\":\"0\",\"isIncrement\":\"0\",\"isRequired\":\"1\",\"htmlType\":\"input\"},{\"columnName\":\"password_hash\",\"columnLabel\":\"密码哈希\",\"columnComment\":\"加密后的密码\",\"columnType\":\"varchar(255)\",\"isPk\":\"0\",\"isIncrement\":\"0\",\"isRequired\":\"1\",\"htmlType\":\"input\"},{\"columnName\":\"nickname\",\"columnLabel\":\"昵称\",\"columnComment\":\"显示昵称\",\"columnType\":\"varchar(100)\",\"isPk\":\"0\",\"isIncrement\":\"0\",\"isRequired\":\"1\",\"htmlType\":\"input\"},{\"columnName\":\"status\",\"columnLabel\":\"状态\",\"columnComment\":\"账号状态active-正常inactive-禁用\",\"columnType\":\"varchar(20)\",\"isPk\":\"0\",\"isIncrement\":\"0\",\"isRequired\":\"1\",\"htmlType\":\"select\",\"dictType\":\"\",\"dictOptions\":[{\"label\":\"正常\",\"value\":\"active\"},{\"label\":\"禁用\",\"value\":\"inactive\"}]},{\"columnName\":\"create_time\",\"columnLabel\":\"创建时间\",\"columnComment\":\"创建时间\",\"columnType\":\"datetime\",\"isPk\":\"0\",\"isIncrement\":\"0\",\"isRequired\":\"0\",\"htmlType\":\"datetime\"},{\"columnName\":\"update_time\",\"columnLabel\":\"更新时间\",\"columnComment\":\"更新时间\",\"columnType\":\"datetime\",\"isPk\":\"0\",\"isIncrement\":\"0\",\"isRequired\":\"0\",\"htmlType\":\"datetime\"}]}]},\"projectName\":\"图书管理系统\",\"flowConfig\":{\"actions\":[{\"actor\":\"reader\",\"button\":{\"confirm\":\"确认取消该预约吗?\",\"order\":10,\"pageCode\":\"my_reservations_page\",\"scope\":\"reader\",\"slot\":\"list.rowActions\",\"type\":\"danger\"},\"code\":\"cancel_reservation\",\"effects\":[],\"from\":\"pending\",\"invalidStateMessage\":\"当前状态不可取消预约\",\"method\":\"POST\",\"name\":\"取消预约\",\"path\":\"/reservation/cancel\",\"requestFields\":[],\"successMessage\":\"预约已取消\",\"to\":\"cancelled\"},{\"actor\":\"admin\",\"audit\":{\"timeField\":\"cancel_time\",\"userField\":\"cancel_user_id\"},\"button\":{\"confirm\":\"确认取消该预约吗?\",\"order\":10,\"pageCode\":\"reservation_admin_page\",\"scope\":\"admin\",\"slot\":\"list.rowActions\",\"type\":\"danger\"},\"code\":\"admin_cancel_reservation\",\"effects\":[],\"from\":\"pending\",\"invalidStateMessage\":\"当前状态不可取消预约\",\"method\":\"POST\",\"name\":\"取消预约\",\"path\":\"/reservation/admin-cancel\",\"requestFields\":[],\"successMessage\":\"预约已取消\",\"to\":\"cancelled\"},{\"actor\":\"admin\",\"audit\":{\"timeField\":\"fulfill_time\",\"userField\":\"fulfill_user_id\"},\"button\":{\"confirm\":\"确认借出此预约的图书?\",\"order\":20,\"pageCode\":\"reservation_admin_page\",\"scope\":\"admin\",\"slot\":\"list.rowActions\",\"type\":\"primary\"},\"code\":\"fulfill_reservation\",\"effects\":[{\"amount\":\"1\",\"min\":\"0\",\"table\":\"borrowing\",\"type\":\"create_record\",\"values\":{\"reader_id\":\"record.reader_id\",\"due_date\":\"now + 30\",\"borrow_date\":\"now\",\"book_id\":\"record.book_id\",\"status\":\"\'borrowing\'\"}},{\"amount\":\"1\",\"errorMessage\":\"图书库存不足\",\"field\":\"stock\",\"min\":\"0\",\"notFoundMessage\":\"图书不存在\",\"relationField\":\"book_id\",\"table\":\"book_info\",\"type\":\"decrease\",\"values\":{}}],\"from\":\"pending\",\"invalidStateMessage\":\"当前状态不可确认借出\",\"method\":\"POST\",\"name\":\"确认借出\",\"path\":\"/reservation/fulfill\",\"requestFields\":[],\"successMessage\":\"借出成功\",\"to\":\"fulfilled\"}],\"code\":\"reservation_management\",\"mainTable\":\"reservation\",\"metrics\":[{\"aggregate\":\"count\",\"code\":\"pending_count\",\"field\":\"id\",\"name\":\"待处理预约数\",\"status\":\"pending\",\"table\":\"reservation\",\"unit\":\"条\"},{\"aggregate\":\"count\",\"code\":\"cancelled_count\",\"field\":\"id\",\"name\":\"已取消预约数\",\"status\":\"cancelled\",\"table\":\"reservation\",\"unit\":\"条\"},{\"aggregate\":\"count\",\"code\":\"fulfilled_count\",\"field\":\"id\",\"name\":\"已借出预约数\",\"status\":\"fulfilled\",\"table\":\"reservation\",\"unit\":\"条\"},{\"aggregate\":\"count\",\"code\":\"total_reservations\",\"field\":\"id\",\"name\":\"预约总数\",\"table\":\"reservation\",\"unit\":\"条\"}],\"name\":\"预约管理\",\"notFoundMessage\":\"预约记录不存在\",\"states\":[{\"code\":\"pending\",\"label\":\"待处理\"},{\"code\":\"cancelled\",\"label\":\"已取消\"},{\"code\":\"fulfilled\",\"label\":\"已借出\"}],\"statusField\":\"status\",\"version\":\"1.0\"},\"limits\":{\"maxTables\":12,\"maxColumnsPerTable\":30}}', '{\n \"tables\": [\n {\n \"tableName\": \"book_info\",\n \"tableComment\": \"图书信息表\",\n \"adminMenuName\": \"图书管理\",\n \"operations\": {\n \"add\": true,\n \"edit\": true,\n \"remove\": true,\n \"removeType\": \"physical\",\n \"reason\": \"\"\n },\n \"columns\": [\n {\n \"columnName\": \"id\",\n \"columnLabel\": \"ID\",\n \"columnComment\": \"主键ID\",\n \"columnType\": \"bigint(20)\",\n \"isPk\": \"1\",\n \"isIncrement\": \"1\",\n \"isRequired\": \"1\"\n },\n {\n \"columnName\": \"book_name\",\n \"columnLabel\": \"书名\",\n \"columnComment\": \"图书名称\",\n \"columnType\": \"varchar(200)\",\n \"isPk\": \"0\",\n \"isIncrement\": \"0\",\n \"isRequired\": \"1\",\n \"htmlType\": \"input\"\n },\n {\n \"columnName\": \"author\",\n \"columnLabel\": \"作者\",\n \"columnComment\": \"图书作者\",\n \"columnType\": \"varchar(100)\",\n \"isPk\": \"0\",\n \"isIncrement\": \"0\",\n \"isRequired\": \"0\",\n \"htmlType\": \"input\"\n },\n {\n \"columnName\": \"publisher\",\n \"columnLabel\": \"出版社\",\n \"columnComment\": \"出版社\",\n \"columnType\": \"varchar(100)\",\n \"isPk\": \"0\",\n \"isIncrement\": \"0\",\n \"isRequired\": \"0\",\n \"htmlType\": \"input\"\n },\n {\n \"columnName\": \"isbn\",\n \"columnLabel\": \"ISBN\",\n \"columnComment\": \"国际标准书号\",\n \"columnType\": \"varchar(20)\",\n \"isPk\": \"0\",\n \"isIncrement\": \"0\",\n \"isRequired\": \"0\",\n \"htmlType\": \"input\"\n },\n {\n \"columnName\": \"category\",\n \"columnLabel\": \"分类\",\n \"columnComment\": \"图书分类\",\n \"columnType\": \"varchar(50)\",\n \"isPk\": \"0\",\n \"isIncrement\": \"0\",\n \"isRequired\": \"0\",\n \"htmlType\": \"select\",\n \"dictType\": \"\",\n \"dictOptions\": [\n {\n \"label\": \"文学\",\n \"value\": \"literature\"\n },\n {\n \"label\": \"科学\",\n \"value\": \"science\"\n },\n {\n \"label\": \"历史\",\n \"value\": \"history\"\n },\n {\n \"label\": \"其他\",\n \"value\": \"other\"\n }\n ]\n },\n {\n \"columnName\": \"stock\",\n \"columnLabel\": \"库存\",\n \"columnComment\": \"当前库存数量\",\n \"columnType\": \"int(11)\",\n \"isPk\": \"0\",\n \"isIncrement\": \"0\",\n \"isRequired\": \"1\",\n \"htmlType\": \"input\"\n },\n {\n \"columnName\": \"cover_image\",\n \"columnLabel\": \"封面图片\",\n \"columnComment\": \"图书封面图片URL\",\n \"columnType\": \"varchar(500)\",\n \"isPk\": \"0\",\n \"isIncrement\": \"0\",\n \"isRequired\": \"0\",\n \"htmlType\": \"imageUpload\"\n },\n {\n \"columnName\": \"description\",\n \"columnLabel\": \"描述\",\n \"columnComment\": \"图书简介\",\n \"columnType\": \"text\",\n \"isPk\": \"0\",\n \"isIncrement\": \"0\",\n \"isRequired\": \"0\",\n \"htmlType\": \"editor\"\n },\n {\n \"columnName\": \"create_time\",\n \"columnLabel\": \"创建时间\",\n \"columnComment\": \"创建时间\",\n \"columnType\": \"datetime\",\n \"isPk\": \"0\",\n \"isIncrement\": \"0\",\n \"isRequired\": \"0\",\n \"htmlType\": \"datetime\"\n },\n {\n \"columnName\": \"update_time\",\n \"columnLabel\": \"更新时间\",\n \"columnComment\": \"更新时间\",\n \"columnType\": \"datetime\",\n \"isPk\": \"0\",\n \"isIncrement\": \"0\",\n \"isRequired\": \"0\",\n \"htmlType\": \"datetime\"\n }\n ]\n },\n {\n \"tableName\": \"borrowing\",\n \"tableComment\": \"借阅记录表\",\n \"adminMenuName\": \"借阅管理\",\n \"operations\": {\n \"add\": true,\n \"edit\": false,\n \"remove\": false,\n \"removeType\": \"physical\",\n \"reason\": \"借阅记录仅允许新增\"\n },\n \"columns\": [\n {\n \"columnName\": \"id\",\n \"columnLabel\": \"ID\",\n \"columnComment\": \"主键ID\",\n \"columnType\": \"bigint(20)\",\n \"isPk\": \"1\",\n \"isIncrement\": \"1\",\n \"isRequired\": \"1\"\n },\n {\n \"columnName\": \"reader_id\",\n \"columnLabel\": \"读者\",\n \"columnComment\": \"借阅读者ID\",\n \"columnType\": \"bigint(20)\",\n \"isPk\": \"0\",\n \"isIncrement\": \"0\",\n \"isRequired\": \"1\",\n \"htmlType\": \"select\",\n \"dictType\": \"remote:reader:reader_id:nickname\"\n },\n {\n \"columnName\": \"book_id\",\n \"columnLabel\": \"图书\",\n \"columnComment\": \"借阅图书ID\",\n \"columnType\": \"bigint(20)\",\n \"isPk\": \"0\",\n \"isIncrement\": \"0\",\n \"isRequired\": \"1\",\n \"htmlType\": \"select\",\n \"dictType\": \"remote:book_info:id:book_name\"\n },\n {\n \"columnName\": \"borrow_date\",\n \"columnLabel\": \"借书日期\",\n \"columnComment\": \"借书日期\",\n \"columnType\": \"datetime\",\n \"isPk\": \"0\",\n \"isIncrement\": \"0\",\n \"isRequired\": \"1\",\n \"htmlType\": \"datetime\"\n },\n {\n \"columnName\": \"due_date\",\n \"columnLabel\": \"应还日期\",\n \"columnComment\": \"应还日期\",\n \"columnType\": \"datetime\",\n \"isPk\": \"0\",\n \"isIncrement\": \"0\",\n \"isRequired\": \"1\",\n \"htmlType\": \"datetime\"\n },\n {\n \"columnName\": \"return_date\",\n \"columnLabel\": \"实际归还日期\",\n \"columnComment\": \"实际归还日期\",\n \"columnType\": \"datetime\",\n \"isPk\": \"0\",\n \"isIncrement\": \"0\",\n \"isRequired\": \"0\",\n \"htmlType\": \"datetime\"\n },\n {\n \"columnName\": \"status\",\n \"columnLabel\": \"状态\",\n \"columnComment\": \"借阅状态borrowing-借阅中returned-已归还overdue-逾期\",\n \"columnType\": \"varchar(20)\",\n \"isPk\": \"0\",\n \"isIncrement\": \"0\",\n \"isRequired\": \"1\",\n \"htmlType\": \"select\",\n \"dictType\": \"\",\n \"dictOptions\": [\n {\n \"label\": \"借阅中\",\n \"value\": \"borrowing\"\n },\n {\n \"label\": \"已归还\",\n \"value\": \"returned\"\n },\n {\n \"label\": \"逾期\",\n \"value\": \"overdue\"\n }\n ]\n },\n {\n \"columnName\": \"renew_count\",\n \"columnLabel\": \"续借次数\",\n \"columnComment\": \"续借次数\",\n \"columnType\": \"int(11)\",\n \"isPk\": \"0\",\n \"isIncrement\": \"0\",\n \"isRequired\": \"0\",\n \"htmlType\": \"input\"\n },\n {\n \"columnName\": \"create_time\",\n \"columnLabel\": \"创建时间\",\n \"columnComment\": \"创建时间\",\n \"columnType\": \"datetime\",\n \"isPk\": \"0\",\n \"isIncrement\": \"0\",\n \"isRequired\": \"0\",\n \"htmlType\": \"datetime\"\n },\n {\n \"columnName\": \"update_time\",\n \"columnLabel\": \"更新时间\",\n \"columnComment\": \"更新时间\",\n \"columnType\": \"datetime\",\n \"isPk\": \"0\",\n \"isIncrement\": \"0\",\n \"isRequired\": \"0\",\n \"htmlType\": \"datetime\"\n }\n ]\n },\n {\n \"tableName\": \"reservation\",\n \"tableComment\": \"预约记录表\",\n \"adminMenuName\": \"预约管理\",\n \"operations\": {\n \"add\": true,\n \"edit\": false,\n \"remove\": false,\n \"removeType\": \"physical\",\n \"reason\": \"预约记录仅允许新增\"\n },\n \"columns\": [\n {\n \"columnName\": \"id\",\n \"columnLabel\": \"ID\",\n \"columnComment\": \"主键ID\",\n \"columnType\": \"bigint(20)\",\n \"isPk\": \"1\",\n \"isIncrement\": \"1\",\n \"isRequired\": \"1\"\n },\n {\n \"columnName\": \"reader_id\",\n \"columnLabel\": \"读者\",\n \"columnComment\": \"预约读者ID\",\n \"columnType\": \"bigint(20)\",\n \"isPk\": \"0\",\n \"isIncrement\": \"0\",\n \"isRequired\": \"1\",\n \"htmlType\": \"select\",\n \"dictType\": \"remote:reader:reader_id:nickname\"\n },\n {\n \"columnName\": \"book_id\",\n \"columnLabel\": \"图书\",\n \"columnComment\": \"预约图书ID\",\n \"columnType\": \"bigint(20)\",\n \"isPk\": \"0\",\n \"isIncrement\": \"0\",\n \"isRequired\": \"1\",\n \"htmlType\": \"select\",\n \"dictType\": \"remote:book_info:id:book_name\"\n },\n {\n \"columnName\": \"reserve_date\",\n \"columnLabel\": \"预约时间\",\n \"columnComment\": \"预约发起时间\",\n \"columnType\": \"datetime\",\n \"isPk\": \"0\",\n \"isIncrement\": \"0\",\n \"isRequired\": \"1\",\n \"htmlType\": \"datetime\"\n },\n {\n \"columnName\": \"status\",\n \"columnLabel\": \"状态\",\n \"columnComment\": \"预约状态pending-待处理cancelled-已取消fulfilled-已借出\",\n \"columnType\": \"varchar(20)\",\n \"isPk\": \"0\",\n \"isIncrement\": \"0\",\n \"isRequired\": \"1\",\n \"htmlType\": \"select\",\n \"dictType\": \"\",\n \"dictOptions\": [\n {\n \"label\": \"待处理\",\n \"value\": \"pending\"\n },\n {\n \"label\": \"已取消\",\n \"value\": \"cancelled\"\n },\n {\n \"label\": \"已借出\",\n \"value\": \"fulfilled\"\n }\n ]\n },\n {\n \"columnName\": \"cancel_user_id\",\n \"columnLabel\": \"取消操作人\",\n \"columnComment\": \"取消预约的管理员ID\",\n \"columnType\": \"bigint(20)\",\n \"isPk\": \"0\",\n \"isIncrement\": \"0\",\n \"isRequired\": \"0\",\n \"htmlType\": \"select\",\n \"dictType\": \"remote:admin:admin_id:username\"\n },\n {\n \"columnName\": \"cancel_time\",\n \"columnLabel\": \"取消时间\",\n \"columnComment\": \"取消预约的时间\",\n \"columnType\": \"datetime\",\n \"isPk\": \"0\",\n \"isIncrement\": \"0\",\n \"isRequired\": \"0\",\n \"htmlType\": \"datetime\"\n },\n {\n \"columnName\": \"fulfill_user_id\",\n \"columnLabel\": \"确认借出操作人\",\n \"columnComment\": \"确认借出的管理员ID\",\n \"columnType\": \"bigint(20)\",\n \"isPk\": \"0\",\n \"isIncrement\": \"0\",\n \"isRequired\": \"0\",\n \"htmlType\": \"select\",\n \"dictType\": \"remote:admin:admin_id:username\"\n },\n {\n \"columnName\": \"fulfill_time\",\n \"columnLabel\": \"借出时间\",\n \"columnComment\": \"确认借出的时间\",\n \"columnType\": \"datetime\",\n \"isPk\": \"0\",\n \"isIncrement\": \"0\",\n \"isRequired\": \"0\",\n \"htmlType\": \"datetime\"\n },\n {\n \"columnName\": \"create_time\",\n \"columnLabel\": \"创建时间\",\n \"columnComment\": \"创建时间\",\n \"columnType\": \"datetime\",\n \"isPk\": \"0\",\n \"isIncrement\": \"0\",\n \"isRequired\": \"0\",\n \"htmlType\": \"datetime\"\n },\n {\n \"columnName\": \"update_time\",\n \"columnLabel\": \"更新时间\",\n \"columnComment\": \"更新时间\",\n \"columnType\": \"datetime\",\n \"isPk\": \"0\",\n \"isIncrement\": \"0\",\n \"isRequired\": \"0\",\n \"htmlType\": \"datetime\"\n }\n ]\n },\n {\n \"tableName\": \"reader\",\n \"tableComment\": \"读者信息表\",\n \"adminMenuName\": \"读者管理\",\n \"operations\": {\n \"add\": true,\n \"edit\": true,\n \"remove\": true,\n \"removeType\": \"physical\",\n \"reason\": \"读者信息可物理删除\"\n },\n \"columns\": [\n {\n \"columnName\": \"reader_id\",\n \"columnLabel\": \"读者ID\",\n \"columnComment\": \"主键ID\",\n \"columnType\": \"bigint(20)\",\n \"isPk\": \"1\",\n \"isIncrement\": \"1\",\n \"isRequired\": \"1\"\n },\n {\n \"columnName\": \"username\",\n \"columnLabel\": \"用户名\",\n \"columnComment\": \"登录用户名(唯一)\",\n \"columnType\": \"varchar(50)\",\n \"isPk\": \"0\",\n \"isIncrement\": \"0\",\n \"isRequired\": \"1\",\n \"htmlType\": \"input\"\n },\n {\n \"columnName\": \"password_hash\",\n \"columnLabel\": \"密码哈希\",\n \"columnComment\": \"加密后的密码\",\n \"columnType\": \"varchar(255)\",\n \"isPk\": \"0\",\n \"isIncrement\": \"0\",\n \"isRequired\": \"1\",\n \"htmlType\": \"input\"\n },\n {\n \"columnName\": \"nickname\",\n \"columnLabel\": \"昵称\",\n \"columnComment\": \"显示昵称\",\n \"columnType\": \"varchar(100)\",\n \"isPk\": \"0\",\n \"isIncrement\": \"0\",\n \"isRequired\": \"1\",\n \"htmlType\": \"input\"\n },\n {\n \"columnName\": \"real_name\",\n \"columnLabel\": \"真实姓名\",\n \"columnComment\": \"真实姓名\",\n \"columnType\": \"varchar(100)\",\n \"isPk\": \"0\",\n \"isIncrement\": \"0\",\n \"isRequired\": \"0\",\n \"htmlType\": \"input\"\n },\n {\n \"columnName\": \"phone\",\n \"columnLabel\": \"电话\",\n \"columnComment\": \"联系电话\",\n \"columnType\": \"varchar(20)\",\n \"isPk\": \"0\",\n \"isIncrement\": \"0\",\n \"isRequired\": \"0\",\n \"htmlType\": \"input\"\n },\n {\n \"columnName\": \"email\",\n \"columnLabel\": \"邮箱\",\n \"columnComment\": \"电子邮箱\",\n \"columnType\": \"varchar(100)\",\n \"isPk\": \"0\",\n \"isIncrement\": \"0\",\n \"isRequired\": \"0\",\n \"htmlType\": \"input\"\n },\n {\n \"columnName\": \"status\",\n \"columnLabel\": \"状态\",\n \"columnComment\": \"账号状态active-正常inactive-禁用\",\n \"columnType\": \"varchar(20)\",\n \"isPk\": \"0\",\n \"isIncrement\": \"0\",\n \"isRequired\": \"1\",\n \"htmlType\": \"select\",\n \"dictType\": \"\",\n \"dictOptions\": [\n {\n \"label\": \"正常\",\n \"value\": \"active\"\n },\n {\n \"label\": \"禁用\",\n \"value\": \"inactive\"\n }\n ]\n },\n {\n \"columnName\": \"create_time\",\n \"columnLabel\": \"创建时间\",\n \"columnComment\": \"创建时间\",\n \"columnType\": \"datetime\",\n \"isPk\": \"0\",\n \"isIncrement\": \"0\",\n \"isRequired\": \"0\",\n \"htmlType\": \"datetime\"\n },\n {\n \"columnName\": \"update_time\",\n \"columnLabel\": \"更新时间\",\n \"columnComment\": \"更新时间\",\n \"columnType\": \"datetime\",\n \"isPk\": \"0\",\n \"isIncrement\": \"0\",\n \"isRequired\": \"0\",\n \"htmlType\": \"datetime\"\n }\n ]\n },\n {\n \"tableName\": \"carousel\",\n \"tableComment\": \"轮播图表\",\n \"adminMenuName\": \"轮播图管理\",\n \"operations\": {\n \"add\": true,\n \"edit\": true,\n \"remove\": true,\n \"removeType\": \"physical\",\n \"reason\": \"\"\n },\n \"columns\": [\n {\n \"columnName\": \"id\",\n \"columnLabel\": \"ID\",\n \"columnComment\": \"主键ID\",\n \"columnType\": \"bigint(20)\",\n \"isPk\": \"1\",\n \"isIncrement\": \"1\",\n \"isRequired\": \"1\"\n },\n {\n \"columnName\": \"image_url\",\n \"columnLabel\": \"图片URL\",\n \"columnComment\": \"轮播图片地址\",\n \"columnType\": \"varchar(500)\",\n \"isPk\": \"0\",\n \"isIncrement\": \"0\",\n \"isRequired\": \"1\",\n \"htmlType\": \"imageUpload\"\n },\n {\n \"columnName\": \"link_url\",\n \"columnLabel\": \"链接URL\",\n \"columnComment\": \"点击跳转链接\",\n \"columnType\": \"varchar(500)\",\n \"isPk\": \"0\",\n \"isIncrement\": \"0\",\n \"isRequired\": \"0\",\n \"htmlType\": \"input\"\n },\n {\n \"columnName\": \"sort_order\",\n \"columnLabel\": \"排序\",\n \"columnComment\": \"显示顺序,数字越小越靠前\",\n \"columnType\": \"int(11)\",\n \"isPk\": \"0\",\n \"isIncrement\": \"0\",\n \"isRequired\": \"0\",\n \"htmlType\": \"input\"\n },\n {\n \"columnName\": \"status\",\n \"columnLabel\": \"状态\",\n \"columnComment\": \"启用状态active-启用inactive-禁用\",\n \"columnType\": \"varchar(20)\",\n \"isPk\": \"0\",\n \"isIncrement\": \"0\",\n \"isRequired\": \"1\",\n \"htmlType\": \"select\",\n \"dictType\": \"\",\n \"dictOptions\": [\n {\n \"label\": \"启用\",\n \"value\": \"active\"\n },\n {\n \"label\": \"禁用\",\n \"value\": \"inactive\"\n }\n ]\n },\n {\n \"columnName\": \"create_time\",\n \"columnLabel\": \"创建时间\",\n \"columnComment\": \"创建时间\",\n \"columnType\": \"datetime\",\n \"isPk\": \"0\",\n \"isIncrement\": \"0\",\n \"isRequired\": \"0\",\n \"htmlType\": \"datetime\"\n },\n {\n \"columnName\": \"update_time\",\n \"columnLabel\": \"更新时间\",\n \"columnComment\": \"更新时间\",\n \"columnType\": \"datetime\",\n \"isPk\": \"0\",\n \"isIncrement\": \"0\",\n \"isRequired\": \"0\",\n \"htmlType\": \"datetime\"\n }\n ]\n },\n {\n \"tableName\": \"announcement\",\n \"tableComment\": \"公告表\",\n \"adminMenuName\": \"公告管理\",\n \"operations\": {\n \"add\": true,\n \"edit\": true,\n \"remove\": true,\n \"removeType\": \"physical\",\n \"reason\": \"\"\n },\n \"columns\": [\n {\n \"columnName\": \"id\",\n \"columnLabel\": \"ID\",\n \"columnComment\": \"主键ID\",\n \"columnType\": \"bigint(20)\",\n \"isPk\": \"1\",\n \"isIncrement\": \"1\",\n \"isRequired\": \"1\"\n },\n {\n \"columnName\": \"title\",\n \"columnLabel\": \"标题\",\n \"columnComment\": \"公告标题\",\n \"columnType\": \"varchar(200)\",\n \"isPk\": \"0\",\n \"isIncrement\": \"0\",\n \"isRequired\": \"1\",\n \"htmlType\": \"input\"\n },\n {\n \"columnName\": \"content\",\n \"columnLabel\": \"内容\",\n \"columnComment\": \"公告正文\",\n \"columnType\": \"text\",\n \"isPk\": \"0\",\n \"isIncrement\": \"0\",\n \"isRequired\": \"1\",\n \"htmlType\": \"editor\"\n },\n {\n \"columnName\": \"publish_time\",\n \"columnLabel\": \"发布时间\",\n \"columnComment\": \"公告发布时间\",\n \"columnType\": \"datetime\",\n \"isPk\": \"0\",\n \"isIncrement\": \"0\",\n \"isRequired\": \"0\",\n \"htmlType\": \"datetime\"\n },\n {\n \"columnName\": \"status\",\n \"columnLabel\": \"状态\",\n \"columnComment\": \"状态draft-草稿published-已发布\",\n \"columnType\": \"varchar(20)\",\n \"isPk\": \"0\",\n \"isIncrement\": \"0\",\n \"isRequired\": \"1\",\n \"htmlType\": \"select\",\n \"dictType\": \"\",\n \"dictOptions\": [\n {\n \"label\": \"草稿\",\n \"value\": \"draft\"\n },\n {\n \"label\": \"已发布\",\n \"value\": \"published\"\n }\n ]\n },\n {\n \"columnName\": \"create_time\",\n \"columnLabel\": \"创建时间\",\n \"columnComment\": \"创建时间\",\n \"columnType\": \"datetime\",\n \"isPk\": \"0\",\n \"isIncrement\": \"0\",\n \"isRequired\": \"0\",\n \"htmlType\": \"datetime\"\n },\n {\n \"columnName\": \"update_time\",\n \"columnLabel\": \"更新时间\",\n \"columnComment\": \"更新时间\",\n \"columnType\": \"datetime\",\n \"isPk\": \"0\",\n \"isIncrement\": \"0\",\n \"isRequired\": \"0\",\n \"htmlType\": \"datetime\"\n }\n ]\n },\n {\n \"tableName\": \"news\",\n \"tableComment\": \"新闻表\",\n \"adminMenuName\": \"新闻管理\",\n \"operations\": {\n \"add\": true,\n \"edit\": true,\n \"remove\": true,\n \"removeType\": \"physical\",\n \"reason\": \"\"\n },\n \"columns\": [\n {\n \"columnName\": \"id\",\n \"columnLabel\": \"ID\",\n \"columnComment\": \"主键ID\",\n \"columnType\": \"bigint(20)\",\n \"isPk\": \"1\",\n \"isIncrement\": \"1\",\n \"isRequired\": \"1\"\n },\n {\n \"columnName\": \"title\",\n \"columnLabel\": \"标题\",\n \"columnComment\": \"新闻标题\",\n \"columnType\": \"varchar(200)\",\n \"isPk\": \"0\",\n \"isIncrement\": \"0\",\n \"isRequired\": \"1\",\n \"htmlType\": \"input\"\n },\n {\n \"columnName\": \"content\",\n \"columnLabel\": \"内容\",\n \"columnComment\": \"新闻正文\",\n \"columnType\": \"text\",\n \"isPk\": \"0\",\n \"isIncrement\": \"0\",\n \"isRequired\": \"1\",\n \"htmlType\": \"editor\"\n },\n {\n \"columnName\": \"publish_time\",\n \"columnLabel\": \"发布时间\",\n \"columnComment\": \"新闻发布时间\",\n \"columnType\": \"datetime\",\n \"isPk\": \"0\",\n \"isIncrement\": \"0\",\n \"isRequired\": \"0\",\n \"htmlType\": \"datetime\"\n },\n {\n \"columnName\": \"status\",\n \"columnLabel\": \"状态\",\n \"columnComment\": \"状态draft-草稿published-已发布\",\n \"columnType\": \"varchar(20)\",\n \"isPk\": \"0\",\n \"isIncrement\": \"0\",\n \"isRequired\": \"1\",\n \"htmlType\": \"select\",\n \"dictType\": \"\",\n \"dictOptions\": [\n {\n \"label\": \"草稿\",\n \"value\": \"draft\"\n },\n {\n \"label\": \"已发布\",\n \"value\": \"published\"\n }\n ]\n },\n {\n \"columnName\": \"cover_image\",\n \"columnLabel\": \"封面图片\",\n \"columnComment\": \"新闻封面图片URL\",\n \"columnType\": \"varchar(500)\",\n \"isPk\": \"0\",\n \"isIncrement\": \"0\",\n \"isRequired\": \"0\",\n \"htmlType\": \"imageUpload\"\n },\n {\n \"columnName\": \"create_time\",\n \"columnLabel\": \"创建时间\",\n \"columnComment\": \"创建时间\",\n \"columnType\": \"datetime\",\n \"isPk\": \"0\",\n \"isIncrement\": \"0\",\n \"isRequired\": \"0\",\n \"htmlType\": \"datetime\"\n },\n {\n \"columnName\": \"update_time\",\n \"columnLabel\": \"更新时间\",\n \"columnComment\": \"更新时间\",\n \"columnType\": \"datetime\",\n \"isPk\": \"0\",\n \"isIncrement\": \"0\",\n \"isRequired\": \"0\",\n \"htmlType\": \"datetime\"\n }\n ]\n },\n {\n \"tableName\": \"admin\",\n \"tableComment\": \"管理员表\",\n \"adminMenuName\": \"管理员\",\n \"operations\": {\n \"add\": false,\n \"edit\": true,\n \"remove\": false,\n \"removeType\": \"\",\n \"reason\": \"管理员账号仅支持个人编辑\"\n },\n \"columns\": [\n {\n \"columnName\": \"admin_id\",\n \"columnLabel\": \"管理员ID\",\n \"columnComment\": \"主键ID\",\n \"columnType\": \"bigint(20)\",\n \"isPk\": \"1\",\n \"isIncrement\": \"1\",\n \"isRequired\": \"1\"\n },\n {\n \"columnName\": \"username\",\n \"columnLabel\": \"用户名\",\n \"columnComment\": \"登录用户名(唯一)\",\n \"columnType\": \"varchar(50)\",\n \"isPk\": \"0\",\n \"isIncrement\": \"0\",\n \"isRequired\": \"1\",\n \"htmlType\": \"input\"\n },\n {\n \"columnName\": \"password_hash\",\n \"columnLabel\": \"密码哈希\",\n \"columnComment\": \"加密后的密码\",\n \"columnType\": \"varchar(255)\",\n \"isPk\": \"0\",\n \"isIncrement\": \"0\",\n \"isRequired\": \"1\",\n \"htmlType\": \"input\"\n },\n {\n \"columnName\": \"nickname\",\n \"columnLabel\": \"昵称\",\n \"columnComment\": \"显示昵称\",\n \"columnType\": \"varchar(100)\",\n \"isPk\": \"0\",\n \"isIncrement\": \"0\",\n \"isRequired\": \"1\",\n \"htmlType\": \"input\"\n },\n {\n \"columnName\": \"status\",\n \"columnLabel\": \"状态\",\n \"columnComment\": \"账号状态active-正常inactive-禁用\",\n \"columnType\": \"varchar(20)\",\n \"isPk\": \"0\",\n \"isIncrement\": \"0\",\n \"isRequired\": \"1\",\n \"htmlType\": \"select\",\n \"dictType\": \"\",\n \"dictOptions\": [\n {\n \"label\": \"正常\",\n \"value\": \"active\"\n },\n {\n \"label\": \"禁用\",\n \"value\": \"inactive\"\n }\n ]\n },\n {\n \"columnName\": \"create_time\",\n \"columnLabel\": \"创建时间\",\n \"columnComment\": \"创建时间\",\n \"columnType\": \"datetime\",\n \"isPk\": \"0\",\n \"isIncrement\": \"0\",\n \"isRequired\": \"0\",\n \"htmlType\": \"datetime\"\n },\n {\n \"columnName\": \"update_time\",\n \"columnLabel\": \"更新时间\",\n \"columnComment\": \"更新时间\",\n \"columnType\": \"datetime\",\n \"isPk\": \"0\",\n \"isIncrement\": \"0\",\n \"isRequired\": \"0\",\n \"htmlType\": \"datetime\"\n }\n ]\n }\n ]\n}', '0', 54680, 8248, NULL, 8248, 8775, 2200, 8248, 8775, 17023, 3, 0.02579800, '1', NULL, '2026-07-15 09:29:26');
INSERT INTO `front_ai_usage_ledger` VALUES (158, 116, 116, 111, 100, 'app_blueprint', 'deepseek', 'deepseek-v4-flash', 'front.app_blueprint', 'V1', 'c3ee0180ed446fe83055bd1c272ed1b6e3978584fe52f98f5e78e14e2cfc8f29', '你是应用蓝图架构师。只输出符合用户消息结构的 JSON规划业务角色、前台菜单与页面、后台菜单和运营看板。保持 pageCode、tableName、角色数据范围和登录要求前后一致只描述静态蓝图不生成数据库、权限表、菜单表或代码。角色名称使用简体中文技术标识使用稳定的小写 snake_case。', '根据项目输入 JSON 生成应用蓝图,只返回 JSON不要 Markdown 围栏或解释。\n输出结构{\"roles\":[{\"code\":\"reader\",\"name\":\"读者\",\"description\":\"\"}],\"frontendMenus\":[{\"code\":\"book_catalog\",\"name\":\"图书目录\",\"path\":\"/books\",\"pageCode\":\"book_catalog_page\",\"requiresLogin\":false,\"visibleRoles\":[],\"dataScope\":\"PUBLIC\"}],\"frontendPages\":[{\"code\":\"book_catalog_page\",\"name\":\"图书目录\",\"menuCode\":\"book_catalog\",\"path\":\"/books\",\"pageType\":\"list\",\"tableName\":\"book_info\"}],\"adminMenus\":[{\"code\":\"book_admin\",\"name\":\"图书管理\",\"path\":\"/admin/books\",\"pageCode\":\"book_admin_page\",\"tableName\":\"book_info\",\"pageType\":\"list\",\"requiresLogin\":true,\"visibleRoles\":[\"admin\"],\"dataScope\":\"ROLE\"}],\"adminHomeDashboard\":{\"title\":\"运营总览\",\"description\":\"核心业务数据\",\"metrics\":[],\"charts\":[]}}。\n蓝图描述目标生成项目而不是当前 EasyCode/RuoYi 平台。不要生成数据库表、菜单表、角色表、权限表或代码。\nrole.name 使用简体中文role.code 使用小写 snake_case。只有 role.code=admin 是系统管理员;名称含“管理员”或“后台”的业务角色仍保持独立。\nrole.name must be Simplified Chinese. Only role.code=admin is the system administrator.\n每个菜单必须包含 requiresLogin、visibleRoles、dataScopedataScope 只能是 PUBLIC、CURRENT_USER 或 ROLE。\nadminMenus 必须包含 pageCode、tableName、pageType个人资料使用 form普通管理使用 list。\nadminMenus must include pageCode, tableName, and pageType.\nfrontendMenus 顶层菜单应指向 pageCode详情页作为子页面不创建顶层详情菜单。\n不要为轮播图、banner、公告滚动条等首页装饰创建顶层菜单可放在首页业务块或作为后台维护数据。\nfrontendPages.pageType 只能是 list、current_user_list、detail、formtableName 必须是页面展示的业务表。\n同一业务对象只使用一个稳定 tableName后续数据库、闭环、页面、看板、动作必须复用不能使用同义表名。\nadminHomeDashboard 尽量包含 4 个业务指标和至少 2 张图表趋势图与分布图所有表字段必须可由后续数据库步骤创建。semantic 只能使用 money、order、user、task、warning、inventory、content、default。\n每个非 admin 角色使用表名等于 role.code 的独立账号表,不得创建共享 user、user_info、member 或 account 表。\nNever invent a shared user, user_info, member, or account table for role accounts.\n需要个人资料页时为每个非 admin 角色创建独立 form 页面和菜单tableName 绑定 role.codepageCode/path 带角色前缀visibleRoles 只包含该角色。\nCreate one form page and one menu per non-admin role when profile pages are needed.\n个人订单、借阅、资料、预约、支付等页面必须 requiresLogin=true 且 dataScope=CURRENT_USER。\n项目输入 JSON\n{\"projectName\":\"图书管理系统\",\"projectDescription\":\"功能:借书、还书、预约、取消预约\\n角色用户、管理员\\n其他模块轮播图、公告、新闻\",\"industryTemplate\":\"\",\"stylePreset\":\"dark-tech\",\"extraRequirements\":\"\"}', '{\n \"roles\": [\n {\n \"code\": \"admin\",\n \"name\": \"管理员\",\n \"description\": \"系统管理员,负责图书、借阅、预约、轮播图、公告、新闻等模块的后台管理。\"\n },\n {\n \"code\": \"reader\",\n \"name\": \"读者\",\n \"description\": \"普通读者,可浏览图书、借书、还书、预约、取消预约,管理个人资料。\"\n }\n ],\n \"frontendMenus\": [\n {\n \"code\": \"book_catalog\",\n \"name\": \"图书目录\",\n \"path\": \"/books\",\n \"pageCode\": \"book_catalog_page\",\n \"requiresLogin\": false,\n \"visibleRoles\": [],\n \"dataScope\": \"PUBLIC\"\n },\n {\n \"code\": \"my_borrowings\",\n \"name\": \"我的借阅\",\n \"path\": \"/my/borrowings\",\n \"pageCode\": \"my_borrowings_page\",\n \"requiresLogin\": true,\n \"visibleRoles\": [\"reader\"],\n \"dataScope\": \"CURRENT_USER\"\n },\n {\n \"code\": \"my_reservations\",\n \"name\": \"我的预约\",\n \"path\": \"/my/reservations\",\n \"pageCode\": \"my_reservations_page\",\n \"requiresLogin\": true,\n \"visibleRoles\": [\"reader\"],\n \"dataScope\": \"CURRENT_USER\"\n },\n {\n \"code\": \"reader_profile\",\n \"name\": \"个人资料\",\n \"path\": \"/reader/profile\",\n \"pageCode\": \"reader_profile_page\",\n \"requiresLogin\": true,\n \"visibleRoles\": [\"reader\"],\n \"dataScope\": \"CURRENT_USER\"\n }\n ],\n \"frontendPages\": [\n {\n \"code\": \"book_catalog_page\",\n \"name\": \"图书目录\",\n \"menuCode\": \"book_catalog\",\n \"path\": \"/books\",\n \"pageType\": \"list\",\n \"tableName\": \"book_info\"\n },\n {\n \"code\": \"my_borrowings_page\",\n \"name\": \"我的借阅\",\n \"menuCode\": \"my_borrowings\",\n \"path\": \"/my/borrowings\",\n \"pageType\": \"current_user_list\",\n \"tableName\": \"borrowing\"\n },\n {\n \"code\": \"my_reservations_page\",\n \"name\": \"我的预约\",\n \"menuCode\": \"my_reservations\",\n \"path\": \"/my/reservations\",\n \"pageType\": \"current_user_list\",\n \"tableName\": \"reservation\"\n },\n {\n \"code\": \"reader_profile_page\",\n \"name\": \"个人资料\",\n \"menuCode\": \"reader_profile\",\n \"path\": \"/reader/profile\",\n \"pageType\": \"form\",\n \"tableName\": \"reader\"\n }\n ],\n \"adminMenus\": [\n {\n \"code\": \"book_admin\",\n \"name\": \"图书管理\",\n \"path\": \"/admin/books\",\n \"pageCode\": \"book_admin_page\",\n \"tableName\": \"book_info\",\n \"pageType\": \"list\",\n \"requiresLogin\": true,\n \"visibleRoles\": [\"admin\"],\n \"dataScope\": \"ROLE\"\n },\n {\n \"code\": \"borrowing_admin\",\n \"name\": \"借阅管理\",\n \"path\": \"/admin/borrowings\",\n \"pageCode\": \"borrowing_admin_page\",\n \"tableName\": \"borrowing\",\n \"pageType\": \"list\",\n \"requiresLogin\": true,\n \"visibleRoles\": [\"admin\"],\n \"dataScope\": \"ROLE\"\n },\n {\n \"code\": \"reservation_admin\",\n \"name\": \"预约管理\",\n \"path\": \"/admin/reservations\",\n \"pageCode\": \"reservation_admin_page\",\n \"tableName\": \"reservation\",\n \"pageType\": \"list\",\n \"requiresLogin\": true,\n \"visibleRoles\": [\"admin\"],\n \"dataScope\": \"ROLE\"\n },\n {\n \"code\": \"banner_admin\",\n \"name\": \"轮播图管理\",\n \"path\": \"/admin/banners\",\n \"pageCode\": \"banner_admin_page\",\n \"tableName\": \"banner\",\n \"pageType\": \"list\",\n \"requiresLogin\": true,\n \"visibleRoles\": [\"admin\"],\n \"dataScope\": \"ROLE\"\n },\n {\n \"code\": \"announcement_admin\",\n \"name\": \"公告管理\",\n \"path\": \"/admin/announcements\",\n \"pageCode\": \"announcement_admin_page\",\n \"tableName\": \"announcement\",\n \"pageType\": \"list\",\n \"requiresLogin\": true,\n \"visibleRoles\": [\"admin\"],\n \"dataScope\": \"ROLE\"\n },\n {\n \"code\": \"news_admin\",\n \"name\": \"新闻管理\",\n \"path\": \"/admin/news\",\n \"pageCode\": \"news_admin_page\",\n \"tableName\": \"news\",\n \"pageType\": \"list\",\n \"requiresLogin\": true,\n \"visibleRoles\": [\"admin\"],\n \"dataScope\": \"ROLE\"\n },\n {\n \"code\": \"admin_profile\",\n \"name\": \"个人资料\",\n \"path\": \"/admin/profile\",\n \"pageCode\": \"admin_profile_page\",\n \"tableName\": \"admin\",\n \"pageType\": \"form\",\n \"requiresLogin\": true,\n \"visibleRoles\": [\"admin\"],\n \"dataScope\": \"CURRENT_USER\"\n }\n ],\n \"adminHomeDashboard\": {\n \"title\": \"运营总览\",\n \"description\": \"核心业务数据\",\n \"metrics\": [\n {\n \"label\": \"总图书数\",\n \"value\": \"COUNT(book_info)\",\n \"semantic\": \"inventory\"\n },\n {\n \"label\": \"总借出数\",\n \"value\": \"COUNT(borrowing WHERE status=\'borrowed\')\",\n \"semantic\": \"order\"\n },\n {\n \"label\": \"今日借书数\",\n \"value\": \"COUNT(borrowing WHERE borrow_date=TODAY)\",\n \"semantic\": \"order\"\n },\n {\n \"label\": \"今日还书数\",\n \"value\": \"COUNT(borrowing WHERE return_date=TODAY)\",\n \"semantic\": \"order\"\n }\n ],\n \"charts\": [\n {\n \"name\": \"近7天借还趋势\",\n \"type\": \"line\",\n \"semantic\": \"order\"\n },\n {\n \"name\": \"图书分类分布\",\n \"type\": \"pie\",\n \"semantic\": \"inventory\"\n }\n ]\n }\n}', '0', 39551, 817, 768, 49, 4634, 3173, 817, 4634, 5451, 1, 0.00933236, '1', NULL, '2026-07-15 10:58:35');
INSERT INTO `front_ai_usage_ledger` VALUES (159, 116, 116, 111, 100, 'flow_config', 'deepseek', 'deepseek-v4-flash', 'front.flow_config', 'v3', '9443d0ca8f3e4bb87cdc13ef4924015fff334f0c9b8690573f0551dd18708406', '你是业务流程配置设计器。只输出一个合法 JSON 对象,不输出 Markdown、解释或 SQL。\n\n目标用最小 flow_config 描述业务发起、状态流转、显式 Java 业务动作、多表数量联动、按钮和统计。不要输出普通 CRUD不要输出通用规则 DSL。创建主业务记录的“借书/预约/申请/下单”等发起动作属于业务闭环,必须输出。项目存在预约、借阅等多个独立状态对象时,必须分别放入 flows禁止只选择其中一个局部流程。\n\n固定结构\n{\n \"version\":\"1.1\",\n \"code\":\"library_circulation\",\n \"name\":\"图书流通\",\n \"flows\":[{\n \"code\":\"reservation_flow\",\"name\":\"图书预约\",\"mainTable\":\"reservation\",\"statusField\":\"status\",\n \"notFoundMessage\":\"预约记录不存在\",\n \"states\":[{\"code\":\"pending\",\"label\":\"待处理\"},{\"code\":\"cancelled\",\"label\":\"已取消\"}],\n \"actions\":[{\n \"code\":\"reserve_book\",\"name\":\"预约\",\"actor\":\"reader\",\"ownerTable\":\"book_info\",\"requestFields\":[\"id\"],\n \"method\":\"POST\",\"path\":\"/book-info/reserve\",\"successMessage\":\"预约成功\",\n \"effects\":[{\"type\":\"create_record\",\"table\":\"reservation\",\"values\":{\"book_id\":\"record.id\",\"reader_id\":\"currentUserId\",\"status\":\"pending\",\"reserve_date\":\"now\"}}],\n \"button\":{\"scope\":\"reader\",\"pageCode\":\"book_detail_page\",\"tableName\":\"book_info\",\"slot\":\"detail.primaryActions\",\"type\":\"primary\",\"confirm\":\"确认预约吗?\",\"order\":10}\n },{\n \"code\":\"cancel_reservation\",\"name\":\"取消预约\",\"from\":\"pending\",\"to\":\"cancelled\",\"actor\":\"reader\",\n \"ownerTable\":\"reservation\",\"requestFields\":[\"id\"],\"method\":\"POST\",\"path\":\"/reservation/cancel\",\n \"button\":{\"scope\":\"reader\",\"pageCode\":\"my_reservations_page\",\"tableName\":\"reservation\",\"slot\":\"list.rowActions\",\"type\":\"danger\",\"confirm\":\"确认取消预约吗?\",\"order\":10}\n }],\n \"metrics\":[]\n },{\n \"code\":\"borrowing_flow\",\"name\":\"图书借阅\",\"mainTable\":\"borrowing\",\"statusField\":\"status\",\n \"notFoundMessage\":\"借阅记录不存在\",\n \"states\":[{\"code\":\"borrowing\",\"label\":\"借阅中\"},{\"code\":\"returned\",\"label\":\"已归还\"}],\n \"actions\":[{\n \"code\":\"borrow_book\",\"name\":\"借书\",\"actor\":\"reader\",\"ownerTable\":\"book_info\",\"requestFields\":[\"id\"],\n \"method\":\"POST\",\"path\":\"/book-info/borrow\",\"successMessage\":\"借书成功\",\n \"effects\":[{\"type\":\"create_record\",\"table\":\"borrowing\",\"values\":{\"book_id\":\"record.id\",\"reader_id\":\"currentUserId\",\"status\":\"borrowing\",\"borrow_date\":\"now\"}},\n {\"type\":\"decrease\",\"table\":\"book_info\",\"relationField\":\"id\",\"field\":\"stock\",\"amount\":\"1\",\"min\":\"0\",\"errorMessage\":\"图书库存不足\"}],\n \"button\":{\"scope\":\"reader\",\"pageCode\":\"book_detail_page\",\"tableName\":\"book_info\",\"slot\":\"detail.primaryActions\",\"type\":\"success\",\"confirm\":\"确认借书吗?\",\"order\":20}\n },{\n \"code\":\"return_book\",\"name\":\"还书\",\"from\":\"borrowing\",\"to\":\"returned\",\"actor\":\"reader\",\"ownerTable\":\"borrowing\",\"requestFields\":[\"id\"],\n \"method\":\"POST\",\"path\":\"/borrowing/return\",\"effects\":[{\"type\":\"increase\",\"table\":\"book_info\",\"relationField\":\"book_id\",\"field\":\"stock\",\"amount\":\"1\"}],\n \"button\":{\"scope\":\"reader\",\"pageCode\":\"my_borrowings_page\",\"tableName\":\"borrowing\",\"slot\":\"list.rowActions\",\"type\":\"primary\",\"confirm\":\"确认还书吗?\",\"order\":10}\n }],\n \"metrics\":[{\"code\":\"borrowing_count\",\"name\":\"借阅中数量\",\"table\":\"borrowing\",\"aggregate\":\"count\",\"field\":\"id\",\"status\":\"borrowing\",\"unit\":\"条\"}]\n }]\n}\n\n约束\n1. 根对象固定使用 version=1.1 和 flows 数组;每个独立状态主表对应一个 flow。code、表名、字段名全部使用小写 snake_case状态 code 使用稳定英文编码label 使用中文。\n2. 每个 action 必须给 ownerTablerequestFields 只列页面传入字段,通常为 ownerTable 主键 idcurrentUserId 不能作为前端可传字段。\n3. 除发起型 action 外,每个 action 必须有 from 和 to二者存在于 states 中且不相同ownerTable 必须为 mainTable。\n4. 创建主业务记录的发起型 action 必须省略 from/to并 create_record 到 mainTablevalues 必须给 statusField 写入 states 中的初始状态。借书、预约、申请、报名、下单、提交工单等需求不得误判为普通 CRUD 而省略。\n5. effects.type 只能是 decrease、increase、update_related、create_record。\n6. decrease/increase 必须给 table、relationField、field、amountdecrease 还要给 min。\n7. update_related/create_record 使用 values值可为 currentUserId、now、record.字段名或常量。record 表示 ownerTable 当前记录。\n8. 审核人等状态动作身份通过 audit.userField 表达;发起型动作的用户和时间通过 create_record.values 的 currentUserId、now 表达,均由后端登录态注入。\n9. requiredActionCodes 中的每个动作都必须在 actions 中出现,并绑定到 appBlueprint 已有页面。覆盖需求中的完整正向闭环、业务发起动作和关键回退/拒绝动作,但不要为无业务语义的普通 CRUD 创建 action。\n10. metrics.status 如果填写,必须完全等于 states 中某个 code统计全状态数据或不能确定状态时省略 status。\n11. 每个面向用户或管理员的显式动作必须有 button。button.pageCode 必须引用 appBlueprint 中已有页面button.tableName 必须是该页面绑定表,省略时等于 ownerTablebutton.slot 只能是 list.toolbarActions、list.rowActions、detail.primaryActions、detail.secondaryActions、form.footerActions。详情页主操作使用 detail.primaryActions列表记录操作使用 list.rowActions禁止使用 page.actions 等自定义值。', '{\"mode\":\"generate\",\"projectName\":\"图书管理系统\",\"projectDescription\":\"功能:借书、还书、预约、取消预约\\n角色用户、管理员\\n其他模块轮播图、公告、新闻\",\"industryTemplate\":\"\",\"stylePreset\":\"dark-tech\",\"extraRequirements\":\"\",\"requiredActionCodes\":[\"cancel_reservation\",\"reserve_book\",\"borrow_book\",\"return_book\"],\"confirmedAppBlueprint\":{\"adminHomeDashboard\":{\"charts\":[{\"filters\":[],\"metrics\":[{\"aggregate\":\"count\"}],\"semantic\":\"order\",\"type\":\"line\"},{\"filters\":[],\"metrics\":[{\"aggregate\":\"count\"}],\"semantic\":\"inventory\",\"type\":\"pie\"}],\"description\":\"核心业务数据\",\"metrics\":[{\"aggregate\":\"count\",\"filters\":[],\"semantic\":\"inventory\"},{\"aggregate\":\"count\",\"filters\":[],\"semantic\":\"order\"},{\"aggregate\":\"count\",\"filters\":[],\"semantic\":\"order\"},{\"aggregate\":\"count\",\"filters\":[],\"semantic\":\"order\"}],\"title\":\"运营总览\"},\"adminMenus\":[{\"code\":\"book_admin\",\"dataScope\":\"ROLE\",\"name\":\"图书管理\",\"pageCode\":\"book_admin_page\",\"pageType\":\"list\",\"path\":\"/admin/books\",\"requiresLogin\":true,\"tableName\":\"book_info\",\"visibleRoles\":[\"admin\"]},{\"code\":\"borrowing_admin\",\"dataScope\":\"ROLE\",\"name\":\"借阅管理\",\"pageCode\":\"borrowing_admin_page\",\"pageType\":\"list\",\"path\":\"/admin/borrowings\",\"requiresLogin\":true,\"tableName\":\"borrowing\",\"visibleRoles\":[\"admin\"]},{\"code\":\"reservation_admin\",\"dataScope\":\"ROLE\",\"name\":\"预约管理\",\"pageCode\":\"reservation_admin_page\",\"pageType\":\"list\",\"path\":\"/admin/reservations\",\"requiresLogin\":true,\"tableName\":\"reservation\",\"visibleRoles\":[\"admin\"]},{\"code\":\"banner_admin\",\"dataScope\":\"ROLE\",\"name\":\"轮播图管理\",\"pageCode\":\"banner_admin_page\",\"pageType\":\"list\",\"path\":\"/admin/banners\",\"requiresLogin\":true,\"tableName\":\"banner\",\"visibleRoles\":[\"admin\"]},{\"code\":\"announcement_admin\",\"dataScope\":\"ROLE\",\"name\":\"公告管理\",\"pageCode\":\"announcement_admin_page\",\"pageType\":\"list\",\"path\":\"/admin/announcements\",\"requiresLogin\":true,\"tableName\":\"announcement\",\"visibleRoles\":[\"admin\"]},{\"code\":\"news_admin\",\"dataScope\":\"ROLE\",\"name\":\"新闻管理\",\"pageCode\":\"news_admin_page\",\"pageType\":\"list\",\"path\":\"/admin/news\",\"requiresLogin\":true,\"tableName\":\"news\",\"visibleRoles\":[\"admin\"]},{\"code\":\"admin_profile\",\"dataScope\":\"CURRENT_USER\",\"name\":\"个人资料\",\"pageCode\":\"admin_profile_page\",\"pageType\":\"form\",\"path\":\"/admin/profile\",\"requiresLogin\":true,\"tableName\":\"admin\",\"visibleRoles\":[\"admin\"]}],\"frontendMenus\":[{\"code\":\"book_catalog\",\"dataScope\":\"PUBLIC\",\"name\":\"图书目录\",\"pageCode\":\"book_catalog_page\",\"pageType\":\"\",\"path\":\"/books\",\"requiresLogin\":false,\"tableName\":\"\",\"visibleRoles\":[]},{\"code\":\"my_borrowings\",\"dataScope\":\"CURRENT_USER\",\"name\":\"我的借阅\",\"pageCode\":\"my_borrowings_page\",\"pageType\":\"\",\"path\":\"/my/borrowings\",\"requiresLogin\":true,\"tableName\":\"\",\"visibleRoles\":[\"reader\"]},{\"code\":\"my_reservations\",\"dataScope\":\"CURRENT_USER\",\"name\":\"我的预约\",\"pageCode\":\"my_reservations_page\",\"pageType\":\"\",\"path\":\"/my/reservations\",\"requiresLogin\":true,\"tableName\":\"\",\"visibleRoles\":[\"reader\"]},{\"code\":\"reader_profile\",\"dataScope\":\"CURRENT_USER\",\"name\":\"个人资料\",\"pageCode\":\"reader_profile_page\",\"pageType\":\"\",\"path\":\"/reader/profile\",\"requiresLogin\":true,\"tableName\":\"\",\"visibleRoles\":[\"reader\"]}],\"frontendPages\":[{\"code\":\"book_catalog_page\",\"menuCode\":\"book_catalog\",\"name\":\"图书目录\",\"pageType\":\"list\",\"parentPageCode\":\"\",\"path\":\"/books\",\"tableName\":\"book_info\"},{\"code\":\"my_borrowings_page\",\"menuCode\":\"my_borrowings\",\"name\":\"我的借阅\",\"pageType\":\"current_user_list\",\"parentPageCode\":\"\",\"path\":\"/my/borrowings\",\"tableName\":\"borrowing\"},{\"code\":\"my_reservations_page\",\"menuCode\":\"my_reservations\",\"name\":\"我的预约\",\"pageType\":\"current_user_list\",\"parentPageCode\":\"\",\"path\":\"/my/reservations\",\"tableName\":\"reservation\"},{\"code\":\"reader_profile_page\",\"menuCode\":\"reader_profile\",\"name\":\"个人资料\",\"pageType\":\"form\",\"parentPageCode\":\"\",\"path\":\"/reader/profile\",\"tableName\":\"reader\"}],\"roles\":[{\"code\":\"admin\",\"description\":\"系统管理员,负责图书、借阅、预约、轮播图、公告、新闻等模块的后台管理。\",\"name\":\"管理员\"},{\"code\":\"reader\",\"description\":\"普通读者,可浏览图书、借书、还书、预约、取消预约,管理个人资料。\",\"name\":\"读者\"}]}}', '{\n \"version\": \"1.1\",\n \"code\": \"library_circulation\",\n \"name\": \"图书流通\",\n \"flows\": [\n {\n \"code\": \"reservation_flow\",\n \"name\": \"图书预约\",\n \"mainTable\": \"reservation\",\n \"statusField\": \"status\",\n \"notFoundMessage\": \"预约记录不存在\",\n \"states\": [\n { \"code\": \"pending\", \"label\": \"待处理\" },\n { \"code\": \"cancelled\", \"label\": \"已取消\" }\n ],\n \"actions\": [\n {\n \"code\": \"reserve_book\",\n \"name\": \"预约\",\n \"actor\": \"reader\",\n \"ownerTable\": \"book_info\",\n \"requestFields\": [\"id\"],\n \"method\": \"POST\",\n \"path\": \"/book-info/reserve\",\n \"successMessage\": \"预约成功\",\n \"effects\": [\n {\n \"type\": \"create_record\",\n \"table\": \"reservation\",\n \"values\": {\n \"book_id\": \"record.id\",\n \"reader_id\": \"currentUserId\",\n \"status\": \"pending\",\n \"reserve_date\": \"now\"\n }\n }\n ],\n \"button\": {\n \"scope\": \"reader\",\n \"pageCode\": \"book_catalog_page\",\n \"tableName\": \"book_info\",\n \"slot\": \"list.rowActions\",\n \"type\": \"primary\",\n \"confirm\": \"确认预约吗?\",\n \"order\": 10\n }\n },\n {\n \"code\": \"cancel_reservation\",\n \"name\": \"取消预约\",\n \"from\": \"pending\",\n \"to\": \"cancelled\",\n \"actor\": \"reader\",\n \"ownerTable\": \"reservation\",\n \"requestFields\": [\"id\"],\n \"method\": \"POST\",\n \"path\": \"/reservation/cancel\",\n \"button\": {\n \"scope\": \"reader\",\n \"pageCode\": \"my_reservations_page\",\n \"tableName\": \"reservation\",\n \"slot\": \"list.rowActions\",\n \"type\": \"danger\",\n \"confirm\": \"确认取消预约吗?\",\n \"order\": 10\n }\n }\n ],\n \"metrics\": []\n },\n {\n \"code\": \"borrowing_flow\",\n \"name\": \"图书借阅\",\n \"mainTable\": \"borrowing\",\n \"statusField\": \"status\",\n \"notFoundMessage\": \"借阅记录不存在\",\n \"states\": [\n { \"code\": \"borrowing\", \"label\": \"借阅中\" },\n { \"code\": \"returned\", \"label\": \"已归还\" }\n ],\n \"actions\": [\n {\n \"code\": \"borrow_book\",\n \"name\": \"借书\",\n \"actor\": \"reader\",\n \"ownerTable\": \"book_info\",\n \"requestFields\": [\"id\"],\n \"method\": \"POST\",\n \"path\": \"/book-info/borrow\",\n \"successMessage\": \"借书成功\",\n \"effects\": [\n {\n \"type\": \"create_record\",\n \"table\": \"borrowing\",\n \"values\": {\n \"book_id\": \"record.id\",\n \"reader_id\": \"currentUserId\",\n \"status\": \"borrowing\",\n \"borrow_date\": \"now\"\n }\n },\n {\n \"type\": \"decrease\",\n \"table\": \"book_info\",\n \"relationField\": \"id\",\n \"field\": \"stock\",\n \"amount\": \"1\",\n \"min\": \"0\",\n \"errorMessage\": \"图书库存不足\"\n }\n ],\n \"button\": {\n \"scope\": \"reader\",\n \"pageCode\": \"book_catalog_page\",\n \"tableName\": \"book_info\",\n \"slot\": \"list.rowActions\",\n \"type\": \"success\",\n \"confirm\": \"确认借书吗?\",\n \"order\": 20\n }\n },\n {\n \"code\": \"return_book\",\n \"name\": \"还书\",\n \"from\": \"borrowing\",\n \"to\": \"returned\",\n \"actor\": \"reader\",\n \"ownerTable\": \"borrowing\",\n \"requestFields\": [\"id\"],\n \"method\": \"POST\",\n \"path\": \"/borrowing/return\",\n \"effects\": [\n {\n \"type\": \"increase\",\n \"table\": \"book_info\",\n \"relationField\": \"book_id\",\n \"field\": \"stock\",\n \"amount\": \"1\"\n }\n ],\n \"button\": {\n \"scope\": \"reader\",\n \"pageCode\": \"my_borrowings_page\",\n \"tableName\": \"borrowing\",\n \"slot\": \"list.rowActions\",\n \"type\": \"primary\",\n \"confirm\": \"确认还书吗?\",\n \"order\": 10\n }\n }\n ],\n \"metrics\": [\n {\n \"code\": \"borrowing_count\",\n \"name\": \"借阅中数量\",\n \"table\": \"borrowing\",\n \"aggregate\": \"count\",\n \"field\": \"id\",\n \"status\": \"borrowing\",\n \"unit\": \"条\"\n }\n ]\n }\n ]\n}', '0', 15763, 2472, NULL, 2472, 2077, 951, 2472, 2077, 4549, 1, 0.00662600, '1', NULL, '2026-07-15 10:58:51');
INSERT INTO `front_ai_usage_ledger` VALUES (160, 116, 116, 111, 100, 'database', 'deepseek', 'deepseek-v4-flash', 'front.database', 'V2', 'c7d0a32ce0b0055ac80348fb10c1beb758034b9c5b5637694725425bb7937cbc', '你是 MySQL 业务数据库设计专家。只输出符合用户消息结构的 JSON根据已确认的应用蓝图和业务闭环生成可直接落地的表、字段、主外键、字典和表操作策略。字段必须业务化且类型合法所有蓝图与闭环引用必须有真实表字段承载不得生成菜单、权限关系、代码或业务动作。flowConfig.actions[].audit 中非空的 userField 和 timeField 必须是 mainTable 的真实字段userField 使用 bigint(20)timeField 使用 datetime。', '根据项目输入 JSON 生成 MySQL 数据库设计 JSON只返回 JSON不要 Markdown 围栏或解释。\nConfirmed app blueprint JSON and Confirmed business loop plan JSON are supplied in the input.\nDatabase generation constraints from the business loop plan must be enforced.\nEvery confirmedBusinessLoopPlan.metrics tableName, field, and filters.field must exist in the generated schema. Numeric sum/avg/min/max metric fields must use a compatible numeric column type. Status-filter metric values must remain compatible with the matching stateMachines.states.\nIf input.mode is correction, repair input.originalResponse according to input.validationError and return the complete corrected database JSON. Do not drop unrelated valid tables or fields.\n输出结构{\"tables\":[{\"tableName\":\"car_info\",\"tableComment\":\"车辆信息表\",\"adminMenuName\":\"车辆管理\",\"operations\":{\"add\":true,\"edit\":true,\"remove\":true,\"removeType\":\"physical\",\"reason\":\"\"},\"columns\":[{\"columnName\":\"id\",\"columnLabel\":\"ID\",\"columnComment\":\"主键ID\",\"columnType\":\"bigint(20)\",\"isPk\":\"1\",\"isIncrement\":\"1\",\"isRequired\":\"1\"}]}]}。\n不要使用 field_1 等占位字段;每个表必须包含非空 columns以及 adminMenuName 和 operations.add/edit/remove/removeType/reason。\nadminMenuName 必须来自本表 tableComment/tableName不得复用其他表或宽泛模块名称。\nadminMenuName must come from that table\'s own tableComment or tableName.\n字段数组名称只能是 columns不能使用 fields、fieldDesign、fieldList、columnList。\nEvery table must include a non-empty columns array; use columns exactly.\n每个字段必须包含 columnName、columnLabel、columnComment、columnType、isPk、isIncrement、isRequired。columnLabel 是短 UI 标签columnComment 是完整数据库说明。\n可提供 javaType、htmlTypehtmlType 只能是 input、textarea、select、radio、checkbox、datetime、imageUpload、fileUpload、editor。\nselect/radio/checkbox 应提供 dictType 和 dictOptions。关联选择使用 remote:target_table:value_field:label_field且目标表和值/标签字段必须都存在于本次 tables JSON。\n非主键外键字段应在目标表存在时使用 remote select无目标表的分类、类型、状态使用本地 dictOptions 或普通输入。\n普通主数据表除唯一主键外至少包含 4 个业务字段。\n订单、支付、借还、审批、流程、任务、库存记录等动作记录表使用仅新增关系、审计、日志、历史表使用只读普通主数据表使用完整 CRUD。\n不要生成 businessActions、业务动作、工作流、代码、菜单表、user_role、角色权限表或权限表。\nDo not generate menu tables, user_role tables, role-permission tables, or permission tables.\n表名字段名只使用小写字母、数字、下划线每表必须且只能有一个主键。字段类型只能使用 bigint(20)、int(11)、varchar(n)、char(n)、decimal(p,s)、datetime、date、text、longtext。\n为 confirmedAppBlueprint.roles 中每个角色创建独立账号表admin 使用 admin其他角色使用 role.code。不得使用共享用户表或 role_id/role_code/user_role。\n角色账号表包含 `<role_code>_id` 自增主键、username、password_hash、nickname、status、create_time。admin 只能登录后台,非 admin 角色登录前台。\n生成 frontendPages.tableName 引用的全部表;个人资料页必须绑定对应非 admin 角色账号表。requiresLogin=true 且 dataScope=CURRENT_USER 的业务数据通常包含 user_id。\ncanonicalTableRegistry 中的名称是最终规范表名。confirmedBusinessLoopPlan 若出现与其指向同一业务对象的同义表名,必须使用 canonicalTableRegistry 中的名称,不得同时生成两张同义表。\n根据 confirmedBusinessLoopPlan 创建 coreObjects.tableName、actions.ownerTable补齐 stateMachines.statusField、quantityRules.quantityField 以及 recordRules 和动作前置条件需要的字段。状态值不得超出 stateMachines.states。\n严格实现 confirmedBusinessLoopPlan.businessPoliciesTIME_LIMIT 的 startField、dueField 使用 datetimeOVERDUE_FEE 的 dueField 使用 datetime、daysTargetField 使用 int(11)、targetField 使用 decimal(10,2)QUANTITY_LIMIT 的 targetField 使用 int(11) 且默认值为 0。所有政策字段必须位于政策指定的 tableName禁止只把期限或公式写进 columnComment 而不创建字段。\nDo not invent status values outside stateMachines.states.\n严格遵守 input.limits.maxTables 和 maxColumnsPerTable。\n项目输入 JSON\n{\"mode\":\"generate\",\"projectName\":\"图书管理系统\",\"projectDescription\":\"功能:借书、还书、预约、取消预约\\n角色用户、管理员\\n其他模块轮播图、公告、新闻\",\"industryTemplate\":\"\",\"stylePreset\":\"dark-tech\",\"extraRequirements\":\"\",\"confirmedAppBlueprint\":{\"adminHomeDashboard\":{\"charts\":[{\"filters\":[],\"metrics\":[{\"aggregate\":\"count\"}],\"semantic\":\"order\",\"type\":\"line\"},{\"filters\":[],\"metrics\":[{\"aggregate\":\"count\"}],\"semantic\":\"inventory\",\"type\":\"pie\"}],\"description\":\"核心业务数据\",\"metrics\":[{\"aggregate\":\"count\",\"filters\":[],\"semantic\":\"inventory\"},{\"aggregate\":\"count\",\"filters\":[],\"semantic\":\"order\"},{\"aggregate\":\"count\",\"filters\":[],\"semantic\":\"order\"},{\"aggregate\":\"count\",\"filters\":[],\"semantic\":\"order\"}],\"title\":\"运营总览\"},\"adminMenus\":[{\"code\":\"book_admin\",\"dataScope\":\"ROLE\",\"name\":\"图书管理\",\"pageCode\":\"book_admin_page\",\"pageType\":\"list\",\"path\":\"/admin/books\",\"requiresLogin\":true,\"tableName\":\"book_info\",\"visibleRoles\":[\"admin\"]},{\"code\":\"borrowing_admin\",\"dataScope\":\"ROLE\",\"name\":\"借阅管理\",\"pageCode\":\"borrowing_admin_page\",\"pageType\":\"list\",\"path\":\"/admin/borrowings\",\"requiresLogin\":true,\"tableName\":\"borrowing\",\"visibleRoles\":[\"admin\"]},{\"code\":\"reservation_admin\",\"dataScope\":\"ROLE\",\"name\":\"预约管理\",\"pageCode\":\"reservation_admin_page\",\"pageType\":\"list\",\"path\":\"/admin/reservations\",\"requiresLogin\":true,\"tableName\":\"reservation\",\"visibleRoles\":[\"admin\"]},{\"code\":\"banner_admin\",\"dataScope\":\"ROLE\",\"name\":\"轮播图管理\",\"pageCode\":\"banner_admin_page\",\"pageType\":\"list\",\"path\":\"/admin/banners\",\"requiresLogin\":true,\"tableName\":\"banner\",\"visibleRoles\":[\"admin\"]},{\"code\":\"announcement_admin\",\"dataScope\":\"ROLE\",\"name\":\"公告管理\",\"pageCode\":\"announcement_admin_page\",\"pageType\":\"list\",\"path\":\"/admin/announcements\",\"requiresLogin\":true,\"tableName\":\"announcement\",\"visibleRoles\":[\"admin\"]},{\"code\":\"news_admin\",\"dataScope\":\"ROLE\",\"name\":\"新闻管理\",\"pageCode\":\"news_admin_page\",\"pageType\":\"list\",\"path\":\"/admin/news\",\"requiresLogin\":true,\"tableName\":\"news\",\"visibleRoles\":[\"admin\"]},{\"code\":\"admin_profile\",\"dataScope\":\"CURRENT_USER\",\"name\":\"个人资料\",\"pageCode\":\"admin_profile_page\",\"pageType\":\"form\",\"path\":\"/admin/profile\",\"requiresLogin\":true,\"tableName\":\"admin\",\"visibleRoles\":[\"admin\"]}],\"frontendMenus\":[{\"code\":\"book_catalog\",\"dataScope\":\"PUBLIC\",\"name\":\"图书目录\",\"pageCode\":\"book_catalog_page\",\"pageType\":\"\",\"path\":\"/books\",\"requiresLogin\":false,\"tableName\":\"\",\"visibleRoles\":[]},{\"code\":\"my_borrowings\",\"dataScope\":\"CURRENT_USER\",\"name\":\"我的借阅\",\"pageCode\":\"my_borrowings_page\",\"pageType\":\"\",\"path\":\"/my/borrowings\",\"requiresLogin\":true,\"tableName\":\"\",\"visibleRoles\":[\"reader\"]},{\"code\":\"my_reservations\",\"dataScope\":\"CURRENT_USER\",\"name\":\"我的预约\",\"pageCode\":\"my_reservations_page\",\"pageType\":\"\",\"path\":\"/my/reservations\",\"requiresLogin\":true,\"tableName\":\"\",\"visibleRoles\":[\"reader\"]},{\"code\":\"reader_profile\",\"dataScope\":\"CURRENT_USER\",\"name\":\"个人资料\",\"pageCode\":\"reader_profile_page\",\"pageType\":\"\",\"path\":\"/reader/profile\",\"requiresLogin\":true,\"tableName\":\"\",\"visibleRoles\":[\"reader\"]}],\"frontendPages\":[{\"code\":\"book_catalog_page\",\"menuCode\":\"book_catalog\",\"name\":\"图书目录\",\"pageType\":\"list\",\"parentPageCode\":\"\",\"path\":\"/books\",\"tableName\":\"book_info\"},{\"code\":\"my_borrowings_page\",\"menuCode\":\"my_borrowings\",\"name\":\"我的借阅\",\"pageType\":\"current_user_list\",\"parentPageCode\":\"\",\"path\":\"/my/borrowings\",\"tableName\":\"borrowing\"},{\"code\":\"my_reservations_page\",\"menuCode\":\"my_reservations\",\"name\":\"我的预约\",\"pageType\":\"current_user_list\",\"parentPageCode\":\"\",\"path\":\"/my/reservations\",\"tableName\":\"reservation\"},{\"code\":\"reader_profile_page\",\"menuCode\":\"reader_profile\",\"name\":\"个人资料\",\"pageType\":\"form\",\"parentPageCode\":\"\",\"path\":\"/reader/profile\",\"tableName\":\"reader\"}],\"roles\":[{\"code\":\"admin\",\"description\":\"系统管理员,负责图书、借阅、预约、轮播图、公告、新闻等模块的后台管理。\",\"name\":\"管理员\"},{\"code\":\"reader\",\"description\":\"普通读者,可浏览图书、借书、还书、预约、取消预约,管理个人资料。\",\"name\":\"读者\"}]},\"flowConfig\":{\"actions\":[],\"code\":\"library_circulation\",\"flows\":[{\"actions\":[{\"actor\":\"reader\",\"button\":{\"confirm\":\"确认预约吗?\",\"order\":10,\"pageCode\":\"book_catalog_page\",\"scope\":\"reader\",\"slot\":\"list.rowActions\",\"tableName\":\"book_info\",\"type\":\"primary\"},\"code\":\"reserve_book\",\"effects\":[{\"amount\":\"1\",\"min\":\"0\",\"table\":\"reservation\",\"type\":\"create_record\",\"values\":{\"reader_id\":\"currentUserId\",\"book_id\":\"record.id\",\"reserve_date\":\"now\",\"status\":\"pending\"}}],\"method\":\"POST\",\"name\":\"预约\",\"ownerTable\":\"book_info\",\"path\":\"/book-info/reserve\",\"requestFields\":[\"id\"],\"successMessage\":\"预约成功\"},{\"actor\":\"reader\",\"button\":{\"confirm\":\"确认取消预约吗?\",\"order\":10,\"pageCode\":\"my_reservations_page\",\"scope\":\"reader\",\"slot\":\"list.rowActions\",\"tableName\":\"reservation\",\"type\":\"danger\"},\"code\":\"cancel_reservation\",\"effects\":[],\"from\":\"pending\",\"method\":\"POST\",\"name\":\"取消预约\",\"ownerTable\":\"reservation\",\"path\":\"/reservation/cancel\",\"requestFields\":[\"id\"],\"to\":\"cancelled\"}],\"code\":\"reservation_flow\",\"flows\":[],\"mainTable\":\"reservation\",\"metrics\":[],\"name\":\"图书预约\",\"notFoundMessage\":\"预约记录不存在\",\"states\":[{\"code\":\"pending\",\"label\":\"待处理\"},{\"code\":\"cancelled\",\"label\":\"已取消\"}],\"statusField\":\"status\",\"version\":\"1.1\"},{\"actions\":[{\"actor\":\"reader\",\"button\":{\"confirm\":\"确认借书吗?\",\"order\":20,\"pageCode\":\"book_catalog_page\",\"scope\":\"reader\",\"slot\":\"list.rowActions\",\"tableName\":\"book_info\",\"type\":\"success\"},\"code\":\"borrow_book\",\"effects\":[{\"amount\":\"1\",\"min\":\"0\",\"table\":\"borrowing\",\"type\":\"create_record\",\"values\":{\"reader_id\":\"currentUserId\",\"borrow_date\":\"now\",\"book_id\":\"record.id\",\"status\":\"borrowing\"}},{\"amount\":\"1\",\"errorMessage\":\"图书库存不足\",\"field\":\"stock\",\"min\":\"0\",\"relationField\":\"id\",\"table\":\"book_info\",\"type\":\"decrease\",\"values\":{}}],\"method\":\"POST\",\"name\":\"借书\",\"ownerTable\":\"book_info\",\"path\":\"/book-info/borrow\",\"requestFields\":[\"id\"],\"successMessage\":\"借书成功\"},{\"actor\":\"reader\",\"button\":{\"confirm\":\"确认还书吗?\",\"order\":10,\"pageCode\":\"my_borrowings_page\",\"scope\":\"reader\",\"slot\":\"list.rowActions\",\"tableName\":\"borrowing\",\"type\":\"primary\"},\"code\":\"return_book\",\"effects\":[{\"amount\":\"1\",\"field\":\"stock\",\"min\":\"0\",\"relationField\":\"book_id\",\"table\":\"book_info\",\"type\":\"increase\",\"values\":{}}],\"from\":\"borrowing\",\"method\":\"POST\",\"name\":\"还书\",\"ownerTable\":\"borrowing\",\"path\":\"/borrowing/return\",\"requestFields\":[\"id\"],\"to\":\"returned\"}],\"code\":\"borrowing_flow\",\"flows\":[],\"mainTable\":\"borrowing\",\"metrics\":[{\"aggregate\":\"count\",\"code\":\"borrowing_count\",\"field\":\"id\",\"name\":\"借阅中数量\",\"status\":\"borrowing\",\"table\":\"borrowing\",\"unit\":\"条\"}],\"name\":\"图书借阅\",\"notFoundMessage\":\"借阅记录不存在\",\"states\":[{\"code\":\"borrowing\",\"label\":\"借阅中\"},{\"code\":\"returned\",\"label\":\"已归还\"}],\"statusField\":\"status\",\"version\":\"1.1\"}],\"metrics\":[],\"name\":\"图书流通\",\"states\":[],\"statusField\":\"status\",\"version\":\"1.1\"},\"compiledFlowContract\":{\"acceptanceScenarios\":[],\"actions\":[{\"actor\":\"reader\",\"code\":\"reserve_book\",\"name\":\"预约\",\"ownerObject\":\"book_info\",\"ownerTable\":\"book_info\",\"preconditions\":[],\"quantityEffects\":[],\"recordEffects\":[{\"actionCode\":\"reserve_book\",\"objectCode\":\"reservation\",\"operation\":\"INSERT_ROW\",\"tableName\":\"reservation\"}],\"required\":true,\"stateTransitions\":[]},{\"actor\":\"reader\",\"code\":\"cancel_reservation\",\"name\":\"取消预约\",\"ownerObject\":\"reservation\",\"ownerTable\":\"reservation\",\"preconditions\":[],\"quantityEffects\":[],\"recordEffects\":[],\"required\":true,\"stateTransitions\":[{\"actionCode\":\"cancel_reservation\",\"fromState\":\"pending\",\"toState\":\"cancelled\"}]},{\"actor\":\"reader\",\"code\":\"borrow_book\",\"name\":\"借书\",\"ownerObject\":\"book_info\",\"ownerTable\":\"book_info\",\"preconditions\":[],\"quantityEffects\":[{\"actionCode\":\"borrow_book\",\"amount\":\"1\",\"effectType\":\"decrease\",\"objectCode\":\"book_info\",\"quantityField\":\"stock\",\"tableName\":\"book_info\"}],\"recordEffects\":[{\"actionCode\":\"borrow_book\",\"objectCode\":\"borrowing\",\"operation\":\"INSERT_ROW\",\"tableName\":\"borrowing\"}],\"required\":true,\"stateTransitions\":[]},{\"actor\":\"reader\",\"code\":\"return_book\",\"name\":\"还书\",\"ownerObject\":\"borrowing\",\"ownerTable\":\"borrowing\",\"preconditions\":[],\"quantityEffects\":[{\"actionCode\":\"return_book\",\"amount\":\"1\",\"effectType\":\"increase\",\"objectCode\":\"book_info\",\"quantityField\":\"stock\",\"tableName\":\"book_info\"}],\"recordEffects\":[],\"required\":true,\"stateTransitions\":[{\"actionCode\":\"return_book\",\"fromState\":\"borrowing\",\"toState\":\"returned\"}]}],\"businessPolicies\":[],\"coreObjects\":[{\"code\":\"reservation\",\"name\":\"图书预约\",\"objectType\":\"main\",\"tableName\":\"reservation\"},{\"code\":\"book_info\",\"name\":\"预约\",\"objectType\":\"related\",\"tableName\":\"book_info\"},{\"code\":\"borrowing\",\"name\":\"图书借阅\",\"objectType\":\"main\",\"tableName\":\"borrowing\"}],\"domainName\":\"图书流通\",\"metrics\":[{\"aggregate\":\"count\",\"code\":\"borrowing_count\",\"field\":\"id\",\"filters\":[{\"field\":\"status\",\"operator\":\"eq\",\"values\":[\"borrowing\"]}],\"name\":\"借阅中数量\",\"relatedActionCodes\":[],\"required\":true,\"tableName\":\"borrowing\",\"unit\":\"条\"}],\"pageBindings\":[{\"actionCode\":\"reserve_book\",\"pageCode\":\"book_catalog_page\",\"slot\":\"list.rowActions\",\"tableName\":\"book_info\",\"target\":\"frontend\"},{\"actionCode\":\"cancel_reservation\",\"pageCode\":\"my_reservations_page\",\"slot\":\"list.rowActions\",\"tableName\":\"reservation\",\"target\":\"frontend\"},{\"actionCode\":\"borrow_book\",\"pageCode\":\"book_catalog_page\",\"slot\":\"list.rowActions\",\"tableName\":\"book_info\",\"target\":\"frontend\"},{\"actionCode\":\"return_book\",\"pageCode\":\"my_borrowings_page\",\"slot\":\"list.rowActions\",\"tableName\":\"borrowing\",\"target\":\"frontend\"}],\"quantityRules\":[{\"actionCode\":\"borrow_book\",\"amount\":\"1\",\"effectType\":\"decrease\",\"objectCode\":\"book_info\",\"quantityField\":\"stock\",\"tableName\":\"book_info\"},{\"actionCode\":\"return_book\",\"amount\":\"1\",\"effectType\":\"increase\",\"objectCode\":\"book_info\",\"quantityField\":\"stock\",\"tableName\":\"book_info\"}],\"recordRules\":[{\"actionCode\":\"reserve_book\",\"objectCode\":\"reservation\",\"operation\":\"INSERT_ROW\",\"tableName\":\"reservation\"},{\"actionCode\":\"borrow_book\",\"objectCode\":\"borrowing\",\"operation\":\"INSERT_ROW\",\"tableName\":\"borrowing\"}],\"stateMachines\":[{\"objectCode\":\"reservation\",\"states\":[\"pending\",\"cancelled\"],\"statusField\":\"status\",\"tableName\":\"reservation\",\"transitions\":[{\"actionCode\":\"cancel_reservation\",\"fromState\":\"pending\",\"toState\":\"cancelled\"}]},{\"objectCode\":\"borrowing\",\"states\":[\"borrowing\",\"returned\"],\"statusField\":\"status\",\"tableName\":\"borrowing\",\"transitions\":[{\"actionCode\":\"return_book\",\"fromState\":\"borrowing\",\"toState\":\"returned\"}]}]},\"canonicalTableRegistry\":[\"book_info\",\"borrowing\",\"reservation\",\"reader\",\"banner\",\"announcement\",\"news\",\"admin\"],\"limits\":{\"maxTables\":12,\"maxColumnsPerTable\":30}}', '{\n \"tables\": [\n {\n \"tableName\": \"book_info\",\n \"tableComment\": \"图书信息表\",\n \"adminMenuName\": \"图书信息\",\n \"operations\": {\n \"add\": true,\n \"edit\": true,\n \"remove\": true,\n \"removeType\": \"physical\",\n \"reason\": \"\"\n },\n \"columns\": [\n {\n \"columnName\": \"id\",\n \"columnLabel\": \"ID\",\n \"columnComment\": \"主键ID\",\n \"columnType\": \"bigint(20)\",\n \"isPk\": \"1\",\n \"isIncrement\": \"1\",\n \"isRequired\": \"1\"\n },\n {\n \"columnName\": \"title\",\n \"columnLabel\": \"书名\",\n \"columnComment\": \"书名\",\n \"columnType\": \"varchar(200)\",\n \"isPk\": \"0\",\n \"isIncrement\": \"0\",\n \"isRequired\": \"1\",\n \"htmlType\": \"input\"\n },\n {\n \"columnName\": \"author\",\n \"columnLabel\": \"作者\",\n \"columnComment\": \"作者\",\n \"columnType\": \"varchar(100)\",\n \"isPk\": \"0\",\n \"isIncrement\": \"0\",\n \"isRequired\": \"1\",\n \"htmlType\": \"input\"\n },\n {\n \"columnName\": \"isbn\",\n \"columnLabel\": \"ISBN\",\n \"columnComment\": \"国际标准书号\",\n \"columnType\": \"varchar(20)\",\n \"isPk\": \"0\",\n \"isIncrement\": \"0\",\n \"isRequired\": \"1\",\n \"htmlType\": \"input\"\n },\n {\n \"columnName\": \"publisher\",\n \"columnLabel\": \"出版社\",\n \"columnComment\": \"出版社\",\n \"columnType\": \"varchar(100)\",\n \"isPk\": \"0\",\n \"isIncrement\": \"0\",\n \"isRequired\": \"0\",\n \"htmlType\": \"input\"\n },\n {\n \"columnName\": \"publish_date\",\n \"columnLabel\": \"出版日期\",\n \"columnComment\": \"出版日期\",\n \"columnType\": \"date\",\n \"isPk\": \"0\",\n \"isIncrement\": \"0\",\n \"isRequired\": \"0\",\n \"htmlType\": \"date\"\n },\n {\n \"columnName\": \"stock\",\n \"columnLabel\": \"库存\",\n \"columnComment\": \"当前库存数量(不能为负)\",\n \"columnType\": \"int(11)\",\n \"isPk\": \"0\",\n \"isIncrement\": \"0\",\n \"isRequired\": \"1\",\n \"htmlType\": \"input\",\n \"javaType\": \"Integer\"\n },\n {\n \"columnName\": \"description\",\n \"columnLabel\": \"简介\",\n \"columnComment\": \"图书简介\",\n \"columnType\": \"text\",\n \"isPk\": \"0\",\n \"isIncrement\": \"0\",\n \"isRequired\": \"0\",\n \"htmlType\": \"textarea\"\n },\n {\n \"columnName\": \"cover_url\",\n \"columnLabel\": \"封面图片\",\n \"columnComment\": \"封面图片URL\",\n \"columnType\": \"varchar(500)\",\n \"isPk\": \"0\",\n \"isIncrement\": \"0\",\n \"isRequired\": \"0\",\n \"htmlType\": \"imageUpload\"\n }\n ]\n },\n {\n \"tableName\": \"borrowing\",\n \"tableComment\": \"借阅记录表\",\n \"adminMenuName\": \"借阅记录\",\n \"operations\": {\n \"add\": true,\n \"edit\": false,\n \"remove\": false,\n \"removeType\": \"\",\n \"reason\": \"仅新增\"\n },\n \"columns\": [\n {\n \"columnName\": \"id\",\n \"columnLabel\": \"ID\",\n \"columnComment\": \"主键ID\",\n \"columnType\": \"bigint(20)\",\n \"isPk\": \"1\",\n \"isIncrement\": \"1\",\n \"isRequired\": \"1\"\n },\n {\n \"columnName\": \"reader_id\",\n \"columnLabel\": \"读者\",\n \"columnComment\": \"借书读者ID关联读者账号表\",\n \"columnType\": \"bigint(20)\",\n \"isPk\": \"0\",\n \"isIncrement\": \"0\",\n \"isRequired\": \"1\",\n \"htmlType\": \"select\",\n \"dictType\": \"remote:reader:reader_id:nickname\"\n },\n {\n \"columnName\": \"book_id\",\n \"columnLabel\": \"图书\",\n \"columnComment\": \"借阅图书ID关联图书信息表\",\n \"columnType\": \"bigint(20)\",\n \"isPk\": \"0\",\n \"isIncrement\": \"0\",\n \"isRequired\": \"1\",\n \"htmlType\": \"select\",\n \"dictType\": \"remote:book_info:id:title\"\n },\n {\n \"columnName\": \"borrow_date\",\n \"columnLabel\": \"借书日期\",\n \"columnComment\": \"借书日期\",\n \"columnType\": \"datetime\",\n \"isPk\": \"0\",\n \"isIncrement\": \"0\",\n \"isRequired\": \"1\",\n \"htmlType\": \"datetime\"\n },\n {\n \"columnName\": \"return_date\",\n \"columnLabel\": \"还书日期\",\n \"columnComment\": \"实际还书日期,可为空\",\n \"columnType\": \"datetime\",\n \"isPk\": \"0\",\n \"isIncrement\": \"0\",\n \"isRequired\": \"0\",\n \"htmlType\": \"datetime\"\n },\n {\n \"columnName\": \"status\",\n \"columnLabel\": \"状态\",\n \"columnComment\": \"借阅状态borrowing/returned\",\n \"columnType\": \"varchar(20)\",\n \"isPk\": \"0\",\n \"isIncrement\": \"0\",\n \"isRequired\": \"1\",\n \"htmlType\": \"select\",\n \"dictType\": \"borrowing_status\",\n \"dictOptions\": [\n {\n \"value\": \"borrowing\",\n \"label\": \"借阅中\"\n },\n {\n \"value\": \"returned\",\n \"label\": \"已归还\"\n }\n ]\n },\n {\n \"columnName\": \"create_time\",\n \"columnLabel\": \"创建时间\",\n \"columnComment\": \"记录创建时间\",\n \"columnType\": \"datetime\",\n \"isPk\": \"0\",\n \"isIncrement\": \"0\",\n \"isRequired\": \"1\",\n \"htmlType\": \"datetime\"\n }\n ]\n },\n {\n \"tableName\": \"reservation\",\n \"tableComment\": \"预约记录表\",\n \"adminMenuName\": \"预约记录\",\n \"operations\": {\n \"add\": true,\n \"edit\": false,\n \"remove\": false,\n \"removeType\": \"\",\n \"reason\": \"仅新增\"\n },\n \"columns\": [\n {\n \"columnName\": \"id\",\n \"columnLabel\": \"ID\",\n \"columnComment\": \"主键ID\",\n \"columnType\": \"bigint(20)\",\n \"isPk\": \"1\",\n \"isIncrement\": \"1\",\n \"isRequired\": \"1\"\n },\n {\n \"columnName\": \"reader_id\",\n \"columnLabel\": \"读者\",\n \"columnComment\": \"预约读者ID关联读者账号表\",\n \"columnType\": \"bigint(20)\",\n \"isPk\": \"0\",\n \"isIncrement\": \"0\",\n \"isRequired\": \"1\",\n \"htmlType\": \"select\",\n \"dictType\": \"remote:reader:reader_id:nickname\"\n },\n {\n \"columnName\": \"book_id\",\n \"columnLabel\": \"图书\",\n \"columnComment\": \"预约图书ID关联图书信息表\",\n \"columnType\": \"bigint(20)\",\n \"isPk\": \"0\",\n \"isIncrement\": \"0\",\n \"isRequired\": \"1\",\n \"htmlType\": \"select\",\n \"dictType\": \"remote:book_info:id:title\"\n },\n {\n \"columnName\": \"reserve_date\",\n \"columnLabel\": \"预约日期\",\n \"columnComment\": \"预约日期\",\n \"columnType\": \"datetime\",\n \"isPk\": \"0\",\n \"isIncrement\": \"0\",\n \"isRequired\": \"1\",\n \"htmlType\": \"datetime\"\n },\n {\n \"columnName\": \"cancel_date\",\n \"columnLabel\": \"取消日期\",\n \"columnComment\": \"取消预约日期,可为空\",\n \"columnType\": \"datetime\",\n \"isPk\": \"0\",\n \"isIncrement\": \"0\",\n \"isRequired\": \"0\",\n \"htmlType\": \"datetime\"\n },\n {\n \"columnName\": \"status\",\n \"columnLabel\": \"状态\",\n \"columnComment\": \"预约状态pending/cancelled\",\n \"columnType\": \"varchar(20)\",\n \"isPk\": \"0\",\n \"isIncrement\": \"0\",\n \"isRequired\": \"1\",\n \"htmlType\": \"select\",\n \"dictType\": \"reservation_status\",\n \"dictOptions\": [\n {\n \"value\": \"pending\",\n \"label\": \"待处理\"\n },\n {\n \"value\": \"cancelled\",\n \"label\": \"已取消\"\n }\n ]\n },\n {\n \"columnName\": \"create_time\",\n \"columnLabel\": \"创建时间\",\n \"columnComment\": \"记录创建时间\",\n \"columnType\": \"datetime\",\n \"isPk\": \"0\",\n \"isIncrement\": \"0\",\n \"isRequired\": \"1\",\n \"htmlType\": \"datetime\"\n }\n ]\n },\n {\n \"tableName\": \"reader\",\n \"tableComment\": \"读者账号表\",\n \"adminMenuName\": \"读者账号\",\n \"operations\": {\n \"add\": false,\n \"edit\": true,\n \"remove\": false,\n \"removeType\": \"\",\n \"reason\": \"读者账号由系统管理,不支持新增和删除\"\n },\n \"columns\": [\n {\n \"columnName\": \"reader_id\",\n \"columnLabel\": \"读者ID\",\n \"columnComment\": \"主键ID\",\n \"columnType\": \"bigint(20)\",\n \"isPk\": \"1\",\n \"isIncrement\": \"1\",\n \"isRequired\": \"1\"\n },\n {\n \"columnName\": \"username\",\n \"columnLabel\": \"用户名\",\n \"columnComment\": \"登录用户名,唯一\",\n \"columnType\": \"varchar(50)\",\n \"isPk\": \"0\",\n \"isIncrement\": \"0\",\n \"isRequired\": \"1\",\n \"htmlType\": \"input\"\n },\n {\n \"columnName\": \"password_hash\",\n \"columnLabel\": \"密码hash\",\n \"columnComment\": \"加密后的密码\",\n \"columnType\": \"varchar(255)\",\n \"isPk\": \"0\",\n \"isIncrement\": \"0\",\n \"isRequired\": \"1\",\n \"htmlType\": \"input\"\n },\n {\n \"columnName\": \"nickname\",\n \"columnLabel\": \"昵称\",\n \"columnComment\": \"显示昵称\",\n \"columnType\": \"varchar(100)\",\n \"isPk\": \"0\",\n \"isIncrement\": \"0\",\n \"isRequired\": \"1\",\n \"htmlType\": \"input\"\n },\n {\n \"columnName\": \"status\",\n \"columnLabel\": \"状态\",\n \"columnComment\": \"账号状态active/inactive\",\n \"columnType\": \"varchar(20)\",\n \"isPk\": \"0\",\n \"isIncrement\": \"0\",\n \"isRequired\": \"1\",\n \"htmlType\": \"select\",\n \"dictType\": \"account_status\",\n \"dictOptions\": [\n {\n \"value\": \"active\",\n \"label\": \"正常\"\n },\n {\n \"value\": \"inactive\",\n \"label\": \"停用\"\n }\n ]\n },\n {\n \"columnName\": \"create_time\",\n \"columnLabel\": \"创建时间\",\n \"columnComment\": \"账号创建时间\",\n \"columnType\": \"datetime\",\n \"isPk\": \"0\",\n \"isIncrement\": \"0\",\n \"isRequired\": \"1\",\n \"htmlType\": \"datetime\"\n }\n ]\n },\n {\n \"tableName\": \"admin\",\n \"tableComment\": \"管理员账号表\",\n \"adminMenuName\": \"管理员账号\",\n \"operations\": {\n \"add\": false,\n \"edit\": true,\n \"remove\": false,\n \"removeType\": \"\",\n \"reason\": \"管理员账号由系统初始化,不支持新增和删除\"\n },\n \"columns\": [\n {\n \"columnName\": \"admin_id\",\n \"columnLabel\": \"管理员ID\",\n \"columnComment\": \"主键ID\",\n \"columnType\": \"bigint(20)\",\n \"isPk\": \"1\",\n \"isIncrement\": \"1\",\n \"isRequired\": \"1\"\n },\n {\n \"columnName\": \"username\",\n \"columnLabel\": \"用户名\",\n \"columnComment\": \"登录用户名,唯一\",\n \"columnType\": \"varchar(50)\",\n \"isPk\": \"0\",\n \"isIncrement\": \"0\",\n \"isRequired\": \"1\",\n \"htmlType\": \"input\"\n },\n {\n \"columnName\": \"password_hash\",\n \"columnLabel\": \"密码hash\",\n \"columnComment\": \"加密后的密码\",\n \"columnType\": \"varchar(255)\",\n \"isPk\": \"0\",\n \"isIncrement\": \"0\",\n \"isRequired\": \"1\",\n \"htmlType\": \"input\"\n },\n {\n \"columnName\": \"nickname\",\n \"columnLabel\": \"昵称\",\n \"columnComment\": \"显示昵称\",\n \"columnType\": \"varchar(100)\",\n \"isPk\": \"0\",\n \"isIncrement\": \"0\",\n \"isRequired\": \"1\",\n \"htmlType\": \"input\"\n },\n {\n \"columnName\": \"status\",\n \"columnLabel\": \"状态\",\n \"columnComment\": \"账号状态active/inactive\",\n \"columnType\": \"varchar(20)\",\n \"isPk\": \"0\",\n \"isIncrement\": \"0\",\n \"isRequired\": \"1\",\n \"htmlType\": \"select\",\n \"dictType\": \"account_status\",\n \"dictOptions\": [\n {\n \"value\": \"active\",\n \"label\": \"正常\"\n },\n {\n \"value\": \"inactive\",\n \"label\": \"停用\"\n }\n ]\n },\n {\n \"columnName\": \"create_time\",\n \"columnLabel\": \"创建时间\",\n \"columnComment\": \"账号创建时间\",\n \"columnType\": \"datetime\",\n \"isPk\": \"0\",\n \"isIncrement\": \"0\",\n \"isRequired\": \"1\",\n \"htmlType\": \"datetime\"\n }\n ]\n },\n {\n \"tableName\": \"banner\",\n \"tableComment\": \"轮播图表\",\n \"adminMenuName\": \"轮播图\",\n \"operations\": {\n \"add\": true,\n \"edit\": true,\n \"remove\": true,\n \"removeType\": \"physical\",\n \"reason\": \"\"\n },\n \"columns\": [\n {\n \"columnName\": \"id\",\n \"columnLabel\": \"ID\",\n \"columnComment\": \"主键ID\",\n \"columnType\": \"bigint(20)\",\n \"isPk\": \"1\",\n \"isIncrement\": \"1\",\n \"isRequired\": \"1\"\n },\n {\n \"columnName\": \"title\",\n \"columnLabel\": \"标题\",\n \"columnComment\": \"轮播图标题\",\n \"columnType\": \"varchar(200)\",\n \"isPk\": \"0\",\n \"isIncrement\": \"0\",\n \"isRequired\": \"1\",\n \"htmlType\": \"input\"\n },\n {\n \"columnName\": \"image_url\",\n \"columnLabel\": \"图片地址\",\n \"columnComment\": \"图片URL\",\n \"columnType\": \"varchar(500)\",\n \"isPk\": \"0\",\n \"isIncrement\": \"0\",\n \"isRequired\": \"1\",\n \"htmlType\": \"imageUpload\"\n },\n {\n \"columnName\": \"link_url\",\n \"columnLabel\": \"链接地址\",\n \"columnComment\": \"点击跳转链接\",\n \"columnType\": \"varchar(500)\",\n \"isPk\": \"0\",\n \"isIncrement\": \"0\",\n \"isRequired\": \"0\",\n \"htmlType\": \"input\"\n },\n {\n \"columnName\": \"sort_order\",\n \"columnLabel\": \"排序\",\n \"columnComment\": \"排序序号,数值越小越靠前\",\n \"columnType\": \"int(11)\",\n \"isPk\": \"0\",\n \"isIncrement\": \"0\",\n \"isRequired\": \"0\",\n \"htmlType\": \"input\",\n \"javaType\": \"Integer\"\n },\n {\n \"columnName\": \"status\",\n \"columnLabel\": \"状态\",\n \"columnComment\": \"状态active/inactive\",\n \"columnType\": \"varchar(20)\",\n \"isPk\": \"0\",\n \"isIncrement\": \"0\",\n \"isRequired\": \"1\",\n \"htmlType\": \"select\",\n \"dictType\": \"banner_status\",\n \"dictOptions\": [\n {\n \"value\": \"active\",\n \"label\": \"启用\"\n },\n {\n \"value\": \"inactive\",\n \"label\": \"停用\"\n }\n ]\n },\n {\n \"columnName\": \"create_time\",\n \"columnLabel\": \"创建时间\",\n \"columnComment\": \"记录创建时间\",\n \"columnType\": \"datetime\",\n \"isPk\": \"0\",\n \"isIncrement\": \"0\",\n \"isRequired\": \"1\",\n \"htmlType\": \"datetime\"\n }\n ]\n },\n {\n \"tableName\": \"announcement\",\n \"tableComment\": \"公告表\",\n \"adminMenuName\": \"公告\",\n \"operations\": {\n \"add\": true,\n \"edit\": true,\n \"remove\": true,\n \"removeType\": \"physical\",\n \"reason\": \"\"\n },\n \"columns\": [\n {\n \"columnName\": \"id\",\n \"columnLabel\": \"ID\",\n \"columnComment\": \"主键ID\",\n \"columnType\": \"bigint(20)\",\n \"isPk\": \"1\",\n \"isIncrement\": \"1\",\n \"isRequired\": \"1\"\n },\n {\n \"columnName\": \"title\",\n \"columnLabel\": \"标题\",\n \"columnComment\": \"公告标题\",\n \"columnType\": \"varchar(200)\",\n \"isPk\": \"0\",\n \"isIncrement\": \"0\",\n \"isRequired\": \"1\",\n \"htmlType\": \"input\"\n },\n {\n \"columnName\": \"content\",\n \"columnLabel\": \"内容\",\n \"columnComment\": \"公告内容\",\n \"columnType\": \"text\",\n \"isPk\": \"0\",\n \"isIncrement\": \"0\",\n \"isRequired\": \"1\",\n \"htmlType\": \"textarea\"\n },\n {\n \"columnName\": \"publish_date\",\n \"columnLabel\": \"发布日期\",\n \"columnComment\": \"发布时间\",\n \"columnType\": \"datetime\",\n \"isPk\": \"0\",\n \"isIncrement\": \"0\",\n \"isRequired\": \"0\",\n \"htmlType\": \"datetime\"\n },\n {\n \"columnName\": \"status\",\n \"columnLabel\": \"状态\",\n \"columnComment\": \"状态active/inactive\",\n \"columnType\": \"varchar(20)\",\n \"isPk\": \"0\",\n \"isIncrement\": \"0\",\n \"isRequired\": \"1\",\n \"htmlType\": \"select\",\n \"dictType\": \"announcement_status\",\n \"dictOptions\": [\n {\n \"value\": \"active\",\n \"label\": \"发布\"\n },\n {\n \"value\": \"inactive\",\n \"label\": \"草稿\"\n }\n ]\n },\n {\n \"columnName\": \"create_time\",\n \"columnLabel\": \"创建时间\",\n \"columnComment\": \"记录创建时间\",\n \"columnType\": \"datetime\",\n \"isPk\": \"0\",\n \"isIncrement\": \"0\",\n \"isRequired\": \"1\",\n \"htmlType\": \"datetime\"\n }\n ]\n },\n {\n \"tableName\": \"news\",\n \"tableComment\": \"新闻表\",\n \"adminMenuName\": \"新闻\",\n \"operations\": {\n \"add\": true,\n \"edit\": true,\n \"remove\": true,\n \"removeType\": \"physical\",\n \"reason\": \"\"\n },\n \"columns\": [\n {\n \"columnName\": \"id\",\n \"columnLabel\": \"ID\",\n \"columnComment\": \"主键ID\",\n \"columnType\": \"bigint(20)\",\n \"isPk\": \"1\",\n \"isIncrement\": \"1\",\n \"isRequired\": \"1\"\n },\n {\n \"columnName\": \"title\",\n \"columnLabel\": \"标题\",\n \"columnComment\": \"新闻标题\",\n \"columnType\": \"varchar(200)\",\n \"isPk\": \"0\",\n \"isIncrement\": \"0\",\n \"isRequired\": \"1\",\n \"htmlType\": \"input\"\n },\n {\n \"columnName\": \"summary\",\n \"columnLabel\": \"摘要\",\n \"columnComment\": \"新闻摘要\",\n \"columnType\": \"varchar(500)\",\n \"isPk\": \"0\",\n \"isIncrement\": \"0\",\n \"isRequired\": \"0\",\n \"htmlType\": \"input\"\n },\n {\n \"columnName\": \"content\",\n \"columnLabel\": \"内容\",\n \"columnComment\": \"新闻正文\",\n \"columnType\": \"text\",\n \"isPk\": \"0\",\n \"isIncrement\": \"0\",\n \"isRequired\": \"1\",\n \"htmlType\": \"textarea\"\n },\n {\n \"columnName\": \"publish_date\",\n \"columnLabel\": \"发布日期\",\n \"columnComment\": \"发布时间\",\n \"columnType\": \"datetime\",\n \"isPk\": \"0\",\n \"isIncrement\": \"0\",\n \"isRequired\": \"0\",\n \"htmlType\": \"datetime\"\n },\n {\n \"columnName\": \"status\",\n \"columnLabel\": \"状态\",\n \"columnComment\": \"状态active/inactive\",\n \"columnType\": \"varchar(20)\",\n \"isPk\": \"0\",\n \"isIncrement\": \"0\",\n \"isRequired\": \"1\",\n \"htmlType\": \"select\",\n \"dictType\": \"news_status\",\n \"dictOptions\": [\n {\n \"value\": \"active\",\n \"label\": \"发布\"\n },\n {\n \"value\": \"inactive\",\n \"label\": \"草稿\"\n }\n ]\n },\n {\n \"columnName\": \"create_time\",\n \"columnLabel\": \"创建时间\",\n \"columnComment\": \"记录创建时间\",\n \"columnType\": \"datetime\",\n \"isPk\": \"0\",\n \"isIncrement\": \"0\",\n \"isRequired\": \"1\",\n \"htmlType\": \"datetime\"\n }\n ]\n }\n ]\n}', '0', 78131, 3941, 1152, 2789, 11318, 6073, 3941, 11318, 15259, 3, 0.02544804, '1', NULL, '2026-07-15 11:00:09');
-- ----------------------------
-- Table structure for front_project
-- ----------------------------
DROP TABLE IF EXISTS `front_project`;
CREATE TABLE `front_project` (
`project_id` bigint(20) NOT NULL AUTO_INCREMENT COMMENT '前台项目ID',
`user_id` bigint(20) NOT NULL COMMENT '前台用户ID',
`project_name` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NOT NULL COMMENT '项目名称',
`project_file_name` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT '' COMMENT '项目文件名',
`package_name` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT 'com.easycode.generated' COMMENT '包名',
`version` varchar(20) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT '1.0.0' COMMENT '版本号',
`project_desc` longtext CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL COMMENT '项目描述',
`requirement_keyword` varchar(1000) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT '' COMMENT '需求关键词',
`industry_template` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT '' COMMENT '行业模板',
`style_preset` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT 'business_clean' COMMENT '页面风格预设',
`code_template` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT 'qing' COMMENT 'code template bundle',
`front_framework` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT 'Vue3 + Element Plus' COMMENT '前台框架',
`back_framework` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT 'Spring Boot + MyBatis' COMMENT '后端框架',
`frontend_enabled` char(1) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT '1' COMMENT '是否生成前台前端1是 0否',
`generate_status` char(1) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT '0' COMMENT '数据库生成状态0未生成 1生成中 2已生成 3失败',
`preview_status` char(1) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT '0' COMMENT '预览状态0未预览 1已预览 2失败',
`draft_revision` bigint(20) NOT NULL DEFAULT 0 COMMENT '项目草稿乐观锁版本',
`app_blueprint` longtext CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL COMMENT '系统模块设计草稿JSON',
`flow_config` longtext CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL COMMENT '业务闭环唯一配置JSON状态、动作、多表联动、按钮和统计',
`er_diagram` longtext CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL COMMENT 'ER图草稿JSON',
`status` char(1) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT '0' COMMENT '状态0正常 1停用',
`create_time` datetime(0) NULL DEFAULT NULL COMMENT '创建时间',
`update_time` datetime(0) NULL DEFAULT NULL COMMENT '更新时间',
`remark` varchar(500) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '备注',
PRIMARY KEY (`project_id`) USING BTREE,
INDEX `idx_front_project_user_id`(`user_id`) USING BTREE,
CONSTRAINT `fk_front_project_user` FOREIGN KEY (`user_id`) REFERENCES `front_user` (`user_id`) ON DELETE RESTRICT ON UPDATE RESTRICT
) ENGINE = InnoDB AUTO_INCREMENT = 100 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_0900_ai_ci COMMENT = '前台项目草稿表' ROW_FORMAT = Dynamic;
-- ----------------------------
-- Table structure for front_project_column
-- ----------------------------
DROP TABLE IF EXISTS `front_project_column`;
CREATE TABLE `front_project_column` (
`column_id` bigint(20) NOT NULL AUTO_INCREMENT COMMENT '字段设计ID',
`table_id` bigint(20) NOT NULL COMMENT '表设计ID',
`project_id` bigint(20) NOT NULL COMMENT '项目ID',
`column_name` varchar(200) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NOT NULL COMMENT '字段名称',
`column_comment` varchar(500) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT '' COMMENT '字段描述',
`column_label` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT '' COMMENT '字段展示名',
`column_type` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NOT NULL COMMENT '字段类型',
`java_type` varchar(500) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT 'String' COMMENT 'Java类型',
`java_field` varchar(200) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT '' COMMENT 'Java字段名',
`is_pk` char(1) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT '0' COMMENT '是否主键1是',
`is_increment` char(1) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT '0' COMMENT '是否自增1是',
`is_required` char(1) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT '0' COMMENT '是否必填1是',
`is_insert` char(1) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT '1' COMMENT '是否插入字段1是',
`is_edit` char(1) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT '1' COMMENT '是否编辑字段1是',
`is_list` char(1) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT '1' COMMENT '是否列表字段1是',
`is_query` char(1) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT '0' COMMENT '是否查询字段1是',
`query_type` varchar(200) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT 'EQ' COMMENT '查询方式',
`html_type` varchar(200) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT 'input' COMMENT '显示类型',
`dict_type` varchar(200) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT '' COMMENT '字典类型',
`dict_options` text CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL COMMENT '字段字典选项JSON',
`default_value` varchar(200) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '默认值',
`sort` int(11) NULL DEFAULT 0 COMMENT '排序',
`create_time` datetime(0) NULL DEFAULT NULL COMMENT '创建时间',
`update_time` datetime(0) NULL DEFAULT NULL COMMENT '更新时间',
PRIMARY KEY (`column_id`) USING BTREE,
INDEX `idx_front_project_column_table_id`(`table_id`) USING BTREE,
INDEX `idx_front_project_column_project_id`(`project_id`) USING BTREE,
CONSTRAINT `fk_front_project_column_table` FOREIGN KEY (`table_id`) REFERENCES `front_project_table` (`table_id`) ON DELETE RESTRICT ON UPDATE RESTRICT
) ENGINE = InnoDB AUTO_INCREMENT = 100 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_0900_ai_ci COMMENT = '前台项目字段设计' ROW_FORMAT = Dynamic;
-- ----------------------------
-- Table structure for front_project_diagram
-- ----------------------------
DROP TABLE IF EXISTS `front_project_diagram`;
CREATE TABLE `front_project_diagram` (
`diagram_id` bigint(20) NOT NULL AUTO_INCREMENT COMMENT 'Diagram ID',
`project_id` bigint(20) NULL DEFAULT NULL COMMENT 'Project ID',
`user_id` bigint(20) NOT NULL COMMENT 'Front user ID',
`diagram_type` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NOT NULL COMMENT 'Diagram type',
`title` varchar(200) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT '' COMMENT 'Diagram title',
`description` varchar(1000) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT '' COMMENT 'Diagram description',
`diagram_json` longtext CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL COMMENT 'Diagram JSON',
`mermaid` longtext CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL COMMENT 'Mermaid DSL',
`markdown` longtext CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL COMMENT 'Diagram notes',
`status` char(1) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT '0' COMMENT 'Status',
`version` int(11) NULL DEFAULT 1 COMMENT 'Version',
`create_time` datetime(0) NULL DEFAULT NULL COMMENT 'Create time',
`update_time` datetime(0) NULL DEFAULT NULL COMMENT 'Update time',
`remark` varchar(500) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT 'Remark',
PRIMARY KEY (`diagram_id`) USING BTREE,
UNIQUE INDEX `uk_front_project_diagram_type`(`user_id`, `project_id`, `diagram_type`) USING BTREE,
INDEX `idx_front_project_diagram_project`(`project_id`) USING BTREE,
INDEX `idx_front_project_diagram_user`(`user_id`, `project_id`) USING BTREE,
CONSTRAINT `fk_front_project_diagram_project` FOREIGN KEY (`project_id`) REFERENCES `front_project` (`project_id`) ON DELETE RESTRICT ON UPDATE RESTRICT
) ENGINE = InnoDB AUTO_INCREMENT = 100 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_0900_ai_ci COMMENT = 'Front project diagram draft' ROW_FORMAT = Dynamic;
-- ----------------------------
-- Table structure for front_project_file
-- ----------------------------
DROP TABLE IF EXISTS `front_project_file`;
CREATE TABLE `front_project_file` (
`file_id` bigint(20) NOT NULL AUTO_INCREMENT COMMENT '文件缓存ID',
`project_id` bigint(20) NOT NULL COMMENT '项目ID',
`template_type` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NOT NULL COMMENT '模板类型',
`node_id` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT '' COMMENT '结构节点ID',
`table_id` bigint(20) NULL DEFAULT NULL COMMENT '表设计ID',
`file_name` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NOT NULL COMMENT '文件名',
`file_path` varchar(500) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT '' COMMENT '文件路径',
`file_content` longtext CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL COMMENT '文件内容',
`content_hash` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT '' COMMENT '内容哈希',
`create_time` datetime(0) NULL DEFAULT NULL COMMENT '创建时间',
`update_time` datetime(0) NULL DEFAULT NULL COMMENT '更新时间',
PRIMARY KEY (`file_id`) USING BTREE,
INDEX `idx_front_project_file_project_id`(`project_id`) USING BTREE,
INDEX `idx_front_project_file_lookup`(`project_id`, `template_type`, `table_id`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 100 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_0900_ai_ci COMMENT = '前台项目预览文件缓存' ROW_FORMAT = Dynamic;
-- ----------------------------
-- Table structure for front_project_generation
-- ----------------------------
DROP TABLE IF EXISTS `front_project_generation`;
CREATE TABLE `front_project_generation` (
`generation_id` bigint(20) NOT NULL AUTO_INCREMENT COMMENT '生成记录ID',
`project_id` bigint(20) NOT NULL COMMENT '项目ID',
`user_id` bigint(20) NOT NULL COMMENT '前台用户ID',
`generate_type` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NOT NULL COMMENT '生成类型',
`provider` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT 'deepseek' COMMENT 'AI提供方',
`prompt_summary` varchar(500) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT '' COMMENT 'Prompt摘要',
`request_payload` longtext CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL COMMENT '请求内容',
`response_payload` longtext CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL COMMENT '响应内容',
`success` char(1) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT '0' COMMENT '是否成功1成功 0失败',
`error_message` varchar(1000) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT '' COMMENT '错误信息',
`token_usage` int(11) NULL DEFAULT 0 COMMENT 'Token用量',
`elapsed_ms` bigint(20) NULL DEFAULT 0 COMMENT '耗时毫秒',
`create_time` datetime(0) NULL DEFAULT NULL COMMENT '创建时间',
PRIMARY KEY (`generation_id`) USING BTREE,
INDEX `idx_front_project_generation_project_id`(`project_id`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 100 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_0900_ai_ci COMMENT = '前台项目生成记录' ROW_FORMAT = Dynamic;
-- ----------------------------
-- Table structure for front_project_module
-- ----------------------------
DROP TABLE IF EXISTS `front_project_module`;
CREATE TABLE `front_project_module` (
`id` bigint(20) NOT NULL AUTO_INCREMENT COMMENT 'id',
`project_id` bigint(20) NOT NULL COMMENT '前台项目ID',
`module_id` bigint(20) NOT NULL COMMENT '功能模块ID',
`status` char(1) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT '0' COMMENT '状态0正常 1停用',
`create_time` datetime(0) NULL DEFAULT NULL COMMENT '创建时间',
`update_time` datetime(0) NULL DEFAULT NULL COMMENT '更新时间',
`remark` varchar(500) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '备注',
PRIMARY KEY (`id`) USING BTREE,
UNIQUE INDEX `uk_front_project_module`(`project_id`, `module_id`) USING BTREE,
INDEX `idx_front_project_module_project_id`(`project_id`) USING BTREE,
INDEX `idx_front_project_module_module_id`(`module_id`) USING BTREE,
CONSTRAINT `fk_front_project_module_module` FOREIGN KEY (`module_id`) REFERENCES `sys_module` (`module_id`) ON DELETE RESTRICT ON UPDATE RESTRICT,
CONSTRAINT `fk_front_project_module_project` FOREIGN KEY (`project_id`) REFERENCES `front_project` (`project_id`) ON DELETE RESTRICT ON UPDATE RESTRICT
) ENGINE = InnoDB AUTO_INCREMENT = 100 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_0900_ai_ci COMMENT = '前台项目功能模块关系' ROW_FORMAT = Dynamic;
-- ----------------------------
-- Table structure for front_project_page_design
-- ----------------------------
DROP TABLE IF EXISTS `front_project_page_design`;
CREATE TABLE `front_project_page_design` (
`design_id` bigint(20) NOT NULL AUTO_INCREMENT COMMENT 'Page design ID',
`project_id` bigint(20) NULL DEFAULT NULL COMMENT 'Project ID',
`user_id` bigint(20) NOT NULL COMMENT 'Front user ID',
`page_scope` varchar(20) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NOT NULL DEFAULT 'frontend' COMMENT 'Page scope: frontend/admin',
`page_code` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NOT NULL COMMENT 'Page code',
`menu_code` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT '' COMMENT 'Menu code',
`page_name` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NOT NULL COMMENT 'Page name',
`route_path` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NOT NULL COMMENT 'Route path',
`page_type` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NOT NULL COMMENT 'Page type',
`table_name` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT '' COMMENT 'Bound table name',
`layout_json` longtext CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL COMMENT 'Layout JSON',
`action_json` longtext CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL COMMENT 'Action JSON',
`status` char(1) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT '0' COMMENT 'Status',
`version` int(11) NULL DEFAULT 1 COMMENT 'Version',
`create_time` datetime(0) NULL DEFAULT NULL COMMENT 'Create time',
`update_time` datetime(0) NULL DEFAULT NULL COMMENT 'Update time',
`remark` varchar(500) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT 'Remark',
PRIMARY KEY (`design_id`) USING BTREE,
UNIQUE INDEX `uk_front_project_page_design`(`project_id`, `page_scope`, `page_code`) USING BTREE,
INDEX `idx_front_page_design_menu`(`project_id`, `menu_code`) USING BTREE,
INDEX `idx_front_page_design_table`(`project_id`, `table_name`) USING BTREE,
CONSTRAINT `fk_front_page_design_project` FOREIGN KEY (`project_id`) REFERENCES `front_project` (`project_id`) ON DELETE RESTRICT ON UPDATE RESTRICT
) ENGINE = InnoDB AUTO_INCREMENT = 100 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_0900_ai_ci COMMENT = 'Frontend page design' ROW_FORMAT = Dynamic;
-- ----------------------------
-- Table structure for front_project_paper
-- ----------------------------
DROP TABLE IF EXISTS `front_project_paper`;
CREATE TABLE `front_project_paper` (
`paper_id` bigint(20) NOT NULL AUTO_INCREMENT COMMENT 'Paper ID',
`project_id` bigint(20) NOT NULL COMMENT 'Project ID',
`user_id` bigint(20) NOT NULL COMMENT 'Front user ID',
`paper_title` varchar(300) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT '' COMMENT 'Paper title',
`major` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT '' COMMENT 'Major',
`school` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT '' COMMENT 'School',
`degree_name` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT '' COMMENT 'Degree',
`target_words` int(11) NULL DEFAULT 8000 COMMENT 'Target words',
`extra_requirements` varchar(2000) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT '' COMMENT 'Extra requirements',
`outline_json` longtext CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL COMMENT 'Outline JSON',
`outline_markdown` longtext CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL COMMENT 'Outline markdown',
`draft_markdown` longtext CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL COMMENT 'Draft markdown',
`status` char(1) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT '0' COMMENT 'Status',
`version` int(11) NULL DEFAULT 1 COMMENT 'Version',
`create_time` datetime(0) NULL DEFAULT NULL COMMENT 'Create time',
`update_time` datetime(0) NULL DEFAULT NULL COMMENT 'Update time',
`remark` varchar(500) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT 'Remark',
PRIMARY KEY (`paper_id`) USING BTREE,
UNIQUE INDEX `uk_front_project_paper_project`(`project_id`) USING BTREE,
INDEX `idx_front_project_paper_user`(`user_id`, `project_id`) USING BTREE,
CONSTRAINT `fk_front_project_paper_project` FOREIGN KEY (`project_id`) REFERENCES `front_project` (`project_id`) ON DELETE RESTRICT ON UPDATE RESTRICT
) ENGINE = InnoDB AUTO_INCREMENT = 100 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_0900_ai_ci COMMENT = 'Front project paper draft' ROW_FORMAT = Dynamic;
-- ----------------------------
-- Table structure for front_project_table
-- ----------------------------
DROP TABLE IF EXISTS `front_project_table`;
CREATE TABLE `front_project_table` (
`table_id` bigint(20) NOT NULL AUTO_INCREMENT COMMENT '表设计ID',
`project_id` bigint(20) NOT NULL COMMENT '项目ID',
`user_id` bigint(20) NOT NULL COMMENT '前台用户ID',
`table_name` varchar(200) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NOT NULL COMMENT '表名称',
`table_comment` varchar(500) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT '' COMMENT '表描述',
`class_name` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT '' COMMENT '实体类名称',
`module_name` varchar(30) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT '' COMMENT '生成模块名',
`business_name` varchar(30) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT '' COMMENT '生成业务名',
`function_name` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT '' COMMENT '生成功能名',
`admin_menu_name` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT '' COMMENT '后台菜单名称',
`allow_add` char(1) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT '1' COMMENT '是否允许新增1是 0否',
`allow_edit` char(1) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT '1' COMMENT '是否允许修改1是 0否',
`allow_remove` char(1) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT '1' COMMENT '是否允许删除1是 0否',
`remove_type` varchar(20) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT 'physical' COMMENT '删除方式none不允许 logical逻辑删除 physical物理删除',
`operation_note` varchar(500) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT '' COMMENT '操作能力说明',
`tpl_category` varchar(200) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT 'crud' COMMENT '模板类型',
`tpl_web_type` varchar(30) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT 'element-plus' COMMENT '前端模板类型',
`options` varchar(1000) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT '' COMMENT '生成选项',
`create_table_sql` longtext CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL COMMENT '建表SQL',
`sort` int(11) NULL DEFAULT 0 COMMENT '排序',
`status` char(1) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT '0' COMMENT '状态0正常 1停用',
`create_time` datetime(0) NULL DEFAULT NULL COMMENT '创建时间',
`update_time` datetime(0) NULL DEFAULT NULL COMMENT '更新时间',
PRIMARY KEY (`table_id`) USING BTREE,
UNIQUE INDEX `uk_front_project_table`(`project_id`, `table_name`) USING BTREE,
INDEX `idx_front_project_table_project_id`(`project_id`) USING BTREE,
CONSTRAINT `fk_front_project_table_project` FOREIGN KEY (`project_id`) REFERENCES `front_project` (`project_id`) ON DELETE RESTRICT ON UPDATE RESTRICT
) ENGINE = InnoDB AUTO_INCREMENT = 100 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_0900_ai_ci COMMENT = '前台项目表设计' ROW_FORMAT = Dynamic;
-- ----------------------------
-- Table structure for front_user
-- ----------------------------
DROP TABLE IF EXISTS `front_user`;
CREATE TABLE `front_user` (
`user_id` bigint(20) NOT NULL AUTO_INCREMENT COMMENT '前台用户ID',
`username` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NOT NULL COMMENT '用户名',
`password` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NOT NULL COMMENT '密码',
`nickname` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT '' COMMENT '昵称',
`email` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT '' COMMENT '邮箱',
`phone` varchar(20) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT '' COMMENT '手机号',
`status` char(1) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT '0' COMMENT '状态0正常 1停用',
`del_flag` char(1) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT '0' COMMENT '删除标志0存在 2删除',
`last_login_time` datetime(0) NULL DEFAULT NULL COMMENT '最后登录时间',
`create_time` datetime(0) NULL DEFAULT NULL COMMENT '创建时间',
`update_time` datetime(0) NULL DEFAULT NULL COMMENT '更新时间',
`remark` varchar(500) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '备注',
PRIMARY KEY (`user_id`) USING BTREE,
UNIQUE INDEX `uk_front_user_username`(`username`) USING BTREE,
INDEX `idx_front_user_email`(`email`) USING BTREE,
INDEX `idx_front_user_phone`(`phone`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 100 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_0900_ai_ci COMMENT = '前台用户表' ROW_FORMAT = Dynamic;
-- ----------------------------
-- Records of front_user
-- ----------------------------
INSERT INTO `front_user` VALUES (100, 'wangpeng', '$2a$10$YqWtdCjd5YqiKf5gVupjHOxKvY176IRD6UGbdCvv7kvFPJhhXZ/HK', 'wangpeng', '', '', '0', '0', '2026-07-15 12:27:52', '2026-07-14 14:58:02', '2026-07-15 12:27:52', NULL);
-- ----------------------------
-- Table structure for gen_project
-- ----------------------------
-- Consolidated from the legacy gen_project.sql script. The legacy `description`
-- column is represented by `project_desc`, which is the current Mapper contract.
DROP TABLE IF EXISTS `gen_project`;
CREATE TABLE `gen_project` (
`project_id` bigint(20) NOT NULL AUTO_INCREMENT COMMENT '项目ID',
`project_name` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NOT NULL COMMENT '项目名称',
`project_file_name` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT '' COMMENT '项目文件名称',
`package_name` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NOT NULL COMMENT '包名',
`version` varchar(20) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NOT NULL COMMENT '版本号',
`project_desc` varchar(500) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '项目描述',
`author` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NOT NULL COMMENT '作者',
`front_framework` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NOT NULL COMMENT '前端框架',
`back_framework` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NOT NULL COMMENT '后端框架',
`status` char(1) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT '0' COMMENT '状态0正常 1停用',
`create_by` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT '' COMMENT '创建者',
`create_time` datetime(0) NULL DEFAULT NULL COMMENT '创建时间',
`update_by` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT '' COMMENT '更新者',
`update_time` datetime(0) NULL DEFAULT NULL COMMENT '更新时间',
`remark` varchar(500) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '备注',
PRIMARY KEY (`project_id`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 100 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_0900_ai_ci COMMENT = '项目表' ROW_FORMAT = Dynamic;
-- ----------------------------
-- Table structure for gen_table
-- ----------------------------
DROP TABLE IF EXISTS `gen_table`;
CREATE TABLE `gen_table` (
`table_id` bigint(20) NOT NULL AUTO_INCREMENT COMMENT '编号',
`table_name` varchar(200) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT '' COMMENT '表名称',
`table_comment` varchar(500) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT '' COMMENT '表描述',
`sub_table_name` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '关联子表的表名',
`sub_table_fk_name` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '子表关联的外键名',
`class_name` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT '' COMMENT '实体类名称',
`tpl_category` varchar(200) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT 'crud' COMMENT '使用的模板crud单表操作 tree树表操作',
`tpl_web_type` varchar(30) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT '' COMMENT '前端模板类型element-ui模版 element-plus模版',
`package_name` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '生成包路径',
`module_name` varchar(30) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '生成模块名',
`business_name` varchar(30) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '生成业务名',
`function_name` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '生成功能名',
`function_author` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '生成功能作者',
`gen_type` char(1) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT '0' COMMENT '生成代码方式0zip压缩包 1自定义路径',
`gen_path` varchar(200) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT '/' COMMENT '生成路径(不填默认项目路径)',
`create_table_sql` longtext CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL COMMENT '建表SQL语句',
`admin_menu_name` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT '' COMMENT '后台菜单名称',
`allow_add` char(1) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT '1' COMMENT '是否允许新增1是 0否',
`allow_edit` char(1) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT '1' COMMENT '是否允许修改1是 0否',
`allow_remove` char(1) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT '1' COMMENT '是否允许删除1是 0否',
`remove_type` varchar(20) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT 'physical' COMMENT '删除方式none不允许 logical逻辑删除 physical物理删除',
`operation_note` varchar(500) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT '' COMMENT '操作能力说明',
`options` varchar(1000) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '其它生成选项',
`create_by` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT '' COMMENT '创建者',
`create_time` datetime(0) NULL DEFAULT NULL COMMENT '创建时间',
`update_by` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT '' COMMENT '更新者',
`update_time` datetime(0) NULL DEFAULT NULL COMMENT '更新时间',
`remark` varchar(500) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '备注',
PRIMARY KEY (`table_id`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 1 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_0900_ai_ci COMMENT = '代码生成业务表' ROW_FORMAT = Dynamic;
-- ----------------------------
-- Table structure for gen_table_column
-- ----------------------------
DROP TABLE IF EXISTS `gen_table_column`;
CREATE TABLE `gen_table_column` (
`column_id` bigint(20) NOT NULL AUTO_INCREMENT COMMENT '编号',
`table_id` bigint(20) NULL DEFAULT NULL COMMENT '归属表编号',
`column_name` varchar(200) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '列名称',
`column_comment` varchar(500) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '列描述',
`column_type` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '列类型',
`java_type` varchar(500) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT 'JAVA类型',
`java_field` varchar(200) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT 'JAVA字段名',
`is_pk` char(1) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '是否主键1是',
`is_increment` char(1) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '是否自增1是',
`is_required` char(1) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '是否必填1是',
`is_insert` char(1) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '是否为插入字段1是',
`is_edit` char(1) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '是否编辑字段1是',
`is_list` char(1) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '是否列表字段1是',
`is_query` char(1) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '是否查询字段1是',
`query_type` varchar(200) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT 'EQ' COMMENT '查询方式(等于、不等于、大于、小于、范围)',
`html_type` varchar(200) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '显示类型(文本框、文本域、下拉框、复选框、单选框、日期控件)',
`dict_type` varchar(200) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT '' COMMENT '字典类型',
`sort` int(11) NULL DEFAULT NULL COMMENT '排序',
`create_by` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT '' COMMENT '创建者',
`create_time` datetime(0) NULL DEFAULT NULL COMMENT '创建时间',
`update_by` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT '' COMMENT '更新者',
`update_time` datetime(0) NULL DEFAULT NULL COMMENT '更新时间',
PRIMARY KEY (`column_id`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 1 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_0900_ai_ci COMMENT = '代码生成业务表字段' ROW_FORMAT = Dynamic;
-- ----------------------------
-- Table structure for qrtz_blob_triggers
-- ----------------------------
DROP TABLE IF EXISTS `qrtz_blob_triggers`;
CREATE TABLE `qrtz_blob_triggers` (
`sched_name` varchar(120) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NOT NULL COMMENT '调度名称',
`trigger_name` varchar(200) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NOT NULL COMMENT 'qrtz_triggers表trigger_name的外键',
`trigger_group` varchar(200) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NOT NULL COMMENT 'qrtz_triggers表trigger_group的外键',
`blob_data` blob NULL COMMENT '存放持久化Trigger对象',
PRIMARY KEY (`sched_name`, `trigger_name`, `trigger_group`) USING BTREE,
CONSTRAINT `qrtz_blob_triggers_ibfk_1` FOREIGN KEY (`sched_name`, `trigger_name`, `trigger_group`) REFERENCES `qrtz_triggers` (`sched_name`, `trigger_name`, `trigger_group`) ON DELETE RESTRICT ON UPDATE RESTRICT
) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_0900_ai_ci COMMENT = 'Blob类型的触发器表' ROW_FORMAT = Dynamic;
-- ----------------------------
-- Table structure for qrtz_calendars
-- ----------------------------
DROP TABLE IF EXISTS `qrtz_calendars`;
CREATE TABLE `qrtz_calendars` (
`sched_name` varchar(120) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NOT NULL COMMENT '调度名称',
`calendar_name` varchar(200) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NOT NULL COMMENT '日历名称',
`calendar` blob NOT NULL COMMENT '存放持久化calendar对象',
PRIMARY KEY (`sched_name`, `calendar_name`) USING BTREE
) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_0900_ai_ci COMMENT = '日历信息表' ROW_FORMAT = Dynamic;
-- ----------------------------
-- Table structure for qrtz_cron_triggers
-- ----------------------------
DROP TABLE IF EXISTS `qrtz_cron_triggers`;
CREATE TABLE `qrtz_cron_triggers` (
`sched_name` varchar(120) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NOT NULL COMMENT '调度名称',
`trigger_name` varchar(200) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NOT NULL COMMENT 'qrtz_triggers表trigger_name的外键',
`trigger_group` varchar(200) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NOT NULL COMMENT 'qrtz_triggers表trigger_group的外键',
`cron_expression` varchar(200) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NOT NULL COMMENT 'cron表达式',
`time_zone_id` varchar(80) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '时区',
PRIMARY KEY (`sched_name`, `trigger_name`, `trigger_group`) USING BTREE,
CONSTRAINT `qrtz_cron_triggers_ibfk_1` FOREIGN KEY (`sched_name`, `trigger_name`, `trigger_group`) REFERENCES `qrtz_triggers` (`sched_name`, `trigger_name`, `trigger_group`) ON DELETE RESTRICT ON UPDATE RESTRICT
) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_0900_ai_ci COMMENT = 'Cron类型的触发器表' ROW_FORMAT = Dynamic;
-- ----------------------------
-- Table structure for qrtz_fired_triggers
-- ----------------------------
DROP TABLE IF EXISTS `qrtz_fired_triggers`;
CREATE TABLE `qrtz_fired_triggers` (
`sched_name` varchar(120) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NOT NULL COMMENT '调度名称',
`entry_id` varchar(95) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NOT NULL COMMENT '调度器实例id',
`trigger_name` varchar(200) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NOT NULL COMMENT 'qrtz_triggers表trigger_name的外键',
`trigger_group` varchar(200) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NOT NULL COMMENT 'qrtz_triggers表trigger_group的外键',
`instance_name` varchar(200) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NOT NULL COMMENT '调度器实例名',
`fired_time` bigint(13) NOT NULL COMMENT '触发的时间',
`sched_time` bigint(13) NOT NULL COMMENT '定时器制定的时间',
`priority` int(11) NOT NULL COMMENT '优先级',
`state` varchar(16) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NOT NULL COMMENT '状态',
`job_name` varchar(200) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '任务名称',
`job_group` varchar(200) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '任务组名',
`is_nonconcurrent` varchar(1) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '是否并发',
`requests_recovery` varchar(1) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '是否接受恢复执行',
PRIMARY KEY (`sched_name`, `entry_id`) USING BTREE
) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_0900_ai_ci COMMENT = '已触发的触发器表' ROW_FORMAT = Dynamic;
-- ----------------------------
-- Table structure for qrtz_job_details
-- ----------------------------
DROP TABLE IF EXISTS `qrtz_job_details`;
CREATE TABLE `qrtz_job_details` (
`sched_name` varchar(120) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NOT NULL COMMENT '调度名称',
`job_name` varchar(200) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NOT NULL COMMENT '任务名称',
`job_group` varchar(200) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NOT NULL COMMENT '任务组名',
`description` varchar(250) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '相关介绍',
`job_class_name` varchar(250) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NOT NULL COMMENT '执行任务类名称',
`is_durable` varchar(1) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NOT NULL COMMENT '是否持久化',
`is_nonconcurrent` varchar(1) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NOT NULL COMMENT '是否并发',
`is_update_data` varchar(1) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NOT NULL COMMENT '是否更新数据',
`requests_recovery` varchar(1) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NOT NULL COMMENT '是否接受恢复执行',
`job_data` blob NULL COMMENT '存放持久化job对象',
PRIMARY KEY (`sched_name`, `job_name`, `job_group`) USING BTREE
) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_0900_ai_ci COMMENT = '任务详细信息表' ROW_FORMAT = Dynamic;
-- ----------------------------
-- Table structure for qrtz_locks
-- ----------------------------
DROP TABLE IF EXISTS `qrtz_locks`;
CREATE TABLE `qrtz_locks` (
`sched_name` varchar(120) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NOT NULL COMMENT '调度名称',
`lock_name` varchar(40) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NOT NULL COMMENT '悲观锁名称',
PRIMARY KEY (`sched_name`, `lock_name`) USING BTREE
) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_0900_ai_ci COMMENT = '存储的悲观锁信息表' ROW_FORMAT = Dynamic;
-- ----------------------------
-- Table structure for qrtz_paused_trigger_grps
-- ----------------------------
DROP TABLE IF EXISTS `qrtz_paused_trigger_grps`;
CREATE TABLE `qrtz_paused_trigger_grps` (
`sched_name` varchar(120) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NOT NULL COMMENT '调度名称',
`trigger_group` varchar(200) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NOT NULL COMMENT 'qrtz_triggers表trigger_group的外键',
PRIMARY KEY (`sched_name`, `trigger_group`) USING BTREE
) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_0900_ai_ci COMMENT = '暂停的触发器表' ROW_FORMAT = Dynamic;
-- ----------------------------
-- Table structure for qrtz_scheduler_state
-- ----------------------------
DROP TABLE IF EXISTS `qrtz_scheduler_state`;
CREATE TABLE `qrtz_scheduler_state` (
`sched_name` varchar(120) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NOT NULL COMMENT '调度名称',
`instance_name` varchar(200) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NOT NULL COMMENT '实例名称',
`last_checkin_time` bigint(13) NOT NULL COMMENT '上次检查时间',
`checkin_interval` bigint(13) NOT NULL COMMENT '检查间隔时间',
PRIMARY KEY (`sched_name`, `instance_name`) USING BTREE
) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_0900_ai_ci COMMENT = '调度器状态表' ROW_FORMAT = Dynamic;
-- ----------------------------
-- Table structure for qrtz_simple_triggers
-- ----------------------------
DROP TABLE IF EXISTS `qrtz_simple_triggers`;
CREATE TABLE `qrtz_simple_triggers` (
`sched_name` varchar(120) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NOT NULL COMMENT '调度名称',
`trigger_name` varchar(200) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NOT NULL COMMENT 'qrtz_triggers表trigger_name的外键',
`trigger_group` varchar(200) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NOT NULL COMMENT 'qrtz_triggers表trigger_group的外键',
`repeat_count` bigint(7) NOT NULL COMMENT '重复的次数统计',
`repeat_interval` bigint(12) NOT NULL COMMENT '重复的间隔时间',
`times_triggered` bigint(10) NOT NULL COMMENT '已经触发的次数',
PRIMARY KEY (`sched_name`, `trigger_name`, `trigger_group`) USING BTREE,
CONSTRAINT `qrtz_simple_triggers_ibfk_1` FOREIGN KEY (`sched_name`, `trigger_name`, `trigger_group`) REFERENCES `qrtz_triggers` (`sched_name`, `trigger_name`, `trigger_group`) ON DELETE RESTRICT ON UPDATE RESTRICT
) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_0900_ai_ci COMMENT = '简单触发器的信息表' ROW_FORMAT = Dynamic;
-- ----------------------------
-- Table structure for qrtz_simprop_triggers
-- ----------------------------
DROP TABLE IF EXISTS `qrtz_simprop_triggers`;
CREATE TABLE `qrtz_simprop_triggers` (
`sched_name` varchar(120) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NOT NULL COMMENT '调度名称',
`trigger_name` varchar(200) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NOT NULL COMMENT 'qrtz_triggers表trigger_name的外键',
`trigger_group` varchar(200) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NOT NULL COMMENT 'qrtz_triggers表trigger_group的外键',
`str_prop_1` varchar(512) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT 'String类型的trigger的第一个参数',
`str_prop_2` varchar(512) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT 'String类型的trigger的第二个参数',
`str_prop_3` varchar(512) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT 'String类型的trigger的第三个参数',
`int_prop_1` int(11) NULL DEFAULT NULL COMMENT 'int类型的trigger的第一个参数',
`int_prop_2` int(11) NULL DEFAULT NULL COMMENT 'int类型的trigger的第二个参数',
`long_prop_1` bigint(20) NULL DEFAULT NULL COMMENT 'long类型的trigger的第一个参数',
`long_prop_2` bigint(20) NULL DEFAULT NULL COMMENT 'long类型的trigger的第二个参数',
`dec_prop_1` decimal(13, 4) NULL DEFAULT NULL COMMENT 'decimal类型的trigger的第一个参数',
`dec_prop_2` decimal(13, 4) NULL DEFAULT NULL COMMENT 'decimal类型的trigger的第二个参数',
`bool_prop_1` varchar(1) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT 'Boolean类型的trigger的第一个参数',
`bool_prop_2` varchar(1) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT 'Boolean类型的trigger的第二个参数',
PRIMARY KEY (`sched_name`, `trigger_name`, `trigger_group`) USING BTREE,
CONSTRAINT `qrtz_simprop_triggers_ibfk_1` FOREIGN KEY (`sched_name`, `trigger_name`, `trigger_group`) REFERENCES `qrtz_triggers` (`sched_name`, `trigger_name`, `trigger_group`) ON DELETE RESTRICT ON UPDATE RESTRICT
) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_0900_ai_ci COMMENT = '同步机制的行锁表' ROW_FORMAT = Dynamic;
-- ----------------------------
-- Table structure for qrtz_triggers
-- ----------------------------
DROP TABLE IF EXISTS `qrtz_triggers`;
CREATE TABLE `qrtz_triggers` (
`sched_name` varchar(120) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NOT NULL COMMENT '调度名称',
`trigger_name` varchar(200) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NOT NULL COMMENT '触发器的名字',
`trigger_group` varchar(200) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NOT NULL COMMENT '触发器所属组的名字',
`job_name` varchar(200) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NOT NULL COMMENT 'qrtz_job_details表job_name的外键',
`job_group` varchar(200) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NOT NULL COMMENT 'qrtz_job_details表job_group的外键',
`description` varchar(250) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '相关介绍',
`next_fire_time` bigint(13) NULL DEFAULT NULL COMMENT '上一次触发时间(毫秒)',
`prev_fire_time` bigint(13) NULL DEFAULT NULL COMMENT '下一次触发时间(默认为-1表示不触发',
`priority` int(11) NULL DEFAULT NULL COMMENT '优先级',
`trigger_state` varchar(16) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NOT NULL COMMENT '触发器状态',
`trigger_type` varchar(8) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NOT NULL COMMENT '触发器的类型',
`start_time` bigint(13) NOT NULL COMMENT '开始时间',
`end_time` bigint(13) NULL DEFAULT NULL COMMENT '结束时间',
`calendar_name` varchar(200) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '日程表名称',
`misfire_instr` smallint(2) NULL DEFAULT NULL COMMENT '补偿执行的策略',
`job_data` blob NULL COMMENT '存放持久化job对象',
PRIMARY KEY (`sched_name`, `trigger_name`, `trigger_group`) USING BTREE,
INDEX `sched_name`(`sched_name`, `job_name`, `job_group`) USING BTREE,
CONSTRAINT `qrtz_triggers_ibfk_1` FOREIGN KEY (`sched_name`, `job_name`, `job_group`) REFERENCES `qrtz_job_details` (`sched_name`, `job_name`, `job_group`) ON DELETE RESTRICT ON UPDATE RESTRICT
) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_0900_ai_ci COMMENT = '触发器详细信息表' ROW_FORMAT = Dynamic;
-- ----------------------------
-- Table structure for source_project
-- ----------------------------
DROP TABLE IF EXISTS `source_project`;
CREATE TABLE `source_project` (
`project_id` bigint(20) NOT NULL AUTO_INCREMENT COMMENT '源码项目ID',
`slug` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NOT NULL COMMENT '前台访问标识',
`project_name` varchar(120) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NOT NULL COMMENT '项目名称',
`category` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT '' COMMENT '分类',
`cover_text` varchar(30) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT '' COMMENT '封面标识',
`summary` varchar(500) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT '' COMMENT '项目摘要',
`description_md` longtext CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL COMMENT 'Markdown项目描述',
`price` bigint(20) NULL DEFAULT 0 COMMENT '价格,单位分',
`view_count` bigint(20) NULL DEFAULT 0 COMMENT '浏览量',
`tags` longtext CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL COMMENT '技术标签JSON',
`modules` longtext CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL COMMENT '功能模块JSON',
`scenes` longtext CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL COMMENT '适用场景JSON',
`resource_name` varchar(200) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT '' COMMENT '源码资源名称',
`resource_url` varchar(500) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT '' COMMENT '源码资源地址',
`resource_version` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT '' COMMENT '源码资源版本',
`resource_size` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT '' COMMENT '源码资源大小',
`sort` int(11) NULL DEFAULT 0 COMMENT '排序',
`status` char(1) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT '0' COMMENT '状态0上架 1下架',
`del_flag` char(1) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT '0' COMMENT '删除标志0存在 2删除',
`create_by` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT '' COMMENT '创建者',
`create_time` datetime(0) NULL DEFAULT NULL COMMENT '创建时间',
`update_by` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT '' COMMENT '更新者',
`update_time` datetime(0) NULL DEFAULT NULL COMMENT '更新时间',
`remark` varchar(500) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '备注',
PRIMARY KEY (`project_id`) USING BTREE,
UNIQUE INDEX `uk_source_project_slug`(`slug`) USING BTREE,
INDEX `idx_source_project_category`(`category`) USING BTREE,
INDEX `idx_source_project_status`(`status`, `del_flag`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 106 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_0900_ai_ci COMMENT = '源码库项目表' ROW_FORMAT = Dynamic;
-- ----------------------------
-- Records of source_project
-- ----------------------------
INSERT INTO `source_project` VALUES (100, 'dms-platform', '商用车 DMS 管理系统', 'enterprise', 'DMS', '覆盖经销商、维修工单、索赔、配件库存、服务活动和结算的商用车售后管理源码。', '# 商用车 DMS 管理系统\n\n这套源码面向商用车售后服务场景提供经销商、车辆档案、维修工单、索赔流程、配件库存和结算对账等核心能力。\n\n## 核心功能\n\n- 经销商档案、服务站和维修技师管理\n- 车辆档案、保养提醒和维修历史追踪\n- 维修工单、派工、完工质检和费用结算\n- 配件入库、出库、调拨和库存预警\n- 索赔申请、审核、结算和统计报表', 39900, 2860, '[\"Spring Boot\",\"Vue2\",\"MySQL\"]', '[\"经销商管理\",\"维修工单\",\"配件库存\",\"索赔结算\",\"服务活动\"]', '[\"汽车后市场\",\"商用车售后\",\"经销商协同\"]', '', '', '1.0.0', '', 1, '0', '0', 'admin', '2026-07-14 14:56:35', 'admin', '2026-07-14 14:56:35', NULL);
INSERT INTO `source_project` VALUES (101, 'mall-order-system', '商城订单管理系统', 'mall', 'MALL', '包含商品、订单、支付、库存、优惠券、会员和后台统计模块的商城管理源码。', '# 商城订单管理系统\n\n项目提供从商品上架到订单履约的完整后台管理能力适合作为中小型商城或订单中台的启动源码。\n\n## 功能模块\n\n- 商品分类、SKU、库存和上下架\n- 购物车、订单、支付记录和售后单\n- 优惠券、满减活动和会员等级\n- 后台统计看板和经营数据导出', 29900, 1980, '[\"Spring Cloud\",\"Redis\",\"Vue3\"]', '[\"商品中心\",\"订单中心\",\"支付记录\",\"会员体系\",\"营销活动\"]', '[\"电商后台\",\"订单运营\",\"会员营销\"]', '', '', '1.0.0', '', 2, '0', '0', 'admin', '2026-07-14 14:56:35', 'admin', '2026-07-14 14:56:35', NULL);
INSERT INTO `source_project` VALUES (102, 'oa-approval-suite', 'OA 办公审批系统', 'office', 'OA', '集成用户、角色、菜单、审批流、请假、报销、公告和文件管理的办公源码。', '# OA 办公审批系统\n\n这是一套偏企业内网办公的基础源码重点覆盖审批、公告、文件与权限管理。\n\n## 亮点\n\n- 可配置审批节点和审批人\n- 请假、报销、外出等常见办公流程\n- 公告通知、附件上传和文件归档\n- 角色、菜单、按钮级权限控制', 26800, 1750, '[\"Sa-Token\",\"Element UI\",\"工作流\"]', '[\"审批流程\",\"请假报销\",\"公告通知\",\"文件管理\",\"权限菜单\"]', '[\"企业内网\",\"行政审批\",\"协同办公\"]', '', '', '1.0.0', '', 3, '0', '0', 'admin', '2026-07-14 14:56:35', 'admin', '2026-07-14 14:56:35', NULL);
INSERT INTO `source_project` VALUES (103, 'erp-warehouse', 'ERP 仓储管理系统', 'enterprise', 'ERP', '提供采购、销售、入库、出库、盘点、供应商和库存报表模块的仓储源码。', '# ERP 仓储管理系统\n\n源码聚焦进销存和仓储管理适合小型供应链、仓库和贸易公司快速搭建业务后台。\n\n## 模块清单\n\n- 采购订单、采购入库和供应商档案\n- 销售订单、销售出库和客户档案\n- 库存流水、库存盘点和预警规则\n- Excel 导入导出与库存报表', 19900, 1320, '[\"ERP\",\"MyBatis-Plus\",\"Excel\"]', '[\"采购入库\",\"销售出库\",\"库存盘点\",\"供应商管理\",\"报表导出\"]', '[\"仓储管理\",\"进销存\",\"供应链后台\"]', '', '', '1.0.0', '', 4, '0', '0', 'admin', '2026-07-14 14:56:35', 'admin', '2026-07-14 14:56:35', NULL);
INSERT INTO `source_project` VALUES (104, 'lowcode-form-platform', '低代码表单平台', 'lowcode', 'FORM', '支持动态表单、拖拽布局、字段配置、数据字典和在线设计的低代码源码。', '# 低代码表单平台\n\n项目用于构建配置化表单和数据采集页面包含设计器、字段配置、预览和提交数据管理。\n\n## 能力范围\n\n- 拖拽式表单组件编排\n- 字段属性、校验规则和选项配置\n- 字典数据联动\n- 表单预览与数据提交记录', 49900, 980, '[\"Vue3\",\"Element Plus\",\"拖拽设计\"]', '[\"表单设计器\",\"字段配置\",\"动态校验\",\"数据字典\",\"表单预览\"]', '[\"低代码平台\",\"动态表单\",\"配置化后台\"]', '', '', '1.0.0', '', 5, '0', '0', 'admin', '2026-07-14 14:56:35', 'admin', '2026-07-14 14:56:35', NULL);
INSERT INTO `source_project` VALUES (105, 'microservice-auth-starter', '微服务权限脚手架', 'microservice', 'MS', '集成网关、认证中心、系统服务、日志服务、文件服务和监控基础能力的脚手架源码。', '# 微服务权限脚手架\n\n这套源码适合从单体后台升级到微服务架构的团队预置认证、网关、系统权限和基础监控能力。\n\n## 服务组成\n\n- Gateway 网关统一鉴权和路由\n- Auth 认证中心\n- System 系统权限服务\n- Log 操作日志服务\n- File 文件服务', 59900, 2560, '[\"Spring Cloud\",\"Nacos\",\"Gateway\"]', '[\"网关服务\",\"认证中心\",\"系统服务\",\"日志中心\",\"文件服务\"]', '[\"微服务基础架构\",\"权限平台\",\"多服务治理\"]', '', '', '1.0.0', '', 6, '0', '0', 'admin', '2026-07-14 14:56:35', 'admin', '2026-07-14 14:56:35', NULL);
-- ----------------------------
-- Table structure for source_purchase
-- ----------------------------
DROP TABLE IF EXISTS `source_purchase`;
CREATE TABLE `source_purchase` (
`purchase_id` bigint(20) NOT NULL AUTO_INCREMENT COMMENT '购买记录ID',
`project_id` bigint(20) NOT NULL COMMENT '源码项目ID',
`user_id` bigint(20) NOT NULL COMMENT '前台用户ID',
`order_no` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NOT NULL COMMENT '订单号',
`amount` bigint(20) NULL DEFAULT 0 COMMENT '金额,单位分',
`pay_status` char(1) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT '0' COMMENT '支付状态0待支付 1已支付 2已取消',
`resource_status` char(1) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT '0' COMMENT '资源状态0未发放 1已发放',
`purchase_time` datetime(0) NULL DEFAULT NULL COMMENT '购买时间',
`create_by` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT '' COMMENT '创建者',
`create_time` datetime(0) NULL DEFAULT NULL COMMENT '创建时间',
`update_by` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT '' COMMENT '更新者',
`update_time` datetime(0) NULL DEFAULT NULL COMMENT '更新时间',
`remark` varchar(500) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '备注',
PRIMARY KEY (`purchase_id`) USING BTREE,
UNIQUE INDEX `uk_source_purchase_order_no`(`order_no`) USING BTREE,
INDEX `idx_source_purchase_user`(`user_id`) USING BTREE,
INDEX `idx_source_purchase_project`(`project_id`) USING BTREE,
CONSTRAINT `fk_source_purchase_project` FOREIGN KEY (`project_id`) REFERENCES `source_project` (`project_id`) ON DELETE RESTRICT ON UPDATE RESTRICT,
CONSTRAINT `fk_source_purchase_user` FOREIGN KEY (`user_id`) REFERENCES `front_user` (`user_id`) ON DELETE RESTRICT ON UPDATE RESTRICT
) ENGINE = InnoDB AUTO_INCREMENT = 100 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_0900_ai_ci COMMENT = '源码购买记录表' ROW_FORMAT = Dynamic;
-- ----------------------------
-- Table structure for sys_code_snippet
-- ----------------------------
DROP TABLE IF EXISTS `sys_code_snippet`;
CREATE TABLE `sys_code_snippet` (
`snippet_id` bigint(20) NOT NULL AUTO_INCREMENT COMMENT '代码片段ID',
`module_id` bigint(20) NULL DEFAULT NULL COMMENT '功能模块ID',
`snippet_content` text CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NOT NULL COMMENT '代码片段内容',
`insert_point` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT '' COMMENT '插入点',
`param1` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '参数1',
`param2` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '参数2',
`param3` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '参数3',
`param4` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '参数4',
`param5` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '参数5',
`template_file_name` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT '' COMMENT '模板文件名称',
`relation_table_name` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT '' COMMENT '关联表名称',
`status` char(1) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT '0' COMMENT '状态0正常 1停用',
`del_flag` char(1) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT '0' COMMENT '删除标志0代表存在 2代表删除',
`create_by` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT '' COMMENT '创建者',
`create_time` datetime(0) NULL DEFAULT NULL COMMENT '创建时间',
`update_by` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT '' COMMENT '更新者',
`update_time` datetime(0) NULL DEFAULT NULL COMMENT '更新时间',
`remark` varchar(500) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '备注',
PRIMARY KEY (`snippet_id`) USING BTREE,
INDEX `idx_code_snippet_module_id`(`module_id`) USING BTREE,
CONSTRAINT `fk_code_snippet_module` FOREIGN KEY (`module_id`) REFERENCES `sys_module` (`module_id`) ON DELETE RESTRICT ON UPDATE RESTRICT
) ENGINE = InnoDB AUTO_INCREMENT = 100 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_0900_ai_ci COMMENT = '代码片段管理表' ROW_FORMAT = Dynamic;
-- ----------------------------
-- Table structure for sys_code_snippet_module
-- ----------------------------
DROP TABLE IF EXISTS `sys_code_snippet_module`;
CREATE TABLE `sys_code_snippet_module` (
`snippet_id` bigint(20) NOT NULL COMMENT '代码片段ID',
`module_id` bigint(20) NOT NULL COMMENT '功能模块ID',
PRIMARY KEY (`snippet_id`, `module_id`) USING BTREE,
INDEX `idx_snippet_module_module_id`(`module_id`) USING BTREE,
CONSTRAINT `fk_snippet_module_module` FOREIGN KEY (`module_id`) REFERENCES `sys_module` (`module_id`) ON DELETE RESTRICT ON UPDATE RESTRICT,
CONSTRAINT `fk_snippet_module_snippet` FOREIGN KEY (`snippet_id`) REFERENCES `sys_code_snippet` (`snippet_id`) ON DELETE RESTRICT ON UPDATE RESTRICT
) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_0900_ai_ci COMMENT = '代码片段与功能模块关系表' ROW_FORMAT = Dynamic;
-- ----------------------------
-- Table structure for sys_config
-- ----------------------------
DROP TABLE IF EXISTS `sys_config`;
CREATE TABLE `sys_config` (
`config_id` int(5) NOT NULL AUTO_INCREMENT COMMENT '参数主键',
`config_name` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT '' COMMENT '参数名称',
`config_key` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT '' COMMENT '参数键名',
`config_value` varchar(500) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT '' COMMENT '参数键值',
`config_type` char(1) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT 'N' COMMENT '系统内置Y是 N否',
`create_by` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT '' COMMENT '创建者',
`create_time` datetime(0) NULL DEFAULT NULL COMMENT '创建时间',
`update_by` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT '' COMMENT '更新者',
`update_time` datetime(0) NULL DEFAULT NULL COMMENT '更新时间',
`remark` varchar(500) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '备注',
PRIMARY KEY (`config_id`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 100 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_0900_ai_ci COMMENT = '参数配置表' ROW_FORMAT = Dynamic;
-- ----------------------------
-- Records of sys_config
-- ----------------------------
INSERT INTO `sys_config` VALUES (1, '主框架页-默认皮肤样式名称', 'sys.index.skinName', 'skin-blue', 'Y', 'admin', '2026-07-14 14:56:30', '', NULL, '蓝色 skin-blue、绿色 skin-green、紫色 skin-purple、红色 skin-red、黄色 skin-yellow');
INSERT INTO `sys_config` VALUES (2, '用户管理-账号初始密码', 'sys.user.initPassword', '123456', 'Y', 'admin', '2026-07-14 14:56:30', '', NULL, '初始化密码 123456');
INSERT INTO `sys_config` VALUES (3, '主框架页-侧边栏主题', 'sys.index.sideTheme', 'theme-dark', 'Y', 'admin', '2026-07-14 14:56:30', '', NULL, '深色主题theme-dark浅色主题theme-light');
INSERT INTO `sys_config` VALUES (4, '账号自助-验证码开关', 'sys.account.captchaEnabled', 'true', 'Y', 'admin', '2026-07-14 14:56:30', '', NULL, '是否开启验证码功能true开启false关闭');
INSERT INTO `sys_config` VALUES (5, '账号自助-是否开启用户注册功能', 'sys.account.registerUser', 'false', 'Y', 'admin', '2026-07-14 14:56:30', '', NULL, '是否开启注册用户功能true开启false关闭');
INSERT INTO `sys_config` VALUES (6, '用户登录-黑名单列表', 'sys.login.blackIPList', '', 'Y', 'admin', '2026-07-14 14:56:30', '', NULL, '设置登录IP黑名单限制多个匹配项以;分隔,支持匹配(*通配、网段)');
-- ----------------------------
-- Table structure for sys_datasource
-- ----------------------------
DROP TABLE IF EXISTS `sys_datasource`;
CREATE TABLE `sys_datasource` (
`datasource_id` bigint(20) NOT NULL AUTO_INCREMENT COMMENT '数据源ID',
`datasource_name` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NOT NULL COMMENT '数据源名称',
`driver` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT 'com.mysql.cj.jdbc.Driver' COMMENT '数据库驱动',
`url` varchar(1000) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NOT NULL COMMENT '数据源URL',
`user` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NOT NULL COMMENT '用户名',
`password` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '密码',
PRIMARY KEY (`datasource_id`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 100 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_0900_ai_ci COMMENT = '数据源信息表' ROW_FORMAT = Dynamic;
-- ----------------------------
-- Table structure for sys_dept
-- ----------------------------
DROP TABLE IF EXISTS `sys_dept`;
CREATE TABLE `sys_dept` (
`dept_id` bigint(20) NOT NULL AUTO_INCREMENT COMMENT '部门id',
`parent_id` bigint(20) NULL DEFAULT 0 COMMENT '父部门id',
`ancestors` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT '' COMMENT '祖级列表',
`dept_name` varchar(30) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT '' COMMENT '部门名称',
`order_num` int(4) NULL DEFAULT 0 COMMENT '显示顺序',
`leader` varchar(20) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '负责人',
`phone` varchar(11) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '联系电话',
`email` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '邮箱',
`status` char(1) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT '0' COMMENT '部门状态0正常 1停用',
`del_flag` char(1) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT '0' COMMENT '删除标志0代表存在 2代表删除',
`create_by` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT '' COMMENT '创建者',
`create_time` datetime(0) NULL DEFAULT NULL COMMENT '创建时间',
`update_by` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT '' COMMENT '更新者',
`update_time` datetime(0) NULL DEFAULT NULL COMMENT '更新时间',
PRIMARY KEY (`dept_id`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 200 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_0900_ai_ci COMMENT = '部门表' ROW_FORMAT = Dynamic;
-- ----------------------------
-- Records of sys_dept
-- ----------------------------
INSERT INTO `sys_dept` VALUES (100, 0, '0', '若依科技', 0, '若依', '15888888888', 'ry@qq.com', '0', '0', 'admin', '2026-07-14 14:56:29', '', NULL);
INSERT INTO `sys_dept` VALUES (101, 100, '0,100', '深圳总公司', 1, '若依', '15888888888', 'ry@qq.com', '0', '0', 'admin', '2026-07-14 14:56:29', '', NULL);
INSERT INTO `sys_dept` VALUES (102, 100, '0,100', '长沙分公司', 2, '若依', '15888888888', 'ry@qq.com', '0', '0', 'admin', '2026-07-14 14:56:29', '', NULL);
INSERT INTO `sys_dept` VALUES (103, 101, '0,100,101', '研发部门', 1, '若依', '15888888888', 'ry@qq.com', '0', '0', 'admin', '2026-07-14 14:56:29', '', NULL);
INSERT INTO `sys_dept` VALUES (104, 101, '0,100,101', '市场部门', 2, '若依', '15888888888', 'ry@qq.com', '0', '0', 'admin', '2026-07-14 14:56:29', '', NULL);
INSERT INTO `sys_dept` VALUES (105, 101, '0,100,101', '测试部门', 3, '若依', '15888888888', 'ry@qq.com', '0', '0', 'admin', '2026-07-14 14:56:29', '', NULL);
INSERT INTO `sys_dept` VALUES (106, 101, '0,100,101', '财务部门', 4, '若依', '15888888888', 'ry@qq.com', '0', '0', 'admin', '2026-07-14 14:56:29', '', NULL);
INSERT INTO `sys_dept` VALUES (107, 101, '0,100,101', '运维部门', 5, '若依', '15888888888', 'ry@qq.com', '0', '0', 'admin', '2026-07-14 14:56:29', '', NULL);
INSERT INTO `sys_dept` VALUES (108, 102, '0,100,102', '市场部门', 1, '若依', '15888888888', 'ry@qq.com', '0', '0', 'admin', '2026-07-14 14:56:29', '', NULL);
INSERT INTO `sys_dept` VALUES (109, 102, '0,100,102', '财务部门', 2, '若依', '15888888888', 'ry@qq.com', '0', '0', 'admin', '2026-07-14 14:56:29', '', NULL);
-- ----------------------------
-- Table structure for sys_dict_data
-- ----------------------------
DROP TABLE IF EXISTS `sys_dict_data`;
CREATE TABLE `sys_dict_data` (
`dict_code` bigint(20) NOT NULL AUTO_INCREMENT COMMENT '字典编码',
`dict_sort` int(4) NULL DEFAULT 0 COMMENT '字典排序',
`dict_label` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT '' COMMENT '字典标签',
`dict_value` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT '' COMMENT '字典键值',
`dict_type` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT '' COMMENT '字典类型',
`css_class` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '样式属性(其他样式扩展)',
`list_class` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '表格回显样式',
`is_default` char(1) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT 'N' COMMENT '是否默认Y是 N否',
`status` char(1) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT '0' COMMENT '状态0正常 1停用',
`create_by` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT '' COMMENT '创建者',
`create_time` datetime(0) NULL DEFAULT NULL COMMENT '创建时间',
`update_by` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT '' COMMENT '更新者',
`update_time` datetime(0) NULL DEFAULT NULL COMMENT '更新时间',
`remark` varchar(500) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '备注',
PRIMARY KEY (`dict_code`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 100 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_0900_ai_ci COMMENT = '字典数据表' ROW_FORMAT = Dynamic;
-- ----------------------------
-- Records of sys_dict_data
-- ----------------------------
INSERT INTO `sys_dict_data` VALUES (1, 1, '男', '0', 'sys_user_sex', '', '', 'Y', '0', 'admin', '2026-07-14 14:56:30', '', NULL, '性别男');
INSERT INTO `sys_dict_data` VALUES (2, 2, '女', '1', 'sys_user_sex', '', '', 'N', '0', 'admin', '2026-07-14 14:56:30', '', NULL, '性别女');
INSERT INTO `sys_dict_data` VALUES (3, 3, '未知', '2', 'sys_user_sex', '', '', 'N', '0', 'admin', '2026-07-14 14:56:30', '', NULL, '性别未知');
INSERT INTO `sys_dict_data` VALUES (4, 1, '显示', '0', 'sys_show_hide', '', 'primary', 'Y', '0', 'admin', '2026-07-14 14:56:30', '', NULL, '显示菜单');
INSERT INTO `sys_dict_data` VALUES (5, 2, '隐藏', '1', 'sys_show_hide', '', 'danger', 'N', '0', 'admin', '2026-07-14 14:56:30', '', NULL, '隐藏菜单');
INSERT INTO `sys_dict_data` VALUES (6, 1, '正常', '0', 'sys_normal_disable', '', 'primary', 'Y', '0', 'admin', '2026-07-14 14:56:30', '', NULL, '正常状态');
INSERT INTO `sys_dict_data` VALUES (7, 2, '停用', '1', 'sys_normal_disable', '', 'danger', 'N', '0', 'admin', '2026-07-14 14:56:30', '', NULL, '停用状态');
INSERT INTO `sys_dict_data` VALUES (8, 1, '正常', '0', 'sys_job_status', '', 'primary', 'Y', '0', 'admin', '2026-07-14 14:56:30', '', NULL, '正常状态');
INSERT INTO `sys_dict_data` VALUES (9, 2, '暂停', '1', 'sys_job_status', '', 'danger', 'N', '0', 'admin', '2026-07-14 14:56:30', '', NULL, '停用状态');
INSERT INTO `sys_dict_data` VALUES (10, 1, '默认', 'DEFAULT', 'sys_job_group', '', '', 'Y', '0', 'admin', '2026-07-14 14:56:30', '', NULL, '默认分组');
INSERT INTO `sys_dict_data` VALUES (11, 2, '系统', 'SYSTEM', 'sys_job_group', '', '', 'N', '0', 'admin', '2026-07-14 14:56:30', '', NULL, '系统分组');
INSERT INTO `sys_dict_data` VALUES (12, 1, '是', 'Y', 'sys_yes_no', '', 'primary', 'Y', '0', 'admin', '2026-07-14 14:56:30', '', NULL, '系统默认是');
INSERT INTO `sys_dict_data` VALUES (13, 2, '否', 'N', 'sys_yes_no', '', 'danger', 'N', '0', 'admin', '2026-07-14 14:56:30', '', NULL, '系统默认否');
INSERT INTO `sys_dict_data` VALUES (14, 1, '通知', '1', 'sys_notice_type', '', 'warning', 'Y', '0', 'admin', '2026-07-14 14:56:30', '', NULL, '通知');
INSERT INTO `sys_dict_data` VALUES (15, 2, '公告', '2', 'sys_notice_type', '', 'success', 'N', '0', 'admin', '2026-07-14 14:56:30', '', NULL, '公告');
INSERT INTO `sys_dict_data` VALUES (16, 1, '正常', '0', 'sys_notice_status', '', 'primary', 'Y', '0', 'admin', '2026-07-14 14:56:30', '', NULL, '正常状态');
INSERT INTO `sys_dict_data` VALUES (17, 2, '关闭', '1', 'sys_notice_status', '', 'danger', 'N', '0', 'admin', '2026-07-14 14:56:30', '', NULL, '关闭状态');
INSERT INTO `sys_dict_data` VALUES (18, 99, '其他', '0', 'sys_oper_type', '', 'info', 'N', '0', 'admin', '2026-07-14 14:56:30', '', NULL, '其他操作');
INSERT INTO `sys_dict_data` VALUES (19, 1, '新增', '1', 'sys_oper_type', '', 'info', 'N', '0', 'admin', '2026-07-14 14:56:30', '', NULL, '新增操作');
INSERT INTO `sys_dict_data` VALUES (20, 2, '修改', '2', 'sys_oper_type', '', 'info', 'N', '0', 'admin', '2026-07-14 14:56:30', '', NULL, '修改操作');
INSERT INTO `sys_dict_data` VALUES (21, 3, '删除', '3', 'sys_oper_type', '', 'danger', 'N', '0', 'admin', '2026-07-14 14:56:30', '', NULL, '删除操作');
INSERT INTO `sys_dict_data` VALUES (22, 4, '授权', '4', 'sys_oper_type', '', 'primary', 'N', '0', 'admin', '2026-07-14 14:56:30', '', NULL, '授权操作');
INSERT INTO `sys_dict_data` VALUES (23, 5, '导出', '5', 'sys_oper_type', '', 'warning', 'N', '0', 'admin', '2026-07-14 14:56:30', '', NULL, '导出操作');
INSERT INTO `sys_dict_data` VALUES (24, 6, '导入', '6', 'sys_oper_type', '', 'warning', 'N', '0', 'admin', '2026-07-14 14:56:30', '', NULL, '导入操作');
INSERT INTO `sys_dict_data` VALUES (25, 7, '强退', '7', 'sys_oper_type', '', 'danger', 'N', '0', 'admin', '2026-07-14 14:56:30', '', NULL, '强退操作');
INSERT INTO `sys_dict_data` VALUES (26, 8, '生成代码', '8', 'sys_oper_type', '', 'warning', 'N', '0', 'admin', '2026-07-14 14:56:30', '', NULL, '生成操作');
INSERT INTO `sys_dict_data` VALUES (27, 9, '清空数据', '9', 'sys_oper_type', '', 'danger', 'N', '0', 'admin', '2026-07-14 14:56:30', '', NULL, '清空操作');
INSERT INTO `sys_dict_data` VALUES (28, 1, '成功', '0', 'sys_common_status', '', 'primary', 'N', '0', 'admin', '2026-07-14 14:56:30', '', NULL, '正常状态');
INSERT INTO `sys_dict_data` VALUES (29, 2, '失败', '1', 'sys_common_status', '', 'danger', 'N', '0', 'admin', '2026-07-14 14:56:30', '', NULL, '停用状态');
INSERT INTO `sys_dict_data` VALUES (30, 1, '企业管理系统', 'enterprise', 'source_project_category', '', 'primary', 'Y', '0', 'admin', '2026-07-14 14:56:30', '', NULL, '源码分类-企业管理系统');
INSERT INTO `sys_dict_data` VALUES (31, 2, '商城系统', 'mall', 'source_project_category', '', 'success', 'N', '0', 'admin', '2026-07-14 14:56:30', '', NULL, '源码分类-商城系统');
INSERT INTO `sys_dict_data` VALUES (32, 3, 'OA 办公', 'office', 'source_project_category', '', 'info', 'N', '0', 'admin', '2026-07-14 14:56:30', '', NULL, '源码分类-OA 办公');
INSERT INTO `sys_dict_data` VALUES (33, 4, '低代码平台', 'lowcode', 'source_project_category', '', 'warning', 'N', '0', 'admin', '2026-07-14 14:56:30', '', NULL, '源码分类-低代码平台');
INSERT INTO `sys_dict_data` VALUES (34, 5, '微服务脚手架', 'microservice', 'source_project_category', '', 'danger', 'N', '0', 'admin', '2026-07-14 14:56:30', '', NULL, '源码分类-微服务脚手架');
-- ----------------------------
-- Table structure for sys_dict_type
-- ----------------------------
DROP TABLE IF EXISTS `sys_dict_type`;
CREATE TABLE `sys_dict_type` (
`dict_id` bigint(20) NOT NULL AUTO_INCREMENT COMMENT '字典主键',
`dict_name` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT '' COMMENT '字典名称',
`dict_type` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT '' COMMENT '字典类型',
`status` char(1) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT '0' COMMENT '状态0正常 1停用',
`create_by` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT '' COMMENT '创建者',
`create_time` datetime(0) NULL DEFAULT NULL COMMENT '创建时间',
`update_by` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT '' COMMENT '更新者',
`update_time` datetime(0) NULL DEFAULT NULL COMMENT '更新时间',
`remark` varchar(500) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '备注',
PRIMARY KEY (`dict_id`) USING BTREE,
UNIQUE INDEX `dict_type`(`dict_type`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 100 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_0900_ai_ci COMMENT = '字典类型表' ROW_FORMAT = Dynamic;
-- ----------------------------
-- Records of sys_dict_type
-- ----------------------------
INSERT INTO `sys_dict_type` VALUES (1, '用户性别', 'sys_user_sex', '0', 'admin', '2026-07-14 14:56:30', '', NULL, '用户性别列表');
INSERT INTO `sys_dict_type` VALUES (2, '菜单状态', 'sys_show_hide', '0', 'admin', '2026-07-14 14:56:30', '', NULL, '菜单状态列表');
INSERT INTO `sys_dict_type` VALUES (3, '系统开关', 'sys_normal_disable', '0', 'admin', '2026-07-14 14:56:30', '', NULL, '系统开关列表');
INSERT INTO `sys_dict_type` VALUES (4, '任务状态', 'sys_job_status', '0', 'admin', '2026-07-14 14:56:30', '', NULL, '任务状态列表');
INSERT INTO `sys_dict_type` VALUES (5, '任务分组', 'sys_job_group', '0', 'admin', '2026-07-14 14:56:30', '', NULL, '任务分组列表');
INSERT INTO `sys_dict_type` VALUES (6, '系统是否', 'sys_yes_no', '0', 'admin', '2026-07-14 14:56:30', '', NULL, '系统是否列表');
INSERT INTO `sys_dict_type` VALUES (7, '通知类型', 'sys_notice_type', '0', 'admin', '2026-07-14 14:56:30', '', NULL, '通知类型列表');
INSERT INTO `sys_dict_type` VALUES (8, '通知状态', 'sys_notice_status', '0', 'admin', '2026-07-14 14:56:30', '', NULL, '通知状态列表');
INSERT INTO `sys_dict_type` VALUES (9, '操作类型', 'sys_oper_type', '0', 'admin', '2026-07-14 14:56:30', '', NULL, '操作类型列表');
INSERT INTO `sys_dict_type` VALUES (10, '系统状态', 'sys_common_status', '0', 'admin', '2026-07-14 14:56:30', '', NULL, '登录状态列表');
INSERT INTO `sys_dict_type` VALUES (11, '源码分类', 'source_project_category', '0', 'admin', '2026-07-14 14:56:30', '', NULL, '源码库分类列表');
-- ----------------------------
-- Table structure for sys_job
-- ----------------------------
DROP TABLE IF EXISTS `sys_job`;
CREATE TABLE `sys_job` (
`job_id` bigint(20) NOT NULL AUTO_INCREMENT COMMENT '任务ID',
`job_name` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NOT NULL DEFAULT '' COMMENT '任务名称',
`job_group` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NOT NULL DEFAULT 'DEFAULT' COMMENT '任务组名',
`invoke_target` varchar(500) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NOT NULL COMMENT '调用目标字符串',
`cron_expression` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT '' COMMENT 'cron执行表达式',
`misfire_policy` varchar(20) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT '3' COMMENT '计划执行错误策略1立即执行 2执行一次 3放弃执行',
`concurrent` char(1) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT '1' COMMENT '是否并发执行0允许 1禁止',
`status` char(1) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT '0' COMMENT '状态0正常 1暂停',
`create_by` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT '' COMMENT '创建者',
`create_time` datetime(0) NULL DEFAULT NULL COMMENT '创建时间',
`update_by` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT '' COMMENT '更新者',
`update_time` datetime(0) NULL DEFAULT NULL COMMENT '更新时间',
`remark` varchar(500) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT '' COMMENT '备注信息',
PRIMARY KEY (`job_id`, `job_name`, `job_group`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 100 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_0900_ai_ci COMMENT = '定时任务调度表' ROW_FORMAT = Dynamic;
-- ----------------------------
-- Records of sys_job
-- ----------------------------
INSERT INTO `sys_job` VALUES (1, '系统默认(无参)', 'DEFAULT', 'ryTask.ryNoParams', '0/10 * * * * ?', '3', '1', '1', 'admin', '2026-07-14 14:56:30', '', NULL, '');
INSERT INTO `sys_job` VALUES (2, '系统默认(有参)', 'DEFAULT', 'ryTask.ryParams(\'ry\')', '0/15 * * * * ?', '3', '1', '1', 'admin', '2026-07-14 14:56:30', '', NULL, '');
INSERT INTO `sys_job` VALUES (3, '系统默认(多参)', 'DEFAULT', 'ryTask.ryMultipleParams(\'ry\', true, 2000L, 316.50D, 100)', '0/20 * * * * ?', '3', '1', '1', 'admin', '2026-07-14 14:56:30', '', NULL, '');
-- ----------------------------
-- Table structure for sys_job_log
-- ----------------------------
DROP TABLE IF EXISTS `sys_job_log`;
CREATE TABLE `sys_job_log` (
`job_log_id` bigint(20) NOT NULL AUTO_INCREMENT COMMENT '任务日志ID',
`job_name` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NOT NULL COMMENT '任务名称',
`job_group` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NOT NULL COMMENT '任务组名',
`invoke_target` varchar(500) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NOT NULL COMMENT '调用目标字符串',
`job_message` varchar(500) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '日志信息',
`status` char(1) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT '0' COMMENT '执行状态0正常 1失败',
`exception_info` varchar(2000) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT '' COMMENT '异常信息',
`create_time` datetime(0) NULL DEFAULT NULL COMMENT '创建时间',
PRIMARY KEY (`job_log_id`) USING BTREE
) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_0900_ai_ci COMMENT = '定时任务调度日志表' ROW_FORMAT = Dynamic;
-- ----------------------------
-- Table structure for sys_logininfor
-- ----------------------------
DROP TABLE IF EXISTS `sys_logininfor`;
CREATE TABLE `sys_logininfor` (
`info_id` bigint(20) NOT NULL AUTO_INCREMENT COMMENT '访问ID',
`user_name` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT '' COMMENT '用户账号',
`ipaddr` varchar(128) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT '' COMMENT '登录IP地址',
`login_location` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT '' COMMENT '登录地点',
`browser` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT '' COMMENT '浏览器类型',
`os` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT '' COMMENT '操作系统',
`status` char(1) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT '0' COMMENT '登录状态0成功 1失败',
`msg` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT '' COMMENT '提示消息',
`login_time` datetime(0) NULL DEFAULT NULL COMMENT '访问时间',
PRIMARY KEY (`info_id`) USING BTREE,
INDEX `idx_sys_logininfor_s`(`status`) USING BTREE,
INDEX `idx_sys_logininfor_lt`(`login_time`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 100 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_0900_ai_ci COMMENT = '系统访问记录' ROW_FORMAT = Dynamic;
-- ----------------------------
-- Records of sys_logininfor
-- ----------------------------
INSERT INTO `sys_logininfor` VALUES (100, 'admin', '127.0.0.1', '内网IP', 'Chrome 15', 'Windows 10', '0', '退出成功', '2026-07-14 14:57:06');
INSERT INTO `sys_logininfor` VALUES (101, 'admin', '127.0.0.1', '内网IP', 'Chrome 15', 'Windows 10', '0', '登录成功', '2026-07-14 14:57:09');
INSERT INTO `sys_logininfor` VALUES (102, 'admin', '127.0.0.1', '内网IP', 'Mozilla', 'Windows 10', '0', '登录成功', '2026-07-14 15:04:35');
INSERT INTO `sys_logininfor` VALUES (103, 'admin', '127.0.0.1', '内网IP', 'Chrome 15', 'Windows 10', '1', '验证码错误', '2026-07-14 17:23:15');
INSERT INTO `sys_logininfor` VALUES (104, 'admin', '127.0.0.1', '内网IP', 'Chrome 15', 'Windows 10', '0', '登录成功', '2026-07-14 17:23:19');
INSERT INTO `sys_logininfor` VALUES (105, 'admin', '127.0.0.1', '内网IP', 'Chrome 15', 'Windows 10', '0', '退出成功', '2026-07-14 17:49:05');
INSERT INTO `sys_logininfor` VALUES (106, 'admin', '127.0.0.1', '内网IP', 'Chrome 15', 'Windows 10', '0', '登录成功', '2026-07-14 17:49:09');
INSERT INTO `sys_logininfor` VALUES (107, 'admin', '127.0.0.1', '内网IP', 'Chrome 15', 'Windows 10', '0', '登录成功', '2026-07-14 22:01:45');
INSERT INTO `sys_logininfor` VALUES (108, 'admin', '127.0.0.1', '内网IP', 'Chrome 15', 'Windows 10', '0', '登录成功', '2026-07-15 10:31:58');
INSERT INTO `sys_logininfor` VALUES (109, 'admin', '127.0.0.1', '内网IP', 'Chrome 15', 'Windows 10', '0', '登录成功', '2026-07-15 12:12:05');
-- ----------------------------
-- Table structure for sys_menu
-- ----------------------------
DROP TABLE IF EXISTS `sys_menu`;
CREATE TABLE `sys_menu` (
`menu_id` bigint(20) NOT NULL AUTO_INCREMENT COMMENT '菜单ID',
`menu_name` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NOT NULL COMMENT '菜单名称',
`parent_id` bigint(20) NULL DEFAULT 0 COMMENT '父菜单ID',
`order_num` int(4) NULL DEFAULT 0 COMMENT '显示顺序',
`path` varchar(200) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT '' COMMENT '路由地址',
`component` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '组件路径',
`query` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '路由参数',
`route_name` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT '' COMMENT '路由名称',
`is_frame` int(1) NULL DEFAULT 1 COMMENT '是否为外链0是 1否',
`is_cache` int(1) NULL DEFAULT 0 COMMENT '是否缓存0缓存 1不缓存',
`menu_type` char(1) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT '' COMMENT '菜单类型M目录 C菜单 F按钮',
`visible` char(1) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT '0' COMMENT '菜单状态0显示 1隐藏',
`status` char(1) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT '0' COMMENT '菜单状态0正常 1停用',
`perms` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '权限标识',
`icon` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT '#' COMMENT '菜单图标',
`create_by` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT '' COMMENT '创建者',
`create_time` datetime(0) NULL DEFAULT NULL COMMENT '创建时间',
`update_by` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT '' COMMENT '更新者',
`update_time` datetime(0) NULL DEFAULT NULL COMMENT '更新时间',
`remark` varchar(500) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT '' COMMENT '备注',
PRIMARY KEY (`menu_id`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 2000 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_0900_ai_ci COMMENT = '菜单权限表' ROW_FORMAT = Dynamic;
-- ----------------------------
-- Records of sys_menu
-- ----------------------------
INSERT INTO `sys_menu` VALUES (1, '系统运维', 0, 4, 'systemOps', NULL, '', '', 1, 0, 'M', '0', '0', '', 'monitor', 'admin', '2026-07-14 14:56:29', '', '2026-07-14 17:48:49', '系统管理与运行维护目录');
INSERT INTO `sys_menu` VALUES (100, '用户管理', 1, 1, 'user', 'system/user/index', '', '', 1, 0, 'C', '0', '0', 'system:user:list', 'user', 'admin', '2026-07-14 14:56:29', '', NULL, '用户管理菜单');
INSERT INTO `sys_menu` VALUES (101, '角色管理', 1, 2, 'role', 'system/role/index', '', '', 1, 0, 'C', '0', '0', 'system:role:list', 'peoples', 'admin', '2026-07-14 14:56:29', '', NULL, '角色管理菜单');
INSERT INTO `sys_menu` VALUES (102, '菜单管理', 1, 3, 'menu', 'system/menu/index', '', '', 1, 0, 'C', '0', '0', 'system:menu:list', 'tree-table', 'admin', '2026-07-14 14:56:29', '', NULL, '菜单管理菜单');
INSERT INTO `sys_menu` VALUES (103, '部门管理', 1, 4, 'dept', 'system/dept/index', '', '', 1, 0, 'C', '0', '0', 'system:dept:list', 'tree', 'admin', '2026-07-14 14:56:29', '', NULL, '部门管理菜单');
INSERT INTO `sys_menu` VALUES (104, '岗位管理', 1, 5, 'post', 'system/post/index', '', '', 1, 0, 'C', '0', '0', 'system:post:list', 'post', 'admin', '2026-07-14 14:56:29', '', NULL, '岗位管理菜单');
INSERT INTO `sys_menu` VALUES (105, '字典管理', 1, 6, 'dict', 'system/dict/index', '', '', 1, 0, 'C', '0', '0', 'system:dict:list', 'dict', 'admin', '2026-07-14 14:56:29', '', NULL, '字典管理菜单');
INSERT INTO `sys_menu` VALUES (106, '参数设置', 1, 7, 'config', 'system/config/index', '', '', 1, 0, 'C', '0', '0', 'system:config:list', 'edit', 'admin', '2026-07-14 14:56:29', '', NULL, '参数设置菜单');
INSERT INTO `sys_menu` VALUES (107, '通知公告', 1, 8, 'notice', 'system/notice/index', '', '', 1, 0, 'C', '0', '0', 'system:notice:list', 'message', 'admin', '2026-07-14 14:56:29', '', NULL, '通知公告菜单');
INSERT INTO `sys_menu` VALUES (108, '日志管理', 1, 9, 'log', '', '', '', 1, 0, 'M', '0', '0', '', 'log', 'admin', '2026-07-14 14:56:29', '', NULL, '日志管理菜单');
INSERT INTO `sys_menu` VALUES (109, '在线用户', 1, 10, 'online', 'monitor/online/index', '', '', 1, 0, 'C', '0', '0', 'monitor:online:list', 'online', 'admin', '2026-07-14 14:56:29', '', '2026-07-14 17:48:49', '在线用户菜单');
INSERT INTO `sys_menu` VALUES (110, '定时任务', 1, 98, 'job', 'monitor/job/index', '', '', 1, 0, 'C', '1', '0', 'monitor:job:list', 'job', 'admin', '2026-07-14 14:56:29', '', '2026-07-14 17:48:49', '定时任务菜单');
INSERT INTO `sys_menu` VALUES (111, '数据监控', 1, 11, 'druid', 'monitor/druid/index', '', '', 1, 0, 'C', '0', '0', 'monitor:druid:list', 'druid', 'admin', '2026-07-14 14:56:29', '', '2026-07-14 17:48:49', '数据监控菜单');
INSERT INTO `sys_menu` VALUES (112, '服务监控', 1, 12, 'server', 'monitor/server/index', '', '', 1, 0, 'C', '0', '0', 'monitor:server:list', 'server', 'admin', '2026-07-14 14:56:29', '', '2026-07-14 17:48:49', '服务监控菜单');
INSERT INTO `sys_menu` VALUES (113, '缓存监控', 1, 13, 'cache', 'monitor/cache/index', '', '', 1, 0, 'C', '0', '0', 'monitor:cache:list', 'redis', 'admin', '2026-07-14 14:56:29', '', '2026-07-14 17:48:49', '缓存监控菜单');
INSERT INTO `sys_menu` VALUES (114, '缓存列表', 1, 14, 'cacheList', 'monitor/cache/list', '', '', 1, 0, 'C', '0', '0', 'monitor:cache:list', 'redis-list', 'admin', '2026-07-14 14:56:29', '', '2026-07-14 17:48:49', '缓存列表菜单');
INSERT INTO `sys_menu` VALUES (115, '表单构建', 1, 99, 'build', 'tool/build/index', '', '', 1, 0, 'C', '1', '0', 'tool:build:list', 'build', 'admin', '2026-07-14 14:56:29', '', '2026-07-14 17:48:49', '表单构建菜单');
INSERT INTO `sys_menu` VALUES (117, '系统接口', 1, 15, 'swagger', 'tool/swagger/index', '', '', 1, 0, 'C', '0', '0', 'tool:swagger:list', 'swagger', 'admin', '2026-07-14 14:56:29', '', '2026-07-14 17:48:49', '系统接口菜单');
INSERT INTO `sys_menu` VALUES (118, '生成配置', 0, 2, 'generationConfig', NULL, '', '', 1, 0, 'M', '0', '0', '', 'code', 'admin', '2026-07-14 14:56:29', '', '2026-07-14 17:48:49', '代码生成配置目录');
INSERT INTO `sys_menu` VALUES (121, '模板管理', 118, 1, 'template', 'generator/template/index', '', '', 1, 0, 'C', '0', '0', 'generator:template:list', 'code', 'admin', '2026-07-14 14:56:29', '', '2026-07-14 17:48:49', '模板管理菜单');
INSERT INTO `sys_menu` VALUES (122, '项目结构', 118, 2, 'structure', 'generator/structure/index', '', '', 1, 0, 'C', '0', '0', 'generator:structure:list', 'tree', 'admin', '2026-07-14 14:56:29', '', '2026-07-14 17:48:49', '项目结构菜单');
INSERT INTO `sys_menu` VALUES (125, '源码库管理', 200, 3, 'sourceProject', 'generator/sourceProject/index', '', '', 1, 0, 'C', '0', '0', 'generator:sourceProject:list', 'code', 'admin', '2026-07-14 14:56:29', '', '2026-07-14 17:48:49', '源码库管理菜单');
INSERT INTO `sys_menu` VALUES (126, '源码购买记录', 200, 4, 'sourcePurchase', 'generator/sourcePurchase/index', '', '', 1, 0, 'C', '0', '0', 'generator:sourcePurchase:list', 'money', 'admin', '2026-07-14 14:56:29', '', '2026-07-14 17:48:49', '源码购买记录菜单');
INSERT INTO `sys_menu` VALUES (127, '模板反向生成', 118, 3, 'templateImport', 'generator/templateImport/index', '', '', 1, 0, 'C', '0', '0', 'generator:template:import', 'upload', 'admin', '2026-07-14 14:56:29', '', '2026-07-14 17:48:49', '模板反向生成菜单');
INSERT INTO `sys_menu` VALUES (128, 'AI用量统计', 201, 2, 'aiUsage', 'generator/aiUsage/index', '', '', 1, 0, 'C', '0', '0', 'generator:aiUsage:list', 'chart', 'admin', '2026-07-14 14:56:29', '', '2026-07-14 17:48:49', 'AI用量统计菜单');
INSERT INTO `sys_menu` VALUES (129, '模板包管理', 118, 4, 'templateBundle', 'generator/templateBundle/index', '', '', 1, 0, 'C', '0', '0', 'generator:templateBundle:list', 'code', 'admin', '2026-07-14 14:56:29', '', '2026-07-14 17:48:49', '模板包管理菜单');
INSERT INTO `sys_menu` VALUES (130, '页面主题管理', 118, 12, 'pageTheme', 'generator/pageTheme/index', '', '', 1, 0, 'C', '0', '0', 'generator:pageTheme:list', 'theme', 'admin', '2026-07-14 14:56:29', '', NULL, '页面主题管理菜单');
INSERT INTO `sys_menu` VALUES (131, '布局模板管理', 118, 13, 'pageLayout', 'generator/pageLayout/index', '', '', 1, 0, 'C', '0', '0', 'generator:pageLayout:list', 'component', 'admin', '2026-07-14 14:56:29', '', NULL, '布局模板管理菜单');
INSERT INTO `sys_menu` VALUES (132, 'Prompt 中心', 201, 3, 'promptRegistry', 'generator/prompt/index', '', '', 1, 0, 'C', '0', '0', 'generator:prompt:list', 'message', 'admin', '2026-07-14 14:56:54', '', '2026-07-14 17:48:49', 'Prompt 模板与发布版本管理');
INSERT INTO `sys_menu` VALUES (200, '前台运营', 0, 1, 'frontOps', NULL, '', '', 1, 0, 'M', '0', '0', '', 'peoples', 'admin', '2026-07-14 17:48:49', '', NULL, '前台业务运营目录');
INSERT INTO `sys_menu` VALUES (201, 'AI运营', 0, 3, 'aiOps', NULL, '', '', 1, 0, 'M', '0', '0', '', 'chart', 'admin', '2026-07-14 17:48:49', '', NULL, 'AI任务与用量运营目录');
INSERT INTO `sys_menu` VALUES (202, '前台用户管理', 200, 1, 'frontUser', 'generator/frontUser/index', '', '', 1, 0, 'C', '0', '0', 'generator:frontUser:list', 'user', 'admin', '2026-07-14 17:48:49', '', NULL, '管理front_user与AI额度');
INSERT INTO `sys_menu` VALUES (203, '前台项目管理', 200, 2, 'frontProject', 'generator/frontProject/index', '', '', 1, 0, 'C', '0', '0', 'generator:frontProject:list', 'project', 'admin', '2026-07-14 17:48:49', '', NULL, '管理front_project与生成记录');
INSERT INTO `sys_menu` VALUES (204, 'AI任务管理', 201, 1, 'aiTask', 'generator/aiTask/index', '', '', 1, 0, 'C', '0', '0', 'generator:aiTask:list', 'job', 'admin', '2026-07-14 17:48:49', '', NULL, '查看、重试和取消前台AI任务');
INSERT INTO `sys_menu` VALUES (500, '操作日志', 108, 1, 'operlog', 'monitor/operlog/index', '', '', 1, 0, 'C', '0', '0', 'monitor:operlog:list', 'form', 'admin', '2026-07-14 14:56:29', '', NULL, '操作日志菜单');
INSERT INTO `sys_menu` VALUES (501, '登录日志', 108, 2, 'logininfor', 'monitor/logininfor/index', '', '', 1, 0, 'C', '0', '0', 'monitor:logininfor:list', 'logininfor', 'admin', '2026-07-14 14:56:29', '', NULL, '登录日志菜单');
INSERT INTO `sys_menu` VALUES (1000, '用户查询', 100, 1, '', '', '', '', 1, 0, 'F', '0', '0', 'system:user:query', '#', 'admin', '2026-07-14 14:56:29', '', NULL, '');
INSERT INTO `sys_menu` VALUES (1001, '用户新增', 100, 2, '', '', '', '', 1, 0, 'F', '0', '0', 'system:user:add', '#', 'admin', '2026-07-14 14:56:29', '', NULL, '');
INSERT INTO `sys_menu` VALUES (1002, '用户修改', 100, 3, '', '', '', '', 1, 0, 'F', '0', '0', 'system:user:edit', '#', 'admin', '2026-07-14 14:56:29', '', NULL, '');
INSERT INTO `sys_menu` VALUES (1003, '用户删除', 100, 4, '', '', '', '', 1, 0, 'F', '0', '0', 'system:user:remove', '#', 'admin', '2026-07-14 14:56:29', '', NULL, '');
INSERT INTO `sys_menu` VALUES (1004, '用户导出', 100, 5, '', '', '', '', 1, 0, 'F', '0', '0', 'system:user:export', '#', 'admin', '2026-07-14 14:56:29', '', NULL, '');
INSERT INTO `sys_menu` VALUES (1005, '用户导入', 100, 6, '', '', '', '', 1, 0, 'F', '0', '0', 'system:user:import', '#', 'admin', '2026-07-14 14:56:29', '', NULL, '');
INSERT INTO `sys_menu` VALUES (1006, '重置密码', 100, 7, '', '', '', '', 1, 0, 'F', '0', '0', 'system:user:resetPwd', '#', 'admin', '2026-07-14 14:56:29', '', NULL, '');
INSERT INTO `sys_menu` VALUES (1007, '角色查询', 101, 1, '', '', '', '', 1, 0, 'F', '0', '0', 'system:role:query', '#', 'admin', '2026-07-14 14:56:29', '', NULL, '');
INSERT INTO `sys_menu` VALUES (1008, '角色新增', 101, 2, '', '', '', '', 1, 0, 'F', '0', '0', 'system:role:add', '#', 'admin', '2026-07-14 14:56:29', '', NULL, '');
INSERT INTO `sys_menu` VALUES (1009, '角色修改', 101, 3, '', '', '', '', 1, 0, 'F', '0', '0', 'system:role:edit', '#', 'admin', '2026-07-14 14:56:29', '', NULL, '');
INSERT INTO `sys_menu` VALUES (1010, '角色删除', 101, 4, '', '', '', '', 1, 0, 'F', '0', '0', 'system:role:remove', '#', 'admin', '2026-07-14 14:56:29', '', NULL, '');
INSERT INTO `sys_menu` VALUES (1011, '角色导出', 101, 5, '', '', '', '', 1, 0, 'F', '0', '0', 'system:role:export', '#', 'admin', '2026-07-14 14:56:29', '', NULL, '');
INSERT INTO `sys_menu` VALUES (1012, '菜单查询', 102, 1, '', '', '', '', 1, 0, 'F', '0', '0', 'system:menu:query', '#', 'admin', '2026-07-14 14:56:29', '', NULL, '');
INSERT INTO `sys_menu` VALUES (1013, '菜单新增', 102, 2, '', '', '', '', 1, 0, 'F', '0', '0', 'system:menu:add', '#', 'admin', '2026-07-14 14:56:29', '', NULL, '');
INSERT INTO `sys_menu` VALUES (1014, '菜单修改', 102, 3, '', '', '', '', 1, 0, 'F', '0', '0', 'system:menu:edit', '#', 'admin', '2026-07-14 14:56:29', '', NULL, '');
INSERT INTO `sys_menu` VALUES (1015, '菜单删除', 102, 4, '', '', '', '', 1, 0, 'F', '0', '0', 'system:menu:remove', '#', 'admin', '2026-07-14 14:56:29', '', NULL, '');
INSERT INTO `sys_menu` VALUES (1016, '部门查询', 103, 1, '', '', '', '', 1, 0, 'F', '0', '0', 'system:dept:query', '#', 'admin', '2026-07-14 14:56:29', '', NULL, '');
INSERT INTO `sys_menu` VALUES (1017, '部门新增', 103, 2, '', '', '', '', 1, 0, 'F', '0', '0', 'system:dept:add', '#', 'admin', '2026-07-14 14:56:29', '', NULL, '');
INSERT INTO `sys_menu` VALUES (1018, '部门修改', 103, 3, '', '', '', '', 1, 0, 'F', '0', '0', 'system:dept:edit', '#', 'admin', '2026-07-14 14:56:29', '', NULL, '');
INSERT INTO `sys_menu` VALUES (1019, '部门删除', 103, 4, '', '', '', '', 1, 0, 'F', '0', '0', 'system:dept:remove', '#', 'admin', '2026-07-14 14:56:29', '', NULL, '');
INSERT INTO `sys_menu` VALUES (1020, '岗位查询', 104, 1, '', '', '', '', 1, 0, 'F', '0', '0', 'system:post:query', '#', 'admin', '2026-07-14 14:56:29', '', NULL, '');
INSERT INTO `sys_menu` VALUES (1021, '岗位新增', 104, 2, '', '', '', '', 1, 0, 'F', '0', '0', 'system:post:add', '#', 'admin', '2026-07-14 14:56:29', '', NULL, '');
INSERT INTO `sys_menu` VALUES (1022, '岗位修改', 104, 3, '', '', '', '', 1, 0, 'F', '0', '0', 'system:post:edit', '#', 'admin', '2026-07-14 14:56:29', '', NULL, '');
INSERT INTO `sys_menu` VALUES (1023, '岗位删除', 104, 4, '', '', '', '', 1, 0, 'F', '0', '0', 'system:post:remove', '#', 'admin', '2026-07-14 14:56:29', '', NULL, '');
INSERT INTO `sys_menu` VALUES (1024, '岗位导出', 104, 5, '', '', '', '', 1, 0, 'F', '0', '0', 'system:post:export', '#', 'admin', '2026-07-14 14:56:29', '', NULL, '');
INSERT INTO `sys_menu` VALUES (1025, '字典查询', 105, 1, '#', '', '', '', 1, 0, 'F', '0', '0', 'system:dict:query', '#', 'admin', '2026-07-14 14:56:29', '', NULL, '');
INSERT INTO `sys_menu` VALUES (1026, '字典新增', 105, 2, '#', '', '', '', 1, 0, 'F', '0', '0', 'system:dict:add', '#', 'admin', '2026-07-14 14:56:29', '', NULL, '');
INSERT INTO `sys_menu` VALUES (1027, '字典修改', 105, 3, '#', '', '', '', 1, 0, 'F', '0', '0', 'system:dict:edit', '#', 'admin', '2026-07-14 14:56:29', '', NULL, '');
INSERT INTO `sys_menu` VALUES (1028, '字典删除', 105, 4, '#', '', '', '', 1, 0, 'F', '0', '0', 'system:dict:remove', '#', 'admin', '2026-07-14 14:56:29', '', NULL, '');
INSERT INTO `sys_menu` VALUES (1029, '字典导出', 105, 5, '#', '', '', '', 1, 0, 'F', '0', '0', 'system:dict:export', '#', 'admin', '2026-07-14 14:56:29', '', NULL, '');
INSERT INTO `sys_menu` VALUES (1030, '参数查询', 106, 1, '#', '', '', '', 1, 0, 'F', '0', '0', 'system:config:query', '#', 'admin', '2026-07-14 14:56:29', '', NULL, '');
INSERT INTO `sys_menu` VALUES (1031, '参数新增', 106, 2, '#', '', '', '', 1, 0, 'F', '0', '0', 'system:config:add', '#', 'admin', '2026-07-14 14:56:29', '', NULL, '');
INSERT INTO `sys_menu` VALUES (1032, '参数修改', 106, 3, '#', '', '', '', 1, 0, 'F', '0', '0', 'system:config:edit', '#', 'admin', '2026-07-14 14:56:29', '', NULL, '');
INSERT INTO `sys_menu` VALUES (1033, '参数删除', 106, 4, '#', '', '', '', 1, 0, 'F', '0', '0', 'system:config:remove', '#', 'admin', '2026-07-14 14:56:29', '', NULL, '');
INSERT INTO `sys_menu` VALUES (1034, '参数导出', 106, 5, '#', '', '', '', 1, 0, 'F', '0', '0', 'system:config:export', '#', 'admin', '2026-07-14 14:56:29', '', NULL, '');
INSERT INTO `sys_menu` VALUES (1035, '公告查询', 107, 1, '#', '', '', '', 1, 0, 'F', '0', '0', 'system:notice:query', '#', 'admin', '2026-07-14 14:56:29', '', NULL, '');
INSERT INTO `sys_menu` VALUES (1036, '公告新增', 107, 2, '#', '', '', '', 1, 0, 'F', '0', '0', 'system:notice:add', '#', 'admin', '2026-07-14 14:56:29', '', NULL, '');
INSERT INTO `sys_menu` VALUES (1037, '公告修改', 107, 3, '#', '', '', '', 1, 0, 'F', '0', '0', 'system:notice:edit', '#', 'admin', '2026-07-14 14:56:29', '', NULL, '');
INSERT INTO `sys_menu` VALUES (1038, '公告删除', 107, 4, '#', '', '', '', 1, 0, 'F', '0', '0', 'system:notice:remove', '#', 'admin', '2026-07-14 14:56:29', '', NULL, '');
INSERT INTO `sys_menu` VALUES (1039, '操作查询', 500, 1, '#', '', '', '', 1, 0, 'F', '0', '0', 'monitor:operlog:query', '#', 'admin', '2026-07-14 14:56:29', '', NULL, '');
INSERT INTO `sys_menu` VALUES (1040, '操作删除', 500, 2, '#', '', '', '', 1, 0, 'F', '0', '0', 'monitor:operlog:remove', '#', 'admin', '2026-07-14 14:56:29', '', NULL, '');
INSERT INTO `sys_menu` VALUES (1041, '日志导出', 500, 3, '#', '', '', '', 1, 0, 'F', '0', '0', 'monitor:operlog:export', '#', 'admin', '2026-07-14 14:56:29', '', NULL, '');
INSERT INTO `sys_menu` VALUES (1042, '登录查询', 501, 1, '#', '', '', '', 1, 0, 'F', '0', '0', 'monitor:logininfor:query', '#', 'admin', '2026-07-14 14:56:29', '', NULL, '');
INSERT INTO `sys_menu` VALUES (1043, '登录删除', 501, 2, '#', '', '', '', 1, 0, 'F', '0', '0', 'monitor:logininfor:remove', '#', 'admin', '2026-07-14 14:56:29', '', NULL, '');
INSERT INTO `sys_menu` VALUES (1044, '日志导出', 501, 3, '#', '', '', '', 1, 0, 'F', '0', '0', 'monitor:logininfor:export', '#', 'admin', '2026-07-14 14:56:29', '', NULL, '');
INSERT INTO `sys_menu` VALUES (1045, '账户解锁', 501, 4, '#', '', '', '', 1, 0, 'F', '0', '0', 'monitor:logininfor:unlock', '#', 'admin', '2026-07-14 14:56:29', '', NULL, '');
INSERT INTO `sys_menu` VALUES (1046, '在线查询', 109, 1, '#', '', '', '', 1, 0, 'F', '0', '0', 'monitor:online:query', '#', 'admin', '2026-07-14 14:56:29', '', NULL, '');
INSERT INTO `sys_menu` VALUES (1047, '批量强退', 109, 2, '#', '', '', '', 1, 0, 'F', '0', '0', 'monitor:online:batchLogout', '#', 'admin', '2026-07-14 14:56:29', '', NULL, '');
INSERT INTO `sys_menu` VALUES (1048, '单条强退', 109, 3, '#', '', '', '', 1, 0, 'F', '0', '0', 'monitor:online:forceLogout', '#', 'admin', '2026-07-14 14:56:29', '', NULL, '');
INSERT INTO `sys_menu` VALUES (1049, '任务查询', 110, 1, '#', '', '', '', 1, 0, 'F', '0', '0', 'monitor:job:query', '#', 'admin', '2026-07-14 14:56:29', '', NULL, '');
INSERT INTO `sys_menu` VALUES (1050, '任务新增', 110, 2, '#', '', '', '', 1, 0, 'F', '0', '0', 'monitor:job:add', '#', 'admin', '2026-07-14 14:56:29', '', NULL, '');
INSERT INTO `sys_menu` VALUES (1051, '任务修改', 110, 3, '#', '', '', '', 1, 0, 'F', '0', '0', 'monitor:job:edit', '#', 'admin', '2026-07-14 14:56:29', '', NULL, '');
INSERT INTO `sys_menu` VALUES (1052, '任务删除', 110, 4, '#', '', '', '', 1, 0, 'F', '0', '0', 'monitor:job:remove', '#', 'admin', '2026-07-14 14:56:29', '', NULL, '');
INSERT INTO `sys_menu` VALUES (1053, '状态修改', 110, 5, '#', '', '', '', 1, 0, 'F', '0', '0', 'monitor:job:changeStatus', '#', 'admin', '2026-07-14 14:56:29', '', NULL, '');
INSERT INTO `sys_menu` VALUES (1054, '任务导出', 110, 6, '#', '', '', '', 1, 0, 'F', '0', '0', 'monitor:job:export', '#', 'admin', '2026-07-14 14:56:29', '', NULL, '');
INSERT INTO `sys_menu` VALUES (1081, '模板查询', 121, 1, '#', '', '', '', 1, 0, 'F', '0', '0', 'generator:template:query', '#', 'admin', '2026-07-14 14:56:29', '', NULL, '');
INSERT INTO `sys_menu` VALUES (1082, '模板新增', 121, 2, '#', '', '', '', 1, 0, 'F', '0', '0', 'generator:template:add', '#', 'admin', '2026-07-14 14:56:29', '', NULL, '');
INSERT INTO `sys_menu` VALUES (1083, '模板修改', 121, 3, '#', '', '', '', 1, 0, 'F', '0', '0', 'generator:template:edit', '#', 'admin', '2026-07-14 14:56:29', '', NULL, '');
INSERT INTO `sys_menu` VALUES (1084, '模板删除', 121, 4, '#', '', '', '', 1, 0, 'F', '0', '0', 'generator:template:remove', '#', 'admin', '2026-07-14 14:56:29', '', NULL, '');
INSERT INTO `sys_menu` VALUES (1085, '模板导出', 121, 5, '#', '', '', '', 1, 0, 'F', '0', '0', 'generator:template:export', '#', 'admin', '2026-07-14 14:56:29', '', NULL, '');
INSERT INTO `sys_menu` VALUES (1086, '结构查询', 122, 1, '#', '', '', '', 1, 0, 'F', '0', '0', 'generator:structure:query', '#', 'admin', '2026-07-14 14:56:29', '', NULL, '');
INSERT INTO `sys_menu` VALUES (1087, '结构新增', 122, 2, '#', '', '', '', 1, 0, 'F', '0', '0', 'generator:structure:add', '#', 'admin', '2026-07-14 14:56:29', '', NULL, '');
INSERT INTO `sys_menu` VALUES (1088, '结构修改', 122, 3, '#', '', '', '', 1, 0, 'F', '0', '0', 'generator:structure:edit', '#', 'admin', '2026-07-14 14:56:29', '', NULL, '');
INSERT INTO `sys_menu` VALUES (1089, '结构删除', 122, 4, '#', '', '', '', 1, 0, 'F', '0', '0', 'generator:structure:remove', '#', 'admin', '2026-07-14 14:56:29', '', NULL, '');
INSERT INTO `sys_menu` VALUES (1090, '结构导出', 122, 5, '#', '', '', '', 1, 0, 'F', '0', '0', 'generator:structure:export', '#', 'admin', '2026-07-14 14:56:29', '', NULL, '');
INSERT INTO `sys_menu` VALUES (1101, '源码查询', 125, 1, '#', '', '', '', 1, 0, 'F', '0', '0', 'generator:sourceProject:query', '#', 'admin', '2026-07-14 14:56:29', '', NULL, '');
INSERT INTO `sys_menu` VALUES (1102, '源码新增', 125, 2, '#', '', '', '', 1, 0, 'F', '0', '0', 'generator:sourceProject:add', '#', 'admin', '2026-07-14 14:56:29', '', NULL, '');
INSERT INTO `sys_menu` VALUES (1103, '源码修改', 125, 3, '#', '', '', '', 1, 0, 'F', '0', '0', 'generator:sourceProject:edit', '#', 'admin', '2026-07-14 14:56:29', '', NULL, '');
INSERT INTO `sys_menu` VALUES (1104, '源码删除', 125, 4, '#', '', '', '', 1, 0, 'F', '0', '0', 'generator:sourceProject:remove', '#', 'admin', '2026-07-14 14:56:29', '', NULL, '');
INSERT INTO `sys_menu` VALUES (1105, '源码导出', 125, 5, '#', '', '', '', 1, 0, 'F', '0', '0', 'generator:sourceProject:export', '#', 'admin', '2026-07-14 14:56:29', '', NULL, '');
INSERT INTO `sys_menu` VALUES (1106, '购买查询', 126, 1, '#', '', '', '', 1, 0, 'F', '0', '0', 'generator:sourcePurchase:query', '#', 'admin', '2026-07-14 14:56:29', '', NULL, '');
INSERT INTO `sys_menu` VALUES (1107, '购买修改', 126, 2, '#', '', '', '', 1, 0, 'F', '0', '0', 'generator:sourcePurchase:edit', '#', 'admin', '2026-07-14 14:56:29', '', NULL, '');
INSERT INTO `sys_menu` VALUES (1108, '购买导出', 126, 3, '#', '', '', '', 1, 0, 'F', '0', '0', 'generator:sourcePurchase:export', '#', 'admin', '2026-07-14 14:56:29', '', NULL, '');
INSERT INTO `sys_menu` VALUES (1109, '模板分析', 127, 1, '#', '', '', '', 1, 0, 'F', '0', '0', 'generator:template:import', '#', 'admin', '2026-07-14 14:56:29', '', NULL, '');
INSERT INTO `sys_menu` VALUES (1110, '用量查询', 128, 1, '#', '', '', '', 1, 0, 'F', '0', '0', 'generator:aiUsage:list', '#', 'admin', '2026-07-14 14:56:29', '', NULL, '');
INSERT INTO `sys_menu` VALUES (1111, '模板包查询', 129, 1, '#', '', '', '', 1, 0, 'F', '0', '0', 'generator:templateBundle:query', '#', 'admin', '2026-07-14 14:56:29', '', NULL, '');
INSERT INTO `sys_menu` VALUES (1112, '模板包新增', 129, 2, '#', '', '', '', 1, 0, 'F', '0', '0', 'generator:templateBundle:add', '#', 'admin', '2026-07-14 14:56:29', '', NULL, '');
INSERT INTO `sys_menu` VALUES (1113, '模板包修改', 129, 3, '#', '', '', '', 1, 0, 'F', '0', '0', 'generator:templateBundle:edit', '#', 'admin', '2026-07-14 14:56:29', '', NULL, '');
INSERT INTO `sys_menu` VALUES (1114, '模板包删除', 129, 4, '#', '', '', '', 1, 0, 'F', '0', '0', 'generator:templateBundle:remove', '#', 'admin', '2026-07-14 14:56:29', '', NULL, '');
INSERT INTO `sys_menu` VALUES (1115, '模板包导出', 129, 5, '#', '', '', '', 1, 0, 'F', '0', '0', 'generator:templateBundle:export', '#', 'admin', '2026-07-14 14:56:29', '', NULL, '');
INSERT INTO `sys_menu` VALUES (1116, '页面主题查询', 130, 1, '#', '', '', '', 1, 0, 'F', '0', '0', 'generator:pageTheme:query', '#', 'admin', '2026-07-14 14:56:29', '', NULL, '');
INSERT INTO `sys_menu` VALUES (1117, '页面主题新增', 130, 2, '#', '', '', '', 1, 0, 'F', '0', '0', 'generator:pageTheme:add', '#', 'admin', '2026-07-14 14:56:29', '', NULL, '');
INSERT INTO `sys_menu` VALUES (1118, '页面主题修改', 130, 3, '#', '', '', '', 1, 0, 'F', '0', '0', 'generator:pageTheme:edit', '#', 'admin', '2026-07-14 14:56:29', '', NULL, '');
INSERT INTO `sys_menu` VALUES (1119, '页面主题删除', 130, 4, '#', '', '', '', 1, 0, 'F', '0', '0', 'generator:pageTheme:remove', '#', 'admin', '2026-07-14 14:56:29', '', NULL, '');
INSERT INTO `sys_menu` VALUES (1120, '布局模板查询', 131, 1, '#', '', '', '', 1, 0, 'F', '0', '0', 'generator:pageLayout:query', '#', 'admin', '2026-07-14 14:56:29', '', NULL, '');
INSERT INTO `sys_menu` VALUES (1121, '布局模板新增', 131, 2, '#', '', '', '', 1, 0, 'F', '0', '0', 'generator:pageLayout:add', '#', 'admin', '2026-07-14 14:56:29', '', NULL, '');
INSERT INTO `sys_menu` VALUES (1122, '布局模板修改', 131, 3, '#', '', '', '', 1, 0, 'F', '0', '0', 'generator:pageLayout:edit', '#', 'admin', '2026-07-14 14:56:29', '', NULL, '');
INSERT INTO `sys_menu` VALUES (1123, '布局模板删除', 131, 4, '#', '', '', '', 1, 0, 'F', '0', '0', 'generator:pageLayout:remove', '#', 'admin', '2026-07-14 14:56:29', '', NULL, '');
INSERT INTO `sys_menu` VALUES (1141, 'Prompt 查询', 132, 1, '#', '', '', '', 1, 0, 'F', '0', '0', 'generator:prompt:query', '#', 'admin', '2026-07-14 14:56:54', '', NULL, '');
INSERT INTO `sys_menu` VALUES (1142, 'Prompt 新增', 132, 2, '#', '', '', '', 1, 0, 'F', '0', '0', 'generator:prompt:add', '#', 'admin', '2026-07-14 14:56:54', '', NULL, '');
INSERT INTO `sys_menu` VALUES (1143, 'Prompt 设置', 132, 3, '#', '', '', '', 1, 0, 'F', '0', '0', 'generator:prompt:edit', '#', 'admin', '2026-07-14 14:56:54', '', NULL, '');
INSERT INTO `sys_menu` VALUES (1144, '版本创建', 132, 4, '#', '', '', '', 1, 0, 'F', '0', '0', 'generator:prompt:version', '#', 'admin', '2026-07-14 14:56:54', '', NULL, '');
INSERT INTO `sys_menu` VALUES (1145, '版本发布', 132, 5, '#', '', '', '', 1, 0, 'F', '0', '0', 'generator:prompt:publish', '#', 'admin', '2026-07-14 14:56:54', '', NULL, '');
INSERT INTO `sys_menu` VALUES (1146, '版本回滚', 132, 6, '#', '', '', '', 1, 0, 'F', '0', '0', 'generator:prompt:rollback', '#', 'admin', '2026-07-14 14:56:54', '', NULL, '');
INSERT INTO `sys_menu` VALUES (1147, '在线调试', 132, 7, '#', '', '', '', 1, 0, 'F', '0', '0', 'generator:prompt:debug', '#', 'admin', '2026-07-14 14:56:54', '', NULL, '');
INSERT INTO `sys_menu` VALUES (1148, 'A/B 测试', 132, 8, '#', '', '', '', 1, 0, 'F', '0', '0', 'generator:prompt:experiment', '#', 'admin', '2026-07-14 14:56:54', '', NULL, '');
INSERT INTO `sys_menu` VALUES (1300, '前台用户查询', 202, 1, '#', '', '', '', 1, 0, 'F', '0', '0', 'generator:frontUser:list', '#', 'admin', '2026-07-14 17:48:49', '', NULL, '');
INSERT INTO `sys_menu` VALUES (1301, '前台用户状态修改', 202, 2, '#', '', '', '', 1, 0, 'F', '0', '0', 'generator:frontUser:edit', '#', 'admin', '2026-07-14 17:48:49', '', NULL, '');
INSERT INTO `sys_menu` VALUES (1302, '前台项目查询', 203, 1, '#', '', '', '', 1, 0, 'F', '0', '0', 'generator:frontProject:list', '#', 'admin', '2026-07-14 17:48:49', '', NULL, '');
INSERT INTO `sys_menu` VALUES (1303, '前台项目详情', 203, 2, '#', '', '', '', 1, 0, 'F', '0', '0', 'generator:frontProject:query', '#', 'admin', '2026-07-14 17:48:49', '', NULL, '');
INSERT INTO `sys_menu` VALUES (1304, 'AI任务查询', 204, 1, '#', '', '', '', 1, 0, 'F', '0', '0', 'generator:aiTask:list', '#', 'admin', '2026-07-14 17:48:49', '', NULL, '');
INSERT INTO `sys_menu` VALUES (1305, 'AI任务重试', 204, 2, '#', '', '', '', 1, 0, 'F', '0', '0', 'generator:aiTask:retry', '#', 'admin', '2026-07-14 17:48:49', '', NULL, '');
INSERT INTO `sys_menu` VALUES (1306, 'AI任务取消', 204, 3, '#', '', '', '', 1, 0, 'F', '0', '0', 'generator:aiTask:cancel', '#', 'admin', '2026-07-14 17:48:49', '', NULL, '');
-- ----------------------------
-- Table structure for sys_module
-- ----------------------------
DROP TABLE IF EXISTS `sys_module`;
CREATE TABLE `sys_module` (
`module_id` bigint(20) NOT NULL AUTO_INCREMENT COMMENT '模块ID',
`module_name` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NOT NULL COMMENT '模块名称',
`module_alias` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT '' COMMENT '模块别名',
`module_desc` varchar(500) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT '' COMMENT '模块描述',
`status` char(1) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT '0' COMMENT '状态0正常 1停用',
`del_flag` char(1) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT '0' COMMENT '删除标志0代表存在 2代表删除',
`create_by` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT '' COMMENT '创建者',
`create_time` datetime(0) NULL DEFAULT NULL COMMENT '创建时间',
`update_by` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT '' COMMENT '更新者',
`update_time` datetime(0) NULL DEFAULT NULL COMMENT '更新时间',
`remark` varchar(500) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '备注',
PRIMARY KEY (`module_id`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 100 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_0900_ai_ci COMMENT = '功能模块表' ROW_FORMAT = Dynamic;
-- ----------------------------
-- Table structure for sys_notice
-- ----------------------------
DROP TABLE IF EXISTS `sys_notice`;
CREATE TABLE `sys_notice` (
`notice_id` int(4) NOT NULL AUTO_INCREMENT COMMENT '公告ID',
`notice_title` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NOT NULL COMMENT '公告标题',
`notice_type` char(1) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NOT NULL COMMENT '公告类型1通知 2公告',
`notice_content` longblob NULL COMMENT '公告内容',
`status` char(1) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT '0' COMMENT '公告状态0正常 1关闭',
`create_by` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT '' COMMENT '创建者',
`create_time` datetime(0) NULL DEFAULT NULL COMMENT '创建时间',
`update_by` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT '' COMMENT '更新者',
`update_time` datetime(0) NULL DEFAULT NULL COMMENT '更新时间',
`remark` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '备注',
PRIMARY KEY (`notice_id`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 10 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_0900_ai_ci COMMENT = '通知公告表' ROW_FORMAT = Dynamic;
-- ----------------------------
-- Records of sys_notice
-- ----------------------------
INSERT INTO `sys_notice` VALUES (1, '温馨提醒2018-07-01 若依新版本发布啦', '2', 0xE696B0E78988E69CACE58685E5AEB9, '0', 'admin', '2026-07-14 14:56:30', '', NULL, '管理员');
INSERT INTO `sys_notice` VALUES (2, '维护通知2018-07-01 若依系统凌晨维护', '1', 0xE7BBB4E68AA4E58685E5AEB9, '0', 'admin', '2026-07-14 14:56:30', '', NULL, '管理员');
-- ----------------------------
-- Table structure for sys_oper_log
-- ----------------------------
DROP TABLE IF EXISTS `sys_oper_log`;
CREATE TABLE `sys_oper_log` (
`oper_id` bigint(20) NOT NULL AUTO_INCREMENT COMMENT '日志主键',
`title` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT '' COMMENT '模块标题',
`business_type` int(2) NULL DEFAULT 0 COMMENT '业务类型0其它 1新增 2修改 3删除',
`method` varchar(200) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT '' COMMENT '方法名称',
`request_method` varchar(10) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT '' COMMENT '请求方式',
`operator_type` int(1) NULL DEFAULT 0 COMMENT '操作类别0其它 1后台用户 2手机端用户',
`oper_name` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT '' COMMENT '操作人员',
`dept_name` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT '' COMMENT '部门名称',
`oper_url` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT '' COMMENT '请求URL',
`oper_ip` varchar(128) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT '' COMMENT '主机地址',
`oper_location` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT '' COMMENT '操作地点',
`oper_param` varchar(2000) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT '' COMMENT '请求参数',
`json_result` varchar(2000) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT '' COMMENT '返回参数',
`status` int(1) NULL DEFAULT 0 COMMENT '操作状态0正常 1异常',
`error_msg` varchar(2000) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT '' COMMENT '错误消息',
`oper_time` datetime(0) NULL DEFAULT NULL COMMENT '操作时间',
`cost_time` bigint(20) NULL DEFAULT 0 COMMENT '消耗时间',
PRIMARY KEY (`oper_id`) USING BTREE,
INDEX `idx_sys_oper_log_bt`(`business_type`) USING BTREE,
INDEX `idx_sys_oper_log_s`(`status`) USING BTREE,
INDEX `idx_sys_oper_log_ot`(`oper_time`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 100 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_0900_ai_ci COMMENT = '操作日志记录' ROW_FORMAT = Dynamic;
-- ----------------------------
-- Records of sys_oper_log
-- ----------------------------
INSERT INTO `sys_oper_log` VALUES (100, 'Prompt V1 初始化', 1, 'com.ruoyi.generator.controller.PromptTemplateController.initializeV1()', 'POST', 1, 'admin', '研发部门', '/generator/prompt/initialize-v1', '127.0.0.1', '内网IP', '', '{\"msg\":\"已初始化或修复 0 个 Prompt V1\",\"code\":200,\"data\":0}', 0, NULL, '2026-07-14 14:57:21', 12);
INSERT INTO `sys_oper_log` VALUES (101, 'Prompt V1 初始化', 1, 'com.ruoyi.generator.controller.PromptTemplateController.initializeV1()', 'POST', 1, 'admin', '研发部门', '/generator/prompt/initialize-v1', '127.0.0.1', '内网IP', '', '{\"msg\":\"已初始化或修复 10 个 Prompt V1\",\"code\":200,\"data\":10}', 0, NULL, '2026-07-14 15:04:35', 145);
INSERT INTO `sys_oper_log` VALUES (102, 'Prompt 版本', 1, 'com.ruoyi.generator.controller.PromptTemplateController.createVersion()', 'POST', 1, 'admin', '研发部门', '/generator/prompt/100/versions', '127.0.0.1', '内网IP', '100 {\"contentHash\":\"07d4c186c52634ef2c9f67640a638e0822c1e139b177ff2bc7eb3a10389e8164\",\"createBy\":\"admin\",\"model\":\"\",\"params\":{},\"parentVersionId\":100,\"pipelineReleaseCode\":\"\",\"promptTemplateId\":100,\"promptVersionId\":110,\"providerCode\":\"deepseek\",\"remark\":\"\",\"status\":\"DRAFT\",\"systemPrompt\":\"你是一键生成项目的需求补全助手。你的输出会作为后续生成应用蓝图、业务闭环、数据库、页面和源码的输入。\\n\\n请在保留用户原始描述的基础上补全必要的业务细节让系统能生成一个本科毕设/课程设计规模的完整项目。\\n\\n补全重点\\n- 明确项目面向谁使用,包含 2 到 4 个角色;\\n- 明确核心业务对象,例如订单、预约、借阅记录、商品、课程等;\\n- 明确一条完整业务闭环:发起、审核/处理、完成、取消/拒绝/回退;\\n- 明确关键业务规则:状态、时间期限、数量限制、金额/费用公式、库存或名额变化;\\n- 明确异常边界:库存不足、重复提交、状态不符、超时、取消、支付失败等;\\n- 可补充少量前台展示或内容维护模块,但不要扩展成大型平台。\\n\\n约束\\n- 只输出中文纯文本,不要 Markdown不要 JSON不要解释。\\n- 内容要短,控制在 300 字以内。\\n- 不要写技术实现、接口、数据库表、字段、代码。\\n- 不要输出“按实际情况”“待定”等模糊规则缺少关键数值时用合理默认值并标注“AI假设”。\\n- 不要把 CRUD、统计报表、系统监控、操作日志当作核心业务。\",\"userPromptContract\":\"context-json:requirement:v1\",\"userPromptTemplate\":\"请根据以下项目输入,补全一段可直接用于一键生成项目的业务需求描述。\\n\\n输出格式\\n项目定位\\n角色\\n核心流程\\n关键规则\\n异常边界\\n\\n项目输入 JSON\\n{{input}}\",\"version\":\"v2\",\"versionNo\":2}', '{\"msg\":\"操作成功\",\"code\":200,\"data\":{\"contentHash\":\"07d4c186c52634ef2c9f67640a638e0822c1e139b177ff2bc7eb3a10389e8164\",\"createBy\":\"admin\",\"params\":{},\"parentVersionId\":100,\"promptTemplateId\":100,\"promptVersionId\":110,\"providerCode\":\"deepseek\",\"status\":\"DRAFT\",\"systemPrompt\":\"你是一键生成项目的需求补全助手。你的输出会作为后续生成应用蓝图、业务闭环、数据库、页面和源码的输入。\\n\\n请在保留用户原始描述的基础上补全必要的业务细节让系统能生成一个本科毕设/课程设计规模的完整项目。\\n\\n补全重点\\n- 明确项目面向谁使用,包含 2 到 4 个角色;\\n- 明确核心业务对象,例如订单、预约、借阅记录、商品、课程等;\\n- 明确一条完整业务闭环:发起、审核/处理、完成、取消/拒绝/回退;\\n- 明确关键业务规则:状态、时间期限、数量限制、金额/费用公式、库存或名额变化;\\n- 明确异常边界:库存不足、重复提交、状态不符、超时、取消、支付失败等;\\n- 可补充少量前台展示或内容维护模块,但不要扩展成大型平台。\\n\\n约束\\n- 只输出中文纯文本,不要 Markdown不要 JSON不要解释。\\n- 内容要短,控制在 300 字以内。\\n- 不要写技术实现、接口、数据库表、字段、代码。\\n- 不要输出“按实际情况”“待定”等模糊规则缺少关键数值时用合理默认值并标注“AI假设”。\\n- 不要把 CRUD、统计报表、系统监控、操作日志当作核心业务。\",\"userPromptContract\":\"context-json:requirement:v1\",\"userPromptTemplate\":\"请根据以下项目输入,补全一段可直接用于一键生成项目的业务需求描述。\\n\\n输出格式\\n项目定位\\n角色\\n核心流程\\n关键规则\\n异常边界\\n\\n项目输入 JSON\\n{{input}}\",\"version\":\"v2\",\"versionNo\":2}}', 0, NULL, '2026-07-14 15:42:26', 156);
INSERT INTO `sys_oper_log` VALUES (103, 'Prompt 发布', 2, 'com.ruoyi.generator.controller.PromptTemplateController.publish()', 'POST', 1, 'admin', '研发部门', '/generator/prompt/100/versions/110/publish', '127.0.0.1', '内网IP', '100 110', '{\"msg\":\"操作成功\",\"code\":200}', 0, NULL, '2026-07-14 15:42:29', 29);
INSERT INTO `sys_oper_log` VALUES (104, 'Prompt 版本', 1, 'com.ruoyi.generator.controller.PromptTemplateController.createVersion()', 'POST', 1, 'admin', '研发部门', '/generator/prompt/102/versions', '127.0.0.1', '内网IP', '102 {\"contentHash\":\"9443d0ca8f3e4bb87cdc13ef4924015fff334f0c9b8690573f0551dd18708406\",\"createBy\":\"admin\",\"model\":\"\",\"params\":{},\"parentVersionId\":111,\"pipelineReleaseCode\":\"\",\"promptTemplateId\":102,\"promptVersionId\":113,\"providerCode\":\"deepseek\",\"remark\":\"\",\"status\":\"DRAFT\",\"systemPrompt\":\"你是业务流程配置设计器。只输出一个合法 JSON 对象,不输出 Markdown、解释或 SQL。\\n\\n目标用最小 flow_config 描述业务发起、状态流转、显式 Java 业务动作、多表数量联动、按钮和统计。不要输出普通 CRUD不要输出通用规则 DSL。创建主业务记录的“借书/预约/申请/下单”等发起动作属于业务闭环,必须输出。项目存在预约、借阅等多个独立状态对象时,必须分别放入 flows禁止只选择其中一个局部流程。\\n\\n固定结构\\n{\\n \\\"version\\\":\\\"1.1\\\",\\n \\\"code\\\":\\\"library_circulation\\\",\\n \\\"name\\\":\\\"图书流通\\\",\\n \\\"flows\\\":[{\\n \\\"code\\\":\\\"reservation_flow\\\",\\\"name\\\":\\\"图书预约\\\",\\\"mainTable\\\":\\\"reservation\\\",\\\"statusField\\\":\\\"status\\\",\\n \\\"notFoundMessage\\\":\\\"预约记录不存在\\\",\\n \\\"states\\\":[{\\\"code\\\":\\\"pending\\\",\\\"label\\\":\\\"待处理\\\"},{\\\"code\\\":\\\"cancelled\\\",\\\"label\\\":\\\"已取消\\\"}],\\n \\\"actions\\\":[{\\n \\\"code\\\":\\\"reserve_book\\\",\\\"name\\\":\\\"预约\\\",\\\"actor\\\":\\\"reader\\\",\\\"ownerTable\\\":\\\"book_info\\\",\\\"requestFields\\\":[\\\"id\\\"],\\n \\\"method\\\":\\\"POST\\\",\\\"path\\\":\\\"/book-info/reserve\\\",\\\"successMessage\\\":\\\"预约成功\\\",\\n \\\"effects\\\":[{\\\"type\\\":\\\"create_record\\\",\\\"table\\\":\\\"reservation\\\",\\\"values\\\":{\\\"book_id\\\":\\\"record.id\\\",\\\"reader_id\\\":\\\"currentUserId\\\",\\\"status\\\":\\\"pending\\\",\\\"reserve_date\\\":\\\"now\\\"}}],\\n \\\"button\\\":{\\\"scope\\\":\\\"reader\\\",\\\"pageCode\\\":\\\"book_detail_page\\\",\\\"tableName\\\":\\\"book_info\\\",\\\"slot\\\":\\\"detail.primaryActions\\\",\\\"type\\\":\\\"primary\\\",\\\"confirm\\\":\\\"确认预约吗?\\\",\\\"order\\\":10}\\n },{\\n \\\"code\\\":\\\"cancel_reservation\\\",\\\"name\\\":\\\"取消预约\\\",\\\"from\\\":\\\"pending\\\",\\\"to\\\":\\\"cancelled\\\",\\\"actor\\\":\\\"reader\\\",\\n \\\"ownerTable\\\":\\\"reservation\\\",\\\"requestFields\\\":[\\\"id\\\"],\\\"method\\\":\\\"POST\\\",\\\"path\\\":\\\"/reservation/cancel\\\",\\n \\\"button\\\":{\\\"scope\\\":\\\"reader\\\",\\\"pageCode\\\":\\\"my_reservations_page\\\",\\\"tableName\\\":\\\"reservation\\\",\\\"slot\\\":\\\"list.rowActions\\\",\\\"type\\\":\\\"danger\\\",\\\"confirm\\\":\\\"确认取消预约吗?\\\",\\\"order\\\":10}\\n }],\\n \\\"metrics\\\":[]\\n },{\\n \\\"code\\\":\\\"bo', '{\"msg\":\"操作成功\",\"code\":200,\"data\":{\"contentHash\":\"9443d0ca8f3e4bb87cdc13ef4924015fff334f0c9b8690573f0551dd18708406\",\"createBy\":\"admin\",\"params\":{},\"parentVersionId\":111,\"promptTemplateId\":102,\"promptVersionId\":113,\"providerCode\":\"deepseek\",\"status\":\"DRAFT\",\"systemPrompt\":\"你是业务流程配置设计器。只输出一个合法 JSON 对象,不输出 Markdown、解释或 SQL。\\n\\n目标用最小 flow_config 描述业务发起、状态流转、显式 Java 业务动作、多表数量联动、按钮和统计。不要输出普通 CRUD不要输出通用规则 DSL。创建主业务记录的“借书/预约/申请/下单”等发起动作属于业务闭环,必须输出。项目存在预约、借阅等多个独立状态对象时,必须分别放入 flows禁止只选择其中一个局部流程。\\n\\n固定结构\\n{\\n \\\"version\\\":\\\"1.1\\\",\\n \\\"code\\\":\\\"library_circulation\\\",\\n \\\"name\\\":\\\"图书流通\\\",\\n \\\"flows\\\":[{\\n \\\"code\\\":\\\"reservation_flow\\\",\\\"name\\\":\\\"图书预约\\\",\\\"mainTable\\\":\\\"reservation\\\",\\\"statusField\\\":\\\"status\\\",\\n \\\"notFoundMessage\\\":\\\"预约记录不存在\\\",\\n \\\"states\\\":[{\\\"code\\\":\\\"pending\\\",\\\"label\\\":\\\"待处理\\\"},{\\\"code\\\":\\\"cancelled\\\",\\\"label\\\":\\\"已取消\\\"}],\\n \\\"actions\\\":[{\\n \\\"code\\\":\\\"reserve_book\\\",\\\"name\\\":\\\"预约\\\",\\\"actor\\\":\\\"reader\\\",\\\"ownerTable\\\":\\\"book_info\\\",\\\"requestFields\\\":[\\\"id\\\"],\\n \\\"method\\\":\\\"POST\\\",\\\"path\\\":\\\"/book-info/reserve\\\",\\\"successMessage\\\":\\\"预约成功\\\",\\n \\\"effects\\\":[{\\\"type\\\":\\\"create_record\\\",\\\"table\\\":\\\"reservation\\\",\\\"values\\\":{\\\"book_id\\\":\\\"record.id\\\",\\\"reader_id\\\":\\\"currentUserId\\\",\\\"status\\\":\\\"pending\\\",\\\"reserve_date\\\":\\\"now\\\"}}],\\n \\\"button\\\":{\\\"scope\\\":\\\"reader\\\",\\\"pageCode\\\":\\\"book_detail_page\\\",\\\"tableName\\\":\\\"book_info\\\",\\\"slot\\\":\\\"detail.primaryActions\\\",\\\"type\\\":\\\"primary\\\",\\\"confirm\\\":\\\"确认预约吗?\\\",\\\"order\\\":10}\\n },{\\n \\\"code\\\":\\\"cancel_reservation\\\",\\\"name\\\":\\\"取消预约\\\",\\\"from\\\":\\\"pending\\\",\\\"to\\\":\\\"cancelled\\\",\\\"actor\\\":\\\"reader\\\",\\n \\\"ownerTable\\\":\\\"reservation\\\",\\\"requestFields\\\":[\\\"id\\\"],\\\"method\\\":\\\"POST\\\",\\\"path\\\":\\\"/reservation/cancel\\\",\\n \\\"button\\\":{\\\"scope\\\":\\\"reader\\\",\\\"pageCode\\\":\\\"my_reservations_page\\\",\\\"tableName\\\":\\\"reservation\\\",\\\"slot\\\":\\\"list.rowActions\\\",\\\"type\\\":\\\"danger\\\",\\\"confirm\\\":\\\"确认取消预约吗?\\\",\\\"order\\\":10}\\n }],\\n \\\"metrics\\\":[]\\n },{\\n \\\"code\\\":\\\"borrowing_flow\\\",\\\"nam', 0, NULL, '2026-07-15 10:32:33', 125);
INSERT INTO `sys_oper_log` VALUES (105, 'Prompt 发布', 2, 'com.ruoyi.generator.controller.PromptTemplateController.publish()', 'POST', 1, 'admin', '研发部门', '/generator/prompt/102/versions/113/publish', '127.0.0.1', '内网IP', '102 113', '{\"msg\":\"操作成功\",\"code\":200}', 0, NULL, '2026-07-15 10:32:38', 37);
INSERT INTO `sys_oper_log` VALUES (106, '页面主题', 2, 'com.ruoyi.generator.controller.PageThemeDefinitionController.edit()', 'PUT', 1, 'admin', '研发部门', '/generator/pageTheme', '127.0.0.1', '内网IP', '{\"assetPolicyJson\":\"{\\\"chartPalette\\\":[\\\"#409eff\\\",\\\"#67c23a\\\",\\\"#e6a23c\\\",\\\"#909399\\\",\\\"#f56c6c\\\"],\\\"illustrationStyle\\\":\\\"business\\\",\\\"iconStyle\\\":\\\"classic\\\"}\",\"componentDefaultsJson\":\"{\\\"buttonStyle\\\":\\\"square\\\",\\\"formStyle\\\":\\\"inline\\\",\\\"dialogStyle\\\":\\\"dialog\\\",\\\"tableStyle\\\":\\\"border\\\"}\",\"createBy\":\"system\",\"createTime\":\"2026-07-14 14:56:31\",\"density\":\"compact\",\"description\":\"传统企业后台主题\",\"framework\":\"vue2-element-ui\",\"layoutPolicyJson\":\"{\\\"admin.list\\\":\\\"admin-list-v1\\\",\\\"frontend.list\\\":\\\"frontend-list-v1\\\",\\\"admin.detail\\\":\\\"admin-detail-v1\\\",\\\"frontend.detail\\\":\\\"frontend-detail-v1\\\",\\\"admin.form\\\":\\\"admin-form-v1\\\",\\\"frontend.form\\\":\\\"frontend-form-v1\\\",\\\"frontend.current_user_list\\\":\\\"frontend-current-user-list-v1\\\"}\",\"params\":{},\"shellJson\":\"{\\\"contentFrame\\\":\\\"wide\\\",\\\"frontendNavigation\\\":\\\"top\\\",\\\"header\\\":\\\"compact\\\",\\\"adminNavigation\\\":\\\"sidebar\\\",\\\"login\\\":\\\"centered\\\"}\",\"sortOrder\":10,\"status\":\"0\",\"themeCode\":\"classic-admin\",\"themeId\":1,\"themeName\":\"经典后台\",\"tokensJson\":\"{\\\"border\\\":\\\"#dcdfe6\\\",\\\"textSecondary\\\":\\\"#606266\\\",\\\"surface\\\":\\\"#fff\\\",\\\"primarySoft\\\":\\\"#ecf5ff\\\",\\\"radiusLg\\\":\\\"8px\\\",\\\"radiusSm\\\":\\\"4px\\\",\\\"radiusMd\\\":\\\"6px\\\",\\\"accent\\\":\\\"#67c23a\\\",\\\"shadowSm\\\":\\\"0 2px 12px rgba(0,0,0,.06)\\\",\\\"contentWidth\\\":\\\"1280px\\\",\\\"background\\\":\\\"#f4f6f8\\\",\\\"primaryStrong\\\":\\\"#337ecc\\\",\\\"text\\\":\\\"#303133\\\",\\\"shadowMd\\\":\\\"0 10px 30px rgba(0,0,0,.10)\\\",\\\"primary\\\":\\\"#409eff\\\"}\",\"updateBy\":\"admin\",\"version\":1}', '{\"msg\":\"操作成功\",\"code\":200}', 0, NULL, '2026-07-15 12:13:24', 66);
INSERT INTO `sys_oper_log` VALUES (107, '页面主题', 2, 'com.ruoyi.generator.controller.PageThemeDefinitionController.edit()', 'PUT', 1, 'admin', '研发部门', '/generator/pageTheme', '127.0.0.1', '内网IP', '{\"assetPolicyJson\":\"{\\\"chartPalette\\\":[\\\"#2563eb\\\",\\\"#06b6d4\\\",\\\"#7c3aed\\\",\\\"#f59e0b\\\",\\\"#10b981\\\"],\\\"illustrationStyle\\\":\\\"modern\\\",\\\"iconStyle\\\":\\\"outline\\\"}\",\"componentDefaultsJson\":\"{\\\"buttonStyle\\\":\\\"round\\\",\\\"formStyle\\\":\\\"top\\\",\\\"dialogStyle\\\":\\\"drawer\\\",\\\"tableStyle\\\":\\\"card\\\"}\",\"createBy\":\"system\",\"createTime\":\"2026-07-14 14:56:31\",\"density\":\"comfortable\",\"description\":\"现代卡片式蓝色主题\",\"framework\":\"vue2-element-ui\",\"layoutPolicyJson\":\"{\\\"admin.list\\\":\\\"admin-list-v1\\\",\\\"frontend.list\\\":\\\"frontend-list-card-v1\\\",\\\"frontend.detail\\\":\\\"frontend-detail-media-v1\\\",\\\"frontend.form\\\":\\\"frontend-form-group-v1\\\",\\\"frontend.current_user_list\\\":\\\"frontend-current-user-card-v1\\\"}\",\"params\":{},\"shellJson\":\"{\\\"contentFrame\\\":\\\"contained\\\",\\\"frontendNavigation\\\":\\\"top\\\",\\\"header\\\":\\\"hero\\\",\\\"adminNavigation\\\":\\\"top\\\",\\\"login\\\":\\\"split\\\"}\",\"sortOrder\":20,\"status\":\"0\",\"themeCode\":\"modern-blue\",\"themeId\":2,\"themeName\":\"现代蓝\",\"tokensJson\":\"{\\\"border\\\":\\\"#dbe5f3\\\",\\\"textSecondary\\\":\\\"#64748b\\\",\\\"surface\\\":\\\"#fff\\\",\\\"primarySoft\\\":\\\"#eff6ff\\\",\\\"radiusLg\\\":\\\"18px\\\",\\\"radiusSm\\\":\\\"8px\\\",\\\"radiusMd\\\":\\\"12px\\\",\\\"accent\\\":\\\"#06b6d4\\\",\\\"shadowSm\\\":\\\"0 8px 24px rgba(37,99,235,.08)\\\",\\\"contentWidth\\\":\\\"1200px\\\",\\\"background\\\":\\\"#f5f7fb\\\",\\\"primaryStrong\\\":\\\"#1d4ed8\\\",\\\"text\\\":\\\"#172033\\\",\\\"shadowMd\\\":\\\"0 20px 48px rgba(37,99,235,.14)\\\",\\\"primary\\\":\\\"#2563eb\\\"}\",\"updateBy\":\"admin\",\"version\":1}', '{\"msg\":\"操作成功\",\"code\":200}', 0, NULL, '2026-07-15 12:13:30', 53);
INSERT INTO `sys_oper_log` VALUES (108, '页面主题', 2, 'com.ruoyi.generator.controller.PageThemeDefinitionController.edit()', 'PUT', 1, 'admin', '研发部门', '/generator/pageTheme', '127.0.0.1', '内网IP', '{\"assetPolicyJson\":\"{\\\"chartPalette\\\":[\\\"#38bdf8\\\",\\\"#a78bfa\\\",\\\"#22d3ee\\\",\\\"#34d399\\\",\\\"#fbbf24\\\"],\\\"illustrationStyle\\\":\\\"technical\\\",\\\"iconStyle\\\":\\\"neon\\\"}\",\"componentDefaultsJson\":\"{\\\"buttonStyle\\\":\\\"round\\\",\\\"formStyle\\\":\\\"top\\\",\\\"dialogStyle\\\":\\\"drawer\\\",\\\"tableStyle\\\":\\\"border\\\"}\",\"createBy\":\"system\",\"createTime\":\"2026-07-14 14:56:31\",\"density\":\"compact\",\"description\":\"暗色科技看板主题\",\"framework\":\"vue2-element-ui\",\"layoutPolicyJson\":\"{\\\"admin.list\\\":\\\"admin-list-dense-v1\\\",\\\"frontend.list\\\":\\\"frontend-list-card-v1\\\",\\\"frontend.detail\\\":\\\"frontend-detail-media-v1\\\",\\\"frontend.form\\\":\\\"frontend-form-group-v1\\\",\\\"frontend.current_user_list\\\":\\\"frontend-current-user-card-v1\\\"}\",\"params\":{},\"shellJson\":\"{\\\"contentFrame\\\":\\\"wide\\\",\\\"frontendNavigation\\\":\\\"top\\\",\\\"header\\\":\\\"compact\\\",\\\"adminNavigation\\\":\\\"sidebar\\\",\\\"login\\\":\\\"centered\\\"}\",\"sortOrder\":40,\"status\":\"0\",\"themeCode\":\"dark-tech\",\"themeId\":4,\"themeName\":\"科技黑\",\"tokensJson\":\"{\\\"border\\\":\\\"#26364a\\\",\\\"textSecondary\\\":\\\"#94a9bf\\\",\\\"surface\\\":\\\"#101c2d\\\",\\\"primarySoft\\\":\\\"#082f49\\\",\\\"radiusLg\\\":\\\"18px\\\",\\\"radiusSm\\\":\\\"8px\\\",\\\"radiusMd\\\":\\\"12px\\\",\\\"accent\\\":\\\"#a78bfa\\\",\\\"shadowSm\\\":\\\"0 8px 24px rgba(0,0,0,.22)\\\",\\\"contentWidth\\\":\\\"1280px\\\",\\\"background\\\":\\\"#07111f\\\",\\\"primaryStrong\\\":\\\"#0284c7\\\",\\\"text\\\":\\\"#e5f2ff\\\",\\\"shadowMd\\\":\\\"0 22px 54px rgba(0,0,0,.35)\\\",\\\"primary\\\":\\\"#38bdf8\\\"}\",\"updateBy\":\"admin\",\"version\":1}', '{\"msg\":\"操作成功\",\"code\":200}', 0, NULL, '2026-07-15 12:13:39', 39);
INSERT INTO `sys_oper_log` VALUES (109, '页面主题', 2, 'com.ruoyi.generator.controller.PageThemeDefinitionController.edit()', 'PUT', 1, 'admin', '研发部门', '/generator/pageTheme', '127.0.0.1', '内网IP', '{\"assetPolicyJson\":\"{\\\"chartPalette\\\":[\\\"#111827\\\",\\\"#4b5563\\\",\\\"#9ca3af\\\",\\\"#d1d5db\\\",\\\"#6b7280\\\"],\\\"illustrationStyle\\\":\\\"none\\\",\\\"iconStyle\\\":\\\"minimal\\\"}\",\"componentDefaultsJson\":\"{\\\"buttonStyle\\\":\\\"square\\\",\\\"formStyle\\\":\\\"top\\\",\\\"dialogStyle\\\":\\\"dialog\\\",\\\"tableStyle\\\":\\\"plain\\\"}\",\"createBy\":\"system\",\"createTime\":\"2026-07-14 14:56:31\",\"density\":\"comfortable\",\"description\":\"低装饰高留白主题\",\"framework\":\"vue2-element-ui\",\"layoutPolicyJson\":\"{\\\"admin.list\\\":\\\"admin-list-v1\\\",\\\"frontend.list\\\":\\\"frontend-list-v1\\\",\\\"frontend.detail\\\":\\\"frontend-detail-v1\\\",\\\"frontend.form\\\":\\\"frontend-form-v1\\\",\\\"frontend.current_user_list\\\":\\\"frontend-current-user-list-v1\\\"}\",\"params\":{},\"shellJson\":\"{\\\"contentFrame\\\":\\\"narrow\\\",\\\"frontendNavigation\\\":\\\"top\\\",\\\"header\\\":\\\"hidden\\\",\\\"adminNavigation\\\":\\\"top\\\",\\\"login\\\":\\\"centered\\\"}\",\"sortOrder\":70,\"status\":\"0\",\"themeCode\":\"minimal-white\",\"themeId\":7,\"themeName\":\"极简白\",\"tokensJson\":\"{\\\"border\\\":\\\"#e5e7eb\\\",\\\"textSecondary\\\":\\\"#6b7280\\\",\\\"surface\\\":\\\"#fff\\\",\\\"primarySoft\\\":\\\"#f3f4f6\\\",\\\"radiusLg\\\":\\\"10px\\\",\\\"radiusSm\\\":\\\"4px\\\",\\\"radiusMd\\\":\\\"6px\\\",\\\"accent\\\":\\\"#4b5563\\\",\\\"shadowSm\\\":\\\"0 2px 10px rgba(15,23,42,.04)\\\",\\\"contentWidth\\\":\\\"1160px\\\",\\\"background\\\":\\\"#f9fafb\\\",\\\"primaryStrong\\\":\\\"#030712\\\",\\\"text\\\":\\\"#111827\\\",\\\"shadowMd\\\":\\\"0 10px 30px rgba(15,23,42,.08)\\\",\\\"primary\\\":\\\"#111827\\\"}\",\"updateBy\":\"admin\",\"version\":1}', '{\"msg\":\"操作成功\",\"code\":200}', 0, NULL, '2026-07-15 12:14:16', 72);
-- ----------------------------
-- Table structure for sys_page_layout_template
-- ----------------------------
DROP TABLE IF EXISTS `sys_page_layout_template`;
CREATE TABLE `sys_page_layout_template` (
`layout_id` bigint(20) NOT NULL AUTO_INCREMENT,
`layout_code` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NOT NULL,
`layout_name` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NOT NULL,
`description` varchar(500) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL,
`page_type` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NOT NULL,
`page_scope` varchar(20) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NOT NULL DEFAULT 'all',
`framework` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NOT NULL DEFAULT 'vue2-element-ui',
`render_template_key` varchar(150) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NOT NULL,
`config_json` longtext CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL,
`compatibility_json` longtext CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL,
`preview_image` varchar(500) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL,
`version` int(11) NOT NULL DEFAULT 1,
`weight` int(11) NOT NULL DEFAULT 1,
`status` char(1) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NOT NULL DEFAULT '0',
`sort_order` int(11) NOT NULL DEFAULT 0,
`create_by` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT '',
`create_time` datetime(0) NULL DEFAULT NULL,
`update_by` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT '',
`update_time` datetime(0) NULL DEFAULT NULL,
`remark` varchar(500) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL,
PRIMARY KEY (`layout_id`) USING BTREE,
UNIQUE INDEX `uk_page_layout_code`(`layout_code`) USING BTREE,
INDEX `idx_page_layout_type_scope`(`page_type`, `page_scope`, `status`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 18 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_0900_ai_ci COMMENT = 'generated page layout catalog' ROW_FORMAT = Dynamic;
-- ----------------------------
-- Records of sys_page_layout_template
-- ----------------------------
INSERT INTO `sys_page_layout_template` VALUES (1, 'frontend-list-v1', '标准表格', '查询、工具栏、表格与弹窗', 'list', 'frontend', 'vue2-element-ui', 'qing/frontend-index', '{}', '{}', NULL, 1, 4, '0', 10, 'system', '2026-07-14 14:56:31', '', NULL, NULL);
INSERT INTO `sys_page_layout_template` VALUES (2, 'frontend-list-card-v1', '卡片列表', '适合商品、内容与活动', 'list', 'frontend', 'vue2-element-ui', 'qing/frontend-index', '{}', '{\"imagePreferred\":true}', NULL, 1, 3, '0', 20, 'system', '2026-07-14 14:56:31', '', NULL, NULL);
INSERT INTO `sys_page_layout_template` VALUES (3, 'frontend-list-split-v1', '分栏列表', '左侧分类,右侧数据', 'list', 'frontend', 'vue2-element-ui', 'qing/frontend-index', '{}', '{\"categoryPreferred\":true}', NULL, 1, 2, '0', 30, 'system', '2026-07-14 14:56:31', '', NULL, NULL);
INSERT INTO `sys_page_layout_template` VALUES (4, 'frontend-current-user-list-v1', '我的列表', '当前用户记录表格', 'current_user_list', 'frontend', 'vue2-element-ui', 'qing/frontend-index', '{}', '{}', NULL, 1, 3, '0', 40, 'system', '2026-07-14 14:56:31', '', NULL, NULL);
INSERT INTO `sys_page_layout_template` VALUES (5, 'frontend-current-user-card-v1', '我的卡片', '当前用户记录卡片', 'current_user_list', 'frontend', 'vue2-element-ui', 'qing/frontend-index', '{}', '{}', NULL, 1, 3, '0', 50, 'system', '2026-07-14 14:56:31', '', NULL, NULL);
INSERT INTO `sys_page_layout_template` VALUES (6, 'frontend-detail-v1', '基础详情', '普通记录详情', 'detail', 'frontend', 'vue2-element-ui', 'qing/frontend-index', '{}', '{}', NULL, 1, 3, '0', 60, 'system', '2026-07-14 14:56:31', '', NULL, NULL);
INSERT INTO `sys_page_layout_template` VALUES (7, 'frontend-detail-media-v1', '图文详情', '突出主图和内容', 'detail', 'frontend', 'vue2-element-ui', 'qing/frontend-index', '{}', '{\"imagePreferred\":true}', NULL, 1, 3, '0', 70, 'system', '2026-07-14 14:56:31', '', NULL, NULL);
INSERT INTO `sys_page_layout_template` VALUES (8, 'frontend-form-v1', '单页表单', '轻量录入表单', 'form', 'frontend', 'vue2-element-ui', 'qing/frontend-index', '{}', '{}', NULL, 1, 3, '0', 80, 'system', '2026-07-14 14:56:31', '', NULL, NULL);
INSERT INTO `sys_page_layout_template` VALUES (9, 'frontend-form-group-v1', '分组表单', '字段较多的录入页', 'form', 'frontend', 'vue2-element-ui', 'qing/frontend-index', '{}', '{\"minFormFields\":8}', NULL, 1, 3, '0', 90, 'system', '2026-07-14 14:56:31', '', NULL, NULL);
INSERT INTO `sys_page_layout_template` VALUES (10, 'admin-list-v1', '标准管理表格', '后台 CRUD 管理', 'list', 'admin', 'vue2-element-ui', 'qing/admin-index', '{}', '{}', NULL, 1, 4, '0', 100, 'system', '2026-07-14 14:56:31', '', NULL, NULL);
INSERT INTO `sys_page_layout_template` VALUES (11, 'admin-list-dense-v1', '高密度表格', '运营高频维护', 'list', 'admin', 'vue2-element-ui', 'qing/admin-index', '{}', '{\"minListFields\":10}', NULL, 1, 2, '0', 110, 'system', '2026-07-14 14:56:31', '', NULL, NULL);
INSERT INTO `sys_page_layout_template` VALUES (12, 'admin-list-split-v1', '分栏管理', '分类层级明显的后台页', 'list', 'admin', 'vue2-element-ui', 'qing/admin-index', '{}', '{\"categoryPreferred\":true}', NULL, 1, 2, '0', 120, 'system', '2026-07-14 14:56:31', '', NULL, NULL);
INSERT INTO `sys_page_layout_template` VALUES (13, 'admin-detail-v1', '后台详情', '审核与查看记录', 'detail', 'admin', 'vue2-element-ui', 'qing/admin-index', '{}', '{}', NULL, 1, 3, '0', 130, 'system', '2026-07-14 14:56:31', '', NULL, NULL);
INSERT INTO `sys_page_layout_template` VALUES (14, 'admin-form-v1', '后台表单', '后台新增与编辑', 'form', 'admin', 'vue2-element-ui', 'qing/admin-index', '{}', '{}', NULL, 1, 3, '0', 140, 'system', '2026-07-14 14:56:31', '', NULL, NULL);
INSERT INTO `sys_page_layout_template` VALUES (15, 'admin-form-group-v1', '后台分组表单', '字段较多的后台录入', 'form', 'admin', 'vue2-element-ui', 'qing/admin-index', '{}', '{\"minFormFields\":8}', NULL, 1, 3, '0', 150, 'system', '2026-07-14 14:56:31', '', NULL, NULL);
INSERT INTO `sys_page_layout_template` VALUES (16, 'business-blocks-v1', '业务块页面', '统计、图表与业务组件组合', 'business_block', 'all', 'vue2-element-ui', 'qing/business-blocks', '{}', '{}', NULL, 1, 1, '0', 160, 'system', '2026-07-14 14:56:31', '', NULL, NULL);
INSERT INTO `sys_page_layout_template` VALUES (17, 'menu-directory-v1', '菜单目录', '仅作为导航分组', 'menu_directory', 'all', 'vue2-element-ui', 'qing/menu-directory', '{}', '{}', NULL, 1, 1, '0', 170, 'system', '2026-07-14 14:56:31', '', NULL, NULL);
-- ----------------------------
-- Table structure for sys_page_theme
-- ----------------------------
DROP TABLE IF EXISTS `sys_page_theme`;
CREATE TABLE `sys_page_theme` (
`theme_id` bigint(20) NOT NULL AUTO_INCREMENT,
`theme_code` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NOT NULL,
`theme_name` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NOT NULL,
`description` varchar(500) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL,
`framework` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NOT NULL DEFAULT 'vue2-element-ui',
`density` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NOT NULL DEFAULT 'comfortable',
`tokens_json` longtext CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NOT NULL,
`component_defaults_json` longtext CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL,
`shell_json` longtext CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL COMMENT 'application shell variants JSON',
`layout_policy_json` longtext CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL COMMENT 'page type to layout mapping JSON',
`asset_policy_json` longtext CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL COMMENT 'icons illustrations and chart palette JSON',
`preview_image` varchar(500) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL,
`version` int(11) NOT NULL DEFAULT 1,
`status` char(1) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NOT NULL DEFAULT '0',
`sort_order` int(11) NOT NULL DEFAULT 0,
`create_by` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT '',
`create_time` datetime(0) NULL DEFAULT NULL,
`update_by` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT '',
`update_time` datetime(0) NULL DEFAULT NULL,
`remark` varchar(500) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL,
PRIMARY KEY (`theme_id`) USING BTREE,
UNIQUE INDEX `uk_page_theme_code`(`theme_code`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 8 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_0900_ai_ci COMMENT = 'generated page theme catalog' ROW_FORMAT = Dynamic;
-- ----------------------------
-- Records of sys_page_theme
-- ----------------------------
INSERT INTO `sys_page_theme` VALUES (1, 'classic-admin', '经典后台', '传统企业后台主题', 'vue2-element-ui', 'compact', '{\"border\":\"#dcdfe6\",\"textSecondary\":\"#606266\",\"surface\":\"#fff\",\"primarySoft\":\"#ecf5ff\",\"radiusLg\":\"8px\",\"radiusSm\":\"4px\",\"radiusMd\":\"6px\",\"accent\":\"#67c23a\",\"shadowSm\":\"0 2px 12px rgba(0,0,0,.06)\",\"contentWidth\":\"1280px\",\"background\":\"#f4f6f8\",\"primaryStrong\":\"#337ecc\",\"text\":\"#303133\",\"shadowMd\":\"0 10px 30px rgba(0,0,0,.10)\",\"primary\":\"#409eff\"}', '{\"buttonStyle\":\"square\",\"formStyle\":\"inline\",\"dialogStyle\":\"dialog\",\"tableStyle\":\"border\"}', '{\"contentFrame\":\"wide\",\"frontendNavigation\":\"top\",\"header\":\"compact\",\"adminNavigation\":\"sidebar\",\"login\":\"centered\"}', '{\"admin.list\":\"admin-list-v1\",\"frontend.list\":\"frontend-list-v1\",\"admin.detail\":\"admin-detail-v1\",\"frontend.detail\":\"frontend-detail-v1\",\"admin.form\":\"admin-form-v1\",\"frontend.form\":\"frontend-form-v1\",\"frontend.current_user_list\":\"frontend-current-user-list-v1\"}', '{\"chartPalette\":[\"#409eff\",\"#67c23a\",\"#e6a23c\",\"#909399\",\"#f56c6c\"],\"illustrationStyle\":\"business\",\"iconStyle\":\"classic\"}', NULL, 1, '0', 10, 'system', '2026-07-14 14:56:31', 'admin', '2026-07-15 12:13:23', NULL);
INSERT INTO `sys_page_theme` VALUES (2, 'modern-blue', '现代蓝', '现代卡片式蓝色主题', 'vue2-element-ui', 'comfortable', '{\"border\":\"#dbe5f3\",\"textSecondary\":\"#64748b\",\"surface\":\"#fff\",\"primarySoft\":\"#eff6ff\",\"radiusLg\":\"18px\",\"radiusSm\":\"8px\",\"radiusMd\":\"12px\",\"accent\":\"#06b6d4\",\"shadowSm\":\"0 8px 24px rgba(37,99,235,.08)\",\"contentWidth\":\"1200px\",\"background\":\"#f5f7fb\",\"primaryStrong\":\"#1d4ed8\",\"text\":\"#172033\",\"shadowMd\":\"0 20px 48px rgba(37,99,235,.14)\",\"primary\":\"#2563eb\"}', '{\"buttonStyle\":\"round\",\"formStyle\":\"top\",\"dialogStyle\":\"drawer\",\"tableStyle\":\"card\"}', '{\"contentFrame\":\"contained\",\"frontendNavigation\":\"top\",\"header\":\"hero\",\"adminNavigation\":\"top\",\"login\":\"split\"}', '{\"admin.list\":\"admin-list-v1\",\"frontend.list\":\"frontend-list-card-v1\",\"frontend.detail\":\"frontend-detail-media-v1\",\"frontend.form\":\"frontend-form-group-v1\",\"frontend.current_user_list\":\"frontend-current-user-card-v1\"}', '{\"chartPalette\":[\"#2563eb\",\"#06b6d4\",\"#7c3aed\",\"#f59e0b\",\"#10b981\"],\"illustrationStyle\":\"modern\",\"iconStyle\":\"outline\"}', NULL, 1, '0', 20, 'system', '2026-07-14 14:56:31', 'admin', '2026-07-15 12:13:30', NULL);
INSERT INTO `sys_page_theme` VALUES (3, 'soft-green', '清新绿', '社区与预约场景主题', 'vue2-element-ui', 'comfortable', '{\"primary\":\"#16a34a\",\"primaryStrong\":\"#15803d\",\"primarySoft\":\"#f0fdf4\",\"accent\":\"#0d9488\",\"background\":\"#f7fbf8\",\"surface\":\"#fff\",\"border\":\"#dcebe0\",\"text\":\"#183022\",\"textSecondary\":\"#607468\",\"radiusSm\":\"10px\",\"radiusMd\":\"14px\",\"radiusLg\":\"20px\",\"shadowSm\":\"0 8px 22px rgba(22,163,74,.07)\",\"shadowMd\":\"0 18px 42px rgba(22,163,74,.12)\",\"contentWidth\":\"1180px\"}', '{\"formStyle\":\"top\",\"dialogStyle\":\"drawer\",\"tableStyle\":\"card\",\"buttonStyle\":\"round\"}', '{\"login\": \"split\", \"header\": \"hero\", \"contentFrame\": \"contained\", \"adminNavigation\": \"top\", \"frontendNavigation\": \"top\"}', '{\"frontend.list\":\"frontend-list-card-v1\",\"frontend.current_user_list\":\"frontend-current-user-card-v1\",\"frontend.detail\":\"frontend-detail-v1\",\"frontend.form\":\"frontend-form-v1\",\"admin.list\":\"admin-list-v1\"}', '{\"iconStyle\":\"rounded\",\"illustrationStyle\":\"natural\",\"chartPalette\":[\"#16a34a\",\"#0d9488\",\"#84cc16\",\"#2563eb\",\"#f59e0b\"]}', NULL, 1, '0', 30, 'system', '2026-07-14 14:56:31', '', NULL, NULL);
INSERT INTO `sys_page_theme` VALUES (4, 'dark-tech', '科技黑', '暗色科技看板主题', 'vue2-element-ui', 'compact', '{\"border\":\"#26364a\",\"textSecondary\":\"#94a9bf\",\"surface\":\"#101c2d\",\"primarySoft\":\"#082f49\",\"radiusLg\":\"18px\",\"radiusSm\":\"8px\",\"radiusMd\":\"12px\",\"accent\":\"#a78bfa\",\"shadowSm\":\"0 8px 24px rgba(0,0,0,.22)\",\"contentWidth\":\"1280px\",\"background\":\"#07111f\",\"primaryStrong\":\"#0284c7\",\"text\":\"#e5f2ff\",\"shadowMd\":\"0 22px 54px rgba(0,0,0,.35)\",\"primary\":\"#38bdf8\"}', '{\"buttonStyle\":\"round\",\"formStyle\":\"top\",\"dialogStyle\":\"drawer\",\"tableStyle\":\"border\"}', '{\"contentFrame\":\"wide\",\"frontendNavigation\":\"top\",\"header\":\"compact\",\"adminNavigation\":\"sidebar\",\"login\":\"centered\"}', '{\"admin.list\":\"admin-list-dense-v1\",\"frontend.list\":\"frontend-list-card-v1\",\"frontend.detail\":\"frontend-detail-media-v1\",\"frontend.form\":\"frontend-form-group-v1\",\"frontend.current_user_list\":\"frontend-current-user-card-v1\"}', '{\"chartPalette\":[\"#38bdf8\",\"#a78bfa\",\"#22d3ee\",\"#34d399\",\"#fbbf24\"],\"illustrationStyle\":\"technical\",\"iconStyle\":\"neon\"}', NULL, 1, '0', 40, 'system', '2026-07-14 14:56:31', 'admin', '2026-07-15 12:13:39', NULL);
INSERT INTO `sys_page_theme` VALUES (5, 'campus-orange', '校园橙', '校园服务活力主题', 'vue2-element-ui', 'comfortable', '{\"primary\":\"#ea580c\",\"primaryStrong\":\"#c2410c\",\"primarySoft\":\"#fff7ed\",\"accent\":\"#2563eb\",\"background\":\"#fffaf5\",\"surface\":\"#fff\",\"border\":\"#f0dfd2\",\"text\":\"#2f241d\",\"textSecondary\":\"#78685d\",\"radiusSm\":\"10px\",\"radiusMd\":\"14px\",\"radiusLg\":\"20px\",\"shadowSm\":\"0 8px 22px rgba(234,88,12,.08)\",\"shadowMd\":\"0 20px 46px rgba(234,88,12,.14)\",\"contentWidth\":\"1180px\"}', '{\"formStyle\":\"top\",\"dialogStyle\":\"dialog\",\"tableStyle\":\"stripe\",\"buttonStyle\":\"round\"}', '{\"login\": \"split\", \"header\": \"hero\", \"contentFrame\": \"contained\", \"adminNavigation\": \"top\", \"frontendNavigation\": \"top\"}', '{\"frontend.list\":\"frontend-list-card-v1\",\"frontend.current_user_list\":\"frontend-current-user-card-v1\",\"frontend.detail\":\"frontend-detail-media-v1\",\"frontend.form\":\"frontend-form-v1\",\"admin.list\":\"admin-list-v1\"}', '{\"iconStyle\":\"rounded\",\"illustrationStyle\":\"youthful\",\"chartPalette\":[\"#ea580c\",\"#2563eb\",\"#f59e0b\",\"#16a34a\",\"#db2777\"]}', NULL, 1, '0', 50, 'system', '2026-07-14 14:56:31', '', NULL, NULL);
INSERT INTO `sys_page_theme` VALUES (6, 'elegant-purple', '优雅紫', '内容与服务型项目主题', 'vue2-element-ui', 'comfortable', '{\"primary\":\"#7c3aed\",\"primaryStrong\":\"#6d28d9\",\"primarySoft\":\"#f5f3ff\",\"accent\":\"#db2777\",\"background\":\"#faf8ff\",\"surface\":\"#fff\",\"border\":\"#e6def4\",\"text\":\"#292038\",\"textSecondary\":\"#746a82\",\"radiusSm\":\"10px\",\"radiusMd\":\"14px\",\"radiusLg\":\"20px\",\"shadowSm\":\"0 8px 24px rgba(124,58,237,.08)\",\"shadowMd\":\"0 20px 48px rgba(124,58,237,.14)\",\"contentWidth\":\"1200px\"}', '{\"formStyle\":\"top\",\"dialogStyle\":\"drawer\",\"tableStyle\":\"card\",\"buttonStyle\":\"round\"}', '{\"login\": \"centered\", \"header\": \"hero\", \"contentFrame\": \"contained\", \"adminNavigation\": \"top\", \"frontendNavigation\": \"top\"}', '{\"frontend.list\":\"frontend-list-card-v1\",\"frontend.current_user_list\":\"frontend-current-user-card-v1\",\"frontend.detail\":\"frontend-detail-media-v1\",\"frontend.form\":\"frontend-form-group-v1\",\"admin.list\":\"admin-list-v1\"}', '{\"iconStyle\":\"outline\",\"illustrationStyle\":\"editorial\",\"chartPalette\":[\"#7c3aed\",\"#db2777\",\"#a78bfa\",\"#2563eb\",\"#f59e0b\"]}', NULL, 1, '0', 60, 'system', '2026-07-14 14:56:31', '', NULL, NULL);
INSERT INTO `sys_page_theme` VALUES (7, 'minimal-white', '极简白', '低装饰高留白主题', 'vue2-element-ui', 'comfortable', '{\"border\":\"#e5e7eb\",\"textSecondary\":\"#6b7280\",\"surface\":\"#fff\",\"primarySoft\":\"#f3f4f6\",\"radiusLg\":\"10px\",\"radiusSm\":\"4px\",\"radiusMd\":\"6px\",\"accent\":\"#4b5563\",\"shadowSm\":\"0 2px 10px rgba(15,23,42,.04)\",\"contentWidth\":\"1160px\",\"background\":\"#f9fafb\",\"primaryStrong\":\"#030712\",\"text\":\"#111827\",\"shadowMd\":\"0 10px 30px rgba(15,23,42,.08)\",\"primary\":\"#111827\"}', '{\"buttonStyle\":\"square\",\"formStyle\":\"top\",\"dialogStyle\":\"dialog\",\"tableStyle\":\"plain\"}', '{\"contentFrame\":\"narrow\",\"frontendNavigation\":\"top\",\"header\":\"hidden\",\"adminNavigation\":\"top\",\"login\":\"centered\"}', '{\"admin.list\":\"admin-list-v1\",\"frontend.list\":\"frontend-list-v1\",\"frontend.detail\":\"frontend-detail-v1\",\"frontend.form\":\"frontend-form-v1\",\"frontend.current_user_list\":\"frontend-current-user-list-v1\"}', '{\"chartPalette\":[\"#111827\",\"#4b5563\",\"#9ca3af\",\"#d1d5db\",\"#6b7280\"],\"illustrationStyle\":\"none\",\"iconStyle\":\"minimal\"}', NULL, 1, '0', 70, 'system', '2026-07-14 14:56:31', 'admin', '2026-07-15 12:14:16', NULL);
-- ----------------------------
-- Table structure for sys_post
-- ----------------------------
DROP TABLE IF EXISTS `sys_post`;
CREATE TABLE `sys_post` (
`post_id` bigint(20) NOT NULL AUTO_INCREMENT COMMENT '岗位ID',
`post_code` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NOT NULL COMMENT '岗位编码',
`post_name` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NOT NULL COMMENT '岗位名称',
`post_sort` int(4) NOT NULL COMMENT '显示顺序',
`status` char(1) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NOT NULL COMMENT '状态0正常 1停用',
`create_by` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT '' COMMENT '创建者',
`create_time` datetime(0) NULL DEFAULT NULL COMMENT '创建时间',
`update_by` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT '' COMMENT '更新者',
`update_time` datetime(0) NULL DEFAULT NULL COMMENT '更新时间',
`remark` varchar(500) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '备注',
PRIMARY KEY (`post_id`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 5 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_0900_ai_ci COMMENT = '岗位信息表' ROW_FORMAT = Dynamic;
-- ----------------------------
-- Records of sys_post
-- ----------------------------
INSERT INTO `sys_post` VALUES (1, 'ceo', '董事长', 1, '0', 'admin', '2026-07-14 14:56:29', '', NULL, '');
INSERT INTO `sys_post` VALUES (2, 'se', '项目经理', 2, '0', 'admin', '2026-07-14 14:56:29', '', NULL, '');
INSERT INTO `sys_post` VALUES (3, 'hr', '人力资源', 3, '0', 'admin', '2026-07-14 14:56:29', '', NULL, '');
INSERT INTO `sys_post` VALUES (4, 'user', '普通员工', 4, '0', 'admin', '2026-07-14 14:56:29', '', NULL, '');
-- ----------------------------
-- Table structure for sys_project_module
-- ----------------------------
DROP TABLE IF EXISTS `sys_project_module`;
CREATE TABLE `sys_project_module` (
`id` bigint(20) NOT NULL AUTO_INCREMENT COMMENT 'ID',
`project_id` bigint(20) NOT NULL COMMENT '项目ID',
`module_id` bigint(20) NOT NULL COMMENT '功能模块ID',
`status` char(1) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT '0' COMMENT '状态0正常 1停用',
`create_by` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT '' COMMENT '创建者',
`create_time` datetime(0) NULL DEFAULT NULL COMMENT '创建时间',
`update_by` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT '' COMMENT '更新者',
`update_time` datetime(0) NULL DEFAULT NULL COMMENT '更新时间',
`remark` varchar(500) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '备注',
PRIMARY KEY (`id`) USING BTREE,
UNIQUE INDEX `idx_project_module`(`project_id`, `module_id`) USING BTREE,
INDEX `idx_project_module_module_id`(`module_id`) USING BTREE,
CONSTRAINT `fk_project_module_module` FOREIGN KEY (`module_id`) REFERENCES `sys_module` (`module_id`) ON DELETE RESTRICT ON UPDATE RESTRICT,
CONSTRAINT `fk_project_module_project` FOREIGN KEY (`project_id`) REFERENCES `gen_project` (`project_id`) ON DELETE RESTRICT ON UPDATE RESTRICT
) ENGINE = InnoDB AUTO_INCREMENT = 100 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_0900_ai_ci COMMENT = '项目与功能模块关系表' ROW_FORMAT = Dynamic;
-- ----------------------------
-- Table structure for sys_project_structure
-- ----------------------------
DROP TABLE IF EXISTS `sys_project_structure`;
CREATE TABLE `sys_project_structure` (
`node_id` bigint(20) NOT NULL AUTO_INCREMENT COMMENT '节点ID',
`parent_id` bigint(20) NULL DEFAULT 0 COMMENT '父节点ID',
`node_name` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NOT NULL COMMENT '节点名称',
`node_type` varchar(20) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NOT NULL COMMENT '节点类型(folder/file)',
`module` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT '' COMMENT '功能模块',
`template_id` bigint(20) NULL DEFAULT NULL COMMENT '模板ID',
`table_id` bigint(20) NULL DEFAULT NULL COMMENT '关联表ID',
`category` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '文件类别',
`sort_order` int(4) NULL DEFAULT 0 COMMENT '显示顺序',
`status` char(1) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT '0' COMMENT '状态0正常 1停用',
`create_by` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT '' COMMENT '创建者',
`create_time` datetime(0) NULL DEFAULT NULL COMMENT '创建时间',
`update_by` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT '' COMMENT '更新者',
`update_time` datetime(0) NULL DEFAULT NULL COMMENT '更新时间',
PRIMARY KEY (`node_id`) USING BTREE,
INDEX `idx_project_structure_parent_id`(`parent_id`) USING BTREE,
INDEX `idx_project_structure_template_id`(`template_id`) USING BTREE,
INDEX `idx_project_structure_table_id`(`table_id`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 920323 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_0900_ai_ci COMMENT = '项目结构节点表' ROW_FORMAT = Dynamic;
-- ----------------------------
-- Records of sys_project_structure
-- ----------------------------
INSERT INTO `sys_project_structure` VALUES (1, 0, '项目根目录', 'folder', '根模块', NULL, NULL, NULL, 1, '0', 'admin', '2026-07-14 14:56:32', '', NULL);
INSERT INTO `sys_project_structure` VALUES (2, 1, 'src', 'folder', '源码', NULL, NULL, NULL, 1, '0', 'admin', '2026-07-14 14:56:32', '', NULL);
INSERT INTO `sys_project_structure` VALUES (3, 2, 'main', 'folder', '主目录', NULL, NULL, NULL, 1, '0', 'admin', '2026-07-14 14:56:32', '', NULL);
INSERT INTO `sys_project_structure` VALUES (4, 3, 'java', 'folder', '源代码', NULL, NULL, NULL, 1, '0', 'admin', '2026-07-14 14:56:32', '', NULL);
INSERT INTO `sys_project_structure` VALUES (5, 3, 'resources', 'folder', '资源', NULL, NULL, NULL, 2, '0', 'admin', '2026-07-14 14:56:32', '', NULL);
INSERT INTO `sys_project_structure` VALUES (6, 1, 'pom.xml', 'file', '依赖管理', NULL, NULL, 'xml', 2, '0', 'admin', '2026-07-14 14:56:32', '', NULL);
INSERT INTO `sys_project_structure` VALUES (7, 1, 'README.md', 'file', '说明文档', NULL, NULL, 'markdown', 3, '0', 'admin', '2026-07-14 14:56:32', '', NULL);
INSERT INTO `sys_project_structure` VALUES (920100, 0, '{projectName}-backend', 'folder', NULL, 9201, NULL, NULL, 1, '0', 'admin', '2026-07-15 11:18:32', '', NULL);
INSERT INTO `sys_project_structure` VALUES (920101, 920100, 'pom.xml', 'file', NULL, 9201, -1, 'pom.xml.vm', 1, '0', 'admin', '2026-07-15 11:18:32', '', NULL);
INSERT INTO `sys_project_structure` VALUES (920102, 920100, 'README.md', 'file', NULL, 9201, -1, 'README.md.vm', 2, '0', 'admin', '2026-07-15 11:18:32', '', NULL);
INSERT INTO `sys_project_structure` VALUES (920103, 920100, 'sql', 'folder', NULL, 9201, NULL, NULL, 3, '0', 'admin', '2026-07-15 11:18:32', '', NULL);
INSERT INTO `sys_project_structure` VALUES (920104, 920103, '{businessName}.sql', 'file', NULL, 9201, 0, 'sql.vm', 1, '0', 'admin', '2026-07-15 11:18:32', '', NULL);
INSERT INTO `sys_project_structure` VALUES (920110, 920100, 'src', 'folder', NULL, 9201, NULL, NULL, 4, '0', 'admin', '2026-07-15 11:18:32', '', NULL);
INSERT INTO `sys_project_structure` VALUES (920111, 920110, 'main', 'folder', NULL, 9201, NULL, NULL, 1, '0', 'admin', '2026-07-15 11:18:32', '', NULL);
INSERT INTO `sys_project_structure` VALUES (920112, 920111, 'java', 'folder', NULL, 9201, NULL, NULL, 1, '0', 'admin', '2026-07-15 11:18:32', '', NULL);
INSERT INTO `sys_project_structure` VALUES (920113, 920111, 'resources', 'folder', NULL, 9201, NULL, NULL, 2, '0', 'admin', '2026-07-15 11:18:32', '', NULL);
INSERT INTO `sys_project_structure` VALUES (920114, 920112, '{packagePath}', 'folder', NULL, 9201, NULL, NULL, 1, '0', 'admin', '2026-07-15 11:18:32', '', NULL);
INSERT INTO `sys_project_structure` VALUES (920115, 920114, '{projectClassName}Application.java', 'file', NULL, 9201, -1, 'Application.java.vm', 1, '0', 'admin', '2026-07-15 11:18:32', '', NULL);
INSERT INTO `sys_project_structure` VALUES (920116, 920114, 'common', 'folder', NULL, 9201, NULL, NULL, 2, '0', 'admin', '2026-07-15 11:18:32', '', NULL);
INSERT INTO `sys_project_structure` VALUES (920117, 920116, 'Result.java', 'file', NULL, 9201, -1, 'Result.java.vm', 1, '0', 'admin', '2026-07-15 11:18:32', '', NULL);
INSERT INTO `sys_project_structure` VALUES (920118, 920114, 'config', 'folder', NULL, 9201, NULL, NULL, 3, '0', 'admin', '2026-07-15 11:18:32', '', NULL);
INSERT INTO `sys_project_structure` VALUES (920119, 920118, 'MybatisPlusConfig.java', 'file', NULL, 9201, -1, 'MybatisPlusConfig.java.vm', 1, '0', 'admin', '2026-07-15 11:18:32', '', NULL);
INSERT INTO `sys_project_structure` VALUES (920120, 920118, 'CorsConfig.java', 'file', NULL, 9201, -1, 'CorsConfig.java.vm', 2, '0', 'admin', '2026-07-15 11:18:32', '', NULL);
INSERT INTO `sys_project_structure` VALUES (920121, 920114, 'controller', 'folder', NULL, 9201, NULL, NULL, 4, '0', 'admin', '2026-07-15 11:18:32', '', NULL);
INSERT INTO `sys_project_structure` VALUES (920122, 920121, 'FileController.java', 'file', NULL, 9201, -1, 'FileController.java.vm', 1, '0', 'admin', '2026-07-15 11:18:32', '', NULL);
INSERT INTO `sys_project_structure` VALUES (920123, 920121, '{ClassName}Controller.java', 'file', NULL, 9201, 0, 'controller.java.vm', 2, '0', 'admin', '2026-07-15 11:18:32', '', NULL);
INSERT INTO `sys_project_structure` VALUES (920124, 920114, 'entity', 'folder', NULL, 9201, NULL, NULL, 5, '0', 'admin', '2026-07-15 11:18:32', '', NULL);
INSERT INTO `sys_project_structure` VALUES (920125, 920124, '{ClassName}.java', 'file', NULL, 9201, 0, 'entity.java.vm', 1, '0', 'admin', '2026-07-15 11:18:32', '', NULL);
INSERT INTO `sys_project_structure` VALUES (920126, 920114, 'mapper', 'folder', NULL, 9201, NULL, NULL, 6, '0', 'admin', '2026-07-15 11:18:32', '', NULL);
INSERT INTO `sys_project_structure` VALUES (920127, 920126, '{ClassName}Mapper.java', 'file', NULL, 9201, 0, 'mapper.java.vm', 1, '0', 'admin', '2026-07-15 11:18:32', '', NULL);
INSERT INTO `sys_project_structure` VALUES (920128, 920114, 'service', 'folder', NULL, 9201, NULL, NULL, 7, '0', 'admin', '2026-07-15 11:18:32', '', NULL);
INSERT INTO `sys_project_structure` VALUES (920129, 920128, 'I{ClassName}Service.java', 'file', NULL, 9201, 0, 'service.java.vm', 1, '0', 'admin', '2026-07-15 11:18:32', '', NULL);
INSERT INTO `sys_project_structure` VALUES (920130, 920128, 'impl', 'folder', NULL, 9201, NULL, NULL, 2, '0', 'admin', '2026-07-15 11:18:32', '', NULL);
INSERT INTO `sys_project_structure` VALUES (920131, 920130, '{ClassName}ServiceImpl.java', 'file', NULL, 9201, 0, 'serviceImpl.java.vm', 1, '0', 'admin', '2026-07-15 11:18:32', '', NULL);
INSERT INTO `sys_project_structure` VALUES (920132, 920113, 'application.yml', 'file', NULL, 9201, -1, 'application.yml.vm', 1, '0', 'admin', '2026-07-15 11:18:32', '', NULL);
INSERT INTO `sys_project_structure` VALUES (920133, 920113, 'mapper', 'folder', NULL, 9201, NULL, NULL, 2, '0', 'admin', '2026-07-15 11:18:32', '', NULL);
INSERT INTO `sys_project_structure` VALUES (920134, 920133, '{moduleName}', 'folder', NULL, 9201, 0, NULL, 1, '0', 'admin', '2026-07-15 11:18:32', '', NULL);
INSERT INTO `sys_project_structure` VALUES (920135, 920134, '{ClassName}Mapper.xml', 'file', NULL, 9201, 0, 'mapper.xml.vm', 1, '0', 'admin', '2026-07-15 11:18:32', '', NULL);
INSERT INTO `sys_project_structure` VALUES (920136, 920138, 'AuthPrincipal.java', 'file', NULL, 9201, -1, 'AuthPrincipal.java.vm', 1, '0', 'admin', '2026-07-15 11:18:32', '', NULL);
INSERT INTO `sys_project_structure` VALUES (920138, 920114, 'security', 'folder', NULL, 9201, NULL, NULL, 8, '0', 'admin', '2026-07-15 11:18:32', '', NULL);
INSERT INTO `sys_project_structure` VALUES (920139, 920138, 'PortalAuthTokenStore.java', 'file', NULL, 9201, -1, 'PortalAuthTokenStore.java.vm', 2, '0', 'admin', '2026-07-15 11:18:32', '', NULL);
INSERT INTO `sys_project_structure` VALUES (920140, 920138, 'PortalAuthInterceptor.java', 'file', NULL, 9201, -1, 'PortalAuthInterceptor.java.vm', 3, '0', 'admin', '2026-07-15 11:18:32', '', NULL);
INSERT INTO `sys_project_structure` VALUES (920141, 920121, 'PortalAuthController.java', 'file', NULL, 9201, -1, 'PortalAuthController.java.vm', 3, '0', 'admin', '2026-07-15 11:18:32', '', NULL);
INSERT INTO `sys_project_structure` VALUES (920144, 920121, 'AdminAuthController.java', 'file', NULL, 9201, -1, 'AdminAuthController.java.vm', 4, '0', 'admin', '2026-07-15 11:18:32', '', NULL);
INSERT INTO `sys_project_structure` VALUES (920200, 0, '{projectName}-admin', 'folder', NULL, 9202, NULL, NULL, 1, '0', 'admin', '2026-07-15 11:18:32', '', NULL);
INSERT INTO `sys_project_structure` VALUES (920201, 920200, 'package.json', 'file', NULL, 9202, -1, 'package.json.vm', 1, '0', 'admin', '2026-07-15 11:18:32', '', NULL);
INSERT INTO `sys_project_structure` VALUES (920202, 920200, 'babel.config.js', 'file', NULL, 9202, -1, 'babel.config.js.vm', 2, '0', 'admin', '2026-07-15 11:18:32', '', NULL);
INSERT INTO `sys_project_structure` VALUES (920203, 920200, 'vue.config.js', 'file', NULL, 9202, -1, 'vue.config.js.vm', 3, '0', 'admin', '2026-07-15 11:18:32', '', NULL);
INSERT INTO `sys_project_structure` VALUES (920204, 920200, 'public', 'folder', NULL, 9202, NULL, NULL, 4, '0', 'admin', '2026-07-15 11:18:32', '', NULL);
INSERT INTO `sys_project_structure` VALUES (920205, 920204, 'index.html', 'file', NULL, 9202, -1, 'index.html.vm', 1, '0', 'admin', '2026-07-15 11:18:32', '', NULL);
INSERT INTO `sys_project_structure` VALUES (920206, 920200, 'src', 'folder', NULL, 9202, NULL, NULL, 5, '0', 'admin', '2026-07-15 11:18:32', '', NULL);
INSERT INTO `sys_project_structure` VALUES (920207, 920206, 'main.js', 'file', NULL, 9202, -1, 'admin-main.js.vm', 1, '0', 'admin', '2026-07-15 11:18:32', '', NULL);
INSERT INTO `sys_project_structure` VALUES (920208, 920206, 'App.vue', 'file', NULL, 9202, -1, 'admin-App.vue.vm', 2, '0', 'admin', '2026-07-15 11:18:32', '', NULL);
INSERT INTO `sys_project_structure` VALUES (920209, 920206, 'router', 'folder', NULL, 9202, NULL, NULL, 3, '0', 'admin', '2026-07-15 11:18:32', '', NULL);
INSERT INTO `sys_project_structure` VALUES (920210, 920209, 'index.js', 'file', NULL, 9202, -1, 'admin-router.js.vm', 1, '0', 'admin', '2026-07-15 11:18:32', '', NULL);
INSERT INTO `sys_project_structure` VALUES (920211, 920206, 'utils', 'folder', NULL, 9202, NULL, NULL, 4, '0', 'admin', '2026-07-15 11:18:32', '', NULL);
INSERT INTO `sys_project_structure` VALUES (920212, 920211, 'request.js', 'file', NULL, 9202, -1, 'request.js.vm', 1, '0', 'admin', '2026-07-15 11:18:32', '', NULL);
INSERT INTO `sys_project_structure` VALUES (920213, 920211, 'dict.js', 'file', NULL, 9202, -1, 'dict.js.vm', 2, '0', 'admin', '2026-07-15 11:18:32', '', NULL);
INSERT INTO `sys_project_structure` VALUES (920214, 920206, 'views', 'folder', NULL, 9202, NULL, NULL, 5, '0', 'admin', '2026-07-15 11:18:32', '', NULL);
INSERT INTO `sys_project_structure` VALUES (920215, 920214, '{moduleName}', 'folder', NULL, 9202, 0, NULL, 2, '0', 'admin', '2026-07-15 11:18:32', '', NULL);
INSERT INTO `sys_project_structure` VALUES (920216, 920215, '{businessName}', 'folder', NULL, 9202, 0, NULL, 1, '0', 'admin', '2026-07-15 11:18:32', '', NULL);
INSERT INTO `sys_project_structure` VALUES (920217, 920216, 'index.vue', 'file', NULL, 9202, 0, 'admin-index.vue.vm', 1, '0', 'admin', '2026-07-15 11:18:32', '', NULL);
INSERT INTO `sys_project_structure` VALUES (920218, 920214, 'login', 'folder', NULL, 9202, -1, NULL, 1, '0', 'admin', '2026-07-15 11:18:32', '', NULL);
INSERT INTO `sys_project_structure` VALUES (920219, 920218, 'index.vue', 'file', NULL, 9202, -1, 'admin-login.vue.vm', 1, '0', 'admin', '2026-07-15 11:18:32', '', NULL);
INSERT INTO `sys_project_structure` VALUES (920300, 0, '{projectName}-web', 'folder', NULL, 9203, NULL, NULL, 1, '0', 'admin', '2026-07-15 11:18:32', '', NULL);
INSERT INTO `sys_project_structure` VALUES (920301, 920300, 'package.json', 'file', NULL, 9203, -1, 'package.json.vm', 1, '0', 'admin', '2026-07-15 11:18:32', '', NULL);
INSERT INTO `sys_project_structure` VALUES (920302, 920300, 'babel.config.js', 'file', NULL, 9203, -1, 'babel.config.js.vm', 2, '0', 'admin', '2026-07-15 11:18:32', '', NULL);
INSERT INTO `sys_project_structure` VALUES (920303, 920300, 'vue.config.js', 'file', NULL, 9203, -1, 'vue.config.js.vm', 3, '0', 'admin', '2026-07-15 11:18:32', '', NULL);
INSERT INTO `sys_project_structure` VALUES (920304, 920300, 'public', 'folder', NULL, 9203, NULL, NULL, 4, '0', 'admin', '2026-07-15 11:18:32', '', NULL);
INSERT INTO `sys_project_structure` VALUES (920305, 920304, 'index.html', 'file', NULL, 9203, -1, 'index.html.vm', 1, '0', 'admin', '2026-07-15 11:18:32', '', NULL);
INSERT INTO `sys_project_structure` VALUES (920306, 920300, 'src', 'folder', NULL, 9203, NULL, NULL, 5, '0', 'admin', '2026-07-15 11:18:32', '', NULL);
INSERT INTO `sys_project_structure` VALUES (920307, 920306, 'main.js', 'file', NULL, 9203, -1, 'frontend-main.js.vm', 1, '0', 'admin', '2026-07-15 11:18:32', '', NULL);
INSERT INTO `sys_project_structure` VALUES (920308, 920306, 'App.vue', 'file', NULL, 9203, -1, 'frontend-App.vue.vm', 2, '0', 'admin', '2026-07-15 11:18:32', '', NULL);
INSERT INTO `sys_project_structure` VALUES (920309, 920306, 'style.css', 'file', NULL, 9203, -1, 'style.css.vm', 3, '0', 'admin', '2026-07-15 11:18:32', '', NULL);
INSERT INTO `sys_project_structure` VALUES (920310, 920306, 'router', 'folder', NULL, 9203, NULL, NULL, 4, '0', 'admin', '2026-07-15 11:18:32', '', NULL);
INSERT INTO `sys_project_structure` VALUES (920311, 920310, 'index.js', 'file', NULL, 9203, -1, 'frontend-router.js.vm', 1, '0', 'admin', '2026-07-15 11:18:32', '', NULL);
INSERT INTO `sys_project_structure` VALUES (920312, 920306, 'api', 'folder', NULL, 9203, NULL, NULL, 5, '0', 'admin', '2026-07-15 11:18:32', '', NULL);
INSERT INTO `sys_project_structure` VALUES (920313, 920312, 'request.js', 'file', NULL, 9203, -1, 'frontend-request.js.vm', 1, '0', 'admin', '2026-07-15 11:18:32', '', NULL);
INSERT INTO `sys_project_structure` VALUES (920314, 920312, '{businessName}.js', 'file', NULL, 9203, 0, 'frontend-api.js.vm', 2, '0', 'admin', '2026-07-15 11:18:32', '', NULL);
INSERT INTO `sys_project_structure` VALUES (920315, 920306, 'views', 'folder', NULL, 9203, NULL, NULL, 7, '0', 'admin', '2026-07-15 11:18:32', '', NULL);
INSERT INTO `sys_project_structure` VALUES (920316, 920315, '{moduleName}', 'folder', NULL, 9203, 0, NULL, 1, '0', 'admin', '2026-07-15 11:18:32', '', NULL);
INSERT INTO `sys_project_structure` VALUES (920317, 920316, '{businessName}', 'folder', NULL, 9203, 0, NULL, 1, '0', 'admin', '2026-07-15 11:18:32', '', NULL);
INSERT INTO `sys_project_structure` VALUES (920318, 920317, 'index.vue', 'file', NULL, 9203, 0, 'frontend-index.vue.vm', 1, '0', 'admin', '2026-07-15 11:18:32', '', NULL);
INSERT INTO `sys_project_structure` VALUES (920319, 920315, 'login', 'folder', NULL, 9203, NULL, NULL, 2, '0', 'admin', '2026-07-15 11:18:32', '', NULL);
INSERT INTO `sys_project_structure` VALUES (920320, 920319, 'index.vue', 'file', NULL, 9203, -1, 'frontend-login.vue.vm', 1, '0', 'admin', '2026-07-15 11:18:32', '', NULL);
INSERT INTO `sys_project_structure` VALUES (920321, 920306, 'utils', 'folder', NULL, 9203, NULL, NULL, 6, '0', 'admin', '2026-07-15 11:18:32', '', NULL);
INSERT INTO `sys_project_structure` VALUES (920322, 920321, 'dict.js', 'file', NULL, 9203, -1, 'frontend-dict.js.vm', 1, '0', 'admin', '2026-07-15 11:18:32', '', NULL);
-- ----------------------------
-- Table structure for sys_project_table
-- ----------------------------
DROP TABLE IF EXISTS `sys_project_table`;
CREATE TABLE `sys_project_table` (
`id` bigint(20) NOT NULL AUTO_INCREMENT COMMENT 'ID',
`table_id` bigint(20) NOT NULL COMMENT '表ID',
`project_id` bigint(20) NOT NULL COMMENT '项目ID',
PRIMARY KEY (`id`) USING BTREE,
UNIQUE INDEX `idx_project_table`(`project_id`, `table_id`) USING BTREE,
INDEX `idx_project_table_table_id`(`table_id`) USING BTREE,
CONSTRAINT `fk_project_table_project` FOREIGN KEY (`project_id`) REFERENCES `gen_project` (`project_id`) ON DELETE RESTRICT ON UPDATE RESTRICT,
CONSTRAINT `fk_project_table_table` FOREIGN KEY (`table_id`) REFERENCES `gen_table` (`table_id`) ON DELETE RESTRICT ON UPDATE RESTRICT
) ENGINE = InnoDB AUTO_INCREMENT = 100 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_0900_ai_ci COMMENT = '项目与生成表关系表' ROW_FORMAT = Dynamic;
-- ----------------------------
-- Table structure for sys_project_template
-- ----------------------------
DROP TABLE IF EXISTS `sys_project_template`;
CREATE TABLE `sys_project_template` (
`id` bigint(20) NOT NULL AUTO_INCREMENT COMMENT 'ID',
`project_id` bigint(20) NOT NULL COMMENT '项目ID',
`template_id` bigint(20) NOT NULL COMMENT '模板ID',
`template_type` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT '' COMMENT '模板类型',
PRIMARY KEY (`id`) USING BTREE,
UNIQUE INDEX `idx_project_template_type`(`project_id`, `template_type`) USING BTREE,
INDEX `idx_project_template_template_id`(`template_id`) USING BTREE,
CONSTRAINT `fk_project_template_project` FOREIGN KEY (`project_id`) REFERENCES `gen_project` (`project_id`) ON DELETE RESTRICT ON UPDATE RESTRICT,
CONSTRAINT `fk_project_template_template` FOREIGN KEY (`template_id`) REFERENCES `sys_template` (`template_id`) ON DELETE RESTRICT ON UPDATE RESTRICT
) ENGINE = InnoDB AUTO_INCREMENT = 100 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_0900_ai_ci COMMENT = '项目模板配置表' ROW_FORMAT = Dynamic;
-- ----------------------------
-- Table structure for sys_role
-- ----------------------------
DROP TABLE IF EXISTS `sys_role`;
CREATE TABLE `sys_role` (
`role_id` bigint(20) NOT NULL AUTO_INCREMENT COMMENT '角色ID',
`role_name` varchar(30) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NOT NULL COMMENT '角色名称',
`role_key` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NOT NULL COMMENT '角色权限字符串',
`role_sort` int(4) NOT NULL COMMENT '显示顺序',
`data_scope` char(1) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT '1' COMMENT '数据范围1全部数据权限 2自定数据权限 3本部门数据权限 4本部门及以下数据权限',
`menu_check_strictly` tinyint(1) NULL DEFAULT 1 COMMENT '菜单树选择项是否关联显示',
`dept_check_strictly` tinyint(1) NULL DEFAULT 1 COMMENT '部门树选择项是否关联显示',
`status` char(1) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NOT NULL COMMENT '角色状态0正常 1停用',
`del_flag` char(1) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT '0' COMMENT '删除标志0代表存在 2代表删除',
`create_by` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT '' COMMENT '创建者',
`create_time` datetime(0) NULL DEFAULT NULL COMMENT '创建时间',
`update_by` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT '' COMMENT '更新者',
`update_time` datetime(0) NULL DEFAULT NULL COMMENT '更新时间',
`remark` varchar(500) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '备注',
PRIMARY KEY (`role_id`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 100 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_0900_ai_ci COMMENT = '角色信息表' ROW_FORMAT = Dynamic;
-- ----------------------------
-- Records of sys_role
-- ----------------------------
INSERT INTO `sys_role` VALUES (1, '超级管理员', 'admin', 1, '1', 1, 1, '0', '0', 'admin', '2026-07-14 14:56:29', '', NULL, '超级管理员');
INSERT INTO `sys_role` VALUES (2, '普通角色', 'common', 2, '2', 1, 1, '0', '0', 'admin', '2026-07-14 14:56:29', '', NULL, '普通角色');
-- ----------------------------
-- Table structure for sys_role_dept
-- ----------------------------
DROP TABLE IF EXISTS `sys_role_dept`;
CREATE TABLE `sys_role_dept` (
`role_id` bigint(20) NOT NULL COMMENT '角色ID',
`dept_id` bigint(20) NOT NULL COMMENT '部门ID',
PRIMARY KEY (`role_id`, `dept_id`) USING BTREE
) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_0900_ai_ci COMMENT = '角色和部门关联表' ROW_FORMAT = Dynamic;
-- ----------------------------
-- Records of sys_role_dept
-- ----------------------------
INSERT INTO `sys_role_dept` VALUES (2, 100);
INSERT INTO `sys_role_dept` VALUES (2, 101);
INSERT INTO `sys_role_dept` VALUES (2, 105);
-- ----------------------------
-- Table structure for sys_role_menu
-- ----------------------------
DROP TABLE IF EXISTS `sys_role_menu`;
CREATE TABLE `sys_role_menu` (
`role_id` bigint(20) NOT NULL COMMENT '角色ID',
`menu_id` bigint(20) NOT NULL COMMENT '菜单ID',
PRIMARY KEY (`role_id`, `menu_id`) USING BTREE
) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_0900_ai_ci COMMENT = '角色和菜单关联表' ROW_FORMAT = Dynamic;
-- ----------------------------
-- Records of sys_role_menu
-- ----------------------------
INSERT INTO `sys_role_menu` VALUES (1, 200);
INSERT INTO `sys_role_menu` VALUES (1, 201);
INSERT INTO `sys_role_menu` VALUES (1, 202);
INSERT INTO `sys_role_menu` VALUES (1, 203);
INSERT INTO `sys_role_menu` VALUES (1, 204);
INSERT INTO `sys_role_menu` VALUES (1, 1300);
INSERT INTO `sys_role_menu` VALUES (1, 1301);
INSERT INTO `sys_role_menu` VALUES (1, 1302);
INSERT INTO `sys_role_menu` VALUES (1, 1303);
INSERT INTO `sys_role_menu` VALUES (1, 1304);
INSERT INTO `sys_role_menu` VALUES (1, 1305);
INSERT INTO `sys_role_menu` VALUES (1, 1306);
INSERT INTO `sys_role_menu` VALUES (2, 1);
INSERT INTO `sys_role_menu` VALUES (2, 100);
INSERT INTO `sys_role_menu` VALUES (2, 101);
INSERT INTO `sys_role_menu` VALUES (2, 102);
INSERT INTO `sys_role_menu` VALUES (2, 103);
INSERT INTO `sys_role_menu` VALUES (2, 104);
INSERT INTO `sys_role_menu` VALUES (2, 105);
INSERT INTO `sys_role_menu` VALUES (2, 106);
INSERT INTO `sys_role_menu` VALUES (2, 107);
INSERT INTO `sys_role_menu` VALUES (2, 108);
INSERT INTO `sys_role_menu` VALUES (2, 109);
INSERT INTO `sys_role_menu` VALUES (2, 110);
INSERT INTO `sys_role_menu` VALUES (2, 111);
INSERT INTO `sys_role_menu` VALUES (2, 112);
INSERT INTO `sys_role_menu` VALUES (2, 113);
INSERT INTO `sys_role_menu` VALUES (2, 114);
INSERT INTO `sys_role_menu` VALUES (2, 115);
INSERT INTO `sys_role_menu` VALUES (2, 117);
INSERT INTO `sys_role_menu` VALUES (2, 118);
INSERT INTO `sys_role_menu` VALUES (2, 121);
INSERT INTO `sys_role_menu` VALUES (2, 122);
INSERT INTO `sys_role_menu` VALUES (2, 200);
INSERT INTO `sys_role_menu` VALUES (2, 201);
INSERT INTO `sys_role_menu` VALUES (2, 202);
INSERT INTO `sys_role_menu` VALUES (2, 203);
INSERT INTO `sys_role_menu` VALUES (2, 204);
INSERT INTO `sys_role_menu` VALUES (2, 500);
INSERT INTO `sys_role_menu` VALUES (2, 501);
INSERT INTO `sys_role_menu` VALUES (2, 1000);
INSERT INTO `sys_role_menu` VALUES (2, 1001);
INSERT INTO `sys_role_menu` VALUES (2, 1002);
INSERT INTO `sys_role_menu` VALUES (2, 1003);
INSERT INTO `sys_role_menu` VALUES (2, 1004);
INSERT INTO `sys_role_menu` VALUES (2, 1005);
INSERT INTO `sys_role_menu` VALUES (2, 1006);
INSERT INTO `sys_role_menu` VALUES (2, 1007);
INSERT INTO `sys_role_menu` VALUES (2, 1008);
INSERT INTO `sys_role_menu` VALUES (2, 1009);
INSERT INTO `sys_role_menu` VALUES (2, 1010);
INSERT INTO `sys_role_menu` VALUES (2, 1011);
INSERT INTO `sys_role_menu` VALUES (2, 1012);
INSERT INTO `sys_role_menu` VALUES (2, 1013);
INSERT INTO `sys_role_menu` VALUES (2, 1014);
INSERT INTO `sys_role_menu` VALUES (2, 1015);
INSERT INTO `sys_role_menu` VALUES (2, 1016);
INSERT INTO `sys_role_menu` VALUES (2, 1017);
INSERT INTO `sys_role_menu` VALUES (2, 1018);
INSERT INTO `sys_role_menu` VALUES (2, 1019);
INSERT INTO `sys_role_menu` VALUES (2, 1020);
INSERT INTO `sys_role_menu` VALUES (2, 1021);
INSERT INTO `sys_role_menu` VALUES (2, 1022);
INSERT INTO `sys_role_menu` VALUES (2, 1023);
INSERT INTO `sys_role_menu` VALUES (2, 1024);
INSERT INTO `sys_role_menu` VALUES (2, 1025);
INSERT INTO `sys_role_menu` VALUES (2, 1026);
INSERT INTO `sys_role_menu` VALUES (2, 1027);
INSERT INTO `sys_role_menu` VALUES (2, 1028);
INSERT INTO `sys_role_menu` VALUES (2, 1029);
INSERT INTO `sys_role_menu` VALUES (2, 1030);
INSERT INTO `sys_role_menu` VALUES (2, 1031);
INSERT INTO `sys_role_menu` VALUES (2, 1032);
INSERT INTO `sys_role_menu` VALUES (2, 1033);
INSERT INTO `sys_role_menu` VALUES (2, 1034);
INSERT INTO `sys_role_menu` VALUES (2, 1035);
INSERT INTO `sys_role_menu` VALUES (2, 1036);
INSERT INTO `sys_role_menu` VALUES (2, 1037);
INSERT INTO `sys_role_menu` VALUES (2, 1038);
INSERT INTO `sys_role_menu` VALUES (2, 1039);
INSERT INTO `sys_role_menu` VALUES (2, 1040);
INSERT INTO `sys_role_menu` VALUES (2, 1041);
INSERT INTO `sys_role_menu` VALUES (2, 1042);
INSERT INTO `sys_role_menu` VALUES (2, 1043);
INSERT INTO `sys_role_menu` VALUES (2, 1044);
INSERT INTO `sys_role_menu` VALUES (2, 1045);
INSERT INTO `sys_role_menu` VALUES (2, 1046);
INSERT INTO `sys_role_menu` VALUES (2, 1047);
INSERT INTO `sys_role_menu` VALUES (2, 1048);
INSERT INTO `sys_role_menu` VALUES (2, 1049);
INSERT INTO `sys_role_menu` VALUES (2, 1050);
INSERT INTO `sys_role_menu` VALUES (2, 1051);
INSERT INTO `sys_role_menu` VALUES (2, 1052);
INSERT INTO `sys_role_menu` VALUES (2, 1053);
INSERT INTO `sys_role_menu` VALUES (2, 1054);
INSERT INTO `sys_role_menu` VALUES (2, 1081);
INSERT INTO `sys_role_menu` VALUES (2, 1082);
INSERT INTO `sys_role_menu` VALUES (2, 1083);
INSERT INTO `sys_role_menu` VALUES (2, 1084);
INSERT INTO `sys_role_menu` VALUES (2, 1085);
INSERT INTO `sys_role_menu` VALUES (2, 1086);
INSERT INTO `sys_role_menu` VALUES (2, 1087);
INSERT INTO `sys_role_menu` VALUES (2, 1088);
INSERT INTO `sys_role_menu` VALUES (2, 1089);
INSERT INTO `sys_role_menu` VALUES (2, 1090);
INSERT INTO `sys_role_menu` VALUES (2, 1300);
INSERT INTO `sys_role_menu` VALUES (2, 1301);
INSERT INTO `sys_role_menu` VALUES (2, 1302);
INSERT INTO `sys_role_menu` VALUES (2, 1303);
INSERT INTO `sys_role_menu` VALUES (2, 1304);
INSERT INTO `sys_role_menu` VALUES (2, 1305);
INSERT INTO `sys_role_menu` VALUES (2, 1306);
-- ----------------------------
-- Table structure for sys_template
-- ----------------------------
DROP TABLE IF EXISTS `sys_template`;
CREATE TABLE `sys_template` (
`template_id` bigint(20) NOT NULL AUTO_INCREMENT COMMENT '模板ID',
`template_name` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NOT NULL COMMENT '模板名称',
`template_path` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT '' COMMENT '模板路径',
`template_desc` varchar(500) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '模板描述',
`template_type` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT '' COMMENT '模板类型',
`bundle_code` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT 'qing' COMMENT 'template bundle code',
`template_status` bigint(20) NULL DEFAULT 0 COMMENT '模板状态0正常 1停用',
`create_by` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT '' COMMENT '创建者',
`create_time` datetime(0) NULL DEFAULT NULL COMMENT '创建时间',
`update_by` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT '' COMMENT '更新者',
`update_time` datetime(0) NULL DEFAULT NULL COMMENT '更新时间',
`remark` varchar(500) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '备注',
PRIMARY KEY (`template_id`) USING BTREE,
INDEX `idx_template_bundle_code`(`bundle_code`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 9204 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_0900_ai_ci COMMENT = '代码模板表' ROW_FORMAT = Dynamic;
-- ----------------------------
-- Records of sys_template
-- ----------------------------
INSERT INTO `sys_template` VALUES (9201, 'Runnable Backend Template', '/runnable/backend', 'Spring Boot + MyBatis Plus runnable backend', 'backend', 'qing', 0, 'admin', '2026-07-15 11:18:32', '', NULL, 'three-tier runnable template');
INSERT INTO `sys_template` VALUES (9202, 'Runnable Admin Frontend Template', '/runnable/admin_frontend', 'Vue2 + Element UI runnable admin frontend', 'admin_frontend', 'qing', 0, 'admin', '2026-07-15 11:18:32', '', NULL, 'three-tier runnable template');
INSERT INTO `sys_template` VALUES (9203, 'Runnable Portal Frontend Template', '/runnable/frontend', 'Vue2 + Element UI runnable portal frontend', 'frontend', 'qing', 0, 'admin', '2026-07-15 11:18:32', '', NULL, 'three-tier runnable template');
-- ----------------------------
-- Table structure for sys_template_artifact
-- ----------------------------
DROP TABLE IF EXISTS `sys_template_artifact`;
CREATE TABLE `sys_template_artifact` (
`artifact_id` bigint(20) NOT NULL AUTO_INCREMENT COMMENT '模板制品ID',
`template_id` bigint(20) NOT NULL COMMENT '模板ID',
`artifact_type` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NOT NULL COMMENT '制品类型skeleton',
`file_name` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NOT NULL COMMENT '制品文件名',
`artifact_content` longblob NULL COMMENT '制品内容',
`file_hash` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT 'SHA-256',
`file_size` bigint(20) NULL DEFAULT 0 COMMENT '文件大小',
`file_manifest` longtext CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL COMMENT '文件清单',
`variable_metadata` longtext CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL COMMENT '安全变量替换元数据',
`create_by` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT '' COMMENT '创建者',
`create_time` datetime(0) NULL DEFAULT NULL COMMENT '创建时间',
`update_by` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT '' COMMENT '更新者',
`update_time` datetime(0) NULL DEFAULT NULL COMMENT '更新时间',
PRIMARY KEY (`artifact_id`) USING BTREE,
UNIQUE INDEX `uk_template_artifact_type`(`template_id`, `artifact_type`) USING BTREE,
CONSTRAINT `fk_template_artifact_template` FOREIGN KEY (`template_id`) REFERENCES `sys_template` (`template_id`) ON DELETE CASCADE ON UPDATE RESTRICT
) ENGINE = InnoDB AUTO_INCREMENT = 100 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_0900_ai_ci COMMENT = '代码模板骨架制品表' ROW_FORMAT = Dynamic;
-- ----------------------------
-- Table structure for sys_template_bundle
-- ----------------------------
DROP TABLE IF EXISTS `sys_template_bundle`;
CREATE TABLE `sys_template_bundle` (
`bundle_id` bigint(20) NOT NULL AUTO_INCREMENT COMMENT 'template bundle id',
`bundle_code` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NOT NULL COMMENT 'template bundle code',
`bundle_name` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NOT NULL COMMENT 'template bundle name',
`description` varchar(500) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT 'description',
`preview_image` varchar(500) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT 'template bundle preview image',
`status` char(1) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NOT NULL DEFAULT '0' COMMENT 'status 0 normal 1 disabled',
`is_default` char(1) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NOT NULL DEFAULT '0' COMMENT 'default bundle 1 yes 0 no',
`support_backend` char(1) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NOT NULL DEFAULT '1' COMMENT 'supports backend',
`support_frontend` char(1) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NOT NULL DEFAULT '1' COMMENT 'supports frontend',
`support_admin_frontend` char(1) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NOT NULL DEFAULT '1' COMMENT 'supports admin frontend',
`support_sql` char(1) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NOT NULL DEFAULT '1' COMMENT 'supports sql',
`sort_order` int(11) NULL DEFAULT 0 COMMENT 'sort order',
`create_by` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT '' COMMENT 'creator',
`create_time` datetime(0) NULL DEFAULT NULL COMMENT 'create time',
`update_by` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT '' COMMENT 'updater',
`update_time` datetime(0) NULL DEFAULT NULL COMMENT 'update time',
`remark` varchar(500) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT 'remark',
PRIMARY KEY (`bundle_id`) USING BTREE,
UNIQUE INDEX `uk_template_bundle_code`(`bundle_code`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 100 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_0900_ai_ci COMMENT = 'code template bundle table' ROW_FORMAT = Dynamic;
-- ----------------------------
-- Records of sys_template_bundle
-- ----------------------------
INSERT INTO `sys_template_bundle` VALUES (1, 'qing', 'Qing Default Template', 'Spring Boot + MyBatis Plus + Vue2 runnable template', NULL, '0', '1', '1', '1', '1', '1', 1, 'admin', '2026-07-14 14:56:31', '', NULL, 'default code template bundle');
-- ----------------------------
-- Table structure for sys_template_file
-- ----------------------------
DROP TABLE IF EXISTS `sys_template_file`;
CREATE TABLE `sys_template_file` (
`template_file_id` bigint(20) NOT NULL AUTO_INCREMENT COMMENT '模板文件ID',
`template_id` bigint(20) NOT NULL COMMENT '模板ID',
`file_name` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NOT NULL COMMENT '文件名称',
`module_id` bigint(20) NULL DEFAULT NULL COMMENT '功能模块ID',
`file_path` varchar(500) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT '' COMMENT '文件路径',
`file_content` longtext CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL COMMENT '文件内容',
`create_by` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT '' COMMENT '创建者',
`create_time` datetime(0) NULL DEFAULT NULL COMMENT '创建时间',
`update_by` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT '' COMMENT '更新者',
`update_time` datetime(0) NULL DEFAULT NULL COMMENT '更新时间',
PRIMARY KEY (`template_file_id`) USING BTREE,
INDEX `idx_template_file_template_id`(`template_id`) USING BTREE,
INDEX `idx_template_file_module_id`(`module_id`) USING BTREE,
CONSTRAINT `fk_template_file_module` FOREIGN KEY (`module_id`) REFERENCES `sys_module` (`module_id`) ON DELETE RESTRICT ON UPDATE RESTRICT,
CONSTRAINT `fk_template_file_template` FOREIGN KEY (`template_id`) REFERENCES `sys_template` (`template_id`) ON DELETE RESTRICT ON UPDATE RESTRICT
) ENGINE = InnoDB AUTO_INCREMENT = 920314 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_0900_ai_ci COMMENT = '代码模板文件表' ROW_FORMAT = Dynamic;
-- ----------------------------
-- Records of sys_template_file
-- ----------------------------
INSERT INTO `sys_template_file` VALUES (920101, 9201, 'pom.xml.vm', NULL, 'pom.xml.vm', '<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<project xmlns=\"http://maven.apache.org/POM/4.0.0\"\n xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\"\n xsi:schemaLocation=\"http://maven.apache.org/POM/4.0.0 https://maven.apache.org/xsd/maven-4.0.0.xsd\">\n <modelVersion>4.0.0</modelVersion>\n\n <parent>\n <groupId>org.springframework.boot</groupId>\n <artifactId>spring-boot-starter-parent</artifactId>\n <version>2.5.9</version>\n <relativePath/>\n </parent>\n\n <groupId>${packageName}</groupId>\n <artifactId>${businessName}-service</artifactId>\n <version>1.0.0</version>\n <name>${functionName}</name>\n <description>${functionName} generated by qing template</description>\n\n <properties>\n <java.version>1.8</java.version>\n </properties>\n\n <dependencies>\n <dependency>\n <groupId>org.springframework.boot</groupId>\n <artifactId>spring-boot-starter-web</artifactId>\n </dependency>\n\n <dependency>\n <groupId>com.baomidou</groupId>\n <artifactId>mybatis-plus-boot-starter</artifactId>\n <version>3.5.1</version>\n </dependency>\n\n <dependency>\n <groupId>mysql</groupId>\n <artifactId>mysql-connector-java</artifactId>\n <scope>runtime</scope>\n </dependency>\n\n <dependency>\n <groupId>org.apache.commons</groupId>\n <artifactId>commons-lang3</artifactId>\n </dependency>\n\n <dependency>\n <groupId>cn.hutool</groupId>\n <artifactId>hutool-all</artifactId>\n <version>5.7.20</version>\n </dependency>\n\n <dependency>\n <groupId>org.apache.poi</groupId>\n <artifactId>poi-ooxml</artifactId>\n <version>4.1.2</version>\n </dependency>\n\n <dependency>\n <groupId>io.swagger</groupId>\n <artifactId>swagger-annotations</artifactId>\n <version>1.6.2</version>\n </dependency>\n\n <dependency>\n <groupId>org.projectlombok</groupId>\n <artifactId>lombok</artifactId>\n <optional>true</optional>\n </dependency>\n\n <dependency>\n <groupId>org.springframework.boot</groupId>\n <artifactId>spring-boot-starter-test</artifactId>\n <scope>test</scope>\n </dependency>\n </dependencies>\n\n <build>\n <plugins>\n <plugin>\n <groupId>org.springframework.boot</groupId>\n <artifactId>spring-boot-maven-plugin</artifactId>\n </plugin>\n </plugins>\n </build>\n</project>\n', 'admin', '2026-07-15 11:18:32', '', NULL);
INSERT INTO `sys_template_file` VALUES (920102, 9201, 'README.md.vm', NULL, 'README.md.vm', '# ${functionName}\n\n这是由 qing 模板生成的单表 Spring Boot + Vue2 项目。\n\n## 后端启动\n\n1. 创建 MySQL 数据库,默认库名为 `vip`。\n2. 执行 `sql/${businessName}.sql` 中的建表语句。\n3. 按需修改 `src/main/resources/application.yml` 里的数据库账号密码。\n4. 在项目根目录运行:\n\n```bash\nmvn spring-boot:run\n```\n\nThe service starts at `http://localhost:8080`.\n\n## 前端启动\n\n```bash\ncd vue\nnpm install\nnpm run dev\n```\n\n前端开发服务默认把 `/api` 代理到 `http://localhost:8080`。\n', 'admin', '2026-07-15 11:18:32', '', NULL);
INSERT INTO `sys_template_file` VALUES (920103, 9201, 'Application.java.vm', NULL, 'Application.java.vm', 'package ${packageName};\n\nimport org.mybatis.spring.annotation.MapperScan;\nimport org.springframework.boot.SpringApplication;\nimport org.springframework.boot.autoconfigure.SpringBootApplication;\n\n@MapperScan(\"${packageName}.mapper\")\n@SpringBootApplication\npublic class ${ClassName}Application\n{\n public static void main(String[] args)\n {\n SpringApplication.run(${ClassName}Application.class, args);\n }\n}\n', 'admin', '2026-07-15 11:18:32', '', NULL);
INSERT INTO `sys_template_file` VALUES (920104, 9201, 'Result.java.vm', NULL, 'Result.java.vm', 'package ${packageName}.common;\n\nimport java.io.Serializable;\n\npublic class Result<T> implements Serializable\n{\n private static final long serialVersionUID = 1L;\n\n private String code;\n private String msg;\n private T data;\n\n public Result()\n {\n }\n\n public Result(String code, String msg, T data)\n {\n this.code = code;\n this.msg = msg;\n this.data = data;\n }\n\n public static <T> Result<T> success()\n {\n return new Result<T>(\"200\", \"操作成功\", null);\n }\n\n public static <T> Result<T> success(T data)\n {\n return new Result<T>(\"200\", \"操作成功\", data);\n }\n\n public static <T> Result<T> error(String msg)\n {\n return new Result<T>(\"500\", msg, null);\n }\n\n public String getCode()\n {\n return code;\n }\n\n public void setCode(String code)\n {\n this.code = code;\n }\n\n public String getMsg()\n {\n return msg;\n }\n\n public void setMsg(String msg)\n {\n this.msg = msg;\n }\n\n public T getData()\n {\n return data;\n }\n\n public void setData(T data)\n {\n this.data = data;\n }\n}\n', 'admin', '2026-07-15 11:18:32', '', NULL);
INSERT INTO `sys_template_file` VALUES (920105, 9201, 'MybatisPlusConfig.java.vm', NULL, 'MybatisPlusConfig.java.vm', 'package ${packageName}.config;\n\nimport com.baomidou.mybatisplus.annotation.DbType;\nimport com.baomidou.mybatisplus.extension.plugins.MybatisPlusInterceptor;\nimport com.baomidou.mybatisplus.extension.plugins.inner.PaginationInnerInterceptor;\nimport org.springframework.context.annotation.Bean;\nimport org.springframework.context.annotation.Configuration;\n\n@Configuration\npublic class MybatisPlusConfig\n{\n @Bean\n public MybatisPlusInterceptor mybatisPlusInterceptor()\n {\n MybatisPlusInterceptor interceptor = new MybatisPlusInterceptor();\n interceptor.addInnerInterceptor(new PaginationInnerInterceptor(DbType.MYSQL));\n return interceptor;\n }\n}\n', 'admin', '2026-07-15 11:18:32', '', NULL);
INSERT INTO `sys_template_file` VALUES (920106, 9201, 'CorsConfig.java.vm', NULL, 'CorsConfig.java.vm', 'package ${packageName}.config;\n\nimport ${packageName}.security.PortalAuthInterceptor;\nimport javax.annotation.Resource;\nimport org.springframework.context.annotation.Configuration;\nimport org.springframework.web.servlet.config.annotation.CorsRegistry;\nimport org.springframework.web.servlet.config.annotation.InterceptorRegistry;\nimport org.springframework.web.servlet.config.annotation.WebMvcConfigurer;\n\n@Configuration\npublic class CorsConfig implements WebMvcConfigurer\n{\n @Resource\n private PortalAuthInterceptor portalAuthInterceptor;\n\n @Override\n public void addCorsMappings(CorsRegistry registry)\n {\n registry.addMapping(\"/**\")\n .allowedOriginPatterns(\"*\")\n .allowedMethods(\"GET\", \"POST\", \"PUT\", \"DELETE\", \"OPTIONS\")\n .allowedHeaders(\"*\")\n .allowCredentials(true)\n .maxAge(3600);\n }\n\n @Override\n public void addInterceptors(InterceptorRegistry registry)\n {\n registry.addInterceptor(portalAuthInterceptor)\n .addPathPatterns(\"/**\")\n .excludePathPatterns(\"/auth/login\", \"/auth/admin/login\", \"/business-blocks/**\", \"/files/**\", \"/error\");\n }\n}\n', 'admin', '2026-07-15 11:18:32', '', NULL);
INSERT INTO `sys_template_file` VALUES (920107, 9201, 'FileController.java.vm', NULL, 'FileController.java.vm', 'package ${packageName}.controller;\n\nimport ${packageName}.common.Result;\nimport java.io.IOException;\nimport java.net.MalformedURLException;\nimport java.nio.file.Files;\nimport java.nio.file.Path;\nimport java.nio.file.Paths;\nimport java.nio.file.StandardCopyOption;\nimport java.util.HashMap;\nimport java.util.Map;\nimport java.util.UUID;\nimport javax.servlet.http.HttpServletRequest;\nimport org.springframework.core.io.Resource;\nimport org.springframework.core.io.UrlResource;\nimport org.springframework.http.HttpHeaders;\nimport org.springframework.http.ResponseEntity;\nimport org.springframework.util.StringUtils;\nimport org.springframework.web.bind.annotation.GetMapping;\nimport org.springframework.web.bind.annotation.PostMapping;\nimport org.springframework.web.bind.annotation.RequestMapping;\nimport org.springframework.web.bind.annotation.RequestParam;\nimport org.springframework.web.bind.annotation.RestController;\nimport org.springframework.web.multipart.MultipartFile;\nimport org.springframework.web.servlet.HandlerMapping;\n\n@RestController\n@RequestMapping(\"/files\")\npublic class FileController\n{\n private final Path uploadRoot = Paths.get(\"uploads\");\n\n @PostMapping(\"/upload\")\n public Result<Map<String, String>> upload(@RequestParam(\"file\") MultipartFile file) throws IOException\n {\n Files.createDirectories(uploadRoot);\n String originalName = StringUtils.cleanPath(file.getOriginalFilename() == null ? \"file\" : file.getOriginalFilename());\n String suffix = \"\";\n int dotIndex = originalName.lastIndexOf(\'.\');\n if (dotIndex >= 0)\n {\n suffix = originalName.substring(dotIndex);\n }\n String fileName = UUID.randomUUID().toString().replace(\"-\", \"\") + suffix;\n Files.copy(file.getInputStream(), uploadRoot.resolve(fileName), StandardCopyOption.REPLACE_EXISTING);\n\n Map<String, String> data = new HashMap<String, String>();\n data.put(\"name\", originalName);\n data.put(\"url\", \"/files/\" + fileName);\n return Result.success(data);\n }\n\n @GetMapping(\"/**\")\n public ResponseEntity<Resource> getFile(HttpServletRequest request) throws MalformedURLException\n {\n String requestPath = (String) request.getAttribute(HandlerMapping.PATH_WITHIN_HANDLER_MAPPING_ATTRIBUTE);\n String fileName = cleanStoredPath(requestPath);\n if (!StringUtils.hasText(fileName))\n {\n return ResponseEntity.notFound().build();\n }\n\n Path normalizedRoot = uploadRoot.toAbsolutePath().normalize();\n Path filePath = normalizedRoot.resolve(fileName).normalize();\n if (!filePath.startsWith(normalizedRoot))\n {\n return ResponseEntity.notFound().build();\n }\n\n Resource resource = new UrlResource(filePath.toUri());\n if (!resource.exists())\n {\n return ResponseEntity.notFound().build();\n }\n return ResponseEntity.ok()\n .header(HttpHeaders.CONTENT_DISPOSITION, \"inline; filename=\\\"\" + resource.getFilename() + \"\\\"\")\n .body(resource);\n }\n\n private String cleanStoredPath(String requestPath)\n {\n String storedPath = requestPath == null ? \"\" : requestPath;\n if (storedPath.startsWith(\"/files/\"))\n {\n storedPath = storedPath.substring(\"/files/\".length());\n }\n else if (storedPath.startsWith(\"/files\"))\n {\n storedPath = storedPath.substring(\"/files\".length());\n }\n while (storedPath.startsWith(\"/\"))\n {\n storedPath = storedPath.substring(1);\n }\n storedPath = StringUtils.cleanPath(storedPath);\n return storedPath.contains(\"..\") ? \"\" : storedPath;\n }\n}\n\n', 'admin', '2026-07-15 11:18:32', '', NULL);
INSERT INTO `sys_template_file` VALUES (920108, 9201, 'application.yml.vm', NULL, 'application.yml.vm', '#set($d = \'$\')\nserver:\n port: ${d}{SERVER_PORT:8080}\n\nspring:\n application:\n name: ${businessName}-service\n datasource:\n driver-class-name: com.mysql.cj.jdbc.Driver\n url: ${d}{DB_URL:jdbc:mysql://localhost:3306/vip?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=false&serverTimezone=GMT%2B8}\n username: ${d}{DB_USERNAME:root}\n password: ${d}{DB_PASSWORD:123456}\n servlet:\n multipart:\n max-file-size: 100MB\n max-request-size: 100MB\n\nmybatis-plus:\n mapper-locations: classpath*:mapper/**/*.xml\n configuration:\n map-underscore-to-camel-case: true\n log-impl: org.apache.ibatis.logging.stdout.StdOutImpl\n', 'admin', '2026-07-15 11:18:32', '', NULL);
INSERT INTO `sys_template_file` VALUES (920109, 9201, 'entity.java.vm', NULL, 'entity.java.vm', 'package ${packageName}.entity;\n\n#foreach ($import in $importList)\nimport ${import};\n#end\nimport org.apache.commons.lang3.builder.ToStringBuilder;\nimport org.apache.commons.lang3.builder.ToStringStyle;\nimport com.baomidou.mybatisplus.annotation.TableName;\nimport com.baomidou.mybatisplus.annotation.IdType;\nimport com.baomidou.mybatisplus.annotation.TableId;\nimport com.baomidou.mybatisplus.annotation.TableField;\nimport io.swagger.annotations.ApiModel;\nimport io.swagger.annotations.ApiModelProperty;\nimport lombok.Getter;\nimport lombok.Setter;\nimport lombok.experimental.Accessors;\nimport cn.hutool.core.annotation.Alias;\n\n/**\n * ${functionName}对象 ${tableName}\n *\n * @author ${author}\n * @date ${datetime}\n */\n#if($table.crud || $table.sub)\n#set($Entity=\"BaseEntity\")\n#elseif($table.tree)\n#set($Entity=\"TreeEntity\")\n#end\n@Getter\n@Setter\n@Accessors(chain = true)\n@ApiModel(value = \"${ClassName}对象\", description = \"${functionName}\")\n@TableName(\"${tableName}\")\npublic class ${ClassName}\n{\n private static final long serialVersionUID = 1L;\n\n#foreach ($column in $columns)\n /** $column.columnComment */\n#if($column.list)\n#set($parentheseIndex=$column.columnComment.indexOf(\"\"))\n#if($parentheseIndex != -1)\n#set($comment=$column.columnComment.substring(0, $parentheseIndex))\n#else\n#set($comment=$column.columnComment)\n#end\n#if($column.javaType == \'Date\')\n @JsonFormat(pattern = \"yyyy-MM-dd\")\n#else\n#end\n#end\n @ApiModelProperty(\"${column.columnComment}\")\n @Alias(\"${column.columnComment}\")\n#if ($column.isPk == \"1\")\n @TableId(value = \"${column.columnName}\", type = IdType.AUTO)\n#else\n @TableField(\"${column.columnName}\")\n#end\n private $column.javaType $column.javaField;\n\n#end\n#if($table.sub)\n /** $table.subTable.functionName信息 */\n @ApiModelProperty(\"${table.subTable.functionName}信息\")\n private List<${subClassName}> ${subclassName}List;\n\n#end\n @Override\n public String toString() {\n return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)\n#foreach ($column in $columns)\n#if($column.javaField.length() > 2 && $column.javaField.substring(1,2).matches(\"[A-Z]\"))\n#set($AttrName=$column.javaField)\n#else\n#set($AttrName=$column.javaField.substring(0,1).toUpperCase() + ${column.javaField.substring(1)})\n#end\n .append(\"${column.javaField}\", get${AttrName}())\n#end\n#if($table.sub)\n .append(\"${subclassName}List\", get${subClassName}List())\n#end\n .toString();\n }\n}\n', 'admin', '2026-07-15 11:18:32', '', NULL);
INSERT INTO `sys_template_file` VALUES (920110, 9201, 'mapper.java.vm', NULL, 'mapper.java.vm', 'package ${packageName}.mapper;\n\nimport ${packageName}.entity.${ClassName};\nimport com.baomidou.mybatisplus.core.mapper.BaseMapper;\nimport org.apache.ibatis.annotations.Param;\nimport org.apache.ibatis.annotations.Select;\n\n/**\n * ${functionName}Mapper接口\n *\n * @author ${author}\n * @date ${datetime}\n */\npublic interface ${ClassName}Mapper extends BaseMapper<${ClassName}> {\n\n @Select(\"select * from ${tableName} where ${pkColumn.columnName} = #{id} for update\")\n ${ClassName} selectByIdForUpdate(@Param(\"id\") ${pkColumn.javaType} id);\n\n}\n\n', 'admin', '2026-07-15 11:18:32', '', NULL);
INSERT INTO `sys_template_file` VALUES (920111, 9201, 'service.java.vm', NULL, 'service.java.vm', 'package ${packageName}.service;\r\n\r\nimport ${packageName}.entity.${ClassName};\r\nimport com.baomidou.mybatisplus.extension.service.IService;\r\n\r\n/**\r\n * ${functionName}Service接口\r\n *\r\n * @author ${author}\r\n * @date ${datetime}\r\n */\r\npublic interface I${ClassName}Service extends IService<${ClassName}> {\r\n\r\n#if($hasTypedBusinessActions)\r\n#foreach($action in $typedBusinessActions)\r\n void ${action.javaMethodName}(${action.serviceParameters});\r\n\r\n#end\r\n#end\r\n}\r\n', 'admin', '2026-07-15 11:18:32', '', NULL);
INSERT INTO `sys_template_file` VALUES (920112, 9201, 'serviceImpl.java.vm', NULL, 'serviceImpl.java.vm', 'package ${packageName}.service.impl;\r\n\r\nimport ${packageName}.entity.${ClassName};\r\nimport ${packageName}.mapper.${ClassName}Mapper;\r\nimport ${packageName}.service.I${ClassName}Service;\r\n#if($hasTypedBusinessActions)\r\n#foreach($dependency in $typedBusinessDependencies)\r\n#if($dependency.className != $ClassName)\r\nimport ${packageName}.entity.${dependency.className};\r\nimport ${packageName}.mapper.${dependency.className}Mapper;\r\n#end\r\n#end\r\n#if($typedBusinessUsesBigDecimal)\r\nimport java.math.BigDecimal;\r\n#end\r\n#if($typedBusinessUsesDate)\r\nimport java.util.Date;\r\n#end\r\nimport javax.annotation.Resource;\r\nimport org.springframework.transaction.annotation.Transactional;\r\n#end\r\nimport com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;\r\nimport org.springframework.stereotype.Service;\r\n\r\n/**\r\n * ${functionName}Service业务层处理\r\n *\r\n * @author ${author}\r\n * @date ${datetime}\r\n */\r\n@Service\r\npublic class ${ClassName}ServiceImpl extends ServiceImpl<${ClassName}Mapper, ${ClassName}>\r\n implements I${ClassName}Service\r\n{\r\n#if($hasTypedBusinessActions)\r\n#foreach($dependency in $typedBusinessDependencies)\r\n @Resource\r\n private ${dependency.className}Mapper ${dependency.mapperField};\r\n\r\n#end\r\n#foreach($action in $typedBusinessActions)\r\n @Override\r\n @Transactional(rollbackFor = Exception.class)\r\n public void ${action.javaMethodName}(${action.serviceParameters})\r\n {\r\n ${action.recordClass} ${action.recordVariable} = ${action.ownerMapperField}.selectByIdForUpdate(${action.pkField});\r\n if (${action.recordVariable} == null)\r\n {\r\n throw new IllegalArgumentException(\"${action.notFoundMessage}\");\r\n }\r\n#if($action.stateTransition)\r\n if (!\"${action.fromState}\".equals(${action.recordVariable}.${action.statusGetter}()))\r\n {\r\n throw new IllegalArgumentException(\"${action.invalidStateMessage}\");\r\n }\r\n#end\r\n\r\n#foreach($effect in $action.effects)\r\n#if($effect.type == \"create_record\")\r\n ${effect.entityClass} ${effect.variable} = new ${effect.entityClass}();\r\n#foreach($assignment in $effect.assignments)\r\n ${effect.variable}.${assignment.setter}(${assignment.expression});\r\n#end\r\n ${effect.mapperField}.insert(${effect.variable});\r\n#else\r\n ${effect.entityClass} ${effect.variable} = ${effect.mapperField}.selectByIdForUpdate(\r\n ${action.recordVariable}.${effect.relationGetter}());\r\n if (${effect.variable} == null)\r\n {\r\n throw new IllegalArgumentException(\"${effect.notFoundMessage}\");\r\n }\r\n#if($effect.guardExpression)\r\n if (${effect.guardExpression})\r\n {\r\n throw new IllegalArgumentException(\"${effect.errorMessage}\");\r\n }\r\n#end\r\n#if($effect.type == \"decrease\" || $effect.type == \"increase\")\r\n ${effect.variable}.${effect.setter}(${effect.valueExpression});\r\n#else\r\n#foreach($assignment in $effect.assignments)\r\n ${effect.variable}.${assignment.setter}(${assignment.expression});\r\n#end\r\n#end\r\n ${effect.mapperField}.updateById(${effect.variable});\r\n#end\r\n\r\n#end\r\n#if($action.stateTransition)\r\n ${action.recordVariable}.${action.statusSetter}(\"${action.toState}\");\r\n#if($action.auditUserSetter)\r\n ${action.recordVariable}.${action.auditUserSetter}(currentUserId);\r\n#end\r\n#if($action.auditTimeSetter)\r\n ${action.recordVariable}.${action.auditTimeSetter}(new Date());\r\n#end\r\n ${action.ownerMapperField}.updateById(${action.recordVariable});\r\n#end\r\n }\r\n\r\n#end\r\n#end\r\n}\r\n', 'admin', '2026-07-15 11:18:32', '', NULL);
INSERT INTO `sys_template_file` VALUES (920113, 9201, 'controller.java.vm', NULL, 'controller.java.vm', 'package ${packageName}.controller;\r\n\r\nimport cn.hutool.poi.excel.ExcelReader;\r\nimport cn.hutool.poi.excel.ExcelUtil;\r\nimport cn.hutool.poi.excel.ExcelWriter;\r\nimport com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;\r\nimport com.baomidou.mybatisplus.extension.plugins.pagination.Page;\r\nimport ${packageName}.common.Result;\r\nimport ${packageName}.entity.${ClassName};\r\n#if($hasQingCurrentUserColumn || $hasTypedBusinessActions)\r\nimport ${packageName}.security.AuthPrincipal;\r\nimport ${packageName}.security.PortalAuthTokenStore;\r\n#end\r\nimport ${packageName}.service.I${ClassName}Service;\r\nimport java.io.InputStream;\r\nimport java.net.URLEncoder;\r\nimport java.util.List;\r\nimport java.util.Map;\r\nimport javax.annotation.Resource;\r\nimport javax.servlet.ServletOutputStream;\r\n#if($hasQingCurrentUserColumn || $hasTypedBusinessActions)\r\nimport javax.servlet.http.HttpServletRequest;\r\n#end\r\nimport javax.servlet.http.HttpServletResponse;\r\nimport org.apache.commons.lang3.StringUtils;\r\nimport org.springframework.web.bind.annotation.DeleteMapping;\r\nimport org.springframework.web.bind.annotation.GetMapping;\r\nimport org.springframework.web.bind.annotation.PathVariable;\r\nimport org.springframework.web.bind.annotation.PostMapping;\r\nimport org.springframework.web.bind.annotation.RequestBody;\r\nimport org.springframework.web.bind.annotation.RequestParam;\r\nimport org.springframework.web.bind.annotation.RestController;\r\nimport org.springframework.web.multipart.MultipartFile;\r\n\r\n/** ${functionName}Controller */\r\n@RestController\r\npublic class ${ClassName}Controller\r\n{\r\n @Resource\r\n private I${ClassName}Service ${className}Service;\r\n\r\n#if($hasQingCurrentUserColumn || $hasTypedBusinessActions)\r\n @Resource\r\n private PortalAuthTokenStore tokenStore;\r\n\r\n#end\r\n#if($allowAdd == \'1\' || $allowEdit == \'1\')\r\n @PostMapping(\"${requestPath}\")\r\n public Result<Void> save(@RequestBody ${ClassName} ${className})\r\n {\r\n#if($allowAdd == \'1\' && $allowEdit == \'1\')\r\n ${className}Service.saveOrUpdate(${className});\r\n#elseif($allowAdd == \'1\')\r\n ${className}Service.save(${className});\r\n#else\r\n ${className}Service.updateById(${className});\r\n#end\r\n return Result.success();\r\n }\r\n#end\r\n\r\n#if($allowRemove == \'1\')\r\n @DeleteMapping(\"${requestPath}/{${pkColumn.javaField}}\")\r\n public Result<Void> delete(@PathVariable ${pkColumn.javaType} ${pkColumn.javaField})\r\n {\r\n ${className}Service.removeById(${pkColumn.javaField});\r\n return Result.success();\r\n }\r\n\r\n @PostMapping(\"${requestPath}/del/batch\")\r\n public Result<Void> deleteBatch(@RequestBody List<${pkColumn.javaType}> ${pkColumn.javaField}s)\r\n {\r\n ${className}Service.removeByIds(${pkColumn.javaField}s);\r\n return Result.success();\r\n }\r\n#end\r\n\r\n @GetMapping(\"${requestPath}\")\r\n public Result<List<${ClassName}>> findAll()\r\n {\r\n return Result.success(${className}Service.list());\r\n }\r\n\r\n @GetMapping(\"${requestPath}/{${pkColumn.javaField}}\")\r\n public Result<${ClassName}> findOne(@PathVariable ${pkColumn.javaType} ${pkColumn.javaField})\r\n {\r\n return Result.success(${className}Service.getById(${pkColumn.javaField}));\r\n }\r\n\r\n @GetMapping(\"${requestPath}/page\")\r\n public Result<Page<${ClassName}>> findPage(@RequestParam(required = false, defaultValue = \"1\") Integer pageNum,\r\n @RequestParam(required = false, defaultValue = \"10\") Integer pageSize,\r\n @RequestParam(required = false) Map<String, Object> params#if($hasQingCurrentUserColumn),\r\n HttpServletRequest request#end)\r\n {\r\n QueryWrapper<${ClassName}> queryWrapper = new QueryWrapper<${ClassName}>();\r\n#if($hasQingCurrentUserColumn)\r\n if (isCurrentUserOnly(params))\r\n {\r\n AuthPrincipal currentUser = tokenStore.getPortalPrincipal(resolveToken(request));\r\n if (currentUser == null)\r\n {\r\n return Result.success(new Page<${ClassName}>(pageNum, pageSize));\r\n }\r\n queryWrapper.eq(\"${qingCurrentUserColumn.columnName}\", currentUser.getUserId());\r\n }\r\n#end\r\n#foreach($column in $columns)\r\n#if($column.isQuery == \"1\")\r\n#if($column.queryType == \"NE\")\r\n queryWrapper.ne(hasValue(params.get(\"${column.javaField}\")), \"${column.columnName}\", params.get(\"${column.javaField}\"));\r\n#elseif($column.queryType == \"GT\")\r\n queryWrapper.gt(hasValue(params.get(\"${column.javaField}\")), \"${column.columnName}\", params.get(\"${column.javaField}\"));\r\n#elseif($column.queryType == \"GTE\")\r\n queryWrapper.ge(hasValue(params.get(\"${column.javaField}\")), \"${column.columnName}\", params.get(\"${column.javaField}\"));\r\n#elseif($column.queryType == \"LT\")\r\n queryWrapper.lt(hasValue(params.get(\"${column.javaField}\")), \"${column.columnName}\", params.get(\"${column.javaField}\"));\r\n#elseif($column.queryType == \"LTE\")\r\n queryWrapper.le(hasValue(params.get(\"${column.javaField}\")), \"${column.columnName}\", params.get(\"${column.javaField}\"));\r\n#elseif($column.queryType == \"LIKE\")\r\n queryWrapper.like(hasValue(params.get(\"${column.javaField}\")), \"${column.columnName}\", params.get(\"${column.javaField}\"));\r\n#else\r\n queryWrapper.eq(hasValue(params.get(\"${column.javaField}\")), \"${column.columnName}\", params.get(\"${column.javaField}\"));\r\n#end\r\n#end\r\n#end\r\n queryWrapper.orderByDesc(\"${pkColumn.columnName}\");\r\n return Result.success(${className}Service.page(new Page<${ClassName}>(pageNum, pageSize), queryWrapper));\r\n }\r\n\r\n @GetMapping(\"${requestPath}/export\")\r\n public void export(HttpServletResponse response) throws Exception\r\n {\r\n List<${ClassName}> list = ${className}Service.list();\r\n ExcelWriter writer = ExcelUtil.getWriter(true);\r\n writer.write(list, true);\r\n response.setContentType(\"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet;charset=utf-8\");\r\n String fileName = URLEncoder.encode(\"${functionName}信息表\", \"UTF-8\");\r\n response.setHeader(\"Content-Disposition\", \"attachment;filename=\" + fileName + \".xlsx\");\r\n ServletOutputStream out = response.getOutputStream();\r\n writer.flush(out, true);\r\n out.close();\r\n writer.close();\r\n }\r\n\r\n#if($allowAdd == \'1\')\r\n @PostMapping(\"${requestPath}/import\")\r\n public Result<Void> imp(MultipartFile file) throws Exception\r\n {\r\n InputStream inputStream = file.getInputStream();\r\n ExcelReader reader = ExcelUtil.getReader(inputStream);\r\n List<${ClassName}> list = reader.readAll(${ClassName}.class);\r\n ${className}Service.saveBatch(list);\r\n return Result.success();\r\n }\r\n#end\r\n\r\n#if($hasTypedBusinessActions)\r\n#foreach($action in $typedBusinessActions)\r\n#if($action.method == \"GET\")\r\n @GetMapping(\"${action.path}\")\r\n public Result<Void> ${action.javaMethodName}(@RequestParam Map<String, Object> params, HttpServletRequest request)\r\n#elseif($action.method == \"PUT\")\r\n @org.springframework.web.bind.annotation.PutMapping(\"${action.path}\")\r\n public Result<Void> ${action.javaMethodName}(@RequestBody Map<String, Object> params, HttpServletRequest request)\r\n#elseif($action.method == \"DELETE\")\r\n @DeleteMapping(\"${action.path}\")\r\n public Result<Void> ${action.javaMethodName}(@RequestBody Map<String, Object> params, HttpServletRequest request)\r\n#else\r\n @PostMapping(\"${action.path}\")\r\n public Result<Void> ${action.javaMethodName}(@RequestBody Map<String, Object> params, HttpServletRequest request)\r\n#end\r\n {\r\n try\r\n {\r\n if (params == null || params.get(\"${action.pkField}\") == null)\r\n {\r\n throw new IllegalArgumentException(\"缺少业务动作参数: ${action.pkField}\");\r\n }\r\n AuthPrincipal currentUser = requireCurrentUser(request);\r\n ${action.pkType} ${action.pkField} = ${action.controllerIdExpression};\r\n ${className}Service.${action.javaMethodName}(${action.serviceArguments});\r\n return Result.success();\r\n }\r\n catch (RuntimeException e)\r\n {\r\n return Result.error(e.getMessage());\r\n }\r\n }\r\n\r\n#end\r\n private AuthPrincipal requireCurrentUser(HttpServletRequest request)\r\n {\r\n AuthPrincipal currentUser = tokenStore.getPortalPrincipal(resolveToken(request));\r\n if (currentUser == null)\r\n {\r\n throw new IllegalArgumentException(\"请先登录\");\r\n }\r\n return currentUser;\r\n }\r\n#end\r\n\r\n private boolean hasValue(Object value)\r\n {\r\n return value != null && StringUtils.isNotBlank(String.valueOf(value));\r\n }\r\n\r\n#if($hasQingCurrentUserColumn)\r\n private boolean isCurrentUserOnly(Map<String, Object> params)\r\n {\r\n return params != null && \"true\".equalsIgnoreCase(String.valueOf(params.get(\"__currentUserOnly\")));\r\n }\r\n#end\r\n\r\n#if($hasQingCurrentUserColumn || $hasTypedBusinessActions)\r\n private String resolveToken(HttpServletRequest request)\r\n {\r\n String authorization = request.getHeader(\"Authorization\");\r\n if (authorization != null && authorization.startsWith(\"Bearer \"))\r\n {\r\n return authorization.substring(\"Bearer \".length());\r\n }\r\n return request.getHeader(\"X-Portal-Token\");\r\n }\r\n#end\r\n}\r\n', 'admin', '2026-07-15 11:18:32', '', NULL);
INSERT INTO `sys_template_file` VALUES (920114, 9201, 'mapper.xml.vm', NULL, 'mapper.xml.vm', '<?xml version=\"1.0\" encoding=\"UTF-8\" ?>\n<!DOCTYPE mapper\nPUBLIC \"-//mybatis.org//DTD Mapper 3.0//EN\"\n\"http://mybatis.org/dtd/mybatis-3-mapper.dtd\">\n<mapper namespace=\"${packageName}.mapper.${ClassName}Mapper\">\n\n <!-- 通用查询映射结果 -->\n <resultMap type=\"${packageName}.entity.${ClassName}\" id=\"BaseResultMap\">\n#foreach ($column in $columns)\n#if ($column.isPk == \"1\")\n <id column=\"${column.columnName}\" property=\"${column.javaField}\"/>\n#else\n <result column=\"${column.columnName}\" property=\"${column.javaField}\"/>\n#end\n#end\n </resultMap>\n\n <!-- 通用查询结果列 -->\n <sql id=\"Base_Column_List\">\n#foreach ($column in $columns)\n ${column.columnName}#if($foreach.count != $columns.size()),#end\n\n#end\n </sql>\n\n</mapper>\n', 'admin', '2026-07-15 11:18:32', '', NULL);
INSERT INTO `sys_template_file` VALUES (920115, 9201, 'sql.vm', NULL, 'sql.vm', '-- ${functionName} table\n-- Generated by qing template at ${datetime}\n\n${table.createTableSql}\n', 'admin', '2026-07-15 11:18:32', '', NULL);
INSERT INTO `sys_template_file` VALUES (920116, 9201, 'AuthPrincipal.java.vm', NULL, 'AuthPrincipal.java.vm', 'package ${packageName}.security;\n\npublic class AuthPrincipal\n{\n private Long userId;\n private String account;\n private String displayName;\n private String roleCode;\n private String roleName;\n private String loginSide;\n private String tableName;\n\n public Long getUserId() { return userId; }\n public void setUserId(Long userId) { this.userId = userId; }\n public String getAccount() { return account; }\n public void setAccount(String account) { this.account = account; }\n public String getDisplayName() { return displayName; }\n public void setDisplayName(String displayName) { this.displayName = displayName; }\n public String getRoleCode() { return roleCode; }\n public void setRoleCode(String roleCode) { this.roleCode = roleCode; }\n public String getRoleName() { return roleName; }\n public void setRoleName(String roleName) { this.roleName = roleName; }\n public String getLoginSide() { return loginSide; }\n public void setLoginSide(String loginSide) { this.loginSide = loginSide; }\n public String getTableName() { return tableName; }\n public void setTableName(String tableName) { this.tableName = tableName; }\n}\n', 'admin', '2026-07-15 11:18:32', '', NULL);
INSERT INTO `sys_template_file` VALUES (920118, 9201, 'PortalAuthTokenStore.java.vm', NULL, 'PortalAuthTokenStore.java.vm', 'package ${packageName}.security;\n\nimport java.util.Map;\nimport java.util.UUID;\nimport java.util.concurrent.ConcurrentHashMap;\nimport org.springframework.stereotype.Component;\n\n@Component\npublic class PortalAuthTokenStore\n{\n private static final String LOGIN_SIDE_PORTAL = \"PORTAL\";\n private static final String LOGIN_SIDE_ADMIN = \"ADMIN\";\n\n private final Map<String, AuthPrincipal> sessions = new ConcurrentHashMap<String, AuthPrincipal>();\n\n public String issue(AuthPrincipal principal)\n {\n String token = UUID.randomUUID().toString().replace(\"-\", \"\");\n sessions.put(token, principal);\n return token;\n }\n\n public AuthPrincipal getPrincipal(String token)\n {\n if (token == null || token.trim().isEmpty())\n {\n return null;\n }\n return sessions.get(token);\n }\n\n public AuthPrincipal getPortalPrincipal(String token)\n {\n AuthPrincipal principal = getPrincipal(token);\n return principal != null && LOGIN_SIDE_PORTAL.equals(principal.getLoginSide()) ? principal : null;\n }\n\n public AuthPrincipal getAdminPrincipal(String token)\n {\n AuthPrincipal principal = getPrincipal(token);\n return principal != null && LOGIN_SIDE_ADMIN.equals(principal.getLoginSide()) ? principal : null;\n }\n\n public boolean validate(String token)\n {\n return getPrincipal(token) != null;\n }\n\n public void revoke(String token)\n {\n if (token != null)\n {\n sessions.remove(token);\n }\n }\n}\n', 'admin', '2026-07-15 11:18:32', '', NULL);
INSERT INTO `sys_template_file` VALUES (920119, 9201, 'PortalAuthInterceptor.java.vm', NULL, 'PortalAuthInterceptor.java.vm', 'package ${packageName}.security;\n\nimport java.io.IOException;\nimport javax.annotation.Resource;\nimport javax.servlet.http.HttpServletRequest;\nimport javax.servlet.http.HttpServletResponse;\nimport org.springframework.stereotype.Component;\nimport org.springframework.web.servlet.HandlerInterceptor;\n\n@Component\npublic class PortalAuthInterceptor implements HandlerInterceptor\n{\n @Resource\n private PortalAuthTokenStore tokenStore;\n\n @Override\n public boolean preHandle(HttpServletRequest request, HttpServletResponse response, Object handler)\n throws IOException\n {\n if (\"OPTIONS\".equalsIgnoreCase(request.getMethod()))\n {\n return true;\n }\n\n String token = resolveToken(request);\n if (tokenStore.validate(token))\n {\n return true;\n }\n\n response.setStatus(401);\n response.setCharacterEncoding(\"UTF-8\");\n response.setContentType(\"application/json;charset=UTF-8\");\n response.getWriter().write(\"{\\\"code\\\":\\\"401\\\",\\\"msg\\\":\\\"请先登录\\\",\\\"data\\\":null}\");\n return false;\n }\n\n private String resolveToken(HttpServletRequest request)\n {\n String authorization = request.getHeader(\"Authorization\");\n if (authorization != null && authorization.startsWith(\"Bearer \"))\n {\n return authorization.substring(\"Bearer \".length());\n }\n return request.getHeader(\"X-Portal-Token\");\n }\n}\n', 'admin', '2026-07-15 11:18:32', '', NULL);
INSERT INTO `sys_template_file` VALUES (920120, 9201, 'PortalAuthController.java.vm', NULL, 'PortalAuthController.java.vm', 'package ${packageName}.controller;\n\nimport ${packageName}.common.Result;\nimport ${packageName}.security.AuthPrincipal;\nimport ${packageName}.security.PortalAuthTokenStore;\nimport java.nio.charset.StandardCharsets;\nimport java.security.MessageDigest;\nimport java.util.HashMap;\nimport java.util.LinkedHashMap;\nimport java.util.Map;\nimport javax.annotation.Resource;\nimport javax.servlet.http.HttpServletRequest;\nimport org.springframework.dao.EmptyResultDataAccessException;\nimport org.springframework.jdbc.core.JdbcTemplate;\nimport org.springframework.web.bind.annotation.GetMapping;\nimport org.springframework.web.bind.annotation.PostMapping;\nimport org.springframework.web.bind.annotation.RequestBody;\nimport org.springframework.web.bind.annotation.RequestMapping;\nimport org.springframework.web.bind.annotation.RestController;\n\n@RestController\n@RequestMapping(\"/auth\")\npublic class PortalAuthController\n{\n private static final String LOGIN_SIDE_PORTAL = \"PORTAL\";\n\n private static final Map<String, AuthBinding> ROLE_BINDINGS = new LinkedHashMap<String, AuthBinding>();\n\n static\n {\n#foreach($binding in $portalAuthBindings)\n ROLE_BINDINGS.put(\"${binding.roleCodeLiteral}\", new AuthBinding(\"${binding.roleCodeLiteral}\", \"${binding.roleNameLiteral}\",\n \"${binding.tableNameLiteral}\", \"${binding.idColumnLiteral}\", \"${binding.accountColumnLiteral}\",\n \"${binding.passwordColumnLiteral}\", \"${binding.displayNameColumnLiteral}\", \"${binding.statusColumnLiteral}\"));\n#end\n }\n\n @Resource\n private JdbcTemplate jdbcTemplate;\n\n @Resource\n private PortalAuthTokenStore tokenStore;\n\n @PostMapping(\"/login\")\n public Result<Map<String, Object>> login(@RequestBody LoginBody body)\n {\n String account = body == null ? null : firstNonBlank(body.getAccount(), body.getUsername());\n String password = body == null ? null : body.getPassword();\n AuthBinding binding = resolveBinding(body == null ? null : body.getRoleCode());\n if (isBlank(account) || isBlank(password))\n {\n return Result.error(\"请输入账号和密码\");\n }\n if (binding == null)\n {\n return Result.error(\"请选择可登录角色\");\n }\n\n AuthLoginCandidate candidate = findPrincipal(binding, account);\n if (candidate == null)\n {\n return Result.error(\"账号或密码错误\");\n }\n\n if (!passwordHash(password).equalsIgnoreCase(candidate.getPasswordHash()))\n {\n return Result.error(\"账号或密码错误\");\n }\n\n AuthPrincipal principal = candidate.getPrincipal();\n String token = tokenStore.issue(principal);\n Map<String, Object> data = new HashMap<String, Object>();\n data.put(\"token\", token);\n data.put(\"user\", principal);\n return Result.success(data);\n }\n\n @GetMapping(\"/me\")\n public Result<AuthPrincipal> me(HttpServletRequest request)\n {\n AuthPrincipal principal = tokenStore.getPortalPrincipal(resolveToken(request));\n if (principal == null)\n {\n return Result.error(\"请先登录\");\n }\n return Result.success(principal);\n }\n\n @PostMapping(\"/logout\")\n public Result<Void> logout(HttpServletRequest request)\n {\n tokenStore.revoke(resolveToken(request));\n return Result.success();\n }\n\n private AuthBinding resolveBinding(String roleCode)\n {\n if (ROLE_BINDINGS.isEmpty())\n {\n return null;\n }\n if (!isBlank(roleCode))\n {\n return ROLE_BINDINGS.get(roleCode);\n }\n return ROLE_BINDINGS.size() == 1 ? ROLE_BINDINGS.values().iterator().next() : null;\n }\n\n private AuthLoginCandidate findPrincipal(AuthBinding binding, String account)\n {\n String sql = \"select `\" + binding.getIdColumn() + \"` as user_id, `\"\n + binding.getAccountColumn() + \"` as account, `\"\n + binding.getPasswordColumn() + \"` as password_hash, `\"\n + binding.getDisplayNameColumn() + \"` as display_name, `\"\n + binding.getStatusColumn() + \"` as status from `\"\n + binding.getTableName() + \"` where `\"\n + binding.getAccountColumn() + \"` = ? and `\"\n + binding.getStatusColumn() + \"` = \'0\' limit 1\";\n try\n {\n Map<String, Object> row = jdbcTemplate.queryForMap(sql, account);\n AuthPrincipal principal = new AuthPrincipal();\n principal.setUserId(toLong(row.get(\"user_id\")));\n principal.setAccount(stringValue(row.get(\"account\")));\n principal.setDisplayName(firstNonBlank(stringValue(row.get(\"display_name\")), principal.getAccount()));\n principal.setRoleCode(binding.getRoleCode());\n principal.setRoleName(binding.getRoleName());\n principal.setLoginSide(LOGIN_SIDE_PORTAL);\n principal.setTableName(binding.getTableName());\n return new AuthLoginCandidate(principal, stringValue(row.get(\"password_hash\")));\n }\n catch (EmptyResultDataAccessException e)\n {\n return null;\n }\n }\n\n private String resolveToken(HttpServletRequest request)\n {\n String authorization = request.getHeader(\"Authorization\");\n if (authorization != null && authorization.startsWith(\"Bearer \"))\n {\n return authorization.substring(\"Bearer \".length());\n }\n return request.getHeader(\"X-Portal-Token\");\n }\n\n private String passwordHash(String password)\n {\n try\n {\n MessageDigest digest = MessageDigest.getInstance(\"SHA-256\");\n byte[] hash = digest.digest(password.getBytes(StandardCharsets.UTF_8));\n StringBuilder builder = new StringBuilder();\n for (byte item : hash)\n {\n builder.append(String.format(\"%02x\", item));\n }\n return builder.toString();\n }\n catch (Exception e)\n {\n throw new IllegalStateException(\"Password hash failed\", e);\n }\n }\n\n private Long toLong(Object value)\n {\n if (value instanceof Number)\n {\n return ((Number) value).longValue();\n }\n if (value == null)\n {\n return null;\n }\n return Long.valueOf(String.valueOf(value));\n }\n\n private String stringValue(Object value)\n {\n return value == null ? \"\" : String.valueOf(value);\n }\n\n private String firstNonBlank(String first, String second)\n {\n return isBlank(first) ? second : first;\n }\n\n private boolean isBlank(String value)\n {\n return value == null || value.trim().isEmpty();\n }\n\n public static class LoginBody\n {\n private String roleCode;\n private String account;\n private String username;\n private String password;\n\n public String getRoleCode()\n {\n return roleCode;\n }\n\n public void setRoleCode(String roleCode)\n {\n this.roleCode = roleCode;\n }\n\n public String getAccount()\n {\n return account;\n }\n\n public void setAccount(String account)\n {\n this.account = account;\n }\n\n public String getUsername()\n {\n return username;\n }\n\n public void setUsername(String username)\n {\n this.username = username;\n }\n\n public String getPassword()\n {\n return password;\n }\n\n public void setPassword(String password)\n {\n this.password = password;\n }\n }\n\n private static class AuthBinding\n {\n private final String roleCode;\n private final String roleName;\n private final String tableName;\n private final String idColumn;\n private final String accountColumn;\n private final String passwordColumn;\n private final String displayNameColumn;\n private final String statusColumn;\n\n private AuthBinding(String roleCode, String roleName, String tableName, String idColumn, String accountColumn,\n String passwordColumn, String displayNameColumn, String statusColumn)\n {\n this.roleCode = roleCode;\n this.roleName = roleName;\n this.tableName = tableName;\n this.idColumn = idColumn;\n this.accountColumn = accountColumn;\n this.passwordColumn = passwordColumn;\n this.displayNameColumn = displayNameColumn;\n this.statusColumn = statusColumn;\n }\n\n public String getRoleCode() { return roleCode; }\n public String getRoleName() { return roleName; }\n public String getTableName() { return tableName; }\n public String getIdColumn() { return idColumn; }\n public String getAccountColumn() { return accountColumn; }\n public String getPasswordColumn() { return passwordColumn; }\n public String getDisplayNameColumn() { return displayNameColumn; }\n public String getStatusColumn() { return statusColumn; }\n }\n\n private static class AuthLoginCandidate\n {\n private final AuthPrincipal principal;\n private final String passwordHash;\n\n private AuthLoginCandidate(AuthPrincipal principal, String passwordHash)\n {\n this.principal = principal;\n this.passwordHash = passwordHash;\n }\n\n public AuthPrincipal getPrincipal()\n {\n return principal;\n }\n\n public String getPasswordHash()\n {\n return passwordHash;\n }\n }\n}\n', 'admin', '2026-07-15 11:18:32', '', NULL);
INSERT INTO `sys_template_file` VALUES (920123, 9201, 'AdminAuthController.java.vm', NULL, 'AdminAuthController.java.vm', 'package ${packageName}.controller;\n\nimport ${packageName}.common.Result;\nimport ${packageName}.security.AuthPrincipal;\nimport ${packageName}.security.PortalAuthTokenStore;\nimport java.nio.charset.StandardCharsets;\nimport java.security.MessageDigest;\nimport java.util.HashMap;\nimport java.util.Map;\nimport javax.annotation.Resource;\nimport javax.servlet.http.HttpServletRequest;\nimport org.springframework.dao.EmptyResultDataAccessException;\nimport org.springframework.jdbc.core.JdbcTemplate;\nimport org.springframework.web.bind.annotation.GetMapping;\nimport org.springframework.web.bind.annotation.PostMapping;\nimport org.springframework.web.bind.annotation.RequestBody;\nimport org.springframework.web.bind.annotation.RequestMapping;\nimport org.springframework.web.bind.annotation.RestController;\n\n@RestController\n@RequestMapping(\"/auth/admin\")\npublic class AdminAuthController\n{\n private static final String LOGIN_SIDE_ADMIN = \"ADMIN\";\n private static final String ROLE_CODE = \"${adminAuthBinding.roleCodeLiteral}\";\n private static final String ROLE_NAME = \"${adminAuthBinding.roleNameLiteral}\";\n private static final String TABLE_NAME = \"${adminAuthBinding.tableNameLiteral}\";\n private static final String ID_COLUMN = \"${adminAuthBinding.idColumnLiteral}\";\n private static final String ACCOUNT_COLUMN = \"${adminAuthBinding.accountColumnLiteral}\";\n private static final String PASSWORD_COLUMN = \"${adminAuthBinding.passwordColumnLiteral}\";\n private static final String DISPLAY_NAME_COLUMN = \"${adminAuthBinding.displayNameColumnLiteral}\";\n private static final String STATUS_COLUMN = \"${adminAuthBinding.statusColumnLiteral}\";\n\n @Resource\n private JdbcTemplate jdbcTemplate;\n\n @Resource\n private PortalAuthTokenStore tokenStore;\n\n @PostMapping(\"/login\")\n public Result<Map<String, Object>> login(@RequestBody LoginBody body)\n {\n String account = body == null ? null : firstNonBlank(body.getAccount(), body.getUsername());\n String password = body == null ? null : body.getPassword();\n if (isBlank(account) || isBlank(password))\n {\n return Result.error(\"请输入账号和密码\");\n }\n\n AuthLoginCandidate candidate = findPrincipal(account);\n if (candidate == null)\n {\n return Result.error(\"账号或密码错误\");\n }\n\n if (!passwordHash(password).equalsIgnoreCase(candidate.getPasswordHash()))\n {\n return Result.error(\"账号或密码错误\");\n }\n\n AuthPrincipal principal = candidate.getPrincipal();\n String token = tokenStore.issue(principal);\n Map<String, Object> data = new HashMap<String, Object>();\n data.put(\"token\", token);\n data.put(\"user\", principal);\n return Result.success(data);\n }\n\n @GetMapping(\"/me\")\n public Result<AuthPrincipal> me(HttpServletRequest request)\n {\n AuthPrincipal principal = tokenStore.getAdminPrincipal(resolveToken(request));\n if (principal == null)\n {\n return Result.error(\"请先登录\");\n }\n return Result.success(principal);\n }\n\n @PostMapping(\"/logout\")\n public Result<Void> logout(HttpServletRequest request)\n {\n tokenStore.revoke(resolveToken(request));\n return Result.success();\n }\n\n private AuthLoginCandidate findPrincipal(String account)\n {\n String sql = \"select `\" + ID_COLUMN + \"` as user_id, `\"\n + ACCOUNT_COLUMN + \"` as account, `\"\n + PASSWORD_COLUMN + \"` as password_hash, `\"\n + DISPLAY_NAME_COLUMN + \"` as display_name, `\"\n + STATUS_COLUMN + \"` as status from `\"\n + TABLE_NAME + \"` where `\"\n + ACCOUNT_COLUMN + \"` = ? and `\"\n + STATUS_COLUMN + \"` = \'0\' limit 1\";\n try\n {\n Map<String, Object> row = jdbcTemplate.queryForMap(sql, account);\n AuthPrincipal principal = new AuthPrincipal();\n principal.setUserId(toLong(row.get(\"user_id\")));\n principal.setAccount(stringValue(row.get(\"account\")));\n principal.setDisplayName(firstNonBlank(stringValue(row.get(\"display_name\")), principal.getAccount()));\n principal.setRoleCode(ROLE_CODE);\n principal.setRoleName(ROLE_NAME);\n principal.setLoginSide(LOGIN_SIDE_ADMIN);\n principal.setTableName(TABLE_NAME);\n return new AuthLoginCandidate(principal, stringValue(row.get(\"password_hash\")));\n }\n catch (EmptyResultDataAccessException e)\n {\n return null;\n }\n }\n\n private String resolveToken(HttpServletRequest request)\n {\n String authorization = request.getHeader(\"Authorization\");\n if (authorization != null && authorization.startsWith(\"Bearer \"))\n {\n return authorization.substring(\"Bearer \".length());\n }\n return request.getHeader(\"X-Admin-Token\");\n }\n\n private String passwordHash(String password)\n {\n try\n {\n MessageDigest digest = MessageDigest.getInstance(\"SHA-256\");\n byte[] hash = digest.digest(password.getBytes(StandardCharsets.UTF_8));\n StringBuilder builder = new StringBuilder();\n for (byte item : hash)\n {\n builder.append(String.format(\"%02x\", item));\n }\n return builder.toString();\n }\n catch (Exception e)\n {\n throw new IllegalStateException(\"Password hash failed\", e);\n }\n }\n\n private Long toLong(Object value)\n {\n if (value instanceof Number)\n {\n return ((Number) value).longValue();\n }\n if (value == null)\n {\n return null;\n }\n return Long.valueOf(String.valueOf(value));\n }\n\n private String stringValue(Object value)\n {\n return value == null ? \"\" : String.valueOf(value);\n }\n\n private String firstNonBlank(String first, String second)\n {\n return isBlank(first) ? second : first;\n }\n\n private boolean isBlank(String value)\n {\n return value == null || value.trim().isEmpty();\n }\n\n public static class LoginBody\n {\n private String account;\n private String username;\n private String password;\n\n public String getAccount()\n {\n return account;\n }\n\n public void setAccount(String account)\n {\n this.account = account;\n }\n\n public String getUsername()\n {\n return username;\n }\n\n public void setUsername(String username)\n {\n this.username = username;\n }\n\n public String getPassword()\n {\n return password;\n }\n\n public void setPassword(String password)\n {\n this.password = password;\n }\n }\n\n private static class AuthLoginCandidate\n {\n private final AuthPrincipal principal;\n private final String passwordHash;\n\n private AuthLoginCandidate(AuthPrincipal principal, String passwordHash)\n {\n this.principal = principal;\n this.passwordHash = passwordHash;\n }\n\n public AuthPrincipal getPrincipal()\n {\n return principal;\n }\n\n public String getPasswordHash()\n {\n return passwordHash;\n }\n }\n}\n', 'admin', '2026-07-15 11:18:32', '', NULL);
INSERT INTO `sys_template_file` VALUES (920201, 9202, 'package.json.vm', NULL, 'package.json.vm', '{\n \"name\": \"${projectFileName}-admin\",\n \"version\": \"1.0.0\",\n \"private\": true,\n \"scripts\": {\n \"dev\": \"vue-cli-service serve --host 0.0.0.0\",\n \"serve\": \"vue-cli-service serve --host 0.0.0.0\",\n \"build\": \"vue-cli-service build\"\n },\n \"dependencies\": {\n \"axios\": \"^0.27.2\",\n \"core-js\": \"^3.8.3\",\n \"echarts\": \"5.4.0\",\n \"element-ui\": \"^2.15.14\",\n \"quill\": \"^1.3.7\",\n \"vue\": \"^2.6.14\",\n \"vue-quill-editor\": \"^3.0.6\",\n \"vue-router\": \"^3.6.5\"\n },\n \"devDependencies\": {\n \"@vue/cli-service\": \"^4.5.19\",\n \"vue-template-compiler\": \"^2.6.14\"\n }\n}', 'admin', '2026-07-15 11:18:32', '', NULL);
INSERT INTO `sys_template_file` VALUES (920202, 9202, 'babel.config.js.vm', NULL, 'babel.config.js.vm', 'module.exports = {\n presets: [\n \"@vue/cli-plugin-babel/preset\"\n ]\n}\n', 'admin', '2026-07-15 11:18:32', '', NULL);
INSERT INTO `sys_template_file` VALUES (920203, 9202, 'vue.config.js.vm', NULL, 'vue.config.js.vm', 'const port = process.env.PORT || 8081\nconst apiBaseUrl = process.env.VUE_APP_API_BASE_URL || \"http://localhost:8080\"\n\nmodule.exports = {\n transpileDependencies: [],\n devServer: {\n port,\n proxy: {\n \"/api\": {\n target: apiBaseUrl,\n changeOrigin: true,\n pathRewrite: {\n \"^/api\": \"\"\n }\n }\n }\n }\n}\n', 'admin', '2026-07-15 11:18:32', '', NULL);
INSERT INTO `sys_template_file` VALUES (920204, 9202, 'index.html.vm', NULL, 'index.html.vm', '<!doctype html>\n<html lang=\"zh-CN\">\n<head>\n <meta charset=\"utf-8\">\n <meta http-equiv=\"X-UA-Compatible\" content=\"IE=edge\">\n <meta name=\"viewport\" content=\"width=device-width,initial-scale=1.0\">\n <title>${projectName} Admin</title>\n</head>\n<body>\n <noscript>请启用 JavaScript 后访问。</noscript>\n <div id=\"app\"></div>\n</body>\n</html>', 'admin', '2026-07-15 11:18:32', '', NULL);
INSERT INTO `sys_template_file` VALUES (920205, 9202, 'admin-main.js.vm', NULL, 'admin-main.js.vm', 'import Vue from \"vue\"\nimport ElementUI from \"element-ui\"\nimport VueQuillEditor from \"vue-quill-editor\"\nimport \"element-ui/lib/theme-chalk/index.css\"\nimport \"quill/dist/quill.core.css\"\nimport \"quill/dist/quill.snow.css\"\nimport App from \"./App.vue\"\nimport router from \"./router\"\nimport request from \"./utils/request\"\nimport dict from \"./utils/dict\"\n\nVue.config.productionTip = false\nVue.use(ElementUI)\nVue.use(VueQuillEditor)\nVue.prototype.request = request\nVue.prototype._dict = dict\n\nnew Vue({\n router,\n render: h => h(App)\n}).#[[$mount]]#(\"#app\")', 'admin', '2026-07-15 11:18:32', '', NULL);
INSERT INTO `sys_template_file` VALUES (920206, 9202, 'admin-App.vue.vm', NULL, 'admin-App.vue.vm', '<template>\n <div id=\"app\">\n <router-view v-if=\"isLoginPage\" />\n <div v-else class=\"admin-shell\">\n <aside class=\"admin-sidebar\">\n <router-link class=\"brand\" to=\"/\">\n <span class=\"brand-mark\">ADM</span>\n <span class=\"brand-text\">${projectName}后台</span>\n </router-link>\n\n <nav class=\"sidebar-menu\">\n#if($hasAdminNavGroups)\n#foreach($group in $adminNavGroups)\n#if($group.hasChildren)\n <div class=\"menu-group\">\n#if($group.clickable)\n <router-link class=\"menu-title menu-title-link\" :class=\'{ active: isSidebarGroupActive(${group.activePathsLiteral}) }\' to=\"${group.path}\" exact>\n <span><i class=\"el-icon-menu\"></i>${group.name}</span>\n <i class=\"el-icon-arrow-up\"></i>\n </router-link>\n#else\n <div class=\"menu-title\" :class=\'{ active: isSidebarGroupActive(${group.activePathsLiteral}) }\'>\n <span><i class=\"el-icon-folder-opened\"></i>${group.name}</span>\n <i class=\"el-icon-arrow-up\"></i>\n </div>\n#end\n#foreach($child in $group.children)\n <router-link class=\"sidebar-link is-child\" to=\"${child.path}\" exact>\n <span>${child.name}</span>\n </router-link>\n#end\n </div>\n#else\n <router-link class=\"sidebar-link\" to=\"${group.path}\" exact>\n <i class=\"el-icon-menu\"></i>\n <span>${group.name}</span>\n </router-link>\n#end\n#end\n#else\n <router-link class=\"sidebar-link\" to=\"/empty\" exact>\n <i class=\"el-icon-warning-outline\"></i>\n <span>暂无菜单</span>\n </router-link>\n#end\n </nav>\n </aside>\n\n <section class=\"admin-main\">\n <header class=\"topbar\">\n <div class=\"breadcrumb\">\n <router-link to=\"/\">首页</router-link>\n <span>/</span>\n <strong>{{ currentTitle }}</strong>\n </div>\n <el-dropdown trigger=\"click\" @command=\"handleUserCommand\">\n <span class=\"user-entry\">\n <span class=\"avatar\">管</span>\n <span>{{ userName }}</span>\n <i class=\"el-icon-arrow-down\"></i>\n </span>\n <el-dropdown-menu slot=\"dropdown\">\n <el-dropdown-item command=\"logout\">退出登录</el-dropdown-item>\n </el-dropdown-menu>\n </el-dropdown>\n </header>\n <main class=\"content-area\">\n <router-view />\n </main>\n </section>\n </div>\n </div>\n</template>\n\n<script>\nexport default {\n name: \"App\",\n computed: {\n isLoginPage() {\n return this.#[[$route]]#.path === \"/login\"\n },\n currentTitle() {\n return this.#[[$route]]#.meta && this.#[[$route]]#.meta.title ? this.#[[$route]]#.meta.title : \"系统首页\"\n },\n userName() {\n const storedUser = window.localStorage.getItem(\"admin-user\")\n if (storedUser) {\n try {\n const user = JSON.parse(storedUser)\n return user.nickname || user.username || \"管理员\"\n } catch (e) {\n return \"管理员\"\n }\n }\n return window.localStorage.getItem(\"adminUserName\") || \"管理员\"\n }\n },\n methods: {\n isSidebarGroupActive(paths) {\n return Array.isArray(paths) && paths.indexOf(this.#[[$route]]#.path) !== -1\n },\n handleUserCommand(command) {\n if (command === \"logout\") {\n this.request.post(\"/auth/admin/logout\").finally(() => {\n this.clearAdminSession()\n this.#[[$router]]#.replace(\"/login\")\n })\n }\n },\n clearAdminSession() {\n window.localStorage.removeItem(\"admin-token\")\n window.localStorage.removeItem(\"admin-user\")\n }\n }\n}\n</script>\n\n<style>\n* {\n box-sizing: border-box;\n}\n\nbody {\n margin: 0;\n background: #f3f5fa;\n color: #303133;\n font-family: Helvetica Neue, Helvetica, PingFang SC, Hiragino Sans GB, Microsoft YaHei, Arial, sans-serif;\n}\n\na {\n text-decoration: none;\n}\n\n.admin-shell {\n min-height: 100vh;\n display: flex;\n background: #f3f5fa;\n}\n\n.admin-sidebar {\n width: 208px;\n min-height: 100vh;\n flex: 0 0 208px;\n overflow-y: auto;\n background: #0f172a;\n color: #d8e6f0;\n}\n\n.brand {\n height: 62px;\n padding: 0 16px;\n display: flex;\n align-items: center;\n gap: 10px;\n color: #fff;\n background: #111827;\n}\n\n.brand-mark {\n display: inline-grid;\n width: 36px;\n height: 36px;\n place-items: center;\n border-radius: 8px;\n color: #ffffff;\n background: #17633b;\n font-size: 12px;\n font-weight: 800;\n letter-spacing: 0;\n}\n\n.brand-text {\n min-width: 0;\n overflow: hidden;\n white-space: nowrap;\n text-overflow: ellipsis;\n font-size: 17px;\n font-weight: 700;\n}\n\n.sidebar-menu {\n padding: 10px 0 24px;\n}\n\n.sidebar-link,\n.menu-title {\n min-height: 44px;\n padding: 0 18px;\n display: flex;\n align-items: center;\n gap: 10px;\n color: #d8e6f0;\n font-size: 14px;\n}\n\n.menu-title {\n justify-content: space-between;\n background: #111f35;\n border-left: 3px solid transparent;\n}\n\n.menu-title-link {\n color: #d8e6f0;\n}\n\n.menu-title span {\n display: flex;\n align-items: center;\n gap: 10px;\n}\n\n.menu-title.active,\n.menu-title:hover,\n.sidebar-link:hover {\n color: #ffffff;\n background: #1e2f4d;\n}\n\n.sidebar-link.is-child {\n padding-left: 48px;\n background: #0b1220;\n}\n\n.sidebar-link.router-link-exact-active,\n.sidebar-link.router-link-active {\n background: #2563eb;\n color: #fff;\n}\n\n.admin-main {\n min-width: 0;\n flex: 1;\n}\n\n.topbar {\n height: 56px;\n padding: 0 18px;\n display: flex;\n align-items: center;\n justify-content: space-between;\n background: #ffffff;\n border-bottom: 1px solid #e5e7eb;\n color: #111827;\n}\n\n.breadcrumb {\n display: flex;\n align-items: center;\n gap: 10px;\n font-size: 14px;\n}\n\n.breadcrumb a,\n.breadcrumb strong {\n color: #111827;\n}\n\n.user-entry {\n display: inline-flex;\n align-items: center;\n gap: 8px;\n color: #334155;\n cursor: pointer;\n}\n\n.avatar {\n width: 32px;\n height: 32px;\n border-radius: 50%;\n display: inline-grid;\n place-items: center;\n color: #1d4ed8;\n background: #eff6ff;\n font-weight: 700;\n}\n\n.content-area {\n min-height: calc(100vh - 56px);\n padding: 8px 10px 28px;\n}\n</style>', 'admin', '2026-07-15 11:18:32', '', NULL);
INSERT INTO `sys_template_file` VALUES (920207, 9202, 'admin-router.js.vm', NULL, 'admin-router.js.vm', 'import Vue from \"vue\"\nimport Router from \"vue-router\"\nimport Login from \"@/views/login/index.vue\"\n#if($hasAdminRouteItems)\n#foreach($component in $adminRouteComponents)\nimport ${component.componentName} from \"${component.componentPath}\"\n#end\n#end\n\nVue.use(Router)\n\n#if($hasAdminRouteItems)\nconst firstPath = \"${defaultAdminPath}\"\n#else\nconst firstPath = \"/empty\"\nconst Empty = { template: \"<div class=\"empty-page\">暂无可管理数据</div>\" }\n#end\n\nconst routes = [\n {\n path: \"/login\",\n name: \"Login\",\n component: Login,\n meta: { title: \"登录\" }\n },\n {\n path: \"/\",\n redirect: firstPath\n }#if($hasAdminRouteItems)#else,\n {\n path: \"/empty\",\n name: \"Empty\",\n component: Empty,\n meta: { title: \"系统首页\" }\n }#end\n#foreach($item in $adminRouteItems),\n {\n path: \"${item.path}\",\n name: \"${item.code}\",\n component: ${item.componentName},\n meta: { title: \"${item.title}\" }\n }\n#end\n]\n\nconst router = new Router({\n mode: \"hash\",\n routes\n})\n\nrouter.beforeEach((to, from, next) => {\n const hasToken = Boolean(window.localStorage.getItem(\"admin-token\"))\n if (to.path !== \"/login\" && !hasToken) {\n next({ path: \"/login\", query: { redirect: to.fullPath } })\n return\n }\n if (to.path === \"/login\" && hasToken) {\n next(to.query.redirect || firstPath)\n return\n }\n next()\n})\n\nexport default router', 'admin', '2026-07-15 11:18:32', '', NULL);
INSERT INTO `sys_template_file` VALUES (920208, 9202, 'request.js.vm', NULL, 'request.js.vm', 'import axios from \"axios\"\nimport { Message } from \"element-ui\"\n\nconst request = axios.create({\n baseURL: process.env.VUE_APP_API_BASE_URL || \"/api\",\n timeout: 30000\n})\n\nrequest.interceptors.request.use(config => {\n const token = window.localStorage.getItem(\"admin-token\")\n if (token) {\n config.headers.Authorization = \"Bearer \" + token\n }\n return config\n})\n\nrequest.interceptors.response.use(\n response => {\n const data = response.data\n if (data && data.code === \"401\") {\n clearAdminSession()\n Message.error(data.msg || \"请先登录\")\n return Promise.reject(new Error(data.msg || \"Unauthorized\"))\n }\n return data\n },\n error => {\n if (error && error.response && error.response.status === 401) {\n clearAdminSession()\n Message.error(\"请先登录\")\n } else {\n Message.error(error && error.message ? error.message : \"请求失败\")\n }\n return Promise.reject(error)\n }\n)\n\nfunction clearAdminSession() {\n window.localStorage.removeItem(\"admin-token\")\n window.localStorage.removeItem(\"admin-user\")\n if (window.location.hash.indexOf(\"#/login\") !== 0) {\n window.location.hash = \"#/login\"\n }\n}\n\nexport default request\n', 'admin', '2026-07-15 11:18:32', '', NULL);
INSERT INTO `sys_template_file` VALUES (920209, 9202, 'dict.js.vm', NULL, 'dict.js.vm', 'const dictData = {}\r\n#foreach ($column in $columns)\r\n#if($column.dictOptions && $column.dictOptions != \"\")\r\n#set($dictKey = $column.dictType)\r\n#if(!$dictKey || $dictKey == \"\")\r\n#set($dictKey = $column.columnName)\r\n#end\r\ndictData[\"${dictKey}\"] = ${column.dictOptions}\r\n#end\r\n#end\r\n\r\nconst emptyDict = []\r\n\r\nfunction normalizeOptions(options) {\r\n if (!Array.isArray(options)) {\r\n return emptyDict\r\n }\r\n return options.map((option) => {\r\n const label = option.label || option.name || option.value\r\n const value = option.value || label\r\n return {\r\n ...option,\r\n label,\r\n name: option.name || label,\r\n value\r\n }\r\n })\r\n}\r\n\r\nexport default {\r\n getDictDataByType(type) {\r\n return normalizeOptions(dictData[type])\r\n },\r\n getDictLabel(type, value) {\r\n if (value === undefined || value === null || value === \"\") {\r\n return \"-\"\r\n }\r\n const matched = normalizeOptions(dictData[type]).find((option) => String(option.value) === String(value))\r\n return matched ? matched.label : value\r\n }\r\n}', 'admin', '2026-07-15 11:18:32', '', NULL);
INSERT INTO `sys_template_file` VALUES (920210, 9202, 'admin-index.vue.vm', NULL, 'admin-index.vue.vm', '#set($designed = $hasCurrentPageDesign)\n#set($queryColumns = $columns)\n#set($tableColumns = $columns)\n#set($formColumns = $columns)\n#set($showAdd = true)\n#set($showBatchDelete = true)\n#set($showView = false)\n#set($showEdit = true)\n#set($showDelete = true)\n#set($showExport = false)\n#set($showQuery = true)\n#set($showToolbar = true)\n#set($showForm = true)\n#set($showList = true)\n#set($renderForm = true)\n#if($designed)\n#set($queryColumns = $pageDesignQueryColumns)\n#set($tableColumns = $pageDesignTableColumns)\n#set($formColumns = $pageDesignFormColumns)\n#set($showAdd = $pageDesignAllowAdd)\n#set($showBatchDelete = $pageDesignAllowBatchDelete)\n#set($showView = $pageDesignAllowView)\n#set($showEdit = $pageDesignAllowEdit)\n#set($showDelete = $pageDesignAllowDelete)\n#set($showExport = $pageDesignAllowExport)\n#set($showQuery = $pageDesignShowQuery)\n#set($showToolbar = $pageDesignShowToolbar)\n#set($showForm = $pageDesignShowForm)\n#set($showList = $pageDesignShowList)\n#end\n#if(!$showToolbar)\n#set($showAdd = false)\n#set($showBatchDelete = false)\n#set($showExport = false)\n#end\n#set($renderForm = $showForm)\n<template>\n <div class=\"page-container\">\n#if($showQuery)\n <section class=\"query-panel\">\n <div class=\"toolbar query-toolbar\">\n#foreach ($column in $queryColumns)\n#set($renderQueryField = false)\n#if($designed)\n#set($renderQueryField = true)\n#elseif($column.isQuery == \"1\")\n#set($renderQueryField = true)\n#end\n#if($renderQueryField)\n#set($javaField=$column.javaField)\n#set($columnComment=$column.displayLabel)\n#set($remoteSelect=$qingRemoteSelectFields.contains($javaField))\n#if($column.htmlType == \"input\")\n <el-input class=\"filter-item\" placeholder=\"请输入${columnComment}\" clearable v-model=\"queryParams.${javaField}\" @keyup.enter.native=\"load\" />\n#elseif($column.htmlType == \"select\" || $column.htmlType == \"radio\")\n <el-select class=\"filter-item\" v-model=\"queryParams.${javaField}\" placeholder=\"请选择${columnComment}\" clearable>\n#if($remoteSelect)\n <el-option\n v-for=\"item in getSelectOptions(\'${javaField}\')\"\n :key=\"item.value\"\n :label=\"item.label\"\n :value=\"item.value\" />\n#else\n <el-option\n v-for=\"item in _dict.getDictDataByType(\'${column.dictType}\')\"\n :key=\"item.value\"\n :label=\"item.name\"\n :value=\"item.value\" />\n#end\n </el-select>\n#elseif($column.htmlType == \"datetime\")\n <el-date-picker class=\"filter-item\" v-model=\"queryParams.${javaField}\" type=\"date\" value-format=\"yyyy-MM-dd\" placeholder=\"选择${columnComment}\" />\n#end\n#end\n#end\n <el-button type=\"primary\" @click=\"load\">搜索</el-button>\n <el-button @click=\"reset\">重置</el-button>\n </div>\n </section>\n#end\n\n#if($showToolbar)\n <section class=\"action-panel\">\n <div class=\"toolbar action-toolbar\">\n#if($showAdd)\n <el-button type=\"primary\" icon=\"el-icon-plus\" @click=\"handleAdd\">新增</el-button>\n#end\n#if($showBatchDelete)\n <el-popconfirm\n confirm-button-text=\"确定\"\n cancel-button-text=\"取消\"\n icon=\"el-icon-info\"\n icon-color=\"red\"\n title=\"确定批量删除选中的数据吗?\"\n @confirm=\"delBatch\">\n <el-button slot=\"reference\" type=\"danger\" icon=\"el-icon-delete\">批量删除</el-button>\n </el-popconfirm>\n#end\n#if($showExport)\n <el-button icon=\"el-icon-download\" @click=\"handleExport\">导出</el-button>\n#end\n </div>\n </section>\n#end\n\n#if($showList)\n <section class=\"table-panel\">\n <el-table class=\"data-table\" :data=\"${businessName}List\" stripe @selection-change=\"handleSelectionChange\">\n#if($showBatchDelete)\n <el-table-column type=\"selection\" width=\"55\" />\n#end\n#if(!$designed)\n <el-table-column prop=\"${pkColumn.javaField}\" label=\"ID\" width=\"90\" />\n#end\n#foreach ($column in $tableColumns)\n#set($renderTableField = false)\n#if($designed)\n#set($renderTableField = true)\n#elseif($column.isList == \"1\")\n#set($renderTableField = true)\n#end\n#if($renderTableField)\n#set($javaField=$column.javaField)\n#set($columnComment=$column.displayLabel)\n#set($remoteSelect=$qingRemoteSelectFields.contains($javaField))\n#if($column.htmlType == \"datetime\")\n <el-table-column prop=\"${javaField}\" label=\"${columnComment}\" align=\"center\" width=\"180\" />\n#elseif($column.htmlType == \"imageUpload\")\n <el-table-column prop=\"${javaField}\" label=\"${columnComment}\" align=\"center\" width=\"110\">\n <template slot-scope=\"scope\">\n <el-image\n v-if=\"scope.row.${javaField}\"\n class=\"table-image\"\n :src=\"resolveResourceUrl(scope.row.${javaField})\"\n :preview-src-list=\"[resolveResourceUrl(scope.row.${javaField})]\" />\n <span v-else>-</span>\n </template>\n </el-table-column>\n#elseif($column.htmlType == \"select\" || $column.htmlType == \"radio\")\n <el-table-column prop=\"${javaField}\" label=\"${columnComment}\" align=\"center\">\n <template slot-scope=\"scope\">\n#if($remoteSelect)\n {{ getOptionLabel(\'${javaField}\', scope.row.${javaField}) }}\n#else\n {{ _dict.getDictLabel(\'${column.dictType}\', scope.row.${javaField}) }}\n#end\n </template>\n </el-table-column>\n#else\n <el-table-column prop=\"${javaField}\" label=\"${columnComment}\" align=\"center\" />\n#end\n#end\n#end\n#if($showView || $showEdit || $showDelete)\n <el-table-column label=\"操作\" width=\"230\" align=\"center\">\n <template slot-scope=\"scope\">\n#if($showView)\n <el-button class=\"row-action view-action\" type=\"info\" icon=\"el-icon-view\" circle @click=\"handleView(scope.row)\"></el-button>\n#end\n#if($showEdit)\n <el-button class=\"row-action edit-action\" type=\"primary\" icon=\"el-icon-edit\" circle @click=\"handleEdit(scope.row)\"></el-button>\n#end\n#if($showDelete)\n <el-popconfirm\n confirm-button-text=\"确定\"\n cancel-button-text=\"取消\"\n icon=\"el-icon-info\"\n icon-color=\"red\"\n title=\"确定删除这条数据吗?\"\n @confirm=\"del(scope.row.${pkColumn.javaField})\">\n <el-button slot=\"reference\" class=\"row-action delete-action\" type=\"danger\" icon=\"el-icon-delete\" circle></el-button>\n </el-popconfirm>\n#end\n </template>\n </el-table-column>\n#end\n </el-table>\n </section>\n\n <section class=\"pagination-panel\">\n <el-pagination\n class=\"pagination\"\n @size-change=\"handleSizeChange\"\n @current-change=\"handleCurrentChange\"\n :current-page=\"queryParams.pageNum\"\n :page-sizes=\"[10, 20, 50, 100]\"\n :page-size=\"queryParams.pageSize\"\n layout=\"total, sizes, prev, pager, next, jumper\"\n :total=\"total\" />\n </section>\n#end\n\n#if($renderForm)\n <el-dialog :title=\"viewing ? \'View ${functionName}\' : (form.${pkColumn.javaField} ? \'Edit ${functionName}\' : \'Create ${functionName}\')\" :visible.sync=\"dialogFormVisible\" width=\"520px\">\n <el-form ref=\"form\" :model=\"form\" label-width=\"110px\" size=\"small\" :disabled=\"viewing\">\n#foreach ($column in $formColumns)\n#set($renderFormField = false)\n#if($designed)\n#set($renderFormField = true)\n#elseif($column.isEdit == \"1\")\n#set($renderFormField = true)\n#end\n#if($renderFormField)\n#set($javaField=$column.javaField)\n#set($columnComment=$column.displayLabel)\n#set($remoteSelect=$qingRemoteSelectFields.contains($javaField))\n#set($autoIncrementField=$column.isIncrement == \"1\")\n <el-form-item#if($autoIncrementField) v-if=\"form.${javaField}\"#end label=\"${columnComment}\" prop=\"${javaField}\"#if($column.isRequired == \"1\" && !$autoIncrementField) :rules=\"[{ required: true, message: \'${columnComment}不能为空\', trigger: #if($column.htmlType == \"select\")\'change\'#else\'blur\'#end }]\"#end>\n#if($column.htmlType == \"input\")\n <el-input v-model=\"form.${javaField}\"#if($autoIncrementField) disabled#end placeholder=\"请输入${columnComment}\" />\n#elseif($column.htmlType == \"textarea\")\n <el-input v-model=\"form.${javaField}\"#if($autoIncrementField) disabled#end type=\"textarea\" placeholder=\"请输入${columnComment}\" />\n#elseif($column.htmlType == \"editor\")\n <quill-editor\n v-model=\"form.${javaField}\"\n class=\"rich-text-editor\"\n :disabled=\"viewing\"\n :options=\"{ placeholder: \'请输入${columnComment}\' }\" />\n#elseif($column.htmlType == \"select\" || $column.htmlType == \"radio\")\n <el-select v-model=\"form.${javaField}\" placeholder=\"请选择${columnComment}\" clearable>\n#if($remoteSelect)\n <el-option\n v-for=\"item in getSelectOptions(\'${javaField}\')\"\n :key=\"item.value\"\n :label=\"item.label\"\n :value=\"item.value\" />\n#else\n <el-option\n v-for=\"item in _dict.getDictDataByType(\'${column.dictType}\')\"\n :key=\"item.value\"\n :label=\"item.name\"\n :value=\"item.value\" />\n#end\n </el-select>\n#elseif($column.htmlType == \"datetime\")\n <el-date-picker v-model=\"form.${javaField}\" type=\"date\" value-format=\"yyyy-MM-dd\" placeholder=\"选择${columnComment}\" />\n#elseif($column.htmlType == \"imageUpload\")\n <el-upload\n class=\"avatar-uploader\"\n action=\"/api/files/upload\"\n :show-file-list=\"false\"\n :on-success=\"(res) => uploadSuccess(\'${javaField}\', res)\">\n <img v-if=\"form.${javaField}\" :src=\"resolveResourceUrl(form.${javaField})\" class=\"avatar\" />\n <i v-else class=\"el-icon-plus avatar-uploader-icon\"></i>\n </el-upload>\n#elseif($column.htmlType == \"fileUpload\")\n <el-upload\n action=\"/api/files/upload\"\n :on-success=\"(res) => uploadSuccess(\'${javaField}\', res)\">\n <el-button size=\"small\" type=\"primary\">点击上传</el-button>\n </el-upload>\n <div v-if=\"form.${javaField}\" class=\"file-link\">{{ form.${javaField} }}</div>\n#end\n </el-form-item>\n#end\n#end\n </el-form>\n <div slot=\"footer\" class=\"dialog-footer\">\n <el-button @click=\"dialogFormVisible = false\">取消</el-button>\n <el-button v-if=\"!viewing\" type=\"primary\" @click=\"save\">确定</el-button>\n </div>\n </el-dialog>\n#end\n </div>\n</template>\n\n<script>\nexport default {\n name: \"${BusinessName}\",\n data() {\n return {\n ${businessName}List: [],\n total: 0,\n queryParams: {\n pageNum: 1,\n pageSize: 10,\n#foreach ($column in $queryColumns)\n#set($renderQueryField = false)\n#if($designed)\n#set($renderQueryField = true)\n#elseif($column.isQuery == \"1\")\n#set($renderQueryField = true)\n#end\n#if($renderQueryField)\n ${column.javaField}: undefined,\n#end\n#end\n },\n form: {},\n viewing: false,\n dialogFormVisible: false,\n remoteOptionMap: {},\n remoteSelectConfig: {\n#foreach($remote in $qingRemoteSelects)\n ${remote.field}: {\n path: \"${remote.path}\",\n valueField: \"${remote.valueField}\",\n labelField: \"${remote.labelField}\"\n }#if($foreach.hasNext),#end\n#end\n },\n multipleSelection: []\n }\n },\n created() {\n this.loadRemoteOptions()\n this.load()\n },\n methods: {\n loadRemoteOptions() {\n Object.keys(this.remoteSelectConfig).forEach(field => {\n const config = this.remoteSelectConfig[field]\n this.request.get(config.path, {\n params: { pageNum: 1, pageSize: 999 }\n }).then(res => {\n const data = res.data || {}\n const records = Array.isArray(data) ? data : (data.records || [])\n const options = records.map(item => ({\n value: item[config.valueField],\n label: item[config.labelField]\n }))\n this.#[[$set]]#(this.remoteOptionMap, field, options)\n })\n })\n },\n getSelectOptions(field) {\n return this.remoteOptionMap[field] || []\n },\n getOptionLabel(field, value) {\n const option = this.getSelectOptions(field).find(item => String(item.value) === String(value))\n if (option) {\n return option.label\n }\n return value === undefined || value === null || value === \"\" ? \"-\" : value\n },\n load() {\n this.request.get(\"${requestPath}/page\", {\n params: this.queryParams\n }).then(res => {\n const page = res.data || {}\n this.${businessName}List = page.records || []\n this.total = page.total || 0\n })\n },\n save() {\n this.#[[$refs]]#.form.validate(valid => {\n if (!valid) {\n return\n }\n this.request.post(\"${requestPath}\", this.form).then(res => {\n if (res.code === \"200\") {\n this.#[[$message]]#.success(\"保存成功\")\n this.dialogFormVisible = false\n this.load()\n } else {\n this.#[[$message]]#.error(res.msg || \"保存失败\")\n }\n })\n })\n },\n handleAdd() {\n this.form = {}\n this.viewing = false\n this.dialogFormVisible = true\n this.#[[$nextTick]]#(() => this.#[[$refs]]#.form && this.#[[$refs]]#.form.clearValidate())\n },\n handleView(row) {\n this.form = JSON.parse(JSON.stringify(row))\n this.viewing = true\n this.dialogFormVisible = true\n },\n handleEdit(row) {\n this.form = JSON.parse(JSON.stringify(row))\n this.viewing = false\n this.dialogFormVisible = true\n this.#[[$nextTick]]#(() => this.#[[$refs]]#.form && this.#[[$refs]]#.form.clearValidate())\n },\n del(${pkColumn.javaField}) {\n this.request.delete(\"${requestPath}/\" + ${pkColumn.javaField}).then(res => {\n if (res.code === \"200\") {\n this.#[[$message]]#.success(\"删除成功\")\n this.load()\n } else {\n this.#[[$message]]#.error(res.msg || \"删除失败\")\n }\n })\n },\n handleSelectionChange(val) {\n this.multipleSelection = val\n },\n delBatch() {\n const ids = this.multipleSelection.map(item => item.${pkColumn.javaField})\n if (!ids.length) {\n this.#[[$message]]#.warning(\"请先选择要删除的数据\")\n return\n }\n this.request.post(\"${requestPath}/del/batch\", ids).then(res => {\n if (res.code === \"200\") {\n this.#[[$message]]#.success(\"批量删除成功\")\n this.load()\n } else {\n this.#[[$message]]#.error(res.msg || \"批量删除失败\")\n }\n })\n },\n handleExport() {\n window.open(\"${apiRequestPath}/export\", \"_blank\")\n },\n reset() {\n this.queryParams = {\n pageNum: 1,\n pageSize: 10\n }\n this.load()\n },\n handleSizeChange(pageSize) {\n this.queryParams.pageSize = pageSize\n this.load()\n },\n handleCurrentChange(pageNum) {\n this.queryParams.pageNum = pageNum\n this.load()\n },\n resolveResourceUrl(url) {\n if (!url) {\n return \"\"\n }\n if (url.indexOf(\"http://\") === 0 || url.indexOf(\"https://\") === 0 || url.indexOf(\"//\") === 0 || url.indexOf(\"data:\") === 0 || url.indexOf(\"blob:\") === 0) {\n return url\n }\n if (url.indexOf(\"/api/\") === 0) {\n return url\n }\n if (url.indexOf(\"/files/\") === 0) {\n return \"/api\" + url\n }\n return url\n },\n uploadSuccess(field, res) {\n if (res && res.code === \"200\" && res.data && res.data.url) {\n this.#[[$set]]#(this.form, field, res.data.url)\n } else {\n this.#[[$message]]#.error(\"上传失败,请重试\")\n }\n }\n }\n}\n</script>\n\n<style scoped>\n.page-container {\n min-height: calc(100vh - 72px);\n}\n\n.query-panel,\n.action-panel,\n.table-panel,\n.pagination-panel {\n margin-bottom: 8px;\n border: 1px solid #edf0f5;\n border-radius: 4px;\n background: #fff;\n box-shadow: 0 1px 8px rgba(26, 39, 56, .08);\n}\n\n.query-panel,\n.action-panel {\n padding: 12px 14px;\n}\n\n.table-panel {\n padding: 12px 12px 0;\n}\n\n.pagination-panel {\n padding: 10px 12px;\n}\n\n.toolbar {\n display: flex;\n flex-wrap: wrap;\n gap: 10px;\n align-items: center;\n}\n\n.query-toolbar .el-button--primary {\n border-color: #cde8f0;\n background: #eaf8fb;\n color: #158a9a;\n}\n\n.query-toolbar .el-button--default {\n border-color: #f6e6ba;\n background: #fff8e6;\n color: #c58600;\n}\n\n.action-toolbar .el-button--primary {\n border-color: #9cd4ed;\n background: #eefaff;\n color: #0d80bd;\n}\n\n.action-toolbar .el-button--danger {\n border-color: #f2c2c7;\n background: #fff3f4;\n color: #d64252;\n}\n\n.filter-item {\n width: 220px;\n}\n\n.data-table {\n width: 100%;\n color: #606266;\n font-size: 13px;\n}\n\n.data-table >>> th {\n height: 48px;\n background: #fff;\n color: #7d8794;\n font-weight: 600;\n}\n\n.data-table >>> td {\n height: 58px;\n border-color: #f0f2f5;\n}\n\n.data-table >>> .el-table__row--striped td {\n background: #fafafa;\n}\n\n.pagination {\n display: flex;\n justify-content: flex-start;\n}\n\n.row-action {\n width: 30px;\n height: 30px;\n padding: 0;\n border: 0;\n font-size: 14px;\n}\n\n.view-action {\n background: #6f7d90;\n}\n\n.edit-action {\n background: #0b7ec2;\n}\n\n.delete-action {\n margin-left: 10px;\n background: #e82f3d;\n}\n\n.table-image {\n width: 52px;\n height: 52px;\n border-radius: 4px;\n}\n\n.avatar-uploader .avatar {\n width: 96px;\n height: 96px;\n display: block;\n object-fit: cover;\n}\n\n.avatar-uploader-icon {\n width: 96px;\n height: 96px;\n line-height: 96px;\n border: 1px dashed #d9d9d9;\n border-radius: 4px;\n text-align: center;\n color: #8c939d;\n}\n\n.file-link {\n margin-top: 6px;\n color: #606266;\n word-break: break-all;\n}\n\n.rich-text-editor >>> .ql-editor {\n min-height: 160px;\n}\n</style>\n', 'admin', '2026-07-15 11:18:32', '', NULL);
INSERT INTO `sys_template_file` VALUES (920211, 9202, 'admin-login.vue.vm', NULL, 'admin-login.vue.vm', '<template>\n <div class=\"login-page\">\n <section class=\"login-visual\">\n <div class=\"login-brand\">\n <span class=\"brand-mark\">\n <i></i><i></i><i></i><i></i>\n </span>\n <span>${projectName}后台</span>\n </div>\n <h1>${projectName}</h1>\n <p>统一管理分类、内容、订单与用户数据</p>\n </section>\n <el-form ref=\"loginForm\" :model=\"form\" :rules=\"rules\" class=\"login-card\" @keyup.enter.native=\"handleLogin\">\n <h2>欢迎登录${projectName}后台</h2>\n <p>请输入管理员账号进入后台</p>\n <el-form-item prop=\"username\">\n <el-input v-model=\"form.username\" prefix-icon=\"el-icon-user\" placeholder=\"请输入账号\" />\n </el-form-item>\n <el-form-item prop=\"password\">\n <el-input v-model=\"form.password\" prefix-icon=\"el-icon-lock\" placeholder=\"请输入密码\" show-password />\n </el-form-item>\n <div class=\"login-options\">\n <el-checkbox v-model=\"form.remember\">记住账号</el-checkbox>\n </div>\n <el-button type=\"primary\" :loading=\"loading\" @click=\"handleLogin\">登录</el-button>\n </el-form>\n </div>\n</template>\n\n<script>\n#if($hasTables)\n#set($firstTable = $tables.get(0))\nconst defaultRedirect = \"${defaultAdminPath}\"\n#else\nconst defaultRedirect = \"/empty\"\n#end\n\nexport default {\n name: \"AdminLogin\",\n data() {\n return {\n loading: false,\n form: {\n username: window.localStorage.getItem(\"adminUserName\") || \"admin\",\n password: \"admin\",\n remember: true\n },\n rules: {\n username: [{ required: true, message: \"请输入账号\", trigger: \"blur\" }],\n password: [{ required: true, message: \"请输入密码\", trigger: \"blur\" }]\n }\n }\n },\n methods: {\n handleLogin() {\n this.#[[$refs]]#.loginForm.validate(valid => {\n if (!valid) {\n return\n }\n this.loading = true\n this.request.post(\"/auth/admin/login\", {\n username: this.form.username,\n password: this.form.password\n }).then(res => {\n if (!res || res.code !== \"200\" || !res.data || !res.data.token) {\n throw new Error((res && res.msg) || \"登录失败\")\n }\n window.localStorage.setItem(\"admin-token\", res.data.token)\n window.localStorage.setItem(\"admin-user\", JSON.stringify(res.data.user || {\n username: this.form.username,\n nickname: this.form.username\n }))\n if (this.form.remember) {\n window.localStorage.setItem(\"adminUserName\", this.form.username)\n } else {\n window.localStorage.removeItem(\"adminUserName\")\n }\n this.#[[$message]]#.success(\"登录成功\")\n this.#[[$router]]#.replace(this.#[[$route]]#.query.redirect || defaultRedirect)\n }).catch(error => {\n this.#[[$message]]#.error(error.message || \"登录失败\")\n }).finally(() => {\n this.loading = false\n })\n })\n }\n }\n}\n</script>\n\n<style scoped>\n.login-page {\n min-height: 100vh;\n display: grid;\n grid-template-columns: minmax(0, 1fr) 420px;\n background: #f3f5fa;\n}\n\n.login-visual {\n padding: 54px 64px;\n display: flex;\n flex-direction: column;\n justify-content: center;\n background: linear-gradient(135deg, #20a9b5 0%, #147a8f 48%, #001120 100%);\n color: #fff;\n}\n\n.login-brand {\n position: absolute;\n top: 32px;\n display: flex;\n align-items: center;\n gap: 12px;\n font-size: 20px;\n font-weight: 700;\n}\n\n.brand-mark {\n width: 30px;\n height: 30px;\n display: grid;\n grid-template-columns: repeat(2, 1fr);\n gap: 3px;\n transform: rotate(45deg);\n}\n\n.brand-mark i {\n display: block;\n border-radius: 2px;\n}\n\n.brand-mark i:nth-child(1) {\n background: #f4c542;\n}\n\n.brand-mark i:nth-child(2) {\n background: #22b8cf;\n}\n\n.brand-mark i:nth-child(3) {\n background: #2f80ed;\n}\n\n.brand-mark i:nth-child(4) {\n background: #42c77b;\n}\n\n.login-visual h1 {\n margin: 0;\n font-size: 46px;\n font-weight: 700;\n letter-spacing: 0;\n}\n\n.login-visual p {\n max-width: 520px;\n margin: 16px 0 0;\n color: rgba(255, 255, 255, .82);\n font-size: 18px;\n}\n\n.login-card {\n align-self: center;\n margin: 0 48px 0 0;\n padding: 36px 34px;\n border-radius: 8px;\n background: #fff;\n box-shadow: 0 18px 42px rgba(0, 17, 32, .16);\n}\n\n.login-card h2 {\n margin: 0;\n color: #17233d;\n font-size: 25px;\n font-weight: 700;\n letter-spacing: 0;\n}\n\n.login-card p {\n margin: 8px 0 24px;\n color: #8a95a6;\n}\n\n.login-options {\n margin: -4px 0 18px;\n}\n\n.login-card .el-button {\n width: 100%;\n height: 42px;\n border-color: #0f7dbd;\n background: #0f7dbd;\n}\n\n@media (max-width: 900px) {\n .login-page {\n grid-template-columns: 1fr;\n }\n\n .login-visual {\n min-height: 220px;\n padding: 36px 28px;\n }\n\n .login-brand {\n position: static;\n margin-bottom: 48px;\n }\n\n .login-visual h1 {\n font-size: 34px;\n }\n\n .login-card {\n margin: 24px;\n }\n}\n</style>\n', 'admin', '2026-07-15 11:18:32', '', NULL);
INSERT INTO `sys_template_file` VALUES (920301, 9203, 'package.json.vm', NULL, 'package.json.vm', '{\n \"name\": \"${projectFileName}-web\",\n \"version\": \"1.0.0\",\n \"private\": true,\n \"scripts\": {\n \"dev\": \"vue-cli-service serve --host 0.0.0.0\",\n \"serve\": \"vue-cli-service serve --host 0.0.0.0\",\n \"build\": \"vue-cli-service build\"\n },\n \"dependencies\": {\n \"axios\": \"^0.27.2\",\n \"core-js\": \"^3.8.3\",\n \"echarts\": \"5.4.0\",\n \"element-ui\": \"^2.15.14\",\n \"quill\": \"^1.3.7\",\n \"vue\": \"^2.6.14\",\n \"vue-quill-editor\": \"^3.0.6\",\n \"vue-router\": \"^3.6.5\"\n },\n \"devDependencies\": {\n \"@vue/cli-service\": \"^4.5.19\",\n \"vue-template-compiler\": \"^2.6.14\"\n }\n}\n', 'admin', '2026-07-15 11:18:32', '', NULL);
INSERT INTO `sys_template_file` VALUES (920302, 9203, 'babel.config.js.vm', NULL, 'babel.config.js.vm', 'module.exports = {\n presets: [\n \"@vue/cli-plugin-babel/preset\"\n ]\n}\n', 'admin', '2026-07-15 11:18:32', '', NULL);
INSERT INTO `sys_template_file` VALUES (920303, 9203, 'vue.config.js.vm', NULL, 'vue.config.js.vm', 'const port = process.env.PORT || 8082\nconst apiBaseUrl = process.env.VUE_APP_API_BASE_URL || \"http://localhost:8080\"\n\nmodule.exports = {\n transpileDependencies: [],\n devServer: {\n port,\n proxy: {\n \"/api\": {\n target: apiBaseUrl,\n changeOrigin: true,\n pathRewrite: {\n \"^/api\": \"\"\n }\n }\n }\n }\n}\n', 'admin', '2026-07-15 11:18:32', '', NULL);
INSERT INTO `sys_template_file` VALUES (920304, 9203, 'index.html.vm', NULL, 'index.html.vm', '<!doctype html>\n<html lang=\"zh-CN\">\n<head>\n <meta charset=\"utf-8\">\n <meta http-equiv=\"X-UA-Compatible\" content=\"IE=edge\">\n <meta name=\"viewport\" content=\"width=device-width,initial-scale=1.0\">\n <title>${functionName}</title>\n</head>\n<body>\n <noscript>请启用 JavaScript 后访问。</noscript>\n <div id=\"app\"></div>\n</body>\n</html>\n', 'admin', '2026-07-15 11:18:32', '', NULL);
INSERT INTO `sys_template_file` VALUES (920305, 9203, 'frontend-main.js.vm', NULL, 'frontend-main.js.vm', 'import Vue from \"vue\"\nimport ElementUI from \"element-ui\"\nimport VueQuillEditor from \"vue-quill-editor\"\nimport \"element-ui/lib/theme-chalk/index.css\"\nimport \"quill/dist/quill.core.css\"\nimport \"quill/dist/quill.snow.css\"\nimport App from \"./App.vue\"\nimport router from \"./router\"\nimport request from \"./api/request\"\nimport dict from \"./utils/dict\"\nimport \"./style.css\"\n\nVue.config.productionTip = false\nVue.use(ElementUI)\nVue.use(VueQuillEditor)\nVue.prototype.request = request\nVue.prototype._dict = dict\n\nnew Vue({\n router,\n render: h => h(App)\n}).#[[$mount]]#(\"#app\")', 'admin', '2026-07-15 11:18:32', '', NULL);
INSERT INTO `sys_template_file` VALUES (920306, 9203, 'frontend-App.vue.vm', NULL, 'frontend-App.vue.vm', '#set($portalProjectName = $projectName)\n#if(!$portalProjectName || $portalProjectName == \"\")\n#set($portalProjectName = $functionName)\n#end\n#if(!$portalProjectName || $portalProjectName == \"\")\n#set($portalProjectName = \"Portal\")\n#end\n#set($portalHomePath = $defaultFrontendPath)\n#if(!$portalHomePath || $portalHomePath == \"\")\n#set($portalHomePath = $requestPath)\n#end\n<template>\n <div class=\"portal-shell\">\n <template v-if=\"!isLoginRoute\">\n <header class=\"top-nav\">\n <router-link class=\"brand\" to=\"${portalHomePath}\">\n <span class=\"brand-logo\" aria-hidden=\"true\"><i></i></span>\n <span>${portalProjectName}</span>\n </router-link>\n\n <nav class=\"portal-nav\" aria-label=\"主导航\">\n#if($hasFrontendNavGroups)\n#foreach($group in $frontendNavGroups)\n <div v-if=\'canShowMenu(${group.visibleRolesLiteral})\' class=\"portal-nav-group#if($group.hasChildren) has-children#end\" :class=\'{ active: isNavGroupActive(${group.activePathsLiteral}) }\'>\n#if($group.clickable)\n <router-link class=\"portal-nav-parent\" to=\"${group.path}\" exact>${group.name}</router-link>\n#else\n <span class=\"portal-nav-parent portal-nav-directory\">${group.name}</span>\n#end\n#if($group.hasChildren)\n <button class=\"portal-nav-toggle\" type=\"button\" aria-label=\"展开子菜单\">⌄</button>\n <div class=\"portal-nav-dropdown\">\n#foreach($child in $group.children)\n <router-link v-if=\'canShowMenu(${child.visibleRolesLiteral})\' class=\"portal-nav-child\" to=\"${child.path}\" exact>${child.name}</router-link>\n#end\n </div>\n#end\n </div>\n#end\n#else\n <div class=\"portal-nav-group\">\n <router-link class=\"portal-nav-parent\" to=\"${portalHomePath}\" exact>首页</router-link>\n </div>\n#end\n </nav>\n\n <div class=\"user-area\">\n <template v-if=\"currentUser\">\n <button class=\"user-chip\" type=\"button\">\n <span class=\"avatar\">{{ userInitial }}</span>\n <span>{{ currentUserName }}</span>\n </button>\n <button class=\"logout-link\" type=\"button\" @click=\"logout\">退出</button>\n </template>\n <button v-else class=\"login-link\" type=\"button\" @click=\"goLogin\">登录</button>\n </div>\n </header>\n\n <section v-if=\"isHomeRoute\" class=\"hero-banner\" aria-label=\"项目横幅\">\n <div class=\"hero-pattern\" aria-hidden=\"true\"></div>\n <div class=\"hero-content\">\n <span class=\"hero-eyebrow\">WELCOME</span>\n <h1>${portalProjectName}</h1>\n <p>发现内容,连接服务,轻松完成每一次访问。</p>\n </div>\n </section>\n </template>\n\n <main :class=\"[\'portal-main\', { \'portal-main-login\': isLoginRoute }]\">\n <router-view />\n </main>\n </div>\n</template>\n\n<script>\nexport default {\n name: \"App\",\n data() {\n return {\n currentUser: null\n }\n },\n computed: {\n isLoginRoute() {\n return this.#[[$route]]#.path === \"/login\"\n },\n isHomeRoute() {\n return this.#[[$route]]#.path === \"${portalHomePath}\"\n },\n currentUserName() {\n return this.currentUser && (this.currentUser.displayName || this.currentUser.account || this.currentUser.nickname || this.currentUser.username || \"User\")\n },\n userInitial() {\n const name = this.currentUserName || \"U\"\n return name.slice(0, 1).toUpperCase()\n }\n },\n mounted() {\n this.loadUser()\n window.addEventListener(\"portal-user-change\", this.loadUser)\n },\n beforeDestroy() {\n window.removeEventListener(\"portal-user-change\", this.loadUser)\n },\n methods: {\n canShowMenu(visibleRoles) {\n if (!Array.isArray(visibleRoles) || visibleRoles.length === 0) {\n return true\n }\n const roleCode = this.currentUser && this.currentUser.roleCode\n return Boolean(roleCode) && visibleRoles.indexOf(roleCode) !== -1\n },\n isNavGroupActive(paths) {\n return Array.isArray(paths) && paths.indexOf(this.#[[$route]]#.path) !== -1\n },\n loadUser() {\n const raw = localStorage.getItem(\"portal-user\")\n if (!raw) {\n this.currentUser = null\n return\n }\n try {\n this.currentUser = JSON.parse(raw)\n } catch (error) {\n localStorage.removeItem(\"portal-user\")\n this.currentUser = null\n }\n },\n goLogin() {\n this.#[[$router]]#.push({\n path: \"/login\",\n query: { redirect: this.#[[$route]]#.fullPath }\n })\n },\n logout() {\n this.request.post(\"/auth/logout\").catch(() => {})\n localStorage.removeItem(\"portal-token\")\n localStorage.removeItem(\"portal-user\")\n window.dispatchEvent(new Event(\"portal-user-change\"))\n this.#[[$router]]#.push(\"/login\")\n }\n }\n}\n</script>\n\n<style>\n:root {\n --portal-primary: #167d83;\n --portal-primary-strong: #11656a;\n --portal-primary-soft: #eaf7f7;\n --portal-accent: #2f72d6;\n --portal-text: #172033;\n --portal-text-secondary: #5f6b7a;\n --portal-border: #e3e9f1;\n --portal-surface: #ffffff;\n --portal-background: #f5f7fb;\n --portal-radius-sm: 8px;\n --portal-radius-md: 12px;\n --portal-radius-lg: 18px;\n --portal-shadow-sm: 0 8px 24px rgba(15, 23, 42, 0.06);\n --portal-shadow-md: 0 18px 44px rgba(15, 23, 42, 0.12);\n --portal-content-width: 1200px;\n}\n\n* {\n box-sizing: border-box;\n}\n\nbody {\n margin: 0;\n background: var(--portal-background);\n color: var(--portal-text);\n font-family: Helvetica Neue, Helvetica, PingFang SC, Hiragino Sans GB, Microsoft YaHei, Arial, sans-serif;\n line-height: 1.5;\n -webkit-font-smoothing: antialiased;\n}\n\na {\n color: inherit;\n text-decoration: none;\n}\n\nbutton {\n font: inherit;\n}\n\nbutton:focus-visible,\na:focus-visible {\n outline: 3px solid rgba(47, 114, 214, 0.28);\n outline-offset: 2px;\n}\n\n.portal-shell {\n min-height: 100vh;\n background: var(--portal-background);\n}\n\n.top-nav {\n position: sticky;\n top: 0;\n z-index: 20;\n display: grid;\n grid-template-columns: minmax(180px, auto) minmax(0, 1fr) auto;\n align-items: center;\n gap: 24px;\n min-height: 72px;\n padding: 0 32px;\n color: var(--portal-text);\n background: rgba(255, 255, 255, 0.96);\n border-bottom: 1px solid var(--portal-border);\n box-shadow: 0 4px 16px rgba(15, 23, 42, 0.04);\n backdrop-filter: blur(14px);\n}\n\n.brand,\n.portal-nav,\n.user-area,\n.user-chip {\n display: inline-flex;\n align-items: center;\n}\n\n.brand {\n gap: 10px;\n min-width: 0;\n font-size: 18px;\n font-weight: 700;\n}\n\n.brand span:last-child {\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n}\n\n.brand-logo {\n position: relative;\n display: inline-block;\n width: 38px;\n height: 38px;\n flex: 0 0 38px;\n place-items: center;\n overflow: hidden;\n border-radius: 11px;\n color: #ffffff;\n background: linear-gradient(135deg, var(--portal-primary), var(--portal-accent));\n box-shadow: 0 7px 18px rgba(22, 125, 131, 0.24);\n}\n\n.brand-logo::before,\n.brand-logo::after,\n.brand-logo i {\n position: absolute;\n display: block;\n content: \"\";\n border-radius: 999px;\n background: rgba(255, 255, 255, 0.92);\n transform: rotate(-35deg);\n}\n\n.brand-logo::before {\n width: 20px;\n height: 7px;\n top: 9px;\n left: 7px;\n}\n\n.brand-logo i {\n width: 15px;\n height: 6px;\n top: 17px;\n left: 11px;\n}\n\n.brand-logo::after {\n width: 10px;\n height: 5px;\n top: 25px;\n left: 15px;\n}\n\n.portal-nav {\n justify-content: center;\n gap: 8px;\n min-width: 0;\n height: 100%;\n overflow: visible;\n}\n\n.portal-nav-group {\n position: relative;\n display: inline-flex;\n align-items: center;\n flex: 0 0 auto;\n min-height: 72px;\n}\n\n.portal-nav-parent,\n.portal-nav-toggle,\n.portal-nav-child {\n display: inline-flex;\n align-items: center;\n border: 0;\n background: transparent;\n font: inherit;\n cursor: pointer;\n}\n\n.portal-nav-parent {\n min-height: 36px;\n padding: 0 14px;\n border-radius: var(--portal-radius-sm);\n color: var(--portal-text);\n font-size: 15px;\n font-weight: 600;\n white-space: nowrap;\n}\n\n.portal-nav-parent:hover,\n.portal-nav-parent.router-link-active,\n.portal-nav-group.active .portal-nav-parent {\n color: var(--portal-primary-strong);\n background: var(--portal-primary-soft);\n}\n\n.portal-nav-directory {\n cursor: default;\n}\n\n.portal-nav-toggle {\n justify-content: center;\n width: 28px;\n height: 28px;\n margin-left: -8px;\n border-radius: 6px;\n color: #64748b;\n}\n\n.portal-nav-group:hover .portal-nav-toggle,\n.portal-nav-group:focus-within .portal-nav-toggle,\n.portal-nav-group.active .portal-nav-toggle {\n color: var(--portal-primary-strong);\n background: var(--portal-primary-soft);\n}\n\n.portal-nav-dropdown {\n position: absolute;\n top: calc(100% - 8px);\n left: 0;\n z-index: 30;\n display: none;\n min-width: 168px;\n padding: 8px;\n border: 1px solid var(--portal-border);\n border-radius: var(--portal-radius-md);\n background: var(--portal-surface);\n box-shadow: var(--portal-shadow-md);\n}\n\n.portal-nav-group:hover .portal-nav-dropdown,\n.portal-nav-group:focus-within .portal-nav-dropdown {\n display: grid;\n gap: 4px;\n}\n\n.portal-nav-child {\n min-height: 34px;\n padding: 0 10px;\n border-radius: 6px;\n color: #334155;\n font-size: 14px;\n white-space: nowrap;\n}\n\n.portal-nav-child:hover,\n.portal-nav-child.router-link-active {\n color: var(--portal-primary-strong);\n background: var(--portal-primary-soft);\n}\n\n.user-area {\n justify-content: flex-end;\n gap: 10px;\n min-width: 130px;\n}\n\n.user-chip,\n.login-link,\n.logout-link {\n border: 1px solid var(--portal-border);\n color: var(--portal-text-secondary);\n background: var(--portal-surface);\n cursor: pointer;\n}\n\n.user-chip {\n gap: 8px;\n min-height: 38px;\n padding: 0 10px 0 0;\n border-radius: 999px;\n}\n\n.avatar {\n display: inline-grid;\n width: 36px;\n height: 36px;\n place-items: center;\n border: 1px solid #bfe4e5;\n border-radius: 50%;\n color: var(--portal-primary-strong);\n background: var(--portal-primary-soft);\n font-weight: 700;\n}\n\n.logout-link,\n.login-link {\n min-height: 32px;\n padding: 0 10px;\n border-radius: var(--portal-radius-sm);\n}\n\n.logout-link:hover,\n.login-link:hover {\n color: var(--portal-primary-strong);\n background: var(--portal-primary-soft);\n}\n\n.hero-banner {\n position: relative;\n display: grid;\n min-height: 228px;\n place-items: center;\n overflow: hidden;\n background: linear-gradient(132deg, var(--portal-primary), var(--portal-accent));\n}\n\n.hero-pattern {\n position: absolute;\n inset: 0;\n opacity: 0.58;\n background:\n linear-gradient(42deg, transparent 0 18%, rgba(255, 255, 255, 0.18) 18% 27%, transparent 27% 100%),\n linear-gradient(132deg, transparent 0 48%, rgba(246, 186, 51, 0.32) 48% 55%, transparent 55% 100%);\n}\n\n.hero-content {\n position: relative;\n z-index: 1;\n width: min(var(--portal-content-width), calc(100% - 48px));\n margin: 0 auto;\n text-align: left;\n}\n\n.hero-eyebrow {\n display: inline-block;\n margin-bottom: 12px;\n color: rgba(255, 255, 255, 0.78);\n font-size: 12px;\n font-weight: 700;\n letter-spacing: 0.18em;\n}\n\n.hero-banner h1 {\n max-width: 780px;\n margin: 0;\n color: #ffffff;\n font-size: clamp(34px, 4vw, 48px);\n font-weight: 700;\n letter-spacing: 0;\n line-height: 1.2;\n text-shadow: 0 12px 28px rgba(15, 23, 42, 0.22);\n}\n\n.hero-banner p {\n max-width: 620px;\n margin: 14px 0 0;\n color: rgba(255, 255, 255, 0.86);\n font-size: 16px;\n}\n\n.portal-main {\n width: min(var(--portal-content-width), calc(100% - 48px));\n margin: 0 auto;\n padding: 32px 0 52px;\n}\n\n.portal-main-login {\n width: 100%;\n min-height: 100vh;\n margin: 0;\n padding: 0;\n}\n\n@media (max-width: 900px) {\n .top-nav {\n grid-template-columns: 1fr auto;\n gap: 10px;\n height: auto;\n min-height: 56px;\n padding: 10px 16px;\n }\n\n .portal-nav {\n grid-column: 1 / -1;\n justify-content: flex-start;\n order: 3;\n gap: 6px;\n overflow-x: auto;\n overflow-y: visible;\n }\n\n .portal-nav-group {\n min-height: 38px;\n }\n\n .portal-nav-parent {\n min-height: 34px;\n padding: 0 12px;\n }\n\n .portal-nav-dropdown {\n position: fixed;\n top: 104px;\n left: 16px;\n right: 16px;\n }\n\n .hero-banner {\n min-height: 176px;\n }\n\n .hero-content {\n width: min(100% - 32px, var(--portal-content-width));\n }\n\n .hero-banner p {\n margin-top: 10px;\n font-size: 14px;\n }\n\n .portal-main {\n width: min(calc(100% - 28px), var(--portal-content-width));\n padding: 22px 0 36px;\n }\n}\n\n@media (max-width: 560px) {\n .brand {\n max-width: calc(100vw - 150px);\n }\n\n .brand span:last-child {\n font-size: 16px;\n }\n\n .user-area {\n min-width: 0;\n }\n\n .user-chip > span:last-child {\n display: none;\n }\n\n .hero-banner {\n min-height: 160px;\n }\n\n .hero-eyebrow {\n margin-bottom: 8px;\n }\n}\n</style>\n', 'admin', '2026-07-15 11:18:32', '', NULL);
INSERT INTO `sys_template_file` VALUES (920307, 9203, 'style.css.vm', NULL, 'style.css.vm', 'body {\n margin: 0;\n background: #f6f7fb;\n color: #1f2937;\n font-family: Helvetica Neue, Helvetica, PingFang SC, Hiragino Sans GB, Microsoft YaHei, Arial, sans-serif;\n}\n\n.el-button {\n border-radius: 4px;\n}', 'admin', '2026-07-15 11:18:32', '', NULL);
INSERT INTO `sys_template_file` VALUES (920308, 9203, 'frontend-router.js.vm', NULL, 'frontend-router.js.vm', 'import Vue from \"vue\"\nimport Router from \"vue-router\"\nimport Login from \"@/views/login/index.vue\"\n#set($portalDefaultPath = $defaultFrontendPath)\n#if(!$portalDefaultPath || $portalDefaultPath == \"\")\n#set($portalDefaultPath = $requestPath)\n#end\n#if($hasFrontendRouteItems)\n#foreach($component in $frontendRouteComponents)\nimport ${component.componentName} from \"${component.componentPath}\"\n#end\n#else\nimport ${BusinessName} from \"@/views/${viewPath}/index.vue\"\n#end\n\nVue.use(Router)\n\nconst router = new Router({\n mode: \"hash\",\n routes: [\n {\n path: \"/\",\n redirect: \"${portalDefaultPath}\"\n },\n {\n path: \"/login\",\n name: \"Login\",\n component: Login\n },\n#if($hasFrontendRouteItems)\n#foreach($item in $frontendRouteItems)\n {\n path: \"${item.path}\",\n name: \"${item.code}\",\n component: ${item.componentName},\n meta: { requiresAuth: ${item.requiresLogin} }\n }#if($foreach.hasNext),#end\n#end\n#else\n {\n path: \"${requestPath}\",\n name: \"${BusinessName}\",\n component: ${BusinessName},\n meta: { requiresAuth: true }\n }\n#end\n ]\n})\n\nrouter.beforeEach((to, from, next) => {\n const requiresAuth = to.matched.some(record => record.meta && record.meta.requiresAuth)\n const hasToken = Boolean(localStorage.getItem(\"portal-token\"))\n\n if (requiresAuth && !hasToken) {\n next({\n path: \"/login\",\n query: { redirect: to.fullPath }\n })\n return\n }\n\n next()\n})\n\nexport default router\n', 'admin', '2026-07-15 11:18:32', '', NULL);
INSERT INTO `sys_template_file` VALUES (920309, 9203, 'frontend-request.js.vm', NULL, 'frontend-request.js.vm', 'import axios from \"axios\"\nimport { Message } from \"element-ui\"\n\nconst request = axios.create({\n baseURL: process.env.VUE_APP_API_BASE_URL || \"/api\",\n timeout: 30000\n})\n\nrequest.interceptors.request.use(config => {\n const token = localStorage.getItem(\"portal-token\")\n if (token) {\n config.headers.Authorization = \"Bearer \" + token\n }\n return config\n})\n\nrequest.interceptors.response.use(\n response => {\n const data = response.data\n if (data && data.code === \"401\") {\n clearSession()\n Message.error(data.msg || \"请先登录\")\n return Promise.reject(new Error(data.msg || \"Unauthorized\"))\n }\n return data\n },\n error => {\n if (error && error.response && error.response.status === 401) {\n clearSession()\n Message.error(\"请先登录\")\n } else {\n Message.error(error && error.message ? error.message : \"请求失败\")\n }\n return Promise.reject(error)\n }\n)\n\nfunction clearSession() {\n localStorage.removeItem(\"portal-token\")\n localStorage.removeItem(\"portal-user\")\n if (window.location.hash.indexOf(\"#/login\") !== 0) {\n window.location.hash = \"#/login\"\n }\n}\n\nexport default request\n', 'admin', '2026-07-15 11:18:32', '', NULL);
INSERT INTO `sys_template_file` VALUES (920310, 9203, 'frontend-api.js.vm', NULL, 'frontend-api.js.vm', 'import request from \"./request\"\n\nexport function list${ClassName}(query) {\n return request({\n url: \"${requestPath}/page\",\n method: \"get\",\n params: query\n })\n}\n\nexport function get${ClassName}(${pkColumn.javaField}) {\n return request({\n url: \"${requestPath}/\" + ${pkColumn.javaField},\n method: \"get\"\n })\n}', 'admin', '2026-07-15 11:18:32', '', NULL);
INSERT INTO `sys_template_file` VALUES (920311, 9203, 'frontend-index.vue.vm', NULL, 'frontend-index.vue.vm', '<template>\n#set($designed = $hasCurrentFrontendPageDesign)\n#set($frontendReadOnlyDefaults = true)\n#set($queryColumns = $columns)\n#set($tableColumns = $columns)\n#set($formColumns = $columns)\n#set($cardColumns = $columns)\n#set($cardTitleColumn = false)\n#set($cardImageColumn = false)\n#set($showAdd = false)\n#set($showBatchDelete = false)\n#set($showView = true)\n#set($showEdit = false)\n#set($showDelete = false)\n#set($isCardListLayout = false)\n#set($isSplitListLayout = false)\n#set($showQuery = false)\n#set($showToolbar = true)\n#set($showForm = true)\n#set($showList = true)\n#set($showDetail = true)\n#set($renderForm = true)\n#set($currentUserOnly = false)\n#set($isDetailPage = $pageDesignIsDetail)\n#set($isFormPage = $pageDesignIsForm)\n#set($isGroupedForm = $pageDesignIsGroupedForm)\n#set($formGroups = $pageDesignFormGroups)\n#set($isMediaDetailLayout = false)\n#set($detailColumns = $columns)\n#set($detailTitleColumn = false)\n#set($detailImageColumn = false)\n#set($detailSummaryColumn = false)\n#set($toolbarBusinessActions = $pageDesignToolbarBusinessActions)\n#set($rowBusinessActions = $pageDesignRowBusinessActions)\n#set($formBusinessActions = $pageDesignFormBusinessActions)\n#set($allPageBusinessActions = $pageDesignBusinessActions)\n#set($hasToolbarBusinessActions = $hasPageDesignToolbarBusinessActions)\n#set($hasRowBusinessActions = $hasPageDesignRowBusinessActions)\n#set($hasFormBusinessActions = $hasPageDesignFormBusinessActions)\n#set($topBusinessBlocks = $pageDesignTopBusinessBlocks)\n#set($bottomBusinessBlocks = $pageDesignBottomBusinessBlocks)\n#set($embeddedBusinessBlocks = $pageDesignEmbeddedBusinessBlocks)\n#if($designed)\n#set($queryColumns = $pageDesignQueryColumns)\n#set($tableColumns = $pageDesignTableColumns)\n#set($formColumns = $pageDesignFormColumns)\n#set($cardColumns = $pageDesignCardColumns)\n#set($cardTitleColumn = $pageDesignCardTitleColumn)\n#set($cardImageColumn = $pageDesignCardImageColumn)\n#set($showAdd = $pageDesignAllowAdd)\n#set($showBatchDelete = $pageDesignAllowBatchDelete)\n#set($showView = $pageDesignAllowView)\n#set($showEdit = $pageDesignAllowEdit)\n#set($showDelete = $pageDesignAllowDelete)\n#set($isCardListLayout = $pageDesignIsCardList)\n#set($isSplitListLayout = $pageDesignIsSplitList)\n#set($showQuery = $pageDesignShowQuery)\n#set($showToolbar = $pageDesignShowToolbar)\n#set($showForm = $pageDesignShowForm)\n#set($showList = $pageDesignShowList)\n#set($showDetail = $pageDesignShowDetail)\n#set($currentUserOnly = $pageDesignIsCurrentUserList)\n#set($isMediaDetailLayout = $pageDesignIsMediaDetail)\n#set($detailColumns = $pageDesignDetailColumns)\n#set($detailTitleColumn = $pageDesignDetailTitleColumn)\n#set($detailImageColumn = $pageDesignDetailImageColumn)\n#set($detailSummaryColumn = $pageDesignDetailSummaryColumn)\n#end\n#if(!$showToolbar)\n#set($showAdd = false)\n#set($showBatchDelete = false)\n#end\n#if(!$queryColumns || $queryColumns.size() == 0)\n#set($showQuery = false)\n#end\n\n#if($isDetailPage)\n#set($showQuery = false)\n#set($showToolbar = false)\n#set($showAdd = false)\n#set($showBatchDelete = false)\n#set($showView = false)\n#set($showEdit = false)\n#set($showDelete = false)\n#set($showForm = false)\n#set($renderForm = false)\n#end\n#if($showForm && !$isFormPage)\n#set($renderForm = true)\n#else\n#set($renderForm = false)\n#end\n#macro(renderPageFormField $column)\n#set($javaField=$column.javaField)\n#set($columnComment=$column.displayLabel)\n#set($remoteSelect=$qingRemoteSelectFields.contains($javaField))\n#set($autoIncrementField=$column.isIncrement == \"1\")\n <el-form-item#if($autoIncrementField) v-if=\"form.${javaField}\"#end label=\"${columnComment}\" prop=\"${javaField}\"#if($column.isRequired == \"1\" && !$autoIncrementField) :rules=\"[{ required: true, message: \'${columnComment}不能为空\', trigger: #if($column.htmlType == \"select\")\'change\'#else\'blur\'#end }]\"#end>\n#if($column.htmlType == \"input\")\n <el-input v-model=\"form.${javaField}\"#if($autoIncrementField) disabled#end placeholder=\"请输入${columnComment}\" />\n#elseif($column.htmlType == \"textarea\")\n <el-input v-model=\"form.${javaField}\" type=\"textarea\" :rows=\"4\" placeholder=\"请输入${columnComment}\" />\n#elseif($column.htmlType == \"editor\")\n <quill-editor\n v-model=\"form.${javaField}\"\n class=\"rich-text-editor\"\n :disabled=\"viewing\"\n :options=\"{ placeholder: \'请输入${columnComment}\' }\" />\n#elseif($column.htmlType == \"select\" || $column.htmlType == \"radio\")\n <el-select v-model=\"form.${javaField}\" placeholder=\"请选择${columnComment}\" clearable>\n#if($remoteSelect)\n <el-option v-for=\"item in getSelectOptions(\'${javaField}\')\" :key=\"item.value\" :label=\"item.label\" :value=\"item.value\" />\n#else\n <el-option v-for=\"item in _dict.getDictDataByType(\'${column.dictType}\')\" :key=\"item.value\" :label=\"item.name\" :value=\"item.value\" />\n#end\n </el-select>\n#elseif($column.htmlType == \"datetime\")\n <el-date-picker v-model=\"form.${javaField}\" type=\"date\" value-format=\"yyyy-MM-dd\" placeholder=\"选择${columnComment}\" />\n#elseif($column.htmlType == \"imageUpload\")\n <el-upload class=\"avatar-uploader\" action=\"/api/files/upload\" :show-file-list=\"false\" :on-success=\"(res) => uploadSuccess(\'${javaField}\', res)\">\n <img v-if=\"form.${javaField}\" :src=\"resolveResourceUrl(form.${javaField})\" class=\"avatar\" />\n <i v-else class=\"el-icon-plus avatar-uploader-icon\"></i>\n </el-upload>\n#elseif($column.htmlType == \"fileUpload\")\n <el-upload action=\"/api/files/upload\" :on-success=\"(res) => uploadSuccess(\'${javaField}\', res)\">\n <el-button size=\"small\" type=\"primary\">点击上传</el-button>\n </el-upload>\n <div v-if=\"form.${javaField}\" class=\"file-link\">{{ form.${javaField} }}</div>\n#end\n </el-form-item>\n#end\n <section class=\"portal-page#if($isCardListLayout) portal-page--card#elseif($isSplitListLayout) portal-page--split#elseif($isDetailPage) portal-page--detail#elseif($isFormPage) portal-page--form#else portal-page--table#end\">\n#if($hasPageDesignTopBusinessBlocks)\n <section class=\"embedded-business-blocks top-business-blocks\">\n#foreach($block in $topBusinessBlocks)\n <div class=\"embedded-business-block__item embedded-business-block__item--span-${block.span}\">\n <${block.componentName} />\n </div>\n#end\n </section>\n#end\n\n\n <section class=\"data-panel#if($isSplitListLayout) split-data-panel#end\">\n <div class=\"panel-heading\">\n <div>\n <h2>${currentPageTitle}</h2>\n </div>\n#if($showToolbar)\n <div class=\"panel-actions\">\n #if($showAdd)\n <el-button type=\"primary\" icon=\"el-icon-plus\" @click=\"handleAdd\">新增</el-button>\n #end\n #if($showBatchDelete)\n <el-popconfirm\n confirm-button-text=\"确定\"\n cancel-button-text=\"取消\"\n icon=\"el-icon-info\"\n icon-color=\"red\"\n title=\"确定批量删除选中的数据吗?\"\n @confirm=\"delBatch\">\n <el-button slot=\"reference\" type=\"danger\" icon=\"el-icon-delete\">批量删除</el-button>\n </el-popconfirm>\n #end\n #foreach($action in $toolbarBusinessActions)\n #set($buttonLabel = $action.buttonLabel)\n #if(!$buttonLabel)#set($buttonLabel = $action.name)#end\n #set($buttonType = $action.buttonType)\n #if(!$buttonType)#set($buttonType = \"primary\")#end\n #set($buttonIcon = $action.buttonIcon)\n #if(!$buttonIcon)#set($buttonIcon = \"el-icon-position\")#end\n #if($action.buttonDisplay != \"more\")\n <el-button\n v-if=\"isBusinessActionVisible(businessActionMap[\'${action.code}\'])\"\n :disabled=\"isBusinessActionDisabled(businessActionMap[\'${action.code}\'])\"\n type=\"${buttonType}\" icon=\"${buttonIcon}\"\n @click=\"handleBusinessAction(\'${action.code}\')\">${buttonLabel}</el-button>\n #end\n #end\n <el-dropdown v-if=\"overflowBusinessActions(\'toolbar\').length\" @command=\"code => handleBusinessAction(code)\">\n <el-button>更多<i class=\"el-icon-arrow-down el-icon--right\"></i></el-button>\n <el-dropdown-menu slot=\"dropdown\">\n <el-dropdown-item\n v-for=\"action in overflowBusinessActions(\'toolbar\')\"\n :key=\"action.code\"\n :command=\"action.code\"\n :disabled=\"isBusinessActionDisabled(action)\">{{ action.buttonLabel || action.name }}</el-dropdown-item>\n </el-dropdown-menu>\n </el-dropdown>\n </div>\n#end\n </div>\n\n#if($isFormPage)\n <div class=\"standalone-form-page\">\n <el-form ref=\"form\" :model=\"form\" label-width=\"120px\" size=\"small\">\n#if($isGroupedForm && $formGroups.size() > 0)\n#foreach($group in $formGroups)\n <section class=\"form-group-card\">\n <h3>${group.label}</h3>\n <div class=\"form-group-grid\">\n#foreach($column in $group.columns)\n#renderPageFormField($column)\n#end\n </div>\n </section>\n#end\n#else\n <div class=\"form-group-grid\">\n#foreach($column in $formColumns)\n#renderPageFormField($column)\n#end\n </div>\n#end\n </el-form>\n <div class=\"form-page-actions\">\n <el-button @click=\"resetStandaloneForm\">取消</el-button>\n <el-button type=\"primary\" @click=\"save\">提交</el-button>\n#foreach($action in $formBusinessActions)\n#set($buttonLabel = $action.buttonLabel)\n#if(!$buttonLabel)#set($buttonLabel = $action.name)#end\n#set($buttonType = $action.buttonType)\n#if(!$buttonType)#set($buttonType = \"primary\")#end\n#set($buttonIcon = $action.buttonIcon)\n#if(!$buttonIcon)#set($buttonIcon = \"el-icon-position\")#end\n#if($action.buttonDisplay != \"more\")\n <el-button\n v-if=\"isBusinessActionVisible(businessActionMap[\'${action.code}\'], form)\"\n :disabled=\"isBusinessActionDisabled(businessActionMap[\'${action.code}\'], form)\"\n type=\"${buttonType}\"\n icon=\"${buttonIcon}\"\n @click=\"handleBusinessAction(\'${action.code}\', form)\">${buttonLabel}</el-button>\n#end\n#end\n <el-dropdown v-if=\"overflowBusinessActions(\'form\', form).length\" @command=\"code => handleBusinessAction(code, form)\">\n <el-button>更多<i class=\"el-icon-arrow-down el-icon--right\"></i></el-button>\n <el-dropdown-menu slot=\"dropdown\">\n <el-dropdown-item\n v-for=\"action in overflowBusinessActions(\'form\', form)\"\n :key=\"action.code\"\n :command=\"action.code\"\n :disabled=\"isBusinessActionDisabled(action, form)\">{{ action.buttonLabel || action.name }}</el-dropdown-item>\n </el-dropdown-menu>\n </el-dropdown>\n </div>\n </div>\n#elseif($isDetailPage)\n#if($showDetail)\n <div class=\"detail-view\" v-loading=\"detailLoading\">\n <div v-if=\"detailLoaded && !detailRecord.${pkColumn.javaField}\" class=\"empty-detail\">\n <i class=\"el-icon-document\"></i>\n <span>暂无详情数据</span>\n </div>\n <template v-else>\n#if($isMediaDetailLayout)\n <div class=\"media-detail-view\">\n <div class=\"media-detail-hero\">\n#if($detailImageColumn)\n <el-image\n v-if=\"detailRecord.${detailImageColumn.javaField}\"\n class=\"media-detail-image\"\n :src=\"resolveResourceUrl(detailRecord.${detailImageColumn.javaField})\"\n :preview-src-list=\"[resolveResourceUrl(detailRecord.${detailImageColumn.javaField})]\" />\n <div v-else class=\"media-detail-image empty\"></div>\n#end\n#if($detailTitleColumn || $detailSummaryColumn)\n <div class=\"media-detail-copy\">\n#if($detailTitleColumn)\n <h2>{{ detailRecord.${detailTitleColumn.javaField} || \'-\' }}</h2>\n#end\n#if($detailSummaryColumn)\n <p>{{ formatDetailValue(detailRecord.${detailSummaryColumn.javaField}) }}</p>\n#end\n </div>\n#end\n </div>\n </div>\n <dl class=\"detail-grid media-detail-grid\">\n#else\n <dl class=\"detail-grid\">\n#end\n#foreach ($column in $detailColumns)\n#set($javaField=$column.javaField)\n#set($columnComment=$column.displayLabel)\n#set($remoteSelect=$qingRemoteSelectFields.contains($javaField))\n <div class=\"detail-field#if($column.htmlType == \"textarea\") wide#end\">\n <dt>${columnComment}</dt>\n <dd>\n#if($column.htmlType == \"imageUpload\")\n <el-image\n v-if=\"detailRecord.${javaField}\"\n class=\"detail-image\"\n :src=\"resolveResourceUrl(detailRecord.${javaField})\"\n :preview-src-list=\"[resolveResourceUrl(detailRecord.${javaField})]\" />\n <span v-else>-</span>\n#elseif($column.htmlType == \"select\" || $column.htmlType == \"radio\")\n#if($remoteSelect)\n {{ getOptionLabel(\'${javaField}\', detailRecord.${javaField}) }}\n#else\n {{ _dict.getDictLabel(\'${column.dictType}\', detailRecord.${javaField}) || \'-\' }}\n#end\n#else\n {{ formatDetailValue(detailRecord.${javaField}) }}\n#end\n </dd>\n </div>\n#end\n </dl>\n#if($hasRowBusinessActions)\n <div class=\"detail-actions\">\n#foreach($action in $rowBusinessActions)\n#set($buttonLabel = $action.buttonLabel)\n#if(!$buttonLabel)#set($buttonLabel = $action.name)#end\n#set($buttonType = $action.buttonType)\n#if(!$buttonType)#set($buttonType = \"primary\")#end\n#set($buttonIcon = $action.buttonIcon)\n#if(!$buttonIcon)#set($buttonIcon = \"el-icon-position\")#end\n#if($action.buttonDisplay != \"more\")\n <el-button\n v-if=\"isBusinessActionVisible(businessActionMap[\'${action.code}\'], detailRecord)\"\n :disabled=\"isBusinessActionDisabled(businessActionMap[\'${action.code}\'], detailRecord)\"\n type=\"${buttonType}\" icon=\"${buttonIcon}\"\n @click=\"handleBusinessAction(\'${action.code}\', detailRecord)\">${buttonLabel}</el-button>\n#end\n#end\n <el-dropdown v-if=\"overflowBusinessActions(\'row\', detailRecord).length\" @command=\"code => handleBusinessAction(code, detailRecord)\">\n <el-button>更多<i class=\"el-icon-arrow-down el-icon--right\"></i></el-button>\n <el-dropdown-menu slot=\"dropdown\">\n <el-dropdown-item\n v-for=\"action in overflowBusinessActions(\'row\', detailRecord)\"\n :key=\"action.code\"\n :command=\"action.code\"\n :disabled=\"isBusinessActionDisabled(action, detailRecord)\">{{ action.buttonLabel || action.name }}</el-dropdown-item>\n </el-dropdown-menu>\n </el-dropdown>\n </div>\n#end\n </template>\n </div>\n#end\n#else\n\n #if($showQuery)\n <div class=\"filter-bar\">\n#foreach ($column in $queryColumns)\n#set($renderQueryField = false)\n#if($designed)\n#set($renderQueryField = true)\n#elseif($column.isQuery == \"1\")\n#set($renderQueryField = true)\n#end\n#if($renderQueryField)\n#set($javaField=$column.javaField)\n#set($columnComment=$column.displayLabel)\n#set($remoteSelect=$qingRemoteSelectFields.contains($javaField))\n#if($column.htmlType == \"input\")\n <el-input class=\"filter-item\" placeholder=\"请输入${columnComment}\" clearable v-model=\"queryParams.${javaField}\" @keyup.enter.native=\"load\" />\n#elseif($column.htmlType == \"select\" || $column.htmlType == \"radio\")\n <el-select class=\"filter-item\" v-model=\"queryParams.${javaField}\" placeholder=\"请选择${columnComment}\" clearable>\n#if($remoteSelect)\n <el-option\n v-for=\"item in getSelectOptions(\'${javaField}\')\"\n :key=\"item.value\"\n :label=\"item.label\"\n :value=\"item.value\" />\n#else\n <el-option\n v-for=\"item in _dict.getDictDataByType(\'${column.dictType}\')\"\n :key=\"item.value\"\n :label=\"item.name\"\n :value=\"item.value\" />\n#end\n </el-select>\n#elseif($column.htmlType == \"datetime\")\n <el-date-picker class=\"filter-item\" v-model=\"queryParams.${javaField}\" type=\"date\" value-format=\"yyyy-MM-dd\" placeholder=\"选择${columnComment}\" />\n#end\n#end\n#end\n <el-button type=\"primary\" icon=\"el-icon-search\" @click=\"load\">搜索</el-button>\n <el-button icon=\"el-icon-refresh\" @click=\"reset\">重置</el-button>\n </div>\n #end\n\n#if($showList)\n#if($isCardListLayout)\n <div class=\"resource-card-grid\">\n <article v-for=\"item in ${businessName}List\" :key=\"item.${pkColumn.javaField}\" class=\"resource-card-item\">\n #if($showBatchDelete)\n <el-checkbox class=\"resource-card-check\" v-model=\"item.__checked\" @change=\"handleCardSelectionChange\" />\n #end\n <div class=\"resource-card-body\">\n#if($cardImageColumn)\n <el-image\n v-if=\"item.${cardImageColumn.javaField}\"\n class=\"resource-card-image\"\n :src=\"resolveResourceUrl(item.${cardImageColumn.javaField})\"\n :preview-src-list=\"[resolveResourceUrl(item.${cardImageColumn.javaField})]\" />\n#end\n#if($cardTitleColumn)\n <h3 class=\"resource-card-title\">{{ item.${cardTitleColumn.javaField} || \'-\' }}</h3>\n#end\n#foreach ($column in $cardColumns)\n#set($renderCardField = false)\n#if($designed)\n#set($renderCardField = true)\n#elseif($column.isList == \"1\")\n#set($renderCardField = true)\n#end\n#if($renderCardField)\n#set($javaField=$column.javaField)\n#set($columnComment=$column.displayLabel)\n#set($remoteSelect=$qingRemoteSelectFields.contains($javaField))\n#if($column.htmlType == \"imageUpload\")\n <el-image\n v-if=\"item.${javaField}\"\n class=\"resource-card-image\"\n :src=\"resolveResourceUrl(item.${javaField})\"\n :preview-src-list=\"[resolveResourceUrl(item.${javaField})]\" />\n#elseif($column.htmlType == \"select\" || $column.htmlType == \"radio\")\n <div class=\"resource-card-field\">\n <span>${columnComment}</span>\n#if($remoteSelect)\n <strong>{{ getOptionLabel(\'${javaField}\', item.${javaField}) }}</strong>\n#else\n <strong>{{ _dict.getDictLabel(\'${column.dictType}\', item.${javaField}) || \'-\' }}</strong>\n#end\n </div>\n#else\n <div class=\"resource-card-field\">\n <span>${columnComment}</span>\n <strong>{{ item.${javaField} || \'-\' }}</strong>\n </div>\n#end\n#end\n#end\n </div>\n #if($showView || $showEdit || $showDelete || $hasRowBusinessActions)\n <div class=\"resource-card-actions\">\n #if($showView)\n <el-button size=\"small\" type=\"primary\" icon=\"el-icon-view\" class=\"resource-card-action\" @click=\"handleView(item)\">查看</el-button>\n #end\n #if($showEdit)\n <el-button size=\"small\" type=\"primary\" icon=\"el-icon-edit\" class=\"resource-card-action\" @click=\"handleEdit(item)\">编辑</el-button>\n #end\n #if($showDelete)\n <el-popconfirm\n confirm-button-text=\"确定\"\n cancel-button-text=\"取消\"\n icon=\"el-icon-info\"\n icon-color=\"red\"\n title=\"确定删除这条数据吗?\"\n @confirm=\"del(item.${pkColumn.javaField})\">\n <el-button slot=\"reference\" size=\"small\" type=\"danger\" icon=\"el-icon-delete\" class=\"resource-card-action\">删除</el-button>\n </el-popconfirm>\n #end\n #foreach($action in $rowBusinessActions)\n #set($buttonLabel = $action.buttonLabel)\n #if(!$buttonLabel)#set($buttonLabel = $action.name)#end\n #set($buttonType = $action.buttonType)\n #if(!$buttonType || $buttonType == \"text\")#set($buttonType = \"primary\")#end\n #set($buttonIcon = $action.buttonIcon)\n #if(!$buttonIcon)#set($buttonIcon = \"el-icon-position\")#end\n#if($action.buttonDisplay != \"more\")\n <el-button\n v-if=\"isBusinessActionVisible(businessActionMap[\'${action.code}\'], item)\"\n :disabled=\"isBusinessActionDisabled(businessActionMap[\'${action.code}\'], item)\"\n size=\"small\" type=\"${buttonType}\" icon=\"${buttonIcon}\" class=\"resource-card-action\"\n @click=\"handleBusinessAction(\'${action.code}\', item)\">${buttonLabel}</el-button>\n#end\n #end\n <el-dropdown v-if=\"overflowBusinessActions(\'row\', item).length\" @command=\"code => handleBusinessAction(code, item)\">\n <el-button size=\"small\" type=\"primary\" class=\"resource-card-action\">更多<i class=\"el-icon-arrow-down el-icon--right\"></i></el-button>\n <el-dropdown-menu slot=\"dropdown\">\n <el-dropdown-item\n v-for=\"action in overflowBusinessActions(\'row\', item)\"\n :key=\"action.code\"\n :command=\"action.code\"\n :disabled=\"isBusinessActionDisabled(action, item)\">{{ action.buttonLabel || action.name }}</el-dropdown-item>\n </el-dropdown-menu>\n </el-dropdown>\n </div>\n #end\n </article>\n </div>\n#else\n <el-table :data=\"${businessName}List\" border stripe class=\"resource-table\" @selection-change=\"handleSelectionChange\">\n#if($showBatchDelete)\n <el-table-column type=\"selection\" width=\"55\" />\n#end\n#if(!$designed)\n <el-table-column prop=\"${pkColumn.javaField}\" label=\"ID\" width=\"90\" />\n#end\n#foreach ($column in $tableColumns)\n#set($renderTableField = false)\n#if($designed)\n#set($renderTableField = true)\n#elseif($column.isList == \"1\")\n#set($renderTableField = true)\n#end\n#if($renderTableField)\n#set($javaField=$column.javaField)\n#set($columnComment=$column.displayLabel)\n#set($remoteSelect=$qingRemoteSelectFields.contains($javaField))\n#if($column.htmlType == \"datetime\")\n <el-table-column prop=\"${javaField}\" label=\"${columnComment}\" align=\"center\" width=\"180\" />\n#elseif($column.htmlType == \"imageUpload\")\n <el-table-column prop=\"${javaField}\" label=\"${columnComment}\" align=\"center\" width=\"110\">\n <template slot-scope=\"scope\">\n <el-image\n v-if=\"scope.row.${javaField}\"\n class=\"table-image\"\n :src=\"resolveResourceUrl(scope.row.${javaField})\"\n :preview-src-list=\"[resolveResourceUrl(scope.row.${javaField})]\" />\n <span v-else>-</span>\n </template>\n </el-table-column>\n#elseif($column.htmlType == \"select\" || $column.htmlType == \"radio\")\n <el-table-column prop=\"${javaField}\" label=\"${columnComment}\" align=\"center\">\n <template slot-scope=\"scope\">\n#if($remoteSelect)\n {{ getOptionLabel(\'${javaField}\', scope.row.${javaField}) }}\n#else\n {{ _dict.getDictLabel(\'${column.dictType}\', scope.row.${javaField}) }}\n#end\n </template>\n </el-table-column>\n#else\n <el-table-column prop=\"${javaField}\" label=\"${columnComment}\" align=\"center\" />\n#end\n#end\n#end\n #if($showView || $showEdit || $showDelete || $hasRowBusinessActions)\n <el-table-column label=\"操作\" width=\"230\" align=\"center\">\n <template slot-scope=\"scope\">\n #if($showView)\n <el-button type=\"text\" icon=\"el-icon-view\" @click=\"handleView(scope.row)\">查看</el-button>\n #end\n #if($showEdit)\n <el-button type=\"text\" icon=\"el-icon-edit\" @click=\"handleEdit(scope.row)\">编辑</el-button>\n #end\n #if($showDelete)\n <el-popconfirm\n confirm-button-text=\"确定\"\n cancel-button-text=\"取消\"\n icon=\"el-icon-info\"\n icon-color=\"red\"\n title=\"确定删除这条数据吗?\"\n @confirm=\"del(scope.row.${pkColumn.javaField})\">\n <el-button slot=\"reference\" type=\"text\" icon=\"el-icon-delete\" class=\"danger-text\">删除</el-button>\n </el-popconfirm>\n #end\n #foreach($action in $rowBusinessActions)\n #set($buttonLabel = $action.buttonLabel)\n #if(!$buttonLabel)#set($buttonLabel = $action.name)#end\n #set($buttonType = $action.buttonType)\n #if(!$buttonType)#set($buttonType = \"text\")#end\n #set($buttonIcon = $action.buttonIcon)\n #if(!$buttonIcon)#set($buttonIcon = \"el-icon-position\")#end\n#if($action.buttonDisplay != \"more\")\n <el-button\n v-if=\"isBusinessActionVisible(businessActionMap[\'${action.code}\'], scope.row)\"\n :disabled=\"isBusinessActionDisabled(businessActionMap[\'${action.code}\'], scope.row)\"\n type=\"${buttonType}\" icon=\"${buttonIcon}\"\n @click=\"handleBusinessAction(\'${action.code}\', scope.row)\">${buttonLabel}</el-button>\n#end\n #end\n <el-dropdown v-if=\"overflowBusinessActions(\'row\', scope.row).length\" @command=\"code => handleBusinessAction(code, scope.row)\">\n <el-button type=\"text\">更多<i class=\"el-icon-arrow-down el-icon--right\"></i></el-button>\n <el-dropdown-menu slot=\"dropdown\">\n <el-dropdown-item\n v-for=\"action in overflowBusinessActions(\'row\', scope.row)\"\n :key=\"action.code\"\n :command=\"action.code\"\n :disabled=\"isBusinessActionDisabled(action, scope.row)\">{{ action.buttonLabel || action.name }}</el-dropdown-item>\n </el-dropdown-menu>\n </el-dropdown>\n </template>\n </el-table-column>\n #end\n </el-table>\n#end\n\n <el-pagination\n class=\"pagination\"\n @size-change=\"handleSizeChange\"\n @current-change=\"handleCurrentChange\"\n :current-page=\"queryParams.pageNum\"\n :page-sizes=\"[10, 20, 50, 100]\"\n :page-size=\"queryParams.pageSize\"\n layout=\"total, sizes, prev, pager, next, jumper\"\n :total=\"total\" />\n#end\n#end\n </section>\n\n#if($hasPageDesignBottomBusinessBlocks)\n <section class=\"embedded-business-blocks bottom-business-blocks\">\n#foreach($block in $bottomBusinessBlocks)\n <div class=\"embedded-business-block__item embedded-business-block__item--span-${block.span}\">\n <${block.componentName} />\n </div>\n#end\n </section>\n#end\n\n #if($renderForm)\n <el-dialog custom-class=\"portal-dialog#if($isGroupedForm) portal-dialog--wide#end\" :title=\"viewing ? \'查看${functionName}\' : (form.${pkColumn.javaField} ? \'编辑${functionName}\' : \'新增${functionName}\')\" :visible.sync=\"dialogFormVisible\" width=\"#if($isGroupedForm)860px#else520px#end\">\n <el-form ref=\"form\" :model=\"form\" label-width=\"110px\" size=\"small\" :disabled=\"viewing\">\n#if($isGroupedForm && $formGroups.size() > 0)\n#foreach($group in $formGroups)\n <section class=\"form-group-card dialog-form-group-card\">\n <h3>${group.label}</h3>\n <div class=\"form-group-grid\">\n#foreach($column in $group.columns)\n#renderPageFormField($column)\n#end\n </div>\n </section>\n#end\n#else\n#foreach ($column in $formColumns)\n#set($renderFormField = false)\n#if($designed)\n#set($renderFormField = true)\n#elseif($column.isEdit == \"1\")\n#set($renderFormField = true)\n#end\n#if($renderFormField)\n#set($javaField=$column.javaField)\n#set($columnComment=$column.displayLabel)\n#set($remoteSelect=$qingRemoteSelectFields.contains($javaField))\n#set($autoIncrementField=$column.isIncrement == \"1\")\n <el-form-item#if($autoIncrementField) v-if=\"form.${javaField}\"#end label=\"${columnComment}\" prop=\"${javaField}\"#if($column.isRequired == \"1\" && !$autoIncrementField) :rules=\"[{ required: true, message: \'${columnComment}不能为空\', trigger: #if($column.htmlType == \"select\")\'change\'#else\'blur\'#end }]\"#end>\n#if($column.htmlType == \"input\")\n <el-input v-model=\"form.${javaField}\"#if($autoIncrementField) disabled#end placeholder=\"请输入${columnComment}\" />\n#elseif($column.htmlType == \"textarea\")\n <el-input v-model=\"form.${javaField}\" type=\"textarea\" placeholder=\"请输入${columnComment}\" />\n#elseif($column.htmlType == \"editor\")\n <quill-editor\n v-model=\"form.${javaField}\"\n class=\"rich-text-editor\"\n :disabled=\"viewing\"\n :options=\"{ placeholder: \'请输入${columnComment}\' }\" />\n#elseif($column.htmlType == \"select\" || $column.htmlType == \"radio\")\n <el-select v-model=\"form.${javaField}\" placeholder=\"请选择${columnComment}\" clearable>\n#if($remoteSelect)\n <el-option\n v-for=\"item in getSelectOptions(\'${javaField}\')\"\n :key=\"item.value\"\n :label=\"item.label\"\n :value=\"item.value\" />\n#else\n <el-option\n v-for=\"item in _dict.getDictDataByType(\'${column.dictType}\')\"\n :key=\"item.value\"\n :label=\"item.name\"\n :value=\"item.value\" />\n#end\n </el-select>\n#elseif($column.htmlType == \"datetime\")\n <el-date-picker v-model=\"form.${javaField}\" type=\"date\" value-format=\"yyyy-MM-dd\" placeholder=\"选择${columnComment}\" />\n#elseif($column.htmlType == \"imageUpload\")\n <el-upload\n class=\"avatar-uploader\"\n action=\"/api/files/upload\"\n :show-file-list=\"false\"\n :on-success=\"(res) => uploadSuccess(\'${javaField}\', res)\">\n <img v-if=\"form.${javaField}\" :src=\"resolveResourceUrl(form.${javaField})\" class=\"avatar\" />\n <i v-else class=\"el-icon-plus avatar-uploader-icon\"></i>\n </el-upload>\n#elseif($column.htmlType == \"fileUpload\")\n <el-upload\n action=\"/api/files/upload\"\n :on-success=\"(res) => uploadSuccess(\'${javaField}\', res)\">\n <el-button size=\"small\" type=\"primary\">点击上传</el-button>\n </el-upload>\n <div v-if=\"form.${javaField}\" class=\"file-link\">{{ form.${javaField} }}</div>\n#end\n </el-form-item>\n#end\n#end\n#end\n </el-form>\n <div slot=\"footer\" class=\"dialog-footer\">\n <el-button @click=\"dialogFormVisible = false\">取消</el-button>\n <el-button v-if=\"!viewing\" type=\"primary\" @click=\"save\">确定</el-button>\n#foreach($action in $formBusinessActions)\n#set($buttonLabel = $action.buttonLabel)\n#if(!$buttonLabel)#set($buttonLabel = $action.name)#end\n#set($buttonType = $action.buttonType)\n#if(!$buttonType)#set($buttonType = \"primary\")#end\n#if($action.buttonDisplay != \"more\")\n <el-button\n v-if=\"!viewing && isBusinessActionVisible(businessActionMap[\'${action.code}\'], form)\"\n :disabled=\"isBusinessActionDisabled(businessActionMap[\'${action.code}\'], form)\"\n type=\"${buttonType}\"\n @click=\"handleBusinessAction(\'${action.code}\', form)\">${buttonLabel}</el-button>\n#end\n#end\n <el-dropdown v-if=\"!viewing && overflowBusinessActions(\'form\', form).length\" @command=\"code => handleBusinessAction(code, form)\">\n <el-button>更多<i class=\"el-icon-arrow-down el-icon--right\"></i></el-button>\n <el-dropdown-menu slot=\"dropdown\">\n <el-dropdown-item\n v-for=\"action in overflowBusinessActions(\'form\', form)\"\n :key=\"action.code\"\n :command=\"action.code\"\n :disabled=\"isBusinessActionDisabled(action, form)\">{{ action.buttonLabel || action.name }}</el-dropdown-item>\n </el-dropdown-menu>\n </el-dropdown>\n </div>\n </el-dialog>\n #end\n\n#if($allPageBusinessActions.size() > 0)\n <el-dialog\n custom-class=\"portal-dialog portal-dialog--action\"\n :title=\"businessActionDialogTitle\"\n :visible.sync=\"businessActionDialogVisible\"\n width=\"520px\"\n append-to-body\n :show-close=\"!businessActionSubmitting\"\n :close-on-click-modal=\"false\"\n :close-on-press-escape=\"!businessActionSubmitting\"\n @closed=\"resetBusinessActionDialog\">\n <p v-if=\"activeBusinessAction && activeBusinessAction.confirmMessage\" class=\"business-action-hint\">\n {{ activeBusinessAction.confirmMessage }}\n </p>\n <el-form\n ref=\"businessActionForm\"\n :model=\"businessActionForm\"\n label-width=\"110px\"\n size=\"small\">\n <el-form-item\n v-for=\"field in businessActionInputFields\"\n :key=\"field.field\"\n :label=\"field.label\"\n :prop=\"field.field\"\n :rules=\"[{ required: true, message: field.label + \'不能为空\', trigger: field.htmlType === \'select\' ? \'change\' : \'blur\' }]\">\n <el-date-picker\n v-if=\"field.htmlType === \'datetime\'\"\n v-model=\"businessActionForm[field.field]\"\n type=\"date\"\n value-format=\"yyyy-MM-dd\"\n :placeholder=\"\'请选择\' + field.label\" />\n <el-select\n v-else-if=\"field.htmlType === \'select\' && field.dictType\"\n v-model=\"businessActionForm[field.field]\"\n clearable\n :placeholder=\"\'请选择\' + field.label\">\n <el-option\n v-for=\"option in getBusinessActionFieldOptions(field)\"\n :key=\"option.value\"\n :label=\"option.label\"\n :value=\"option.value\" />\n </el-select>\n <el-input\n v-else-if=\"field.htmlType === \'textarea\'\"\n v-model=\"businessActionForm[field.field]\"\n type=\"textarea\"\n :rows=\"3\"\n :placeholder=\"\'请输入\' + field.label\" />\n <el-input\n v-else\n v-model=\"businessActionForm[field.field]\"\n :placeholder=\"\'请输入\' + field.label\" />\n </el-form-item>\n </el-form>\n <div slot=\"footer\" class=\"dialog-footer\">\n <el-button\n :disabled=\"businessActionSubmitting\"\n @click=\"businessActionDialogVisible = false\">\n 取消\n </el-button>\n <el-button\n type=\"primary\"\n :loading=\"businessActionSubmitting\"\n @click=\"submitBusinessAction\">\n {{ activeBusinessAction && activeBusinessAction.buttonLabel ? activeBusinessAction.buttonLabel : \'确认执行\' }}\n </el-button>\n </div>\n </el-dialog>\n#end\n </section>\n</template>\n\n<script>\n#foreach($block in $embeddedBusinessBlocks)\nimport ${block.componentName} from \"${block.relativeImportPath}\"\n#end\n\nexport default {\n name: \"${BusinessName}\",\n#if($hasPageDesignEmbeddedBusinessBlocks)\n components: {\n#foreach($block in $embeddedBusinessBlocks)\n ${block.componentName}#if($foreach.hasNext),#end\n#end\n },\n#end\n data() {\n return {\n ${businessName}List: [],\n total: 0,\n queryParams: {\n pageNum: 1,\n pageSize: 10,\n#if($currentUserOnly)\n __currentUserOnly: true,\n#end\n#foreach ($column in $queryColumns)\n#set($renderQueryParam = false)\n#if(!$showQuery)\n#set($renderQueryParam = false)\n#elseif($designed)\n#set($renderQueryParam = true)\n#elseif($column.isQuery == \"1\")\n#set($renderQueryParam = true)\n#end\n#if($renderQueryParam)\n ${column.javaField}: undefined,\n#end\n#end\n },\n#if($isDetailPage)\n detailRecord: {},\n detailLoading: false,\n detailLoaded: false,\n#end\n form: {},\n viewing: false,\n dialogFormVisible: false,\n businessActionDialogVisible: false,\n businessActionSubmitting: false,\n activeBusinessAction: null,\n businessActionBasePayload: {},\n businessActionForm: {},\n businessActionInputFields: [],\n multipleSelection: [],\n remoteOptionMap: {},\n remoteSelectConfig: {\n#foreach($remote in $qingRemoteSelects)\n ${remote.field}: {\n path: \"${remote.path}\",\n valueField: \"${remote.valueField}\",\n labelField: \"${remote.labelField}\"\n }#if($foreach.hasNext),#end\n#end\n },\n businessActionMap: {\n#foreach($action in $allPageBusinessActions)\n \"${action.code}\": {\n name: \"${action.name}\",\n buttonLabel: \"${action.buttonLabel}\",\n method: \"${action.method}\",\n path: \"${action.path}\",\n successMessage: \"${action.successMessage}\",\n refreshTarget: \"${action.refreshTarget}\",\n confirmMessage: \"${action.confirmMessage}\",\n display: \"${action.buttonDisplay}\",\n permission: \"${action.permission}\",\n placement: \"${action.placement}\",\n#set($visibleWhen = $action.visibleWhen)\n#set($disabledWhen = $action.disabledWhen)\n visibleWhen: {\n field: \"$!visibleWhen.field\",\n operator: \"$!visibleWhen.operator\",\n values: [#if($visibleWhen && $visibleWhen.values)#foreach($value in $visibleWhen.values)\"${value}\"#if($foreach.hasNext), #end#end#end]\n },\n disabledWhen: {\n field: \"$!disabledWhen.field\",\n operator: \"$!disabledWhen.operator\",\n values: [#if($disabledWhen && $disabledWhen.values)#foreach($value in $disabledWhen.values)\"${value}\"#if($foreach.hasNext), #end#end#end]\n },\n requestFields: [#foreach($field in $action.requestFields)\"${field}\"#if($foreach.hasNext), #end#end],\n currentUserFields: [#foreach($field in $action.currentUserFields)\"${field}\"#if($foreach.hasNext), #end#end],\n inputMapping: {#set($inputMapping = $action.inputMapping)#if($inputMapping)#foreach($entry in $inputMapping.entrySet())\"${entry.key}\": \"${entry.value}\"#if($foreach.hasNext), #end#end#end},\n inputFields: [\n#foreach($field in $action.inputFields)\n {\n field: \"${field.field}\",\n label: \"${field.label}\",\n htmlType: \"${field.htmlType}\",\n dictType: \"${field.dictType}\"\n }#if($foreach.hasNext),#end\n#end\n ]\n }#if($foreach.count != $allPageBusinessActions.size()),#end\n#end\n },\n routeActionMap: {\n#foreach($routeAction in $pageDesignRouteActionEntries)\n \"${routeAction.key}\": {\n path: \"${routeAction.path}\",\n paramMap: {#set($paramMap = $routeAction.paramMap)#foreach($param in $paramMap.entrySet())\"${param.key}\":\"${param.value}\"#if($foreach.count != $paramMap.size()),#end#end}\n }#if($foreach.count != $pageDesignRouteActionEntries.size()),#end\n#end\n }\n }\n },\n computed: {\n businessActionDialogTitle() {\n if (!this.activeBusinessAction) {\n return \"业务操作\"\n }\n return this.activeBusinessAction.buttonLabel || this.activeBusinessAction.name || \"业务操作\"\n }\n },\n created() {\n this.loadRemoteOptions()\n#if($isDetailPage)\n this.loadDetail()\n#else\n this.load()\n#end\n },\n methods: {\n loadRemoteOptions() {\n Object.keys(this.remoteSelectConfig).forEach(field => {\n const config = this.remoteSelectConfig[field]\n this.request.get(config.path, {\n params: { pageNum: 1, pageSize: 999 }\n }).then(res => {\n const data = res.data || {}\n const records = Array.isArray(data) ? data : (data.records || [])\n const options = records.map(item => ({\n value: item[config.valueField],\n label: item[config.labelField]\n }))\n this.#[[$set]]#(this.remoteOptionMap, field, options)\n })\n })\n },\n getSelectOptions(field) {\n return this.remoteOptionMap[field] || []\n },\n getOptionLabel(field, value) {\n const option = this.getSelectOptions(field).find(item => String(item.value) === String(value))\n if (option) {\n return option.label\n }\n return value === undefined || value === null || value === \"\" ? \"-\" : value\n },\n#if(!$isDetailPage)\n load() {\n this.request.get(\"${requestPath}/page\", {\n params: this.queryParams\n }).then(res => {\n const page = res.data || {}\n this.${businessName}List = page.records || []\n this.total = page.total || 0\n })\n },\n#end\n#if($isDetailPage)\n resolveDetailId() {\n const params = this.#[[$route]]# && this.#[[$route]]#.params ? this.#[[$route]]#.params : {}\n return params.id || params.${pkColumn.javaField} || \"\"\n },\n loadDetail() {\n const detailId = this.resolveDetailId()\n if (!detailId) {\n this.detailRecord = {}\n this.form = {}\n this.detailLoaded = true\n return\n }\n this.detailLoading = true\n this.request.get(\"${requestPath}/\" + detailId).then(res => {\n this.detailRecord = res.data || {}\n this.form = JSON.parse(JSON.stringify(this.detailRecord))\n this.detailLoaded = true\n }).finally(() => {\n this.detailLoading = false\n })\n },\n formatDetailValue(value) {\n return value === undefined || value === null || value === \"\" ? \"-\" : value\n },\n#end\n save() {\n this.#[[$refs]]#.form.validate(valid => {\n if (!valid) {\n return\n }\n this.request.post(\"${requestPath}\", this.form).then(res => {\n if (res.code === \"200\") {\n this.#[[$message]]#.success(\"保存成功\")\n this.dialogFormVisible = false\n this.load()\n } else {\n this.#[[$message]]#.error(res.msg || \"保存失败\")\n }\n })\n })\n },\n handleAdd() {\n if (this.handleConfiguredRoute(\"toolbar:create\")) {\n return\n }\n this.form = {}\n this.viewing = false\n this.dialogFormVisible = true\n this.#[[$nextTick]]#(() => this.#[[$refs]]#.form && this.#[[$refs]]#.form.clearValidate())\n },\n handleView(row) {\n if (this.handleConfiguredRoute(\"table:view\", row)) {\n return\n }\n if (this.handleConfiguredRoute(\"cardActions:view\", row)) {\n return\n }\n this.form = JSON.parse(JSON.stringify(row))\n this.viewing = true\n this.dialogFormVisible = true\n },\n handleEdit(row) {\n if (this.handleConfiguredRoute(\"table:edit\", row)) {\n return\n }\n if (this.handleConfiguredRoute(\"cardActions:edit\", row)) {\n return\n }\n this.form = JSON.parse(JSON.stringify(row))\n this.viewing = false\n this.dialogFormVisible = true\n this.#[[$nextTick]]#(() => this.#[[$refs]]#.form && this.#[[$refs]]#.form.clearValidate())\n },\n del(${pkColumn.javaField}) {\n this.request.delete(\"${requestPath}/\" + ${pkColumn.javaField}).then(res => {\n if (res.code === \"200\") {\n this.#[[$message]]#.success(\"删除成功\")\n this.load()\n } else {\n this.#[[$message]]#.error(res.msg || \"删除失败\")\n }\n })\n },\n handleSelectionChange(val) {\n this.multipleSelection = val\n },\n handleCardSelectionChange() {\n this.multipleSelection = this.${businessName}List.filter(item => item.__checked)\n },\n handleConfiguredRoute(actionKey, row) {\n const action = this.routeActionMap[actionKey]\n if (!action || !action.path) {\n return false\n }\n const path = this.buildConfiguredRoutePath(action.path, action.paramMap || {}, row)\n if (!path) {\n return false\n }\n this.#[[$router]]#.push(path)\n return true\n },\n buildConfiguredRoutePath(routePath, paramMap, row) {\n let path = routePath\n Object.keys(paramMap || {}).forEach(param => {\n const field = paramMap[param]\n const value = row && row[field]\n if (value !== undefined && value !== null && value !== \"\") {\n path = path.replace(new RegExp(\":\" + param + \"(?=/|$)\", \"g\"), encodeURIComponent(value))\n }\n })\n return this.hasUnresolvedRouteParam(path) ? \"\" : path\n },\n hasUnresolvedRouteParam(path) {\n return String(path || \"\").split(\"/\").some(segment => segment.indexOf(\":\") === 0)\n },\n delBatch() {\n const ids = this.multipleSelection.map(item => item.${pkColumn.javaField})\n if (!ids.length) {\n this.#[[$message]]#.warning(\"请先选择要删除的数据\")\n return\n }\n this.request.post(\"${requestPath}/del/batch\", ids).then(res => {\n if (res.code === \"200\") {\n this.#[[$message]]#.success(\"批量删除成功\")\n this.load()\n } else {\n this.#[[$message]]#.error(res.msg || \"批量删除失败\")\n }\n })\n },\n reset() {\n this.queryParams = {\n pageNum: 1,\n pageSize: 10#if($currentUserOnly),\n __currentUserOnly: true#end\n }\n this.load()\n },\n resetStandaloneForm() {\n this.form = {}\n this.#[[$nextTick]]#(() => this.#[[$refs]]#.form && this.#[[$refs]]#.form.clearValidate())\n },\n hasBusinessActionPermission(action) {\n if (!action || !action.permission) {\n return true\n }\n const permissions = typeof window !== \"undefined\" ? window.__PAGE_PERMISSIONS__ : null\n if (!Array.isArray(permissions) || !permissions.length) {\n return true\n }\n return permissions.includes(\"*:*:*\") || permissions.includes(action.permission)\n },\n businessConditionMatches(condition, row) {\n if (!condition || !condition.field) {\n return false\n }\n const source = row || {}\n const camelField = String(condition.field).replace(/_([a-z])/g, (_, letter) => letter.toUpperCase())\n const actual = source[condition.field] !== undefined ? source[condition.field] : source[camelField]\n const values = Array.isArray(condition.values) ? condition.values.map(value => String(value)) : []\n const actualValue = actual === undefined || actual === null ? \"\" : String(actual)\n if (condition.operator === \"eq\") return values.length > 0 && actualValue === values[0]\n if (condition.operator === \"ne\") return values.length > 0 && actualValue !== values[0]\n if (condition.operator === \"notIn\") return !values.includes(actualValue)\n return values.includes(actualValue)\n },\n isBusinessActionVisible(action, row) {\n if (!this.hasBusinessActionPermission(action)) {\n return false\n }\n return !action || !action.visibleWhen || !action.visibleWhen.field\n ? true\n : this.businessConditionMatches(action.visibleWhen, row)\n },\n isBusinessActionDisabled(action, row) {\n return !this.hasBusinessActionPermission(action)\n || Boolean(action && action.disabledWhen && action.disabledWhen.field\n && this.businessConditionMatches(action.disabledWhen, row))\n },\n overflowBusinessActions(surface, row) {\n const placements = surface === \"toolbar\"\n ? [\"toolbar\"]\n : surface === \"form\"\n ? [\"formActions\"]\n : [\"table\", \"cardActions\", \"detailActions\"]\n return Object.keys(this.businessActionMap)\n .map(code => Object.assign({ code }, this.businessActionMap[code]))\n .filter(action => action.display === \"more\" && placements.includes(action.placement)\n && this.isBusinessActionVisible(action, row))\n },\n handleBusinessAction(code, row) {\n if (this.handleConfiguredRoute(\"business:\" + code, row) || this.handleConfiguredRoute(\"toolbar:\" + code, row) || this.handleConfiguredRoute(\"table:\" + code, row)) {\n return\n }\n const action = this.businessActionMap[code]\n if (!action || !action.path) {\n this.#[[$message]]#.warning(\"动作未配置\")\n return\n }\n if (!this.isBusinessActionVisible(action, row) || this.isBusinessActionDisabled(action, row)) {\n return\n }\n const payload = this.buildBusinessActionPayload(action, row)\n const missingFields = (action.inputFields || []).filter(field => !this.hasBusinessActionValue(payload[field.field]))\n if (missingFields.length > 0) {\n this.openBusinessActionDialog(action, payload, missingFields)\n return\n }\n if (action.confirmMessage) {\n this.#[[$confirm]]#(action.confirmMessage, \"提示\", {\n confirmButtonText: \"确定\",\n cancelButtonText: \"取消\",\n type: \"warning\"\n }).then(() => this.executeBusinessAction(action, payload)).catch(() => {})\n return\n }\n this.executeBusinessAction(action, payload).catch(() => {})\n },\n openBusinessActionDialog(action, payload, fields) {\n const form = {}\n fields.forEach(field => {\n form[field.field] = this.hasBusinessActionValue(payload[field.field]) ? payload[field.field] : undefined\n })\n this.activeBusinessAction = action\n this.businessActionBasePayload = Object.assign({}, payload)\n this.businessActionInputFields = fields.slice()\n this.businessActionForm = form\n this.businessActionDialogVisible = true\n this.#[[$nextTick]]#(() => {\n const formRef = this.#[[$refs]]#.businessActionForm\n if (formRef) {\n formRef.clearValidate()\n }\n })\n },\n submitBusinessAction() {\n const formRef = this.#[[$refs]]#.businessActionForm\n if (!formRef || !this.activeBusinessAction) {\n return\n }\n formRef.validate(valid => {\n if (!valid) {\n return\n }\n const action = this.activeBusinessAction\n const payload = Object.assign({}, this.businessActionBasePayload, this.businessActionForm)\n this.businessActionSubmitting = true\n this.executeBusinessAction(action, payload)\n .then(() => {\n this.businessActionDialogVisible = false\n })\n .catch(() => {})\n .finally(() => {\n this.businessActionSubmitting = false\n })\n })\n },\n resetBusinessActionDialog() {\n this.activeBusinessAction = null\n this.businessActionBasePayload = {}\n this.businessActionForm = {}\n this.businessActionInputFields = []\n },\n hasBusinessActionValue(value) {\n if (value === undefined || value === null) {\n return false\n }\n return typeof value !== \"string\" || value.trim() !== \"\"\n },\n getBusinessActionFieldOptions(field) {\n if (!field || !field.dictType) {\n return []\n }\n return this._dict.getDictDataByType(field.dictType).map(option => ({\n label: option.name,\n value: option.value\n }))\n },\n executeBusinessAction(action, payload) {\n const method = String(action.method || \"POST\").toLowerCase()\n const request = method === \"get\"\n ? this.request.get(action.path, { params: payload })\n : this.request[method] ? this.request[method](action.path, payload) : this.request.post(action.path, payload)\n return request.then(res => {\n if (res.code !== \"200\") {\n return Promise.reject(new Error(res.msg || \"操作失败\"))\n }\n this.#[[$message]]#.success(action.successMessage || \"操作成功\")\n this.refreshBusinessActionTarget(action.refreshTarget)\n return res\n }).catch(error => {\n const data = error && error.response ? error.response.data : null\n this.#[[$message]]#.error((data && data.msg) || (error && error.message) || \"操作失败\")\n return Promise.reject(error)\n })\n },\n refreshBusinessActionTarget(refreshTarget) {\n const target = refreshTarget || \"list\"\n if (target === \"none\") {\n return\n }\n if (target === \"page\") {\n window.location.reload()\n return\n }\n#if($isDetailPage)\n this.loadDetail()\n#else\n this.load()\n#end\n },\n buildBusinessActionPayload(action, row) {\n const payload = {}\n const record = row || this.detailRecord || {}\n Object.keys(record).forEach(field => {\n if (field.indexOf(\"__\") !== 0 && record[field] !== undefined) {\n payload[field] = record[field]\n }\n })\n const currentUserFields = new Set(action.currentUserFields || [])\n ;(action.requestFields || []).forEach(field => {\n if (currentUserFields.has(field)) {\n return\n }\n const value = this.resolvePayloadValue(field, row, action.inputMapping)\n if (value !== undefined) {\n payload[field] = value\n }\n })\n return payload\n },\n resolvePayloadValue(field, row, inputMapping) {\n const mappedValue = this.resolveMappedPayloadValue(inputMapping && inputMapping[field], row)\n if (mappedValue !== undefined) {\n return mappedValue\n }\n const camelField = this.toCamelCase(field)\n const sources = [row, this.detailRecord, this.form, this.queryParams]\n for (const source of sources) {\n const value = this.readBusinessSourceValue(source, field, camelField)\n if (value !== undefined) {\n return value\n }\n }\n return undefined\n },\n resolveMappedPayloadValue(expression, row) {\n if (!expression || String(expression).indexOf(\".\") < 0) {\n return undefined\n }\n const separator = String(expression).indexOf(\".\")\n const sourceName = String(expression).substring(0, separator)\n const sourceField = String(expression).substring(separator + 1)\n const routeParams = this.#[[$route]]# && this.#[[$route]]#.params ? this.#[[$route]]#.params : {}\n const sources = {\n row,\n detail: this.detailRecord,\n form: this.form,\n param: Object.assign({}, this.queryParams, routeParams)\n }\n return this.readBusinessSourceValue(sources[sourceName], sourceField, this.toCamelCase(sourceField))\n },\n readBusinessSourceValue(source, field, camelField) {\n if (!source) {\n return undefined\n }\n if (source[field] !== undefined) {\n return source[field]\n }\n return source[camelField]\n },\n toCamelCase(value) {\n return String(value || \"\").replace(/_([a-zA-Z0-9])/g, (_, char) => char.toUpperCase())\n },\n handleSizeChange(pageSize) {\n this.queryParams.pageSize = pageSize\n this.load()\n },\n handleCurrentChange(pageNum) {\n this.queryParams.pageNum = pageNum\n this.load()\n },\n resolveResourceUrl(url) {\n if (!url) {\n return \"\"\n }\n if (url.indexOf(\"http://\") === 0 || url.indexOf(\"https://\") === 0 || url.indexOf(\"//\") === 0 || url.indexOf(\"data:\") === 0 || url.indexOf(\"blob:\") === 0) {\n return url\n }\n if (url.indexOf(\"/api/\") === 0) {\n return url\n }\n if (url.indexOf(\"/files/\") === 0) {\n return \"/api\" + url\n }\n return url\n },\n uploadSuccess(field, res) {\n if (res && res.code === \"200\" && res.data && res.data.url) {\n this.#[[$set]]#(this.form, field, res.data.url)\n } else {\n this.#[[$message]]#.error(\"上传失败,请重试\")\n }\n }\n }\n}\n</script>\n\n<style scoped>\n.portal-page {\n display: grid;\n gap: 24px;\n min-width: 0;\n}\n\n.embedded-business-blocks {\n display: grid;\n grid-template-columns: repeat(12, minmax(0, 1fr));\n gap: 20px;\n}\n\n.embedded-business-block__item--span-12 { grid-column: span 12; }\n.embedded-business-block__item--span-6 { grid-column: span 6; }\n.embedded-business-block__item--span-4 { grid-column: span 4; }\n\n\n@media (max-width: 900px) {\n .embedded-business-block__item {\n grid-column: span 12;\n }\n}\n\n.panel-heading h2 {\n margin: 0;\n letter-spacing: 0;\n}\n\n\n.data-panel {\n min-width: 0;\n padding: 24px;\n border: 1px solid var(--portal-border, #e3e9f1);\n border-radius: var(--portal-radius-md, 12px);\n background: var(--portal-surface, #ffffff);\n box-shadow: var(--portal-shadow-sm, 0 8px 24px rgba(15, 23, 42, 0.06));\n}\n\n.split-data-panel {\n display: grid;\n grid-template-columns: minmax(220px, 260px) minmax(0, 1fr);\n gap: 20px;\n}\n\n.split-data-panel .panel-heading {\n grid-column: 1 / -1;\n margin-bottom: 0;\n}\n\n.split-data-panel .filter-bar {\n align-content: flex-start;\n align-self: start;\n flex-direction: column;\n margin-bottom: 0;\n padding: 14px;\n border: 1px solid var(--portal-border, #e3e9f1);\n border-radius: var(--portal-radius-sm, 8px);\n background: #f7f9fc;\n}\n\n.split-data-panel .filter-item,\n.split-data-panel .filter-bar .el-button {\n width: 100%;\n}\n\n.split-data-panel .resource-table,\n.split-data-panel .resource-card-grid,\n.split-data-panel .pagination {\n margin-top: 14px;\n text-align: right;\n}\n\n.panel-heading {\n display: flex;\n align-items: center;\n justify-content: space-between;\n gap: 16px;\n margin-bottom: 22px;\n}\n\n.panel-heading h2 {\n margin: 0;\n color: var(--portal-text, #172033);\n font-size: 24px;\n font-weight: 700;\n line-height: 1.3;\n}\n\n.panel-actions,\n.filter-bar {\n display: flex;\n flex-wrap: wrap;\n gap: 10px;\n}\n\n.filter-bar {\n margin-bottom: 20px;\n padding: 14px;\n border: 1px solid #e8edf4;\n border-radius: var(--portal-radius-sm, 8px);\n background: #f8fafc;\n}\n\n.filter-item {\n width: 220px;\n}\n\n.resource-table {\n width: 100%;\n min-width: 0;\n overflow: hidden;\n border-radius: var(--portal-radius-sm, 8px);\n}\n\n.portal-page >>> .el-table th {\n height: 48px;\n color: #526071;\n background: #f7f9fc;\n font-weight: 600;\n}\n\n.portal-page >>> .el-table td {\n padding: 13px 0;\n border-color: #edf1f5;\n}\n\n.portal-page >>> .el-button {\n min-height: 36px;\n border-radius: var(--portal-radius-sm, 8px);\n}\n\n.portal-page >>> .el-button--text {\n min-height: auto;\n}\n\n.portal-page >>> .el-button--primary {\n border-color: var(--portal-primary, #167d83);\n background: var(--portal-primary, #167d83);\n}\n\n.portal-page >>> .el-button--primary.is-plain {\n color: var(--portal-primary-strong, #11656a);\n border-color: #b9dddd;\n background: var(--portal-primary-soft, #eaf7f7);\n}\n\n.portal-page >>> .el-input__inner,\n.portal-page >>> .el-textarea__inner {\n border-radius: var(--portal-radius-sm, 8px);\n}\n\n.resource-card-grid {\n display: grid;\n grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));\n gap: 18px;\n}\n\n.resource-card-item {\n position: relative;\n display: grid;\n gap: 14px;\n min-height: 190px;\n padding: 18px;\n border: 1px solid var(--portal-border, #e3e9f1);\n border-radius: var(--portal-radius-md, 12px);\n background: var(--portal-surface, #ffffff);\n box-shadow: 0 6px 18px rgba(15, 23, 42, 0.04);\n transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;\n}\n\n.resource-card-item:hover {\n border-color: #c8d6e6;\n box-shadow: 0 14px 30px rgba(15, 23, 42, 0.09);\n transform: translateY(-2px);\n}\n\n.resource-card-check {\n position: absolute;\n top: 12px;\n right: 12px;\n}\n\n.resource-card-body {\n display: grid;\n gap: 10px;\n}\n\n.resource-card-field {\n display: grid;\n gap: 4px;\n}\n\n.resource-card-title {\n margin: 0;\n color: var(--portal-text, #172033);\n font-size: 18px;\n font-weight: 700;\n line-height: 1.35;\n}\n\n.resource-card-field span {\n color: #7b8493;\n font-size: 12px;\n}\n\n.resource-card-field strong {\n color: var(--portal-text, #172033);\n font-size: 14px;\n font-weight: 600;\n line-height: 1.45;\n word-break: break-word;\n}\n\n.resource-card-image {\n width: 100%;\n height: 168px;\n border-radius: var(--portal-radius-sm, 8px);\n object-fit: cover;\n background: #eef3f8;\n}\n\n.resource-card-actions {\n display: flex;\n flex-wrap: wrap;\n justify-content: flex-end;\n gap: 8px;\n padding-top: 12px;\n border-top: 1px solid var(--portal-border, #edf0f5);\n}\n\n.resource-card-actions >>> .resource-card-action.el-button {\n min-width: 84px;\n height: 32px;\n margin-left: 0;\n padding: 7px 14px;\n font-weight: 500;\n}\n\n.detail-view {\n min-height: 180px;\n}\n\n.detail-grid {\n display: grid;\n grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));\n gap: 14px 18px;\n margin: 0;\n}\n\n.media-detail-view {\n margin-bottom: 22px;\n}\n\n.media-detail-hero {\n display: grid;\n grid-template-columns: minmax(220px, 340px) minmax(0, 1fr);\n gap: 28px;\n align-items: stretch;\n}\n\n.media-detail-image {\n width: 100%;\n min-height: 220px;\n border-radius: var(--portal-radius-md, 12px);\n object-fit: cover;\n background: #eef3f8;\n}\n\n.media-detail-image.empty {\n border: 1px dashed #d8e0ea;\n}\n\n.media-detail-copy {\n display: grid;\n align-content: center;\n gap: 12px;\n min-width: 0;\n}\n\n.media-detail-copy h2 {\n margin: 0;\n color: #172033;\n font-size: 28px;\n line-height: 1.28;\n}\n\n.media-detail-copy p {\n margin: 0;\n color: #5f6b7a;\n font-size: 15px;\n line-height: 1.8;\n}\n\n.media-detail-grid {\n padding-top: 18px;\n border-top: 1px solid #edf0f5;\n}\n\n.detail-field {\n display: grid;\n gap: 6px;\n padding: 14px 0;\n border-bottom: 1px solid #edf0f5;\n}\n\n.detail-field.wide {\n grid-column: 1 / -1;\n}\n\n.detail-field dt {\n color: #7b8493;\n font-size: 13px;\n font-weight: 600;\n}\n\n.detail-field dd {\n margin: 0;\n color: #172033;\n font-size: 15px;\n line-height: 1.65;\n word-break: break-word;\n}\n\n.detail-image {\n width: 180px;\n height: 128px;\n border-radius: 4px;\n object-fit: cover;\n}\n\n.detail-actions {\n display: flex;\n flex-wrap: wrap;\n gap: 10px;\n margin-top: 18px;\n padding-top: 16px;\n border-top: 1px solid var(--portal-border, #e3e9f1);\n}\n\n.standalone-form-page {\n max-width: 920px;\n margin: 0 auto;\n}\n\n.form-group-card {\n margin-bottom: 18px;\n padding: 20px;\n border: 1px solid var(--portal-border, #e3e9f1);\n border-radius: var(--portal-radius-md, 12px);\n background: #f9fbfd;\n}\n\n.form-group-card h3 {\n margin: 0 0 16px;\n color: #172033;\n font-size: 16px;\n}\n\n.form-group-grid {\n display: grid;\n grid-template-columns: repeat(2, minmax(0, 1fr));\n gap: 0 18px;\n}\n\n.form-page-actions {\n display: flex;\n flex-wrap: wrap;\n justify-content: flex-end;\n gap: 10px;\n padding-top: 16px;\n border-top: 1px solid var(--portal-border, #e3e9f1);\n}\n\n.standalone-form-page >>> .el-date-editor,\n.standalone-form-page >>> .el-select,\n.standalone-form-page >>> .el-input {\n width: 100%;\n}\n\n@media (max-width: 720px) {\n .form-group-grid {\n grid-template-columns: 1fr;\n }\n}\n\n.empty-detail {\n display: flex;\n align-items: center;\n gap: 8px;\n min-height: 120px;\n color: #7b8493;\n}\n\n.pagination {\n max-width: 100%;\n margin-top: 14px;\n overflow-x: auto;\n overflow-y: hidden;\n text-align: right;\n white-space: nowrap;\n}\n\n.portal-page >>> .portal-dialog {\n max-width: calc(100vw - 32px);\n border-radius: var(--portal-radius-md, 12px);\n overflow: hidden;\n box-shadow: var(--portal-shadow-md, 0 18px 44px rgba(15, 23, 42, 0.12));\n}\n\n.portal-page >>> .portal-dialog .el-dialog__header {\n padding: 22px 24px 16px;\n border-bottom: 1px solid var(--portal-border, #e3e9f1);\n}\n\n.portal-page >>> .portal-dialog .el-dialog__title {\n color: var(--portal-text, #172033);\n font-size: 18px;\n font-weight: 700;\n}\n\n.portal-page >>> .portal-dialog .el-dialog__body {\n max-height: min(68vh, 720px);\n padding: 22px 24px;\n overflow-y: auto;\n}\n\n.portal-page >>> .portal-dialog .el-dialog__footer {\n padding: 16px 24px 20px;\n border-top: 1px solid var(--portal-border, #e3e9f1);\n}\n\n.danger-text {\n color: #f56c6c;\n}\n\n.table-image {\n width: 52px;\n height: 52px;\n border-radius: 4px;\n}\n\n.avatar-uploader .avatar {\n display: block;\n width: 96px;\n height: 96px;\n object-fit: cover;\n}\n\n.avatar-uploader-icon {\n width: 96px;\n height: 96px;\n border: 1px dashed #d9d9d9;\n border-radius: 4px;\n color: #8c939d;\n line-height: 96px;\n text-align: center;\n}\n\n.file-link {\n margin-top: 6px;\n color: #606266;\n word-break: break-all;\n}\n\n.rich-text-editor >>> .ql-editor {\n min-height: 160px;\n}\n\n.business-action-hint {\n margin: 0 0 18px;\n padding: 10px 12px;\n border-radius: 4px;\n color: #606266;\n background: #f5f7fa;\n line-height: 1.6;\n}\n\n.business-action-hint + .el-form .el-date-editor,\n.business-action-hint + .el-form .el-select,\n.business-action-hint + .el-form .el-input,\n.el-dialog .el-form .el-date-editor,\n.el-dialog .el-form .el-select {\n width: 100%;\n}\n\n\n@media (max-width: 720px) {\n .split-data-panel {\n grid-template-columns: 1fr;\n }\n\n .split-data-panel .panel-heading,\n .split-data-panel .resource-table,\n .split-data-panel .resource-card-grid,\n .split-data-panel .pagination {\n grid-column: 1;\n }\n\n .panel-heading {\n align-items: flex-start;\n flex-direction: column;\n }\n\n .filter-item {\n width: 100%;\n }\n\n .data-panel {\n padding: 16px;\n border-radius: var(--portal-radius-sm, 8px);\n }\n\n .panel-heading {\n margin-bottom: 18px;\n }\n\n .panel-heading h2 {\n font-size: 21px;\n }\n\n .panel-actions,\n .filter-bar {\n width: 100%;\n }\n\n .filter-bar {\n padding: 12px;\n }\n\n .filter-bar .el-button {\n flex: 1 1 auto;\n }\n\n .resource-card-grid {\n grid-template-columns: 1fr;\n }\n\n .resource-card-item {\n padding: 16px;\n }\n\n .media-detail-hero {\n grid-template-columns: 1fr;\n }\n\n .media-detail-image {\n min-height: 200px;\n max-height: 340px;\n }\n\n .pagination {\n text-align: center;\n }\n\n .pagination >>> .el-pagination__sizes,\n .pagination >>> .el-pagination__jump {\n display: none;\n }\n\n .portal-page >>> .portal-dialog {\n width: calc(100vw - 24px) !important;\n margin-top: 6vh !important;\n }\n\n .portal-page >>> .portal-dialog .el-dialog__header,\n .portal-page >>> .portal-dialog .el-dialog__body,\n .portal-page >>> .portal-dialog .el-dialog__footer {\n padding-left: 16px;\n padding-right: 16px;\n }\n\n .portal-page >>> .portal-dialog .el-dialog__body {\n max-height: 72vh;\n }\n\n .portal-page >>> .portal-dialog .el-form-item__label,\n .standalone-form-page >>> .el-form-item__label {\n float: none;\n width: auto !important;\n padding: 0 0 8px;\n line-height: 1.4;\n text-align: left;\n }\n\n .portal-page >>> .portal-dialog .el-form-item__content,\n .standalone-form-page >>> .el-form-item__content {\n margin-left: 0 !important;\n }\n}\n</style>\n', 'admin', '2026-07-15 11:18:32', '', NULL);
INSERT INTO `sys_template_file` VALUES (920312, 9203, 'frontend-login.vue.vm', NULL, 'frontend-login.vue.vm', '#set($portalProjectName = $projectName)\n#if(!$portalProjectName || $portalProjectName == \"\")\n#set($portalProjectName = $functionName)\n#end\n#if(!$portalProjectName || $portalProjectName == \"\")\n#set($portalProjectName = \"Portal\")\n#end\n#set($portalDefaultPath = $defaultFrontendPath)\n#if(!$portalDefaultPath || $portalDefaultPath == \"\")\n#set($portalDefaultPath = $requestPath)\n#end\n<template>\n <section class=\"portal-login\">\n <div class=\"login-visual\" aria-hidden=\"true\">\n <div class=\"login-brand\">\n <span class=\"login-logo\"></span>\n <strong>${portalProjectName}</strong>\n </div>\n <h1>欢迎使用</h1>\n <p>登录后继续访问项目功能与个人服务。</p>\n </div>\n\n <div class=\"login-panel\">\n <div class=\"login-heading\">\n <span>欢迎回来</span>\n <h2>账号登录</h2>\n </div>\n\n <el-alert\n v-if=\"roleOptions.length === 0\"\n title=\"当前没有可登录的前台角色,请联系管理员检查系统角色配置。\"\n type=\"warning\"\n :closable=\"false\"\n class=\"login-alert\"\n />\n\n <el-form :model=\"form\" label-position=\"top\" class=\"login-form\" @submit.native.prevent>\n#if($showPortalRoleSelector)\n <el-form-item label=\"登录角色\">\n <el-select v-model=\"form.roleCode\" placeholder=\"请选择登录角色\" class=\"role-select\">\n <el-option\n v-for=\"role in roleOptions\"\n :key=\"role.value\"\n :label=\"role.label\"\n :value=\"role.value\"\n />\n </el-select>\n </el-form-item>\n#end\n <el-form-item label=\"账号\">\n <el-input v-model=\"form.account\" placeholder=\"请输入账号\" prefix-icon=\"el-icon-user\" />\n </el-form-item>\n <el-form-item label=\"密码\">\n <el-input v-model=\"form.password\" type=\"password\" placeholder=\"请输入密码\" prefix-icon=\"el-icon-lock\" show-password />\n </el-form-item>\n <el-button type=\"primary\" class=\"login-button\" :loading=\"loading\" :disabled=\"roleOptions.length === 0\" @click=\"handleLogin\">登录</el-button>\n </el-form>\n </div>\n </section>\n</template>\n\n<script>\nconst roleOptions = [\n#foreach($role in $portalAuthBindings)\n { label: \"${role.roleNameLiteral}\", value: \"${role.roleCodeLiteral}\", sampleAccount: \"${role.sampleAccountLiteral}\" }#if($foreach.hasNext),#end\n#end\n]\n\nconst defaultRole = roleOptions.length > 0 ? roleOptions[0] : null\n\nexport default {\n name: \"PortalLogin\",\n data() {\n return {\n loading: false,\n roleOptions,\n form: {\n roleCode: defaultRole ? defaultRole.value : \"\",\n account: defaultRole ? defaultRole.sampleAccount : \"\",\n password: \"123456\"\n }\n }\n },\n watch: {\n \"form.roleCode\"(roleCode) {\n const role = this.roleOptions.find(item => item.value === roleCode)\n if (role && (!this.form.account || this.roleOptions.some(item => item.sampleAccount === this.form.account))) {\n this.form.account = role.sampleAccount\n }\n }\n },\n methods: {\n handleLogin() {\n if (!this.form.roleCode) {\n this.#[[$message]]#.warning(\"请选择登录角色\")\n return\n }\n if (!this.form.account || !this.form.password) {\n this.#[[$message]]#.warning(\"请输入账号和密码\")\n return\n }\n\n this.loading = true\n this.request.post(\"/auth/login\", this.form)\n .then(res => {\n if (!res || res.code !== \"200\" || !res.data || !res.data.token) {\n throw new Error((res && res.msg) || \"登录失败\")\n }\n localStorage.setItem(\"portal-token\", res.data.token)\n localStorage.setItem(\"portal-user\", JSON.stringify(res.data.user || {\n account: this.form.account,\n displayName: this.form.account,\n roleCode: this.form.roleCode\n }))\n window.dispatchEvent(new Event(\"portal-user-change\"))\n this.#[[$message]]#.success(\"登录成功\")\n const redirect = this.#[[$route]]#.query.redirect || \"${portalDefaultPath}\"\n this.#[[$router]]#.push(redirect)\n })\n .catch(error => {\n this.#[[$message]]#.error(error.message || \"登录失败\")\n })\n .finally(() => {\n this.loading = false\n })\n }\n }\n}\n</script>\n\n<style scoped>\n.portal-login {\n display: grid;\n grid-template-columns: minmax(0, 1fr) minmax(430px, 36vw);\n min-height: 100vh;\n background: linear-gradient(132deg, var(--portal-primary), var(--portal-accent));\n}\n\n.login-visual {\n position: relative;\n display: flex;\n min-width: 0;\n flex-direction: column;\n justify-content: center;\n overflow: hidden;\n padding: 72px clamp(48px, 8vw, 128px);\n color: #ffffff;\n}\n\n.login-visual::before {\n position: absolute;\n inset: 0;\n display: block;\n content: \"\";\n opacity: 0.58;\n background:\n linear-gradient(42deg, transparent 0 18%, rgba(255, 255, 255, 0.18) 18% 27%, transparent 27% 100%),\n linear-gradient(132deg, transparent 0 48%, rgba(246, 186, 51, 0.32) 48% 55%, transparent 55% 100%);\n}\n\n.login-brand,\n.login-visual h1,\n.login-visual p {\n position: relative;\n z-index: 1;\n}\n\n.login-brand {\n display: inline-flex;\n align-items: center;\n gap: 12px;\n margin-bottom: 40px;\n font-size: 22px;\n}\n\n.login-logo {\n width: 30px;\n height: 30px;\n border-radius: 9px 19px 9px 19px;\n background: linear-gradient(135deg, #6de5e8 0 38%, #f6c85b 38% 66%, #ffffff 66%);\n transform: rotate(45deg);\n box-shadow: 0 8px 22px rgba(15, 23, 42, 0.18);\n}\n\n.login-visual h1,\n.login-visual p {\n margin: 0;\n}\n\n.login-visual h1 {\n max-width: 680px;\n font-size: clamp(42px, 5vw, 64px);\n font-weight: 700;\n letter-spacing: 0;\n line-height: 1.18;\n}\n\n.login-visual p {\n max-width: 520px;\n margin-top: 20px;\n color: rgba(255, 255, 255, 0.88);\n font-size: 17px;\n line-height: 1.8;\n}\n\n.login-panel {\n display: flex;\n flex-direction: column;\n justify-content: center;\n padding: clamp(40px, 5vw, 64px);\n background: #ffffff;\n box-shadow: -18px 0 48px rgba(15, 23, 42, 0.08);\n}\n\n.login-heading span {\n color: var(--portal-primary, #167d83);\n font-size: 14px;\n font-weight: 700;\n}\n\n.login-heading h2 {\n margin: 8px 0 28px;\n color: #111827;\n font-size: 30px;\n font-weight: 700;\n letter-spacing: 0;\n}\n\n.login-alert {\n margin-bottom: 18px;\n}\n\n.login-form {\n display: grid;\n gap: 2px;\n}\n\n.role-select,\n.login-button {\n width: 100%;\n}\n\n.login-form >>> .el-input__inner,\n.login-form >>> .el-select .el-input__inner {\n height: 44px;\n border-color: #dfe5ec;\n border-radius: 8px;\n}\n\n.login-form >>> .el-input__inner:focus {\n border-color: var(--portal-primary, #167d83);\n box-shadow: 0 0 0 3px rgba(22, 125, 131, 0.12);\n}\n\n.login-button {\n height: 44px;\n margin-top: 10px;\n border-color: var(--portal-primary, #167d83);\n border-radius: 8px;\n background: var(--portal-primary, #167d83);\n font-weight: 600;\n box-shadow: 0 10px 22px rgba(22, 125, 131, 0.18);\n}\n\n.login-button:hover,\n.login-button:focus {\n border-color: var(--portal-primary-strong, #11656a);\n background: var(--portal-primary-strong, #11656a);\n}\n\n@media (max-width: 880px) {\n .portal-login {\n grid-template-columns: 1fr;\n }\n\n .login-visual {\n min-height: 220px;\n padding: 34px 26px;\n }\n\n .login-visual h1 {\n font-size: 34px;\n }\n\n .login-brand {\n margin-bottom: 28px;\n }\n\n .login-panel {\n padding: 34px 24px 44px;\n box-shadow: none;\n }\n}\n\n@media (max-width: 520px) {\n .login-visual {\n min-height: 184px;\n padding: 26px 22px;\n }\n\n .login-brand {\n margin-bottom: 20px;\n font-size: 18px;\n }\n\n .login-visual h1 {\n font-size: 30px;\n }\n\n .login-visual p {\n margin-top: 10px;\n font-size: 14px;\n }\n}\n</style>\n', 'admin', '2026-07-15 11:18:32', '', NULL);
INSERT INTO `sys_template_file` VALUES (920313, 9203, 'frontend-dict.js.vm', NULL, 'frontend-dict.js.vm', 'const dictData = {}\r\n#foreach ($column in $columns)\r\n#if($column.dictOptions && $column.dictOptions != \"\")\r\n#set($dictKey = $column.dictType)\r\n#if(!$dictKey || $dictKey == \"\")\r\n#set($dictKey = $column.columnName)\r\n#end\r\ndictData[\"${dictKey}\"] = ${column.dictOptions}\r\n#end\r\n#end\r\n\r\nconst emptyDict = []\r\n\r\nfunction normalizeOptions(options) {\r\n if (!Array.isArray(options)) {\r\n return emptyDict\r\n }\r\n return options.map((option) => {\r\n const label = option.label || option.name || option.value\r\n const value = option.value || label\r\n return {\r\n ...option,\r\n label,\r\n name: option.name || label,\r\n value\r\n }\r\n })\r\n}\r\n\r\nexport default {\r\n getDictDataByType(type) {\r\n return normalizeOptions(dictData[type])\r\n },\r\n getDictLabel(type, value) {\r\n if (value === undefined || value === null || value === \"\") {\r\n return \"-\"\r\n }\r\n const matched = normalizeOptions(dictData[type]).find((option) => String(option.value) === String(value))\r\n return matched ? matched.label : value\r\n }\r\n}', 'admin', '2026-07-15 11:18:32', '', NULL);
-- ----------------------------
-- Table structure for sys_user
-- ----------------------------
DROP TABLE IF EXISTS `sys_user`;
CREATE TABLE `sys_user` (
`user_id` bigint(20) NOT NULL AUTO_INCREMENT COMMENT '用户ID',
`dept_id` bigint(20) NULL DEFAULT NULL COMMENT '部门ID',
`user_name` varchar(30) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NOT NULL COMMENT '用户账号',
`nick_name` varchar(30) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NOT NULL COMMENT '用户昵称',
`user_type` varchar(2) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT '00' COMMENT '用户类型00系统用户',
`email` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT '' COMMENT '用户邮箱',
`phonenumber` varchar(11) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT '' COMMENT '手机号码',
`sex` char(1) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT '0' COMMENT '用户性别0男 1女 2未知',
`avatar` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT '' COMMENT '头像地址',
`password` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT '' COMMENT '密码',
`status` char(1) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT '0' COMMENT '帐号状态0正常 1停用',
`del_flag` char(1) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT '0' COMMENT '删除标志0代表存在 2代表删除',
`login_ip` varchar(128) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT '' COMMENT '最后登录IP',
`login_date` datetime(0) NULL DEFAULT NULL COMMENT '最后登录时间',
`create_by` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT '' COMMENT '创建者',
`create_time` datetime(0) NULL DEFAULT NULL COMMENT '创建时间',
`update_by` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT '' COMMENT '更新者',
`update_time` datetime(0) NULL DEFAULT NULL COMMENT '更新时间',
`remark` varchar(500) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '备注',
PRIMARY KEY (`user_id`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 100 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_0900_ai_ci COMMENT = '用户信息表' ROW_FORMAT = Dynamic;
-- ----------------------------
-- Records of sys_user
-- ----------------------------
INSERT INTO `sys_user` VALUES (1, 103, 'admin', '若依', '00', 'ry@163.com', '15888888888', '1', '', '$2a$10$7JB720yubVSZvUI0rEqK/.VqGOZTH.ulu33dHOiBE8ByOhJIrdAu2', '0', '0', '127.0.0.1', '2026-07-15 12:12:06', 'admin', '2026-07-14 14:56:29', '', '2026-07-15 12:12:05', '管理员');
INSERT INTO `sys_user` VALUES (2, 105, 'ry', '若依', '00', 'ry@qq.com', '15666666666', '1', '', '$2a$10$7JB720yubVSZvUI0rEqK/.VqGOZTH.ulu33dHOiBE8ByOhJIrdAu2', '0', '0', '127.0.0.1', '2026-07-14 14:56:29', 'admin', '2026-07-14 14:56:29', '', NULL, '测试员');
-- ----------------------------
-- Table structure for sys_user_post
-- ----------------------------
DROP TABLE IF EXISTS `sys_user_post`;
CREATE TABLE `sys_user_post` (
`user_id` bigint(20) NOT NULL COMMENT '用户ID',
`post_id` bigint(20) NOT NULL COMMENT '岗位ID',
PRIMARY KEY (`user_id`, `post_id`) USING BTREE
) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_0900_ai_ci COMMENT = '用户与岗位关联表' ROW_FORMAT = Dynamic;
-- ----------------------------
-- Records of sys_user_post
-- ----------------------------
INSERT INTO `sys_user_post` VALUES (1, 1);
INSERT INTO `sys_user_post` VALUES (2, 2);
-- ----------------------------
-- Table structure for sys_user_role
-- ----------------------------
DROP TABLE IF EXISTS `sys_user_role`;
CREATE TABLE `sys_user_role` (
`user_id` bigint(20) NOT NULL COMMENT '用户ID',
`role_id` bigint(20) NOT NULL COMMENT '角色ID',
PRIMARY KEY (`user_id`, `role_id`) USING BTREE
) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_0900_ai_ci COMMENT = '用户和角色关联表' ROW_FORMAT = Dynamic;
-- ----------------------------
-- Records of sys_user_role
-- ----------------------------
INSERT INTO `sys_user_role` VALUES (1, 1);
INSERT INTO `sys_user_role` VALUES (2, 2);
-- ----------------------------
-- Procedure structure for InsertTestData
-- ----------------------------
DROP PROCEDURE IF EXISTS `InsertTestData`;
delimiter ;;
CREATE DEFINER=`root`@`localhost` PROCEDURE `InsertTestData`()
BEGIN
DECLARE i INT DEFAULT 0;
DECLARE student_id VARCHAR(20);
DECLARE name VARCHAR(50);
DECLARE chinese_score DECIMAL(5,2);
DECLARE math_score DECIMAL(5,2);
DECLARE foreign_language_score DECIMAL(5,2);
DECLARE physics_score DECIMAL(5,2);
DECLARE chemistry_score DECIMAL(5,2);
DECLARE biology_score DECIMAL(5,2);
DECLARE history_score DECIMAL(5,2);
DECLARE geography_score DECIMAL(5,2);
DECLARE politics_score DECIMAL(5,2);
DECLARE additional_chinese_score DECIMAL(5,2);
DECLARE total_score DECIMAL(10,2);
DECLARE srank INT;
DECLARE school_name VARCHAR(100);
DECLARE county_city_district VARCHAR(100);
DECLARE first_choice_subject VARCHAR(50);
DECLARE second_choice_subject VARCHAR(50);
WHILE i < 200 DO
SET student_id = CONCAT('S', LPAD(FLOOR(RAND() * 1000000), 6, '0'));
SET name = CONCAT('学生', LPAD(i, 2, '0'));
SET chinese_score = ROUND(RAND() * (150 - 0) + 0, 2);
SET math_score = ROUND(RAND() * (150 - 0) + 0, 2);
SET foreign_language_score = ROUND(RAND() * (150 - 0) + 0, 2);
SET physics_score = ROUND(RAND() * (100 - 0) + 0, 2);
SET chemistry_score = ROUND(RAND() * (100 - 0) + 0, 2);
SET biology_score = ROUND(RAND() * (100 - 0) + 0, 2);
SET history_score = ROUND(RAND() * (100 - 0) + 0, 2);
SET geography_score = ROUND(RAND() * (100 - 0) + 0, 2);
SET politics_score = ROUND(RAND() * (100 - 0) + 0, 2);
SET additional_chinese_score = ROUND(RAND() * (150 - 0) + 0, 2);
SET total_score = chinese_score + math_score + foreign_language_score + physics_score + chemistry_score + biology_score + history_score + geography_score + politics_score + additional_chinese_score;
SET srank = FLOOR(RAND() * 200) + 1;
SET school_name = CONCAT('学校', LPAD(FLOOR(RAND() * 100), 2, '0'));
SET county_city_district = CONCAT('县(市、区)', LPAD(FLOOR(RAND() * 1000), 3, '0'));
SET first_choice_subject = IF(RAND() > 0.5, '物理', '历史');
SET second_choice_subject = IF(RAND() > 0.5, '化学', '地理');
INSERT INTO `sys_student_scores`
(`student_id`, `name`, `chinese`, `math`, `foreign_language`, `physics`, `chemistry`, `biology`, `history`, `geography`, `politics`, `additional_chinese`, `total_score`, `srank`, `school_name`, `county_city_district`, `first_choice_subject`, `second_choice_subject`)
VALUES
(student_id, name, chinese_score, math_score, foreign_language_score, physics_score, chemistry_score, biology_score, history_score, geography_score, politics_score, additional_chinese_score, total_score, srank, school_name, county_city_district, first_choice_subject, second_choice_subject);
SET i = i + 1;
END WHILE;
END
;;
delimiter ;
-- ----------------------------
-- Table structure for gen_table_project_rel
-- Consolidated from gen_table_project_rel.sql
-- ----------------------------
DROP TABLE IF EXISTS `gen_table_project_rel`;
CREATE TABLE `gen_table_project_rel` (
`id` bigint(20) NOT NULL AUTO_INCREMENT,
`table_id` bigint(20) NOT NULL,
`project_id` bigint(20) NOT NULL,
PRIMARY KEY (`id`)
) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_0900_ai_ci COMMENT = '项目与代码生成表关系' ROW_FORMAT = Dynamic;
-- ----------------------------
-- Plugin JDBC target tables
-- Consolidated from factory_plugin_sql_target.sql
-- ----------------------------
DROP TABLE IF EXISTS `factory_plugin_target_receipt`;
CREATE TABLE `factory_plugin_target_receipt` (
`receipt_id` bigint(20) NOT NULL AUTO_INCREMENT COMMENT 'Target receipt ID',
`step_idempotency_key` char(64) NOT NULL COMMENT 'Stable control-side logical step key',
`environment_code` varchar(64) NOT NULL COMMENT 'Configured isolated environment',
`plugin_code` varchar(100) NOT NULL COMMENT 'Plugin code',
`plugin_version` varchar(50) NOT NULL COMMENT 'Plugin release version',
`direction` varchar(20) NOT NULL COMMENT 'APPLY or ROLLBACK',
`content_hash` char(64) NOT NULL COMMENT 'Trusted contribution content SHA-256',
`status` varchar(20) NOT NULL COMMENT 'RUNNING, SUCCEEDED, FAILED',
`lease_token` varchar(64) DEFAULT '' COMMENT 'Current target execution lease token',
`lease_until` datetime DEFAULT NULL COMMENT 'Target execution lease expiry',
`execution_count` int NOT NULL DEFAULT 1 COMMENT 'Target claim count',
`external_receipt` varchar(255) DEFAULT '' COMMENT 'Deterministic target receipt',
`last_error` varchar(1000) DEFAULT '' COMMENT 'Sanitized target error',
`started_at` datetime DEFAULT NULL COMMENT 'Latest target execution start',
`finished_at` datetime DEFAULT NULL COMMENT 'Target terminal time',
`updated_at` datetime NOT NULL COMMENT 'Target receipt update time',
PRIMARY KEY (`receipt_id`),
UNIQUE KEY `uk_factory_plugin_target_step` (`step_idempotency_key`),
KEY `idx_factory_plugin_target_status` (`status`, `lease_until`),
KEY `idx_factory_plugin_target_release` (`plugin_code`, `plugin_version`)
) ENGINE = InnoDB AUTO_INCREMENT = 100 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_0900_ai_ci COMMENT = 'Plugin JDBC target idempotency receipts' ROW_FORMAT = Dynamic;
DROP TABLE IF EXISTS `factory_plugin_target_permission`;
CREATE TABLE `factory_plugin_target_permission` (
`permission_code` varchar(100) NOT NULL COMMENT 'Owned RuoYi permission identifier',
`plugin_code` varchar(100) NOT NULL COMMENT 'Owning Plugin code',
`plugin_version` varchar(50) NOT NULL COMMENT 'Active owning Plugin version',
`contribution_key` varchar(255) NOT NULL COMMENT 'Immutable permission contribution key',
`document_fingerprint` char(64) NOT NULL COMMENT 'Semantic permission document SHA-256',
`display_name` varchar(50) NOT NULL COMMENT 'Owned button display name',
`parent_permission_code` varchar(100) NOT NULL COMMENT 'Stable parent permission identifier',
`parent_menu_id` bigint(20) NOT NULL COMMENT 'Resolved target-local parent menu ID',
`menu_id` bigint(20) NOT NULL COMMENT 'Generated target-local button menu ID',
`status` varchar(20) NOT NULL COMMENT 'ACTIVE or REMOVED',
`created_at` datetime NOT NULL COMMENT 'First ownership creation time',
`activated_at` datetime NOT NULL COMMENT 'Latest activation time',
`removed_at` datetime DEFAULT NULL COMMENT 'Latest compensation time',
`updated_at` datetime NOT NULL COMMENT 'Ownership update time',
PRIMARY KEY (`permission_code`),
UNIQUE KEY `uk_factory_plugin_target_permission_menu` (`menu_id`),
KEY `idx_factory_plugin_target_permission_release` (`plugin_code`, `plugin_version`),
KEY `idx_factory_plugin_target_permission_status` (`status`)
) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_0900_ai_ci COMMENT = 'Plugin-owned RuoYi permission lifecycle' ROW_FORMAT = Dynamic;
DROP TABLE IF EXISTS `factory_plugin_target_permission_role`;
CREATE TABLE `factory_plugin_target_permission_role` (
`permission_code` varchar(100) NOT NULL COMMENT 'Owned RuoYi permission identifier',
`role_key` varchar(100) NOT NULL COMMENT 'Stable RuoYi role key',
`role_id` bigint(20) NOT NULL COMMENT 'Resolved target-local role ID',
`menu_id` bigint(20) NOT NULL COMMENT 'Owned target-local button menu ID',
PRIMARY KEY (`permission_code`, `role_key`),
UNIQUE KEY `uk_factory_plugin_target_permission_role_id` (`role_id`, `menu_id`),
KEY `idx_factory_plugin_target_permission_role_menu` (`menu_id`)
) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_0900_ai_ci COMMENT = 'Plugin-owned RuoYi role permission grants' ROW_FORMAT = Dynamic;
DROP TABLE IF EXISTS `factory_plugin_target_menu`;
CREATE TABLE `factory_plugin_target_menu` (
`menu_key` varchar(100) NOT NULL COMMENT 'Stable Plugin menu contribution key',
`plugin_code` varchar(100) NOT NULL COMMENT 'Owning Plugin code',
`plugin_version` varchar(50) NOT NULL COMMENT 'Active owning Plugin version',
`contribution_key` varchar(255) NOT NULL COMMENT 'Immutable menu contribution key',
`document_fingerprint` char(64) NOT NULL COMMENT 'Semantic menu document SHA-256',
`display_name` varchar(50) NOT NULL COMMENT 'Owned page menu display name',
`parent_path` varchar(200) NOT NULL COMMENT 'Stable parent RuoYi route path',
`parent_menu_id` bigint(20) NOT NULL COMMENT 'Resolved target-local parent menu ID',
`path` varchar(200) NOT NULL COMMENT 'Owned page route path',
`component` varchar(255) NOT NULL COMMENT 'Owned admin component path',
`route_name` varchar(50) NOT NULL COMMENT 'Owned stable route name',
`icon` varchar(100) NOT NULL COMMENT 'Owned RuoYi menu icon',
`order_num` int NOT NULL COMMENT 'Owned sibling display order',
`required_permission_code` varchar(100) NOT NULL COMMENT 'Required factory-owned permission',
`required_permission_menu_id` bigint(20) NOT NULL COMMENT 'Resolved permission button menu ID',
`menu_id` bigint(20) NOT NULL COMMENT 'Generated target-local page menu ID',
`status` varchar(20) NOT NULL COMMENT 'ACTIVE or REMOVED',
`created_at` datetime NOT NULL COMMENT 'First ownership creation time',
`activated_at` datetime NOT NULL COMMENT 'Latest activation time',
`removed_at` datetime DEFAULT NULL COMMENT 'Latest compensation time',
`updated_at` datetime NOT NULL COMMENT 'Ownership update time',
PRIMARY KEY (`menu_key`),
UNIQUE KEY `uk_factory_plugin_target_menu_id` (`menu_id`),
KEY `idx_factory_plugin_target_menu_route` (`parent_menu_id`, `path`),
KEY `idx_factory_plugin_target_menu_release` (`plugin_code`, `plugin_version`),
KEY `idx_factory_plugin_target_menu_status` (`status`),
KEY `idx_factory_plugin_target_menu_permission` (`required_permission_code`)
) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_0900_ai_ci COMMENT = 'Plugin-owned RuoYi page menu lifecycle' ROW_FORMAT = Dynamic;
DROP TABLE IF EXISTS `factory_plugin_target_menu_role`;
CREATE TABLE `factory_plugin_target_menu_role` (
`menu_key` varchar(100) NOT NULL COMMENT 'Stable Plugin menu contribution key',
`role_key` varchar(100) NOT NULL COMMENT 'Stable RuoYi role key',
`role_id` bigint(20) NOT NULL COMMENT 'Resolved target-local role ID',
`menu_id` bigint(20) NOT NULL COMMENT 'Owned target-local page menu ID',
PRIMARY KEY (`menu_key`, `role_key`),
UNIQUE KEY `uk_factory_plugin_target_menu_role_id` (`role_id`, `menu_id`),
KEY `idx_factory_plugin_target_menu_role_menu` (`menu_id`)
) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_0900_ai_ci COMMENT = 'Plugin-owned RuoYi role page menu grants' ROW_FORMAT = Dynamic;
SET FOREIGN_KEY_CHECKS = 1;