--
-- PostgreSQL database dump
--

-- Dumped from database version 14.1 (Debian 14.1-1.pgdg110+1)
-- Dumped by pg_dump version 14.1 (Debian 14.1-1.pgdg110+1)

SET statement_timeout = 0;
SET lock_timeout = 0;
SET idle_in_transaction_session_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: stock_opname_histories; Type: TABLE; Schema: public; Owner: postgres
--

CREATE TABLE public.stock_opname_histories (
    id bigint NOT NULL,
    stock_opname_id bigint,
    inventory_barang_id bigint,
    toko_id bigint,
    rfid_label_id bigint,
    rfid text,
    status_delete text,
    created_at timestamp with time zone DEFAULT now(),
    updated_at timestamp with time zone,
    created_by text,
    updated_by text,
    category text
);


ALTER TABLE public.stock_opname_histories OWNER TO postgres;

--
-- Name: stock_opname_histories_id_seq; Type: SEQUENCE; Schema: public; Owner: postgres
--

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


ALTER TABLE public.stock_opname_histories_id_seq OWNER TO postgres;

--
-- Name: stock_opname_histories_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: postgres
--

ALTER SEQUENCE public.stock_opname_histories_id_seq OWNED BY public.stock_opname_histories.id;


--
-- Name: stock_opnames; Type: TABLE; Schema: public; Owner: postgres
--

CREATE TABLE public.stock_opnames (
    id bigint NOT NULL,
    total_rfid_produk bigint DEFAULT 0,
    total_rfid_tidak_terekam bigint DEFAULT 0,
    total_rfid_tidak_terdaftar bigint DEFAULT 0,
    total_rfid_toko_lain bigint DEFAULT 0,
    total_rfid_terdaftar_dan_terjual bigint DEFAULT 0,
    status text DEFAULT 'diproses'::text,
    created_at timestamp with time zone DEFAULT now(),
    updated_at timestamp with time zone,
    created_by text,
    updated_by text,
    upproved_at timestamp with time zone,
    upproved_by text,
    total_rfid_terekam bigint,
    toko_id bigint,
    total_duration text,
    total_duration_ulang text,
    total_rfid bigint
);


ALTER TABLE public.stock_opnames OWNER TO postgres;

--
-- Name: stock_opnames_id_seq; Type: SEQUENCE; Schema: public; Owner: postgres
--

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


ALTER TABLE public.stock_opnames_id_seq OWNER TO postgres;

--
-- Name: stock_opnames_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: postgres
--

ALTER SEQUENCE public.stock_opnames_id_seq OWNED BY public.stock_opnames.id;


--
-- Name: stock_opname_histories id; Type: DEFAULT; Schema: public; Owner: postgres
--

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


--
-- Name: stock_opnames id; Type: DEFAULT; Schema: public; Owner: postgres
--

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


--
-- Name: stock_opname_histories stock_opname_histories_pkey; Type: CONSTRAINT; Schema: public; Owner: postgres
--

ALTER TABLE ONLY public.stock_opname_histories
    ADD CONSTRAINT stock_opname_histories_pkey PRIMARY KEY (id);


--
-- Name: stock_opnames stock_opnames_pkey; Type: CONSTRAINT; Schema: public; Owner: postgres
--

ALTER TABLE ONLY public.stock_opnames
    ADD CONSTRAINT stock_opnames_pkey PRIMARY KEY (id);


--
-- PostgreSQL database dump complete
--

