--
-- PostgreSQL database dump
--

\restrict kMRL6h14peVm5XW1CtyyrKKABe5nJ5rUSta5cBB7cLDB2v5zpHSMNuLZeDJC9sz

-- Dumped from database version 16.11 (Debian 16.11-1.pgdg13+1)
-- Dumped by pg_dump version 17.9 (Debian 17.9-0+deb13u1)

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;

ALTER TABLE IF EXISTS ONLY public.venta_detalle DROP CONSTRAINT IF EXISTS fk_ventadetalle_venta;
ALTER TABLE IF EXISTS ONLY public.venta_detalle DROP CONSTRAINT IF EXISTS fk_ventadetalle_producto;
ALTER TABLE IF EXISTS ONLY public.venta_detalle DROP CONSTRAINT IF EXISTS fk_ventadetalle_pedido;
ALTER TABLE IF EXISTS ONLY public.ventas DROP CONSTRAINT IF EXISTS fk_venta_usuario;
ALTER TABLE IF EXISTS ONLY public.ventas DROP CONSTRAINT IF EXISTS fk_venta_cliente;
ALTER TABLE IF EXISTS ONLY public.servicio_detalle DROP CONSTRAINT IF EXISTS fk_serviciodetalle_servicio;
ALTER TABLE IF EXISTS ONLY public.servicio_detalle DROP CONSTRAINT IF EXISTS fk_serviciodetalle_producto;
ALTER TABLE IF EXISTS ONLY public.servicio_detalle DROP CONSTRAINT IF EXISTS fk_serviciodetalle_pedido;
ALTER TABLE IF EXISTS ONLY public.servicios DROP CONSTRAINT IF EXISTS fk_servicio_usuario;
ALTER TABLE IF EXISTS ONLY public.servicios DROP CONSTRAINT IF EXISTS fk_servicio_cliente;
ALTER TABLE IF EXISTS ONLY public.productos DROP CONSTRAINT IF EXISTS fk_productos_tipo;
ALTER TABLE IF EXISTS ONLY public.productos DROP CONSTRAINT IF EXISTS fk_productos_categoria;
ALTER TABLE IF EXISTS ONLY public.pedidos DROP CONSTRAINT IF EXISTS fk_pedidos_usuario;
ALTER TABLE IF EXISTS ONLY public.pedidos DROP CONSTRAINT IF EXISTS fk_pedidos_proveedor;
ALTER TABLE IF EXISTS ONLY public.pedido_detalle DROP CONSTRAINT IF EXISTS fk_pedidodetalle_producto;
ALTER TABLE IF EXISTS ONLY public.pedido_detalle DROP CONSTRAINT IF EXISTS fk_pedidodetalle_pedido;
ALTER TABLE IF EXISTS ONLY public.ventas DROP CONSTRAINT IF EXISTS ventas_pkey;
ALTER TABLE IF EXISTS ONLY public.venta_detalle DROP CONSTRAINT IF EXISTS venta_detalle_pkey;
ALTER TABLE IF EXISTS ONLY public.usuarios DROP CONSTRAINT IF EXISTS usuarios_usuario_key;
ALTER TABLE IF EXISTS ONLY public.usuarios DROP CONSTRAINT IF EXISTS usuarios_pkey;
ALTER TABLE IF EXISTS ONLY public.tipos DROP CONSTRAINT IF EXISTS tipos_pkey;
ALTER TABLE IF EXISTS ONLY public.servicios DROP CONSTRAINT IF EXISTS servicios_pkey;
ALTER TABLE IF EXISTS ONLY public.servicio_detalle DROP CONSTRAINT IF EXISTS servicio_detalle_pkey;
ALTER TABLE IF EXISTS ONLY public.recuperacion_cuenta DROP CONSTRAINT IF EXISTS recuperacion_cuenta_pkey;
ALTER TABLE IF EXISTS ONLY public.proveedores DROP CONSTRAINT IF EXISTS proveedores_pkey;
ALTER TABLE IF EXISTS ONLY public.productos DROP CONSTRAINT IF EXISTS productos_pkey;
ALTER TABLE IF EXISTS ONLY public.pedidos DROP CONSTRAINT IF EXISTS pedidos_pkey;
ALTER TABLE IF EXISTS ONLY public.pedido_detalle DROP CONSTRAINT IF EXISTS pedido_detalle_pkey;
ALTER TABLE IF EXISTS ONLY public.configuracion DROP CONSTRAINT IF EXISTS configuracion_pkey;
ALTER TABLE IF EXISTS ONLY public.clientes DROP CONSTRAINT IF EXISTS clientes_pkey;
ALTER TABLE IF EXISTS ONLY public.categorias DROP CONSTRAINT IF EXISTS categorias_pkey;
ALTER TABLE IF EXISTS public.ventas ALTER COLUMN id DROP DEFAULT;
ALTER TABLE IF EXISTS public.venta_detalle ALTER COLUMN id DROP DEFAULT;
ALTER TABLE IF EXISTS public.usuarios ALTER COLUMN id DROP DEFAULT;
ALTER TABLE IF EXISTS public.tipos ALTER COLUMN id DROP DEFAULT;
ALTER TABLE IF EXISTS public.servicios ALTER COLUMN id DROP DEFAULT;
ALTER TABLE IF EXISTS public.servicio_detalle ALTER COLUMN id DROP DEFAULT;
ALTER TABLE IF EXISTS public.recuperacion_cuenta ALTER COLUMN id DROP DEFAULT;
ALTER TABLE IF EXISTS public.proveedores ALTER COLUMN id DROP DEFAULT;
ALTER TABLE IF EXISTS public.productos ALTER COLUMN id DROP DEFAULT;
ALTER TABLE IF EXISTS public.pedidos ALTER COLUMN id DROP DEFAULT;
ALTER TABLE IF EXISTS public.pedido_detalle ALTER COLUMN id DROP DEFAULT;
ALTER TABLE IF EXISTS public.clientes ALTER COLUMN id DROP DEFAULT;
ALTER TABLE IF EXISTS public.categorias ALTER COLUMN id DROP DEFAULT;
DROP SEQUENCE IF EXISTS public.ventas_id_seq;
DROP TABLE IF EXISTS public.ventas;
DROP SEQUENCE IF EXISTS public.venta_preview_seq;
DROP SEQUENCE IF EXISTS public.venta_detalle_id_seq;
DROP TABLE IF EXISTS public.venta_detalle;
DROP SEQUENCE IF EXISTS public.usuarios_id_seq;
DROP TABLE IF EXISTS public.usuarios;
DROP SEQUENCE IF EXISTS public.tipos_id_seq;
DROP TABLE IF EXISTS public.tipos;
DROP SEQUENCE IF EXISTS public.servicios_id_seq;
DROP TABLE IF EXISTS public.servicios;
DROP SEQUENCE IF EXISTS public.servicio_preview_seq;
DROP SEQUENCE IF EXISTS public.servicio_detalle_id_seq;
DROP TABLE IF EXISTS public.servicio_detalle;
DROP SEQUENCE IF EXISTS public.remito_preview_seq;
DROP SEQUENCE IF EXISTS public.recuperacion_cuenta_id_seq;
DROP TABLE IF EXISTS public.recuperacion_cuenta;
DROP SEQUENCE IF EXISTS public.proveedores_id_seq;
DROP TABLE IF EXISTS public.proveedores;
DROP SEQUENCE IF EXISTS public.productos_id_seq;
DROP TABLE IF EXISTS public.productos;
DROP SEQUENCE IF EXISTS public.pedidos_id_seq;
DROP TABLE IF EXISTS public.pedidos;
DROP SEQUENCE IF EXISTS public.pedido_detalle_id_seq;
DROP TABLE IF EXISTS public.pedido_detalle;
DROP TABLE IF EXISTS public.configuracion;
DROP SEQUENCE IF EXISTS public.clientes_id_seq;
DROP TABLE IF EXISTS public.clientes;
DROP SEQUENCE IF EXISTS public.categorias_id_seq;
DROP TABLE IF EXISTS public.categorias;
SET default_tablespace = '';

SET default_table_access_method = heap;

--
-- Name: categorias; Type: TABLE; Schema: public; Owner: -
--

CREATE TABLE public.categorias (
    id integer NOT NULL,
    nombre character varying(50) NOT NULL,
    porcentaje_ganancia numeric(5,2),
    descuento numeric(5,2)
);


--
-- Name: categorias_id_seq; Type: SEQUENCE; Schema: public; Owner: -
--

CREATE SEQUENCE public.categorias_id_seq
    AS integer
    START WITH 1
    INCREMENT BY 1
    NO MINVALUE
    NO MAXVALUE
    CACHE 1;


--
-- Name: categorias_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: -
--

ALTER SEQUENCE public.categorias_id_seq OWNED BY public.categorias.id;


--
-- Name: clientes; Type: TABLE; Schema: public; Owner: -
--

CREATE TABLE public.clientes (
    id integer NOT NULL,
    nombre character varying(50) NOT NULL,
    apellido character varying(50) NOT NULL,
    telefono character varying(25) NOT NULL,
    email character varying(100)
);


--
-- Name: clientes_id_seq; Type: SEQUENCE; Schema: public; Owner: -
--

CREATE SEQUENCE public.clientes_id_seq
    AS integer
    START WITH 1
    INCREMENT BY 1
    NO MINVALUE
    NO MAXVALUE
    CACHE 1;


--
-- Name: clientes_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: -
--

ALTER SEQUENCE public.clientes_id_seq OWNED BY public.clientes.id;


--
-- Name: configuracion; Type: TABLE; Schema: public; Owner: -
--

CREATE TABLE public.configuracion (
    id integer NOT NULL,
    nombre character varying(100) NOT NULL,
    direccion character varying(100) NOT NULL,
    ciudad character varying(100) NOT NULL,
    codigo_postal character varying(4) NOT NULL,
    provincia character varying(100) NOT NULL,
    telefono character varying(10) NOT NULL,
    email character varying(100) NOT NULL,
    cond_iva character varying(50) NOT NULL,
    cuit character varying(20) NOT NULL,
    inicio_act date NOT NULL,
    iva numeric(5,2) NOT NULL,
    hora_apertura_maniana time without time zone NOT NULL,
    hora_cierre_maniana time without time zone NOT NULL,
    hora_apertura_tarde time without time zone NOT NULL,
    hora_cierre_tarde time without time zone NOT NULL,
    cargo_cancelacion_servicio numeric(10,2) NOT NULL,
    mail_automatico boolean DEFAULT false,
    logo_ruta character varying(100) DEFAULT '/imgs/headerPDF.png'::character varying NOT NULL,
    email_emisor character varying(100),
    contrasenia_emisor character varying(250)
);


--
-- Name: pedido_detalle; Type: TABLE; Schema: public; Owner: -
--

CREATE TABLE public.pedido_detalle (
    id integer NOT NULL,
    precio_unitario numeric(10,2) NOT NULL,
    cantidad integer NOT NULL,
    subtotal integer NOT NULL,
    cantidad_vendida integer DEFAULT 0,
    id_pedido integer NOT NULL,
    id_producto integer NOT NULL
);


--
-- Name: pedido_detalle_id_seq; Type: SEQUENCE; Schema: public; Owner: -
--

CREATE SEQUENCE public.pedido_detalle_id_seq
    AS integer
    START WITH 1
    INCREMENT BY 1
    NO MINVALUE
    NO MAXVALUE
    CACHE 1;


--
-- Name: pedido_detalle_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: -
--

ALTER SEQUENCE public.pedido_detalle_id_seq OWNED BY public.pedido_detalle.id;


--
-- Name: pedidos; Type: TABLE; Schema: public; Owner: -
--

CREATE TABLE public.pedidos (
    id integer NOT NULL,
    fecha date DEFAULT CURRENT_DATE NOT NULL,
    total numeric(10,2),
    id_proveedor integer NOT NULL,
    id_usuario integer NOT NULL
);


--
-- Name: pedidos_id_seq; Type: SEQUENCE; Schema: public; Owner: -
--

CREATE SEQUENCE public.pedidos_id_seq
    AS integer
    START WITH 1
    INCREMENT BY 1
    NO MINVALUE
    NO MAXVALUE
    CACHE 1;


--
-- Name: pedidos_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: -
--

ALTER SEQUENCE public.pedidos_id_seq OWNED BY public.pedidos.id;


--
-- Name: productos; Type: TABLE; Schema: public; Owner: -
--

CREATE TABLE public.productos (
    id integer NOT NULL,
    marca character varying(50) NOT NULL,
    modelo character varying(50) NOT NULL,
    precio numeric(10,2),
    stock integer,
    descuento numeric(5,2),
    estado boolean NOT NULL,
    id_categoria integer NOT NULL,
    id_tipo integer NOT NULL
);


--
-- Name: productos_id_seq; Type: SEQUENCE; Schema: public; Owner: -
--

CREATE SEQUENCE public.productos_id_seq
    AS integer
    START WITH 1
    INCREMENT BY 1
    NO MINVALUE
    NO MAXVALUE
    CACHE 1;


--
-- Name: productos_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: -
--

ALTER SEQUENCE public.productos_id_seq OWNED BY public.productos.id;


--
-- Name: proveedores; Type: TABLE; Schema: public; Owner: -
--

CREATE TABLE public.proveedores (
    id integer NOT NULL,
    razon_social character varying(100) NOT NULL,
    telefono character varying(25) NOT NULL,
    email character varying(100)
);


--
-- Name: proveedores_id_seq; Type: SEQUENCE; Schema: public; Owner: -
--

CREATE SEQUENCE public.proveedores_id_seq
    AS integer
    START WITH 1
    INCREMENT BY 1
    NO MINVALUE
    NO MAXVALUE
    CACHE 1;


--
-- Name: proveedores_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: -
--

ALTER SEQUENCE public.proveedores_id_seq OWNED BY public.proveedores.id;


--
-- Name: recuperacion_cuenta; Type: TABLE; Schema: public; Owner: -
--

CREATE TABLE public.recuperacion_cuenta (
    id integer NOT NULL,
    id_usuario integer NOT NULL,
    codigo character varying(255) NOT NULL,
    expira_a timestamp without time zone NOT NULL,
    usado integer DEFAULT 0,
    creado_a timestamp without time zone DEFAULT CURRENT_TIMESTAMP
);


--
-- Name: recuperacion_cuenta_id_seq; Type: SEQUENCE; Schema: public; Owner: -
--

CREATE SEQUENCE public.recuperacion_cuenta_id_seq
    AS integer
    START WITH 1
    INCREMENT BY 1
    NO MINVALUE
    NO MAXVALUE
    CACHE 1;


--
-- Name: recuperacion_cuenta_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: -
--

ALTER SEQUENCE public.recuperacion_cuenta_id_seq OWNED BY public.recuperacion_cuenta.id;


--
-- Name: remito_preview_seq; Type: SEQUENCE; Schema: public; Owner: -
--

CREATE SEQUENCE public.remito_preview_seq
    START WITH 1
    INCREMENT BY 1
    NO MINVALUE
    NO MAXVALUE
    CACHE 1;


--
-- Name: servicio_detalle; Type: TABLE; Schema: public; Owner: -
--

CREATE TABLE public.servicio_detalle (
    id integer NOT NULL,
    precio_unitario numeric(10,2) NOT NULL,
    cantidad integer NOT NULL,
    subtotal numeric(10,2) NOT NULL,
    id_servicio integer NOT NULL,
    id_producto integer NOT NULL,
    id_pedido integer NOT NULL
);


--
-- Name: servicio_detalle_id_seq; Type: SEQUENCE; Schema: public; Owner: -
--

CREATE SEQUENCE public.servicio_detalle_id_seq
    AS integer
    START WITH 1
    INCREMENT BY 1
    NO MINVALUE
    NO MAXVALUE
    CACHE 1;


--
-- Name: servicio_detalle_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: -
--

ALTER SEQUENCE public.servicio_detalle_id_seq OWNED BY public.servicio_detalle.id;


--
-- Name: servicio_preview_seq; Type: SEQUENCE; Schema: public; Owner: -
--

CREATE SEQUENCE public.servicio_preview_seq
    START WITH 1
    INCREMENT BY 1
    NO MINVALUE
    NO MAXVALUE
    CACHE 1;


--
-- Name: servicios; Type: TABLE; Schema: public; Owner: -
--

CREATE TABLE public.servicios (
    id integer NOT NULL,
    fecha_registro date DEFAULT CURRENT_DATE NOT NULL,
    equipo character varying(100) NOT NULL,
    contrasenia_equipo text,
    problema character varying(2000) NOT NULL,
    observacion character varying(500),
    cuenta character varying(100),
    contrasenia_cuenta text,
    estado character varying(50) DEFAULT 'pendiente'::character varying NOT NULL,
    fecha_terminado date,
    detalle_realizado character varying(2000),
    mano_obra numeric(10,2),
    total numeric(10,2),
    id_cliente integer NOT NULL,
    id_usuario integer NOT NULL
);


--
-- Name: servicios_id_seq; Type: SEQUENCE; Schema: public; Owner: -
--

CREATE SEQUENCE public.servicios_id_seq
    AS integer
    START WITH 1
    INCREMENT BY 1
    NO MINVALUE
    NO MAXVALUE
    CACHE 1;


--
-- Name: servicios_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: -
--

ALTER SEQUENCE public.servicios_id_seq OWNED BY public.servicios.id;


--
-- Name: tipos; Type: TABLE; Schema: public; Owner: -
--

CREATE TABLE public.tipos (
    id integer NOT NULL,
    nombre character varying(50) NOT NULL
);


--
-- Name: tipos_id_seq; Type: SEQUENCE; Schema: public; Owner: -
--

CREATE SEQUENCE public.tipos_id_seq
    AS integer
    START WITH 1
    INCREMENT BY 1
    NO MINVALUE
    NO MAXVALUE
    CACHE 1;


--
-- Name: tipos_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: -
--

ALTER SEQUENCE public.tipos_id_seq OWNED BY public.tipos.id;


--
-- Name: usuarios; Type: TABLE; Schema: public; Owner: -
--

CREATE TABLE public.usuarios (
    id integer NOT NULL,
    nombre character varying(50) NOT NULL,
    apellido character varying(50) NOT NULL,
    usuario character varying(30) NOT NULL,
    password text NOT NULL,
    telefono character varying(25),
    email character varying(100) NOT NULL,
    rol character varying(20) DEFAULT 'operador'::character varying NOT NULL,
    activo boolean DEFAULT true
);


--
-- Name: usuarios_id_seq; Type: SEQUENCE; Schema: public; Owner: -
--

CREATE SEQUENCE public.usuarios_id_seq
    AS integer
    START WITH 1
    INCREMENT BY 1
    NO MINVALUE
    NO MAXVALUE
    CACHE 1;


--
-- Name: usuarios_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: -
--

ALTER SEQUENCE public.usuarios_id_seq OWNED BY public.usuarios.id;


--
-- Name: venta_detalle; Type: TABLE; Schema: public; Owner: -
--

CREATE TABLE public.venta_detalle (
    id integer NOT NULL,
    precio_unitario numeric(10,2) NOT NULL,
    cantidad integer NOT NULL,
    subtotal numeric(10,2) NOT NULL,
    descuento_pct numeric(5,2),
    id_venta integer NOT NULL,
    id_producto integer NOT NULL,
    id_pedido integer NOT NULL
);


--
-- Name: venta_detalle_id_seq; Type: SEQUENCE; Schema: public; Owner: -
--

CREATE SEQUENCE public.venta_detalle_id_seq
    AS integer
    START WITH 1
    INCREMENT BY 1
    NO MINVALUE
    NO MAXVALUE
    CACHE 1;


--
-- Name: venta_detalle_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: -
--

ALTER SEQUENCE public.venta_detalle_id_seq OWNED BY public.venta_detalle.id;


--
-- Name: venta_preview_seq; Type: SEQUENCE; Schema: public; Owner: -
--

CREATE SEQUENCE public.venta_preview_seq
    START WITH 1
    INCREMENT BY 1
    NO MINVALUE
    NO MAXVALUE
    CACHE 1;


--
-- Name: ventas; Type: TABLE; Schema: public; Owner: -
--

CREATE TABLE public.ventas (
    id integer NOT NULL,
    fecha date DEFAULT CURRENT_DATE NOT NULL,
    total numeric(10,2) NOT NULL,
    forma_pago character varying(30) NOT NULL,
    tipo_pago character varying(15) NOT NULL,
    cant_cuotas integer,
    descuento_pct numeric(5,2),
    recargo_pct numeric(5,2),
    id_cliente integer NOT NULL,
    id_usuario integer NOT NULL
);


--
-- Name: ventas_id_seq; Type: SEQUENCE; Schema: public; Owner: -
--

CREATE SEQUENCE public.ventas_id_seq
    AS integer
    START WITH 1
    INCREMENT BY 1
    NO MINVALUE
    NO MAXVALUE
    CACHE 1;


--
-- Name: ventas_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: -
--

ALTER SEQUENCE public.ventas_id_seq OWNED BY public.ventas.id;


--
-- Name: categorias id; Type: DEFAULT; Schema: public; Owner: -
--

ALTER TABLE ONLY public.categorias ALTER COLUMN id SET DEFAULT nextval('public.categorias_id_seq'::regclass);


--
-- Name: clientes id; Type: DEFAULT; Schema: public; Owner: -
--

ALTER TABLE ONLY public.clientes ALTER COLUMN id SET DEFAULT nextval('public.clientes_id_seq'::regclass);


--
-- Name: pedido_detalle id; Type: DEFAULT; Schema: public; Owner: -
--

ALTER TABLE ONLY public.pedido_detalle ALTER COLUMN id SET DEFAULT nextval('public.pedido_detalle_id_seq'::regclass);


--
-- Name: pedidos id; Type: DEFAULT; Schema: public; Owner: -
--

ALTER TABLE ONLY public.pedidos ALTER COLUMN id SET DEFAULT nextval('public.pedidos_id_seq'::regclass);


--
-- Name: productos id; Type: DEFAULT; Schema: public; Owner: -
--

ALTER TABLE ONLY public.productos ALTER COLUMN id SET DEFAULT nextval('public.productos_id_seq'::regclass);


--
-- Name: proveedores id; Type: DEFAULT; Schema: public; Owner: -
--

ALTER TABLE ONLY public.proveedores ALTER COLUMN id SET DEFAULT nextval('public.proveedores_id_seq'::regclass);


--
-- Name: recuperacion_cuenta id; Type: DEFAULT; Schema: public; Owner: -
--

ALTER TABLE ONLY public.recuperacion_cuenta ALTER COLUMN id SET DEFAULT nextval('public.recuperacion_cuenta_id_seq'::regclass);


--
-- Name: servicio_detalle id; Type: DEFAULT; Schema: public; Owner: -
--

ALTER TABLE ONLY public.servicio_detalle ALTER COLUMN id SET DEFAULT nextval('public.servicio_detalle_id_seq'::regclass);


--
-- Name: servicios id; Type: DEFAULT; Schema: public; Owner: -
--

ALTER TABLE ONLY public.servicios ALTER COLUMN id SET DEFAULT nextval('public.servicios_id_seq'::regclass);


--
-- Name: tipos id; Type: DEFAULT; Schema: public; Owner: -
--

ALTER TABLE ONLY public.tipos ALTER COLUMN id SET DEFAULT nextval('public.tipos_id_seq'::regclass);


--
-- Name: usuarios id; Type: DEFAULT; Schema: public; Owner: -
--

ALTER TABLE ONLY public.usuarios ALTER COLUMN id SET DEFAULT nextval('public.usuarios_id_seq'::regclass);


--
-- Name: venta_detalle id; Type: DEFAULT; Schema: public; Owner: -
--

ALTER TABLE ONLY public.venta_detalle ALTER COLUMN id SET DEFAULT nextval('public.venta_detalle_id_seq'::regclass);


--
-- Name: ventas id; Type: DEFAULT; Schema: public; Owner: -
--

ALTER TABLE ONLY public.ventas ALTER COLUMN id SET DEFAULT nextval('public.ventas_id_seq'::regclass);


--
-- Data for Name: categorias; Type: TABLE DATA; Schema: public; Owner: -
--

COPY public.categorias (id, nombre, porcentaje_ganancia, descuento) FROM stdin;
2	Auricular	35.00	\N
3	Chip Carga	15.00	\N
6	Playstation	30.00	\N
5	Televisor	30.00	10.00
4	Bateria	30.00	0.00
1	Celular	40.00	10.00
\.


--
-- Data for Name: clientes; Type: TABLE DATA; Schema: public; Owner: -
--

COPY public.clientes (id, nombre, apellido, telefono, email) FROM stdin;
2	Cecilia	Muller	3434194125	ceciliajaquelinamuller@gmail.com
3	Carlos	Axt	3434789456	carlosaxt@gmail.com
4	Silvia	Volker	3434123456	silviavolkerdeaxt@yahoo.com
5	Edmundo	Muller	3434456123	edmund@gmail.com
6	Ernesto	Muller	3434789456	erne@gmail.com
7	Axel	Leo	3434737904	axelleoaxt@gmail.com
1	Iago	Axt	3434737904	axelleonelaxt@gmail.com
8	Franck	Malcov	3434789456	ElFranck@gmail.com
\.


--
-- Data for Name: configuracion; Type: TABLE DATA; Schema: public; Owner: -
--

COPY public.configuracion (id, nombre, direccion, ciudad, codigo_postal, provincia, telefono, email, cond_iva, cuit, inicio_act, iva, hora_apertura_maniana, hora_cierre_maniana, hora_apertura_tarde, hora_cierre_tarde, cargo_cancelacion_servicio, mail_automatico, logo_ruta, email_emisor, contrasenia_emisor) FROM stdin;
1	ByteCenter	José Hernández 642	Crespo	3116	Entre Rios	3434737904	contacto@bytecenter.com	consumidor_final	12234234233	2026-05-01	21.00	08:00:00	12:00:00	16:00:00	20:00:00	30000.00	t	/imgs/headerPDF.png	axelleoaxt@gmail.com	gB3Vbi/4Y2rKavtV1HRHyXUrRmZVcHJHK2hwNEk0YXZIQUZjVVJSUlRjVGd4Kzc1L1k5WWFrVVhrZms9
\.


--
-- Data for Name: pedido_detalle; Type: TABLE DATA; Schema: public; Owner: -
--

COPY public.pedido_detalle (id, precio_unitario, cantidad, subtotal, cantidad_vendida, id_pedido, id_producto) FROM stdin;
2	200000.00	1	200000	1	2	2
1	750000.00	2	1500000	2	1	1
3	150000.00	2	300000	2	3	2
7	100000.00	1	100000	1	6	5
8	200000.00	1	200000	1	6	7
9	200000.00	1	200000	1	7	7
5	750000.00	1	750000	1	5	1
12	50000.00	1	50000	1	10	1
10	100000.00	1	100000	1	8	8
13	700000.00	2	1400000	2	11	1
4	200000.00	2	400000	2	4	2
14	550000.00	3	1650000	2	12	10
15	1400000.00	1	1400000	1	13	11
17	700000.00	2	1400000	0	14	13
18	55.00	2	110	2	15	1
20	750000.00	1	750000	1	16	1
11	400000.00	2	800000	2	9	9
6	40000.00	3	120000	2	5	4
19	55.00	2	110	2	15	2
21	55000.00	1	55000	1	16	2
26	1500000.00	1	1500000	0	18	15
25	700000.00	1	700000	1	18	1
27	700000.00	1	700000	1	29	1
28	700000.00	1	700000	1	31	1
29	700000.00	1	700000	1	32	1
22	50000.00	4	200000	4	17	5
24	50000.00	2	100000	1	18	2
16	600000.00	2	1200000	2	14	12
30	100000.00	1	100000	0	33	8
32	370000.00	2	740000	0	35	9
31	800000.00	2	1600000	1	34	1
23	150000.00	4	600000	2	17	7
\.


--
-- Data for Name: pedidos; Type: TABLE DATA; Schema: public; Owner: -
--

COPY public.pedidos (id, fecha, total, id_proveedor, id_usuario) FROM stdin;
1	2026-03-26	1500000.00	1	1
2	2026-03-27	200000.00	1	1
3	2026-03-27	300000.00	2	1
4	2026-03-27	400000.00	1	1
5	2026-03-27	870000.00	2	1
6	2026-03-27	300000.00	3	1
7	2026-03-27	200000.00	3	1
8	2026-03-30	100000.00	3	1
9	2026-04-05	800000.00	4	1
10	2026-04-05	50000.00	1	1
11	2026-04-06	1400000.00	1	1
12	2026-04-07	1650000.00	2	1
13	2026-04-09	1400000.00	4	1
14	2026-04-10	2600000.00	1	1
15	2026-04-10	220.00	1	1
16	2026-04-10	805000.00	1	1
17	2026-04-10	800000.00	3	1
18	2026-04-20	2300000.00	1	1
29	2026-04-20	700000.00	1	1
31	2026-04-20	700000.00	1	1
32	2026-04-20	700000.00	1	1
33	2026-04-21	100000.00	3	1
34	2026-04-22	1600000.00	1	1
35	2026-05-31	740000.00	1	1
\.


--
-- Data for Name: productos; Type: TABLE DATA; Schema: public; Owner: -
--

COPY public.productos (id, marca, modelo, precio, stock, descuento, estado, id_categoria, id_tipo) FROM stdin;
17	Infinix	Note 40 Pro	\N	\N	5.00	t	1	1
8	Motorola Generico	Bateria e7 plus	130000.00	1	\N	t	4	2
11	LG	TV L65478 50p	1820000.00	0	\N	t	5	1
3	Samsung	a17	\N	\N	\N	f	1	1
16	Samsung	a37	\N	\N	\N	t	1	1
14	Sony	Playstation 5 Pro	\N	\N	5.00	t	6	1
4	Philco	AP1706	54000.00	1	\N	t	2	1
15	Xbox	Series X	1950000.00	1	0.00	t	6	1
5	Lenovo Generico	Chip de Carga	57500.00	0	\N	t	3	2
12	Motorola	moto edge 60	840000.00	0	\N	t	1	1
10	Motorola	moto g77	770000.00	1	\N	t	1	1
13	Samsung	a56	980000.00	2	\N	t	1	1
2	Motorola	moto e7 plus	70000.00	1	0.00	t	1	1
9	Xiaomi	Redmi Note 14	518000.00	2	\N	t	1	1
1	Motorola	moto edge 70 fusion	1120000.00	1	0.00	t	1	1
7	Lenovo Generico	Bateria 2400 mAh	195000.00	2	\N	t	4	2
\.


--
-- Data for Name: proveedores; Type: TABLE DATA; Schema: public; Owner: -
--

COPY public.proveedores (id, razon_social, telefono, email) FROM stdin;
2	celusTopeNET	3434123456	celusTopeNET@yahoo.com
3	TuInsumosARG	3434032145	TuInsumosARG@gmail.com
4	LatamTecnologia	3434456123	contactoLatamTec@gmail.com
1	celusNET	3434789456	celusNET@gmail.com
\.


--
-- Data for Name: recuperacion_cuenta; Type: TABLE DATA; Schema: public; Owner: -
--

COPY public.recuperacion_cuenta (id, id_usuario, codigo, expira_a, usado, creado_a) FROM stdin;
19	1	$2y$10$e0erAdX0NEoYDlUDToOGZ.BQJHDayorINgxGnhaSHfzZ/L283mW9K	2026-05-11 08:31:47	1	2026-05-11 11:21:47.783015
1	1	$2y$10$e/axDqo.pVTWr9f5.tJGNOVb/paEjAck6/OaXN9O6mK5XnwgyRFkW	2026-05-04 20:07:07	1	2026-05-04 22:57:07.580991
2	1	$2y$10$33lCvuytgyVmToFKd8jpCurM5rtA3dDaej/uwiM9MYknx7E8GFE2.	2026-05-04 20:07:21	1	2026-05-04 22:57:21.587151
3	1	$2y$10$NGxIe3szElU1O4LvgWnFy.H0VriCXbIOXyCz8xyOBFKy/mmZk4RvO	2026-05-09 16:05:08	1	2026-05-09 18:55:08.576339
4	1	$2y$10$3djl1XqaXgWX6xxP0dG/i.b6OxQ8bcgVh8s5C9.Z1uJv2ZEbYMdZ.	2026-05-09 16:49:59	1	2026-05-09 19:39:59.5074
5	1	$2y$10$ALzDClrQEDZno5lyRovqB.r1zpIkK5K3XutF1/L3hhBF2bfkTsnVC	2026-05-09 17:00:53	1	2026-05-09 19:50:53.198452
6	1	$2y$10$LEIgvWxucYDDbUz/vtEoeuy0y3eCi7XUaPk2C0FCzTsGg8cEQheTC	2026-05-09 17:01:51	1	2026-05-09 19:51:51.936907
7	1	$2y$10$39n8fmicVv5FKEoE.rxdaOUswKGsIkYZ.5FkvdRPRj3vGEZXbmiSa	2026-05-09 17:48:01	1	2026-05-09 20:38:01.42681
8	1	$2y$10$R8i/WNd8L7SO4Na0pcyOQ.XQYaD0L0pAlPTq5q3QbFWxr5QP7Bsmq	2026-05-09 18:40:36	1	2026-05-09 21:30:36.963037
9	1	$2y$10$PbuESxm53n8qXpN7HawOvub3DxHKHSWJ5yPtw/bgU8XorD3jYE6Fq	2026-05-09 18:40:40	1	2026-05-09 21:30:40.169946
13	1	$2y$10$ahC0/J2Zyp7r/nSoSUerQO.irZV5q1Dko46CdqgsQgKgjWLHqrLlC	2026-05-09 19:00:57	1	2026-05-09 21:50:57.300332
15	1	$2y$10$4fzW..lwKg1.IHeGa.HlpOUT5LMvhSCxRQXQyXBTQZS3vXEQYmToO	2026-05-10 11:06:41	1	2026-05-10 13:56:41.02393
17	1	$2y$10$Ca4ryfCfW9DB31X4bd.UdeKr.Tlz6wWIBzjRQw2WbgsrFsvx/lZQG	2026-05-10 11:08:40	1	2026-05-10 13:58:40.521881
18	1	$2y$10$goDbm4Se20H6.t23PUX9cuKCmrYkHrYi2i.SBnmitx1KcM/UsmCci	2026-05-10 11:11:06	1	2026-05-10 14:01:06.526671
20	1	$2y$10$lTPAUTRZsedZWgsayZWgHethpVhIsN83djC9uxZCPoDCHFd8xtB/e	2026-05-11 08:35:11	1	2026-05-11 11:25:11.374147
35	1	$2y$10$TPQ5OqXb11qBUb84tcv5DeyXWOLREQeYAFJ9mUoiKtXXJWJrJZIw.	2026-06-12 16:12:32	1	2026-06-12 19:02:32.396469
32	1	$2y$10$OL8J9m1aIhGyAFctWUzhQ.4DVyqmQa/V0Sj0cHHOXI2x8wUVJJlhG	2026-06-10 10:05:36	1	2026-06-10 12:55:36.748863
34	1	$2y$10$dqZtpzOJirAUimjxtrYnrerTFG.dxey6uQz6JVaepPZ7ry2eYu/B6	2026-06-10 10:11:48	1	2026-06-10 13:01:48.603995
30	1	$2y$10$FTk0ru/pfoyru3flU/JY1u/LDolgAvvVZu/V8u8C42WXJz16nAI3q	2026-06-06 15:55:08	1	2026-06-06 18:45:08.652996
25	1	$2y$10$UHBpfWej8NPqw4ohqVqWOeOIMXQlW8gTke.F1q2udDu8jrDYO8aR2	2026-05-31 10:14:17	1	2026-05-31 13:04:17.320626
27	1	$2y$10$pO67baLjsmqxaSrZzWcM8uRzn7L/1zvdrU.1pmCow5GPWN1zAIbIO	2026-06-06 15:42:23	1	2026-06-06 18:32:23.972816
22	1	$2y$10$WbRbMCtu6HQNloXoP1dizuyNVGdEu1UD0nfUlil34DSeaqAXPPyie	2026-05-11 09:09:40	1	2026-05-11 11:59:40.782763
23	1	$2y$10$PIilCwvTs.Raq2OPMnpupO3O.uJ5qGU/fvR70g2TGjaeAtxTCIkaO	2026-05-11 10:10:27	1	2026-05-11 13:00:27.843562
10	1	$2y$10$YH2FJwegixwwhYzYZfGO5undbGWSbLmC71O6PssinWJWZ4UExYVgW	2026-05-09 18:40:43	1	2026-05-09 21:30:43.3587
11	1	$2y$10$Y8h1o4RKIADv9.6RDqrjGuwZuQ3t4LfYKKXhTdLMXcyMDgUWsmjO.	2026-05-09 18:57:54	1	2026-05-09 21:47:54.965611
12	1	$2y$10$QAtXbZvjFLSjYwQ5xYVDp.gGRaAlXMWT1MqnENgSJE.yv/uJOP1SG	2026-05-09 18:59:52	1	2026-05-09 21:49:52.246543
14	1	$2y$10$32in9EW6OVZDKnZa00qOn./C9vEDBPg4zUOuuu.LFcQzUZkIZNd1a	2026-05-09 19:07:24	1	2026-05-09 21:57:24.688022
16	1	$2y$10$FTe8cNcD9W7E16BdXJOqh.DZdgo6aVeCKvG3H8b8BbYeB4CDyLP8u	2026-05-10 11:06:58	1	2026-05-10 13:56:58.181341
21	1	$2y$10$qOmmwJeRJBNZgGvP/vFlK.JXm8xI0K8vAIxkz3DosbWrZB1KUaiNu	2026-05-11 09:07:42	1	2026-05-11 11:57:42.633059
24	1	$2y$10$/z.RXAal.CRT1s8Sp7iI4uKrFIZ9yr/XFh19jT4NK4AsLq2eU9ur2	2026-05-11 10:11:32	1	2026-05-11 13:01:32.909824
26	1	$2y$10$2xlgTG1xImciMPQEBWgJGuVL/JgPMASU2xUIDNy83Vxwgkm9mMo8e	2026-05-31 10:15:25	1	2026-05-31 13:05:25.276419
28	1	$2y$10$CxECo/w1tdA.QzaF.mowb.Ca7UJr6h7j9aoqnP7idigVT88wX7YnG	2026-06-06 15:43:28	1	2026-06-06 18:33:28.516994
29	1	$2y$10$1nmXkc21grNg1obqzO8dwuMBWdRl2VBeGcDa8DDEpEU6k3/whgp8K	2026-06-06 15:44:41	1	2026-06-06 18:34:41.185796
31	1	$2y$10$z6NNs.OaVxE5chz1kHm0R.R5Wz8K3R4IWGSu1WYNy5WNgpzqPhQaS	2026-06-10 09:03:35	1	2026-06-10 11:53:35.913295
33	1	$2y$10$NFldaqsi2oyWWpq/GWM2lu0FDH1stM4wcU/XIlD.u0joXIjGgzjd6	2026-06-10 10:07:24	1	2026-06-10 12:57:24.625788
\.


--
-- Data for Name: servicio_detalle; Type: TABLE DATA; Schema: public; Owner: -
--

COPY public.servicio_detalle (id, precio_unitario, cantidad, subtotal, id_servicio, id_producto, id_pedido) FROM stdin;
1	115000.00	1	115000.00	1	5	6
2	230000.00	1	230000.00	1	7	6
3	230000.00	1	230000.00	2	7	7
4	115000.00	1	115000.00	4	8	8
5	57500.00	1	57500.00	10	5	17
6	172500.00	1	172500.00	10	7	17
7	57500.00	1	57500.00	9	5	17
8	57500.00	2	115000.00	14	5	17
9	195000.00	1	195000.00	23	7	17
\.


--
-- Data for Name: servicios; Type: TABLE DATA; Schema: public; Owner: -
--

COPY public.servicios (id, fecha_registro, equipo, contrasenia_equipo, problema, observacion, cuenta, contrasenia_cuenta, estado, fecha_terminado, detalle_realizado, mano_obra, total, id_cliente, id_usuario) FROM stdin;
9	2026-04-10	motorola moto edge 60	\N	No enciende.	\N	\N	\N	cancelado	2026-04-15	Nada.	0.00	30000.00	1	1
12	2026-04-15	moto e6	\N	Bateria inchada.	\N	\N	\N	pendiente - enviado	\N	No se pudo cambiar la bateria.	50.00	50.00	1	1
13	2026-04-17	Lenovo ideapad 16	\N	Pantallazod azules y reinicios repentinos.	\N	\N	\N	pendiente	\N	\N	\N	\N	2	1
1	2026-03-27	Lenovo V310	zfGD6Q8n/QSn5Ak4lzFNL05uQWdoMmZoTlRUQmFyRUxmeklFYVE9PQ==	No enciende, ni enchufada ni con bateria.	Ingresa con cargador.	axelleonelaxt@gmail.com	/f98aW81dtNiiCv3CvAoLFFuZUJ0amovTWFUQmxlOEJSRTNkcGc9PQ==	cancelado	\N	Se debe realizar cambio de chip de carga debido a que esta roto, ademas se sugiere cambio de bateria porque esta muy degradada por los años.	200000.00	15000.00	1	1
19	2026-04-20	redmi note 14	\N	No anda.	\N	\N	\N	pendiente	\N	\N	\N	\N	2	1
2	2026-03-27	moto e7 plus	\N	Anda lento, necesita optimizacion.	\N	\N	\N	finalizado	2026-03-27	Se debe realizar optimizacion ademas de cambio de bateria ya que se encuentra bastante degradada.	70000.00	300000.00	1	1
4	2026-04-06	moto e7 plus	\N	El cliente pidio cambio de bateria, ya que no carga hasta el 100% y dura medio dia (se descarga rapido).	Ingresa con cargador.	\N	\N	finalizado	2026-04-06	Para ver si realmente era la bateria, revise si tenia procesos en segundo plano consumiendo energia, pero no. Asi que te dejo el presupuesto del cambio de bateria, la misma es generica pero anda perfecto en celulares motorola.	45000.00	160000.00	1	1
3	2026-03-30	Lenovo V310	\N	Le dejo de andar un usb.	\N	\N	\N	finalizado	2026-04-06	Se realizo cambio de pin.	45000.00	45000.00	1	1
14	2026-04-20	Lenovo V310	\N	No anda el teclado.	\N	\N	\N	finalizado	2026-04-20	Le cambiamos el chip de carga.	150000.00	265000.00	1	1
5	2026-04-07	Lenovo V310	\N	No enciende.	\N	\N	\N	cancelado	\N	No se hizo nada.	20000.00	15000.00	1	1
6	2026-04-07	moto g77	\N	La pantalla titila.	Ingresa sin cargador, solo con funda.	\N	\N	cancelado	2026-04-07	Se debe realizar cambio de modulo.	45000.00	15000.00	1	1
18	2026-04-20	asdasd	L+aYDTbKo2gev0ky0wXNPG52RmFBZUcyK1gvdlJHN2lkS3E2Y2c9PQ==	sdasd	\N	\N	\N	finalizado	2026-04-20	Nosep	50000.00	50000.00	1	1
7	2026-04-07	Samsung a15	\N	No funciona el parlante.	\N	\N	\N	cancelado	2026-04-07	Cambio de parlante.	20000.00	30000.00	2	1
8	2026-04-07	Lenovo ThinkBook g7	\N	No carga.	\N	\N	\N	finalizado	2026-04-07	Se realizo cambio de bateria.	150000.00	150000.00	1	1
10	2026-04-13	redmi note 14	\N	No funciona el parlante.	\N	\N	\N	pendiente - enviado	\N	Se hizo nada.	0.00	230000.00	2	1
21	2026-04-20	Lenovo V310	\N	Nose.	\N	\N	\N	finalizado	2026-04-20	De todo.	150000.00	150000.00	1	1
11	2026-04-15	moto e7	\N	No enciende.	\N	\N	\N	pendiente - enviado	\N	Nada	0.00	0.00	1	1
22	2026-04-21	Motorola moto g41	\N	No carga, parece que se rompio el pin de carga.	Ingresa con cargador.	\N	\N	pendiente	\N	\N	\N	\N	3	1
23	2026-06-12	Motorola edge 70	\N	Se cayo y se partio la pantalla.	Ingresador con cargador.	\N	\N	finalizado	2026-06-12	Cambio de modulo.	50000.00	245000.00	1	11
\.


--
-- Data for Name: tipos; Type: TABLE DATA; Schema: public; Owner: -
--

COPY public.tipos (id, nombre) FROM stdin;
1	Venta
2	Servicio
\.


--
-- Data for Name: usuarios; Type: TABLE DATA; Schema: public; Owner: -
--

COPY public.usuarios (id, nombre, apellido, usuario, password, telefono, email, rol, activo) FROM stdin;
1	Axel	Axt	AxelAxt	$2y$10$NdLgY3MhH5csTRfIihzg2ebsblC0K.ql.24SdYVtV5dwjUyJwwbMK	3434737904	axelleonelaxt@gmail.com	admin	t
10	Iago	Axt	Iago_Axt	$2y$10$IR2APWxX1ay4ruTmfBhMTOIB6c7h4JotbKDwhlG9E57kA0.O7Qbt6	3434789456	iagojoelaxt@gmail.com	operador	f
11	Martin	Arrejin	Martin_Arrejin	$2y$10$dY.B.mF/gpCtOMmAuKcKxOPAH6Mozx3YRtWqbXNxgDHwxBDQbzhY.	3434789456	arrejin.martin@gmail.com	admin	t
2	Cecilia	Muller	CeciliaMuller	$2y$10$zExdYaU9zqWEQ6bDVYLJcOMFJKlq/pnlJp9dHZpBJvaWHe.9I8kfW	3434194125	ceciliamuller@bytecenter.com	admin	f
\.


--
-- Data for Name: venta_detalle; Type: TABLE DATA; Schema: public; Owner: -
--

COPY public.venta_detalle (id, precio_unitario, cantidad, subtotal, descuento_pct, id_venta, id_producto, id_pedido) FROM stdin;
1	900000.00	2	1620000.00	10.00	1	1	1
2	240000.00	2	456000.00	5.00	2	2	3
3	240000.00	1	228000.00	5.00	2	2	4
4	54000.00	1	54000.00	0.00	3	4	5
5	60000.00	1	57000.00	5.00	4	1	5
6	60000.00	1	57000.00	5.00	5	1	10
7	840000.00	2	1596000.00	5.00	6	1	11
8	240000.00	1	228000.00	5.00	7	2	4
9	660000.00	2	1320000.00	0.00	8	10	12
10	1820000.00	1	1820000.00	0.00	9	11	13
11	900000.00	1	855000.00	5.00	10	1	15
12	900000.00	1	855000.00	5.00	11	1	15
13	900000.00	1	855000.00	5.00	12	1	16
14	520000.00	2	936000.00	10.00	13	9	9
15	54000.00	1	54000.00	0.00	14	4	5
16	71500.00	2	128700.00	10.00	15	2	15
17	71500.00	1	64350.00	10.00	15	2	16
18	910000.00	1	819000.00	10.00	21	1	18
19	910000.00	1	819000.00	10.00	23	1	29
20	910000.00	1	819000.00	10.00	25	1	31
21	910000.00	1	819000.00	10.00	29	1	32
22	65000.00	1	58500.00	10.00	31	2	18
23	780000.00	2	1404000.00	10.00	32	12	14
24	1120000.00	1	1008000.00	10.00	33	1	34
\.


--
-- Data for Name: ventas; Type: TABLE DATA; Schema: public; Owner: -
--

COPY public.ventas (id, fecha, total, forma_pago, tipo_pago, cant_cuotas, descuento_pct, recargo_pct, id_cliente, id_usuario) FROM stdin;
1	2026-03-27	1530000.00	efectivo	pago_unico	\N	5.00	0.00	1	1
2	2026-03-27	684000.00	efectivo	pago_unico	\N	0.00	0.00	1	1
3	2026-04-06	51300.00	efectivo	pago_unico	\N	5.00	0.00	1	1
4	2026-04-06	57000.00	efectivo	pago_unico	\N	0.00	0.00	1	1
5	2026-04-06	57000.00	efectivo	pago_unico	\N	0.00	0.00	1	1
6	2026-04-07	1596000.00	efectivo	pago_unico	\N	0.00	0.00	1	1
7	2026-04-07	228000.00	efectivo	pago_unico	\N	0.00	0.00	2	2
8	2026-04-07	1254000.00	efectivo	pago_unico	\N	5.00	0.00	1	1
9	2026-04-09	2002000.00	credito	12_cuotas	\N	5.00	15.00	2	1
10	2026-04-14	855000.00	efectivo	pago_unico	\N	0.00	0.00	1	1
11	2026-04-15	855000.00	efectivo	pago_unico	\N	0.00	0.00	1	1
12	2026-04-15	855000.00	efectivo	pago_unico	\N	0.00	0.00	1	1
13	2026-04-17	1092000.00	credito	6_cuotas	\N	0.00	15.00	1	1
14	2026-04-17	59400.00	credito	6_cuotas	\N	0.00	10.00	1	1
15	2026-04-17	222007.50	credito	6_cuotas	\N	0.00	15.00	1	1
21	2026-04-20	819000.00	efectivo	pago_unico	\N	0.00	0.00	1	1
23	2026-04-20	819000.00	efectivo	pago_unico	\N	0.00	0.00	1	1
25	2026-04-20	819000.00	efectivo	pago_unico	\N	0.00	0.00	1	1
29	2026-04-20	819000.00	credito	6_cuotas	\N	0.00	0.00	1	1
31	2026-04-20	58500.00	efectivo	pago_unico	\N	0.00	0.00	1	1
32	2026-04-21	1404000.00	efectivo	pago_unico	\N	0.00	0.00	1	1
33	2026-06-12	1008000.00	efectivo	pago_unico	\N	0.00	0.00	1	11
\.


--
-- Name: categorias_id_seq; Type: SEQUENCE SET; Schema: public; Owner: -
--

SELECT pg_catalog.setval('public.categorias_id_seq', 6, true);


--
-- Name: clientes_id_seq; Type: SEQUENCE SET; Schema: public; Owner: -
--

SELECT pg_catalog.setval('public.clientes_id_seq', 8, true);


--
-- Name: pedido_detalle_id_seq; Type: SEQUENCE SET; Schema: public; Owner: -
--

SELECT pg_catalog.setval('public.pedido_detalle_id_seq', 32, true);


--
-- Name: pedidos_id_seq; Type: SEQUENCE SET; Schema: public; Owner: -
--

SELECT pg_catalog.setval('public.pedidos_id_seq', 18, true);


--
-- Name: productos_id_seq; Type: SEQUENCE SET; Schema: public; Owner: -
--

SELECT pg_catalog.setval('public.productos_id_seq', 17, true);


--
-- Name: proveedores_id_seq; Type: SEQUENCE SET; Schema: public; Owner: -
--

SELECT pg_catalog.setval('public.proveedores_id_seq', 4, true);


--
-- Name: recuperacion_cuenta_id_seq; Type: SEQUENCE SET; Schema: public; Owner: -
--

SELECT pg_catalog.setval('public.recuperacion_cuenta_id_seq', 35, true);


--
-- Name: remito_preview_seq; Type: SEQUENCE SET; Schema: public; Owner: -
--

SELECT pg_catalog.setval('public.remito_preview_seq', 35, true);


--
-- Name: servicio_detalle_id_seq; Type: SEQUENCE SET; Schema: public; Owner: -
--

SELECT pg_catalog.setval('public.servicio_detalle_id_seq', 9, true);


--
-- Name: servicio_preview_seq; Type: SEQUENCE SET; Schema: public; Owner: -
--

SELECT pg_catalog.setval('public.servicio_preview_seq', 23, true);


--
-- Name: servicios_id_seq; Type: SEQUENCE SET; Schema: public; Owner: -
--

SELECT pg_catalog.setval('public.servicios_id_seq', 14, true);


--
-- Name: tipos_id_seq; Type: SEQUENCE SET; Schema: public; Owner: -
--

SELECT pg_catalog.setval('public.tipos_id_seq', 2, true);


--
-- Name: usuarios_id_seq; Type: SEQUENCE SET; Schema: public; Owner: -
--

SELECT pg_catalog.setval('public.usuarios_id_seq', 11, true);


--
-- Name: venta_detalle_id_seq; Type: SEQUENCE SET; Schema: public; Owner: -
--

SELECT pg_catalog.setval('public.venta_detalle_id_seq', 24, true);


--
-- Name: venta_preview_seq; Type: SEQUENCE SET; Schema: public; Owner: -
--

SELECT pg_catalog.setval('public.venta_preview_seq', 33, true);


--
-- Name: ventas_id_seq; Type: SEQUENCE SET; Schema: public; Owner: -
--

SELECT pg_catalog.setval('public.ventas_id_seq', 15, true);


--
-- Name: categorias categorias_pkey; Type: CONSTRAINT; Schema: public; Owner: -
--

ALTER TABLE ONLY public.categorias
    ADD CONSTRAINT categorias_pkey PRIMARY KEY (id);


--
-- Name: clientes clientes_pkey; Type: CONSTRAINT; Schema: public; Owner: -
--

ALTER TABLE ONLY public.clientes
    ADD CONSTRAINT clientes_pkey PRIMARY KEY (id);


--
-- Name: configuracion configuracion_pkey; Type: CONSTRAINT; Schema: public; Owner: -
--

ALTER TABLE ONLY public.configuracion
    ADD CONSTRAINT configuracion_pkey PRIMARY KEY (id);


--
-- Name: pedido_detalle pedido_detalle_pkey; Type: CONSTRAINT; Schema: public; Owner: -
--

ALTER TABLE ONLY public.pedido_detalle
    ADD CONSTRAINT pedido_detalle_pkey PRIMARY KEY (id);


--
-- Name: pedidos pedidos_pkey; Type: CONSTRAINT; Schema: public; Owner: -
--

ALTER TABLE ONLY public.pedidos
    ADD CONSTRAINT pedidos_pkey PRIMARY KEY (id);


--
-- Name: productos productos_pkey; Type: CONSTRAINT; Schema: public; Owner: -
--

ALTER TABLE ONLY public.productos
    ADD CONSTRAINT productos_pkey PRIMARY KEY (id);


--
-- Name: proveedores proveedores_pkey; Type: CONSTRAINT; Schema: public; Owner: -
--

ALTER TABLE ONLY public.proveedores
    ADD CONSTRAINT proveedores_pkey PRIMARY KEY (id);


--
-- Name: recuperacion_cuenta recuperacion_cuenta_pkey; Type: CONSTRAINT; Schema: public; Owner: -
--

ALTER TABLE ONLY public.recuperacion_cuenta
    ADD CONSTRAINT recuperacion_cuenta_pkey PRIMARY KEY (id);


--
-- Name: servicio_detalle servicio_detalle_pkey; Type: CONSTRAINT; Schema: public; Owner: -
--

ALTER TABLE ONLY public.servicio_detalle
    ADD CONSTRAINT servicio_detalle_pkey PRIMARY KEY (id);


--
-- Name: servicios servicios_pkey; Type: CONSTRAINT; Schema: public; Owner: -
--

ALTER TABLE ONLY public.servicios
    ADD CONSTRAINT servicios_pkey PRIMARY KEY (id);


--
-- Name: tipos tipos_pkey; Type: CONSTRAINT; Schema: public; Owner: -
--

ALTER TABLE ONLY public.tipos
    ADD CONSTRAINT tipos_pkey PRIMARY KEY (id);


--
-- Name: usuarios usuarios_pkey; Type: CONSTRAINT; Schema: public; Owner: -
--

ALTER TABLE ONLY public.usuarios
    ADD CONSTRAINT usuarios_pkey PRIMARY KEY (id);


--
-- Name: usuarios usuarios_usuario_key; Type: CONSTRAINT; Schema: public; Owner: -
--

ALTER TABLE ONLY public.usuarios
    ADD CONSTRAINT usuarios_usuario_key UNIQUE (usuario);


--
-- Name: venta_detalle venta_detalle_pkey; Type: CONSTRAINT; Schema: public; Owner: -
--

ALTER TABLE ONLY public.venta_detalle
    ADD CONSTRAINT venta_detalle_pkey PRIMARY KEY (id);


--
-- Name: ventas ventas_pkey; Type: CONSTRAINT; Schema: public; Owner: -
--

ALTER TABLE ONLY public.ventas
    ADD CONSTRAINT ventas_pkey PRIMARY KEY (id);


--
-- Name: pedido_detalle fk_pedidodetalle_pedido; Type: FK CONSTRAINT; Schema: public; Owner: -
--

ALTER TABLE ONLY public.pedido_detalle
    ADD CONSTRAINT fk_pedidodetalle_pedido FOREIGN KEY (id_pedido) REFERENCES public.pedidos(id);


--
-- Name: pedido_detalle fk_pedidodetalle_producto; Type: FK CONSTRAINT; Schema: public; Owner: -
--

ALTER TABLE ONLY public.pedido_detalle
    ADD CONSTRAINT fk_pedidodetalle_producto FOREIGN KEY (id_producto) REFERENCES public.productos(id);


--
-- Name: pedidos fk_pedidos_proveedor; Type: FK CONSTRAINT; Schema: public; Owner: -
--

ALTER TABLE ONLY public.pedidos
    ADD CONSTRAINT fk_pedidos_proveedor FOREIGN KEY (id_proveedor) REFERENCES public.proveedores(id);


--
-- Name: pedidos fk_pedidos_usuario; Type: FK CONSTRAINT; Schema: public; Owner: -
--

ALTER TABLE ONLY public.pedidos
    ADD CONSTRAINT fk_pedidos_usuario FOREIGN KEY (id_usuario) REFERENCES public.usuarios(id);


--
-- Name: productos fk_productos_categoria; Type: FK CONSTRAINT; Schema: public; Owner: -
--

ALTER TABLE ONLY public.productos
    ADD CONSTRAINT fk_productos_categoria FOREIGN KEY (id_categoria) REFERENCES public.categorias(id);


--
-- Name: productos fk_productos_tipo; Type: FK CONSTRAINT; Schema: public; Owner: -
--

ALTER TABLE ONLY public.productos
    ADD CONSTRAINT fk_productos_tipo FOREIGN KEY (id_tipo) REFERENCES public.tipos(id);


--
-- Name: servicios fk_servicio_cliente; Type: FK CONSTRAINT; Schema: public; Owner: -
--

ALTER TABLE ONLY public.servicios
    ADD CONSTRAINT fk_servicio_cliente FOREIGN KEY (id_cliente) REFERENCES public.clientes(id);


--
-- Name: servicios fk_servicio_usuario; Type: FK CONSTRAINT; Schema: public; Owner: -
--

ALTER TABLE ONLY public.servicios
    ADD CONSTRAINT fk_servicio_usuario FOREIGN KEY (id_usuario) REFERENCES public.usuarios(id);


--
-- Name: servicio_detalle fk_serviciodetalle_pedido; Type: FK CONSTRAINT; Schema: public; Owner: -
--

ALTER TABLE ONLY public.servicio_detalle
    ADD CONSTRAINT fk_serviciodetalle_pedido FOREIGN KEY (id_pedido) REFERENCES public.pedidos(id);


--
-- Name: servicio_detalle fk_serviciodetalle_producto; Type: FK CONSTRAINT; Schema: public; Owner: -
--

ALTER TABLE ONLY public.servicio_detalle
    ADD CONSTRAINT fk_serviciodetalle_producto FOREIGN KEY (id_producto) REFERENCES public.productos(id);


--
-- Name: servicio_detalle fk_serviciodetalle_servicio; Type: FK CONSTRAINT; Schema: public; Owner: -
--

ALTER TABLE ONLY public.servicio_detalle
    ADD CONSTRAINT fk_serviciodetalle_servicio FOREIGN KEY (id_servicio) REFERENCES public.servicios(id);


--
-- Name: ventas fk_venta_cliente; Type: FK CONSTRAINT; Schema: public; Owner: -
--

ALTER TABLE ONLY public.ventas
    ADD CONSTRAINT fk_venta_cliente FOREIGN KEY (id_cliente) REFERENCES public.clientes(id);


--
-- Name: ventas fk_venta_usuario; Type: FK CONSTRAINT; Schema: public; Owner: -
--

ALTER TABLE ONLY public.ventas
    ADD CONSTRAINT fk_venta_usuario FOREIGN KEY (id_usuario) REFERENCES public.usuarios(id);


--
-- Name: venta_detalle fk_ventadetalle_pedido; Type: FK CONSTRAINT; Schema: public; Owner: -
--

ALTER TABLE ONLY public.venta_detalle
    ADD CONSTRAINT fk_ventadetalle_pedido FOREIGN KEY (id_pedido) REFERENCES public.pedidos(id);


--
-- Name: venta_detalle fk_ventadetalle_producto; Type: FK CONSTRAINT; Schema: public; Owner: -
--

ALTER TABLE ONLY public.venta_detalle
    ADD CONSTRAINT fk_ventadetalle_producto FOREIGN KEY (id_producto) REFERENCES public.productos(id);


--
-- Name: venta_detalle fk_ventadetalle_venta; Type: FK CONSTRAINT; Schema: public; Owner: -
--

ALTER TABLE ONLY public.venta_detalle
    ADD CONSTRAINT fk_ventadetalle_venta FOREIGN KEY (id_venta) REFERENCES public.ventas(id);


--
-- PostgreSQL database dump complete
--

\unrestrict kMRL6h14peVm5XW1CtyyrKKABe5nJ5rUSta5cBB7cLDB2v5zpHSMNuLZeDJC9sz

