企业🤖AI智能体构建引擎,智能编排和调试,一键部署,支持私有化部署方案 广告
~~~[sql] CREATE TABLE `xi_dealer` ( `id` int(11) unsigned NOT NULL AUTO_INCREMENT, `parent_id` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '父ID', `username` varchar(32) NOT NULL DEFAULT '' COMMENT '用户名', `password` char(32) NOT NULL DEFAULT '' COMMENT '密码', `auth_key` varchar(32) DEFAULT NULL COMMENT '认证密钥', `mobile` varchar(16) NOT NULL DEFAULT '' COMMENT '手机号码', `sort` tinyint(3) unsigned NOT NULL DEFAULT '0' COMMENT '排序', `is_trash` tinyint(1) unsigned NOT NULL DEFAULT '0' COMMENT '删除,0=>否,1=>是', `status` tinyint(1) unsigned NOT NULL DEFAULT '1' COMMENT '状态,0=>禁用,1=>启用', `created_at` int(11) unsigned NOT NULL DEFAULT '1451577600' COMMENT '创建时间', `updated_at` int(11) unsigned NOT NULL DEFAULT '1451577600' COMMENT '更新时间', PRIMARY KEY (`id`), UNIQUE KEY `username` (`username`), UNIQUE KEY `mobile` (`mobile`), UNIQUE KEY `auth_key` (`auth_key`) ) ENGINE=InnoDB AUTO_INCREMENT=1 DEFAULT CHARSET=utf8mb4 COMMENT='商家'; ~~~ ~~~[sql] CREATE TABLE `xi_dealer_apply` ( `id` int(11) unsigned NOT NULL AUTO_INCREMENT, `stores_name` varchar(64) NOT NULL DEFAULT '' COMMENT '店铺名称', `stores_cate_id` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '店铺分类', `province` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '省份', `city` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '城市', `district` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '地区', `twon` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '乡镇', `address` varchar(128) NOT NULL DEFAULT '' COMMENT '详细地址', `mobile` varchar(16) NOT NULL COMMENT '手机号码', `realname` varchar(16) NOT NULL DEFAULT '' COMMENT '真实姓名', `idcard_number` varchar(32) NOT NULL DEFAULT '' COMMENT '身份证号码', `idcard_image` varchar(255) NOT NULL DEFAULT '' COMMENT '身份证图片', `business_license_number` varchar(64) NOT NULL DEFAULT '' COMMENT '营业执照号码', `business_license_image` varchar(255) NOT NULL DEFAULT '' COMMENT '营业执照图片', `industry_additional_image` varchar(255) NOT NULL DEFAULT '' COMMENT '行业附加图片', `is_trash` tinyint(1) unsigned NOT NULL DEFAULT '0' COMMENT '删除,0=>否,1=>是', `status` tinyint(1) unsigned NOT NULL DEFAULT '1' COMMENT '状态,0=>禁用,1=>启用', `created_at` int(11) unsigned NOT NULL DEFAULT '1451577600' COMMENT '创建时间', `updated_at` int(11) unsigned NOT NULL DEFAULT '1451577600' COMMENT '更新时间', PRIMARY KEY (`id`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='商家申请'; ~~~ ~~~[sql] CREATE TABLE `xi_dealer_auth_assignment` ( `dealer_id` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '商家ID', `role_id` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '角色ID', `created_at` int(11) unsigned NOT NULL DEFAULT '1451577600' COMMENT '创建时间', UNIQUE KEY `dealer_id` (`dealer_id`,`role_id`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='商家权限分配'; ~~~ ~~~[sql] CREATE TABLE `xi_dealer_auth_permission` ( `id` int(11) unsigned NOT NULL AUTO_INCREMENT, `menu_id` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '菜单ID', `title` varchar(32) NOT NULL DEFAULT '' COMMENT '规则唯一标题', `module` varchar(64) NOT NULL DEFAULT '' COMMENT '模块', `controller` varchar(64) NOT NULL DEFAULT '' COMMENT '控制器', `name` varchar(64) NOT NULL DEFAULT '' COMMENT '规则唯一标识', `condition` varchar(128) NOT NULL COMMENT '规则表达式', `icon` varchar(16) NOT NULL DEFAULT '' COMMENT '图标', `sort` tinyint(3) unsigned NOT NULL DEFAULT '0' COMMENT '排序', `is_menu_show` tinyint(1) unsigned NOT NULL DEFAULT '0' COMMENT '是否菜单显示', `is_trash` tinyint(1) unsigned NOT NULL DEFAULT '0' COMMENT '删除,0=>否,1=>是', `status` tinyint(1) unsigned NOT NULL DEFAULT '1' COMMENT '状态,0=>禁用,1=>启用', `created_at` int(11) unsigned NOT NULL DEFAULT '1451577600' COMMENT '创建时间', `updated_at` int(11) unsigned NOT NULL DEFAULT '1451577600' COMMENT '更新时间', PRIMARY KEY (`id`), UNIQUE KEY `name` (`name`,`is_trash`) ) ENGINE=InnoDB AUTO_INCREMENT=1 DEFAULT CHARSET=utf8mb4 COMMENT='商家权限条目'; ~~~ ~~~[sql] CREATE TABLE `xi_dealer_auth_role` ( `id` int(11) unsigned NOT NULL AUTO_INCREMENT, `dealer_id` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '商家ID', `name` varchar(16) CHARACTER SET utf8 NOT NULL DEFAULT '' COMMENT '名称', `permissions` text CHARACTER SET utf8 NOT NULL COMMENT '权限', `description` varchar(128) CHARACTER SET utf8 NOT NULL DEFAULT '' COMMENT '描述', `is_default` int(1) unsigned NOT NULL DEFAULT '0' COMMENT '是否默认', `is_trash` tinyint(1) unsigned NOT NULL DEFAULT '0' COMMENT '删除,0=>否,1=>是', `status` tinyint(1) unsigned NOT NULL DEFAULT '1' COMMENT '状态,0=>禁用,1=>启用', `created_at` int(11) unsigned NOT NULL DEFAULT '1451577600' COMMENT '创建时间', `updated_at` int(11) unsigned NOT NULL DEFAULT '1451577600' COMMENT '更新时间', PRIMARY KEY (`id`), UNIQUE KEY `name` (`name`,`dealer_id`) ) ENGINE=InnoDB AUTO_INCREMENT=1 DEFAULT CHARSET=utf8mb4 COMMENT='商家权限角色'; ~~~ ~~~[sql] CREATE TABLE `xi_dealer_menu` ( `id` int(11) unsigned NOT NULL AUTO_INCREMENT, `parent_id` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '父ID', `name` varchar(16) NOT NULL DEFAULT '' COMMENT '标题', `module` varchar(32) NOT NULL DEFAULT '' COMMENT '模块', `icon` varchar(32) NOT NULL DEFAULT '' COMMENT '图标', `sort` tinyint(3) unsigned NOT NULL DEFAULT '0' COMMENT '排序', `is_trash` tinyint(1) unsigned NOT NULL DEFAULT '0' COMMENT '删除,0=>否,1=>是', `status` tinyint(1) unsigned NOT NULL DEFAULT '1' COMMENT '状态,0=>禁用,1=>启用', `created_at` int(11) unsigned NOT NULL DEFAULT '1451577600' COMMENT '创建时间', `updated_at` int(11) unsigned NOT NULL DEFAULT '1451577600' COMMENT '更新时间', PRIMARY KEY (`id`), UNIQUE KEY `name` (`name`,`parent_id`,`module`,`is_trash`) ) ENGINE=InnoDB AUTO_INCREMENT=1 DEFAULT CHARSET=utf8mb4 COMMENT='商家菜单'; ~~~ ~~~[sql] CREATE TABLE `xi_dealer_wallet` ( `id` int(11) unsigned NOT NULL AUTO_INCREMENT, `dealer_id` int(11) unsigned NOT NULL COMMENT '商家ID', `money` decimal(10,2) NOT NULL DEFAULT '0.00' COMMENT '金额', `is_trash` tinyint(1) unsigned NOT NULL DEFAULT '0' COMMENT '删除,0=>否,1=>是', `status` tinyint(1) unsigned NOT NULL DEFAULT '1' COMMENT '状态,0=>禁用,1=>启用', `created_at` int(11) unsigned NOT NULL DEFAULT '1451577600' COMMENT '创建时间', `updated_at` int(11) unsigned NOT NULL DEFAULT '1451577600' COMMENT '更新时间', PRIMARY KEY (`id`), UNIQUE KEY `dealer_id` (`dealer_id`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 ROW_FORMAT=COMPACT COMMENT='商家钱包'; ~~~ ~~~[sql] CREATE TABLE `xi_dealer_wallet_log` ( `id` int(11) unsigned NOT NULL AUTO_INCREMENT, `dealer_id` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '商家ID', `wallet_id` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '钱包ID', `operator_id` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '操作者ID', `recharge_sn` varchar(32) NOT NULL DEFAULT '' COMMENT '充值唯一编码,生成规则用的是订单sn号的规则', `operate` tinyint(1) unsigned NOT NULL DEFAULT '0' COMMENT '操作', `money` decimal(10,2) unsigned NOT NULL DEFAULT '0.00' COMMENT '金额', `before` decimal(10,2) unsigned NOT NULL DEFAULT '0.00' COMMENT '变动前', `after` decimal(10,2) unsigned NOT NULL DEFAULT '0.00' COMMENT '变动后', `remark` varchar(128) NOT NULL DEFAULT '' COMMENT '备注', `is_trash` tinyint(1) unsigned NOT NULL DEFAULT '0' COMMENT '删除,0=>否,1=>是', `status` tinyint(1) unsigned NOT NULL DEFAULT '1' COMMENT '状态,0=>禁用,1=>启用', `created_at` int(11) unsigned NOT NULL DEFAULT '1451577600' COMMENT '创建时间', `updated_at` int(11) unsigned NOT NULL DEFAULT '1451577600' COMMENT '更新时间', PRIMARY KEY (`id`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 ROW_FORMAT=COMPACT COMMENT='商家钱包记录'; ~~~