Projet

Général

Profil

US #888 » 7_script_init_company_solution.sql

ahlem belgacem, 07/02/2025 16:30

 
1
use socle;
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
-- initialise profils
6
INSERT INTO company_profile (id, title, profile_code, companyId) VALUES 
7
(1, 'admin', 'admin solution', 1),
8
(2, 'RH', 'RH', 1);
9
-- initialise compagny
10
INSERT INTO company_users (id, firstName, lastName, email, user_password, phone, avatar, companyId,actif) VALUES 
11
(1,'Tarek', 'HR Group', 'tarek.aouadi@gmail.com', '$2a$08$eHBsdVKusKPV/mg2KJ1cW.JqnW1EkNo37HIjqh/ma7nw7jzUfKUt6', 333312455, 'default-avatar.png', 1,1),
12
(2,'Ahlem', 'HR Group', 'ahlem.belgacem@wingedhorses.net', '$2a$08$eHBsdVKusKPV/mg2KJ1cW.JqnW1EkNo37HIjqh/ma7nw7jzUfKUt6', 333312455, 'default-avatar.png', 1,1),
13
(3,'Yousra', 'HR Group', 'yousra.ziada@groupe-rh.com', '$2a$08$eHBsdVKusKPV/mg2KJ1cW.JqnW1EkNo37HIjqh/ma7nw7jzUfKUt6', 333312455, 'default-avatar.png', 1,1),
14
(4,'Ibtihel', 'HR Group', 'ibtihel.benhaddej@groupe-rh.com', '$2a$08$eHBsdVKusKPV/mg2KJ1cW.JqnW1EkNo37HIjqh/ma7nw7jzUfKUt6', 333312455, 'default-avatar.png', 1,1);
15
-- initialise compagny
16
INSERT INTO company_user_profile (id,usersId, profileId)VALUES 
17
(1,1, 1),
18
(2,2, 1),
19
(3,3, 1),
20
(4,4, 2);
21
INSERT INTO company_entities (id,entity_code, title,state, entity_level, parentId, companyId)
22
VALUES (1,'solution', 'solution', false, '0', '0', 1);
23
-- insert into languages_company
24
INSERT INTO company_languages (id, active, defaultLanguage, languagesId, companyId) VALUES 
25
(1, 'true', 0, '1', 1),
26
(2, 'true', 1, '2', 1);
27

    
28
INSERT INTO company_solution_menu (id, state, companyId, menuCode) VALUES
29
(1, '1', 1, 'home'),
30
(2, '1', 1, 'home_administration'),
31
(3, '1', 1, 'home_administration_clients'),
32
(4, '1', 1, 'home_administration_secteurs'),
33
(5, '1', 1, 'home_administration_subscription'),
34
(6, '1', 1, 'home_administrationemployees_per_region'),
35
(7, '1', 1, 'myCompany'),
36
(8, '1', 1, 'myCompany_informations'),
37
(9, '1', 1, 'myCompany_users'),
38
(10, '1', 1, 'myCompany_entities'),
39
(11, '1', 1, 'myCompany_profiles'),
40
(12, '1', 1, 'myCompany_configuration'),
41
(13, '1', 1, 'myCompany_settings'),
42
(14, '1', 1, 'myCompany_settings_language'),
43
(15, '1', 1, 'myClients'),
44
(16, '1', 1, 'myClients_clients'),
45
(17, '1', 1, 'client_informations'),
46
(18, '1', 1, 'client_users'),
47
(19, '1', 1, 'client_entities'),
48
(20, '1', 1, 'client_profiles'),
49
(21, '1', 1, 'client_configuration'),
50
(22, '1', 1, 'myClients_prospection'),
51
(23, '1', 1, 'administration'),
52
(24, '1', 1, 'administration_settings'),
53
(25, '1', 1, 'administration_settings_language'),
54
(26, '1', 1, 'administration_settings_country'),
55
(27, '1', 1, 'administration_settings_business-sector'),
56
(28, '1', 1, 'administration_settings_turnover'),
57
(29, '1', 1, 'administration_settings_geographic-extent'),
58
(30, '1', 1, 'administration_settings_company-size'),
59
(31, '1', 1, 'administration_settings_value-chain'),
60
(32, '1', 1, 'administration_entities'),
61
(33, '1', 1, 'administration_subscription'),
62

    
63
-- For rh
64
(34, '1', 1, 'company_compensation'),
65
(35, '1', 1,'company_quiz'),
66
(36, '1', 1,'quiz_market'),
67
(37, '1', 1,'quiz_current_sector'),
68
(38, '1', 1,'quiz_selected_sector'),
69
(39, '1',1, 'home_indicators'),
70
(40, '1', 1,'home_indicateurs_number_of_employees'),
71
(41, '1', 1,'home_indicateurs_payroll'),
72
(42, '1',1, 'home_indicateurs_average_salaries_by_career_path'),
73
(43, '1',1, 'home_indicateurs_supervision_rate'),
74
(44, '1',1, 'home_administration_nbCollaborateursGender');
75
   
76

    
77
-- insert into company_menu_solution_profils
78
INSERT INTO company_solution_menu_profils (id,state, profileId, menuSolutionCompanyId) VALUES
79
(1,1, 1, 1),
80
(2,1, 1, 2),
81
(3,1, 1, 3),
82
(4,1, 1, 4),
83
(5,1, 1, 5),
84
(6,1, 1, 6),
85
(7,1, 1, 7),
86
(8,1, 1, 8),
87
(9,1, 1, 9),
88
(10,1, 1, 10),
89
(11,1, 1, 11),
90
(12,1, 1, 12),
91
(13,1, 1, 13),
92
(14,1, 1, 14),
93
(15,1, 1, 15),
94
(16,1, 1, 16),
95
(17,1, 1, 17),
96
(18,1, 1, 18),
97
(19,1, 1, 19),
98
(20,1, 1, 20),
99
(21,1, 1, 21),
100
(22,1, 1, 22),
101
(23,1, 1, 23),
102
(24,1, 1, 24),
103
(25,1, 1, 25),
104
(26,1, 1, 26),
105
(27,1, 1, 27),
106
(28,1, 1, 28),
107
(29,1, 1, 29),
108
(30,1, 1, 30),
109
(31,1, 1, 31),
110
(32,1, 1, 32),
111
(33,1, 1, 33);
112

    
113
-- For rh
114
INSERT INTO company_solution_menu_profils (state, profileId, menuSolutionCompanyId) VALUES
115
(1, 2, 1),
116
(1, 2, 34),
117
(1, 2, 35),
118
(1, 2, 36),
119
(1, 2, 37),
120
(1, 2, 38),
121
(1, 2, 39),
122
(1, 2, 40),
123
(1, 2, 41),
124
(1, 2, 42),
125
(1, 2, 43),
126
(1, 2, 44);
(10-10/10)