Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- create table ejecutivo(
- id integer primary key not null,
- nombre_completo text not null
- );
- create table aseguradora (
- id integer primary key not null,
- nombre text not null
- );
- create table agente (
- clave text primary key not null,
- id_aseguradora integer references aseguradora on update cascade,
- nombre text not null
- );
- create table cliente_asegurado(
- id integer primary key not null,
- nombre text not null,
- apellido_paterno text not null,
- apellido_materno text not null , --juntar?
- genero boolean, --Las aseguradoras lo piden ?
- año_nacimiento text, --No existe formato date en sqlite
- RFC text, --posible id? not sure if nullable
- direccion text,
- numero_ext text, --Text porque a veces ponen 11-A
- colonia text,
- delegacion text,
- cp integer not null, --Las aseguradoras lo piden.
- ciudad text,
- telefono particular text,
- telefono_oficina text,
- celular text,
- correo_oficina text,
- correo_personal text,
- documentos text
- );
- create table marca (
- id_marca integer not null,
- nombre text,
- company text
- );
- create table tipo_vehiculo (
- id_tipo_vechiulo integer primary key not null,
- nombre text not null,
- descripcion text
- --Autos,Camion de hasta 3.5 toneladas, remolque y moto
- );
- create table modelo(
- id_modelo integer primary key not null,
- id_tipo_vehiculo references tipo_vehiculo on update cascade,
- id_marca integer references marca on update cascade,
- modelo_year integer not null,
- descripcion text,
- motor text
- );
- create table vehiculo(
- clave_vehiculo integer primary key not null,
- id_asegurado integer references asegurado on update cascade,
- id_modelo integer references modelo on update cascade,
- placas text, --not nullable?
- serie text,
- beneficiario_preferente text,
- descripcion text
- );
- create table tipo_extra (
- id integer primary key not null,
- nombre text --adaptacion, conversion, equipo_especial
- );
- create table extras(
- id_extras integer primary key not null,
- clave_vehiculo integer references vehiculo on update cascade,
- id_tipo_extra integer references tipo_extra on update cascade,
- descripcion text,
- suma_asegurada_adaptacion integer,
- beneficiario_preferente text
- );
- create table cobertura(
- id_tipo_cobertura integer primary key not null,
- cobertura text,
- descripcion text
- );
- create table poliza_individual (
- numero_de_poliza integer primary key not null, --posible conexion con administración
- clave_agente text not null references agente on update cascade,
- id_ejecutivo integer references ejecutivo on update cascade,
- id_aseguradora integer references aseguradora on update cascade,
- id_cliente_asegurado integer references cliente_asegurado on update cascade,
- id_tipo_cobertura integer not null references tipo_cobertura on update cascade,
- clave_vehiculo integer not null references vehiculo on update cascade,
- renovacion boolean not null,
- caratula text,
- inicio_vigencia text, --No hay formato fecha pero se guardara yyyy-mm-dd
- fin_vigencia text,
- forma_de_pago text,
- status text,
- derecho de polizas text,
- recargo_fraccionario real,
- iva real,
- descripcion_poliza text,
- observaciones text,
- documentos text,
- pago_total real,
- comision_total real
- );
- create table pagos(
- id_pago integer primary key not null,
- numero_poliza integer references poliza on update cascade,
- prima_neta real,
- comision real,
- prima_total real,
- forma_de_pago text,
- iva real,
- fecha_de_pago text,
- fecha_aplicacion_pago_aseguradora text,
- mes_de_pago_comision text
- );
- create table cancelacion(
- id_cancelacion integer primary key not null,
- numero_poliza integer references poliza on update cascade,
- fecha_cancelacion text,
- importe_devolucion real,
- motivo text
- );
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement