

-- 2021.07.02 增加系统权限白名单用户
insert into `business`(`id`,`no`,`name`,`type`,`group_id`,`created_at`,`created_by`,`updated_at`,`updated_by`,`is_extend`,`object`,`dependent_business`,`sort_order`,`is_preset`) values
('KCACepyI','system_perm_white_user','权限白名单用户','FORM','yGRrw3qG','1625136137','1','1625136137','1','1','system\\SystemPermWhiteUser',null,'61','0')
;

insert into `business_operation`(`id`,`app_id`,`business_id`,`no`,`route`,`name`,`is_preset`) values
('A5kE2tEW','1','KCACepyI','assign-users','system/perm-white-user/assign-users','创建','1')
                                                                                                   ,('A929fss8','1','KCACepyI','update','business/instance/form/operation/custom/update','更新','1')
                                                                                                   ,('dlMyfSCJ','1','KCACepyI','find-one','business/instance/form/operation/custom/find-one','详情','1')
                                                                                                   ,('eCygB9ZH','1','KCACepyI','delete','system/perm-white-user/delete','删除','1')
                                                                                                   ,('h2mHrgGM','1','KCACepyI','search','system/perm-white-user/search','搜索','1')
;

/* 表business_component 不存在数据，跳过 */


insert into `business_entity`(`id`,`no`,`business_id`,`parent_entity_id`,`name`,`type`,`is_preset`,`form_component_id`,`meta_profile`,`updated_at`,`created_at`,`sort_order`) values
('C8Naxmsu','created_at','KCACepyI','SkuxmR94','创建日期','Date','1','0','{}','1625136137','1625136137','4')
                                                                                                                                                                                   ,('EmzqInQC','user_id','KCACepyI','SkuxmR94','用户ID','Integer','0','0','{\"integer\":{\"parser\":\"IntegerParser\",\"negative\":false}}','1625136247','1625136247','9998')
                                                                                                                                                                                   ,('Jd24qg72','created_by','KCACepyI','SkuxmR94','创建人','SystemUser','1','0','{\"relationQuery\":{\"parser\":\"FieldJoinTable\",\"source\":\"system_perm_white_user\",\"sourceField\":\"created_by\",\"target\":\"system_user_profile\",\"targetField\":\"user_id\",\"targetDisplayField\":\"realname\"}}','1625136137','1625136137','3')
                                                                                                                                                                                   ,('MeK3inPf','id','KCACepyI','SkuxmR94','主键','Integer','1','0','{}','1625136137','1625136137','10002')
                                                                                                                                                                                   ,('SkuxmR94','system_perm_white_user','KCACepyI','0\0\0\0\0\0\0\0','权限白名单用户','MainEntity','0','0','{\"extendInfo\":{\"parser\":\"EntityExtendInfo\",\"table\":\"system_perm_white_user\",\"paimaryField\":\"id\",\"displayFields\":[\"name\"],\"displayFieldsSeparator\":\"-\"}}','1625136137','1625136137','10000')
                                                                                                                                                                                   ,('dzlPoVg0','updated_by','KCACepyI','SkuxmR94','更新人','SystemUser','1','0','{\"relationQuery\":{\"parser\":\"FieldJoinTable\",\"source\":\"system_perm_white_user\",\"sourceField\":\"updated_by\",\"target\":\"system_user_profile\",\"targetField\":\"user_id\",\"targetDisplayField\":\"realname\"}}','1625136137','1625136137','1')
                                                                                                                                                                                   ,('i21M2XVl','data_status','KCACepyI','SkuxmR94','数据状态','Enum','1','0','{\"statusLabelEnum\":{\"parser\":\"StatusLabelEnum\",\"source\":\"system_perm_white_user\",\"sourceField\":\"data_status\",\"data\":[{\"value\":0,\"text\":\"失效\",\"statusIcon\":\"DISABLE\"},{\"value\":1,\"text\":\"暂存\",\"statusIcon\":\"PAUSE\"},{\"value\":2,\"text\":\"生效\",\"statusIcon\":\"ENABLE\"}]}}','1625136137','1625136137','10001')
                                                                                                                                                                                   ,('lLhpgVsh','perm_id','KCACepyI','SkuxmR94','权限ID','Integer','0','0','{\"integer\":{\"parser\":\"IntegerParser\",\"negative\":false}}','1625136226','1625136226','9999')
                                                                                                                                                                                   ,('nO1p2uV6','updated_at','KCACepyI','SkuxmR94','更新日期','Date','1','0','{}','1625136137','1625136137','2')
;

/* 表business_event 不存在数据，跳过 */


insert into `business_field`(`id`,`form_entity_id`,`table`,`business_id`,`field`,`name`,`is_required`,`type`,`length`,`is_unsigned`,`default`,`comment`,`zero_fill`,`is_build`,`build_at`,`update_build_at`,`created_at`,`updated_at`,`sort_order`) values
('JTjy9ntI','MeK3inPf','system_perm_white_user','KCACepyI','id','主键','1','int','11',null,'AUTO_INCREMENT','system preset field','0','1','1625136138','1625136138','1625136137','1625136138','10002')
                                                                                                                                                                                                                                                         ,('JnvhP8Wt','C8Naxmsu','system_perm_white_user','KCACepyI','created_at','创建日期','0','int','11',null,'0','system preset field','0','1','1625136138','1625136138','1625136137','1625136138','4')
                                                                                                                                                                                                                                                         ,('LOZXMb3X','nO1p2uV6','system_perm_white_user','KCACepyI','updated_at','更新日期','0','int','11',null,'0','system preset field','0','1','1625136138','1625136138','1625136137','1625136138','2')
                                                                                                                                                                                                                                                         ,('TJbUF2iA','lLhpgVsh','system_perm_white_user','KCACepyI','perm_id','权限ID','1','int','11','1','0','权限ID','0','1','1625136226',null,'1625136226','1625136226','9999')
                                                                                                                                                                                                                                                         ,('Y1IwifBM','Jd24qg72','system_perm_white_user','KCACepyI','created_by','创建人','1','int','11',null,'0','system preset field','0','1','1625136138','1625136138','1625136137','1625136138','3')
                                                                                                                                                                                                                                                         ,('dX9KbnoP','i21M2XVl','system_perm_white_user','KCACepyI','data_status','数据状态','1','int','11',null,'2','system preset field','0','1','1625136138','1625136138','1625136137','1625136138','10001')
                                                                                                                                                                                                                                                         ,('t9jyIlTo','EmzqInQC','system_perm_white_user','KCACepyI','user_id','用户ID','0','int','11','1','0','用户ID','0','1','1625136247',null,'1625136247','1625136247','9998')
                                                                                                                                                                                                                                                         ,('z5RB2sNL','dzlPoVg0','system_perm_white_user','KCACepyI','updated_by','更新人','0','int','11',null,'0','system preset field','0','1','1625136138','1625136138','1625136137','1625136138','1')
;

/* 表business_page 不存在数据，跳过 */


/* 表business_plugin 不存在数据，跳过 */


insert into `business_table`(`table`,`form_entity_id`,`business_id`,`engine`,`charset`,`collate`,`is_build`,`build_at`,`update_build_at`,`created_at`,`updated_at`,`is_required`,`sort_order`) values
('system_perm_white_user','SkuxmR94','KCACepyI','InnoDB','utf8','utf8_general_ci','1','1625136138','1625136138','1625136137','1625136138','1','10000')
;

/* 表business_page_solution 不存在数据，跳过 */


insert into `system_perm`(`id`,`name`,`app_id`,`business_id`,`operation_id`,`route`,`sort_order`,`created_at`,`updated_at`) values
('4075','创建','1','KCACepyI','A5kE2tEW','system/perm-white-user/assign-users','0','1625136137','1625136137')
                                                                                                                                 ,('4077','删除','1','KCACepyI','eCygB9ZH','system/perm-white-user/delete','0','1625136137','1625136137')
                                                                                                                                 ,('4093','搜索','1','KCACepyI','h2mHrgGM','system/perm-white-user/search','0','1625136138','1625136138')
                                                                                                                                 ,('4160','详情','1','KCACepyI','dlMyfSCJ','business/instance/form/operation/custom/find-one','0','1628043881','1628043881')
                                                                                                                                 ,('4161','更新','1','KCACepyI','A929fss8','business/instance/form/operation/custom/update','0','1628043999','1628043999')
;



/* 业务对象的相关菜单 */



/* 业务对象数据表结构清除 */


/* 业务对象数据表结构 */
CREATE TABLE `system_perm_white_user` (
                                          `id` int(11) NOT NULL AUTO_INCREMENT COMMENT 'system preset field',
                                          `data_status` int(11) NOT NULL DEFAULT '2' COMMENT 'system preset field',
                                          `created_at` int(11) DEFAULT '0' COMMENT 'system preset field',
                                          `created_by` int(11) NOT NULL DEFAULT '0' COMMENT 'system preset field',
                                          `updated_at` int(11) DEFAULT '0' COMMENT 'system preset field',
                                          `updated_by` int(11) DEFAULT '0' COMMENT 'system preset field',
                                          `perm_id` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '权限ID',
                                          `user_id` int(11) unsigned DEFAULT '0' COMMENT '用户ID',
                                          PRIMARY KEY (`id`),
                                          UNIQUE KEY `user_id` (`user_id`,`perm_id`)
) ENGINE=InnoDB AUTO_INCREMENT=1 DEFAULT CHARSET=utf8 COMMENT='权限白名单用户';

INSERT INTO `system_app_menu` VALUES
('301', '1', '13', '2', '13,301', '权限白名单', '/system/perm/white-user/list', '999', '1', null, null, '0', '1', '1');