SET DEFINE OFF;
-- Insert critical seed data
DELETE FROM 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', SYSDATE, SYSDATE, 'admin', SYSDATE, '', NULL, '管理员');
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', SYSDATE, SYSDATE, 'admin', SYSDATE, '', NULL, '测试员');

DELETE FROM SYS_ROLE;
INSERT INTO SYS_ROLE VALUES('1', '超级管理员', 'admin', 1, '1', 1, 1, '0', '0', 'admin', SYSDATE, '', NULL, '超级管理员');
INSERT INTO SYS_ROLE VALUES('2', '普通角色', 'common', 2, '2', 1, 1, '0', '0', 'admin', SYSDATE, '', NULL, '普通角色');

DELETE FROM SYS_USER_ROLE;
INSERT INTO SYS_USER_ROLE VALUES('1', '1');
INSERT INTO SYS_USER_ROLE VALUES('2', '2');

DELETE FROM SYS_USER_POST;
INSERT INTO SYS_USER_POST VALUES('1', '1');
INSERT INTO SYS_USER_POST VALUES('2', '2');

DELETE FROM 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');

COMMIT;

SELECT 'user count: ' || COUNT(*) FROM SYS_USER;
SELECT 'role count: ' || COUNT(*) FROM SYS_ROLE;
