Projet

Général

Profil

US #888 » 4_Compensation.sql

ahlem belgacem, 07/02/2025 16:28

 
1

    
2
use socle;
3
CREATE TABLE company_compensation (
4
	id INT AUTO_INCREMENT PRIMARY KEY,
5
    
6
    country  varchar(255) NULL,
7
	city  varchar(255) NULL,
8
    
9
	site VARCHAR(1) NULL,
10
	matricule VARCHAR(255) NULL,
11
	department VARCHAR(255) NULL,
12
	`function` VARCHAR(255) NULL,
13
	internal_grade VARCHAR(255) NULL,
14
    
15
	gender VARCHAR(2) NULL,
16
	birthday  VARCHAR(255) NULL,
17
    hiring_date  VARCHAR(255) NULL,
18
	function_code VARCHAR(255) NULL, 
19
	subfunction_code VARCHAR(255) NULL, -- changed instead of discipline_code 
20
    
21
	collaborative_path VARCHAR(255) NULL, -- changed instead of level_career_path  
22
	grade VARCHAR(255) NULL, -- changed instead of job_grade
23
	number_employees_supervised INT NULL,
24
	devise VARCHAR(10) NULL,
25
	gross_annual_salary Decimal(10,3),
26
    
27
	number_monthly_salary VARCHAR(255) NULL,
28
	type_overtime_pay VARCHAR(255) NULL,
29
	seniority_bonus Decimal(10,3) NULL, -- new
30
	schooling_allowance Decimal(10,3) NULL, -- new
31
	meal_allowance Decimal(10,3)  NULL,
32
    
33
	location_allowance Decimal(10,3)  NULL,
34
	transportation_allowance Decimal(10,3)  NULL,
35
	other_bonuses_awarded_last_year Decimal(10,3) NULL , -- changed instead of other_bonuses_awarded
36
	fixed_allowances Decimal(10,3),
37
	eligibility_performance_bonus VARCHAR(1) NULL,
38
    
39
	target_performance_bonus Decimal(3,3),
40
	total_amount_performance_bonus_awarded Decimal(10,3),
41
	eligibility_commissions VARCHAR(1) NULL,
42
	target_variable_sales_compensation Decimal(3,3) NULL ,
43
	total_amount_sales_bonus_awarded Decimal(10,3) NULL,
44
    
45
	total_amount_sales_commissions_awarded Decimal(10,3) NULL,
46
	car_benefit_eligibility VARCHAR(1) NULL,
47
	annual_cost_car_depreciation Decimal(10,3) NULL,
48
    car_allocation_eligibility varchar(1) NULL ,
49
	annual_cost_car_allocation Decimal(10,3) NULL ,
50
    
51
    job VARCHAR(255) NULL,
52
	companyId INT NULL,
53
	FOREIGN KEY (companyId) REFERENCES company(id) ON DELETE CASCADE ON UPDATE CASCADE
54
);
(6-6/10)