Projet

Général

Profil

PROD V(22) ACTUEL » 1_4_company_solution_init_values.sql

Tarek AOUADI, 08/08/2025 13:58

 
1
use salarymarket;
2
-- initialise by one company with one user (admin) for solution
3
INSERT INTO company (id, raisonSociale, logo, site, address, parentId,company_type,subscription_type) VALUES 
4
(1,'HR House International', 'default-avatar.png', 'example.com', 'Tunis, Tunisia', '1','Solution', 'Solution');
5

    
6
-- initialise  country  for solution company
7
INSERT INTO company_country (id, companyId, countryCode) VALUES 
8
('1', '1', 'TN');
9

    
10
-- initialise profils
11
INSERT INTO company_profile (id, title, profile_code, companyId) VALUES 
12
(1, 'admin', 'admin solution', 1),
13
(2, 'RH', 'RH', 1);
14

    
15
-- initialise compagny
16
INSERT INTO company_users (id, firstName, lastName, email, user_password, phone, avatar, companyId,actif) VALUES 
17
(1,'Tarek', 'HR Group', 'tarek.aouadi@gmail.com', '$2a$08$eHBsdVKusKPV/mg2KJ1cW.JqnW1EkNo37HIjqh/ma7nw7jzUfKUt6', 333312455, 'default-avatar.png', 1,1),
18
(2,'Ahlem', 'HR Group', 'ahlem.belgacem@wingedhorses.net', '$2a$08$eHBsdVKusKPV/mg2KJ1cW.JqnW1EkNo37HIjqh/ma7nw7jzUfKUt6', 333312455, 'default-avatar.png', 1,1),
19
(3,'Eya', 'HR Group', 'eya.dridi@groupe-rh.com', '$2a$08$eHBsdVKusKPV/mg2KJ1cW.JqnW1EkNo37HIjqh/ma7nw7jzUfKUt6', 333312455, 'default-avatar.png', 1,1),
20
(4,'Ibtihel', 'HR Group', 'ibtihel.benhaddej@groupe-rh.com', '$2a$08$eHBsdVKusKPV/mg2KJ1cW.JqnW1EkNo37HIjqh/ma7nw7jzUfKUt6', 333312455, 'default-avatar.png', 1,1);
21

    
22
-- initialise compagny
23
INSERT INTO company_user_profile (id,usersId, profileId)VALUES 
24
(1,1, 1),
25
(2,2, 1),
26
(3,3, 1),
27
(4,3, 2),
28
(5,4, 1),
29
(6,4, 2);
30

    
31
INSERT INTO company_entities (id,entity_code, title,state, entity_level, parentId, companyId)
32
VALUES (1,'solution', 'solution', false, '0', '0', 1);
33

    
34
-- insert into languages_company
35
INSERT INTO company_languages (id, active, defaultLanguage, languagesId, companyId) VALUES 
36
(1, 'true', 0, '1', 1),
37
(2, 'true', 1, '2', 1);
38

    
39
INSERT INTO company_solution_menu (id, state, companyId, menuCode) VALUES
40
(1, '1', 1, 'home'),
41
(2, '1', 1, 'home_administration'),
42
(3, '1', 1, 'home_administration_clients'),
43
(4, '1', 1, 'home_administration_secteurs'),
44
(5, '1', 1, 'home_administration_subscription'),
45
(6, '1', 1, 'home_administration_employees_per_region'),
46
(7, '1', 1, 'myCompany'),
47
(8, '1', 1, 'myCompany_informations'),
48
(9, '1', 1, 'myCompany_users'),
49
(10, '1', 1, 'myCompany_entities'),
50
(11, '1', 1, 'myCompany_profiles'),
51
(12, '1', 1, 'myCompany_configuration'),
52
(13, '1', 1, 'myCompany_settings'),
53
(14, '1', 1, 'myCompany_settings_language'),
54
(15, '1', 1, 'myClients'),
55
(16, '1', 1, 'myClients_clients'),
56
(17, '1', 1, 'client_informations'),
57
(18, '1', 1, 'client_users'),
58
(19, '1', 1, 'client_entities'),
59
(20, '1', 1, 'client_profiles'),
60
(21, '1', 1, 'client_configuration'),
61
(22, '1', 1, 'myClients_prospection'),
62
(23, '1', 1, 'administration'),
63
(24, '1', 1, 'administration_settings'),
64
(25, '1', 1, 'administration_settings_language'),
65
(26, '1', 1, 'administration_settings_country'),
66
(27, '1', 1, 'administration_settings_business-sector'),
67
(28, '1', 1, 'administration_settings_turnover'),
68
(29, '1', 1, 'administration_settings_geographic-extent'),
69
(30, '1', 1, 'administration_settings_company-size'),
70
(31, '1', 1, 'administration_settings_value-chain'),
71
(32, '1', 1, 'administration_entities'),
72
(33, '1', 1, 'administration_subscription'),
73
-- For rh
74
(34, '1', 1, 'company_compensation'),
75
(35, '1', 1,'company_quiz'),
76
(36, '1', 1,'quiz_market'),
77
(37, '1', 1,'quiz_current_sector'),
78
(38, '1',1, 'home_indicators'),
79
(39, '1', 1,'home_indicateurs_number_of_employees'),
80
(40, '1', 1,'home_indicateurs_payroll'),
81
(41, '1',1, 'home_indicateurs_median_salaries_by_career_path'),
82
(42, '1',1, 'home_indicateurs_supervision_rate'),
83
(43, '1',1, 'home_indicateurs_employees_per_gender'),
84
(44, '1',1, 'report');
85

    
86
-- insert into company_menu_solution_profils
87
INSERT INTO company_solution_menu_profils (id,state, profileId, menuSolutionCompanyId) VALUES
88
(1,1, 1, 1),
89
(2,1, 1, 2),
90
(3,1, 1, 3),
91
(4,1, 1, 4),
92
(5,1, 1, 5),
93
(6,1, 1, 6),
94
(7,1, 1, 7),
95
(8,1, 1, 8),
96
(9,1, 1, 9),
97
(10,1, 1, 10),
98
(11,1, 1, 11),
99
(12,1, 1, 12),
100
(13,1, 1, 13),
101
(14,1, 1, 14),
102
(15,1, 1, 15),
103
(16,1, 1, 16),
104
(17,1, 1, 17),
105
(18,1, 1, 18),
106
(19,1, 1, 19),
107
(20,1, 1, 20),
108
(21,1, 1, 21),
109
(22,1, 1, 22),
110
(23,1, 1, 23),
111
(24,1, 1, 24),
112
(25,1, 1, 25),
113
(26,1, 1, 26),
114
(27,1, 1, 27),
115
(28,1, 1, 28),
116
(29,1, 1, 29),
117
(30,1, 1, 30),
118
(31,1, 1, 31),
119
(32,1, 1, 32),
120
(33,1, 1, 33);
121
-- For rh
122
INSERT INTO company_solution_menu_profils (state, profileId, menuSolutionCompanyId) VALUES
123
(1, 2, 1),
124
(1, 2, 34),
125
(1, 2, 35),
126
(1, 2, 36),
127
(1, 2, 37),
128
(1, 2, 38),
129
(1, 2, 39),
130
(1, 2, 40),
131
(1, 2, 41),
132
(1, 2, 42),
133
(1, 2, 43),
134
(1, 2, 44);
(11-11/25)