create table Persona.TipoRemuneracion (
	IdTipoRemuneracion int not null primary key,
	Descripcion varchar(128) not null default ''
)

insert into Persona.TipoRemuneracion (IdTipoRemuneracion, Descripcion) VALUES
(1, 'Tipo 1'), (2, 'Tipo 2')

create table Persona.RangoComision (
	IdRangoComision  int not null primary key identity,
	MontoFinal decimal(16,2) not null default 0
)

insert into Persona.RangoComision (MontoFinal) VALUES
(150000), ( 600000)

create table Persona.ComisionConductor (
	IdComisionConductor  int not null primary key identity,
	IdConductor int not null foreign key references Persona.Conductor (IdConductor),
	IdRangoComision int not null foreign key references Persona.RangoComision (IdRangoComision),
	IdTipoRemuneracion int not null foreign key references Persona.TipoRemuneracion (IdTipoRemuneracion),
	PorcentajeComision decimal (16,2) not null default 0
)

alter table Transporte.TipoVehiculo add IdTipoRemuneracion int not null default 1 foreign key references Persona.TipoRemuneracion (IdTipoRemuneracion)


create table Persona.RangoTarifa (
	IdRangoTarifa int not null primary key identity,
	Horas decimal(16,2) not null default 0
)

INSERT INTO Persona.RangoTarifa (Horas) VALUES
(2), (5), (7)


create table Persona.TarifaConductor (
	IdComisionConductor  int not null primary key identity,
	IdConductor int not null foreign key references Persona.Conductor (IdConductor),
	IdRangoTarifa int not null foreign key references Persona.RangoTarifa (IdRangoTarifa),
	Tarifa decimal (16,2) not null default 0
)