-- Creation of init content. Scheme assumed to be empty
-- 
INSERT INTO roles (name, description) VALUES ('owner', "Owner of the company"); -- 1
INSERT INTO roles (name, description) VALUES ('manager', "Manager of the company"); -- 2
INSERT INTO roles (name, description) VALUES ('driver', "Driver user type"); -- 3
INSERT INTO roles (name, description) VALUES ('staff', "Member of the staff"); -- 4
INSERT INTO roles (name, description) VALUES ('warehouse', "Observer type of member"); -- 5

INSERT INTO permissions (name, description) VALUES ('owner', "Compatibility with Legacy while refactor in progress"); -- 1
INSERT INTO permissions (name, description) VALUES ('manager', "Compatibility with Legacy while refactor in progress"); -- 2
INSERT INTO permissions (name, description) VALUES ('driver', "Compatibility with Legacy while refactor in progress"); -- 3
INSERT INTO permissions (name, description) VALUES ('staff', "Compatibility with Legacy while refactor in progress"); -- 4
INSERT INTO permissions (name, description) VALUES ('warehouse', "Compatibility with Legacy while refactor in progress"); -- 5

INSERT INTO permissions (name, description) VALUES ('user.update', "Update user data"); -- 6
INSERT INTO permissions (name, description) VALUES ('user.create', "Create new users"); -- 7
INSERT INTO permissions (name, description) VALUES ('user.delete', "Delete users"); -- 8

INSERT INTO permissions (name, description) VALUES ('company.update', "Update company data"); -- 9
INSERT INTO permissions (name, description) VALUES ('company.delete', "Delete company"); -- 10

INSERT INTO permissions (name, description) VALUES ('loads.create', "Create loads"); -- 11
INSERT INTO permissions (name, description) VALUES ('loads.update', "Update loads data"); -- 12
INSERT INTO permissions (name, description) VALUES ('loads.delete', "Delete loads"); -- 13

INSERT INTO permissions (name, description) VALUES ('proposals.delete', "Delete loads"); -- 13
INSERT INTO permissions (name, description) VALUES ('proposals.delete', "Delete loads"); -- 13
INSERT INTO permissions (name, description) VALUES ('proposals.delete', "Delete loads"); -- 13

INSERT INTO role_permissions (role_id, permission_id) VALUES (1,1);
INSERT INTO role_permissions (role_id, permission_id) VALUES (2,2);
INSERT INTO role_permissions (role_id, permission_id) VALUES (3,3);
INSERT INTO role_permissions (role_id, permission_id) VALUES (4,4);
INSERT INTO role_permissions (role_id, permission_id) VALUES (5,5);
