-- user: admin
insert into skin_user(user_id, group_id, user_name, nick_name, user_mail, mobile_phone, password, user_salt, secret_key, user_level, user_gender, user_avatar, user_signature, create_time, update_time, expire_time, last_login_time, last_login_ip, locked, user_status, user_order)
    values (1, 0, 'admin', '管理员', 'admin@163.com', '###########', 'dbe6fcfe8b12d96906e429f8eed209ea0eef8c5aace44cfde07b62d3781b57bc', '6ae77773', '0000000000', 0, 1, '', '最简单的长寿秘诀———保持呼吸，不要断气', '2018-12-22 14:40:22', '2018-12-22 14:40:22', '5000-01-01 00:00:00', '2018-12-22 14:40:22', '127.0.0.1', 0, 1, 1);

-- common_group: Common SQL
insert into webcat_common_group(id, group_name, database_type, sys_enabled, dba_enabled, app_enabled, dev_enabled, create_time, update_time)
    values (1, 'Common SQL', 'mysql', 1, 1, 1, 1, '2020-01-23 15:48:34', '2020-01-23 15:48:36');

insert into webcat_common_group(id, group_name, database_type, sys_enabled, dba_enabled, app_enabled, dev_enabled, create_time, update_time)
    values (2, 'Common SQL', 'oracle', 1, 1, 1, 1, '2020-01-23 15:48:34', '2020-01-23 15:48:36');

-- mysql common_sql: Common SQL
insert into webcat_common_sql(id, group_id, group_name, query_name, database_type, query_summary, query_sql, create_time, update_time)
    values (2, 1, 'Common SQL', 'Process List', 'mysql', 'show processlist\r\n', 'show processlist', '2020-01-20 21:38:06', '2020-01-20 21:38:06');

insert into webcat_common_sql(id, group_id, group_name, query_name, database_type, query_summary, query_sql, create_time, update_time)
    values (3, 1, 'Common SQL', 'Global Status', 'mysql', 'show global status\r\n', 'show global status', '2020-01-20 21:23:03', '2020-01-20 21:23:03');

insert into webcat_common_sql(id, group_id, group_name, query_name, database_type, query_summary, query_sql, create_time, update_time)
    values (4, 1, 'Common SQL', 'Global Variables', 'mysql', 'show global variables\r\n', 'show global variables', '2020-01-20 21:23:25', '2020-01-20 21:23:25');

insert into webcat_common_sql(id, group_id, group_name, query_name, database_type, query_summary, query_sql, create_time, update_time)
    values (7, 1, 'Common SQL', 'InnoDB 事务', 'mysql', 'select * from information_schema.INNODB_TRX\r\n', 'select * from information_schema.INNODB_TRX', '2020-01-20 21:37:37', '2020-01-20 21:37:37');

insert into webcat_common_sql(id, group_id, group_name, query_name, database_type, query_summary, query_sql, create_time, update_time)
    values (8, 1, 'Common SQL', 'InnoDB 锁', 'mysql', 'select * from information_schema.INNODB_LOCKS\r\n', 'select * from information_schema.INNODB_LOCKS', '2020-01-22 23:56:25', '2020-01-22 23:56:25');

insert into webcat_common_sql(id, group_id, group_name, query_name, database_type, query_summary, query_sql, create_time, update_time)
    values (9, 1, 'Common SQL', 'InnoDB 锁等待', 'mysql', 'select * from information_schema.INNODB_LOCK_WAITS\r\n', 'select * from information_schema.INNODB_LOCK_WAITS', '2020-01-22 23:56:13', '2020-01-22 23:56:13');

-- oracle common_sql: Common SQL
insert into webcat_common_sql(id, group_id, group_name, query_name, database_type, query_summary, query_sql, create_time, update_time)
    values (5, 2, 'Common SQL', '表容量', 'oracle', 'select\r\nSEGMENT_NAME AS TABLE_NAME,\r\nSEGMENT_TYPE AS TABLE_TYPE,\r\nNULL         AS ENGINE,\r\nNULL         AS TABLE_ROWS,\r\nBYTES        AS DATA_LENGTH,\r\n', 'select\r\n    SEGMENT_NAME AS TABLE_NAME,\r\n    SEGMENT_TYPE AS TABLE_TYPE,\r\n    NULL         AS ENGINE,\r\n    NULL         AS TABLE_ROWS,\r\n    BYTES        AS DATA_LENGTH,\r\n    NULL         AS INDEX_LENGTH,\r\n    NULL         AS TABLE_COLLATION,\r\n    NULL         AS TABLE_COMMENT\r\nfrom USER_SEGMENTS\r\nwhere TABLESPACE_NAME = \'${tablespace}\'\r\n    and SEGMENT_TYPE = \'TABLE\'', '2020-01-20 05:28:43', '2020-01-20 05:28:43');

insert into webcat_common_sql(id, group_id, group_name, query_name, database_type, query_summary, query_sql, create_time, update_time)
    values (1, 2, 'Common SQL', '序列', 'oracle', 'select\r\n    sequence_name,\r\n    min_value,\r\n    max_value,\r\n    increment_by,\r\n    cycle_flag,\r\n    order_flag,\r\n    cache_size,\r\n    last_number\r\nfrom user_sequences\r\norder by sequence_name;', 'select\r\n    sequence_name,\r\n    min_value,\r\n    max_value,\r\n    increment_by,\r\n    cycle_flag,\r\n    order_flag,\r\n    cache_size,\r\n    last_number\r\nfrom user_sequences\r\norder by sequence_name;', '2020-01-19 06:19:05', '2020-01-19 06:19:07');

-- mail template
insert ignore into webcat_mail_template(name, content, create_time, update_time) values ('OTP_RESET_MAIL_TPL', '<h2 data-user-name="${userName}">${nickName}, 您的 OTP Secret Key 已重置！</h2>\r\n\r\n<p>请按以下方式激活手机动态口令：</p>\r\n<p>1. 下载安装 Google Authenticator；</p>\r\n<p>2. 使用 Google Authenticator 扫描下方二维码或者手动输入下方的 OTP 密钥激活动态口令；</p>\r\n\r\n<p><img style="width: 200px; height: 200px; border: none;" src="${qrcode}"/></p>\r\n<p>OTP 密钥: ${secretKey}</p>\r\n\r\n<h3>如何安装 Google Authenticator ?</h3>\r\n<p>安卓用户请在应用商店中搜索 Google Authenticator。</p>\r\n<p>苹果用户请在 AppStore 中搜索 Google Authenticator。</p>\r\n', '2021-04-21 12:04:15', '2021-04-21 12:04:15');
insert ignore into webcat_mail_template(name, content, create_time, update_time) values ('DATABASE_ORDER_SUBMIT_NOTIFY_TPL', '<h2 data-user-id="${user.userId}" data-user-name="${user.userName}" data-nick-name="${user.nickName}" data-order-id="${workOrder.orderId}">${workOrder.orderName}</h2>\n\n<p>审批地址：<a href="${workOrder.url}" target="_blank">${workOrder.url}</a></p>\n', '2021-04-21 12:04:15', '2021-04-21 12:04:15');
insert ignore into webcat_mail_template(name, content, create_time, update_time) values ('TABLE_ORDER_SUBMIT_NOTIFY_TPL', '<h2 data-user-id="${user.userId}" data-user-name="${user.userName}" data-nick-name="${user.nickName}" data-order-id="${workOrder.orderId}">${workOrder.orderName}</h2>\n\n<p>审批地址：<a href="${workOrder.url}" target="_blank">${workOrder.url}</a></p>\n', '2021-04-21 12:04:15', '2021-04-21 12:04:15');
insert ignore into webcat_mail_template(name, content, create_time, update_time) values ('BASE_CHANGE_ORDER_SUBMIT_NOTIFY_TPL', '<h2 data-user-id="${user.userId}" data-user-name="${user.userName}" data-nick-name="${user.nickName}" data-order-id="${workOrder.orderId}">${workOrder.orderName}</h2>\n\n<p>审批地址：<a href="${workOrder.url}" target="_blank">${workOrder.url}</a></p>\n', '2021-04-21 12:04:15', '2021-04-21 12:04:15');
insert ignore into webcat_mail_template(name, content, create_time, update_time) values ('DATA_CHANGE_ORDER_SUBMIT_NOTIFY_TPL', '<h2 data-user-id="${user.userId}" data-user-name="${user.userName}" data-nick-name="${user.nickName}" data-order-id="${workOrder.orderId}">${workOrder.orderName}</h2>\n\n<p>审批地址：<a href="${workOrder.url}" target="_blank">${workOrder.url}</a></p>\n', '2021-04-21 12:04:15', '2021-04-21 12:04:15');
insert ignore into webcat_mail_template(name, content, create_time, update_time) values ('DATA_EXPORT_ORDER_SUBMIT_NOTIFY_TPL', '<h2 data-user-id="${user.userId}" data-user-name="${user.userName}" data-nick-name="${user.nickName}" data-order-id="${workOrder.orderId}">${workOrder.orderName}</h2>\n\n<p>审批地址：<a href="${workOrder.url}" target="_blank">${workOrder.url}</a></p>\n', '2021-04-21 12:04:15', '2021-04-21 12:04:15');

