CREATE TABLE `users` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `slug` varchar(11) NOT NULL,  
  `user_name` varchar(100) NOT NULL,
  `user_email` varchar(100) NOT NULL,
  `user_phone` int(12) NOT NULL,
  `user_password` varchar(120) NOT NULL,  
  `user_role` enum('Admin','Modeller','Forecaster','Business Manager') DEFAULT 'Admin',
  `created_on` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
  PRIMARY KEY (`id`)
);

CREATE TABLE `user_roles` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `slug` varchar(11) NOT NULL,  
  `role` varchar(100) NOT NULL,
  `access` varchar(100) NOT NULL,
  `created_on` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
  PRIMARY KEY (`id`)
);

INSERT INTO users (slug,user_name,user_email,user_phone, user_password,user_role) VALUES ('URKJ901MEF','Anil Kumar','anil.kumar8@wns.com','9876543210','$2y$10$b6o8aWdmIKyT/RXqIPyCOOm5NXjoSO/ngdPDnPwFboBeatfi.7RJK','Admin');

INSERT INTO user_roles (slug,role,access) VALUES ('UR89JK1BHG','Admin','{​​"admin":"Y", "model":"Y", "forecast":"Y", "reporting":"Y" }');

INSERT INTO user_roles (slug,role,access) VALUES ('UR687DFEJK','Modeller','{​​"admin":"N", "model":"Y", "forecast":"Y", "reporting":"Y" }');

INSERT INTO user_roles (slug,role,access) VALUES ('UR12LKMDYU','Forecaster','{​​"admin":"N", "model":"N", "forecast":"Y", "reporting":"Y" }');

INSERT INTO user_roles (slug,role,access) VALUES ('URVB45CX9G','Business Manager','{​​"admin":"N", "model":"N", "forecast":"N", "reporting":"Y" }');


​​​