--
--


-- Started on 2025-03-23 12:21:54

SET transaction_timeout = 0;
SELECT pg_catalog.set_config('search_path', '', false);

--
-- TOC entry 5 (class 2615 OID 117706)
-- Name: public; Type: SCHEMA; Schema: -; Owner: postgres
--

-- *not* creating schema, since initdb creates it


ALTER SCHEMA public OWNER TO postgres;

--
-- TOC entry 5077 (class 0 OID 0)
-- Dependencies: 5
-- Name: SCHEMA public; Type: COMMENT; Schema: -; Owner: postgres
--

COMMENT ON SCHEMA public IS '';




--
-- TOC entry 257 (class 1259 OID 117904)
-- Name: Asset; Type: TABLE; Schema: public; Owner: postgres
--

CREATE TABLE public."Asset" (
    id integer NOT NULL,
    "assetName" text NOT NULL,
    "purchasePrice" double precision NOT NULL,
    "forcedSalePrice" double precision NOT NULL,
    quantity integer NOT NULL,
    note text,
    "createdAt" timestamp(3) without time zone DEFAULT CURRENT_TIMESTAMP NOT NULL,
    "updatedAt" timestamp(3) without time zone NOT NULL
);


ALTER TABLE public."Asset" OWNER TO postgres;

--
-- TOC entry 256 (class 1259 OID 117903)
-- Name: Asset_id_seq; Type: SEQUENCE; Schema: public; Owner: postgres
--

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


ALTER SEQUENCE public."Asset_id_seq" OWNER TO postgres;

--
-- TOC entry 5079 (class 0 OID 0)
-- Dependencies: 256
-- Name: Asset_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: postgres
--

ALTER SEQUENCE public."Asset_id_seq" OWNED BY public."Asset".id;


--
-- TOC entry 217 (class 1259 OID 117707)
-- Name: _prisma_migrations; Type: TABLE; Schema: public; Owner: postgres
--

CREATE TABLE public._prisma_migrations (
    id character varying(36) NOT NULL,
    checksum character varying(64) NOT NULL,
    finished_at timestamp with time zone,
    migration_name character varying(255) NOT NULL,
    logs text,
    rolled_back_at timestamp with time zone,
    started_at timestamp with time zone DEFAULT now() NOT NULL,
    applied_steps_count integer DEFAULT 0 NOT NULL
);


ALTER TABLE public._prisma_migrations OWNER TO postgres;

--
-- TOC entry 233 (class 1259 OID 117780)
-- Name: account_history; Type: TABLE; Schema: public; Owner: postgres
--

CREATE TABLE public.account_history (
    history_id integer NOT NULL,
    account_id bigint NOT NULL,
    account_name character varying(100) NOT NULL,
    transaction_type character varying(50) NOT NULL,
    amount numeric(12,2) NOT NULL,
    date timestamp without time zone,
    balance_after_transaction numeric(15,2) NOT NULL
);


ALTER TABLE public.account_history OWNER TO postgres;

--
-- TOC entry 232 (class 1259 OID 117779)
-- Name: account_history_history_id_seq; Type: SEQUENCE; Schema: public; Owner: postgres
--

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


ALTER SEQUENCE public.account_history_history_id_seq OWNER TO postgres;

--
-- TOC entry 5080 (class 0 OID 0)
-- Dependencies: 232
-- Name: account_history_history_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: postgres
--

ALTER SEQUENCE public.account_history_history_id_seq OWNED BY public.account_history.history_id;


--
-- TOC entry 231 (class 1259 OID 117773)
-- Name: bank_account; Type: TABLE; Schema: public; Owner: postgres
--

CREATE TABLE public.bank_account (
    id bigint NOT NULL,
    account_id bigint NOT NULL,
    name character varying(255),
    opening_balance numeric(15,2) NOT NULL,
    current_balance numeric(15,2) NOT NULL
);


ALTER TABLE public.bank_account OWNER TO postgres;

--
-- TOC entry 230 (class 1259 OID 117772)
-- Name: bank_account_id_seq; Type: SEQUENCE; Schema: public; Owner: postgres
--

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


ALTER SEQUENCE public.bank_account_id_seq OWNER TO postgres;

--
-- TOC entry 5081 (class 0 OID 0)
-- Dependencies: 230
-- Name: bank_account_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: postgres
--

ALTER SEQUENCE public.bank_account_id_seq OWNED BY public.bank_account.id;


--
-- TOC entry 229 (class 1259 OID 117766)
-- Name: brands; Type: TABLE; Schema: public; Owner: postgres
--

CREATE TABLE public.brands (
    id integer NOT NULL,
    brand character varying(255) NOT NULL,
    category_id integer NOT NULL,
    created_on date NOT NULL,
    status character varying(50) NOT NULL
);


ALTER TABLE public.brands OWNER TO postgres;

--
-- TOC entry 228 (class 1259 OID 117765)
-- Name: brands_id_seq; Type: SEQUENCE; Schema: public; Owner: postgres
--

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


ALTER SEQUENCE public.brands_id_seq OWNER TO postgres;

--
-- TOC entry 5082 (class 0 OID 0)
-- Dependencies: 228
-- Name: brands_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: postgres
--

ALTER SEQUENCE public.brands_id_seq OWNED BY public.brands.id;


--
-- TOC entry 227 (class 1259 OID 117757)
-- Name: categories; Type: TABLE; Schema: public; Owner: postgres
--

CREATE TABLE public.categories (
    id integer NOT NULL,
    category character varying(255) NOT NULL,
    category_slug character varying(255) NOT NULL,
    created_on date NOT NULL,
    status character varying(50) NOT NULL
);


ALTER TABLE public.categories OWNER TO postgres;

--
-- TOC entry 226 (class 1259 OID 117756)
-- Name: categories_id_seq; Type: SEQUENCE; Schema: public; Owner: postgres
--

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


ALTER SEQUENCE public.categories_id_seq OWNER TO postgres;

--
-- TOC entry 5083 (class 0 OID 0)
-- Dependencies: 226
-- Name: categories_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: postgres
--

ALTER SEQUENCE public.categories_id_seq OWNED BY public.categories.id;


--
-- TOC entry 251 (class 1259 OID 117869)
-- Name: customers; Type: TABLE; Schema: public; Owner: postgres
--

CREATE TABLE public.customers (
    id integer NOT NULL,
    name character varying(255) NOT NULL,
    email character varying(255),
    phone character varying(15),
    address text,
    opening_balance numeric(20,2) DEFAULT 0.0,
    paid numeric(20,2) DEFAULT 0.0,
    sale_due numeric(20,2) DEFAULT 0.0,
    created_at timestamp(3) without time zone DEFAULT CURRENT_TIMESTAMP,
    updated_at timestamp(3) without time zone
);


ALTER TABLE public.customers OWNER TO postgres;

--
-- TOC entry 250 (class 1259 OID 117868)
-- Name: customers_id_seq; Type: SEQUENCE; Schema: public; Owner: postgres
--

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


ALTER SEQUENCE public.customers_id_seq OWNER TO postgres;

--
-- TOC entry 5084 (class 0 OID 0)
-- Dependencies: 250
-- Name: customers_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: postgres
--

ALTER SEQUENCE public.customers_id_seq OWNED BY public.customers.id;


--
-- TOC entry 249 (class 1259 OID 117858)
-- Name: damages; Type: TABLE; Schema: public; Owner: postgres
--

CREATE TABLE public.damages (
    id integer NOT NULL,
    product_id integer NOT NULL,
    product_name character varying(255) NOT NULL,
    date timestamp(3) without time zone DEFAULT CURRENT_TIMESTAMP,
    purchase_cost numeric(10,2) NOT NULL,
    quantity integer NOT NULL,
    reason text,
    created_at timestamp(3) without time zone DEFAULT CURRENT_TIMESTAMP NOT NULL,
    updated_at timestamp(3) without time zone NOT NULL
);


ALTER TABLE public.damages OWNER TO postgres;

--
-- TOC entry 248 (class 1259 OID 117857)
-- Name: damages_id_seq; Type: SEQUENCE; Schema: public; Owner: postgres
--

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


ALTER SEQUENCE public.damages_id_seq OWNER TO postgres;

--
-- TOC entry 5085 (class 0 OID 0)
-- Dependencies: 248
-- Name: damages_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: postgres
--

ALTER SEQUENCE public.damages_id_seq OWNED BY public.damages.id;


--
-- TOC entry 247 (class 1259 OID 117849)
-- Name: employee; Type: TABLE; Schema: public; Owner: postgres
--

CREATE TABLE public.employee (
    id integer NOT NULL,
    joining_date date NOT NULL,
    name character varying(255) NOT NULL,
    email character varying(255),
    phone character varying(15) NOT NULL,
    salary numeric(15,2) NOT NULL,
    overtime_rate numeric(15,2) NOT NULL,
    role character varying(100) NOT NULL,
    address text
);


ALTER TABLE public.employee OWNER TO postgres;

--
-- TOC entry 246 (class 1259 OID 117848)
-- Name: employee_id_seq; Type: SEQUENCE; Schema: public; Owner: postgres
--

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


ALTER SEQUENCE public.employee_id_seq OWNER TO postgres;

--
-- TOC entry 5086 (class 0 OID 0)
-- Dependencies: 246
-- Name: employee_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: postgres
--

ALTER SEQUENCE public.employee_id_seq OWNED BY public.employee.id;


--
-- TOC entry 245 (class 1259 OID 117836)
-- Name: employeesalary; Type: TABLE; Schema: public; Owner: postgres
--

CREATE TABLE public.employeesalary (
    id integer NOT NULL,
    salary_month date NOT NULL,
    employee_name character varying(255) NOT NULL,
    email character varying(255) NOT NULL,
    basic_salary numeric(10,2) NOT NULL,
    overtime_rate numeric(10,2) DEFAULT 0,
    total_overtime numeric(10,2) DEFAULT 0,
    advance_amount numeric(10,2) DEFAULT 0,
    pay_amount numeric(10,2) NOT NULL,
    transaction_account character varying(50) NOT NULL,
    created_at timestamp(3) without time zone DEFAULT CURRENT_TIMESTAMP,
    updated_at timestamp(3) without time zone
);


ALTER TABLE public.employeesalary OWNER TO postgres;

--
-- TOC entry 244 (class 1259 OID 117835)
-- Name: employeesalary_id_seq; Type: SEQUENCE; Schema: public; Owner: postgres
--

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


ALTER SEQUENCE public.employeesalary_id_seq OWNER TO postgres;

--
-- TOC entry 5087 (class 0 OID 0)
-- Dependencies: 244
-- Name: employeesalary_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: postgres
--

ALTER SEQUENCE public.employeesalary_id_seq OWNED BY public.employeesalary.id;


--
-- TOC entry 243 (class 1259 OID 117826)
-- Name: expenses; Type: TABLE; Schema: public; Owner: postgres
--

CREATE TABLE public.expenses (
    id integer NOT NULL,
    invoice_no character varying(255) NOT NULL,
    name character varying(255) NOT NULL,
    amount numeric(15,2) NOT NULL,
    created_at timestamp(3) without time zone DEFAULT CURRENT_TIMESTAMP NOT NULL,
    updated_at timestamp(3) without time zone NOT NULL
);


ALTER TABLE public.expenses OWNER TO postgres;

--
-- TOC entry 242 (class 1259 OID 117825)
-- Name: expenses_id_seq; Type: SEQUENCE; Schema: public; Owner: postgres
--

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


ALTER SEQUENCE public.expenses_id_seq OWNER TO postgres;

--
-- TOC entry 5088 (class 0 OID 0)
-- Dependencies: 242
-- Name: expenses_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: postgres
--

ALTER SEQUENCE public.expenses_id_seq OWNED BY public.expenses.id;


--
-- TOC entry 223 (class 1259 OID 117740)
-- Name: follow; Type: TABLE; Schema: public; Owner: postgres
--

CREATE TABLE public.follow (
    id integer NOT NULL
);


ALTER TABLE public.follow OWNER TO postgres;

--
-- TOC entry 222 (class 1259 OID 117739)
-- Name: follow_id_seq; Type: SEQUENCE; Schema: public; Owner: postgres
--

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


ALTER SEQUENCE public.follow_id_seq OWNER TO postgres;

--
-- TOC entry 5089 (class 0 OID 0)
-- Dependencies: 222
-- Name: follow_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: postgres
--

ALTER SEQUENCE public.follow_id_seq OWNED BY public.follow.id;


--
-- TOC entry 255 (class 1259 OID 117892)
-- Name: owners; Type: TABLE; Schema: public; Owner: postgres
--

CREATE TABLE public.owners (
    id integer NOT NULL,
    name text,
    "phoneNumber" character varying(15),
    address text,
    invested numeric(30,2) DEFAULT 0.0,
    "Withdrawn" numeric(30,2) DEFAULT 0.0,
    "Balance" numeric(30,2) DEFAULT 0.0,
    image character varying(255)
);


ALTER TABLE public.owners OWNER TO postgres;

--
-- TOC entry 254 (class 1259 OID 117891)
-- Name: owners_id_seq; Type: SEQUENCE; Schema: public; Owner: postgres
--

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


ALTER SEQUENCE public.owners_id_seq OWNER TO postgres;

--
-- TOC entry 5090 (class 0 OID 0)
-- Dependencies: 254
-- Name: owners_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: postgres
--

ALTER SEQUENCE public.owners_id_seq OWNED BY public.owners.id;


--
-- TOC entry 225 (class 1259 OID 117747)
-- Name: products; Type: TABLE; Schema: public; Owner: postgres
--

CREATE TABLE public.products (
    id integer NOT NULL,
    sku text DEFAULT ''::text NOT NULL,
    product_name character varying(255),
    product_code character varying(50),
    category character varying(100),
    brand character varying(100),
    main_unit character varying(50),
    sub_unit character varying(50),
    opening_stock integer,
    sale_price numeric(10,2),
    purchase_cost numeric(10,2),
    product_details text,
    image character varying(255),
    "createdAt" timestamp without time zone,
    "expireDate" date,
    discount numeric(5,2),
    username character varying(100),
    email character varying(255)
);


ALTER TABLE public.products OWNER TO postgres;

--
-- TOC entry 224 (class 1259 OID 117746)
-- Name: products_id_seq; Type: SEQUENCE; Schema: public; Owner: postgres
--

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


ALTER SEQUENCE public.products_id_seq OWNER TO postgres;

--
-- TOC entry 5091 (class 0 OID 0)
-- Dependencies: 224
-- Name: products_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: postgres
--

ALTER SEQUENCE public.products_id_seq OWNED BY public.products.id;


--
-- TOC entry 241 (class 1259 OID 117816)
-- Name: purchase; Type: TABLE; Schema: public; Owner: postgres
--

CREATE TABLE public.purchase (
    id integer NOT NULL,
    supplier character varying(255) NOT NULL,
    purchase_date timestamp without time zone NOT NULL,
    pay_term character varying(50),
    status character varying(50) NOT NULL,
    invoice_scheme character varying(255),
    invoice_no character varying(255),
    products jsonb,
    total numeric(12,2),
    discount_type character varying(50),
    discount_amount numeric(12,2),
    order_tax numeric(12,2),
    note text,
    amount_paid numeric(12,2),
    change_return numeric(12,2),
    payment_date timestamp without time zone,
    payment_method character varying(50),
    payment_account character varying(255),
    payment_note text,
    total_payable numeric(12,2) NOT NULL,
    created_at timestamp(3) without time zone DEFAULT CURRENT_TIMESTAMP
);


ALTER TABLE public.purchase OWNER TO postgres;

--
-- TOC entry 240 (class 1259 OID 117815)
-- Name: purchase_id_seq; Type: SEQUENCE; Schema: public; Owner: postgres
--

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


ALTER SEQUENCE public.purchase_id_seq OWNER TO postgres;

--
-- TOC entry 5092 (class 0 OID 0)
-- Dependencies: 240
-- Name: purchase_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: postgres
--

ALTER SEQUENCE public.purchase_id_seq OWNED BY public.purchase.id;


--
-- TOC entry 239 (class 1259 OID 117809)
-- Name: salary; Type: TABLE; Schema: public; Owner: postgres
--

CREATE TABLE public.salary (
    salary_id integer NOT NULL,
    employee_id integer NOT NULL,
    base_salary numeric(10,2) NOT NULL,
    overtime_rate numeric(10,2) NOT NULL,
    total_receivable numeric(10,2),
    total_paid numeric(10,2),
    total_due numeric(10,2),
    action character varying(50)
);


ALTER TABLE public.salary OWNER TO postgres;

--
-- TOC entry 238 (class 1259 OID 117808)
-- Name: salary_salary_id_seq; Type: SEQUENCE; Schema: public; Owner: postgres
--

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


ALTER SEQUENCE public.salary_salary_id_seq OWNER TO postgres;

--
-- TOC entry 5093 (class 0 OID 0)
-- Dependencies: 238
-- Name: salary_salary_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: postgres
--

ALTER SEQUENCE public.salary_salary_id_seq OWNED BY public.salary.salary_id;


--
-- TOC entry 237 (class 1259 OID 117800)
-- Name: sales; Type: TABLE; Schema: public; Owner: postgres
--

CREATE TABLE public.sales (
    id integer NOT NULL,
    selected_customer character varying(255) NOT NULL,
    "selected_customer_Id" integer,
    sale_date timestamp without time zone NOT NULL,
    pay_term character varying(50),
    status character varying(50),
    invoice_scheme character varying(255) NOT NULL,
    invoice_no character varying(255),
    products jsonb,
    total numeric(12,2),
    discount_type character varying(50),
    discount_amount numeric(12,2),
    shipping_charges numeric(12,2),
    order_tax numeric(12,2),
    sell_note text,
    billing_address text,
    shipping_address text,
    amount_paid numeric(12,2),
    change_return numeric(12,2),
    payment_date timestamp without time zone,
    payment_method character varying(50),
    payment_account character varying(255),
    payment_note text,
    shipping_note text,
    total_payable numeric(12,2)
);


ALTER TABLE public.sales OWNER TO postgres;

--
-- TOC entry 236 (class 1259 OID 117799)
-- Name: sales_id_seq; Type: SEQUENCE; Schema: public; Owner: postgres
--

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


ALTER SEQUENCE public.sales_id_seq OWNER TO postgres;

--
-- TOC entry 5094 (class 0 OID 0)
-- Dependencies: 236
-- Name: sales_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: postgres
--

ALTER SEQUENCE public.sales_id_seq OWNED BY public.sales.id;


--
-- TOC entry 253 (class 1259 OID 117882)
-- Name: settings; Type: TABLE; Schema: public; Owner: postgres
--

CREATE TABLE public.settings (
    id integer NOT NULL,
    "companyName" text,
    phone text,
    email text,
    address text,
    "invoiceLogoType" text,
    "invoiceDesign" text,
    "barcodeType" text,
    "lowStockQuantity" integer,
    currency text,
    "darkMode" boolean,
    logo text,
    "createdAt" timestamp(3) without time zone DEFAULT CURRENT_TIMESTAMP NOT NULL,
    "updatedAt" timestamp(3) without time zone NOT NULL
);


ALTER TABLE public.settings OWNER TO postgres;

--
-- TOC entry 252 (class 1259 OID 117881)
-- Name: settings_id_seq; Type: SEQUENCE; Schema: public; Owner: postgres
--

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


ALTER SEQUENCE public.settings_id_seq OWNER TO postgres;

--
-- TOC entry 5095 (class 0 OID 0)
-- Dependencies: 252
-- Name: settings_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: postgres
--

ALTER SEQUENCE public.settings_id_seq OWNED BY public.settings.id;


--
-- TOC entry 235 (class 1259 OID 117787)
-- Name: suppliers; Type: TABLE; Schema: public; Owner: postgres
--

CREATE TABLE public.suppliers (
    id integer NOT NULL,
    name character varying(255) NOT NULL,
    email character varying(255),
    phone character varying(15),
    address text,
    opening_balance numeric(10,2) DEFAULT 0.0,
    paid numeric(10,2) DEFAULT 0.0,
    purchase_due numeric(10,2) DEFAULT 0.0,
    created_at timestamp(3) without time zone DEFAULT CURRENT_TIMESTAMP,
    updated_at timestamp(3) without time zone
);


ALTER TABLE public.suppliers OWNER TO postgres;

--
-- TOC entry 234 (class 1259 OID 117786)
-- Name: suppliers_id_seq; Type: SEQUENCE; Schema: public; Owner: postgres
--

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


ALTER SEQUENCE public.suppliers_id_seq OWNER TO postgres;

--
-- TOC entry 5096 (class 0 OID 0)
-- Dependencies: 234
-- Name: suppliers_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: postgres
--

ALTER SEQUENCE public.suppliers_id_seq OWNED BY public.suppliers.id;


--
-- TOC entry 221 (class 1259 OID 117733)
-- Name: units; Type: TABLE; Schema: public; Owner: postgres
--

CREATE TABLE public.units (
    id integer NOT NULL,
    unit character varying(50) NOT NULL,
    unit_value numeric(10,2) NOT NULL,
    related_to character varying(50),
    related_sign character varying(5)
);


ALTER TABLE public.units OWNER TO postgres;

--
-- TOC entry 220 (class 1259 OID 117732)
-- Name: units_id_seq; Type: SEQUENCE; Schema: public; Owner: postgres
--

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


ALTER SEQUENCE public.units_id_seq OWNER TO postgres;

--
-- TOC entry 5097 (class 0 OID 0)
-- Dependencies: 220
-- Name: units_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: postgres
--

ALTER SEQUENCE public.units_id_seq OWNED BY public.units.id;


--
-- TOC entry 219 (class 1259 OID 117722)
-- Name: users; Type: TABLE; Schema: public; Owner: postgres
--

CREATE TABLE public.users (
    id integer NOT NULL,
    email character varying(50) NOT NULL,
    password character varying(255) NOT NULL,
    role character varying(50) DEFAULT 'user'::character varying NOT NULL,
    permissions text,
    created_at timestamp(3) without time zone DEFAULT CURRENT_TIMESTAMP NOT NULL,
    image bytea,
    name character varying(100)
);


ALTER TABLE public.users OWNER TO postgres;

--
-- TOC entry 218 (class 1259 OID 117721)
-- Name: users_id_seq; Type: SEQUENCE; Schema: public; Owner: postgres
--

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


ALTER SEQUENCE public.users_id_seq OWNER TO postgres;

--
-- TOC entry 5098 (class 0 OID 0)
-- Dependencies: 218
-- Name: users_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: postgres
--

ALTER SEQUENCE public.users_id_seq OWNED BY public.users.id;


--
-- TOC entry 4838 (class 2604 OID 117907)
-- Name: Asset id; Type: DEFAULT; Schema: public; Owner: postgres
--

ALTER TABLE ONLY public."Asset" ALTER COLUMN id SET DEFAULT nextval('public."Asset_id_seq"'::regclass);


--
-- TOC entry 4806 (class 2604 OID 117783)
-- Name: account_history history_id; Type: DEFAULT; Schema: public; Owner: postgres
--

ALTER TABLE ONLY public.account_history ALTER COLUMN history_id SET DEFAULT nextval('public.account_history_history_id_seq'::regclass);


--
-- TOC entry 4805 (class 2604 OID 117776)
-- Name: bank_account id; Type: DEFAULT; Schema: public; Owner: postgres
--

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


--
-- TOC entry 4804 (class 2604 OID 117769)
-- Name: brands id; Type: DEFAULT; Schema: public; Owner: postgres
--

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


--
-- TOC entry 4803 (class 2604 OID 117760)
-- Name: categories id; Type: DEFAULT; Schema: public; Owner: postgres
--

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


--
-- TOC entry 4827 (class 2604 OID 117872)
-- Name: customers id; Type: DEFAULT; Schema: public; Owner: postgres
--

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


--
-- TOC entry 4824 (class 2604 OID 117861)
-- Name: damages id; Type: DEFAULT; Schema: public; Owner: postgres
--

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


--
-- TOC entry 4823 (class 2604 OID 117852)
-- Name: employee id; Type: DEFAULT; Schema: public; Owner: postgres
--

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


--
-- TOC entry 4818 (class 2604 OID 117839)
-- Name: employeesalary id; Type: DEFAULT; Schema: public; Owner: postgres
--

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


--
-- TOC entry 4816 (class 2604 OID 117829)
-- Name: expenses id; Type: DEFAULT; Schema: public; Owner: postgres
--

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


--
-- TOC entry 4800 (class 2604 OID 117743)
-- Name: follow id; Type: DEFAULT; Schema: public; Owner: postgres
--

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


--
-- TOC entry 4834 (class 2604 OID 117895)
-- Name: owners id; Type: DEFAULT; Schema: public; Owner: postgres
--

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


--
-- TOC entry 4801 (class 2604 OID 117750)
-- Name: products id; Type: DEFAULT; Schema: public; Owner: postgres
--

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


--
-- TOC entry 4814 (class 2604 OID 117819)
-- Name: purchase id; Type: DEFAULT; Schema: public; Owner: postgres
--

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


--
-- TOC entry 4813 (class 2604 OID 117812)
-- Name: salary salary_id; Type: DEFAULT; Schema: public; Owner: postgres
--

ALTER TABLE ONLY public.salary ALTER COLUMN salary_id SET DEFAULT nextval('public.salary_salary_id_seq'::regclass);


--
-- TOC entry 4812 (class 2604 OID 117803)
-- Name: sales id; Type: DEFAULT; Schema: public; Owner: postgres
--

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


--
-- TOC entry 4832 (class 2604 OID 117885)
-- Name: settings id; Type: DEFAULT; Schema: public; Owner: postgres
--

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


--
-- TOC entry 4807 (class 2604 OID 117790)
-- Name: suppliers id; Type: DEFAULT; Schema: public; Owner: postgres
--

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


--
-- TOC entry 4799 (class 2604 OID 117736)
-- Name: units id; Type: DEFAULT; Schema: public; Owner: postgres
--

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


--
-- TOC entry 4796 (class 2604 OID 117725)
-- Name: users id; Type: DEFAULT; Schema: public; Owner: postgres
--

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


--
-- TOC entry 5071 (class 0 OID 117904)
-- Dependencies: 257
-- Data for Name: Asset; Type: TABLE DATA; Schema: public; Owner: postgres
--

COPY public."Asset" (id, "assetName", "purchasePrice", "forcedSalePrice", quantity, note, "createdAt", "updatedAt") FROM stdin;
\.


--
-- TOC entry 5031 (class 0 OID 117707)
-- Dependencies: 217
-- Data for Name: _prisma_migrations; Type: TABLE DATA; Schema: public; Owner: postgres
--

COPY public._prisma_migrations (id, checksum, finished_at, migration_name, logs, rolled_back_at, started_at, applied_steps_count) FROM stdin;
a882aaa9-5f8c-40e3-b7ed-e149ba81e0f3	5f01912de86c7b46302e5e1eceab478507accee126063a540c65fdb21728685b	2025-03-17 15:32:08.872654+06	20250317093208_all	\N	\N	2025-03-17 15:32:08.823387+06	1
\.


--
-- TOC entry 5047 (class 0 OID 117780)
-- Dependencies: 233
-- Data for Name: account_history; Type: TABLE DATA; Schema: public; Owner: postgres
--

COPY public.account_history (history_id, account_id, account_name, transaction_type, amount, date, balance_after_transaction) FROM stdin;
1	4310835787386787	Cash	Account Created	100000.00	2025-03-18 03:27:11.816	100000.00
2	8878902763841074	Bkash	Account Created	100000.00	2025-03-18 03:27:21.343	100000.00
3	1920576972149500	Nagad	Account Created	10000.00	2025-03-18 03:27:30.088	10000.00
\.


--
-- TOC entry 5045 (class 0 OID 117773)
-- Dependencies: 231
-- Data for Name: bank_account; Type: TABLE DATA; Schema: public; Owner: postgres
--

COPY public.bank_account (id, account_id, name, opening_balance, current_balance) FROM stdin;
3	1920576972149500	Nagad	10000.00	10000.00
2	8878902763841074	Bkash	100000.00	121843.00
1	4310835787386787	Cash	100000.00	103406.00
\.


--
-- TOC entry 5043 (class 0 OID 117766)
-- Dependencies: 229
-- Data for Name: brands; Type: TABLE DATA; Schema: public; Owner: postgres
--

COPY public.brands (id, brand, category_id, created_on, status) FROM stdin;
1	Toy	1	2025-03-17	active
2	Oraimo	2	2025-03-23	active
\.


--
-- TOC entry 5041 (class 0 OID 117757)
-- Dependencies: 227
-- Data for Name: categories; Type: TABLE DATA; Schema: public; Owner: postgres
--

COPY public.categories (id, category, category_slug, created_on, status) FROM stdin;
1	Bbay World	Bbay World	2025-03-17	active
2	headphone	headphone	2025-03-23	active
\.


--
-- TOC entry 5065 (class 0 OID 117869)
-- Dependencies: 251
-- Data for Name: customers; Type: TABLE DATA; Schema: public; Owner: postgres
--

COPY public.customers (id, name, email, phone, address, opening_balance, paid, sale_due, created_at, updated_at) FROM stdin;
1	mahmud	admin@example.com	01767907675	dfgsdgv  fdf	9960.00	30684.00	0.00	2025-03-18 03:28:47.106	2025-03-23 03:53:34.783
\.


--
-- TOC entry 5063 (class 0 OID 117858)
-- Dependencies: 249
-- Data for Name: damages; Type: TABLE DATA; Schema: public; Owner: postgres
--

COPY public.damages (id, product_id, product_name, date, purchase_cost, quantity, reason, created_at, updated_at) FROM stdin;
\.


--
-- TOC entry 5061 (class 0 OID 117849)
-- Dependencies: 247
-- Data for Name: employee; Type: TABLE DATA; Schema: public; Owner: postgres
--

COPY public.employee (id, joining_date, name, email, phone, salary, overtime_rate, role, address) FROM stdin;
1	2025-03-17	Mahmud	rahat@gmail.com	01767907675	35000.00	100.00	moderator	df
\.


--
-- TOC entry 5059 (class 0 OID 117836)
-- Dependencies: 245
-- Data for Name: employeesalary; Type: TABLE DATA; Schema: public; Owner: postgres
--

COPY public.employeesalary (id, salary_month, employee_name, email, basic_salary, overtime_rate, total_overtime, advance_amount, pay_amount, transaction_account, created_at, updated_at) FROM stdin;
\.


--
-- TOC entry 5057 (class 0 OID 117826)
-- Dependencies: 243
-- Data for Name: expenses; Type: TABLE DATA; Schema: public; Owner: postgres
--

COPY public.expenses (id, invoice_no, name, amount, created_at, updated_at) FROM stdin;
1	kjj	kmm	50.00	2025-03-22 09:57:23.308	2025-03-22 09:57:23.308
2	INV-610998	tjfjh	0.00	2025-03-22 10:01:58.048	2025-03-22 10:01:58.049
\.


--
-- TOC entry 5037 (class 0 OID 117740)
-- Dependencies: 223
-- Data for Name: follow; Type: TABLE DATA; Schema: public; Owner: postgres
--

COPY public.follow (id) FROM stdin;
\.


--
-- TOC entry 5069 (class 0 OID 117892)
-- Dependencies: 255
-- Data for Name: owners; Type: TABLE DATA; Schema: public; Owner: postgres
--

COPY public.owners (id, name, "phoneNumber", address, invested, "Withdrawn", "Balance", image) FROM stdin;
\.


--
-- TOC entry 5039 (class 0 OID 117747)
-- Dependencies: 225
-- Data for Name: products; Type: TABLE DATA; Schema: public; Owner: postgres
--

COPY public.products (id, sku, product_name, product_code, category, brand, main_unit, sub_unit, opening_stock, sale_price, purchase_cost, product_details, image, "createdAt", "expireDate", discount, username, email) FROM stdin;
7	y35ghjh	vbcvb	cvb	Bbay World	Toy	pc	524	1452	5241.00	4250.00		upload\\1742281082806.png	2025-03-18 00:00:00	\N	\N	Mahmud	undefined
8	HOtA3uh	vbcvb	cvb	Bbay World	Toy	pc	524	1452	5241.00	4250.00		upload\\1742281083140.png	2025-03-18 00:00:00	\N	\N	Mahmud	undefined
9	BFDR9Pv	vbcvb	cvb	Bbay World	Toy	pc	524	1452	5241.00	4250.00		upload\\1742281083308.png	2025-03-18 00:00:00	\N	\N	Mahmud	undefined
10	ZHn0zIs	vbcvb	cvb	Bbay World	Toy	pc	524	1452	5241.00	4250.00		upload\\1742281083470.png	2025-03-18 00:00:00	\N	\N	Mahmud	undefined
14	sojNtuC	vbcvb	cvb	Bbay World	Toy	pc	524	1452	5241.00	4250.00		upload\\1742281084156.png	2025-03-18 00:00:00	\N	\N	Mahmud	undefined
17	Tctj7wp	vbcvb	cvb	Bbay World	Toy	pc	524	1452	5241.00	4250.00		upload\\1742281086260.png	2025-03-18 00:00:00	\N	\N	Mahmud	undefined
18	iUA9z8w	vbcvb	cvb	Bbay World	Toy	pc	524	1452	5241.00	4250.00		upload\\1742281086411.png	2025-03-18 00:00:00	\N	\N	Mahmud	undefined
19	vWxPwXz	vbcvb	cvb	Bbay World	Toy	pc	524	1452	5241.00	4250.00		upload\\1742281086556.png	2025-03-18 00:00:00	\N	\N	Mahmud	undefined
20	MHGvosw	vbcvb	cvb	Bbay World	Toy	pc	524	1452	5241.00	4250.00		upload\\1742281086704.png	2025-03-18 00:00:00	\N	\N	Mahmud	undefined
21	ZsTuz3G	vbcvb	cvb	Bbay World	Toy	pc	524	1452	5241.00	4250.00		upload\\1742281086859.png	2025-03-18 00:00:00	\N	\N	Mahmud	undefined
22	3743159	fyhjkhg	cfhj	Bbay World	Toy	pc	14	25	1200.00	1000.00	45325	upload\\1742282145030.png	2025-03-18 00:00:00	\N	\N	Mahmud	undefined
3	v3Tmo0W	tjfjh	hdgj	Bbay World	Toy	kg	563	56	5435.00	5000.00		upload\\1742205139142.png	2025-03-17 00:00:00	\N	\N	Mahmud	undefined
24	6370826			headphone				\N	\N	\N		\N	2025-03-23 00:00:00	\N	\N	Mahmud	undefined
16	GrW5Y0O	vbcvb	cvb	Bbay World	Toy	pc	524	1451	5241.00	4250.00		upload\\1742281086133.png	2025-03-18 00:00:00	\N	\N	Mahmud	undefined
6	cgGELiI	vbcvb	cvb	Bbay World	Toy	pc	524	1452	5241.00	4250.00		upload\\1742281082255.png	2025-03-18 00:00:00	\N	\N	Mahmud	undefined
5	sxgpPNZ	vbcvb	cvb	Bbay World	Toy	pc	524	1452	5241.00	4250.00		upload\\1742281081539.png	2025-03-18 00:00:00	\N	\N	Mahmud	undefined
23	4690658	hello	gd	Bbay World	Toy	pc	2500	50	200.00	150.00		upload\\1742699594723.png	2025-03-23 00:00:00	\N	\N	Mahmud	undefined
4	uczolUr	marcedies	sdfgfdh	Bbay World	Toy	pc	25	43	1200.00	848.00		upload\\1742267120810.png	2025-03-18 00:00:00	\N	\N	Mahmud	undefined
\.


--
-- TOC entry 5055 (class 0 OID 117816)
-- Dependencies: 241
-- Data for Name: purchase; Type: TABLE DATA; Schema: public; Owner: postgres
--

COPY public.purchase (id, supplier, purchase_date, pay_term, status, invoice_scheme, invoice_no, products, total, discount_type, discount_amount, order_tax, note, amount_paid, change_return, payment_date, payment_method, payment_account, payment_note, total_payable, created_at) FROM stdin;
1	rahat	2025-03-22 10:00:29.295		Completed	Default	INV-610998	"[{\\"id\\":3,\\"product_name\\":\\"tjfjh\\",\\"product_code\\":\\"hdgj\\",\\"category\\":\\"Bbay World\\",\\"brand\\":\\"Toy\\",\\"main_unit\\":\\"kg\\",\\"sub_unit\\":\\"563\\",\\"opening_stock\\":55,\\"sale_price\\":\\"5435\\",\\"purchase_cost\\":\\"5000\\",\\"product_details\\":\\"\\",\\"image\\":\\"upload\\\\\\\\1742205139142.png\\",\\"createdAt\\":\\"2025-03-17T00:00:00.000Z\\",\\"expireDate\\":null,\\"discount\\":null,\\"username\\":\\"Mahmud\\",\\"email\\":\\"undefined\\",\\"sku\\":\\"v3Tmo0W\\",\\"quantity\\":1}]"	0.00	Percentage	0.00	0.00	\N	5435.00	5435.00	2025-03-22 10:00:29.295	Cash	Cash		0.00	2025-03-22 10:01:58.043
\.


--
-- TOC entry 5053 (class 0 OID 117809)
-- Dependencies: 239
-- Data for Name: salary; Type: TABLE DATA; Schema: public; Owner: postgres
--

COPY public.salary (salary_id, employee_id, base_salary, overtime_rate, total_receivable, total_paid, total_due, action) FROM stdin;
\.


--
-- TOC entry 5051 (class 0 OID 117800)
-- Dependencies: 237
-- Data for Name: sales; Type: TABLE DATA; Schema: public; Owner: postgres
--

COPY public.sales (id, selected_customer, "selected_customer_Id", sale_date, pay_term, status, invoice_scheme, invoice_no, products, total, discount_type, discount_amount, shipping_charges, order_tax, sell_note, billing_address, shipping_address, amount_paid, change_return, payment_date, payment_method, payment_account, payment_note, shipping_note, total_payable) FROM stdin;
1	mahmud	1	2025-03-18 03:28:49.241		partial	Default	INV-969300	"[{\\"id\\":2,\\"sku\\":\\"BgTyIbc\\",\\"product_name\\":\\"Men Cotton Exclusive Embroidery Fabric Panjabi - Pink\\",\\"product_code\\":\\"5463546\\",\\"category\\":\\"Bbay World\\",\\"brand\\":\\"Toy\\",\\"main_unit\\":\\"pc\\",\\"sub_unit\\":\\"1\\",\\"opening_stock\\":50,\\"sale_price\\":\\"1790\\",\\"purchase_cost\\":\\"1197\\",\\"product_details\\":\\"Fabric Type: Regular Silk\\\\r\\\\n\\\\r\\\\n\\\\r\\\\n\\\\r\\\\nType: Regular Fit\\\\r\\\\n\\\\r\\\\n\\\\r\\\\n\\\\r\\\\nWeave: Plain weave\\\\r\\\\n\\\\r\\\\n\\\\r\\\\n\\\\r\\\\nTexture: Soft and smooth with a plain surface\\\\r\\\\n\\\\r\\\\n\\\\r\\\\n\\\\r\\\\nBreathability: Highly breathable and comfortable\\\\r\\\\n\\\\r\\\\n\\\\r\\\\n\\\\r\\\\nDurability: Durable and long-lasting\\",\\"image\\":\\"upload\\\\\\\\1742204855891.png\\",\\"createdAt\\":\\"2025-03-17T00:00:00.000Z\\",\\"expireDate\\":null,\\"discount\\":null,\\"username\\":\\"null\\",\\"email\\":\\"undefined\\",\\"quantity\\":1,\\"subtotal\\":1790}]"	1790.00	Fixed	250.00	0.00	0.00		\N	\N	1530.00	-10.00	2025-03-18 03:28:49.241	Bkash	Bkash	ddrgdfygh	\N	1540.00
2	mahmud	1	2025-03-18 03:28:49.241		partial	Default	INV-64237	"[{\\"id\\":2,\\"sku\\":\\"BgTyIbc\\",\\"product_name\\":\\"Men Cotton Exclusive Embroidery Fabric Panjabi - Pink\\",\\"product_code\\":\\"5463546\\",\\"category\\":\\"Bbay World\\",\\"brand\\":\\"Toy\\",\\"main_unit\\":\\"pc\\",\\"sub_unit\\":\\"1\\",\\"opening_stock\\":50,\\"sale_price\\":\\"1790\\",\\"purchase_cost\\":\\"1197\\",\\"product_details\\":\\"Fabric Type: Regular Silk\\\\r\\\\n\\\\r\\\\n\\\\r\\\\n\\\\r\\\\nType: Regular Fit\\\\r\\\\n\\\\r\\\\n\\\\r\\\\n\\\\r\\\\nWeave: Plain weave\\\\r\\\\n\\\\r\\\\n\\\\r\\\\n\\\\r\\\\nTexture: Soft and smooth with a plain surface\\\\r\\\\n\\\\r\\\\n\\\\r\\\\n\\\\r\\\\nBreathability: Highly breathable and comfortable\\\\r\\\\n\\\\r\\\\n\\\\r\\\\n\\\\r\\\\nDurability: Durable and long-lasting\\",\\"image\\":\\"upload\\\\\\\\1742204855891.png\\",\\"createdAt\\":\\"2025-03-17T00:00:00.000Z\\",\\"expireDate\\":null,\\"discount\\":null,\\"username\\":\\"null\\",\\"email\\":\\"undefined\\",\\"quantity\\":1,\\"subtotal\\":1790}]"	1790.00	Fixed	250.00	0.00	0.00		\N	\N	1530.00	-10.00	2025-03-18 03:28:49.241	Bkash	Bkash	ddrgdfygh	\N	1540.00
3	mahmud	1	2025-03-18 03:28:49.241		partial	Default	INV-251360	"[{\\"id\\":2,\\"sku\\":\\"BgTyIbc\\",\\"product_name\\":\\"Men Cotton Exclusive Embroidery Fabric Panjabi - Pink\\",\\"product_code\\":\\"5463546\\",\\"category\\":\\"Bbay World\\",\\"brand\\":\\"Toy\\",\\"main_unit\\":\\"pc\\",\\"sub_unit\\":\\"1\\",\\"opening_stock\\":50,\\"sale_price\\":\\"1790\\",\\"purchase_cost\\":\\"1197\\",\\"product_details\\":\\"Fabric Type: Regular Silk\\\\r\\\\n\\\\r\\\\n\\\\r\\\\n\\\\r\\\\nType: Regular Fit\\\\r\\\\n\\\\r\\\\n\\\\r\\\\n\\\\r\\\\nWeave: Plain weave\\\\r\\\\n\\\\r\\\\n\\\\r\\\\n\\\\r\\\\nTexture: Soft and smooth with a plain surface\\\\r\\\\n\\\\r\\\\n\\\\r\\\\n\\\\r\\\\nBreathability: Highly breathable and comfortable\\\\r\\\\n\\\\r\\\\n\\\\r\\\\n\\\\r\\\\nDurability: Durable and long-lasting\\",\\"image\\":\\"upload\\\\\\\\1742204855891.png\\",\\"createdAt\\":\\"2025-03-17T00:00:00.000Z\\",\\"expireDate\\":null,\\"discount\\":null,\\"username\\":\\"null\\",\\"email\\":\\"undefined\\",\\"quantity\\":1,\\"subtotal\\":1790}]"	1790.00	Fixed	250.00	0.00	0.00		\N	\N	1530.00	-10.00	2025-03-18 03:28:49.241	Bkash	Bkash	ddrgdfygh	\N	1540.00
4	mahmud	1	2025-03-18 03:28:49.241		partial	Default	INV-849242	"[{\\"id\\":2,\\"sku\\":\\"BgTyIbc\\",\\"product_name\\":\\"Men Cotton Exclusive Embroidery Fabric Panjabi - Pink\\",\\"product_code\\":\\"5463546\\",\\"category\\":\\"Bbay World\\",\\"brand\\":\\"Toy\\",\\"main_unit\\":\\"pc\\",\\"sub_unit\\":\\"1\\",\\"opening_stock\\":50,\\"sale_price\\":\\"1790\\",\\"purchase_cost\\":\\"1197\\",\\"product_details\\":\\"Fabric Type: Regular Silk\\\\r\\\\n\\\\r\\\\n\\\\r\\\\n\\\\r\\\\nType: Regular Fit\\\\r\\\\n\\\\r\\\\n\\\\r\\\\n\\\\r\\\\nWeave: Plain weave\\\\r\\\\n\\\\r\\\\n\\\\r\\\\n\\\\r\\\\nTexture: Soft and smooth with a plain surface\\\\r\\\\n\\\\r\\\\n\\\\r\\\\n\\\\r\\\\nBreathability: Highly breathable and comfortable\\\\r\\\\n\\\\r\\\\n\\\\r\\\\n\\\\r\\\\nDurability: Durable and long-lasting\\",\\"image\\":\\"upload\\\\\\\\1742204855891.png\\",\\"createdAt\\":\\"2025-03-17T00:00:00.000Z\\",\\"expireDate\\":null,\\"discount\\":null,\\"username\\":\\"null\\",\\"email\\":\\"undefined\\",\\"quantity\\":1,\\"subtotal\\":1790}]"	1790.00	Fixed	250.00	0.00	0.00		\N	\N	1530.00	-10.00	2025-03-18 03:28:49.241	Bkash	Bkash	ddrgdfygh	\N	1540.00
5	mahmud	1	2025-03-22 10:35:32.657		Returned	Default	INV-615402	"[{\\"id\\":6,\\"product_name\\":\\"vbcvb\\",\\"product_code\\":\\"cvb\\",\\"category\\":\\"Bbay World\\",\\"brand\\":\\"Toy\\",\\"main_unit\\":\\"pc\\",\\"sub_unit\\":\\"524\\",\\"opening_stock\\":1452,\\"sale_price\\":5241,\\"purchase_cost\\":4250,\\"product_details\\":\\"\\",\\"createdAt\\":\\"2025-03-18T00:00:00.000Z\\",\\"expireDate\\":null,\\"discount\\":null,\\"username\\":\\"Mahmud\\",\\"email\\":\\"undefined\\",\\"sku\\":\\"cgGELiI\\",\\"quantity\\":3,\\"subtotal\\":15723,\\"details\\":\\"\\"}]"	15723.00	Percentage	0.00	0.00	0.00		\N		15723.00	0.00	2025-03-22 10:35:32.657	Cash	Bkash			15723.00
6	mahmud	1	2025-03-23 03:30:44.72		Completed	Default	INV-914313	"[{\\"id\\":16,\\"product_name\\":\\"vbcvb\\",\\"product_code\\":\\"cvb\\",\\"category\\":\\"Bbay World\\",\\"brand\\":\\"Toy\\",\\"main_unit\\":\\"pc\\",\\"sub_unit\\":\\"524\\",\\"opening_stock\\":1452,\\"sale_price\\":5241,\\"purchase_cost\\":4250,\\"product_details\\":\\"\\",\\"createdAt\\":\\"2025-03-18T00:00:00.000Z\\",\\"expireDate\\":null,\\"discount\\":null,\\"username\\":\\"Mahmud\\",\\"email\\":\\"undefined\\",\\"sku\\":\\"GrW5Y0O\\",\\"quantity\\":1,\\"subtotal\\":5241,\\"details\\":\\"\\"}]"	5241.00	Percentage	0.00	0.00	0.00		\N		5241.00	0.00	2025-03-23 03:30:44.72	Cash	Cash			5241.00
7	mahmud	1	2025-03-23 03:40:10.635		Completed	Default	INV-359428	"[{\\"id\\":4,\\"product_name\\":\\"marcedies\\",\\"product_code\\":\\"sdfgfdh\\",\\"category\\":\\"Bbay World\\",\\"brand\\":\\"Toy\\",\\"main_unit\\":\\"pc\\",\\"sub_unit\\":\\"25\\",\\"opening_stock\\":50,\\"sale_price\\":1200,\\"purchase_cost\\":848,\\"product_details\\":\\"\\",\\"createdAt\\":\\"2025-03-18T00:00:00.000Z\\",\\"expireDate\\":null,\\"discount\\":null,\\"username\\":\\"Mahmud\\",\\"email\\":\\"undefined\\",\\"sku\\":\\"uczolUr\\",\\"quantity\\":1,\\"subtotal\\":1200,\\"details\\":\\"\\"}]"	1200.00	Percentage	0.00	0.00	0.00		\N		1200.00	0.00	2025-03-23 03:40:10.635	Cash	Cash			1200.00
8	mahmud	1	2025-03-23 03:43:28.989		Completed	Default	INV-976672	"[{\\"id\\":4,\\"product_name\\":\\"marcedies\\",\\"product_code\\":\\"sdfgfdh\\",\\"category\\":\\"Bbay World\\",\\"brand\\":\\"Toy\\",\\"main_unit\\":\\"pc\\",\\"sub_unit\\":\\"25\\",\\"opening_stock\\":49,\\"sale_price\\":1200,\\"purchase_cost\\":848,\\"product_details\\":\\"\\",\\"createdAt\\":\\"2025-03-18T00:00:00.000Z\\",\\"expireDate\\":null,\\"discount\\":null,\\"username\\":\\"Mahmud\\",\\"email\\":\\"undefined\\",\\"sku\\":\\"uczolUr\\",\\"quantity\\":1,\\"subtotal\\":1200,\\"details\\":\\"\\"}]"	1200.00	Fixed	0.00	0.00	0.00		\N		1200.00	0.00	2025-03-23 03:43:28.989	Cash	Cash			1200.00
9	mahmud	1	2025-03-23 03:45:20.952		Completed	Default	INV-489012	"[{\\"id\\":4,\\"product_name\\":\\"marcedies\\",\\"product_code\\":\\"sdfgfdh\\",\\"category\\":\\"Bbay World\\",\\"brand\\":\\"Toy\\",\\"main_unit\\":\\"pc\\",\\"sub_unit\\":\\"25\\",\\"opening_stock\\":48,\\"sale_price\\":1200,\\"purchase_cost\\":848,\\"product_details\\":\\"\\",\\"createdAt\\":\\"2025-03-18T00:00:00.000Z\\",\\"expireDate\\":null,\\"discount\\":null,\\"username\\":\\"Mahmud\\",\\"email\\":\\"undefined\\",\\"sku\\":\\"uczolUr\\",\\"quantity\\":1,\\"subtotal\\":1200,\\"details\\":\\"\\"}]"	1200.00	Percentage	0.00	0.00	0.00		\N		1200.00	0.00	2025-03-23 03:45:20.952	Cash	Cash			1200.00
\.


--
-- TOC entry 5067 (class 0 OID 117882)
-- Dependencies: 253
-- Data for Name: settings; Type: TABLE DATA; Schema: public; Owner: postgres
--

COPY public.settings (id, "companyName", phone, email, address, "invoiceLogoType", "invoiceDesign", "barcodeType", "lowStockQuantity", currency, "darkMode", logo, "createdAt", "updatedAt") FROM stdin;
\.


--
-- TOC entry 5049 (class 0 OID 117787)
-- Dependencies: 235
-- Data for Name: suppliers; Type: TABLE DATA; Schema: public; Owner: postgres
--

COPY public.suppliers (id, name, email, phone, address, opening_balance, paid, purchase_due, created_at, updated_at) FROM stdin;
1	rahat	rahat@gmail.com	01767907675	dfgsdgv  fdf	17435.00	5435.00	0.00	2025-03-22 10:00:23.549	2025-03-22 10:01:58.051
\.


--
-- TOC entry 5035 (class 0 OID 117733)
-- Dependencies: 221
-- Data for Name: units; Type: TABLE DATA; Schema: public; Owner: postgres
--

COPY public.units (id, unit, unit_value, related_to, related_sign) FROM stdin;
1	pc	1.00	pc	-
2	kg	1.00	Kg	-
\.


--
-- TOC entry 5033 (class 0 OID 117722)
-- Dependencies: 219
-- Data for Name: users; Type: TABLE DATA; Schema: public; Owner: postgres
--

COPY public.users (id, email, password, role, permissions, created_at, image, name) FROM stdin;
1	admin@example.com	1234	admin	\N	2025-03-17 15:33:56.381	\N	Mahmud
\.


--
-- TOC entry 5099 (class 0 OID 0)
-- Dependencies: 256
-- Name: Asset_id_seq; Type: SEQUENCE SET; Schema: public; Owner: postgres
--

SELECT pg_catalog.setval('public."Asset_id_seq"', 1, false);


--
-- TOC entry 5100 (class 0 OID 0)
-- Dependencies: 232
-- Name: account_history_history_id_seq; Type: SEQUENCE SET; Schema: public; Owner: postgres
--

SELECT pg_catalog.setval('public.account_history_history_id_seq', 3, true);


--
-- TOC entry 5101 (class 0 OID 0)
-- Dependencies: 230
-- Name: bank_account_id_seq; Type: SEQUENCE SET; Schema: public; Owner: postgres
--

SELECT pg_catalog.setval('public.bank_account_id_seq', 3, true);


--
-- TOC entry 5102 (class 0 OID 0)
-- Dependencies: 228
-- Name: brands_id_seq; Type: SEQUENCE SET; Schema: public; Owner: postgres
--

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


--
-- TOC entry 5103 (class 0 OID 0)
-- Dependencies: 226
-- Name: categories_id_seq; Type: SEQUENCE SET; Schema: public; Owner: postgres
--

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


--
-- TOC entry 5104 (class 0 OID 0)
-- Dependencies: 250
-- Name: customers_id_seq; Type: SEQUENCE SET; Schema: public; Owner: postgres
--

SELECT pg_catalog.setval('public.customers_id_seq', 1, true);


--
-- TOC entry 5105 (class 0 OID 0)
-- Dependencies: 248
-- Name: damages_id_seq; Type: SEQUENCE SET; Schema: public; Owner: postgres
--

SELECT pg_catalog.setval('public.damages_id_seq', 1, true);


--
-- TOC entry 5106 (class 0 OID 0)
-- Dependencies: 246
-- Name: employee_id_seq; Type: SEQUENCE SET; Schema: public; Owner: postgres
--

SELECT pg_catalog.setval('public.employee_id_seq', 1, true);


--
-- TOC entry 5107 (class 0 OID 0)
-- Dependencies: 244
-- Name: employeesalary_id_seq; Type: SEQUENCE SET; Schema: public; Owner: postgres
--

SELECT pg_catalog.setval('public.employeesalary_id_seq', 1, false);


--
-- TOC entry 5108 (class 0 OID 0)
-- Dependencies: 242
-- Name: expenses_id_seq; Type: SEQUENCE SET; Schema: public; Owner: postgres
--

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


--
-- TOC entry 5109 (class 0 OID 0)
-- Dependencies: 222
-- Name: follow_id_seq; Type: SEQUENCE SET; Schema: public; Owner: postgres
--

SELECT pg_catalog.setval('public.follow_id_seq', 1, false);


--
-- TOC entry 5110 (class 0 OID 0)
-- Dependencies: 254
-- Name: owners_id_seq; Type: SEQUENCE SET; Schema: public; Owner: postgres
--

SELECT pg_catalog.setval('public.owners_id_seq', 1, false);


--
-- TOC entry 5111 (class 0 OID 0)
-- Dependencies: 224
-- Name: products_id_seq; Type: SEQUENCE SET; Schema: public; Owner: postgres
--

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


--
-- TOC entry 5112 (class 0 OID 0)
-- Dependencies: 240
-- Name: purchase_id_seq; Type: SEQUENCE SET; Schema: public; Owner: postgres
--

SELECT pg_catalog.setval('public.purchase_id_seq', 1, true);


--
-- TOC entry 5113 (class 0 OID 0)
-- Dependencies: 238
-- Name: salary_salary_id_seq; Type: SEQUENCE SET; Schema: public; Owner: postgres
--

SELECT pg_catalog.setval('public.salary_salary_id_seq', 1, false);


--
-- TOC entry 5114 (class 0 OID 0)
-- Dependencies: 236
-- Name: sales_id_seq; Type: SEQUENCE SET; Schema: public; Owner: postgres
--

SELECT pg_catalog.setval('public.sales_id_seq', 13, true);


--
-- TOC entry 5115 (class 0 OID 0)
-- Dependencies: 252
-- Name: settings_id_seq; Type: SEQUENCE SET; Schema: public; Owner: postgres
--

SELECT pg_catalog.setval('public.settings_id_seq', 1, false);


--
-- TOC entry 5116 (class 0 OID 0)
-- Dependencies: 234
-- Name: suppliers_id_seq; Type: SEQUENCE SET; Schema: public; Owner: postgres
--

SELECT pg_catalog.setval('public.suppliers_id_seq', 1, true);


--
-- TOC entry 5117 (class 0 OID 0)
-- Dependencies: 220
-- Name: units_id_seq; Type: SEQUENCE SET; Schema: public; Owner: postgres
--

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


--
-- TOC entry 5118 (class 0 OID 0)
-- Dependencies: 218
-- Name: users_id_seq; Type: SEQUENCE SET; Schema: public; Owner: postgres
--

SELECT pg_catalog.setval('public.users_id_seq', 1, true);


--
-- TOC entry 4884 (class 2606 OID 117912)
-- Name: Asset Asset_pkey; Type: CONSTRAINT; Schema: public; Owner: postgres
--

ALTER TABLE ONLY public."Asset"
    ADD CONSTRAINT "Asset_pkey" PRIMARY KEY (id);


--
-- TOC entry 4841 (class 2606 OID 117715)
-- Name: _prisma_migrations _prisma_migrations_pkey; Type: CONSTRAINT; Schema: public; Owner: postgres
--

ALTER TABLE ONLY public._prisma_migrations
    ADD CONSTRAINT _prisma_migrations_pkey PRIMARY KEY (id);


--
-- TOC entry 4860 (class 2606 OID 117785)
-- Name: account_history account_history_pkey; Type: CONSTRAINT; Schema: public; Owner: postgres
--

ALTER TABLE ONLY public.account_history
    ADD CONSTRAINT account_history_pkey PRIMARY KEY (history_id);


--
-- TOC entry 4858 (class 2606 OID 117778)
-- Name: bank_account bank_account_pkey; Type: CONSTRAINT; Schema: public; Owner: postgres
--

ALTER TABLE ONLY public.bank_account
    ADD CONSTRAINT bank_account_pkey PRIMARY KEY (id);


--
-- TOC entry 4855 (class 2606 OID 117771)
-- Name: brands brands_pkey; Type: CONSTRAINT; Schema: public; Owner: postgres
--

ALTER TABLE ONLY public.brands
    ADD CONSTRAINT brands_pkey PRIMARY KEY (id);


--
-- TOC entry 4853 (class 2606 OID 117764)
-- Name: categories categories_pkey; Type: CONSTRAINT; Schema: public; Owner: postgres
--

ALTER TABLE ONLY public.categories
    ADD CONSTRAINT categories_pkey PRIMARY KEY (id);


--
-- TOC entry 4878 (class 2606 OID 117880)
-- Name: customers customers_pkey; Type: CONSTRAINT; Schema: public; Owner: postgres
--

ALTER TABLE ONLY public.customers
    ADD CONSTRAINT customers_pkey PRIMARY KEY (id);


--
-- TOC entry 4876 (class 2606 OID 117867)
-- Name: damages damages_pkey; Type: CONSTRAINT; Schema: public; Owner: postgres
--

ALTER TABLE ONLY public.damages
    ADD CONSTRAINT damages_pkey PRIMARY KEY (id);


--
-- TOC entry 4874 (class 2606 OID 117856)
-- Name: employee employee_pkey; Type: CONSTRAINT; Schema: public; Owner: postgres
--

ALTER TABLE ONLY public.employee
    ADD CONSTRAINT employee_pkey PRIMARY KEY (id);


--
-- TOC entry 4872 (class 2606 OID 117847)
-- Name: employeesalary employeesalary_pkey; Type: CONSTRAINT; Schema: public; Owner: postgres
--

ALTER TABLE ONLY public.employeesalary
    ADD CONSTRAINT employeesalary_pkey PRIMARY KEY (id);


--
-- TOC entry 4870 (class 2606 OID 117834)
-- Name: expenses expenses_pkey; Type: CONSTRAINT; Schema: public; Owner: postgres
--

ALTER TABLE ONLY public.expenses
    ADD CONSTRAINT expenses_pkey PRIMARY KEY (id);


--
-- TOC entry 4848 (class 2606 OID 117745)
-- Name: follow follow_pkey; Type: CONSTRAINT; Schema: public; Owner: postgres
--

ALTER TABLE ONLY public.follow
    ADD CONSTRAINT follow_pkey PRIMARY KEY (id);


--
-- TOC entry 4882 (class 2606 OID 117902)
-- Name: owners owners_pkey; Type: CONSTRAINT; Schema: public; Owner: postgres
--

ALTER TABLE ONLY public.owners
    ADD CONSTRAINT owners_pkey PRIMARY KEY (id);


--
-- TOC entry 4850 (class 2606 OID 117755)
-- Name: products products_pkey; Type: CONSTRAINT; Schema: public; Owner: postgres
--

ALTER TABLE ONLY public.products
    ADD CONSTRAINT products_pkey PRIMARY KEY (id);


--
-- TOC entry 4868 (class 2606 OID 117824)
-- Name: purchase purchase_pkey; Type: CONSTRAINT; Schema: public; Owner: postgres
--

ALTER TABLE ONLY public.purchase
    ADD CONSTRAINT purchase_pkey PRIMARY KEY (id);


--
-- TOC entry 4866 (class 2606 OID 117814)
-- Name: salary salary_pkey; Type: CONSTRAINT; Schema: public; Owner: postgres
--

ALTER TABLE ONLY public.salary
    ADD CONSTRAINT salary_pkey PRIMARY KEY (salary_id);


--
-- TOC entry 4864 (class 2606 OID 117807)
-- Name: sales sales_pkey; Type: CONSTRAINT; Schema: public; Owner: postgres
--

ALTER TABLE ONLY public.sales
    ADD CONSTRAINT sales_pkey PRIMARY KEY (id);


--
-- TOC entry 4880 (class 2606 OID 117890)
-- Name: settings settings_pkey; Type: CONSTRAINT; Schema: public; Owner: postgres
--

ALTER TABLE ONLY public.settings
    ADD CONSTRAINT settings_pkey PRIMARY KEY (id);


--
-- TOC entry 4862 (class 2606 OID 117798)
-- Name: suppliers suppliers_pkey; Type: CONSTRAINT; Schema: public; Owner: postgres
--

ALTER TABLE ONLY public.suppliers
    ADD CONSTRAINT suppliers_pkey PRIMARY KEY (id);


--
-- TOC entry 4846 (class 2606 OID 117738)
-- Name: units units_pkey; Type: CONSTRAINT; Schema: public; Owner: postgres
--

ALTER TABLE ONLY public.units
    ADD CONSTRAINT units_pkey PRIMARY KEY (id);


--
-- TOC entry 4844 (class 2606 OID 117731)
-- Name: users users_pkey; Type: CONSTRAINT; Schema: public; Owner: postgres
--

ALTER TABLE ONLY public.users
    ADD CONSTRAINT users_pkey PRIMARY KEY (id);


--
-- TOC entry 4856 (class 1259 OID 117915)
-- Name: bank_account_account_id_key; Type: INDEX; Schema: public; Owner: postgres
--

CREATE UNIQUE INDEX bank_account_account_id_key ON public.bank_account USING btree (account_id);


--
-- TOC entry 4851 (class 1259 OID 117914)
-- Name: products_sku_key; Type: INDEX; Schema: public; Owner: postgres
--

CREATE UNIQUE INDEX products_sku_key ON public.products USING btree (sku);


--
-- TOC entry 4842 (class 1259 OID 117913)
-- Name: users_email_key; Type: INDEX; Schema: public; Owner: postgres
--

CREATE UNIQUE INDEX users_email_key ON public.users USING btree (email);


--
-- TOC entry 4885 (class 2606 OID 117916)
-- Name: brands brands_category_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: postgres
--

ALTER TABLE ONLY public.brands
    ADD CONSTRAINT brands_category_id_fkey FOREIGN KEY (category_id) REFERENCES public.categories(id) ON UPDATE CASCADE ON DELETE RESTRICT;


--
-- TOC entry 5078 (class 0 OID 0)
-- Dependencies: 5
-- Name: SCHEMA public; Type: ACL; Schema: -; Owner: postgres
--

REVOKE USAGE ON SCHEMA public FROM PUBLIC;


-- Completed on 2025-03-23 12:21:54

--
--

