--
-- PostgreSQL database dump
--

\restrict yB1YwwaRceGr2HaHeRcMMfT3IuwVNCs0wcscHCVhLaAQHfTYrRtFg5owq88O8cv

-- Dumped from database version 18.3
-- Dumped by pg_dump version 18.3

SET statement_timeout = 0;
SET lock_timeout = 0;
SET idle_in_transaction_session_timeout = 0;
SET transaction_timeout = 0;
SET client_encoding = 'UTF8';
SET standard_conforming_strings = on;
SELECT pg_catalog.set_config('search_path', '', false);
SET check_function_bodies = false;
SET xmloption = content;
SET client_min_messages = warning;
SET row_security = off;

SET default_tablespace = '';

SET default_table_access_method = heap;

--
-- Name: audit_events; Type: TABLE; Schema: public; Owner: sail
--

CREATE TABLE public.audit_events (
    id bigint NOT NULL,
    empresa_id bigint,
    user_id bigint,
    event_type character varying(255) NOT NULL,
    entity_type character varying(255) NOT NULL,
    entity_id bigint NOT NULL,
    old_values json,
    new_values json,
    ip_address character varying(255),
    user_agent character varying(255),
    created_at timestamp(0) without time zone,
    updated_at timestamp(0) without time zone
);


ALTER TABLE public.audit_events OWNER TO sail;

--
-- Name: audit_events_id_seq; Type: SEQUENCE; Schema: public; Owner: sail
--

CREATE SEQUENCE public.audit_events_id_seq
    START WITH 1
    INCREMENT BY 1
    NO MINVALUE
    NO MAXVALUE
    CACHE 1;


ALTER SEQUENCE public.audit_events_id_seq OWNER TO sail;

--
-- Name: audit_events_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: sail
--

ALTER SEQUENCE public.audit_events_id_seq OWNED BY public.audit_events.id;


--
-- Name: cache; Type: TABLE; Schema: public; Owner: sail
--

CREATE TABLE public.cache (
    key character varying(255) NOT NULL,
    value text NOT NULL,
    expiration integer NOT NULL
);


ALTER TABLE public.cache OWNER TO sail;

--
-- Name: cache_locks; Type: TABLE; Schema: public; Owner: sail
--

CREATE TABLE public.cache_locks (
    key character varying(255) NOT NULL,
    owner character varying(255) NOT NULL,
    expiration integer NOT NULL
);


ALTER TABLE public.cache_locks OWNER TO sail;

--
-- Name: failed_jobs; Type: TABLE; Schema: public; Owner: sail
--

CREATE TABLE public.failed_jobs (
    id bigint NOT NULL,
    uuid character varying(255) NOT NULL,
    connection text NOT NULL,
    queue text NOT NULL,
    payload text NOT NULL,
    exception text NOT NULL,
    failed_at timestamp(0) without time zone DEFAULT CURRENT_TIMESTAMP NOT NULL
);


ALTER TABLE public.failed_jobs OWNER TO sail;

--
-- Name: failed_jobs_id_seq; Type: SEQUENCE; Schema: public; Owner: sail
--

CREATE SEQUENCE public.failed_jobs_id_seq
    START WITH 1
    INCREMENT BY 1
    NO MINVALUE
    NO MAXVALUE
    CACHE 1;


ALTER SEQUENCE public.failed_jobs_id_seq OWNER TO sail;

--
-- Name: failed_jobs_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: sail
--

ALTER SEQUENCE public.failed_jobs_id_seq OWNED BY public.failed_jobs.id;


--
-- Name: job_batches; Type: TABLE; Schema: public; Owner: sail
--

CREATE TABLE public.job_batches (
    id character varying(255) NOT NULL,
    name character varying(255) NOT NULL,
    total_jobs integer NOT NULL,
    pending_jobs integer NOT NULL,
    failed_jobs integer NOT NULL,
    failed_job_ids text NOT NULL,
    options text,
    cancelled_at integer,
    created_at integer NOT NULL,
    finished_at integer
);


ALTER TABLE public.job_batches OWNER TO sail;

--
-- Name: jobs; Type: TABLE; Schema: public; Owner: sail
--

CREATE TABLE public.jobs (
    id bigint NOT NULL,
    queue character varying(255) NOT NULL,
    payload text NOT NULL,
    attempts smallint NOT NULL,
    reserved_at integer,
    available_at integer NOT NULL,
    created_at integer NOT NULL
);


ALTER TABLE public.jobs OWNER TO sail;

--
-- Name: jobs_id_seq; Type: SEQUENCE; Schema: public; Owner: sail
--

CREATE SEQUENCE public.jobs_id_seq
    START WITH 1
    INCREMENT BY 1
    NO MINVALUE
    NO MAXVALUE
    CACHE 1;


ALTER SEQUENCE public.jobs_id_seq OWNER TO sail;

--
-- Name: jobs_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: sail
--

ALTER SEQUENCE public.jobs_id_seq OWNED BY public.jobs.id;


--
-- Name: migrations; Type: TABLE; Schema: public; Owner: sail
--

CREATE TABLE public.migrations (
    id integer NOT NULL,
    migration character varying(255) NOT NULL,
    batch integer NOT NULL
);


ALTER TABLE public.migrations OWNER TO sail;

--
-- Name: migrations_id_seq; Type: SEQUENCE; Schema: public; Owner: sail
--

CREATE SEQUENCE public.migrations_id_seq
    AS integer
    START WITH 1
    INCREMENT BY 1
    NO MINVALUE
    NO MAXVALUE
    CACHE 1;


ALTER SEQUENCE public.migrations_id_seq OWNER TO sail;

--
-- Name: migrations_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: sail
--

ALTER SEQUENCE public.migrations_id_seq OWNED BY public.migrations.id;


--
-- Name: model_has_permissions; Type: TABLE; Schema: public; Owner: sail
--

CREATE TABLE public.model_has_permissions (
    permission_id bigint NOT NULL,
    model_type character varying(255) NOT NULL,
    model_id bigint NOT NULL
);


ALTER TABLE public.model_has_permissions OWNER TO sail;

--
-- Name: model_has_roles; Type: TABLE; Schema: public; Owner: sail
--

CREATE TABLE public.model_has_roles (
    role_id bigint NOT NULL,
    model_type character varying(255) NOT NULL,
    model_id bigint NOT NULL
);


ALTER TABLE public.model_has_roles OWNER TO sail;

--
-- Name: oper_aseguradoras; Type: TABLE; Schema: public; Owner: sail
--

CREATE TABLE public.oper_aseguradoras (
    id bigint NOT NULL,
    empresa_id bigint NOT NULL,
    nombre_aseguradora character varying(255) NOT NULL,
    nit character varying(255),
    telefono character varying(255),
    is_active boolean DEFAULT true NOT NULL,
    created_at timestamp(0) without time zone,
    updated_at timestamp(0) without time zone,
    deleted_at timestamp(0) without time zone
);


ALTER TABLE public.oper_aseguradoras OWNER TO sail;

--
-- Name: oper_aseguradoras_id_seq; Type: SEQUENCE; Schema: public; Owner: sail
--

CREATE SEQUENCE public.oper_aseguradoras_id_seq
    START WITH 1
    INCREMENT BY 1
    NO MINVALUE
    NO MAXVALUE
    CACHE 1;


ALTER SEQUENCE public.oper_aseguradoras_id_seq OWNER TO sail;

--
-- Name: oper_aseguradoras_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: sail
--

ALTER SEQUENCE public.oper_aseguradoras_id_seq OWNED BY public.oper_aseguradoras.id;


--
-- Name: oper_cdas; Type: TABLE; Schema: public; Owner: sail
--

CREATE TABLE public.oper_cdas (
    id bigint NOT NULL,
    empresa_id bigint NOT NULL,
    nombre_cda character varying(255) NOT NULL,
    nit character varying(255),
    direccion character varying(255),
    telefono character varying(255),
    is_active boolean DEFAULT true NOT NULL,
    created_at timestamp(0) without time zone,
    updated_at timestamp(0) without time zone,
    deleted_at timestamp(0) without time zone
);


ALTER TABLE public.oper_cdas OWNER TO sail;

--
-- Name: oper_cdas_id_seq; Type: SEQUENCE; Schema: public; Owner: sail
--

CREATE SEQUENCE public.oper_cdas_id_seq
    START WITH 1
    INCREMENT BY 1
    NO MINVALUE
    NO MAXVALUE
    CACHE 1;


ALTER SEQUENCE public.oper_cdas_id_seq OWNER TO sail;

--
-- Name: oper_cdas_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: sail
--

ALTER SEQUENCE public.oper_cdas_id_seq OWNED BY public.oper_cdas.id;


--
-- Name: oper_cliente_responsables; Type: TABLE; Schema: public; Owner: sail
--

CREATE TABLE public.oper_cliente_responsables (
    id bigint NOT NULL,
    cliente_id bigint NOT NULL,
    identificacion character varying(50),
    nombres character varying(150) NOT NULL,
    apellidos character varying(150),
    cargo character varying(100),
    telefono character varying(50),
    correo_electronico character varying(150),
    is_active boolean DEFAULT true NOT NULL,
    created_at timestamp(0) without time zone,
    updated_at timestamp(0) without time zone,
    deleted_at timestamp(0) without time zone,
    direccion character varying(200)
);


ALTER TABLE public.oper_cliente_responsables OWNER TO sail;

--
-- Name: oper_cliente_responsables_id_seq; Type: SEQUENCE; Schema: public; Owner: sail
--

CREATE SEQUENCE public.oper_cliente_responsables_id_seq
    START WITH 1
    INCREMENT BY 1
    NO MINVALUE
    NO MAXVALUE
    CACHE 1;


ALTER SEQUENCE public.oper_cliente_responsables_id_seq OWNER TO sail;

--
-- Name: oper_cliente_responsables_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: sail
--

ALTER SEQUENCE public.oper_cliente_responsables_id_seq OWNED BY public.oper_cliente_responsables.id;


--
-- Name: oper_clientes; Type: TABLE; Schema: public; Owner: sail
--

CREATE TABLE public.oper_clientes (
    id bigint NOT NULL,
    empresa_id bigint NOT NULL,
    tipo_persona character varying(255) NOT NULL,
    identificacion_nit character varying(50) NOT NULL,
    nombres_razon_social character varying(150) NOT NULL,
    apellidos character varying(150),
    apodo character varying(150),
    direccion character varying(200),
    telefono character varying(50),
    correo_electronico character varying(150),
    is_active boolean DEFAULT true NOT NULL,
    created_at timestamp(0) without time zone,
    updated_at timestamp(0) without time zone,
    deleted_at timestamp(0) without time zone,
    CONSTRAINT oper_clientes_tipo_persona_check CHECK (((tipo_persona)::text = ANY ((ARRAY['Natural'::character varying, 'Juridica'::character varying])::text[])))
);


ALTER TABLE public.oper_clientes OWNER TO sail;

--
-- Name: oper_clientes_id_seq; Type: SEQUENCE; Schema: public; Owner: sail
--

CREATE SEQUENCE public.oper_clientes_id_seq
    START WITH 1
    INCREMENT BY 1
    NO MINVALUE
    NO MAXVALUE
    CACHE 1;


ALTER SEQUENCE public.oper_clientes_id_seq OWNER TO sail;

--
-- Name: oper_clientes_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: sail
--

ALTER SEQUENCE public.oper_clientes_id_seq OWNED BY public.oper_clientes.id;


--
-- Name: oper_conductor_capacitaciones; Type: TABLE; Schema: public; Owner: sail
--

CREATE TABLE public.oper_conductor_capacitaciones (
    id bigint NOT NULL,
    conductor_id bigint NOT NULL,
    tipo_curso character varying(150) NOT NULL,
    entidad_expedidora character varying(150),
    fecha_realizacion date NOT NULL,
    fecha_vencimiento date,
    is_active boolean DEFAULT true NOT NULL,
    created_at timestamp(0) without time zone,
    updated_at timestamp(0) without time zone,
    deleted_at timestamp(0) without time zone
);


ALTER TABLE public.oper_conductor_capacitaciones OWNER TO sail;

--
-- Name: oper_conductor_capacitaciones_id_seq; Type: SEQUENCE; Schema: public; Owner: sail
--

CREATE SEQUENCE public.oper_conductor_capacitaciones_id_seq
    START WITH 1
    INCREMENT BY 1
    NO MINVALUE
    NO MAXVALUE
    CACHE 1;


ALTER SEQUENCE public.oper_conductor_capacitaciones_id_seq OWNER TO sail;

--
-- Name: oper_conductor_capacitaciones_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: sail
--

ALTER SEQUENCE public.oper_conductor_capacitaciones_id_seq OWNED BY public.oper_conductor_capacitaciones.id;


--
-- Name: oper_conductor_documentos; Type: TABLE; Schema: public; Owner: sail
--

CREATE TABLE public.oper_conductor_documentos (
    id bigint NOT NULL,
    conductor_id bigint NOT NULL,
    tipo_documento character varying(255) NOT NULL,
    numero_documento character varying(255),
    entidad_expedidora character varying(255),
    fecha_expedicion date NOT NULL,
    fecha_inicio_vigencia date NOT NULL,
    fecha_vencimiento date NOT NULL,
    archivo_path character varying(255),
    is_active boolean DEFAULT true NOT NULL,
    created_at timestamp(0) without time zone,
    updated_at timestamp(0) without time zone,
    deleted_at timestamp(0) without time zone
);


ALTER TABLE public.oper_conductor_documentos OWNER TO sail;

--
-- Name: oper_conductor_documentos_id_seq; Type: SEQUENCE; Schema: public; Owner: sail
--

CREATE SEQUENCE public.oper_conductor_documentos_id_seq
    START WITH 1
    INCREMENT BY 1
    NO MINVALUE
    NO MAXVALUE
    CACHE 1;


ALTER SEQUENCE public.oper_conductor_documentos_id_seq OWNER TO sail;

--
-- Name: oper_conductor_documentos_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: sail
--

ALTER SEQUENCE public.oper_conductor_documentos_id_seq OWNED BY public.oper_conductor_documentos.id;


--
-- Name: oper_conductor_examenes; Type: TABLE; Schema: public; Owner: sail
--

CREATE TABLE public.oper_conductor_examenes (
    id bigint NOT NULL,
    conductor_id bigint NOT NULL,
    nombre_examen character varying(150) NOT NULL,
    entidad character varying(150),
    fecha_realizacion date NOT NULL,
    fecha_vencimiento date,
    archivo_path character varying(255),
    is_active boolean DEFAULT true NOT NULL,
    created_at timestamp(0) without time zone,
    updated_at timestamp(0) without time zone,
    deleted_at timestamp(0) without time zone
);


ALTER TABLE public.oper_conductor_examenes OWNER TO sail;

--
-- Name: oper_conductor_examenes_id_seq; Type: SEQUENCE; Schema: public; Owner: sail
--

CREATE SEQUENCE public.oper_conductor_examenes_id_seq
    START WITH 1
    INCREMENT BY 1
    NO MINVALUE
    NO MAXVALUE
    CACHE 1;


ALTER SEQUENCE public.oper_conductor_examenes_id_seq OWNER TO sail;

--
-- Name: oper_conductor_examenes_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: sail
--

ALTER SEQUENCE public.oper_conductor_examenes_id_seq OWNED BY public.oper_conductor_examenes.id;


--
-- Name: oper_conductor_experiencia; Type: TABLE; Schema: public; Owner: sail
--

CREATE TABLE public.oper_conductor_experiencia (
    id bigint NOT NULL,
    conductor_id bigint NOT NULL,
    empresa character varying(150) NOT NULL,
    cargo character varying(150) NOT NULL,
    fecha_inicio date NOT NULL,
    fecha_fin date,
    nombre_jefe_directo character varying(150),
    telefono_verificacion character varying(50),
    is_active boolean DEFAULT true NOT NULL,
    created_at timestamp(0) without time zone,
    updated_at timestamp(0) without time zone,
    deleted_at timestamp(0) without time zone
);


ALTER TABLE public.oper_conductor_experiencia OWNER TO sail;

--
-- Name: oper_conductor_experiencia_id_seq; Type: SEQUENCE; Schema: public; Owner: sail
--

CREATE SEQUENCE public.oper_conductor_experiencia_id_seq
    START WITH 1
    INCREMENT BY 1
    NO MINVALUE
    NO MAXVALUE
    CACHE 1;


ALTER SEQUENCE public.oper_conductor_experiencia_id_seq OWNER TO sail;

--
-- Name: oper_conductor_experiencia_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: sail
--

ALTER SEQUENCE public.oper_conductor_experiencia_id_seq OWNED BY public.oper_conductor_experiencia.id;


--
-- Name: oper_conductor_infracciones; Type: TABLE; Schema: public; Owner: sail
--

CREATE TABLE public.oper_conductor_infracciones (
    id bigint NOT NULL,
    conductor_id bigint NOT NULL,
    numero_comparendo character varying(100) NOT NULL,
    fecha_infraccion date NOT NULL,
    estado_pago character varying(50),
    valor numeric(15,2) DEFAULT '0'::numeric NOT NULL,
    is_active boolean DEFAULT true NOT NULL,
    created_at timestamp(0) without time zone,
    updated_at timestamp(0) without time zone,
    deleted_at timestamp(0) without time zone
);


ALTER TABLE public.oper_conductor_infracciones OWNER TO sail;

--
-- Name: oper_conductor_infracciones_id_seq; Type: SEQUENCE; Schema: public; Owner: sail
--

CREATE SEQUENCE public.oper_conductor_infracciones_id_seq
    START WITH 1
    INCREMENT BY 1
    NO MINVALUE
    NO MAXVALUE
    CACHE 1;


ALTER SEQUENCE public.oper_conductor_infracciones_id_seq OWNER TO sail;

--
-- Name: oper_conductor_infracciones_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: sail
--

ALTER SEQUENCE public.oper_conductor_infracciones_id_seq OWNED BY public.oper_conductor_infracciones.id;


--
-- Name: oper_conductor_referencias; Type: TABLE; Schema: public; Owner: sail
--

CREATE TABLE public.oper_conductor_referencias (
    id bigint NOT NULL,
    conductor_id bigint NOT NULL,
    tipo_referencia character varying(255) NOT NULL,
    nombre_completo character varying(150) NOT NULL,
    parentesco character varying(100),
    telefono character varying(50) NOT NULL,
    is_active boolean DEFAULT true NOT NULL,
    created_at timestamp(0) without time zone,
    updated_at timestamp(0) without time zone,
    deleted_at timestamp(0) without time zone,
    CONSTRAINT oper_conductor_referencias_tipo_referencia_check CHECK (((tipo_referencia)::text = ANY ((ARRAY['Personal'::character varying, 'Familiar'::character varying, 'Laboral'::character varying])::text[])))
);


ALTER TABLE public.oper_conductor_referencias OWNER TO sail;

--
-- Name: oper_conductor_referencias_id_seq; Type: SEQUENCE; Schema: public; Owner: sail
--

CREATE SEQUENCE public.oper_conductor_referencias_id_seq
    START WITH 1
    INCREMENT BY 1
    NO MINVALUE
    NO MAXVALUE
    CACHE 1;


ALTER SEQUENCE public.oper_conductor_referencias_id_seq OWNER TO sail;

--
-- Name: oper_conductor_referencias_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: sail
--

ALTER SEQUENCE public.oper_conductor_referencias_id_seq OWNED BY public.oper_conductor_referencias.id;


--
-- Name: oper_conductor_ssocial; Type: TABLE; Schema: public; Owner: sail
--

CREATE TABLE public.oper_conductor_ssocial (
    id bigint NOT NULL,
    conductor_id bigint NOT NULL,
    fecha_inicial date NOT NULL,
    fecha_final date NOT NULL,
    fecha_pago date,
    numero_planilla character varying(100) NOT NULL,
    archivo_path character varying(255),
    is_active boolean DEFAULT true NOT NULL,
    created_at timestamp(0) without time zone,
    updated_at timestamp(0) without time zone,
    deleted_at timestamp(0) without time zone
);


ALTER TABLE public.oper_conductor_ssocial OWNER TO sail;

--
-- Name: oper_conductor_ssocial_id_seq; Type: SEQUENCE; Schema: public; Owner: sail
--

CREATE SEQUENCE public.oper_conductor_ssocial_id_seq
    START WITH 1
    INCREMENT BY 1
    NO MINVALUE
    NO MAXVALUE
    CACHE 1;


ALTER SEQUENCE public.oper_conductor_ssocial_id_seq OWNER TO sail;

--
-- Name: oper_conductor_ssocial_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: sail
--

ALTER SEQUENCE public.oper_conductor_ssocial_id_seq OWNED BY public.oper_conductor_ssocial.id;


--
-- Name: oper_conductor_vehiculo; Type: TABLE; Schema: public; Owner: sail
--

CREATE TABLE public.oper_conductor_vehiculo (
    id bigint NOT NULL,
    conductor_id bigint NOT NULL,
    vehiculo_id bigint NOT NULL,
    is_active boolean DEFAULT true NOT NULL,
    created_at timestamp(0) without time zone,
    updated_at timestamp(0) without time zone,
    deleted_at timestamp(0) without time zone
);


ALTER TABLE public.oper_conductor_vehiculo OWNER TO sail;

--
-- Name: oper_conductor_vehiculo_id_seq; Type: SEQUENCE; Schema: public; Owner: sail
--

CREATE SEQUENCE public.oper_conductor_vehiculo_id_seq
    START WITH 1
    INCREMENT BY 1
    NO MINVALUE
    NO MAXVALUE
    CACHE 1;


ALTER SEQUENCE public.oper_conductor_vehiculo_id_seq OWNER TO sail;

--
-- Name: oper_conductor_vehiculo_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: sail
--

ALTER SEQUENCE public.oper_conductor_vehiculo_id_seq OWNED BY public.oper_conductor_vehiculo.id;


--
-- Name: oper_conductores; Type: TABLE; Schema: public; Owner: sail
--

CREATE TABLE public.oper_conductores (
    id bigint NOT NULL,
    empresa_id bigint NOT NULL,
    user_id bigint,
    documento character varying(255) NOT NULL,
    nombres character varying(255) NOT NULL,
    apellidos character varying(255) NOT NULL,
    numero_licencia character varying(255) NOT NULL,
    vencimiento_licencia date NOT NULL,
    telefono character varying(255),
    is_active boolean DEFAULT true NOT NULL,
    created_at timestamp(0) without time zone,
    updated_at timestamp(0) without time zone,
    deleted_at timestamp(0) without time zone,
    fecha_ingreso date,
    ciudad_residencia_id bigint,
    ciudad_expedicion_documento_id bigint,
    fecha_nacimiento date,
    direccion_residencia character varying(255),
    barrio character varying(255),
    celular character varying(255),
    email character varying(255),
    estado_civil character varying(255),
    hijos integer DEFAULT 0 NOT NULL,
    grupo_sanguineo character varying(255),
    eps character varying(255),
    arl character varying(255),
    fondo_pensiones character varying(255),
    nombre_contacto_emergencia character varying(255),
    telefono_contacto_emergencia character varying(255),
    fecha_expedicion_licencia date,
    categoria_licencia character varying(255),
    archivo_licencia_path character varying(255)
);


ALTER TABLE public.oper_conductores OWNER TO sail;

--
-- Name: oper_conductores_id_seq; Type: SEQUENCE; Schema: public; Owner: sail
--

CREATE SEQUENCE public.oper_conductores_id_seq
    START WITH 1
    INCREMENT BY 1
    NO MINVALUE
    NO MAXVALUE
    CACHE 1;


ALTER SEQUENCE public.oper_conductores_id_seq OWNER TO sail;

--
-- Name: oper_conductores_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: sail
--

ALTER SEQUENCE public.oper_conductores_id_seq OWNED BY public.oper_conductores.id;


--
-- Name: oper_contratos; Type: TABLE; Schema: public; Owner: sail
--

CREATE TABLE public.oper_contratos (
    id bigint NOT NULL,
    empresa_id bigint NOT NULL,
    numero_contrato character varying(255) NOT NULL,
    objeto_contrato text NOT NULL,
    fecha_inicio date NOT NULL,
    fecha_fin date NOT NULL,
    is_active boolean DEFAULT true NOT NULL,
    created_at timestamp(0) without time zone,
    updated_at timestamp(0) without time zone,
    deleted_at timestamp(0) without time zone,
    cliente_id bigint NOT NULL,
    responsable_id bigint NOT NULL,
    recorrido_descripcion text,
    valor_contrato numeric(15,2),
    origen character varying(100),
    destino character varying(100),
    ruta text,
    plantilla_formato text
);


ALTER TABLE public.oper_contratos OWNER TO sail;

--
-- Name: oper_contratos_id_seq; Type: SEQUENCE; Schema: public; Owner: sail
--

CREATE SEQUENCE public.oper_contratos_id_seq
    START WITH 1
    INCREMENT BY 1
    NO MINVALUE
    NO MAXVALUE
    CACHE 1;


ALTER SEQUENCE public.oper_contratos_id_seq OWNER TO sail;

--
-- Name: oper_contratos_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: sail
--

ALTER SEQUENCE public.oper_contratos_id_seq OWNED BY public.oper_contratos.id;


--
-- Name: oper_empresas_convenio; Type: TABLE; Schema: public; Owner: sail
--

CREATE TABLE public.oper_empresas_convenio (
    id bigint NOT NULL,
    empresa_id bigint NOT NULL,
    razon_social character varying(255) NOT NULL,
    nit character varying(255) NOT NULL,
    representante_legal character varying(255),
    documento_representante_legal character varying(255),
    telefono character varying(255),
    direccion character varying(255),
    correo_electronico character varying(255),
    fecha_inicio_convenio date,
    fecha_final_convenio date,
    is_active boolean DEFAULT true NOT NULL,
    created_at timestamp(0) without time zone,
    updated_at timestamp(0) without time zone,
    deleted_at timestamp(0) without time zone
);


ALTER TABLE public.oper_empresas_convenio OWNER TO sail;

--
-- Name: oper_empresas_convenio_id_seq; Type: SEQUENCE; Schema: public; Owner: sail
--

CREATE SEQUENCE public.oper_empresas_convenio_id_seq
    START WITH 1
    INCREMENT BY 1
    NO MINVALUE
    NO MAXVALUE
    CACHE 1;


ALTER SEQUENCE public.oper_empresas_convenio_id_seq OWNER TO sail;

--
-- Name: oper_empresas_convenio_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: sail
--

ALTER SEQUENCE public.oper_empresas_convenio_id_seq OWNED BY public.oper_empresas_convenio.id;


--
-- Name: oper_mantenimiento_registros; Type: TABLE; Schema: public; Owner: sail
--

CREATE TABLE public.oper_mantenimiento_registros (
    id bigint NOT NULL,
    empresa_id bigint NOT NULL,
    vehiculo_id bigint NOT NULL,
    rutina_id bigint,
    tipo_mantenimiento character varying(255) NOT NULL,
    fecha_servicio date NOT NULL,
    kilometraje_servicio integer NOT NULL,
    taller_nombre character varying(255),
    costo_total numeric(12,2) DEFAULT '0'::numeric NOT NULL,
    descripcion_trabajo text,
    archivo_factura_path character varying(255),
    is_active boolean DEFAULT true NOT NULL,
    created_at timestamp(0) without time zone,
    updated_at timestamp(0) without time zone,
    deleted_at timestamp(0) without time zone,
    CONSTRAINT oper_mantenimiento_registros_tipo_mantenimiento_check CHECK (((tipo_mantenimiento)::text = ANY ((ARRAY['Preventivo'::character varying, 'Correctivo'::character varying])::text[])))
);


ALTER TABLE public.oper_mantenimiento_registros OWNER TO sail;

--
-- Name: oper_mantenimiento_registros_id_seq; Type: SEQUENCE; Schema: public; Owner: sail
--

CREATE SEQUENCE public.oper_mantenimiento_registros_id_seq
    START WITH 1
    INCREMENT BY 1
    NO MINVALUE
    NO MAXVALUE
    CACHE 1;


ALTER SEQUENCE public.oper_mantenimiento_registros_id_seq OWNER TO sail;

--
-- Name: oper_mantenimiento_registros_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: sail
--

ALTER SEQUENCE public.oper_mantenimiento_registros_id_seq OWNED BY public.oper_mantenimiento_registros.id;


--
-- Name: oper_mantenimiento_rutinas; Type: TABLE; Schema: public; Owner: sail
--

CREATE TABLE public.oper_mantenimiento_rutinas (
    id bigint NOT NULL,
    empresa_id bigint NOT NULL,
    nombre_rutina character varying(255) NOT NULL,
    tipo_frecuencia character varying(255) NOT NULL,
    valor_frecuencia integer NOT NULL,
    alerta_anticipacion integer DEFAULT 500 NOT NULL,
    is_active boolean DEFAULT true NOT NULL,
    created_at timestamp(0) without time zone,
    updated_at timestamp(0) without time zone,
    deleted_at timestamp(0) without time zone,
    CONSTRAINT oper_mantenimiento_rutinas_tipo_frecuencia_check CHECK (((tipo_frecuencia)::text = ANY ((ARRAY['KM'::character varying, 'DIAS'::character varying])::text[])))
);


ALTER TABLE public.oper_mantenimiento_rutinas OWNER TO sail;

--
-- Name: oper_mantenimiento_rutinas_id_seq; Type: SEQUENCE; Schema: public; Owner: sail
--

CREATE SEQUENCE public.oper_mantenimiento_rutinas_id_seq
    START WITH 1
    INCREMENT BY 1
    NO MINVALUE
    NO MAXVALUE
    CACHE 1;


ALTER SEQUENCE public.oper_mantenimiento_rutinas_id_seq OWNER TO sail;

--
-- Name: oper_mantenimiento_rutinas_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: sail
--

ALTER SEQUENCE public.oper_mantenimiento_rutinas_id_seq OWNED BY public.oper_mantenimiento_rutinas.id;


--
-- Name: oper_preoperacional_evidencias; Type: TABLE; Schema: public; Owner: sail
--

CREATE TABLE public.oper_preoperacional_evidencias (
    id bigint NOT NULL,
    preoperacional_id bigint NOT NULL,
    categoria_falla character varying(100) NOT NULL,
    descripcion text,
    foto_path character varying(255) NOT NULL,
    is_active boolean DEFAULT true NOT NULL,
    created_at timestamp(0) without time zone,
    updated_at timestamp(0) without time zone,
    deleted_at timestamp(0) without time zone
);


ALTER TABLE public.oper_preoperacional_evidencias OWNER TO sail;

--
-- Name: oper_preoperacional_evidencias_id_seq; Type: SEQUENCE; Schema: public; Owner: sail
--

CREATE SEQUENCE public.oper_preoperacional_evidencias_id_seq
    START WITH 1
    INCREMENT BY 1
    NO MINVALUE
    NO MAXVALUE
    CACHE 1;


ALTER SEQUENCE public.oper_preoperacional_evidencias_id_seq OWNER TO sail;

--
-- Name: oper_preoperacional_evidencias_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: sail
--

ALTER SEQUENCE public.oper_preoperacional_evidencias_id_seq OWNED BY public.oper_preoperacional_evidencias.id;


--
-- Name: oper_preoperacionales; Type: TABLE; Schema: public; Owner: sail
--

CREATE TABLE public.oper_preoperacionales (
    id bigint NOT NULL,
    empresa_id bigint NOT NULL,
    conductor_id bigint NOT NULL,
    vehiculo_id bigint NOT NULL,
    plantilla_id bigint,
    kilometraje_actual integer NOT NULL,
    estado_general character varying(255) NOT NULL,
    respuestas_json jsonb NOT NULL,
    observaciones_conductor text,
    firma_digital_path character varying(255),
    is_active boolean DEFAULT true NOT NULL,
    created_at timestamp(0) without time zone,
    updated_at timestamp(0) without time zone,
    deleted_at timestamp(0) without time zone,
    CONSTRAINT oper_preoperacionales_estado_general_check CHECK (((estado_general)::text = ANY ((ARRAY['Aprobado'::character varying, 'Aprobado con Observaciones'::character varying, 'Rechazado'::character varying])::text[])))
);


ALTER TABLE public.oper_preoperacionales OWNER TO sail;

--
-- Name: oper_preoperacionales_id_seq; Type: SEQUENCE; Schema: public; Owner: sail
--

CREATE SEQUENCE public.oper_preoperacionales_id_seq
    START WITH 1
    INCREMENT BY 1
    NO MINVALUE
    NO MAXVALUE
    CACHE 1;


ALTER SEQUENCE public.oper_preoperacionales_id_seq OWNER TO sail;

--
-- Name: oper_preoperacionales_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: sail
--

ALTER SEQUENCE public.oper_preoperacionales_id_seq OWNED BY public.oper_preoperacionales.id;


--
-- Name: oper_propietarios; Type: TABLE; Schema: public; Owner: sail
--

CREATE TABLE public.oper_propietarios (
    id bigint NOT NULL,
    empresa_id bigint NOT NULL,
    user_id bigint NOT NULL,
    documento character varying(255) NOT NULL,
    nombres character varying(255) NOT NULL,
    apellidos character varying(255) NOT NULL,
    telefono character varying(255),
    banco character varying(255),
    tipo_cuenta character varying(255),
    numero_cuenta character varying(255),
    is_active boolean DEFAULT true NOT NULL,
    created_at timestamp(0) without time zone,
    updated_at timestamp(0) without time zone,
    deleted_at timestamp(0) without time zone
);


ALTER TABLE public.oper_propietarios OWNER TO sail;

--
-- Name: oper_propietarios_id_seq; Type: SEQUENCE; Schema: public; Owner: sail
--

CREATE SEQUENCE public.oper_propietarios_id_seq
    START WITH 1
    INCREMENT BY 1
    NO MINVALUE
    NO MAXVALUE
    CACHE 1;


ALTER SEQUENCE public.oper_propietarios_id_seq OWNER TO sail;

--
-- Name: oper_propietarios_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: sail
--

ALTER SEQUENCE public.oper_propietarios_id_seq OWNED BY public.oper_propietarios.id;


--
-- Name: oper_vehiculo_documentos; Type: TABLE; Schema: public; Owner: sail
--

CREATE TABLE public.oper_vehiculo_documentos (
    id bigint NOT NULL,
    vehiculo_id bigint NOT NULL,
    tipo_documento character varying(255) NOT NULL,
    numero_documento character varying(255),
    entidad_expedidora character varying(255),
    fecha_expedicion date NOT NULL,
    fecha_inicio_vigencia date NOT NULL,
    fecha_vencimiento date NOT NULL,
    archivo_path character varying(255),
    is_active boolean DEFAULT true NOT NULL,
    created_at timestamp(0) without time zone,
    updated_at timestamp(0) without time zone,
    deleted_at timestamp(0) without time zone
);


ALTER TABLE public.oper_vehiculo_documentos OWNER TO sail;

--
-- Name: oper_vehiculo_documentos_id_seq; Type: SEQUENCE; Schema: public; Owner: sail
--

CREATE SEQUENCE public.oper_vehiculo_documentos_id_seq
    START WITH 1
    INCREMENT BY 1
    NO MINVALUE
    NO MAXVALUE
    CACHE 1;


ALTER SEQUENCE public.oper_vehiculo_documentos_id_seq OWNER TO sail;

--
-- Name: oper_vehiculo_documentos_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: sail
--

ALTER SEQUENCE public.oper_vehiculo_documentos_id_seq OWNED BY public.oper_vehiculo_documentos.id;


--
-- Name: oper_vehiculo_polizas; Type: TABLE; Schema: public; Owner: sail
--

CREATE TABLE public.oper_vehiculo_polizas (
    id bigint NOT NULL,
    vehiculo_id bigint NOT NULL,
    aseguradora_id bigint NOT NULL,
    tipo_poliza character varying(255) NOT NULL,
    numero_poliza character varying(255),
    fecha_expedicion date NOT NULL,
    fecha_inicio_vigencia date NOT NULL,
    fecha_vencimiento date NOT NULL,
    dias_notificacion integer DEFAULT 30 NOT NULL,
    archivo_path character varying(255),
    is_active boolean DEFAULT true NOT NULL,
    created_at timestamp(0) without time zone,
    updated_at timestamp(0) without time zone,
    deleted_at timestamp(0) without time zone
);


ALTER TABLE public.oper_vehiculo_polizas OWNER TO sail;

--
-- Name: oper_vehiculo_polizas_id_seq; Type: SEQUENCE; Schema: public; Owner: sail
--

CREATE SEQUENCE public.oper_vehiculo_polizas_id_seq
    START WITH 1
    INCREMENT BY 1
    NO MINVALUE
    NO MAXVALUE
    CACHE 1;


ALTER SEQUENCE public.oper_vehiculo_polizas_id_seq OWNER TO sail;

--
-- Name: oper_vehiculo_polizas_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: sail
--

ALTER SEQUENCE public.oper_vehiculo_polizas_id_seq OWNED BY public.oper_vehiculo_polizas.id;


--
-- Name: oper_vehiculo_revisiones; Type: TABLE; Schema: public; Owner: sail
--

CREATE TABLE public.oper_vehiculo_revisiones (
    id bigint NOT NULL,
    vehiculo_id bigint NOT NULL,
    cda_id bigint NOT NULL,
    tipo_revision character varying(255) NOT NULL,
    numero_certificado character varying(255),
    fecha_expedicion date NOT NULL,
    fecha_inicio_vigencia date NOT NULL,
    fecha_vencimiento date NOT NULL,
    dias_notificacion integer DEFAULT 5 NOT NULL,
    archivo_path character varying(255),
    is_active boolean DEFAULT true NOT NULL,
    created_at timestamp(0) without time zone,
    updated_at timestamp(0) without time zone,
    deleted_at timestamp(0) without time zone
);


ALTER TABLE public.oper_vehiculo_revisiones OWNER TO sail;

--
-- Name: oper_vehiculo_revisiones_id_seq; Type: SEQUENCE; Schema: public; Owner: sail
--

CREATE SEQUENCE public.oper_vehiculo_revisiones_id_seq
    START WITH 1
    INCREMENT BY 1
    NO MINVALUE
    NO MAXVALUE
    CACHE 1;


ALTER SEQUENCE public.oper_vehiculo_revisiones_id_seq OWNER TO sail;

--
-- Name: oper_vehiculo_revisiones_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: sail
--

ALTER SEQUENCE public.oper_vehiculo_revisiones_id_seq OWNED BY public.oper_vehiculo_revisiones.id;


--
-- Name: oper_vehiculos; Type: TABLE; Schema: public; Owner: sail
--

CREATE TABLE public.oper_vehiculos (
    id bigint NOT NULL,
    empresa_id bigint NOT NULL,
    placa character varying(255) NOT NULL,
    modelo character varying(255),
    capacidad_pasajeros integer NOT NULL,
    is_active boolean DEFAULT true NOT NULL,
    created_at timestamp(0) without time zone,
    updated_at timestamp(0) without time zone,
    deleted_at timestamp(0) without time zone,
    propietario_id bigint,
    clase character varying(255),
    color character varying(255),
    cilindraje character varying(255),
    numero_motor character varying(255),
    numero_chasis character varying(255),
    numero_licencia_transito character varying(255),
    fecha_expedicion_licencia_transito date,
    fecha_matricula date,
    tipo_carroceria character varying(255),
    combustible character varying(255),
    numero_vin character varying(255),
    numero_serie character varying(255),
    origen character varying(255) DEFAULT 'Propio'::character varying NOT NULL,
    fecha_vencimiento_contrato date,
    marca_id bigint,
    linea_id bigint,
    empresa_convenio_id bigint,
    numero_interno character varying(50),
    numero_tarjeta_operacion character varying(100),
    kilometraje integer DEFAULT 0 NOT NULL
);


ALTER TABLE public.oper_vehiculos OWNER TO sail;

--
-- Name: oper_vehiculos_id_seq; Type: SEQUENCE; Schema: public; Owner: sail
--

CREATE SEQUENCE public.oper_vehiculos_id_seq
    START WITH 1
    INCREMENT BY 1
    NO MINVALUE
    NO MAXVALUE
    CACHE 1;


ALTER SEQUENCE public.oper_vehiculos_id_seq OWNER TO sail;

--
-- Name: oper_vehiculos_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: sail
--

ALTER SEQUENCE public.oper_vehiculos_id_seq OWNED BY public.oper_vehiculos.id;


--
-- Name: param_ciudades; Type: TABLE; Schema: public; Owner: sail
--

CREATE TABLE public.param_ciudades (
    id bigint NOT NULL,
    departamento_id bigint NOT NULL,
    nombre character varying(255) NOT NULL,
    codigo_dane character varying(255),
    created_at timestamp(0) without time zone,
    updated_at timestamp(0) without time zone
);


ALTER TABLE public.param_ciudades OWNER TO sail;

--
-- Name: param_ciudades_id_seq; Type: SEQUENCE; Schema: public; Owner: sail
--

CREATE SEQUENCE public.param_ciudades_id_seq
    START WITH 1
    INCREMENT BY 1
    NO MINVALUE
    NO MAXVALUE
    CACHE 1;


ALTER SEQUENCE public.param_ciudades_id_seq OWNER TO sail;

--
-- Name: param_ciudades_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: sail
--

ALTER SEQUENCE public.param_ciudades_id_seq OWNED BY public.param_ciudades.id;


--
-- Name: param_departamentos; Type: TABLE; Schema: public; Owner: sail
--

CREATE TABLE public.param_departamentos (
    id bigint NOT NULL,
    nombre character varying(255) NOT NULL,
    codigo_dane character varying(255),
    created_at timestamp(0) without time zone,
    updated_at timestamp(0) without time zone
);


ALTER TABLE public.param_departamentos OWNER TO sail;

--
-- Name: param_departamentos_id_seq; Type: SEQUENCE; Schema: public; Owner: sail
--

CREATE SEQUENCE public.param_departamentos_id_seq
    START WITH 1
    INCREMENT BY 1
    NO MINVALUE
    NO MAXVALUE
    CACHE 1;


ALTER SEQUENCE public.param_departamentos_id_seq OWNER TO sail;

--
-- Name: param_departamentos_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: sail
--

ALTER SEQUENCE public.param_departamentos_id_seq OWNED BY public.param_departamentos.id;


--
-- Name: param_lineas; Type: TABLE; Schema: public; Owner: sail
--

CREATE TABLE public.param_lineas (
    id bigint NOT NULL,
    marca_id bigint NOT NULL,
    nombre character varying(255) NOT NULL,
    created_at timestamp(0) without time zone,
    updated_at timestamp(0) without time zone
);


ALTER TABLE public.param_lineas OWNER TO sail;

--
-- Name: param_lineas_id_seq; Type: SEQUENCE; Schema: public; Owner: sail
--

CREATE SEQUENCE public.param_lineas_id_seq
    START WITH 1
    INCREMENT BY 1
    NO MINVALUE
    NO MAXVALUE
    CACHE 1;


ALTER SEQUENCE public.param_lineas_id_seq OWNER TO sail;

--
-- Name: param_lineas_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: sail
--

ALTER SEQUENCE public.param_lineas_id_seq OWNED BY public.param_lineas.id;


--
-- Name: param_marcas; Type: TABLE; Schema: public; Owner: sail
--

CREATE TABLE public.param_marcas (
    id bigint NOT NULL,
    nombre character varying(255) NOT NULL,
    created_at timestamp(0) without time zone,
    updated_at timestamp(0) without time zone
);


ALTER TABLE public.param_marcas OWNER TO sail;

--
-- Name: param_marcas_id_seq; Type: SEQUENCE; Schema: public; Owner: sail
--

CREATE SEQUENCE public.param_marcas_id_seq
    START WITH 1
    INCREMENT BY 1
    NO MINVALUE
    NO MAXVALUE
    CACHE 1;


ALTER SEQUENCE public.param_marcas_id_seq OWNER TO sail;

--
-- Name: param_marcas_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: sail
--

ALTER SEQUENCE public.param_marcas_id_seq OWNED BY public.param_marcas.id;


--
-- Name: param_preop_plantillas; Type: TABLE; Schema: public; Owner: sail
--

CREATE TABLE public.param_preop_plantillas (
    id bigint NOT NULL,
    empresa_id bigint NOT NULL,
    nombre_plantilla character varying(150) NOT NULL,
    estructura_json jsonb NOT NULL,
    es_predeterminada boolean DEFAULT false NOT NULL,
    is_active boolean DEFAULT true NOT NULL,
    created_at timestamp(0) without time zone,
    updated_at timestamp(0) without time zone,
    deleted_at timestamp(0) without time zone
);


ALTER TABLE public.param_preop_plantillas OWNER TO sail;

--
-- Name: param_preop_plantillas_id_seq; Type: SEQUENCE; Schema: public; Owner: sail
--

CREATE SEQUENCE public.param_preop_plantillas_id_seq
    START WITH 1
    INCREMENT BY 1
    NO MINVALUE
    NO MAXVALUE
    CACHE 1;


ALTER SEQUENCE public.param_preop_plantillas_id_seq OWNER TO sail;

--
-- Name: param_preop_plantillas_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: sail
--

ALTER SEQUENCE public.param_preop_plantillas_id_seq OWNED BY public.param_preop_plantillas.id;


--
-- Name: password_reset_tokens; Type: TABLE; Schema: public; Owner: sail
--

CREATE TABLE public.password_reset_tokens (
    email character varying(255) NOT NULL,
    token character varying(255) NOT NULL,
    created_at timestamp(0) without time zone
);


ALTER TABLE public.password_reset_tokens OWNER TO sail;

--
-- Name: permissions; Type: TABLE; Schema: public; Owner: sail
--

CREATE TABLE public.permissions (
    id bigint NOT NULL,
    name character varying(255) NOT NULL,
    guard_name character varying(255) NOT NULL,
    created_at timestamp(0) without time zone,
    updated_at timestamp(0) without time zone
);


ALTER TABLE public.permissions OWNER TO sail;

--
-- Name: permissions_id_seq; Type: SEQUENCE; Schema: public; Owner: sail
--

CREATE SEQUENCE public.permissions_id_seq
    START WITH 1
    INCREMENT BY 1
    NO MINVALUE
    NO MAXVALUE
    CACHE 1;


ALTER SEQUENCE public.permissions_id_seq OWNER TO sail;

--
-- Name: permissions_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: sail
--

ALTER SEQUENCE public.permissions_id_seq OWNED BY public.permissions.id;


--
-- Name: personal_access_tokens; Type: TABLE; Schema: public; Owner: sail
--

CREATE TABLE public.personal_access_tokens (
    id bigint NOT NULL,
    tokenable_type character varying(255) NOT NULL,
    tokenable_id bigint NOT NULL,
    name text NOT NULL,
    token character varying(64) NOT NULL,
    abilities text,
    last_used_at timestamp(0) without time zone,
    expires_at timestamp(0) without time zone,
    created_at timestamp(0) without time zone,
    updated_at timestamp(0) without time zone
);


ALTER TABLE public.personal_access_tokens OWNER TO sail;

--
-- Name: personal_access_tokens_id_seq; Type: SEQUENCE; Schema: public; Owner: sail
--

CREATE SEQUENCE public.personal_access_tokens_id_seq
    START WITH 1
    INCREMENT BY 1
    NO MINVALUE
    NO MAXVALUE
    CACHE 1;


ALTER SEQUENCE public.personal_access_tokens_id_seq OWNER TO sail;

--
-- Name: personal_access_tokens_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: sail
--

ALTER SEQUENCE public.personal_access_tokens_id_seq OWNED BY public.personal_access_tokens.id;


--
-- Name: reg_fuecs; Type: TABLE; Schema: public; Owner: sail
--

CREATE TABLE public.reg_fuecs (
    id bigint NOT NULL,
    empresa_id bigint NOT NULL,
    vehiculo_id bigint NOT NULL,
    conductor_id bigint NOT NULL,
    contrato_id bigint NOT NULL,
    numero_fuec character varying(255) NOT NULL,
    origen character varying(255) NOT NULL,
    destino character varying(255) NOT NULL,
    fecha_inicio_viaje date NOT NULL,
    fecha_fin_viaje date NOT NULL,
    estado character varying(255) DEFAULT 'ACTIVO'::character varying NOT NULL,
    created_at timestamp(0) without time zone,
    updated_at timestamp(0) without time zone,
    deleted_at timestamp(0) without time zone,
    consecutivo_anual integer,
    resolucion_snapshot character varying(255),
    datos_snapshot jsonb,
    qr_verificacion_hash character varying(255),
    conductor2_id bigint,
    conductor3_id bigint,
    CONSTRAINT reg_fuecs_estado_check CHECK (((estado)::text = ANY ((ARRAY['ACTIVO'::character varying, 'VENCIDO'::character varying, 'ANULADO'::character varying])::text[])))
);


ALTER TABLE public.reg_fuecs OWNER TO sail;

--
-- Name: reg_fuecs_id_seq; Type: SEQUENCE; Schema: public; Owner: sail
--

CREATE SEQUENCE public.reg_fuecs_id_seq
    START WITH 1
    INCREMENT BY 1
    NO MINVALUE
    NO MAXVALUE
    CACHE 1;


ALTER SEQUENCE public.reg_fuecs_id_seq OWNER TO sail;

--
-- Name: reg_fuecs_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: sail
--

ALTER SEQUENCE public.reg_fuecs_id_seq OWNED BY public.reg_fuecs.id;


--
-- Name: role_has_permissions; Type: TABLE; Schema: public; Owner: sail
--

CREATE TABLE public.role_has_permissions (
    permission_id bigint NOT NULL,
    role_id bigint NOT NULL
);


ALTER TABLE public.role_has_permissions OWNER TO sail;

--
-- Name: roles; Type: TABLE; Schema: public; Owner: sail
--

CREATE TABLE public.roles (
    id bigint NOT NULL,
    name character varying(255) NOT NULL,
    guard_name character varying(255) NOT NULL,
    created_at timestamp(0) without time zone,
    updated_at timestamp(0) without time zone
);


ALTER TABLE public.roles OWNER TO sail;

--
-- Name: roles_id_seq; Type: SEQUENCE; Schema: public; Owner: sail
--

CREATE SEQUENCE public.roles_id_seq
    START WITH 1
    INCREMENT BY 1
    NO MINVALUE
    NO MAXVALUE
    CACHE 1;


ALTER SEQUENCE public.roles_id_seq OWNER TO sail;

--
-- Name: roles_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: sail
--

ALTER SEQUENCE public.roles_id_seq OWNED BY public.roles.id;


--
-- Name: saas_empresas; Type: TABLE; Schema: public; Owner: sail
--

CREATE TABLE public.saas_empresas (
    id bigint NOT NULL,
    uuid uuid NOT NULL,
    nit character varying(255) NOT NULL,
    nombre_razon_social character varying(255) NOT NULL,
    email_contacto character varying(255),
    telefono character varying(255),
    direccion character varying(255),
    codigo_territorial character varying(3),
    numero_resolucion character varying(4),
    anio_resolucion character varying(2),
    is_active boolean DEFAULT true NOT NULL,
    created_at timestamp(0) without time zone,
    updated_at timestamp(0) without time zone,
    deleted_at timestamp(0) without time zone,
    logo_empresa_path character varying(255),
    logo_ministerio_path character varying(255),
    firma_gerente_path character varying(255),
    config_bloqueo_fuec_json jsonb,
    fav_ia_settings jsonb,
    billing_id character varying(255),
    billing_token character varying(255)
);


ALTER TABLE public.saas_empresas OWNER TO sail;

--
-- Name: saas_empresas_id_seq; Type: SEQUENCE; Schema: public; Owner: sail
--

CREATE SEQUENCE public.saas_empresas_id_seq
    START WITH 1
    INCREMENT BY 1
    NO MINVALUE
    NO MAXVALUE
    CACHE 1;


ALTER SEQUENCE public.saas_empresas_id_seq OWNER TO sail;

--
-- Name: saas_empresas_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: sail
--

ALTER SEQUENCE public.saas_empresas_id_seq OWNED BY public.saas_empresas.id;


--
-- Name: saas_features; Type: TABLE; Schema: public; Owner: sail
--

CREATE TABLE public.saas_features (
    id bigint NOT NULL,
    empresa_id bigint NOT NULL,
    feature_name character varying(255) NOT NULL,
    is_enabled boolean DEFAULT false NOT NULL,
    config_json json,
    created_at timestamp(0) without time zone,
    updated_at timestamp(0) without time zone
);


ALTER TABLE public.saas_features OWNER TO sail;

--
-- Name: saas_features_id_seq; Type: SEQUENCE; Schema: public; Owner: sail
--

CREATE SEQUENCE public.saas_features_id_seq
    START WITH 1
    INCREMENT BY 1
    NO MINVALUE
    NO MAXVALUE
    CACHE 1;


ALTER SEQUENCE public.saas_features_id_seq OWNER TO sail;

--
-- Name: saas_features_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: sail
--

ALTER SEQUENCE public.saas_features_id_seq OWNED BY public.saas_features.id;


--
-- Name: sessions; Type: TABLE; Schema: public; Owner: sail
--

CREATE TABLE public.sessions (
    id character varying(255) NOT NULL,
    user_id bigint,
    ip_address character varying(45),
    user_agent text,
    payload text NOT NULL,
    last_activity integer NOT NULL
);


ALTER TABLE public.sessions OWNER TO sail;

--
-- Name: users; Type: TABLE; Schema: public; Owner: sail
--

CREATE TABLE public.users (
    id bigint NOT NULL,
    name character varying(255) NOT NULL,
    email character varying(255) NOT NULL,
    email_verified_at timestamp(0) without time zone,
    password character varying(255) NOT NULL,
    remember_token character varying(100),
    created_at timestamp(0) without time zone,
    updated_at timestamp(0) without time zone,
    empresa_id bigint,
    documento character varying(255),
    telefono character varying(255),
    is_active boolean DEFAULT true NOT NULL,
    conductor_id bigint,
    propietario_id bigint
);


ALTER TABLE public.users OWNER TO sail;

--
-- Name: users_id_seq; Type: SEQUENCE; Schema: public; Owner: sail
--

CREATE SEQUENCE public.users_id_seq
    START WITH 1
    INCREMENT BY 1
    NO MINVALUE
    NO MAXVALUE
    CACHE 1;


ALTER SEQUENCE public.users_id_seq OWNER TO sail;

--
-- Name: users_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: sail
--

ALTER SEQUENCE public.users_id_seq OWNED BY public.users.id;


--
-- Name: audit_events id; Type: DEFAULT; Schema: public; Owner: sail
--

ALTER TABLE ONLY public.audit_events ALTER COLUMN id SET DEFAULT nextval('public.audit_events_id_seq'::regclass);


--
-- Name: failed_jobs id; Type: DEFAULT; Schema: public; Owner: sail
--

ALTER TABLE ONLY public.failed_jobs ALTER COLUMN id SET DEFAULT nextval('public.failed_jobs_id_seq'::regclass);


--
-- Name: jobs id; Type: DEFAULT; Schema: public; Owner: sail
--

ALTER TABLE ONLY public.jobs ALTER COLUMN id SET DEFAULT nextval('public.jobs_id_seq'::regclass);


--
-- Name: migrations id; Type: DEFAULT; Schema: public; Owner: sail
--

ALTER TABLE ONLY public.migrations ALTER COLUMN id SET DEFAULT nextval('public.migrations_id_seq'::regclass);


--
-- Name: oper_aseguradoras id; Type: DEFAULT; Schema: public; Owner: sail
--

ALTER TABLE ONLY public.oper_aseguradoras ALTER COLUMN id SET DEFAULT nextval('public.oper_aseguradoras_id_seq'::regclass);


--
-- Name: oper_cdas id; Type: DEFAULT; Schema: public; Owner: sail
--

ALTER TABLE ONLY public.oper_cdas ALTER COLUMN id SET DEFAULT nextval('public.oper_cdas_id_seq'::regclass);


--
-- Name: oper_cliente_responsables id; Type: DEFAULT; Schema: public; Owner: sail
--

ALTER TABLE ONLY public.oper_cliente_responsables ALTER COLUMN id SET DEFAULT nextval('public.oper_cliente_responsables_id_seq'::regclass);


--
-- Name: oper_clientes id; Type: DEFAULT; Schema: public; Owner: sail
--

ALTER TABLE ONLY public.oper_clientes ALTER COLUMN id SET DEFAULT nextval('public.oper_clientes_id_seq'::regclass);


--
-- Name: oper_conductor_capacitaciones id; Type: DEFAULT; Schema: public; Owner: sail
--

ALTER TABLE ONLY public.oper_conductor_capacitaciones ALTER COLUMN id SET DEFAULT nextval('public.oper_conductor_capacitaciones_id_seq'::regclass);


--
-- Name: oper_conductor_documentos id; Type: DEFAULT; Schema: public; Owner: sail
--

ALTER TABLE ONLY public.oper_conductor_documentos ALTER COLUMN id SET DEFAULT nextval('public.oper_conductor_documentos_id_seq'::regclass);


--
-- Name: oper_conductor_examenes id; Type: DEFAULT; Schema: public; Owner: sail
--

ALTER TABLE ONLY public.oper_conductor_examenes ALTER COLUMN id SET DEFAULT nextval('public.oper_conductor_examenes_id_seq'::regclass);


--
-- Name: oper_conductor_experiencia id; Type: DEFAULT; Schema: public; Owner: sail
--

ALTER TABLE ONLY public.oper_conductor_experiencia ALTER COLUMN id SET DEFAULT nextval('public.oper_conductor_experiencia_id_seq'::regclass);


--
-- Name: oper_conductor_infracciones id; Type: DEFAULT; Schema: public; Owner: sail
--

ALTER TABLE ONLY public.oper_conductor_infracciones ALTER COLUMN id SET DEFAULT nextval('public.oper_conductor_infracciones_id_seq'::regclass);


--
-- Name: oper_conductor_referencias id; Type: DEFAULT; Schema: public; Owner: sail
--

ALTER TABLE ONLY public.oper_conductor_referencias ALTER COLUMN id SET DEFAULT nextval('public.oper_conductor_referencias_id_seq'::regclass);


--
-- Name: oper_conductor_ssocial id; Type: DEFAULT; Schema: public; Owner: sail
--

ALTER TABLE ONLY public.oper_conductor_ssocial ALTER COLUMN id SET DEFAULT nextval('public.oper_conductor_ssocial_id_seq'::regclass);


--
-- Name: oper_conductor_vehiculo id; Type: DEFAULT; Schema: public; Owner: sail
--

ALTER TABLE ONLY public.oper_conductor_vehiculo ALTER COLUMN id SET DEFAULT nextval('public.oper_conductor_vehiculo_id_seq'::regclass);


--
-- Name: oper_conductores id; Type: DEFAULT; Schema: public; Owner: sail
--

ALTER TABLE ONLY public.oper_conductores ALTER COLUMN id SET DEFAULT nextval('public.oper_conductores_id_seq'::regclass);


--
-- Name: oper_contratos id; Type: DEFAULT; Schema: public; Owner: sail
--

ALTER TABLE ONLY public.oper_contratos ALTER COLUMN id SET DEFAULT nextval('public.oper_contratos_id_seq'::regclass);


--
-- Name: oper_empresas_convenio id; Type: DEFAULT; Schema: public; Owner: sail
--

ALTER TABLE ONLY public.oper_empresas_convenio ALTER COLUMN id SET DEFAULT nextval('public.oper_empresas_convenio_id_seq'::regclass);


--
-- Name: oper_mantenimiento_registros id; Type: DEFAULT; Schema: public; Owner: sail
--

ALTER TABLE ONLY public.oper_mantenimiento_registros ALTER COLUMN id SET DEFAULT nextval('public.oper_mantenimiento_registros_id_seq'::regclass);


--
-- Name: oper_mantenimiento_rutinas id; Type: DEFAULT; Schema: public; Owner: sail
--

ALTER TABLE ONLY public.oper_mantenimiento_rutinas ALTER COLUMN id SET DEFAULT nextval('public.oper_mantenimiento_rutinas_id_seq'::regclass);


--
-- Name: oper_preoperacional_evidencias id; Type: DEFAULT; Schema: public; Owner: sail
--

ALTER TABLE ONLY public.oper_preoperacional_evidencias ALTER COLUMN id SET DEFAULT nextval('public.oper_preoperacional_evidencias_id_seq'::regclass);


--
-- Name: oper_preoperacionales id; Type: DEFAULT; Schema: public; Owner: sail
--

ALTER TABLE ONLY public.oper_preoperacionales ALTER COLUMN id SET DEFAULT nextval('public.oper_preoperacionales_id_seq'::regclass);


--
-- Name: oper_propietarios id; Type: DEFAULT; Schema: public; Owner: sail
--

ALTER TABLE ONLY public.oper_propietarios ALTER COLUMN id SET DEFAULT nextval('public.oper_propietarios_id_seq'::regclass);


--
-- Name: oper_vehiculo_documentos id; Type: DEFAULT; Schema: public; Owner: sail
--

ALTER TABLE ONLY public.oper_vehiculo_documentos ALTER COLUMN id SET DEFAULT nextval('public.oper_vehiculo_documentos_id_seq'::regclass);


--
-- Name: oper_vehiculo_polizas id; Type: DEFAULT; Schema: public; Owner: sail
--

ALTER TABLE ONLY public.oper_vehiculo_polizas ALTER COLUMN id SET DEFAULT nextval('public.oper_vehiculo_polizas_id_seq'::regclass);


--
-- Name: oper_vehiculo_revisiones id; Type: DEFAULT; Schema: public; Owner: sail
--

ALTER TABLE ONLY public.oper_vehiculo_revisiones ALTER COLUMN id SET DEFAULT nextval('public.oper_vehiculo_revisiones_id_seq'::regclass);


--
-- Name: oper_vehiculos id; Type: DEFAULT; Schema: public; Owner: sail
--

ALTER TABLE ONLY public.oper_vehiculos ALTER COLUMN id SET DEFAULT nextval('public.oper_vehiculos_id_seq'::regclass);


--
-- Name: param_ciudades id; Type: DEFAULT; Schema: public; Owner: sail
--

ALTER TABLE ONLY public.param_ciudades ALTER COLUMN id SET DEFAULT nextval('public.param_ciudades_id_seq'::regclass);


--
-- Name: param_departamentos id; Type: DEFAULT; Schema: public; Owner: sail
--

ALTER TABLE ONLY public.param_departamentos ALTER COLUMN id SET DEFAULT nextval('public.param_departamentos_id_seq'::regclass);


--
-- Name: param_lineas id; Type: DEFAULT; Schema: public; Owner: sail
--

ALTER TABLE ONLY public.param_lineas ALTER COLUMN id SET DEFAULT nextval('public.param_lineas_id_seq'::regclass);


--
-- Name: param_marcas id; Type: DEFAULT; Schema: public; Owner: sail
--

ALTER TABLE ONLY public.param_marcas ALTER COLUMN id SET DEFAULT nextval('public.param_marcas_id_seq'::regclass);


--
-- Name: param_preop_plantillas id; Type: DEFAULT; Schema: public; Owner: sail
--

ALTER TABLE ONLY public.param_preop_plantillas ALTER COLUMN id SET DEFAULT nextval('public.param_preop_plantillas_id_seq'::regclass);


--
-- Name: permissions id; Type: DEFAULT; Schema: public; Owner: sail
--

ALTER TABLE ONLY public.permissions ALTER COLUMN id SET DEFAULT nextval('public.permissions_id_seq'::regclass);


--
-- Name: personal_access_tokens id; Type: DEFAULT; Schema: public; Owner: sail
--

ALTER TABLE ONLY public.personal_access_tokens ALTER COLUMN id SET DEFAULT nextval('public.personal_access_tokens_id_seq'::regclass);


--
-- Name: reg_fuecs id; Type: DEFAULT; Schema: public; Owner: sail
--

ALTER TABLE ONLY public.reg_fuecs ALTER COLUMN id SET DEFAULT nextval('public.reg_fuecs_id_seq'::regclass);


--
-- Name: roles id; Type: DEFAULT; Schema: public; Owner: sail
--

ALTER TABLE ONLY public.roles ALTER COLUMN id SET DEFAULT nextval('public.roles_id_seq'::regclass);


--
-- Name: saas_empresas id; Type: DEFAULT; Schema: public; Owner: sail
--

ALTER TABLE ONLY public.saas_empresas ALTER COLUMN id SET DEFAULT nextval('public.saas_empresas_id_seq'::regclass);


--
-- Name: saas_features id; Type: DEFAULT; Schema: public; Owner: sail
--

ALTER TABLE ONLY public.saas_features ALTER COLUMN id SET DEFAULT nextval('public.saas_features_id_seq'::regclass);


--
-- Name: users id; Type: DEFAULT; Schema: public; Owner: sail
--

ALTER TABLE ONLY public.users ALTER COLUMN id SET DEFAULT nextval('public.users_id_seq'::regclass);


--
-- Data for Name: audit_events; Type: TABLE DATA; Schema: public; Owner: sail
--

COPY public.audit_events (id, empresa_id, user_id, event_type, entity_type, entity_id, old_values, new_values, ip_address, user_agent, created_at, updated_at) FROM stdin;
\.


--
-- Data for Name: cache; Type: TABLE DATA; Schema: public; Owner: sail
--

COPY public.cache (key, value, expiration) FROM stdin;
laravel-cache-billing_status_1	a:3:{s:7:"mensaje";s:610:"<div> <p>Hola estimado cliente, te informamos que actualmente tienes pagos pendientes por realizar:</br><b>Periodos pendientes: 3 </b></br> <b>Valor acumulado: $360.000</b></p> </div> <div> <p>Lo invitamos a realizar el pago a trav├®s de nuestro portal de pagos: <a target="_blank" href="https://portalpagos.sireco.com.co/">https://portalpagos.sireco.com.co/</a></br></br> Si ya realiz├│ el pago por consignaci├│n por favor enviar el soporte al grupo de WhatsApp.</br></br><b>Nota: Agradecemos que utilice la plataforma de pagos con el fin de que se consolide el pago realizado automaticamente. </b> </p></div>";s:3:"flg";s:1:"1";s:18:"fav_ia_llm_enabled";b:1;}	1776223054
\.


--
-- Data for Name: cache_locks; Type: TABLE DATA; Schema: public; Owner: sail
--

COPY public.cache_locks (key, owner, expiration) FROM stdin;
\.


--
-- Data for Name: failed_jobs; Type: TABLE DATA; Schema: public; Owner: sail
--

COPY public.failed_jobs (id, uuid, connection, queue, payload, exception, failed_at) FROM stdin;
\.


--
-- Data for Name: job_batches; Type: TABLE DATA; Schema: public; Owner: sail
--

COPY public.job_batches (id, name, total_jobs, pending_jobs, failed_jobs, failed_job_ids, options, cancelled_at, created_at, finished_at) FROM stdin;
\.


--
-- Data for Name: jobs; Type: TABLE DATA; Schema: public; Owner: sail
--

COPY public.jobs (id, queue, payload, attempts, reserved_at, available_at, created_at) FROM stdin;
\.


--
-- Data for Name: migrations; Type: TABLE DATA; Schema: public; Owner: sail
--

COPY public.migrations (id, migration, batch) FROM stdin;
1	0001_01_01_000000_create_users_table	1
2	0001_01_01_000001_create_cache_table	1
3	0001_01_01_000002_create_jobs_table	1
4	2026_03_31_183629_create_personal_access_tokens_table	1
5	2026_03_31_184904_create_permission_tables	1
6	2026_03_31_185103_create_saas_empresas_table	1
7	2026_03_31_185108_create_saas_features_table	1
8	2026_03_31_185115_add_empresa_id_to_users_table	1
9	2026_03_31_185121_create_oper_vehiculos_table	1
10	2026_03_31_185128_create_oper_conductores_table	1
11	2026_03_31_185140_create_oper_contratos_table	1
12	2026_03_31_185146_create_reg_fuecs_table	1
13	2026_03_31_185152_create_audit_events_table	1
14	2026_04_01_020156_create_oper_propietarios_table	1
15	2026_04_01_020204_create_oper_vehiculo_documentos_table	1
16	2026_04_01_020216_create_oper_conductor_documentos_table	1
17	2026_04_01_020221_alter_oper_vehiculos_schema	1
18	2026_04_01_023748_create_param_departamentos_table	1
19	2026_04_01_023757_create_param_ciudades_table	1
20	2026_04_01_023804_create_param_marcas_table	1
21	2026_04_01_023811_create_param_lineas_table	1
22	2026_04_01_023926_alter_oper_vehiculos_phase12	1
23	2026_04_01_023936_alter_oper_conductores_phase12	1
24	2026_04_01_025123_create_oper_empresas_convenio_table	1
25	2026_04_01_025130_alter_oper_vehiculos_add_convenio_id	1
26	2026_04_01_044443_create_oper_aseguradoras_table	1
27	2026_04_01_044450_create_oper_cdas_table	1
28	2026_04_01_044459_create_oper_vehiculo_polizas_table	1
29	2026_04_01_044507_create_oper_vehiculo_revisiones_table	1
30	2026_04_01_051331_create_oper_clientes_table	1
31	2026_04_01_051340_create_oper_cliente_responsables_table	1
32	2026_04_01_051421_alter_oper_contratos_cliente_relacional	1
33	2026_04_01_140608_create_oper_conductor_examenes_table	1
34	2026_04_01_140617_create_oper_conductor_ssocial_table	1
35	2026_04_01_140627_create_oper_conductor_vehiculo_table	1
36	2026_04_01_140637_create_oper_conductor_experiencia_table	1
37	2026_04_01_140646_create_oper_conductor_referencias_table	1
38	2026_04_01_140701_create_oper_conductor_capacitaciones_table	1
39	2026_04_01_140730_create_oper_conductor_infracciones_table	1
40	2026_04_01_142100_create_param_preop_plantillas_table	1
41	2026_04_01_142200_create_oper_preoperacionales_table	1
42	2026_04_01_142223_create_oper_preoperacional_evidencias_table	1
43	2026_04_01_150255_alter_saas_empresas_branding_cfg	1
44	2026_04_01_150302_alter_reg_fuecs_snapshot_legal	1
45	2026_04_07_184836_add_fields_to_oper_contratos_table	2
46	2026_04_07_190000_add_fields_to_oper_contratos_table	2
47	2026_04_07_192031_add_direccion_to_oper_cliente_responsables_table	3
48	2026_04_07_192040_add_direccion_to_oper_cliente_responsables_table	3
49	2026_04_07_192200_add_direccion_to_oper_cliente_responsables_table	3
50	2026_04_07_193539_add_numero_interno_to_oper_vehiculos_table	4
51	2026_04_07_193600_add_numero_interno_to_oper_vehiculos_table	4
53	2026_04_07_201000_add_tarjeta_operacion_to_oper_vehiculos_table	5
54	2026_04_08_160802_add_multiple_conductores_to_reg_fuecs_table	5
55	2026_04_08_194913_add_route_and_template_to_oper_contratos_table	6
56	2026_04_09_163951_create_oper_mantenimiento_rutinas_table	7
57	2026_04_09_164049_create_oper_mantenimiento_registros_table	7
58	2026_04_09_173553_add_kilometraje_to_oper_vehiculos_table	8
59	2026_04_09_190521_add_fav_ia_settings_to_saas_empresas_table	9
60	2026_04_09_194327_add_billing_credentials_to_saas_empresas_table	10
61	2026_04_10_193400_add_entity_ids_to_users_table	11
62	2026_04_15_000001_add_performance_indexes	12
\.


--
-- Data for Name: model_has_permissions; Type: TABLE DATA; Schema: public; Owner: sail
--

COPY public.model_has_permissions (permission_id, model_type, model_id) FROM stdin;
\.


--
-- Data for Name: model_has_roles; Type: TABLE DATA; Schema: public; Owner: sail
--

COPY public.model_has_roles (role_id, model_type, model_id) FROM stdin;
1	App\\Models\\User	1
2	App\\Models\\User	1
\.


--
-- Data for Name: oper_aseguradoras; Type: TABLE DATA; Schema: public; Owner: sail
--

COPY public.oper_aseguradoras (id, empresa_id, nombre_aseguradora, nit, telefono, is_active, created_at, updated_at, deleted_at) FROM stdin;
7	1	Seguros Bolivar	860.111.222	\N	t	\N	\N	\N
\.


--
-- Data for Name: oper_cdas; Type: TABLE DATA; Schema: public; Owner: sail
--

COPY public.oper_cdas (id, empresa_id, nombre_cda, nit, direccion, telefono, is_active, created_at, updated_at, deleted_at) FROM stdin;
6	1	CDA La 80	900.555.444	\N	\N	t	\N	\N	\N
\.


--
-- Data for Name: oper_cliente_responsables; Type: TABLE DATA; Schema: public; Owner: sail
--

COPY public.oper_cliente_responsables (id, cliente_id, identificacion, nombres, apellidos, cargo, telefono, correo_electronico, is_active, created_at, updated_at, deleted_at, direccion) FROM stdin;
16	28	\N	Responsable Colegio San Jose	\N	\N	\N	\N	t	2026-04-09 20:55:54	\N	\N	\N
17	29	\N	Responsable Ecopetrol S.A.	\N	\N	\N	\N	t	2026-04-09 20:55:54	\N	\N	\N
\.


--
-- Data for Name: oper_clientes; Type: TABLE DATA; Schema: public; Owner: sail
--

COPY public.oper_clientes (id, empresa_id, tipo_persona, identificacion_nit, nombres_razon_social, apellidos, apodo, direccion, telefono, correo_electronico, is_active, created_at, updated_at, deleted_at) FROM stdin;
28	1	Juridica	800.111.111-1	Colegio San Jose	\N	\N	\N	\N	\N	t	2026-04-09 20:55:54	\N	\N
29	1	Juridica	800.222.222-2	Ecopetrol S.A.	\N	\N	\N	\N	\N	t	2026-04-09 20:55:54	\N	\N
\.


--
-- Data for Name: oper_conductor_capacitaciones; Type: TABLE DATA; Schema: public; Owner: sail
--

COPY public.oper_conductor_capacitaciones (id, conductor_id, tipo_curso, entidad_expedidora, fecha_realizacion, fecha_vencimiento, is_active, created_at, updated_at, deleted_at) FROM stdin;
\.


--
-- Data for Name: oper_conductor_documentos; Type: TABLE DATA; Schema: public; Owner: sail
--

COPY public.oper_conductor_documentos (id, conductor_id, tipo_documento, numero_documento, entidad_expedidora, fecha_expedicion, fecha_inicio_vigencia, fecha_vencimiento, archivo_path, is_active, created_at, updated_at, deleted_at) FROM stdin;
\.


--
-- Data for Name: oper_conductor_examenes; Type: TABLE DATA; Schema: public; Owner: sail
--

COPY public.oper_conductor_examenes (id, conductor_id, nombre_examen, entidad, fecha_realizacion, fecha_vencimiento, archivo_path, is_active, created_at, updated_at, deleted_at) FROM stdin;
\.


--
-- Data for Name: oper_conductor_experiencia; Type: TABLE DATA; Schema: public; Owner: sail
--

COPY public.oper_conductor_experiencia (id, conductor_id, empresa, cargo, fecha_inicio, fecha_fin, nombre_jefe_directo, telefono_verificacion, is_active, created_at, updated_at, deleted_at) FROM stdin;
\.


--
-- Data for Name: oper_conductor_infracciones; Type: TABLE DATA; Schema: public; Owner: sail
--

COPY public.oper_conductor_infracciones (id, conductor_id, numero_comparendo, fecha_infraccion, estado_pago, valor, is_active, created_at, updated_at, deleted_at) FROM stdin;
\.


--
-- Data for Name: oper_conductor_referencias; Type: TABLE DATA; Schema: public; Owner: sail
--

COPY public.oper_conductor_referencias (id, conductor_id, tipo_referencia, nombre_completo, parentesco, telefono, is_active, created_at, updated_at, deleted_at) FROM stdin;
\.


--
-- Data for Name: oper_conductor_ssocial; Type: TABLE DATA; Schema: public; Owner: sail
--

COPY public.oper_conductor_ssocial (id, conductor_id, fecha_inicial, fecha_final, fecha_pago, numero_planilla, archivo_path, is_active, created_at, updated_at, deleted_at) FROM stdin;
\.


--
-- Data for Name: oper_conductor_vehiculo; Type: TABLE DATA; Schema: public; Owner: sail
--

COPY public.oper_conductor_vehiculo (id, conductor_id, vehiculo_id, is_active, created_at, updated_at, deleted_at) FROM stdin;
\.


--
-- Data for Name: oper_conductores; Type: TABLE DATA; Schema: public; Owner: sail
--

COPY public.oper_conductores (id, empresa_id, user_id, documento, nombres, apellidos, numero_licencia, vencimiento_licencia, telefono, is_active, created_at, updated_at, deleted_at, fecha_ingreso, ciudad_residencia_id, ciudad_expedicion_documento_id, fecha_nacimiento, direccion_residencia, barrio, celular, email, estado_civil, hijos, grupo_sanguineo, eps, arl, fondo_pensiones, nombre_contacto_emergencia, telefono_contacto_emergencia, fecha_expedicion_licencia, categoria_licencia, archivo_licencia_path) FROM stdin;
31	1	\N	10203040	Carlos	Perez	LC-555	2028-04-09	\N	t	2026-04-09 20:55:54	\N	\N	\N	13	13	\N	\N	\N	\N	\N	\N	0	\N	\N	\N	\N	\N	\N	\N	\N	\N
\.


--
-- Data for Name: oper_contratos; Type: TABLE DATA; Schema: public; Owner: sail
--

COPY public.oper_contratos (id, empresa_id, numero_contrato, objeto_contrato, fecha_inicio, fecha_fin, is_active, created_at, updated_at, deleted_at, cliente_id, responsable_id, recorrido_descripcion, valor_contrato, origen, destino, ruta, plantilla_formato) FROM stdin;
9	1	CONTR-2024	Transporte Escolar	2026-04-09	2027-04-09	t	\N	\N	\N	28	16	\N	\N	\N	\N	\N	\N
\.


--
-- Data for Name: oper_empresas_convenio; Type: TABLE DATA; Schema: public; Owner: sail
--

COPY public.oper_empresas_convenio (id, empresa_id, razon_social, nit, representante_legal, documento_representante_legal, telefono, direccion, correo_electronico, fecha_inicio_convenio, fecha_final_convenio, is_active, created_at, updated_at, deleted_at) FROM stdin;
1	1	Transportes ABC	9000000000	Juan Perez	5646456	3168547825	por ahi	abc@sireco.com	2026-04-01	2029-10-08	t	2026-04-08 19:13:04	2026-04-08 19:13:04	\N
\.


--
-- Data for Name: oper_mantenimiento_registros; Type: TABLE DATA; Schema: public; Owner: sail
--

COPY public.oper_mantenimiento_registros (id, empresa_id, vehiculo_id, rutina_id, tipo_mantenimiento, fecha_servicio, kilometraje_servicio, taller_nombre, costo_total, descripcion_trabajo, archivo_factura_path, is_active, created_at, updated_at, deleted_at) FROM stdin;
65	1	35	18	Preventivo	2026-02-09	41200	\N	250000.00	\N	\N	t	2026-04-09 20:55:54	\N	\N
\.


--
-- Data for Name: oper_mantenimiento_rutinas; Type: TABLE DATA; Schema: public; Owner: sail
--

COPY public.oper_mantenimiento_rutinas (id, empresa_id, nombre_rutina, tipo_frecuencia, valor_frecuencia, alerta_anticipacion, is_active, created_at, updated_at, deleted_at) FROM stdin;
18	1	Cambio de Aceite	KM	5000	500	t	2026-04-09 20:55:54	\N	\N
\.


--
-- Data for Name: oper_preoperacional_evidencias; Type: TABLE DATA; Schema: public; Owner: sail
--

COPY public.oper_preoperacional_evidencias (id, preoperacional_id, categoria_falla, descripcion, foto_path, is_active, created_at, updated_at, deleted_at) FROM stdin;
\.


--
-- Data for Name: oper_preoperacionales; Type: TABLE DATA; Schema: public; Owner: sail
--

COPY public.oper_preoperacionales (id, empresa_id, conductor_id, vehiculo_id, plantilla_id, kilometraje_actual, estado_general, respuestas_json, observaciones_conductor, firma_digital_path, is_active, created_at, updated_at, deleted_at) FROM stdin;
162	1	31	35	\N	45800	Rechazado	{"Luces": "CUMPLE", "Frenos": "NO CUMPLE"}	\N	\N	t	2026-04-06 20:55:54	\N	\N
163	1	31	35	\N	45800	Rechazado	{"Luces": "CUMPLE", "Frenos": "NO CUMPLE"}	\N	\N	t	2026-04-07 20:55:54	\N	\N
164	1	31	35	\N	45800	Rechazado	{"Luces": "CUMPLE", "Frenos": "NO CUMPLE"}	\N	\N	t	2026-04-08 20:55:54	\N	\N
\.


--
-- Data for Name: oper_propietarios; Type: TABLE DATA; Schema: public; Owner: sail
--

COPY public.oper_propietarios (id, empresa_id, user_id, documento, nombres, apellidos, telefono, banco, tipo_cuenta, numero_cuenta, is_active, created_at, updated_at, deleted_at) FROM stdin;
1	1	2	123456789	Juan	P├®rez (Propietario)	\N	Bancolombia	\N	0000111122	t	2026-04-01 15:13:47	2026-04-01 15:13:47	\N
\.


--
-- Data for Name: oper_vehiculo_documentos; Type: TABLE DATA; Schema: public; Owner: sail
--

COPY public.oper_vehiculo_documentos (id, vehiculo_id, tipo_documento, numero_documento, entidad_expedidora, fecha_expedicion, fecha_inicio_vigencia, fecha_vencimiento, archivo_path, is_active, created_at, updated_at, deleted_at) FROM stdin;
11	35	TARJETA_OPERACION	9898	aaaa	2026-04-14	2026-04-14	2026-06-12	sireco-app/empresas/1/vehiculos/35/documentos/ac40325e-65ea-46d7-ac8b-06192337029f.pdf	t	2026-04-15 15:03:48	2026-04-15 15:03:48	\N
\.


--
-- Data for Name: oper_vehiculo_polizas; Type: TABLE DATA; Schema: public; Owner: sail
--

COPY public.oper_vehiculo_polizas (id, vehiculo_id, aseguradora_id, tipo_poliza, numero_poliza, fecha_expedicion, fecha_inicio_vigencia, fecha_vencimiento, dias_notificacion, archivo_path, is_active, created_at, updated_at, deleted_at) FROM stdin;
21	36	7	SOAT	POL-ABC-456	2025-04-09	2025-04-09	2026-10-26	30	\N	t	2026-04-09 20:55:54	\N	\N
20	35	7	SOAT	POL-SXM-123	2025-04-09	2025-04-09	2026-04-12	30	\N	f	2026-04-09 20:55:54	\N	\N
22	35	7	SOAT	14858	2026-04-14	2026-04-14	2026-05-28	30	sireco-app/empresas/1/vehiculos/35/polizas/c39ee9ae-dbd6-4a8a-aeca-9cf784c3533c.pdf	t	2026-04-15 15:01:09	2026-04-15 15:01:09	\N
\.


--
-- Data for Name: oper_vehiculo_revisiones; Type: TABLE DATA; Schema: public; Owner: sail
--

COPY public.oper_vehiculo_revisiones (id, vehiculo_id, cda_id, tipo_revision, numero_certificado, fecha_expedicion, fecha_inicio_vigencia, fecha_vencimiento, dias_notificacion, archivo_path, is_active, created_at, updated_at, deleted_at) FROM stdin;
12	35	6	RTM	CERT-SXM-123	2025-04-09	2025-04-09	2026-10-26	5	\N	t	2026-04-09 20:55:54	\N	\N
13	36	6	RTM	CERT-ABC-456	2025-04-09	2025-04-09	2026-04-13	5	\N	t	2026-04-09 20:55:54	\N	\N
\.


--
-- Data for Name: oper_vehiculos; Type: TABLE DATA; Schema: public; Owner: sail
--

COPY public.oper_vehiculos (id, empresa_id, placa, modelo, capacidad_pasajeros, is_active, created_at, updated_at, deleted_at, propietario_id, clase, color, cilindraje, numero_motor, numero_chasis, numero_licencia_transito, fecha_expedicion_licencia_transito, fecha_matricula, tipo_carroceria, combustible, numero_vin, numero_serie, origen, fecha_vencimiento_contrato, marca_id, linea_id, empresa_convenio_id, numero_interno, numero_tarjeta_operacion, kilometraje) FROM stdin;
35	1	SXM-123	2022	12	t	2026-04-09 20:55:54	\N	\N	\N	\N	\N	\N	\N	\N	\N	\N	\N	\N	\N	\N	\N	Propio	\N	53	52	\N	\N	\N	45800
36	1	ABC-456	2023	4	t	2026-04-09 20:55:54	\N	\N	\N	\N	\N	\N	\N	\N	\N	\N	\N	\N	\N	\N	\N	Propio	\N	54	53	\N	\N	\N	12500
37	1	ABC123	\N	4	t	2026-04-14 18:48:09	2026-04-14 18:48:09	\N	\N	\N	\N	\N	\N	\N	\N	\N	\N	\N	\N	\N	\N	Propio	\N	\N	\N	\N	\N	\N	0
\.


--
-- Data for Name: param_ciudades; Type: TABLE DATA; Schema: public; Owner: sail
--

COPY public.param_ciudades (id, departamento_id, nombre, codigo_dane, created_at, updated_at) FROM stdin;
13	13	MEDELLIN	05001	2026-04-09 20:55:54	\N
\.


--
-- Data for Name: param_departamentos; Type: TABLE DATA; Schema: public; Owner: sail
--

COPY public.param_departamentos (id, nombre, codigo_dane, created_at, updated_at) FROM stdin;
13	ANTIOQUIA	05	2026-04-09 20:55:54	\N
\.


--
-- Data for Name: param_lineas; Type: TABLE DATA; Schema: public; Owner: sail
--

COPY public.param_lineas (id, marca_id, nombre, created_at, updated_at) FROM stdin;
52	53	NPR	2026-04-09 20:55:54	\N
53	54	F-150	2026-04-09 20:55:54	\N
54	55	SPRINTER	2026-04-09 20:55:54	\N
55	56	HILUX	2026-04-09 20:55:54	\N
56	57	URVAN	2026-04-09 20:55:54	\N
\.


--
-- Data for Name: param_marcas; Type: TABLE DATA; Schema: public; Owner: sail
--

COPY public.param_marcas (id, nombre, created_at, updated_at) FROM stdin;
53	CHEVROLET	2026-04-09 20:55:54	\N
54	FORD	2026-04-09 20:55:54	\N
55	MERCEDES BENZ	2026-04-09 20:55:54	\N
56	TOYOTA	2026-04-09 20:55:54	\N
57	NISSAN	2026-04-09 20:55:54	\N
\.


--
-- Data for Name: param_preop_plantillas; Type: TABLE DATA; Schema: public; Owner: sail
--

COPY public.param_preop_plantillas (id, empresa_id, nombre_plantilla, estructura_json, es_predeterminada, is_active, created_at, updated_at, deleted_at) FROM stdin;
1	1	Nueva Plantilla PESV	{"categorias": [{"id": "1", "items": [{"id": "i1", "texto": "Estado general del veh├¡culo", "exigir_foto": false}, {"id": "1775747195182", "texto": "Luces", "exigir_foto": false}, {"id": "1775747205897", "texto": "Frenos", "exigir_foto": false}, {"id": "1775747213844", "texto": "Llantas", "exigir_foto": false}], "nombre": "Inspecci├│n General"}]}	f	t	2026-04-09 15:07:47	2026-04-09 15:07:47	\N
2	1	Plantilla general	{"categorias": [{"id": "cat1", "items": [{"id": "i1", "texto": "Luces delanteras y traseras", "exigir_foto": false}, {"id": "i2", "texto": "Vidrio panor├ímico sin fisuras", "exigir_foto": true}], "nombre": "Luces y Vidrios"}, {"id": "cat2", "items": [{"id": "i3", "texto": "Nivel de aceite motor", "exigir_foto": false}, {"id": "i4", "texto": "Nivel de l├¡quido refrigerante", "exigir_foto": false}], "nombre": "Niveles de Fluidos"}]}	t	t	2026-04-09 16:21:41	2026-04-09 16:21:41	\N
\.


--
-- Data for Name: password_reset_tokens; Type: TABLE DATA; Schema: public; Owner: sail
--

COPY public.password_reset_tokens (email, token, created_at) FROM stdin;
\.


--
-- Data for Name: permissions; Type: TABLE DATA; Schema: public; Owner: sail
--

COPY public.permissions (id, name, guard_name, created_at, updated_at) FROM stdin;
1	vehiculos.ver	web	2026-04-10 19:38:19	2026-04-10 19:38:19
2	vehiculos.crear	web	2026-04-10 19:38:19	2026-04-10 19:38:19
3	vehiculos.editar	web	2026-04-10 19:38:19	2026-04-10 19:38:19
4	vehiculos.eliminar	web	2026-04-10 19:38:19	2026-04-10 19:38:19
5	vehiculos.documentos	web	2026-04-10 19:38:19	2026-04-10 19:38:19
6	conductores.ver	web	2026-04-10 19:38:19	2026-04-10 19:38:19
7	conductores.crear	web	2026-04-10 19:38:19	2026-04-10 19:38:19
8	conductores.editar	web	2026-04-10 19:38:19	2026-04-10 19:38:19
9	conductores.eliminar	web	2026-04-10 19:38:19	2026-04-10 19:38:19
10	conductores.examenes	web	2026-04-10 19:38:19	2026-04-10 19:38:19
11	conductores.ssocial	web	2026-04-10 19:38:19	2026-04-10 19:38:19
12	propietarios.ver	web	2026-04-10 19:38:19	2026-04-10 19:38:19
13	propietarios.crear	web	2026-04-10 19:38:19	2026-04-10 19:38:19
14	propietarios.editar	web	2026-04-10 19:38:19	2026-04-10 19:38:19
15	propietarios.eliminar	web	2026-04-10 19:38:19	2026-04-10 19:38:19
16	clientes.ver	web	2026-04-10 19:38:19	2026-04-10 19:38:19
17	clientes.crear	web	2026-04-10 19:38:19	2026-04-10 19:38:19
18	clientes.editar	web	2026-04-10 19:38:19	2026-04-10 19:38:19
19	clientes.eliminar	web	2026-04-10 19:38:19	2026-04-10 19:38:19
20	contratos.ver	web	2026-04-10 19:38:19	2026-04-10 19:38:19
21	contratos.crear	web	2026-04-10 19:38:19	2026-04-10 19:38:19
22	contratos.editar	web	2026-04-10 19:38:19	2026-04-10 19:38:19
23	contratos.eliminar	web	2026-04-10 19:38:19	2026-04-10 19:38:19
24	convenios.ver	web	2026-04-10 19:38:19	2026-04-10 19:38:19
25	convenios.crear	web	2026-04-10 19:38:19	2026-04-10 19:38:19
26	convenios.editar	web	2026-04-10 19:38:19	2026-04-10 19:38:19
27	convenios.eliminar	web	2026-04-10 19:38:19	2026-04-10 19:38:19
28	fuec.ver	web	2026-04-10 19:38:19	2026-04-10 19:38:19
29	fuec.emitir	web	2026-04-10 19:38:19	2026-04-10 19:38:19
30	fuec.anular	web	2026-04-10 19:38:19	2026-04-10 19:38:19
31	fuec.descargar	web	2026-04-10 19:38:19	2026-04-10 19:38:19
32	preoperacional.ver	web	2026-04-10 19:38:19	2026-04-10 19:38:19
33	preoperacional.realizar	web	2026-04-10 19:38:19	2026-04-10 19:38:19
34	preoperacional.analitica	web	2026-04-10 19:38:19	2026-04-10 19:38:19
35	mantenimiento.ver	web	2026-04-10 19:38:19	2026-04-10 19:38:19
36	mantenimiento.registrar	web	2026-04-10 19:38:19	2026-04-10 19:38:19
37	mantenimiento.rutinas	web	2026-04-10 19:38:19	2026-04-10 19:38:19
38	reportes.gerencial	web	2026-04-10 19:38:19	2026-04-10 19:38:19
39	reportes.operativo	web	2026-04-10 19:38:19	2026-04-10 19:38:19
40	reportes.predictivo	web	2026-04-10 19:38:19	2026-04-10 19:38:19
41	configuracion.usuarios	web	2026-04-10 19:38:19	2026-04-10 19:38:19
42	configuracion.roles	web	2026-04-10 19:38:19	2026-04-10 19:38:19
43	configuracion.empresa	web	2026-04-10 19:38:19	2026-04-10 19:38:19
44	mobile.conductor	web	2026-04-10 19:38:19	2026-04-10 19:38:19
45	mobile.propietario	web	2026-04-10 19:38:19	2026-04-10 19:38:19
\.


--
-- Data for Name: personal_access_tokens; Type: TABLE DATA; Schema: public; Owner: sail
--

COPY public.personal_access_tokens (id, tokenable_type, tokenable_id, name, token, abilities, last_used_at, expires_at, created_at, updated_at) FROM stdin;
3	App\\Models\\User	1	test-token	709ac5b5d1ba5455d344786578a90714050bf28811e5aba59f8d55a19352fbb9	["*"]	2026-04-07 20:15:46	\N	2026-04-07 18:42:27	2026-04-07 20:15:46
2	App\\Models\\User	1	test-token	f9bb782d1fe4e0d2ec466d482234861c7c482f521be2d1422c127e9216257e5e	["*"]	2026-04-07 18:04:18	\N	2026-04-07 18:01:22	2026-04-07 18:04:18
1	App\\Models\\User	1	TestToken	8e7d18387997499ab66dd5ce857b53b60b17fb5b2171887e2ca28450ec943a60	["*"]	2026-04-07 18:34:47	\N	2026-04-01 15:11:41	2026-04-07 18:34:47
\.


--
-- Data for Name: reg_fuecs; Type: TABLE DATA; Schema: public; Owner: sail
--

COPY public.reg_fuecs (id, empresa_id, vehiculo_id, conductor_id, contrato_id, numero_fuec, origen, destino, fecha_inicio_viaje, fecha_fin_viaje, estado, created_at, updated_at, deleted_at, consecutivo_anual, resolucion_snapshot, datos_snapshot, qr_verificacion_hash, conductor2_id, conductor3_id) FROM stdin;
42	1	35	31	9	FUEC-T-001	BASE	DESTINO	2026-04-09	2026-04-14	ANULADO	2026-04-09 20:55:54	2026-04-15 02:05:15	\N	\N	\N	\N	\N	\N	\N
\.


--
-- Data for Name: role_has_permissions; Type: TABLE DATA; Schema: public; Owner: sail
--

COPY public.role_has_permissions (permission_id, role_id) FROM stdin;
1	2
2	2
3	2
4	2
5	2
6	2
7	2
8	2
9	2
10	2
11	2
12	2
13	2
14	2
15	2
16	2
17	2
18	2
19	2
20	2
21	2
22	2
23	2
24	2
25	2
26	2
27	2
28	2
29	2
30	2
31	2
32	2
33	2
34	2
35	2
36	2
37	2
38	2
39	2
40	2
41	2
42	2
43	2
44	2
45	2
1	4
6	4
12	4
16	4
20	4
24	4
28	4
38	4
1	5
3	5
6	5
8	5
28	5
29	5
31	5
35	5
32	5
1	6
6	6
12	6
16	6
20	6
24	6
28	6
39	6
32	6
33	7
44	7
1	8
29	8
31	8
45	8
\.


--
-- Data for Name: roles; Type: TABLE DATA; Schema: public; Owner: sail
--

COPY public.roles (id, name, guard_name, created_at, updated_at) FROM stdin;
1	Super Admin	admin	2026-04-01 15:07:06	2026-04-01 15:07:06
2	Administrador Empresa	web	2026-04-01 15:07:06	2026-04-01 15:07:06
3	Conductor	mobile	2026-04-01 15:07:06	2026-04-01 15:07:06
4	Gerencia	web	2026-04-10 19:38:20	2026-04-10 19:38:20
5	Operador de Ruta	web	2026-04-10 19:38:20	2026-04-10 19:38:20
6	Auditor	web	2026-04-10 19:38:20	2026-04-10 19:38:20
7	Conductor	web	2026-04-10 19:38:20	2026-04-10 19:38:20
8	Propietario	web	2026-04-10 19:38:20	2026-04-10 19:38:20
9	Super Admin	web	2026-04-10 19:38:20	2026-04-10 19:38:20
\.


--
-- Data for Name: saas_empresas; Type: TABLE DATA; Schema: public; Owner: sail
--

COPY public.saas_empresas (id, uuid, nit, nombre_razon_social, email_contacto, telefono, direccion, codigo_territorial, numero_resolucion, anio_resolucion, is_active, created_at, updated_at, deleted_at, logo_empresa_path, logo_ministerio_path, firma_gerente_path, config_bloqueo_fuec_json, fav_ia_settings, billing_id, billing_token) FROM stdin;
1	a599fb2a-8bdd-4000-99b5-f3d0a0de4a12	900123456-0	SERVITRANSPORTES ANDINA S.A.S	admin@sireco.com	\N	\N	425	0034	14	t	2026-04-01 15:07:07	2026-04-07 19:18:04	\N	empresas/1/branding/wZAIpnNpDGwn5Y0vVydCOC6oLnXhDNYHNH1ktn3C.jpg	empresas/1/branding/ErpDBP4KocoNEdO6fbB5nOPK7SrPhXryq5jQban5.png	empresas/1/branding/fodjRQmabw1YJ3VjP9r54ey7Yjr7dO9XDCe8NktH.jpg	{"exigir_polizas_vigentes": false, "exigir_preoperacional_diario": false, "exigir_seguridad_social_vigente": false}	{"days_before_exp": 7, "pattern_threshold": 2, "manto_proximity_percent": 0.9}	6	SERVITRANSPORTES ANDINA S.A.S
\.


--
-- Data for Name: saas_features; Type: TABLE DATA; Schema: public; Owner: sail
--

COPY public.saas_features (id, empresa_id, feature_name, is_enabled, config_json, created_at, updated_at) FROM stdin;
1	1	fav_ia_llm	t	\N	2026-04-14 18:48:08	2026-04-14 18:48:08
\.


--
-- Data for Name: sessions; Type: TABLE DATA; Schema: public; Owner: sail
--

COPY public.sessions (id, user_id, ip_address, user_agent, payload, last_activity) FROM stdin;
KGcA7JIAu6a7rSdv11lWf3eS5C7mGlWl0HeUOgkU	\N	172.18.0.1	Avast Antivirus	YTozOntzOjY6Il90b2tlbiI7czo0MDoiV3hwWk1QOXJpOWpzdW1PMm5rb2VFWDBhcEttTmNUMjBWUXVYa0d5NSI7czo5OiJfcHJldmlvdXMiO2E6Mjp7czozOiJ1cmwiO3M6MTg6Imh0dHA6Ly8xNzIuMjguMzIuMSI7czo1OiJyb3V0ZSI7Tjt9czo2OiJfZmxhc2giO2E6Mjp7czozOiJvbGQiO2E6MDp7fXM6MzoibmV3IjthOjA6e319fQ==	1775056362
SsleXMPD7NOiu5CzszFGfbXchOSDpIv5fomCqS9H	\N	172.18.0.1	Avast Antivirus	YTozOntzOjY6Il90b2tlbiI7czo0MDoibzZkU0llUDN2cFlWa0VDWmloa2lha0V6VzQ0Q1h6UTRLM0gzamhrNCI7czo5OiJfcHJldmlvdXMiO2E6Mjp7czozOiJ1cmwiO3M6MTg6Imh0dHA6Ly8xNzIuMjguMzIuMSI7czo1OiJyb3V0ZSI7Tjt9czo2OiJfZmxhc2giO2E6Mjp7czozOiJvbGQiO2E6MDp7fXM6MzoibmV3IjthOjA6e319fQ==	1775056370
6zVUReeQTflaVj2kNi1g68w8xqwRgaIFF1fc5Ufp	\N	172.18.0.1	Avast Antivirus	YTozOntzOjY6Il90b2tlbiI7czo0MDoiWERmWHplTDN2RkNXSTdQeXhzTFRwbjRDcmtrVnBjN21yeUlEcEY1QSI7czo5OiJfcHJldmlvdXMiO2E6Mjp7czozOiJ1cmwiO3M6MTg6Imh0dHA6Ly8xNzIuMjguMzIuMSI7czo1OiJyb3V0ZSI7Tjt9czo2OiJfZmxhc2giO2E6Mjp7czozOiJvbGQiO2E6MDp7fXM6MzoibmV3IjthOjA6e319fQ==	1775142767
eSadPwaz3HWHU2eughYlXaSZh8v2y3mCWfMheL7Y	\N	172.18.0.1	Avast Antivirus	YTozOntzOjY6Il90b2tlbiI7czo0MDoiMzlWMEdnbGV2NVhyMHpNdnd0dFNkcG84aUhtd1VnaDd4M2FTZEZ1RiI7czo5OiJfcHJldmlvdXMiO2E6Mjp7czozOiJ1cmwiO3M6MTg6Imh0dHA6Ly8xNzIuMjguMzIuMSI7czo1OiJyb3V0ZSI7Tjt9czo2OiJfZmxhc2giO2E6Mjp7czozOiJvbGQiO2E6MDp7fXM6MzoibmV3IjthOjA6e319fQ==	1775142773
3F60BCO8nsS7QwdlMojwqObdUjjzzeXmlsCq6AFv	\N	172.18.0.1	Avast Antivirus	YTozOntzOjY6Il90b2tlbiI7czo0MDoiT2l2WEJYUlJDTU5ESDA1RmRGQlRpVFhaUUVPSlBXY0pRcTlqNlJJZSI7czo5OiJfcHJldmlvdXMiO2E6Mjp7czozOiJ1cmwiO3M6MTg6Imh0dHA6Ly8xNzIuMjguMzIuMSI7czo1OiJyb3V0ZSI7Tjt9czo2OiJfZmxhc2giO2E6Mjp7czozOiJvbGQiO2E6MDp7fXM6MzoibmV3IjthOjA6e319fQ==	1775158058
5yCZDeybZXXiplT0avb09o0EZc9Iq7hkWejAHPRk	\N	172.18.0.1	Avast Antivirus	YTozOntzOjY6Il90b2tlbiI7czo0MDoic0Z2NTJwRmFuVGRFeVJyNGhOWU5Jd0xta2NpOW42TXdzWnJEbVZWViI7czo5OiJfcHJldmlvdXMiO2E6Mjp7czozOiJ1cmwiO3M6MTg6Imh0dHA6Ly8xNzIuMjguMzIuMSI7czo1OiJyb3V0ZSI7Tjt9czo2OiJfZmxhc2giO2E6Mjp7czozOiJvbGQiO2E6MDp7fXM6MzoibmV3IjthOjA6e319fQ==	1775158061
uGZrODLJRR0Xg7XN6zm7eqVTPSYf4oKYK2J61npX	\N	172.18.0.1	Avast Antivirus	YTozOntzOjY6Il90b2tlbiI7czo0MDoiaHE0Yko4OTJGRnRaWnI0Q3R4Q1JXQUg5Y3JrOHBRZUlBNG5FYWdhNiI7czo5OiJfcHJldmlvdXMiO2E6Mjp7czozOiJ1cmwiO3M6MTg6Imh0dHA6Ly8xNzIuMjguMzIuMSI7czo1OiJyb3V0ZSI7Tjt9czo2OiJfZmxhc2giO2E6Mjp7czozOiJvbGQiO2E6MDp7fXM6MzoibmV3IjthOjA6e319fQ==	1775183501
Dxm9Zk97529PQ0PX8LL2ikviVwXs04obruPJJDUi	\N	172.18.0.1	Avast Antivirus	YTozOntzOjY6Il90b2tlbiI7czo0MDoicnhOTEIzR0MyZktQam1vZXpYNmkxT2E1S1Ryazg3UEFyYUxQMkJZTiI7czo5OiJfcHJldmlvdXMiO2E6Mjp7czozOiJ1cmwiO3M6MTg6Imh0dHA6Ly8xNzIuMjguMzIuMSI7czo1OiJyb3V0ZSI7Tjt9czo2OiJfZmxhc2giO2E6Mjp7czozOiJvbGQiO2E6MDp7fXM6MzoibmV3IjthOjA6e319fQ==	1775183508
R4QuXf5qqPUssUR4GZi4q4fBhnhFk4GULrV0qffY	\N	172.18.0.1	Avast Antivirus	YTozOntzOjY6Il90b2tlbiI7czo0MDoiMU1SdHJsR0dQZ244WWVvRXZmbFdIMVNKT1V6T3NKbU5KYzgzY2lidSI7czo5OiJfcHJldmlvdXMiO2E6Mjp7czozOiJ1cmwiO3M6MTg6Imh0dHA6Ly8xNzIuMjguMzIuMSI7czo1OiJyb3V0ZSI7Tjt9czo2OiJfZmxhc2giO2E6Mjp7czozOiJvbGQiO2E6MDp7fXM6MzoibmV3IjthOjA6e319fQ==	1775316322
pQcmpsqYoRpKz21yKtu5OEIwhFBqY0F4aIRjgOQe	\N	172.18.0.1	Avast Antivirus	YTozOntzOjY6Il90b2tlbiI7czo0MDoidllmQWtnQTU0NDRzbVBKaEZkQ1dpTmtRdjN2Yndha0dSd0FaT1pSUyI7czo5OiJfcHJldmlvdXMiO2E6Mjp7czozOiJ1cmwiO3M6MTg6Imh0dHA6Ly8xNzIuMjguMzIuMSI7czo1OiJyb3V0ZSI7Tjt9czo2OiJfZmxhc2giO2E6Mjp7czozOiJvbGQiO2E6MDp7fXM6MzoibmV3IjthOjA6e319fQ==	1775316328
OqGnRE62JT0hfKny8M6W117FJBINmauE9r2bqESM	\N	172.18.0.1	Avast Antivirus	YTozOntzOjY6Il90b2tlbiI7czo0MDoibWE5NW5IcXp4T3ZBM0phTGZxa1g2QmFPRWhMcWtYOXBYS0NGVmozZSI7czo5OiJfcHJldmlvdXMiO2E6Mjp7czozOiJ1cmwiO3M6MTg6Imh0dHA6Ly8xNzIuMjguMzIuMSI7czo1OiJyb3V0ZSI7Tjt9czo2OiJfZmxhc2giO2E6Mjp7czozOiJvbGQiO2E6MDp7fXM6MzoibmV3IjthOjA6e319fQ==	1775329865
UOugxkd58CCtk1x5WvcxwAxKrwUZopelu6WvTbsd	\N	172.18.0.1	Avast Antivirus	YTozOntzOjY6Il90b2tlbiI7czo0MDoiMlR4UmFQNUE4UHVCdEp4VVZGcUtDREpjdmd4WkFxVnh0UENmM3BGNiI7czo5OiJfcHJldmlvdXMiO2E6Mjp7czozOiJ1cmwiO3M6MTg6Imh0dHA6Ly8xNzIuMjguMzIuMSI7czo1OiJyb3V0ZSI7Tjt9czo2OiJfZmxhc2giO2E6Mjp7czozOiJvbGQiO2E6MDp7fXM6MzoibmV3IjthOjA6e319fQ==	1775329869
eujV8ClGTQDqhXM6UmmocpCNbxkKz9gf2xcuDtou	\N	172.18.0.1	Avast Antivirus	YTozOntzOjY6Il90b2tlbiI7czo0MDoicWE5dUhtRWk2SVdWSHVuRUVZRG1GWmt4bFJzQkNXZThBOFp1b2UzMCI7czo5OiJfcHJldmlvdXMiO2E6Mjp7czozOiJ1cmwiO3M6MTg6Imh0dHA6Ly8xNzIuMjguMzIuMSI7czo1OiJyb3V0ZSI7Tjt9czo2OiJfZmxhc2giO2E6Mjp7czozOiJvbGQiO2E6MDp7fXM6MzoibmV3IjthOjA6e319fQ==	1775509701
luKcIVB7PPJSPvI4KGvCqxczCTTovty2yZHnzuu9	\N	172.18.0.1	Avast Antivirus	YTozOntzOjY6Il90b2tlbiI7czo0MDoiUDRFbVhOcmFCRjlwckQ3d3diQUtKaDBtczViNnVwMUNHSnRXN2ptSyI7czo5OiJfcHJldmlvdXMiO2E6Mjp7czozOiJ1cmwiO3M6MTg6Imh0dHA6Ly8xNzIuMjguMzIuMSI7czo1OiJyb3V0ZSI7Tjt9czo2OiJfZmxhc2giO2E6Mjp7czozOiJvbGQiO2E6MDp7fXM6MzoibmV3IjthOjA6e319fQ==	1775509707
WOxKK6lyOKIePeI3opjsm90neRRbaYWxminQAuN9	\N	172.18.0.1	Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/146.0.0.0 Safari/537.36	YTozOntzOjY6Il90b2tlbiI7czo0MDoidUVxN0t1enc1eGRQRnZTamx2V3NicUU1TFE3dXFNcWRoNTZ4Z0xZcSI7czo5OiJfcHJldmlvdXMiO2E6Mjp7czozOiJ1cmwiO3M6MzY6Imh0dHA6Ly9sb2NhbGhvc3Qvc2FuY3R1bS9jc3JmLWNvb2tpZSI7czo1OiJyb3V0ZSI7czoxOToic2FuY3R1bS5jc3JmLWNvb2tpZSI7fXM6NjoiX2ZsYXNoIjthOjI6e3M6Mzoib2xkIjthOjA6e31zOjM6Im5ldyI7YTowOnt9fX0=	1775599526
TfgtGqXY8Xc2gAjnrmNYELHPjt8byhsSz0JtBDKr	\N	172.18.0.1	Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/146.0.0.0 Safari/537.36	YTozOntzOjY6Il90b2tlbiI7czo0MDoiWkhIZDM0ZTFNVGV5eTlzMUtUTUJFeVhwVHlYb1hWaWtBWTVTaG9LRSI7czo5OiJfcHJldmlvdXMiO2E6Mjp7czozOiJ1cmwiO3M6MzY6Imh0dHA6Ly9sb2NhbGhvc3Qvc2FuY3R1bS9jc3JmLWNvb2tpZSI7czo1OiJyb3V0ZSI7czoxOToic2FuY3R1bS5jc3JmLWNvb2tpZSI7fXM6NjoiX2ZsYXNoIjthOjI6e3M6Mzoib2xkIjthOjA6e31zOjM6Im5ldyI7YTowOnt9fX0=	1775652947
edIAKyutbPsn00rkwiseZ0op4yPiGLIepq6aXJZ1	\N	172.18.0.1	Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/146.0.0.0 Safari/537.36	YTozOntzOjY6Il90b2tlbiI7czo0MDoiWURYak5Sa0FIclRNSXVzU0h2UWxwQWZ0YUNBRGNLdHR2MVVIZlF3WiI7czo5OiJfcHJldmlvdXMiO2E6Mjp7czozOiJ1cmwiO3M6Mjg6Imh0dHA6Ly9sb2NhbGhvc3QvYXBpL3YxL3VzZXIiO3M6NToicm91dGUiO047fXM6NjoiX2ZsYXNoIjthOjI6e3M6Mzoib2xkIjthOjA6e31zOjM6Im5ldyI7YTowOnt9fX0=	1775653083
ZTRY57WjoMOtUSGHhnr94c6W0nDF01lw2NrpnqCd	\N	172.18.0.1	Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/146.0.0.0 Safari/537.36	YTozOntzOjY6Il90b2tlbiI7czo0MDoiWUgzcGo4b0JOZkNBOVpJN3RMSnVpRFhtMjFwNzJ5djFQbG0xSU1qcCI7czo5OiJfcHJldmlvdXMiO2E6Mjp7czozOiJ1cmwiO3M6MzY6Imh0dHA6Ly9sb2NhbGhvc3Qvc2FuY3R1bS9jc3JmLWNvb2tpZSI7czo1OiJyb3V0ZSI7czoxOToic2FuY3R1bS5jc3JmLWNvb2tpZSI7fXM6NjoiX2ZsYXNoIjthOjI6e3M6Mzoib2xkIjthOjA6e31zOjM6Im5ldyI7YTowOnt9fX0=	1775653192
\.


--
-- Data for Name: users; Type: TABLE DATA; Schema: public; Owner: sail
--

COPY public.users (id, name, email, email_verified_at, password, remember_token, created_at, updated_at, empresa_id, documento, telefono, is_active, conductor_id, propietario_id) FROM stdin;
2	Conductor Prueba QA	conductor@sireco.com	\N	$2y$12$B9bkWkRWO6pHbBGkPIdVSed.PTynDXRy5w9Gv99pty4TjRXRFanzq	\N	2026-04-01 15:13:47	2026-04-01 15:13:47	1	123456789	\N	t	\N	\N
1	Super Administrador	admin@sireco.com	2026-04-01 15:07:10	$2y$12$k1615YKaUe1wm/jqR0LO/.LYi2kuY7RossOYNdassiW9WVVX6BLnC	rzGy4ynNyM	2026-04-01 15:07:10	2026-04-08 14:01:05	1	1000000000	\N	t	\N	\N
3	Gustavo Valverde	gvalgreen@gmail.com	\N	$2y$12$KyVaks5Vf5x7HjtSdlQhmOFN6uEX5QKyRQfeJHKP/Y01oaeXcHCg.	\N	2026-04-08 17:43:36	2026-04-08 17:43:36	1	80725472	\N	t	\N	\N
\.


--
-- Name: audit_events_id_seq; Type: SEQUENCE SET; Schema: public; Owner: sail
--

SELECT pg_catalog.setval('public.audit_events_id_seq', 1, false);


--
-- Name: failed_jobs_id_seq; Type: SEQUENCE SET; Schema: public; Owner: sail
--

SELECT pg_catalog.setval('public.failed_jobs_id_seq', 1, false);


--
-- Name: jobs_id_seq; Type: SEQUENCE SET; Schema: public; Owner: sail
--

SELECT pg_catalog.setval('public.jobs_id_seq', 1, false);


--
-- Name: migrations_id_seq; Type: SEQUENCE SET; Schema: public; Owner: sail
--

SELECT pg_catalog.setval('public.migrations_id_seq', 62, true);


--
-- Name: oper_aseguradoras_id_seq; Type: SEQUENCE SET; Schema: public; Owner: sail
--

SELECT pg_catalog.setval('public.oper_aseguradoras_id_seq', 7, true);


--
-- Name: oper_cdas_id_seq; Type: SEQUENCE SET; Schema: public; Owner: sail
--

SELECT pg_catalog.setval('public.oper_cdas_id_seq', 6, true);


--
-- Name: oper_cliente_responsables_id_seq; Type: SEQUENCE SET; Schema: public; Owner: sail
--

SELECT pg_catalog.setval('public.oper_cliente_responsables_id_seq', 17, true);


--
-- Name: oper_clientes_id_seq; Type: SEQUENCE SET; Schema: public; Owner: sail
--

SELECT pg_catalog.setval('public.oper_clientes_id_seq', 29, true);


--
-- Name: oper_conductor_capacitaciones_id_seq; Type: SEQUENCE SET; Schema: public; Owner: sail
--

SELECT pg_catalog.setval('public.oper_conductor_capacitaciones_id_seq', 1, false);


--
-- Name: oper_conductor_documentos_id_seq; Type: SEQUENCE SET; Schema: public; Owner: sail
--

SELECT pg_catalog.setval('public.oper_conductor_documentos_id_seq', 1, false);


--
-- Name: oper_conductor_examenes_id_seq; Type: SEQUENCE SET; Schema: public; Owner: sail
--

SELECT pg_catalog.setval('public.oper_conductor_examenes_id_seq', 1, false);


--
-- Name: oper_conductor_experiencia_id_seq; Type: SEQUENCE SET; Schema: public; Owner: sail
--

SELECT pg_catalog.setval('public.oper_conductor_experiencia_id_seq', 1, false);


--
-- Name: oper_conductor_infracciones_id_seq; Type: SEQUENCE SET; Schema: public; Owner: sail
--

SELECT pg_catalog.setval('public.oper_conductor_infracciones_id_seq', 1, false);


--
-- Name: oper_conductor_referencias_id_seq; Type: SEQUENCE SET; Schema: public; Owner: sail
--

SELECT pg_catalog.setval('public.oper_conductor_referencias_id_seq', 1, false);


--
-- Name: oper_conductor_ssocial_id_seq; Type: SEQUENCE SET; Schema: public; Owner: sail
--

SELECT pg_catalog.setval('public.oper_conductor_ssocial_id_seq', 2, true);


--
-- Name: oper_conductor_vehiculo_id_seq; Type: SEQUENCE SET; Schema: public; Owner: sail
--

SELECT pg_catalog.setval('public.oper_conductor_vehiculo_id_seq', 1, true);


--
-- Name: oper_conductores_id_seq; Type: SEQUENCE SET; Schema: public; Owner: sail
--

SELECT pg_catalog.setval('public.oper_conductores_id_seq', 31, true);


--
-- Name: oper_contratos_id_seq; Type: SEQUENCE SET; Schema: public; Owner: sail
--

SELECT pg_catalog.setval('public.oper_contratos_id_seq', 9, true);


--
-- Name: oper_empresas_convenio_id_seq; Type: SEQUENCE SET; Schema: public; Owner: sail
--

SELECT pg_catalog.setval('public.oper_empresas_convenio_id_seq', 1, true);


--
-- Name: oper_mantenimiento_registros_id_seq; Type: SEQUENCE SET; Schema: public; Owner: sail
--

SELECT pg_catalog.setval('public.oper_mantenimiento_registros_id_seq', 65, true);


--
-- Name: oper_mantenimiento_rutinas_id_seq; Type: SEQUENCE SET; Schema: public; Owner: sail
--

SELECT pg_catalog.setval('public.oper_mantenimiento_rutinas_id_seq', 18, true);


--
-- Name: oper_preoperacional_evidencias_id_seq; Type: SEQUENCE SET; Schema: public; Owner: sail
--

SELECT pg_catalog.setval('public.oper_preoperacional_evidencias_id_seq', 1, false);


--
-- Name: oper_preoperacionales_id_seq; Type: SEQUENCE SET; Schema: public; Owner: sail
--

SELECT pg_catalog.setval('public.oper_preoperacionales_id_seq', 164, true);


--
-- Name: oper_propietarios_id_seq; Type: SEQUENCE SET; Schema: public; Owner: sail
--

SELECT pg_catalog.setval('public.oper_propietarios_id_seq', 3, true);


--
-- Name: oper_vehiculo_documentos_id_seq; Type: SEQUENCE SET; Schema: public; Owner: sail
--

SELECT pg_catalog.setval('public.oper_vehiculo_documentos_id_seq', 11, true);


--
-- Name: oper_vehiculo_polizas_id_seq; Type: SEQUENCE SET; Schema: public; Owner: sail
--

SELECT pg_catalog.setval('public.oper_vehiculo_polizas_id_seq', 22, true);


--
-- Name: oper_vehiculo_revisiones_id_seq; Type: SEQUENCE SET; Schema: public; Owner: sail
--

SELECT pg_catalog.setval('public.oper_vehiculo_revisiones_id_seq', 13, true);


--
-- Name: oper_vehiculos_id_seq; Type: SEQUENCE SET; Schema: public; Owner: sail
--

SELECT pg_catalog.setval('public.oper_vehiculos_id_seq', 37, true);


--
-- Name: param_ciudades_id_seq; Type: SEQUENCE SET; Schema: public; Owner: sail
--

SELECT pg_catalog.setval('public.param_ciudades_id_seq', 13, true);


--
-- Name: param_departamentos_id_seq; Type: SEQUENCE SET; Schema: public; Owner: sail
--

SELECT pg_catalog.setval('public.param_departamentos_id_seq', 13, true);


--
-- Name: param_lineas_id_seq; Type: SEQUENCE SET; Schema: public; Owner: sail
--

SELECT pg_catalog.setval('public.param_lineas_id_seq', 56, true);


--
-- Name: param_marcas_id_seq; Type: SEQUENCE SET; Schema: public; Owner: sail
--

SELECT pg_catalog.setval('public.param_marcas_id_seq', 57, true);


--
-- Name: param_preop_plantillas_id_seq; Type: SEQUENCE SET; Schema: public; Owner: sail
--

SELECT pg_catalog.setval('public.param_preop_plantillas_id_seq', 2, true);


--
-- Name: permissions_id_seq; Type: SEQUENCE SET; Schema: public; Owner: sail
--

SELECT pg_catalog.setval('public.permissions_id_seq', 45, true);


--
-- Name: personal_access_tokens_id_seq; Type: SEQUENCE SET; Schema: public; Owner: sail
--

SELECT pg_catalog.setval('public.personal_access_tokens_id_seq', 3, true);


--
-- Name: reg_fuecs_id_seq; Type: SEQUENCE SET; Schema: public; Owner: sail
--

SELECT pg_catalog.setval('public.reg_fuecs_id_seq', 42, true);


--
-- Name: roles_id_seq; Type: SEQUENCE SET; Schema: public; Owner: sail
--

SELECT pg_catalog.setval('public.roles_id_seq', 9, true);


--
-- Name: saas_empresas_id_seq; Type: SEQUENCE SET; Schema: public; Owner: sail
--

SELECT pg_catalog.setval('public.saas_empresas_id_seq', 1, true);


--
-- Name: saas_features_id_seq; Type: SEQUENCE SET; Schema: public; Owner: sail
--

SELECT pg_catalog.setval('public.saas_features_id_seq', 1, true);


--
-- Name: users_id_seq; Type: SEQUENCE SET; Schema: public; Owner: sail
--

SELECT pg_catalog.setval('public.users_id_seq', 3, true);


--
-- Name: audit_events audit_events_pkey; Type: CONSTRAINT; Schema: public; Owner: sail
--

ALTER TABLE ONLY public.audit_events
    ADD CONSTRAINT audit_events_pkey PRIMARY KEY (id);


--
-- Name: cache_locks cache_locks_pkey; Type: CONSTRAINT; Schema: public; Owner: sail
--

ALTER TABLE ONLY public.cache_locks
    ADD CONSTRAINT cache_locks_pkey PRIMARY KEY (key);


--
-- Name: cache cache_pkey; Type: CONSTRAINT; Schema: public; Owner: sail
--

ALTER TABLE ONLY public.cache
    ADD CONSTRAINT cache_pkey PRIMARY KEY (key);


--
-- Name: failed_jobs failed_jobs_pkey; Type: CONSTRAINT; Schema: public; Owner: sail
--

ALTER TABLE ONLY public.failed_jobs
    ADD CONSTRAINT failed_jobs_pkey PRIMARY KEY (id);


--
-- Name: failed_jobs failed_jobs_uuid_unique; Type: CONSTRAINT; Schema: public; Owner: sail
--

ALTER TABLE ONLY public.failed_jobs
    ADD CONSTRAINT failed_jobs_uuid_unique UNIQUE (uuid);


--
-- Name: job_batches job_batches_pkey; Type: CONSTRAINT; Schema: public; Owner: sail
--

ALTER TABLE ONLY public.job_batches
    ADD CONSTRAINT job_batches_pkey PRIMARY KEY (id);


--
-- Name: jobs jobs_pkey; Type: CONSTRAINT; Schema: public; Owner: sail
--

ALTER TABLE ONLY public.jobs
    ADD CONSTRAINT jobs_pkey PRIMARY KEY (id);


--
-- Name: migrations migrations_pkey; Type: CONSTRAINT; Schema: public; Owner: sail
--

ALTER TABLE ONLY public.migrations
    ADD CONSTRAINT migrations_pkey PRIMARY KEY (id);


--
-- Name: model_has_permissions model_has_permissions_pkey; Type: CONSTRAINT; Schema: public; Owner: sail
--

ALTER TABLE ONLY public.model_has_permissions
    ADD CONSTRAINT model_has_permissions_pkey PRIMARY KEY (permission_id, model_id, model_type);


--
-- Name: model_has_roles model_has_roles_pkey; Type: CONSTRAINT; Schema: public; Owner: sail
--

ALTER TABLE ONLY public.model_has_roles
    ADD CONSTRAINT model_has_roles_pkey PRIMARY KEY (role_id, model_id, model_type);


--
-- Name: oper_aseguradoras oper_aseguradoras_pkey; Type: CONSTRAINT; Schema: public; Owner: sail
--

ALTER TABLE ONLY public.oper_aseguradoras
    ADD CONSTRAINT oper_aseguradoras_pkey PRIMARY KEY (id);


--
-- Name: oper_cdas oper_cdas_pkey; Type: CONSTRAINT; Schema: public; Owner: sail
--

ALTER TABLE ONLY public.oper_cdas
    ADD CONSTRAINT oper_cdas_pkey PRIMARY KEY (id);


--
-- Name: oper_cliente_responsables oper_cliente_responsables_pkey; Type: CONSTRAINT; Schema: public; Owner: sail
--

ALTER TABLE ONLY public.oper_cliente_responsables
    ADD CONSTRAINT oper_cliente_responsables_pkey PRIMARY KEY (id);


--
-- Name: oper_clientes oper_clientes_empresa_id_identificacion_nit_unique; Type: CONSTRAINT; Schema: public; Owner: sail
--

ALTER TABLE ONLY public.oper_clientes
    ADD CONSTRAINT oper_clientes_empresa_id_identificacion_nit_unique UNIQUE (empresa_id, identificacion_nit);


--
-- Name: oper_clientes oper_clientes_pkey; Type: CONSTRAINT; Schema: public; Owner: sail
--

ALTER TABLE ONLY public.oper_clientes
    ADD CONSTRAINT oper_clientes_pkey PRIMARY KEY (id);


--
-- Name: oper_conductor_capacitaciones oper_conductor_capacitaciones_pkey; Type: CONSTRAINT; Schema: public; Owner: sail
--

ALTER TABLE ONLY public.oper_conductor_capacitaciones
    ADD CONSTRAINT oper_conductor_capacitaciones_pkey PRIMARY KEY (id);


--
-- Name: oper_conductor_documentos oper_conductor_documentos_pkey; Type: CONSTRAINT; Schema: public; Owner: sail
--

ALTER TABLE ONLY public.oper_conductor_documentos
    ADD CONSTRAINT oper_conductor_documentos_pkey PRIMARY KEY (id);


--
-- Name: oper_conductor_examenes oper_conductor_examenes_pkey; Type: CONSTRAINT; Schema: public; Owner: sail
--

ALTER TABLE ONLY public.oper_conductor_examenes
    ADD CONSTRAINT oper_conductor_examenes_pkey PRIMARY KEY (id);


--
-- Name: oper_conductor_experiencia oper_conductor_experiencia_pkey; Type: CONSTRAINT; Schema: public; Owner: sail
--

ALTER TABLE ONLY public.oper_conductor_experiencia
    ADD CONSTRAINT oper_conductor_experiencia_pkey PRIMARY KEY (id);


--
-- Name: oper_conductor_infracciones oper_conductor_infracciones_pkey; Type: CONSTRAINT; Schema: public; Owner: sail
--

ALTER TABLE ONLY public.oper_conductor_infracciones
    ADD CONSTRAINT oper_conductor_infracciones_pkey PRIMARY KEY (id);


--
-- Name: oper_conductor_referencias oper_conductor_referencias_pkey; Type: CONSTRAINT; Schema: public; Owner: sail
--

ALTER TABLE ONLY public.oper_conductor_referencias
    ADD CONSTRAINT oper_conductor_referencias_pkey PRIMARY KEY (id);


--
-- Name: oper_conductor_ssocial oper_conductor_ssocial_pkey; Type: CONSTRAINT; Schema: public; Owner: sail
--

ALTER TABLE ONLY public.oper_conductor_ssocial
    ADD CONSTRAINT oper_conductor_ssocial_pkey PRIMARY KEY (id);


--
-- Name: oper_conductor_vehiculo oper_conductor_vehiculo_pkey; Type: CONSTRAINT; Schema: public; Owner: sail
--

ALTER TABLE ONLY public.oper_conductor_vehiculo
    ADD CONSTRAINT oper_conductor_vehiculo_pkey PRIMARY KEY (id);


--
-- Name: oper_conductores oper_conductores_documento_unique; Type: CONSTRAINT; Schema: public; Owner: sail
--

ALTER TABLE ONLY public.oper_conductores
    ADD CONSTRAINT oper_conductores_documento_unique UNIQUE (documento);


--
-- Name: oper_conductores oper_conductores_pkey; Type: CONSTRAINT; Schema: public; Owner: sail
--

ALTER TABLE ONLY public.oper_conductores
    ADD CONSTRAINT oper_conductores_pkey PRIMARY KEY (id);


--
-- Name: oper_contratos oper_contratos_numero_contrato_unique; Type: CONSTRAINT; Schema: public; Owner: sail
--

ALTER TABLE ONLY public.oper_contratos
    ADD CONSTRAINT oper_contratos_numero_contrato_unique UNIQUE (numero_contrato);


--
-- Name: oper_contratos oper_contratos_pkey; Type: CONSTRAINT; Schema: public; Owner: sail
--

ALTER TABLE ONLY public.oper_contratos
    ADD CONSTRAINT oper_contratos_pkey PRIMARY KEY (id);


--
-- Name: oper_empresas_convenio oper_empresas_convenio_pkey; Type: CONSTRAINT; Schema: public; Owner: sail
--

ALTER TABLE ONLY public.oper_empresas_convenio
    ADD CONSTRAINT oper_empresas_convenio_pkey PRIMARY KEY (id);


--
-- Name: oper_mantenimiento_registros oper_mantenimiento_registros_pkey; Type: CONSTRAINT; Schema: public; Owner: sail
--

ALTER TABLE ONLY public.oper_mantenimiento_registros
    ADD CONSTRAINT oper_mantenimiento_registros_pkey PRIMARY KEY (id);


--
-- Name: oper_mantenimiento_rutinas oper_mantenimiento_rutinas_pkey; Type: CONSTRAINT; Schema: public; Owner: sail
--

ALTER TABLE ONLY public.oper_mantenimiento_rutinas
    ADD CONSTRAINT oper_mantenimiento_rutinas_pkey PRIMARY KEY (id);


--
-- Name: oper_preoperacional_evidencias oper_preoperacional_evidencias_pkey; Type: CONSTRAINT; Schema: public; Owner: sail
--

ALTER TABLE ONLY public.oper_preoperacional_evidencias
    ADD CONSTRAINT oper_preoperacional_evidencias_pkey PRIMARY KEY (id);


--
-- Name: oper_preoperacionales oper_preoperacionales_pkey; Type: CONSTRAINT; Schema: public; Owner: sail
--

ALTER TABLE ONLY public.oper_preoperacionales
    ADD CONSTRAINT oper_preoperacionales_pkey PRIMARY KEY (id);


--
-- Name: oper_propietarios oper_propietarios_documento_unique; Type: CONSTRAINT; Schema: public; Owner: sail
--

ALTER TABLE ONLY public.oper_propietarios
    ADD CONSTRAINT oper_propietarios_documento_unique UNIQUE (documento);


--
-- Name: oper_propietarios oper_propietarios_pkey; Type: CONSTRAINT; Schema: public; Owner: sail
--

ALTER TABLE ONLY public.oper_propietarios
    ADD CONSTRAINT oper_propietarios_pkey PRIMARY KEY (id);


--
-- Name: oper_vehiculo_documentos oper_vehiculo_documentos_pkey; Type: CONSTRAINT; Schema: public; Owner: sail
--

ALTER TABLE ONLY public.oper_vehiculo_documentos
    ADD CONSTRAINT oper_vehiculo_documentos_pkey PRIMARY KEY (id);


--
-- Name: oper_vehiculo_polizas oper_vehiculo_polizas_pkey; Type: CONSTRAINT; Schema: public; Owner: sail
--

ALTER TABLE ONLY public.oper_vehiculo_polizas
    ADD CONSTRAINT oper_vehiculo_polizas_pkey PRIMARY KEY (id);


--
-- Name: oper_vehiculo_revisiones oper_vehiculo_revisiones_pkey; Type: CONSTRAINT; Schema: public; Owner: sail
--

ALTER TABLE ONLY public.oper_vehiculo_revisiones
    ADD CONSTRAINT oper_vehiculo_revisiones_pkey PRIMARY KEY (id);


--
-- Name: oper_vehiculos oper_vehiculos_pkey; Type: CONSTRAINT; Schema: public; Owner: sail
--

ALTER TABLE ONLY public.oper_vehiculos
    ADD CONSTRAINT oper_vehiculos_pkey PRIMARY KEY (id);


--
-- Name: oper_vehiculos oper_vehiculos_placa_unique; Type: CONSTRAINT; Schema: public; Owner: sail
--

ALTER TABLE ONLY public.oper_vehiculos
    ADD CONSTRAINT oper_vehiculos_placa_unique UNIQUE (placa);


--
-- Name: param_ciudades param_ciudades_pkey; Type: CONSTRAINT; Schema: public; Owner: sail
--

ALTER TABLE ONLY public.param_ciudades
    ADD CONSTRAINT param_ciudades_pkey PRIMARY KEY (id);


--
-- Name: param_departamentos param_departamentos_pkey; Type: CONSTRAINT; Schema: public; Owner: sail
--

ALTER TABLE ONLY public.param_departamentos
    ADD CONSTRAINT param_departamentos_pkey PRIMARY KEY (id);


--
-- Name: param_lineas param_lineas_pkey; Type: CONSTRAINT; Schema: public; Owner: sail
--

ALTER TABLE ONLY public.param_lineas
    ADD CONSTRAINT param_lineas_pkey PRIMARY KEY (id);


--
-- Name: param_marcas param_marcas_nombre_unique; Type: CONSTRAINT; Schema: public; Owner: sail
--

ALTER TABLE ONLY public.param_marcas
    ADD CONSTRAINT param_marcas_nombre_unique UNIQUE (nombre);


--
-- Name: param_marcas param_marcas_pkey; Type: CONSTRAINT; Schema: public; Owner: sail
--

ALTER TABLE ONLY public.param_marcas
    ADD CONSTRAINT param_marcas_pkey PRIMARY KEY (id);


--
-- Name: param_preop_plantillas param_preop_plantillas_pkey; Type: CONSTRAINT; Schema: public; Owner: sail
--

ALTER TABLE ONLY public.param_preop_plantillas
    ADD CONSTRAINT param_preop_plantillas_pkey PRIMARY KEY (id);


--
-- Name: password_reset_tokens password_reset_tokens_pkey; Type: CONSTRAINT; Schema: public; Owner: sail
--

ALTER TABLE ONLY public.password_reset_tokens
    ADD CONSTRAINT password_reset_tokens_pkey PRIMARY KEY (email);


--
-- Name: permissions permissions_name_guard_name_unique; Type: CONSTRAINT; Schema: public; Owner: sail
--

ALTER TABLE ONLY public.permissions
    ADD CONSTRAINT permissions_name_guard_name_unique UNIQUE (name, guard_name);


--
-- Name: permissions permissions_pkey; Type: CONSTRAINT; Schema: public; Owner: sail
--

ALTER TABLE ONLY public.permissions
    ADD CONSTRAINT permissions_pkey PRIMARY KEY (id);


--
-- Name: personal_access_tokens personal_access_tokens_pkey; Type: CONSTRAINT; Schema: public; Owner: sail
--

ALTER TABLE ONLY public.personal_access_tokens
    ADD CONSTRAINT personal_access_tokens_pkey PRIMARY KEY (id);


--
-- Name: personal_access_tokens personal_access_tokens_token_unique; Type: CONSTRAINT; Schema: public; Owner: sail
--

ALTER TABLE ONLY public.personal_access_tokens
    ADD CONSTRAINT personal_access_tokens_token_unique UNIQUE (token);


--
-- Name: reg_fuecs reg_fuecs_numero_fuec_unique; Type: CONSTRAINT; Schema: public; Owner: sail
--

ALTER TABLE ONLY public.reg_fuecs
    ADD CONSTRAINT reg_fuecs_numero_fuec_unique UNIQUE (numero_fuec);


--
-- Name: reg_fuecs reg_fuecs_pkey; Type: CONSTRAINT; Schema: public; Owner: sail
--

ALTER TABLE ONLY public.reg_fuecs
    ADD CONSTRAINT reg_fuecs_pkey PRIMARY KEY (id);


--
-- Name: reg_fuecs reg_fuecs_qr_verificacion_hash_unique; Type: CONSTRAINT; Schema: public; Owner: sail
--

ALTER TABLE ONLY public.reg_fuecs
    ADD CONSTRAINT reg_fuecs_qr_verificacion_hash_unique UNIQUE (qr_verificacion_hash);


--
-- Name: role_has_permissions role_has_permissions_pkey; Type: CONSTRAINT; Schema: public; Owner: sail
--

ALTER TABLE ONLY public.role_has_permissions
    ADD CONSTRAINT role_has_permissions_pkey PRIMARY KEY (permission_id, role_id);


--
-- Name: roles roles_name_guard_name_unique; Type: CONSTRAINT; Schema: public; Owner: sail
--

ALTER TABLE ONLY public.roles
    ADD CONSTRAINT roles_name_guard_name_unique UNIQUE (name, guard_name);


--
-- Name: roles roles_pkey; Type: CONSTRAINT; Schema: public; Owner: sail
--

ALTER TABLE ONLY public.roles
    ADD CONSTRAINT roles_pkey PRIMARY KEY (id);


--
-- Name: saas_empresas saas_empresas_nit_unique; Type: CONSTRAINT; Schema: public; Owner: sail
--

ALTER TABLE ONLY public.saas_empresas
    ADD CONSTRAINT saas_empresas_nit_unique UNIQUE (nit);


--
-- Name: saas_empresas saas_empresas_pkey; Type: CONSTRAINT; Schema: public; Owner: sail
--

ALTER TABLE ONLY public.saas_empresas
    ADD CONSTRAINT saas_empresas_pkey PRIMARY KEY (id);


--
-- Name: saas_empresas saas_empresas_uuid_unique; Type: CONSTRAINT; Schema: public; Owner: sail
--

ALTER TABLE ONLY public.saas_empresas
    ADD CONSTRAINT saas_empresas_uuid_unique UNIQUE (uuid);


--
-- Name: saas_features saas_features_empresa_id_feature_name_unique; Type: CONSTRAINT; Schema: public; Owner: sail
--

ALTER TABLE ONLY public.saas_features
    ADD CONSTRAINT saas_features_empresa_id_feature_name_unique UNIQUE (empresa_id, feature_name);


--
-- Name: saas_features saas_features_pkey; Type: CONSTRAINT; Schema: public; Owner: sail
--

ALTER TABLE ONLY public.saas_features
    ADD CONSTRAINT saas_features_pkey PRIMARY KEY (id);


--
-- Name: sessions sessions_pkey; Type: CONSTRAINT; Schema: public; Owner: sail
--

ALTER TABLE ONLY public.sessions
    ADD CONSTRAINT sessions_pkey PRIMARY KEY (id);


--
-- Name: users users_documento_unique; Type: CONSTRAINT; Schema: public; Owner: sail
--

ALTER TABLE ONLY public.users
    ADD CONSTRAINT users_documento_unique UNIQUE (documento);


--
-- Name: users users_email_unique; Type: CONSTRAINT; Schema: public; Owner: sail
--

ALTER TABLE ONLY public.users
    ADD CONSTRAINT users_email_unique UNIQUE (email);


--
-- Name: users users_pkey; Type: CONSTRAINT; Schema: public; Owner: sail
--

ALTER TABLE ONLY public.users
    ADD CONSTRAINT users_pkey PRIMARY KEY (id);


--
-- Name: audit_events_entity_type_entity_id_index; Type: INDEX; Schema: public; Owner: sail
--

CREATE INDEX audit_events_entity_type_entity_id_index ON public.audit_events USING btree (entity_type, entity_id);


--
-- Name: cache_expiration_index; Type: INDEX; Schema: public; Owner: sail
--

CREATE INDEX cache_expiration_index ON public.cache USING btree (expiration);


--
-- Name: cache_locks_expiration_index; Type: INDEX; Schema: public; Owner: sail
--

CREATE INDEX cache_locks_expiration_index ON public.cache_locks USING btree (expiration);


--
-- Name: idx_conductores_empresa_deleted; Type: INDEX; Schema: public; Owner: sail
--

CREATE INDEX idx_conductores_empresa_deleted ON public.oper_conductores USING btree (empresa_id, deleted_at);


--
-- Name: idx_conductores_licencia_venc; Type: INDEX; Schema: public; Owner: sail
--

CREATE INDEX idx_conductores_licencia_venc ON public.oper_conductores USING btree (vencimiento_licencia);


--
-- Name: idx_docs_vehiculo_tipo; Type: INDEX; Schema: public; Owner: sail
--

CREATE INDEX idx_docs_vehiculo_tipo ON public.oper_vehiculo_documentos USING btree (vehiculo_id, tipo_documento, is_active);


--
-- Name: idx_fuecs_conductor; Type: INDEX; Schema: public; Owner: sail
--

CREATE INDEX idx_fuecs_conductor ON public.reg_fuecs USING btree (conductor_id);


--
-- Name: idx_fuecs_empresa_deleted; Type: INDEX; Schema: public; Owner: sail
--

CREATE INDEX idx_fuecs_empresa_deleted ON public.reg_fuecs USING btree (empresa_id, deleted_at);


--
-- Name: idx_fuecs_empresa_estado; Type: INDEX; Schema: public; Owner: sail
--

CREATE INDEX idx_fuecs_empresa_estado ON public.reg_fuecs USING btree (empresa_id, estado);


--
-- Name: idx_fuecs_empresa_fecha; Type: INDEX; Schema: public; Owner: sail
--

CREATE INDEX idx_fuecs_empresa_fecha ON public.reg_fuecs USING btree (empresa_id, fecha_inicio_viaje);


--
-- Name: idx_fuecs_vehiculo; Type: INDEX; Schema: public; Owner: sail
--

CREATE INDEX idx_fuecs_vehiculo ON public.reg_fuecs USING btree (vehiculo_id);


--
-- Name: idx_manto_reg_empresa_deleted; Type: INDEX; Schema: public; Owner: sail
--

CREATE INDEX idx_manto_reg_empresa_deleted ON public.oper_mantenimiento_registros USING btree (empresa_id, deleted_at);


--
-- Name: idx_manto_reg_fecha; Type: INDEX; Schema: public; Owner: sail
--

CREATE INDEX idx_manto_reg_fecha ON public.oper_mantenimiento_registros USING btree (empresa_id, fecha_servicio);


--
-- Name: idx_manto_reg_vehiculo_rutina; Type: INDEX; Schema: public; Owner: sail
--

CREATE INDEX idx_manto_reg_vehiculo_rutina ON public.oper_mantenimiento_registros USING btree (vehiculo_id, rutina_id);


--
-- Name: idx_manto_rutinas_empresa_active; Type: INDEX; Schema: public; Owner: sail
--

CREATE INDEX idx_manto_rutinas_empresa_active ON public.oper_mantenimiento_rutinas USING btree (empresa_id, is_active);


--
-- Name: idx_polizas_vehiculo_active_venc; Type: INDEX; Schema: public; Owner: sail
--

CREATE INDEX idx_polizas_vehiculo_active_venc ON public.oper_vehiculo_polizas USING btree (vehiculo_id, is_active, fecha_vencimiento);


--
-- Name: idx_polizas_vehiculo_tipo; Type: INDEX; Schema: public; Owner: sail
--

CREATE INDEX idx_polizas_vehiculo_tipo ON public.oper_vehiculo_polizas USING btree (vehiculo_id, tipo_poliza, is_active);


--
-- Name: idx_preop_empresa_deleted; Type: INDEX; Schema: public; Owner: sail
--

CREATE INDEX idx_preop_empresa_deleted ON public.oper_preoperacionales USING btree (empresa_id, deleted_at);


--
-- Name: idx_preop_empresa_fecha; Type: INDEX; Schema: public; Owner: sail
--

CREATE INDEX idx_preop_empresa_fecha ON public.oper_preoperacionales USING btree (empresa_id, created_at);


--
-- Name: idx_preop_vehiculo_fecha; Type: INDEX; Schema: public; Owner: sail
--

CREATE INDEX idx_preop_vehiculo_fecha ON public.oper_preoperacionales USING btree (vehiculo_id, created_at);


--
-- Name: idx_revisiones_vehiculo_active_venc; Type: INDEX; Schema: public; Owner: sail
--

CREATE INDEX idx_revisiones_vehiculo_active_venc ON public.oper_vehiculo_revisiones USING btree (vehiculo_id, is_active, fecha_vencimiento);


--
-- Name: idx_revisiones_vehiculo_tipo; Type: INDEX; Schema: public; Owner: sail
--

CREATE INDEX idx_revisiones_vehiculo_tipo ON public.oper_vehiculo_revisiones USING btree (vehiculo_id, tipo_revision, is_active);


--
-- Name: idx_ssocial_conductor_active; Type: INDEX; Schema: public; Owner: sail
--

CREATE INDEX idx_ssocial_conductor_active ON public.oper_conductor_ssocial USING btree (conductor_id, is_active, fecha_final);


--
-- Name: idx_vehiculos_convenio; Type: INDEX; Schema: public; Owner: sail
--

CREATE INDEX idx_vehiculos_convenio ON public.oper_vehiculos USING btree (empresa_convenio_id);


--
-- Name: idx_vehiculos_empresa_deleted; Type: INDEX; Schema: public; Owner: sail
--

CREATE INDEX idx_vehiculos_empresa_deleted ON public.oper_vehiculos USING btree (empresa_id, deleted_at);


--
-- Name: idx_vehiculos_propietario; Type: INDEX; Schema: public; Owner: sail
--

CREATE INDEX idx_vehiculos_propietario ON public.oper_vehiculos USING btree (propietario_id);


--
-- Name: jobs_queue_index; Type: INDEX; Schema: public; Owner: sail
--

CREATE INDEX jobs_queue_index ON public.jobs USING btree (queue);


--
-- Name: model_has_permissions_model_id_model_type_index; Type: INDEX; Schema: public; Owner: sail
--

CREATE INDEX model_has_permissions_model_id_model_type_index ON public.model_has_permissions USING btree (model_id, model_type);


--
-- Name: model_has_roles_model_id_model_type_index; Type: INDEX; Schema: public; Owner: sail
--

CREATE INDEX model_has_roles_model_id_model_type_index ON public.model_has_roles USING btree (model_id, model_type);


--
-- Name: oper_clientes_identificacion_nit_index; Type: INDEX; Schema: public; Owner: sail
--

CREATE INDEX oper_clientes_identificacion_nit_index ON public.oper_clientes USING btree (identificacion_nit);


--
-- Name: oper_conductor_documentos_fecha_vencimiento_index; Type: INDEX; Schema: public; Owner: sail
--

CREATE INDEX oper_conductor_documentos_fecha_vencimiento_index ON public.oper_conductor_documentos USING btree (fecha_vencimiento);


--
-- Name: oper_vehiculo_documentos_fecha_vencimiento_index; Type: INDEX; Schema: public; Owner: sail
--

CREATE INDEX oper_vehiculo_documentos_fecha_vencimiento_index ON public.oper_vehiculo_documentos USING btree (fecha_vencimiento);


--
-- Name: oper_vehiculo_polizas_fecha_vencimiento_index; Type: INDEX; Schema: public; Owner: sail
--

CREATE INDEX oper_vehiculo_polizas_fecha_vencimiento_index ON public.oper_vehiculo_polizas USING btree (fecha_vencimiento);


--
-- Name: oper_vehiculo_revisiones_fecha_vencimiento_index; Type: INDEX; Schema: public; Owner: sail
--

CREATE INDEX oper_vehiculo_revisiones_fecha_vencimiento_index ON public.oper_vehiculo_revisiones USING btree (fecha_vencimiento);


--
-- Name: personal_access_tokens_expires_at_index; Type: INDEX; Schema: public; Owner: sail
--

CREATE INDEX personal_access_tokens_expires_at_index ON public.personal_access_tokens USING btree (expires_at);


--
-- Name: personal_access_tokens_tokenable_type_tokenable_id_index; Type: INDEX; Schema: public; Owner: sail
--

CREATE INDEX personal_access_tokens_tokenable_type_tokenable_id_index ON public.personal_access_tokens USING btree (tokenable_type, tokenable_id);


--
-- Name: sessions_last_activity_index; Type: INDEX; Schema: public; Owner: sail
--

CREATE INDEX sessions_last_activity_index ON public.sessions USING btree (last_activity);


--
-- Name: sessions_user_id_index; Type: INDEX; Schema: public; Owner: sail
--

CREATE INDEX sessions_user_id_index ON public.sessions USING btree (user_id);


--
-- Name: audit_events audit_events_empresa_id_foreign; Type: FK CONSTRAINT; Schema: public; Owner: sail
--

ALTER TABLE ONLY public.audit_events
    ADD CONSTRAINT audit_events_empresa_id_foreign FOREIGN KEY (empresa_id) REFERENCES public.saas_empresas(id) ON DELETE SET NULL;


--
-- Name: audit_events audit_events_user_id_foreign; Type: FK CONSTRAINT; Schema: public; Owner: sail
--

ALTER TABLE ONLY public.audit_events
    ADD CONSTRAINT audit_events_user_id_foreign FOREIGN KEY (user_id) REFERENCES public.users(id) ON DELETE SET NULL;


--
-- Name: model_has_permissions model_has_permissions_permission_id_foreign; Type: FK CONSTRAINT; Schema: public; Owner: sail
--

ALTER TABLE ONLY public.model_has_permissions
    ADD CONSTRAINT model_has_permissions_permission_id_foreign FOREIGN KEY (permission_id) REFERENCES public.permissions(id) ON DELETE CASCADE;


--
-- Name: model_has_roles model_has_roles_role_id_foreign; Type: FK CONSTRAINT; Schema: public; Owner: sail
--

ALTER TABLE ONLY public.model_has_roles
    ADD CONSTRAINT model_has_roles_role_id_foreign FOREIGN KEY (role_id) REFERENCES public.roles(id) ON DELETE CASCADE;


--
-- Name: oper_aseguradoras oper_aseguradoras_empresa_id_foreign; Type: FK CONSTRAINT; Schema: public; Owner: sail
--

ALTER TABLE ONLY public.oper_aseguradoras
    ADD CONSTRAINT oper_aseguradoras_empresa_id_foreign FOREIGN KEY (empresa_id) REFERENCES public.saas_empresas(id) ON DELETE CASCADE;


--
-- Name: oper_cdas oper_cdas_empresa_id_foreign; Type: FK CONSTRAINT; Schema: public; Owner: sail
--

ALTER TABLE ONLY public.oper_cdas
    ADD CONSTRAINT oper_cdas_empresa_id_foreign FOREIGN KEY (empresa_id) REFERENCES public.saas_empresas(id) ON DELETE CASCADE;


--
-- Name: oper_cliente_responsables oper_cliente_responsables_cliente_id_foreign; Type: FK CONSTRAINT; Schema: public; Owner: sail
--

ALTER TABLE ONLY public.oper_cliente_responsables
    ADD CONSTRAINT oper_cliente_responsables_cliente_id_foreign FOREIGN KEY (cliente_id) REFERENCES public.oper_clientes(id) ON DELETE CASCADE;


--
-- Name: oper_clientes oper_clientes_empresa_id_foreign; Type: FK CONSTRAINT; Schema: public; Owner: sail
--

ALTER TABLE ONLY public.oper_clientes
    ADD CONSTRAINT oper_clientes_empresa_id_foreign FOREIGN KEY (empresa_id) REFERENCES public.saas_empresas(id) ON DELETE CASCADE;


--
-- Name: oper_conductor_capacitaciones oper_conductor_capacitaciones_conductor_id_foreign; Type: FK CONSTRAINT; Schema: public; Owner: sail
--

ALTER TABLE ONLY public.oper_conductor_capacitaciones
    ADD CONSTRAINT oper_conductor_capacitaciones_conductor_id_foreign FOREIGN KEY (conductor_id) REFERENCES public.oper_conductores(id) ON DELETE CASCADE;


--
-- Name: oper_conductor_documentos oper_conductor_documentos_conductor_id_foreign; Type: FK CONSTRAINT; Schema: public; Owner: sail
--

ALTER TABLE ONLY public.oper_conductor_documentos
    ADD CONSTRAINT oper_conductor_documentos_conductor_id_foreign FOREIGN KEY (conductor_id) REFERENCES public.oper_conductores(id) ON DELETE CASCADE;


--
-- Name: oper_conductor_examenes oper_conductor_examenes_conductor_id_foreign; Type: FK CONSTRAINT; Schema: public; Owner: sail
--

ALTER TABLE ONLY public.oper_conductor_examenes
    ADD CONSTRAINT oper_conductor_examenes_conductor_id_foreign FOREIGN KEY (conductor_id) REFERENCES public.oper_conductores(id) ON DELETE CASCADE;


--
-- Name: oper_conductor_experiencia oper_conductor_experiencia_conductor_id_foreign; Type: FK CONSTRAINT; Schema: public; Owner: sail
--

ALTER TABLE ONLY public.oper_conductor_experiencia
    ADD CONSTRAINT oper_conductor_experiencia_conductor_id_foreign FOREIGN KEY (conductor_id) REFERENCES public.oper_conductores(id) ON DELETE CASCADE;


--
-- Name: oper_conductor_infracciones oper_conductor_infracciones_conductor_id_foreign; Type: FK CONSTRAINT; Schema: public; Owner: sail
--

ALTER TABLE ONLY public.oper_conductor_infracciones
    ADD CONSTRAINT oper_conductor_infracciones_conductor_id_foreign FOREIGN KEY (conductor_id) REFERENCES public.oper_conductores(id) ON DELETE CASCADE;


--
-- Name: oper_conductor_referencias oper_conductor_referencias_conductor_id_foreign; Type: FK CONSTRAINT; Schema: public; Owner: sail
--

ALTER TABLE ONLY public.oper_conductor_referencias
    ADD CONSTRAINT oper_conductor_referencias_conductor_id_foreign FOREIGN KEY (conductor_id) REFERENCES public.oper_conductores(id) ON DELETE CASCADE;


--
-- Name: oper_conductor_ssocial oper_conductor_ssocial_conductor_id_foreign; Type: FK CONSTRAINT; Schema: public; Owner: sail
--

ALTER TABLE ONLY public.oper_conductor_ssocial
    ADD CONSTRAINT oper_conductor_ssocial_conductor_id_foreign FOREIGN KEY (conductor_id) REFERENCES public.oper_conductores(id) ON DELETE CASCADE;


--
-- Name: oper_conductor_vehiculo oper_conductor_vehiculo_conductor_id_foreign; Type: FK CONSTRAINT; Schema: public; Owner: sail
--

ALTER TABLE ONLY public.oper_conductor_vehiculo
    ADD CONSTRAINT oper_conductor_vehiculo_conductor_id_foreign FOREIGN KEY (conductor_id) REFERENCES public.oper_conductores(id) ON DELETE CASCADE;


--
-- Name: oper_conductor_vehiculo oper_conductor_vehiculo_vehiculo_id_foreign; Type: FK CONSTRAINT; Schema: public; Owner: sail
--

ALTER TABLE ONLY public.oper_conductor_vehiculo
    ADD CONSTRAINT oper_conductor_vehiculo_vehiculo_id_foreign FOREIGN KEY (vehiculo_id) REFERENCES public.oper_vehiculos(id) ON DELETE CASCADE;


--
-- Name: oper_conductores oper_conductores_ciudad_expedicion_documento_id_foreign; Type: FK CONSTRAINT; Schema: public; Owner: sail
--

ALTER TABLE ONLY public.oper_conductores
    ADD CONSTRAINT oper_conductores_ciudad_expedicion_documento_id_foreign FOREIGN KEY (ciudad_expedicion_documento_id) REFERENCES public.param_ciudades(id) ON DELETE SET NULL;


--
-- Name: oper_conductores oper_conductores_ciudad_residencia_id_foreign; Type: FK CONSTRAINT; Schema: public; Owner: sail
--

ALTER TABLE ONLY public.oper_conductores
    ADD CONSTRAINT oper_conductores_ciudad_residencia_id_foreign FOREIGN KEY (ciudad_residencia_id) REFERENCES public.param_ciudades(id) ON DELETE SET NULL;


--
-- Name: oper_conductores oper_conductores_empresa_id_foreign; Type: FK CONSTRAINT; Schema: public; Owner: sail
--

ALTER TABLE ONLY public.oper_conductores
    ADD CONSTRAINT oper_conductores_empresa_id_foreign FOREIGN KEY (empresa_id) REFERENCES public.saas_empresas(id) ON DELETE CASCADE;


--
-- Name: oper_conductores oper_conductores_user_id_foreign; Type: FK CONSTRAINT; Schema: public; Owner: sail
--

ALTER TABLE ONLY public.oper_conductores
    ADD CONSTRAINT oper_conductores_user_id_foreign FOREIGN KEY (user_id) REFERENCES public.users(id) ON DELETE SET NULL;


--
-- Name: oper_contratos oper_contratos_cliente_id_foreign; Type: FK CONSTRAINT; Schema: public; Owner: sail
--

ALTER TABLE ONLY public.oper_contratos
    ADD CONSTRAINT oper_contratos_cliente_id_foreign FOREIGN KEY (cliente_id) REFERENCES public.oper_clientes(id) ON DELETE RESTRICT;


--
-- Name: oper_contratos oper_contratos_empresa_id_foreign; Type: FK CONSTRAINT; Schema: public; Owner: sail
--

ALTER TABLE ONLY public.oper_contratos
    ADD CONSTRAINT oper_contratos_empresa_id_foreign FOREIGN KEY (empresa_id) REFERENCES public.saas_empresas(id) ON DELETE CASCADE;


--
-- Name: oper_contratos oper_contratos_responsable_id_foreign; Type: FK CONSTRAINT; Schema: public; Owner: sail
--

ALTER TABLE ONLY public.oper_contratos
    ADD CONSTRAINT oper_contratos_responsable_id_foreign FOREIGN KEY (responsable_id) REFERENCES public.oper_cliente_responsables(id) ON DELETE RESTRICT;


--
-- Name: oper_empresas_convenio oper_empresas_convenio_empresa_id_foreign; Type: FK CONSTRAINT; Schema: public; Owner: sail
--

ALTER TABLE ONLY public.oper_empresas_convenio
    ADD CONSTRAINT oper_empresas_convenio_empresa_id_foreign FOREIGN KEY (empresa_id) REFERENCES public.saas_empresas(id) ON DELETE CASCADE;


--
-- Name: oper_mantenimiento_registros oper_mantenimiento_registros_empresa_id_foreign; Type: FK CONSTRAINT; Schema: public; Owner: sail
--

ALTER TABLE ONLY public.oper_mantenimiento_registros
    ADD CONSTRAINT oper_mantenimiento_registros_empresa_id_foreign FOREIGN KEY (empresa_id) REFERENCES public.saas_empresas(id);


--
-- Name: oper_mantenimiento_registros oper_mantenimiento_registros_rutina_id_foreign; Type: FK CONSTRAINT; Schema: public; Owner: sail
--

ALTER TABLE ONLY public.oper_mantenimiento_registros
    ADD CONSTRAINT oper_mantenimiento_registros_rutina_id_foreign FOREIGN KEY (rutina_id) REFERENCES public.oper_mantenimiento_rutinas(id);


--
-- Name: oper_mantenimiento_registros oper_mantenimiento_registros_vehiculo_id_foreign; Type: FK CONSTRAINT; Schema: public; Owner: sail
--

ALTER TABLE ONLY public.oper_mantenimiento_registros
    ADD CONSTRAINT oper_mantenimiento_registros_vehiculo_id_foreign FOREIGN KEY (vehiculo_id) REFERENCES public.oper_vehiculos(id);


--
-- Name: oper_mantenimiento_rutinas oper_mantenimiento_rutinas_empresa_id_foreign; Type: FK CONSTRAINT; Schema: public; Owner: sail
--

ALTER TABLE ONLY public.oper_mantenimiento_rutinas
    ADD CONSTRAINT oper_mantenimiento_rutinas_empresa_id_foreign FOREIGN KEY (empresa_id) REFERENCES public.saas_empresas(id);


--
-- Name: oper_preoperacional_evidencias oper_preoperacional_evidencias_preoperacional_id_foreign; Type: FK CONSTRAINT; Schema: public; Owner: sail
--

ALTER TABLE ONLY public.oper_preoperacional_evidencias
    ADD CONSTRAINT oper_preoperacional_evidencias_preoperacional_id_foreign FOREIGN KEY (preoperacional_id) REFERENCES public.oper_preoperacionales(id) ON DELETE CASCADE;


--
-- Name: oper_preoperacionales oper_preoperacionales_conductor_id_foreign; Type: FK CONSTRAINT; Schema: public; Owner: sail
--

ALTER TABLE ONLY public.oper_preoperacionales
    ADD CONSTRAINT oper_preoperacionales_conductor_id_foreign FOREIGN KEY (conductor_id) REFERENCES public.oper_conductores(id) ON DELETE CASCADE;


--
-- Name: oper_preoperacionales oper_preoperacionales_empresa_id_foreign; Type: FK CONSTRAINT; Schema: public; Owner: sail
--

ALTER TABLE ONLY public.oper_preoperacionales
    ADD CONSTRAINT oper_preoperacionales_empresa_id_foreign FOREIGN KEY (empresa_id) REFERENCES public.saas_empresas(id) ON DELETE CASCADE;


--
-- Name: oper_preoperacionales oper_preoperacionales_plantilla_id_foreign; Type: FK CONSTRAINT; Schema: public; Owner: sail
--

ALTER TABLE ONLY public.oper_preoperacionales
    ADD CONSTRAINT oper_preoperacionales_plantilla_id_foreign FOREIGN KEY (plantilla_id) REFERENCES public.param_preop_plantillas(id) ON DELETE SET NULL;


--
-- Name: oper_preoperacionales oper_preoperacionales_vehiculo_id_foreign; Type: FK CONSTRAINT; Schema: public; Owner: sail
--

ALTER TABLE ONLY public.oper_preoperacionales
    ADD CONSTRAINT oper_preoperacionales_vehiculo_id_foreign FOREIGN KEY (vehiculo_id) REFERENCES public.oper_vehiculos(id) ON DELETE CASCADE;


--
-- Name: oper_propietarios oper_propietarios_empresa_id_foreign; Type: FK CONSTRAINT; Schema: public; Owner: sail
--

ALTER TABLE ONLY public.oper_propietarios
    ADD CONSTRAINT oper_propietarios_empresa_id_foreign FOREIGN KEY (empresa_id) REFERENCES public.saas_empresas(id) ON DELETE CASCADE;


--
-- Name: oper_propietarios oper_propietarios_user_id_foreign; Type: FK CONSTRAINT; Schema: public; Owner: sail
--

ALTER TABLE ONLY public.oper_propietarios
    ADD CONSTRAINT oper_propietarios_user_id_foreign FOREIGN KEY (user_id) REFERENCES public.users(id) ON DELETE CASCADE;


--
-- Name: oper_vehiculo_documentos oper_vehiculo_documentos_vehiculo_id_foreign; Type: FK CONSTRAINT; Schema: public; Owner: sail
--

ALTER TABLE ONLY public.oper_vehiculo_documentos
    ADD CONSTRAINT oper_vehiculo_documentos_vehiculo_id_foreign FOREIGN KEY (vehiculo_id) REFERENCES public.oper_vehiculos(id) ON DELETE CASCADE;


--
-- Name: oper_vehiculo_polizas oper_vehiculo_polizas_aseguradora_id_foreign; Type: FK CONSTRAINT; Schema: public; Owner: sail
--

ALTER TABLE ONLY public.oper_vehiculo_polizas
    ADD CONSTRAINT oper_vehiculo_polizas_aseguradora_id_foreign FOREIGN KEY (aseguradora_id) REFERENCES public.oper_aseguradoras(id) ON DELETE RESTRICT;


--
-- Name: oper_vehiculo_polizas oper_vehiculo_polizas_vehiculo_id_foreign; Type: FK CONSTRAINT; Schema: public; Owner: sail
--

ALTER TABLE ONLY public.oper_vehiculo_polizas
    ADD CONSTRAINT oper_vehiculo_polizas_vehiculo_id_foreign FOREIGN KEY (vehiculo_id) REFERENCES public.oper_vehiculos(id) ON DELETE CASCADE;


--
-- Name: oper_vehiculo_revisiones oper_vehiculo_revisiones_cda_id_foreign; Type: FK CONSTRAINT; Schema: public; Owner: sail
--

ALTER TABLE ONLY public.oper_vehiculo_revisiones
    ADD CONSTRAINT oper_vehiculo_revisiones_cda_id_foreign FOREIGN KEY (cda_id) REFERENCES public.oper_cdas(id) ON DELETE RESTRICT;


--
-- Name: oper_vehiculo_revisiones oper_vehiculo_revisiones_vehiculo_id_foreign; Type: FK CONSTRAINT; Schema: public; Owner: sail
--

ALTER TABLE ONLY public.oper_vehiculo_revisiones
    ADD CONSTRAINT oper_vehiculo_revisiones_vehiculo_id_foreign FOREIGN KEY (vehiculo_id) REFERENCES public.oper_vehiculos(id) ON DELETE CASCADE;


--
-- Name: oper_vehiculos oper_vehiculos_empresa_convenio_id_foreign; Type: FK CONSTRAINT; Schema: public; Owner: sail
--

ALTER TABLE ONLY public.oper_vehiculos
    ADD CONSTRAINT oper_vehiculos_empresa_convenio_id_foreign FOREIGN KEY (empresa_convenio_id) REFERENCES public.oper_empresas_convenio(id) ON DELETE SET NULL;


--
-- Name: oper_vehiculos oper_vehiculos_empresa_id_foreign; Type: FK CONSTRAINT; Schema: public; Owner: sail
--

ALTER TABLE ONLY public.oper_vehiculos
    ADD CONSTRAINT oper_vehiculos_empresa_id_foreign FOREIGN KEY (empresa_id) REFERENCES public.saas_empresas(id) ON DELETE CASCADE;


--
-- Name: oper_vehiculos oper_vehiculos_linea_id_foreign; Type: FK CONSTRAINT; Schema: public; Owner: sail
--

ALTER TABLE ONLY public.oper_vehiculos
    ADD CONSTRAINT oper_vehiculos_linea_id_foreign FOREIGN KEY (linea_id) REFERENCES public.param_lineas(id) ON DELETE SET NULL;


--
-- Name: oper_vehiculos oper_vehiculos_marca_id_foreign; Type: FK CONSTRAINT; Schema: public; Owner: sail
--

ALTER TABLE ONLY public.oper_vehiculos
    ADD CONSTRAINT oper_vehiculos_marca_id_foreign FOREIGN KEY (marca_id) REFERENCES public.param_marcas(id) ON DELETE SET NULL;


--
-- Name: oper_vehiculos oper_vehiculos_propietario_id_foreign; Type: FK CONSTRAINT; Schema: public; Owner: sail
--

ALTER TABLE ONLY public.oper_vehiculos
    ADD CONSTRAINT oper_vehiculos_propietario_id_foreign FOREIGN KEY (propietario_id) REFERENCES public.oper_propietarios(id) ON DELETE SET NULL;


--
-- Name: param_ciudades param_ciudades_departamento_id_foreign; Type: FK CONSTRAINT; Schema: public; Owner: sail
--

ALTER TABLE ONLY public.param_ciudades
    ADD CONSTRAINT param_ciudades_departamento_id_foreign FOREIGN KEY (departamento_id) REFERENCES public.param_departamentos(id) ON DELETE CASCADE;


--
-- Name: param_lineas param_lineas_marca_id_foreign; Type: FK CONSTRAINT; Schema: public; Owner: sail
--

ALTER TABLE ONLY public.param_lineas
    ADD CONSTRAINT param_lineas_marca_id_foreign FOREIGN KEY (marca_id) REFERENCES public.param_marcas(id) ON DELETE CASCADE;


--
-- Name: param_preop_plantillas param_preop_plantillas_empresa_id_foreign; Type: FK CONSTRAINT; Schema: public; Owner: sail
--

ALTER TABLE ONLY public.param_preop_plantillas
    ADD CONSTRAINT param_preop_plantillas_empresa_id_foreign FOREIGN KEY (empresa_id) REFERENCES public.saas_empresas(id) ON DELETE CASCADE;


--
-- Name: reg_fuecs reg_fuecs_conductor_id_foreign; Type: FK CONSTRAINT; Schema: public; Owner: sail
--

ALTER TABLE ONLY public.reg_fuecs
    ADD CONSTRAINT reg_fuecs_conductor_id_foreign FOREIGN KEY (conductor_id) REFERENCES public.oper_conductores(id) ON DELETE CASCADE;


--
-- Name: reg_fuecs reg_fuecs_contrato_id_foreign; Type: FK CONSTRAINT; Schema: public; Owner: sail
--

ALTER TABLE ONLY public.reg_fuecs
    ADD CONSTRAINT reg_fuecs_contrato_id_foreign FOREIGN KEY (contrato_id) REFERENCES public.oper_contratos(id) ON DELETE CASCADE;


--
-- Name: reg_fuecs reg_fuecs_empresa_id_foreign; Type: FK CONSTRAINT; Schema: public; Owner: sail
--

ALTER TABLE ONLY public.reg_fuecs
    ADD CONSTRAINT reg_fuecs_empresa_id_foreign FOREIGN KEY (empresa_id) REFERENCES public.saas_empresas(id) ON DELETE CASCADE;


--
-- Name: reg_fuecs reg_fuecs_vehiculo_id_foreign; Type: FK CONSTRAINT; Schema: public; Owner: sail
--

ALTER TABLE ONLY public.reg_fuecs
    ADD CONSTRAINT reg_fuecs_vehiculo_id_foreign FOREIGN KEY (vehiculo_id) REFERENCES public.oper_vehiculos(id) ON DELETE CASCADE;


--
-- Name: role_has_permissions role_has_permissions_permission_id_foreign; Type: FK CONSTRAINT; Schema: public; Owner: sail
--

ALTER TABLE ONLY public.role_has_permissions
    ADD CONSTRAINT role_has_permissions_permission_id_foreign FOREIGN KEY (permission_id) REFERENCES public.permissions(id) ON DELETE CASCADE;


--
-- Name: role_has_permissions role_has_permissions_role_id_foreign; Type: FK CONSTRAINT; Schema: public; Owner: sail
--

ALTER TABLE ONLY public.role_has_permissions
    ADD CONSTRAINT role_has_permissions_role_id_foreign FOREIGN KEY (role_id) REFERENCES public.roles(id) ON DELETE CASCADE;


--
-- Name: saas_features saas_features_empresa_id_foreign; Type: FK CONSTRAINT; Schema: public; Owner: sail
--

ALTER TABLE ONLY public.saas_features
    ADD CONSTRAINT saas_features_empresa_id_foreign FOREIGN KEY (empresa_id) REFERENCES public.saas_empresas(id) ON DELETE CASCADE;


--
-- Name: users users_conductor_id_foreign; Type: FK CONSTRAINT; Schema: public; Owner: sail
--

ALTER TABLE ONLY public.users
    ADD CONSTRAINT users_conductor_id_foreign FOREIGN KEY (conductor_id) REFERENCES public.oper_conductores(id) ON DELETE SET NULL;


--
-- Name: users users_empresa_id_foreign; Type: FK CONSTRAINT; Schema: public; Owner: sail
--

ALTER TABLE ONLY public.users
    ADD CONSTRAINT users_empresa_id_foreign FOREIGN KEY (empresa_id) REFERENCES public.saas_empresas(id) ON DELETE SET NULL;


--
-- Name: users users_propietario_id_foreign; Type: FK CONSTRAINT; Schema: public; Owner: sail
--

ALTER TABLE ONLY public.users
    ADD CONSTRAINT users_propietario_id_foreign FOREIGN KEY (propietario_id) REFERENCES public.oper_propietarios(id) ON DELETE SET NULL;


--
-- PostgreSQL database dump complete
--

\unrestrict yB1YwwaRceGr2HaHeRcMMfT3IuwVNCs0wcscHCVhLaAQHfTYrRtFg5owq88O8cv

