
SET transaction_timeout = 0;



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

CREATE TABLE public.booking_payments (
    payment_id integer NOT NULL,
    booking_id integer NOT NULL,
    amount numeric(10,2) NOT NULL,
    payment_date timestamp without time zone DEFAULT CURRENT_TIMESTAMP,
    payment_method character varying(50) DEFAULT 'Cash'::character varying,
    payment_type character varying(50) DEFAULT 'Partial'::character varying,
    remarks text,
    tenant_id integer
);


ALTER TABLE public.booking_payments OWNER TO postgres;

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

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


ALTER SEQUENCE public.booking_payments_payment_id_seq OWNER TO postgres;

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

ALTER SEQUENCE public.booking_payments_payment_id_seq OWNED BY public.booking_payments.payment_id;


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

CREATE TABLE public.bookings (
    booking_id integer NOT NULL,
    cus_id character varying(100),
    car_id integer,
    status character varying(20) DEFAULT 'pending'::character varying,
    booking_mode character varying(50),
    start_date timestamp without time zone,
    end_date timestamp without time zone,
    base_price numeric,
    discount_code character varying(50),
    discount_percent numeric(5,2) DEFAULT 0,
    discount_amount numeric(10,2) DEFAULT 0,
    total_price numeric(10,2),
    starting_kms numeric,
    fuel_level character varying(20),
    notes text,
    created_at timestamp without time zone DEFAULT CURRENT_TIMESTAMP,
    booking_date timestamp without time zone DEFAULT CURRENT_DATE,
    tax_amount numeric(10,2) DEFAULT 0.00,
    advance_paid numeric(10,2) DEFAULT 0.00,
    payment_type character varying(50),
    payment_status character varying(50),
    car_images text,
    car_videos text,
    deposit numeric(10,2),
    deposit_remarks text,
    advance_remarks text,
    invoice_remarks text,
    ending_kms character varying(255),
    return_fuel_level character varying(50),
    cleaning_charges numeric(10,2) DEFAULT 0,
    damage_charges numeric(10,2) DEFAULT 0,
    excess_km_charges numeric(10,2) DEFAULT 0,
    salik_charges numeric(10,2) DEFAULT 0,
    additional_charges jsonb DEFAULT '[]'::jsonb,
    pickup_location character varying(255),
    drop_location character varying(255),
    payment_date character varying,
    amount_collected numeric DEFAULT 0,
    payment_history text,
    trip_package character varying(50),
    section_charges jsonb DEFAULT '[]'::jsonb,
    tenant_id integer
);


ALTER TABLE public.bookings OWNER TO postgres;

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

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


ALTER SEQUENCE public.bookings_booking_d_seq OWNER TO postgres;

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

ALTER SEQUENCE public.bookings_booking_d_seq OWNED BY public.bookings.booking_id;


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

CREATE TABLE public.cars (
    id integer NOT NULL,
    brand character varying(50) NOT NULL,
    model character varying(50) NOT NULL,
    year integer NOT NULL,
    image_url text,
    description text,
    status character varying(20) DEFAULT 'available'::character varying,
    insurance character varying(255),
    owner character varying(255),
    kilometers integer,
    car_mulkiya_id character varying(100),
    maintenance_company character varying(255),
    maintenance_start_date date,
    maintenance_end_date date,
    created_at timestamp without time zone DEFAULT CURRENT_TIMESTAMP,
    rental_options jsonb DEFAULT '[]'::jsonb,
    current_km numeric(10,2) DEFAULT 0,
    current_fuel character varying(50) DEFAULT 'Full Tank'::character varying,
    start_date_of_insurance date,
    end_date_of_insurance date,
    start_date_of_mulkiya date,
    end_date_of_mulkiya date,
    last_battery_change date,
    last_oil_change_km integer,
    oil_change_interval integer,
    tenant_id integer,
    plate_number character varying(50),
    plate_category character varying(50),
    city character varying(100)
);


ALTER TABLE public.cars OWNER TO postgres;

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

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


ALTER SEQUENCE public.cars_id_seq OWNER TO postgres;

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

ALTER SEQUENCE public.cars_id_seq OWNED BY public.cars.id;


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

CREATE TABLE public.country_master (
    country_id integer NOT NULL,
    name character varying(100) NOT NULL,
    nationality character varying(100)
);


ALTER TABLE public.country_master OWNER TO postgres;

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

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


ALTER SEQUENCE public.country_master_country_id_seq OWNER TO postgres;

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

ALTER SEQUENCE public.country_master_country_id_seq OWNED BY public.country_master.country_id;


--
-- TOC entry 227 (class 1259 OID 58094)
-- Name: customer_seq; Type: SEQUENCE; Schema: public; Owner: postgres
--

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


ALTER SEQUENCE public.customer_seq OWNER TO postgres;

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

CREATE TABLE public.customers (
    cus_id character varying(10) DEFAULT ('C-'::text || lpad((nextval('public.customer_seq'::regclass))::text, 5, '0'::text)) NOT NULL,
    full_name character varying(100) NOT NULL,
    dob timestamp without time zone,
    gender character varying(20),
    mobile character varying(15),
    email character varying(100),
    nationality character varying(50),
    occupation character varying(100),
    house_no character varying(50),
    street_name character varying(100),
    area character varying(100),
    city character varying(100),
    district character varying(100),
    state character varying(100),
    pincode character varying(10),
    license_number character varying(50),
    license_issued_date timestamp without time zone,
    license_expiry_date timestamp without time zone,
    license_state character varying(100),
    license_file character varying(255),
    id_type character varying(50),
    id_number character varying(100),
    id_file character varying(255),
    created_at timestamp without time zone DEFAULT CURRENT_TIMESTAMP,
    license_country character varying(50),
    country_id integer,
    tenant_id integer
);


ALTER TABLE public.customers OWNER TO postgres;

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

CREATE TABLE public.rental_bookings (
    booking_id integer NOT NULL,
    cus_id character varying(50),
    vehicle character varying(100),
    pickup_location character varying(100),
    pickup_date timestamp without time zone,
    return_date timestamp without time zone,
    booking_mode character varying(50),
    rent_per_day numeric(10,2),
    advance numeric(10,2),
    deposit numeric(10,2),
    total_amount numeric(10,2),
    created_at timestamp without time zone DEFAULT CURRENT_TIMESTAMP,
    car_images json,
    notes character varying(60),
    startingkms numeric DEFAULT 0,
    fuellevel character varying(20),
    kmrate numeric DEFAULT 0,
    tenant_id integer
);


ALTER TABLE public.rental_bookings OWNER TO postgres;

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

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


ALTER SEQUENCE public.rental_bookings_booking_id_seq OWNER TO postgres;

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

ALTER SEQUENCE public.rental_bookings_booking_id_seq OWNED BY public.rental_bookings.booking_id;

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

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


ALTER SEQUENCE public.tenant_tenant_id_seq OWNER TO postgres;

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

ALTER SEQUENCE public.tenant_tenant_id_seq OWNED BY public.tenant.tenant_id;


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

CREATE TABLE public.tenants (
    tenant_id bigint NOT NULL,
    name character varying(255) NOT NULL,
    email character varying(255),
    phone character varying(50),
    address text,
    subscription_type character varying(50) DEFAULT 'basic'::character varying,
    subscription_expiry date DEFAULT CURRENT_TIMESTAMP,
    is_active boolean DEFAULT true,
    created_at timestamp without time zone DEFAULT CURRENT_TIMESTAMP,
    updated_at timestamp without time zone DEFAULT CURRENT_TIMESTAMP,
    owner_name character varying(100)
);


ALTER TABLE public.tenants OWNER TO postgres;

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

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


ALTER SEQUENCE public.tenants_tenant_id_seq OWNER TO postgres;

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

ALTER SEQUENCE public.tenants_tenant_id_seq OWNED BY public.tenants.tenant_id;

--
-- TOC entry 236 (class 1259 OID 58148)
-- 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 5148 (class 0 OID 0)
-- Dependencies: 236
-- 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 4896 (class 2604 OID 58149)
-- Name: booking_payments payment_id; Type: DEFAULT; Schema: public; Owner: postgres
--

ALTER TABLE ONLY public.booking_payments ALTER COLUMN payment_id SET DEFAULT nextval('public.booking_payments_payment_id_seq'::regclass);


--
-- TOC entry 4900 (class 2604 OID 58150)
-- Name: bookings booking_id; Type: DEFAULT; Schema: public; Owner: postgres
--

ALTER TABLE ONLY public.bookings ALTER COLUMN booking_id SET DEFAULT nextval('public.bookings_booking_d_seq'::regclass);


--
-- TOC entry 4915 (class 2604 OID 58151)
-- Name: cars id; Type: DEFAULT; Schema: public; Owner: postgres
--

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


--
-- TOC entry 4921 (class 2604 OID 58152)
-- Name: country_master country_id; Type: DEFAULT; Schema: public; Owner: postgres
--

ALTER TABLE ONLY public.country_master ALTER COLUMN country_id SET DEFAULT nextval('public.country_master_country_id_seq'::regclass);


--
-- TOC entry 4924 (class 2604 OID 58153)
-- Name: rental_bookings booking_id; Type: DEFAULT; Schema: public; Owner: postgres
--

ALTER TABLE ONLY public.rental_bookings ALTER COLUMN booking_id SET DEFAULT nextval('public.rental_bookings_booking_id_seq'::regclass);


--
-- TOC entry 4931 (class 2604 OID 58155)
-- Name: tenants tenant_id; Type: DEFAULT; Schema: public; Owner: postgres
--

ALTER TABLE ONLY public.tenants ALTER COLUMN tenant_id SET DEFAULT nextval('public.tenants_tenant_id_seq'::regclass);


--
-- TOC entry 5118 (class 0 OID 58040)
-- Dependencies: 219
-- Data for Name: booking_payments; Type: TABLE DATA; Schema: public; Owner: postgres
--

COPY public.booking_payments (payment_id, booking_id, amount, payment_date, payment_method, payment_type, remarks, tenant_id) FROM stdin;
1	22	500.00	2026-03-16 09:08:01.291971	Cash	Advance	Advance Payment	1
2	18	50.00	2026-03-13 11:04:23.906735	Cash	Advance	Advance Payment	1
3	29	501.00	2026-03-16 18:28:32.738781	Cash	Advance	Advance Payment	1
4	20	50.00	2026-03-13 18:33:50.544549	Cash	Advance	Advance Payment	2
5	23	500.00	2026-03-16 10:06:45.566476	Cash	Advance	Advance Payment	2
6	25	499.00	2026-03-16 14:30:22.963471	Cash	Advance	Advance Payment	2
7	15	100.00	2026-03-13 10:48:08.281332	Cash	Advance	Advance Payment	3
8	26	50.00	2026-03-16 15:23:51.506514	Cash	Advance	Advance Payment	3
9	21	100.00	2026-03-13 18:58:15.529554	Cash	Advance	Advance Payment	3
10	32	100.00	2026-03-16 19:26:45.758485	Cash	Advance	Advance Payment	3
11	35	500.00	2026-03-17 07:07:18.144214	Cash	Advance	Advance Payment	1
12	38	100.00	2026-03-17 18:48:55.683105	Cash	Advance	Advance Payment	1
13	37	100.00	2026-03-17 14:38:13.229536	Cash	Advance	Advance Payment	1
14	39	300.00	2026-03-25 09:37:05.076011	Cash	Advance	Advance Payment	2
15	19	100.00	2026-03-13 11:27:22.108537	Cash	Advance	Advance Payment	2
16	40	500.00	2026-03-30 12:31:09.793922	Cash	Advance	Advance Payment	2
17	42	500.00	2026-03-30 14:33:53.837986	Cash	Advance	Advance Payment	3
18	46	600.00	2026-03-31 18:22:43.60225	Cash	Advance	Advance Payment	3
19	44	1000.00	2026-07-11 10:20:04.412	Cash	Partial	Partial Payment	3
20	44	2000.00	2026-07-11 10:20:15.545	Cash	Partial	Partial Payment	3
\.


--
-- TOC entry 5120 (class 0 OID 58052)
-- Dependencies: 221
-- Data for Name: bookings; Type: TABLE DATA; Schema: public; Owner: postgres
--

COPY public.bookings (booking_id, cus_id, car_id, status, booking_mode, start_date, end_date, base_price, discount_code, discount_percent, discount_amount, total_price, starting_kms, fuel_level, notes, created_at, booking_date, tax_amount, advance_paid, payment_type, payment_status, car_images, car_videos, deposit, deposit_remarks, advance_remarks, invoice_remarks, ending_kms, return_fuel_level, cleaning_charges, damage_charges, excess_km_charges, salik_charges, additional_charges, pickup_location, drop_location, payment_date, amount_collected, payment_history, trip_package, section_charges, tenant_id) FROM stdin;
22	C-00016	1	confirmed	Per Day - 500 KM - ₹1000	2026-03-12 00:00:00	2026-03-16 00:00:00	1000.00		0.00	0.00	1000.00	50	50%		2026-03-16 09:08:01.291971	2026-03-16 00:00:00	0.00	500.00	Cash	Unpaid	["[","\\"","c","a","r","_","1","7","7","3","6","3","2","3","3","3","6","9","0",".","j","p","g","\\"",",","\\"","c","a","r","_","1","7","7","3","6","3","2","3","3","3","6","9","1",".","j","p","g","\\"",",","\\"","c","a","r","_","1","7","7","3","6","3","2","3","3","3","6","9","2",".","j","p","g","\\"","]","img_1773655454972.jpg"]	["vid_1773655454973.webm"]	0.00	\N	\N	\N	\N	\N	0.00	0.00	0.00	0.00	[]	\N	\N	\N	0	\N	\N	[]	2
27	C-00017	6	confirmed	Per Hour - 250 KM - ₹150	2026-03-01 00:00:00	2026-03-05 00:00:00	150.00	\N	0.00	0.00	150.00	50	25%		2026-03-16 16:41:27.900661	2026-03-16 00:00:00	0.00	0.00	Cash	Unpaid	{"/uploads/img_1773659487225.jpg"}	{"/uploads/vid_1773659487229.webm"}	1000.00	\N	\N	\N	\N	\N	0.00	0.00	0.00	0.00	[]	\N	\N	\N	0	\N	\N	[]	2
29	C-00002	2	confirmed	Per Hour - 100 KM - ₹200	2026-03-09 00:00:00	2026-03-11 00:00:00	200.00		0.00	0.00	200.00	90	25%		2026-03-16 18:28:32.738781	2026-03-16 00:00:00	0.00	501.00	Cash	Unpaid	["img_1773665912254.jpg"]	[]	1000.00	\N	\N	\N	\N	\N	0.00	0.00	0.00	0.00	[]	\N	\N	\N	0	\N	\N	[]	2
20	C-00001	5	confirmed	Per Day - 250 KM - ₹150	2026-03-11 00:00:00	2026-03-18 00:00:00	150.00		0.00	0.00	150.00	30	50%		2026-03-13 18:33:50.544549	2026-03-13 00:00:00	0.00	50.00	Cash	Unpaid	\N	\N	\N	\N	\N	\N	\N	\N	0.00	0.00	0.00	0.00	[]	\N	\N	\N	0	\N	\N	[]	2
30	C-00014	2	confirmed	Per Hour - 100 KM - ₹200	2026-03-12 00:00:00	2026-03-16 00:00:00	200.00		0.00	0.00	200.00	50	25%	left side	2026-03-16 19:03:40.773218	2026-03-16 00:00:00	0.00	0.00	Cash	Unpaid	["img_1773668020178.jpg"]	["vid_1773668020204.webm"]	1000.00	\N	\N	\N	\N	\N	0.00	0.00	0.00	0.00	[]	\N	\N	\N	0	\N	\N	[]	2
23	C-00002	1	confirmed	Per Day - 500 KM - ₹1000	2026-03-15 00:00:00	2026-03-18 00:00:00	1000.00	\N	0.00	0.00	1000.00	12	50%		2026-03-16 10:06:45.566476	2026-03-16 00:00:00	0.00	500.00	Cash	Unpaid	[]	["vid_1773635877568.webm","vid_1773635877574.webm"]	\N	\N	\N	\N	\N	\N	0.00	0.00	0.00	0.00	[]	\N	\N	\N	0	\N	\N	[]	2
25	C-00014	2	confirmed	Per Hour - 100 KM - ₹200	2026-03-13 00:00:00	2026-03-16 00:00:00	200.00	\N	0.00	0.00	200.00	50	50%	top 	2026-03-16 14:30:22.963471	2026-03-16 00:00:00	0.00	499.00	Cash	Unpaid	["img_1773652050825.jpg","img_1773652050825.jpg"]	["vid_1773652050826.webm"]	1000.00	\N	\N	\N	\N	\N	0.00	0.00	0.00	0.00	[]	\N	\N	\N	0	\N	\N	[]	2
26	C-00014	2	confirmed	Per Hour - 100 KM - ₹200	2026-03-10 00:00:00	2026-03-18 00:00:00	200.00	\N	0.00	0.00	200.00	20	25%		2026-03-16 15:23:51.506514	2026-03-16 00:00:00	0.00	50.00	Cash	Unpaid	["img_1773654831042.jpg"]	["vid_1773654831043.webm"]	1000.00	\N	\N	\N	\N	\N	0.00	0.00	0.00	0.00	[]	\N	\N	\N	0	\N	\N	[]	2
28	C-00016	1	confirmed	Per Day - 500 KM - ₹1000	2026-03-09 00:00:00	2026-03-15 00:00:00	1000.00	\N	0.00	0.00	1000.00	30	25%		2026-03-16 17:42:06.178007	2026-03-16 00:00:00	0.00	0.00	Cash	Unpaid	["img_1773663125602.jpg"]	["vid_1773663125608.webm"]	500.00	\N	\N	\N	\N	\N	0.00	0.00	0.00	0.00	[]	\N	\N	\N	0	\N	\N	[]	2
31		2	confirmed	Per Hour - 100 KM - ₹200	2026-03-01 00:00:00	2026-03-03 00:00:00	200.00		0.00	0.00	200.00	30	25%		2026-03-16 19:21:03.42903	2026-03-16 00:00:00	0.00	0.00	Cash	Unpaid	["img_1773669277529.jpg","img_1773669277530.jpg"]	[]	1000.00	\N	\N	\N	\N	\N	0.00	0.00	0.00	0.00	[]	\N	\N	\N	0	\N	\N	[]	2
2	C-00006	6	confirmed	Per Hour	2026-03-09 00:00:00	2026-03-11 00:00:00	148.00	23434	0.00	0.00	148.00	20	Empty	left side	2026-03-09 13:52:15.966743	2026-03-13 00:00:00	0.00	0.00	\N	\N	\N	\N	\N	\N	\N	\N	\N	\N	0.00	0.00	0.00	0.00	[]	\N	\N	\N	0	\N	\N	[]	1
18	C-00002	5	confirmed	Per Hour - 100 KM - ₹250	2026-03-13 00:00:00	2026-03-18 00:00:00	250.00		0.00	0.00	250.00	12	50%	left side	2026-03-13 11:04:23.906735	2026-03-13 00:00:00	0.00	50.00	Cash	Unpaid	\N	\N	\N	\N	\N	\N	\N	\N	0.00	0.00	0.00	0.00	[]	\N	\N	\N	0	\N	\N	[]	1
3	C-00004	3	confirmed	Per Hour - undefined KM - ₹400	2026-03-09 00:00:00	2026-03-11 00:00:00	400.00		0.00	0.00	400.00	30	1/2 Tank		2026-03-09 14:38:12.15429	2026-03-13 00:00:00	0.00	0.00	\N	\N	\N	\N	\N	\N	\N	\N	\N	\N	0.00	0.00	0.00	0.00	[]	\N	\N	\N	0	\N	\N	[]	1
4	C-00009	3	confirmed	Per Hour - undefined KM - ₹400	2026-03-10 00:00:00	2026-03-12 00:00:00	400.00		0.00	0.00	400.00	30	1/2 Tank		2026-03-09 14:41:51.279396	2026-03-13 00:00:00	0.00	0.00	\N	\N	\N	\N	\N	\N	\N	\N	\N	\N	0.00	0.00	0.00	0.00	[]	\N	\N	\N	0	\N	\N	[]	1
5	C-00009	3	confirmed	Per Hour - undefined KM - ₹400	2026-03-10 00:00:00	2026-03-12 00:00:00	400.00		0.00	0.00	400.00	30	1/2 Tank		2026-03-09 14:42:32.034815	2026-03-13 00:00:00	0.00	0.00	\N	\N	\N	\N	\N	\N	\N	\N	\N	\N	0.00	0.00	0.00	0.00	[]	\N	\N	\N	0	\N	\N	[]	1
6	C-00009	3	confirmed	Per Hour - undefined KM - ₹400	2026-03-10 00:00:00	2026-03-12 00:00:00	400.00		0.00	0.00	400.00	30	1/2 Tank		2026-03-09 14:43:33.548587	2026-03-13 00:00:00	0.00	0.00	\N	\N	\N	\N	\N	\N	\N	\N	\N	\N	0.00	0.00	0.00	0.00	[]	\N	\N	\N	0	\N	\N	[]	1
8	C-00015	6	confirmed	Per Hour	2026-03-10 00:00:00	2026-03-12 00:00:00	148.00		0.00	0.00	148.00	50	1/2 Tank	right side	2026-03-10 11:18:57.360159	2026-03-13 00:00:00	0.00	0.00	\N	\N	\N	\N	\N	\N	\N	\N	\N	\N	0.00	0.00	0.00	0.00	[]	\N	\N	\N	0	\N	\N	[]	1
36	C-00017	6	completed	Per Hour - 250 KM - ₹150	2026-03-10 00:00:00	2026-03-13 00:00:00	150.00		0.00	0.00	150.00	100	25%		2026-03-17 14:02:36.528349	2026-03-17 00:00:00	0.00	0.00	Cash	Unpaid	["img_1773736356030.jpg"]	["vid_1773736356032.webm"]	1000.00				\N	\N	0.00	0.00	0.00	0.00	[]	\N	\N	\N	0	\N	\N	[]	3
1	C-00002	6	completed	Per Hour	2026-03-09 00:00:00	2026-03-11 00:00:00	148.00	123	0.00	0.00	148.00	10	1/2 Tank	left side	2026-03-09 13:46:16.752499	2026-03-13 00:00:00	0.00	0.00	\N	\N	\N	\N	\N	\N	\N	\N	\N	\N	0.00	0.00	0.00	0.00	[]	\N	\N	\N	0	\N	\N	[]	1
10	C-00014	2	completed	Per Hour	2026-03-02 00:00:00	2026-03-10 00:00:00	200.00		0.00	0.00	200.00	12	1/2 Tank	top	2026-03-10 15:57:11.005415	2026-03-13 00:00:00	0.00	0.00	\N	\N	\N	\N	\N	\N	\N	\N	\N	\N	0.00	0.00	0.00	0.00	[]	\N	\N	\N	0	\N	\N	[]	1
11	C-00014	2	completed	Per Hour	2026-03-02 00:00:00	2026-03-10 00:00:00	200.00		0.00	0.00	200.00	12	1/2 Tank	top	2026-03-10 16:07:39.592648	2026-03-13 00:00:00	0.00	0.00	\N	\N	\N	\N	\N	\N	\N	\N	\N	\N	0.00	0.00	0.00	0.00	[]	\N	\N	\N	0	\N	\N	[]	1
14	C-00002	6	On-Trip	Per Day - 300 KM - ₹250	2026-03-18 00:00:00	2026-03-19 00:00:00	250.00		0.00	0.00	250.00	50	1/2 Tank		2026-03-10 16:16:17.312223	2026-03-13 00:00:00	0.00	0.00	\N	\N	\N	\N	\N	\N	\N	\N	\N	\N	0.00	0.00	0.00	0.00	[]	\N	\N	\N	0	\N	\N	[]	1
15	C-00017	3	confirmed	Per Hour - 310 KM - ₹400	2026-03-13 00:00:00	2026-03-14 00:00:00	400.00		0.00	0.00	400.00	50	25%	2 scratches	2026-03-13 10:48:08.281332	2026-03-13 00:00:00	0.00	100.00	Cash	Unpaid	\N	\N	\N	\N	\N	\N	\N	\N	0.00	0.00	0.00	0.00	[]	\N	\N	\N	0	\N	\N	[]	1
16	C-00019	6	returned	Per Hour - 250 KM - ₹150	2026-03-13 00:00:00	2026-03-17 00:00:00	150.00		0.00	0.00	150.00	30	25%	left side	2026-03-13 10:54:46.023011	2026-03-14 00:00:00	0.00	0.00	Cash	Unpaid	[]	[]	0.00				\N	\N	0.00	0.00	0.00	0.00	[]	\N	\N	\N	0	\N	\N	[]	1
17	C-00026	6	confirmed	Per Day - 300 KM - ₹250	2026-03-14 00:00:00	2026-03-16 00:00:00	150.00		0.00	0.00	150.00	30	25%		2026-03-13 11:01:46.40096	2026-03-13 00:00:00	0.00	0.00	Cash	Unpaid	["img_1773837286010.jpg"]	["vid_1773837286018.webm","vid_1773839923265.webm"]	1000.00		ggdfdfd		\N	\N	0.00	0.00	0.00	0.00	[]	\N	\N	\N	0	\N	\N	[]	1
19	C-00020	5	confirmed	Per Hour - 100 KM - ₹250	2026-03-19 05:04:00	2026-03-23 06:00:00	250.00		0.00	0.00	275.00	70	25%	left side	2026-03-13 11:27:22.108537	2026-03-13 02:00:00	10.00	100.00	Cash	Unpaid	[]	[]	1000.00						0.00	0.00	0.00	0.00	[]	\N	\N	\N	0	\N	\N	[]	1
21	C-00017	5	confirmed	Per Hour - 100 KM - ₹250	2026-03-13 00:00:00	2026-03-18 00:00:00	250.00		0.00	0.00	262.50	12	75%		2026-03-13 18:58:15.529554	2026-03-13 00:00:00	5.00	100.00	Cash	Unpaid	[]	[]	1000.00				\N	\N	0.00	0.00	0.00	0.00	[]	\N	\N	\N	0	\N	\N	[]	2
32	C-00010	2	On-Trip	Per Hour - 100 KM - ₹200	2026-03-14 00:00:00	2026-03-18 00:00:00	200.00		0.00	0.00	200.00	30	25%	left	2026-03-16 19:26:45.758485	2026-03-16 00:00:00	0.00	100.00	Cash	Unpaid	["img_1773669414783.jpg","img_1773669414783.jpg"]	[]	1000.00				\N	\N	0.00	0.00	0.00	0.00	[]	\N	\N	\N	0	\N	\N	[]	2
33	C-00030	5	confirmed	Per Hour - 100 KM - ₹250	2026-03-10 00:00:00	2026-03-15 00:00:00	250.00		0.00	0.00	250.00	30	50%		2026-03-17 06:05:48.024293	2026-03-17 00:00:00	0.00	0.00	Cash	Unpaid	["[","\\"","[","\\"",",","\\"","\\\\","\\"","\\"",",","\\"","i","\\"",",","\\"","m","\\"",",","\\"","g","\\"",",","\\"","_","\\"",",","\\"","1","\\"",",","\\"","7","\\"",",","\\"","7","\\"",",","\\"","3","\\"",",","\\"","7","\\"",",","\\"","0","\\"",",","\\"","7","\\"",",","\\"","7","\\"",",","\\"","8","\\"",",","\\"","5","\\"",",","\\"","1","\\"",",","\\"","8","\\"",",","\\"","8","\\"",",","\\"",".","\\"",",","\\"","j","\\"",",","\\"","p","\\"",",","\\"","g","\\"",",","\\"","\\\\","\\"","\\"",",","\\"","]","\\"",",","\\"","i","m","g","_","1","7","7","3","7","0","8","0","7","6","5","2","5",".","j","p","g","\\"","]","img_1773708366606.jpg","img_1773708366607.jpg","img_1773708640694.jpg"]	["\\"","[","\\\\","\\"","v","i","d","_","1","7","7","3","7","0","7","7","8","5","1","8","9",".","w","e","b","m","\\\\","\\"",",","\\\\","\\"","v","i","d","_","1","7","7","3","7","0","7","7","8","5","3","4","0",".","w","e","b","m","\\\\","\\"","]","\\"","vid_1773708366607.webm","vid_1773708367090.webm","vid_1773708640694.webm"]	1000.00	\N	\N	\N	\N	\N	0.00	0.00	0.00	0.00	[]	\N	\N	\N	0	\N	\N	[]	2
35	C-00002	2	on_trip	Per Hour - 100 KM - ₹200	2026-03-13 00:00:00	2026-03-17 00:00:00	200.00		0.00	0.00	200.00	50	25%		2026-03-17 07:07:18.144214	2026-03-17 00:00:00	0.00	500.00	Cash	Unpaid	["img_1773711437607.jpg"]	["vid_1773711437609.webm"]	1000.00	\N	\N	\N	\N	\N	0.00	0.00	0.00	0.00	[]	\N	\N	\N	0	\N	\N	[]	2
34	C-00002	1	on_trip	Per Day - 500 KM - ₹1000	2026-03-11 00:00:00	2026-03-17 00:00:00	1000.00		0.00	0.00	1000.00	30	25%		2026-03-17 06:23:19.731631	2026-03-17 00:00:00	0.00	0.00	Cash	Unpaid	["img_1773708799223.jpg","img_1773708799224.jpg","img_1773708834485.jpg","img_1773714559309.jpg"]	["vid_1773708799224.webm","vid_1773708817124.webm","vid_1773714559309.webm"]	1000.00	\N	\N	\N	\N	\N	0.00	0.00	0.00	0.00	[]	\N	\N	\N	0	\N	\N	[]	2
38	C-00014	2	confirmed	Per Hour - 100 KM - ₹200	2026-03-11 00:00:00	2026-03-13 00:00:00	200.00		0.00	0.00	200.00	30	50%		2026-03-17 18:48:55.683105	2026-03-17 00:00:00	0.00	100.00	Cash	Unpaid	["img_1773753534990.jpg","img_1773753557113.jpg"]	["vid_1773753535009.webm"]	1000.00				\N	\N	0.00	0.00	0.00	0.00	[]	\N	\N	\N	0	\N	\N	[]	3
37	C-00016	2	confirmed	Per Hour - 100 KM - ₹200	2026-03-19 00:00:00	2026-03-23 00:00:00	200.00		0.00	0.00	200.00	90	25%	2 scratches	2026-03-17 14:38:13.229536	2026-03-17 00:00:00	0.00	100.00	Cash	Unpaid	["img_1773738492737.jpg","img_1773738769358.jpg"]	["vid_1773738492740.webm","vid_1773738769359.webm"]	1000.00	good	dgf	fdf	\N	\N	0.00	0.00	0.00	0.00	[]	\N	\N	\N	0	\N	\N	[]	3
39	C-00017	6	confirmed	Per Hour - 250 KM - ₹150	2026-03-11 02:00:00	2026-03-26 03:00:00	150.00		0.00	0.00	150.00	60	25%	fd	2026-03-25 09:37:05.076011	2026-03-26 07:01:00	0.00	300.00	Cash	Unpaid	["img_1774411624336.jpg","img_1774411624362.jpg"]	["vid_1774507247565.webm"]	1000.00	gfgfd	sdd	dffd	70	50%	0.00	0.00	0.00	0.00	[]	\N	\N	\N	0	\N	\N	[]	3
40	C-00017	6	confirmed	Per Hour - 290 KM - ₹148	2026-03-23 06:59:00	2026-04-27 06:59:00	75.00		0.00	0.00	2825.00	30	50%	ff	2026-03-30 12:31:09.793922	2026-03-30 06:59:00	0.00	500.00	Cash	Unpaid	["img_1774854069265.jpg","img_1774854069270.jpg"]	["vid_1774858799820.webm"]	1000.00	ggd	gdd	d	70	50%	80.00	50.00	50.00	20.00	[]	\N	\N	\N	0	\N	\N	[]	3
50	NaN	\N	confirmed		2026-07-07 00:00:00	2026-07-24 00:00:00	80	\N	0.00	0.00	1428.00	\N	Full Tank	\N	2026-07-19 23:35:28.766991	2026-07-18 00:00:00	5.00	0.00	Cash	Unpaid	[]	[]	1000.00	\N	\N	\N	120	Full Tank	0.00	0.00	0.00	0.00	"[[]]"	Erode	chennai	\N	0	\N	Weekly	[{"salik": 0, "damage": 0, "cleaning": 0, "excess_km": 0}, {"salik": 0, "damage": 0, "cleaning": 0, "excess_km": 0}]	3
41	C-00017	7	completed	Per Hour - 60 KM - ₹698	2026-03-09 02:43:00	2026-04-09 02:43:00	698.00		0.00	0.00	21638.00	30	7/8		2026-03-30 13:44:24.11331	2026-04-01 02:43:00	0.00	0.00	Cash	Partially Paid	["img_1774858463594.jpg","img_1774858463596.jpg"]	["vid_1774858463597.webm"]	1000.00	ytty	h	jj	200	1/8	0.00	0.00	0.00	0.00	"[[],[]]"			2026-07-18T12:21:53.705Z	12000	[{"date":"2026-07-13T11:29:17.420Z","type":"Partial","description":"Partial Payment","amount":1000,"mode":"Cash"},{"date":"2026-07-13T12:33:26.105Z","type":"Partial","description":"Partial Payment","amount":1000,"mode":"Cash"},{"date":"2026-07-18T12:21:53.705Z","type":"Partial","description":"Partial Payment","amount":10000,"mode":"Cash"}]	Weekly	[{"salik": 0, "damage": 0, "cleaning": 0, "excess_km": 0}, {"salik": 0, "damage": 0, "cleaning": 0, "excess_km": 0}]	3
45	C-00017	7	cancelled		2026-03-30 20:27:00	2026-05-07 20:27:00	50		0.00	0.00	1995.00	200.00	1/8		2026-03-31 12:58:18.27354	2026-03-30 20:27:00	5.00	0.00	Cash	Paid	["img_1774942097682.jpg","img_1774942097688.jpg"]	["vid_1774942097688.webm"]	1000.00						0.00	0.00	0.00	0.00	"[[],[]]"			\N	1995	[{"date":"2026-07-11T10:47:37.885Z","type":"Final","description":"Settlement Payment","amount":995,"mode":"Cash"}]	Weekly	[{"salik": 0, "damage": 0, "cleaning": 0, "excess_km": 0}, {"salik": 0, "damage": 0, "cleaning": 0, "excess_km": 0}]	3
42	C-00031	8	confirmed	Per Hour - 70 KM - ₹600	2026-03-27 22:33:00	2026-06-02 09:33:00	65		0.00	0.00	4811.00	60.00	3/4		2026-03-30 14:33:53.837986	2026-03-28 22:33:00	0.00	0.00	Cash	Paid	["img_1774924082841.jpg","img_1774924082876.jpg"]	["vid_1774924082877.webm","vid_1774924082882.webm"]	0.00				80	1/2	456.00	0.00	0.00	0.00	"[[],[],[]]"			\N	4698.75	\N	Weekly	[{"salik": 0, "damage": 0, "cleaning": 0, "excess_km": 0}, {"salik": 0, "damage": 0, "cleaning": 456, "excess_km": 0}, {"salik": 0, "damage": 0, "cleaning": 0, "excess_km": 0}]	3
46	C-00014	9	completed		2026-03-28 13:22:00	2026-05-18 13:22:00	80		0.00	0.00	4347.00	50.00	Empty		2026-03-31 18:22:43.60225	2026-03-28 13:22:00	5.00	600.00	Cash	Partially Paid	["img_1784546646757.jpg"]	["vid_1784544456516.webm"]	1000.00	hff			200	3/4	0.00	0.00	0.00	0.00	"[[{\\"name\\":\\"pickup\\",\\"amount\\":20},{\\"name\\":\\"drop\\",\\"amount\\":30},{\\"name\\":\\"new \\",\\"amount\\":10}],[]]"	chennai	salem	\N	2600	\N	Weekly	[{"salik": 0, "damage": 0, "cleaning": 0, "excess_km": 0}, {"salik": 0, "damage": 0, "cleaning": 0, "excess_km": 0}]	3
44	C-00027	7	completed		2026-03-15 20:04:00	2026-04-30 20:04:00	70		0.00	0.00	3381.00	90.00	3/4		2026-03-31 12:35:37.384094	2026-03-30 20:05:00	5.00	0.00	Cash	Paid	["img_1774940736842.jpg","img_1774940736845.jpg"]	[]	1000.00				150	1/2	0.00	0.00	0.00	0.00	"[[],[]]"			2026-07-11T10:43:17.614Z	3381	[{"date":"2026-07-11T10:43:08.017Z","type":"Partial","description":"Partial Payment","amount":1000,"mode":"Cash"},{"date":"2026-07-11T10:43:17.614Z","type":"Final","description":"Settlement Payment","amount":381,"mode":"Cash"}]	\N	[]	3
47	C-00030	7	confirmed		2026-03-31 15:09:00	2026-05-19 15:09:00	70		0.00	0.00	3664.50	200.00	1/8		2026-04-01 13:10:14.126545	2026-03-31 15:09:00	5.00	0.00	Cash	Success	["img_1775029213584.jpg","img_1775029213586.jpg"]	["vid_1775029213586.webm","vid_1775029213588.webm"]	-1.00				210	Empty	0.00	0.00	0.00	0.00	"[[{\\"name\\":\\"New charges\\",\\"amount\\":60}],[]]"	Erode	Gobi	\N	3819	\N	Weekly	[{"salik": 0, "damage": 0, "cleaning": 0, "excess_km": 0}, {"salik": 0, "damage": 0, "cleaning": 0, "excess_km": 0}]	3
43	C-00018	7	completed		2026-03-31 07:02:00	2026-04-30 07:02:00	60		0.00	0.00	1890.00	0.00	Full Tank		2026-03-31 12:33:23.561487	2026-03-31 07:02:00	5.00	0.00	Cash	Paid	[]	[]	1000.00						0.00	0.00	0.00	0.00	"[[]]"			2026-07-11T13:06:05.867Z	1890	[{"date":"2026-07-11T13:05:45.294Z","type":"Partial","description":"Partial Payment","amount":1000,"mode":"Cash"},{"date":"2026-07-11T13:06:05.867Z","type":"Final","description":"Settlement Payment","amount":890,"mode":"Cash"}]	\N	[]	3
51	C-00029	9	completed		2026-07-05 13:00:00	2026-07-30 13:00:00	69		0.00	0.00	1811.25	200.00	3/4		2026-07-20 18:16:37.867643	2026-07-18 13:00:00	5.00	0.00	Cash	Unpaid	[]	[]	1000.00				357	Full Tank	0.00	0.00	0.00	0.00	"[[]]"	Erode	salem	\N	0	\N	Weekly	[]	3
\.


--
-- TOC entry 5122 (class 0 OID 58073)
-- Dependencies: 223
-- Data for Name: cars; Type: TABLE DATA; Schema: public; Owner: postgres
--

COPY public.cars (id, brand, model, year, image_url, description, status, insurance, owner, kilometers, car_mulkiya_id, maintenance_company, maintenance_start_date, maintenance_end_date, created_at, rental_options, current_km, current_fuel, start_date_of_insurance, end_date_of_insurance, start_date_of_mulkiya, end_date_of_mulkiya, last_battery_change, last_oil_change_km, oil_change_interval, tenant_id, plate_number, plate_category, city) FROM stdin;
8	Tata	m5	2026	http://127.0.0.1:5000/uploads/car_1774858345288.jpg	jhh	available	Ramu	Shree	\N	35535	saran	2026-02-11	2026-07-11	2026-03-30 13:42:29.712684	[{"id": 1774858303823, "price": "600", "category": "Per Hour", "km_limit": "70"}, {"id": 1774858311040, "price": "699", "category": "Per Day", "km_limit": "50"}]	57998.00	1/2	2025-12-01	2026-07-24	2025-12-01	2026-07-08	2026-07-29	51000	5000	3	\N	\N	\N
7	Maruti	model3	2026	http://127.0.0.1:5000/uploads/car_1774858225178.jpg	fg	available	hema	Ram	\N	3553	Saran	2026-03-14	2026-03-22	2026-03-30 13:40:30.164348	[{"id": 1774857730356, "price": "698", "category": "Per Hour", "km_limit": "60"}]	26000.00	1/8	2026-01-01	2026-07-30	2026-02-01	2026-08-02	2026-07-30	25000	5000	1	\N	\N	\N
9	Toyota	model5	2026	http://127.0.0.1:5000/uploads/car_1775114014694.avif	fyyt	available	chera	Maaran	\N	343454	prabhu	2026-02-25	2026-08-09	2026-03-31 18:21:27.36566	[{"id": 1774961494035, "price": "400", "category": "Per Hour", "km_limit": "50"}]	65976.00	Full Tank	2025-12-01	2026-07-07	2025-12-01	2026-07-24	2026-06-13	60980	5000	2	\N	\N	\N
\.


--
-- TOC entry 5124 (class 0 OID 58088)
-- Dependencies: 225
-- Data for Name: country_master; Type: TABLE DATA; Schema: public; Owner: postgres
--

COPY public.country_master (country_id, name, nationality) FROM stdin;
1	India	Indian
2	United States	American
3	Australia	Australian
4	Canada	Canadian
5	United Kingdom	British
6	United Arab Emirates	Emirati
7	Singapore	Singaporean
8	Germany	German
9	France	French
10	Japan	Japanese
11	China	Chinese
12	Sri Lanka	Sri Lankan
13	Malaysia	Malaysian
14	South Africa	South African
15	New Zealand	New Zealander
\.


--
-- TOC entry 5127 (class 0 OID 58095)
-- Dependencies: 228
-- Data for Name: customers; Type: TABLE DATA; Schema: public; Owner: postgres
--

COPY public.customers (cus_id, full_name, dob, gender, mobile, email, nationality, occupation, house_no, street_name, area, city, district, state, pincode, license_number, license_issued_date, license_expiry_date, license_state, license_file, id_type, id_number, id_file, created_at, license_country, country_id, tenant_id) FROM stdin;
C-00003	Moni	2026-03-09 21:24:00	Female	9446464643	moni@gmail.com	Indian	tester	23	nehru street	kolappalur	gobi	Erode	Tamil Nadu	638144	974534464663	2026-03-09 21:26:00	2026-03-25 21:26:00	tamil nadu	1772593093785-car2.jpg	Aadhaar	65565445656	\N	2026-03-03 11:41:00.105442	\N	\N	1
C-00006	Gowtham	2026-03-04 00:00:00	Male	00376353553	gowtham@gmail.com	Indian	manager	23	kanchi kovil	kolappalur	gobi	Erode	Tamil Nadu	638144	974534464663	2026-03-04 00:00:00	2026-03-20 00:00:00	tamil nadu		Aadhaar	65565445656		2026-03-03 12:09:04.094173	India	\N	1
C-00010	preethi	2026-01-04 10:13:00													5646554777433	2026-03-11 10:13:00	2026-04-04 10:13:00		\N			\N	2026-03-04 10:13:43.895516	\N	\N	1
C-00007	siva	2026-01-01 00:00:00	Male	98986565457	siva@gmail.com	Indian	tester		kanchi kovil			erode			976565544444	2026-05-01 00:00:00	2026-03-30 00:00:00		\N	Aadhaar	55768878768	\N	2026-03-03 14:04:14.588701	null	\N	1
C-00018	Gowtham	2026-03-09 00:00:00		6547777777777											3425555555555	2026-03-10 00:00:00	2026-03-18 00:00:00		\N			\N	2026-03-12 09:23:45.878453	India	\N	1
C-00017	chaaru	2026-02-24 00:00:00	Female	059768554643	chaaru@gmail.com	Indian	tester	23	MRP   road		coimbatore				765454343344334	2026-01-01 00:00:00	2026-02-22 00:00:00		1774431230770-car6.jpg,1774431230770-car5.avif	Passport	65565445656	1774431230770-car4.avif	2026-03-12 09:14:11.42185	India	\N	1
C-00004	sheraya	2026-03-09 21:24:00	Female	8977867468	sheraya@gmail.com	Indian	developer	24	coimbatore	thirupur	thirupur	thirupur	Tamil Nadu	638144	9744466546566	2026-03-09 21:26:00	2026-03-25 21:26:00	tamil nadu	\N	Aadhaar	8764788776664	1772529504676-g1 (2).jpg	2026-03-03 11:41:45.80876	Dubai	\N	2
C-00013	swetha	2026-03-06 15:11:00	Female	344364266426	swetha@gmail.com	Indian	developer	23A	sathy road	Gobi	gobi	Erode	Tamil Nadu	638143	13123434t	2026-03-06 15:12:00	2026-04-11 15:12:00	tamil nadu	1772790202829-car2.jpg	Emirates ID	3446557667	1772790202829-car3.jpg	2026-03-06 15:13:23.250051	India	\N	2
C-00014	Anu	2026-03-10 11:02:00	Female	99504954574	anu@gmail.com	Indian	tester	44	kanchi kovil	thanjavur	thanjavur	thanjavur	Tamil Nadu	638100	5464654664465	2026-03-12 11:03:00	2026-04-21 11:03:00	tamil nadu	1773120863628-car2.jpg	Aadhaar	904385485433	1773120863658-car2.jpg	2026-03-10 11:04:24.188979	India	\N	2
C-00015	seetha	2026-03-18 11:16:00	Female	945658436854	seetha@gmail.com	Indian	developer	25	maharaja street	erode	Erode	Erode	Tamil Nadu	648547	589566465465	2026-03-10 11:17:00	2026-03-19 11:17:00	tamil nadu	1773121694401-car2.jpg	Aadhaar	9575557676767	1773121694402-car1.avif	2026-03-10 11:18:14.909702	India	\N	2
C-00012	swetha	2026-03-06 00:00:00	Female	344364266426	swetha@gmail.com	Indian	developer	23A	sathy road	Gobi	sathy	Erode	Tamil Nadu	638143	13123434t	2026-03-06 00:00:00	2026-04-11 00:00:00	tamil nadu	1772790163226-car2.jpg			\N	2026-03-06 15:12:43.685388	India	\N	2
C-00016	dharan	2019-02-09 00:00:00	Male	97776254222	dharan@gmail.com	Indian	developer	44	kamaraj street	chennai	chennai	chennai	Tamil Nadu	638143	1243556655765	2026-03-09 00:00:00	2026-03-31 00:00:00	tamil nadu	1773293141230-car6.jpg,1773293141258-car5.avif	Passport	445766997997	1773203185503-car4.avif	2026-03-11 09:56:26.125757	India	\N	2
C-00032	kavya	2026-03-09 00:00:00	Female	05468554643	kavya@gmail.com	Indian	Software Engineer		kanchi kovil						96756544545	2026-03-02 00:00:00	2026-03-24 00:00:00		\N			\N	2026-03-26 14:46:18.439583	India	1	2
C-00009	karan	2026-01-03 16:13:00													5668687686787	2026-03-12 16:13:00	2026-04-04 16:13:00		\N			\N	2026-03-03 16:13:48.517891	\N	\N	2
C-00030	saran	2026-03-02 00:00:00	Male	987666666664		Indian									784436566547	2026-03-10 00:00:00	2026-03-26 00:00:00		1773307737471-car6.jpg,1773307737474-car5.avif	Passport	65565445656	1773307737476-car3.jpg,1773307737478-car2.jpg,1773307805388-car4.avif	2026-03-12 14:58:58.27518	India	1	3
C-00025	dharan	2026-03-04 00:00:00		436645444											44346545454565	2026-03-02 00:00:00	2026-03-25 00:00:00		1773294395695-car6.jpg,1773294395698-car5.avif	Aadhaar	654556555455	1773294395698-car2.jpg,1773294395698-car3.jpg	2026-03-12 11:16:36.059021	India	\N	3
C-00028	Akshitha	2026-03-09 00:00:00		766767565654											9765455445	2026-03-10 00:00:00	2026-03-18 00:00:00		1773294999147-car1.avif,1773294999150-car2.jpg	Passport	67655543443434	1773294999151-car1.avif,1773294999151-car6.jpg	2026-03-12 11:26:39.553959	India	\N	3
C-00001	chaaru	2026-03-02 00:00:00	Female	05468554643	chaaru@gmail.com	Indian	tester	29		thirupur	gobi	Erode	Tamil Nadu	638142	003453545453	2026-03-02 00:00:00	2026-03-18 00:00:00	tamil nadu	1773293373066-car6.jpg,1773297072064-car5.avif	Aadhaar	65565445656	1773295482283-car6.jpg,1773297040946-car3.jpg	2026-03-03 08:26:45.263521		\N	3
C-00020	sherin	\N	Female	76565454434		Indian	developer								63435656554	2026-02-27 00:00:00	2026-03-21 00:00:00		1773291644156-car4.avif,1773291644167-car3.jpg	Aadhaar	67655543443434	1773291644168-car4.avif,1773320143776-car7.jpg	2026-03-12 10:30:44.688516	India	\N	3
C-00011	Amar	2026-02-22 00:00:00		976565654455											5746765566	2026-02-24 00:00:00	2026-03-26 00:00:00	tamil nadu	1773296295097-car5.avif,1773296295100-car6.jpg	Emirates ID	7755555555544	1773296425186-car1.avif,1773296900111-car5.avif	2026-03-04 10:25:33.583975	india	\N	3
C-00031	Gowtham	2026-03-15 00:00:00	Male	0501234567 	gowtham@gmail.com	Indian	tester	44	fsdv		erode				96756544545	2026-03-08 00:00:00	2026-03-24 00:00:00	tami nadu		Aadhaar	65565445656		2026-03-25 14:27:11.580218	India	1	3
C-00027	Gowtham	2026-03-03 00:00:00		75665657676	gow@gmail.com										96756544545	2026-03-09 00:00:00	2026-04-08 00:00:00		1773294853338-car6.jpg,1773294853339-car5.avif			1784476443461_1000032762.jpg	2026-03-12 11:24:13.713259	India	\N	3
C-00019	sherin	\N		93783785367											897578535673	2026-03-02 00:00:00	2026-03-19 00:00:00		\N	Aadhaar	464647874464	\N	2026-03-12 10:26:00.875762	India	\N	1
C-00002	Anbu	2026-03-08 00:00:00	Male	9446660643	anbu@gmail.com	Indian	tester	23	murugar street		gobi	Erode	Tamil Nadu	638144	974534464663	2026-03-08 00:00:00	2026-03-24 00:00:00	tamil nadu		Aadhaar	65565445656	1773297256618-car1.avif,1773297256618-car2.jpg	2026-03-03 08:28:23.393204		\N	1
C-00026	shree	2026-03-10 00:00:00	Male	57656656565	shree@gmail.com	Indian	developer	20	gandhi nagar	kolappalur	gobi	Erode	Tamil Nadu	638143	6868565665	2026-03-10 00:00:00	2026-03-26 00:00:00	tamil nadu	1773294527896-car6.jpg,1773294527904-car5.avif	Passport	65565445656	1773295299846-car5.avif,1773295299848-car1.avif	2026-03-12 11:18:48.101528	India	\N	1
C-00005	sendhoor	2026-03-03 06:12:00	Male	57546756756	sendhoor@gmail.com	Indian	developer								9886444334	2026-02-18 06:13:00	2026-03-04 06:12:00		\N	Aadhaar	97675656244224	1772625210293-car3.jpg	2026-03-03 11:44:06.905694		\N	1
C-00029	madhu	2026-03-03 00:00:00	Female	5447465557	madhu@gmail.com	Indian	tester								57757576676588	2026-03-11 00:00:00	2026-03-26 00:00:00	tamil nadu	1773302727895-car5.avif,1773302727907-car6.jpg	Passport	65565445656	1773302727907-car2.jpg	2026-03-12 13:35:28.532584	India	1	2
C-00008	Latha	2026-01-03 16:11:00													77666666665	2026-03-25 16:11:00	2026-03-26 16:11:00		\N	Aadhaar	643333333333	\N	2026-03-03 16:11:50.633109	\N	\N	2
\.


--
-- TOC entry 5128 (class 0 OID 58104)
-- Dependencies: 229
-- Data for Name: rental_bookings; Type: TABLE DATA; Schema: public; Owner: postgres
--

COPY public.rental_bookings (booking_id, cus_id, vehicle, pickup_location, pickup_date, return_date, booking_mode, rent_per_day, advance, deposit, total_amount, created_at, car_images, notes, startingkms, fuellevel, kmrate, tenant_id) FROM stdin;
3	C-00006		salem	2026-03-05 11:51:00	2026-03-09 11:51:00	daily	0.00	0.00	0.00	0.00	2026-03-05 11:51:28.103654	[]	\N	0	\N	0	1
4	C-00003		salem	2026-03-05 12:36:00	2026-03-06 12:36:00	daily	5.00	600.00	500.00	5.00	2026-03-05 12:37:33.937017	[]	\N	0	\N	0	1
6	C-00005		gobi	2026-03-05 18:06:00	2026-03-06 18:06:00		0.00	0.00	0.00	0.00	2026-03-05 18:06:12.934314	["1772714172731-car_1772714137725.jpg"]	\N	0	\N	0	2
5	C-00001		salem	2026-03-05 12:44:00	2026-03-06 12:44:00	weekly	6.00	500.00	600.00	6.00	2026-03-05 12:45:37.416073	["1772694936761-car3.jpg","1772694936783-car_1772694882196.jpg"]	\N	0	\N	0	3
8	C-00001		erode	2026-03-05 18:29:00	2026-03-06 18:29:00	daily	400.00	500.00	500.00	400.00	2026-03-05 18:29:36.924812	["1772715576506-car3.jpg"]		3	Full Tank	0	3
7	C-00008		salem	2026-03-05 18:18:00	2026-03-19 18:18:00	daily	330.00	500.00	4555.00	4620.00	2026-03-05 18:19:35.641246	["1772714975014-car3.jpg"]	\N	0	\N	0	2
\.


--
-- TOC entry 5132 (class 0 OID 58126)
-- Dependencies: 233
-- Data for Name: tenants; Type: TABLE DATA; Schema: public; Owner: postgres
--

COPY public.tenants (tenant_id, name, email, phone, address, subscription_type, subscription_expiry, is_active, created_at, updated_at, owner_name) FROM stdin;
1	client1	client1@carrental.com	+971 50 123 4567	Dubai, UAE	premium	2026-07-22	t	2026-07-22 08:17:50.546195	2026-07-22 08:17:50.546195	\N
2	client2	client2@carrental.com	+971 55 987 6543	Abu Dhabi, UAE	basic	2026-07-22	t	2026-07-22 08:17:50.546195	2026-07-22 08:17:50.546195	\N
3	client3	client3@carrental.com	+971 52 456 7890	Sharjah, UAE	standard	2026-07-22	t	2026-07-22 08:17:50.546195	2026-07-22 08:17:50.546195	\N
\.



--
-- TOC entry 4941 (class 2606 OID 58158)
-- Name: booking_payments booking_payments_pkey; Type: CONSTRAINT; Schema: public; Owner: postgres
--

ALTER TABLE ONLY public.booking_payments
    ADD CONSTRAINT booking_payments_pkey PRIMARY KEY (payment_id);


--
-- TOC entry 4943 (class 2606 OID 58160)
-- Name: bookings bookings_pkey; Type: CONSTRAINT; Schema: public; Owner: postgres
--

ALTER TABLE ONLY public.bookings
    ADD CONSTRAINT bookings_pkey PRIMARY KEY (booking_id);


--
-- TOC entry 4945 (class 2606 OID 58162)
-- Name: cars cars_pkey; Type: CONSTRAINT; Schema: public; Owner: postgres
--

ALTER TABLE ONLY public.cars
    ADD CONSTRAINT cars_pkey PRIMARY KEY (id);


--
-- TOC entry 4949 (class 2606 OID 58164)
-- Name: country_master country_master_pkey; Type: CONSTRAINT; Schema: public; Owner: postgres
--

ALTER TABLE ONLY public.country_master
    ADD CONSTRAINT country_master_pkey PRIMARY KEY (country_id);


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

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


--
-- TOC entry 4953 (class 2606 OID 58168)
-- Name: rental_bookings rental_bookings_pkey; Type: CONSTRAINT; Schema: public; Owner: postgres
--

ALTER TABLE ONLY public.rental_bookings
    ADD CONSTRAINT rental_bookings_pkey PRIMARY KEY (booking_id);


--
-- TOC entry 4959 (class 2606 OID 58174)
-- Name: tenants tenants_pkey; Type: CONSTRAINT; Schema: public; Owner: postgres
--

ALTER TABLE ONLY public.tenants
    ADD CONSTRAINT tenants_pkey PRIMARY KEY (tenant_id);


--
-- TOC entry 4947 (class 2606 OID 58176)
-- Name: cars unique_car_mulkiya_id; Type: CONSTRAINT; Schema: public; Owner: postgres
--

ALTER TABLE ONLY public.cars
    ADD CONSTRAINT unique_car_mulkiya_id UNIQUE (car_mulkiya_id);


--
-- TOC entry 4964 (class 2606 OID 58181)
-- Name: booking_payments booking_payments_booking_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: postgres
--

ALTER TABLE ONLY public.booking_payments
    ADD CONSTRAINT booking_payments_booking_id_fkey FOREIGN KEY (booking_id) REFERENCES public.bookings(booking_id) ON DELETE CASCADE;


--
-- TOC entry 4968 (class 2606 OID 58186)
-- Name: customers customers_country_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: postgres
--

ALTER TABLE ONLY public.customers
    ADD CONSTRAINT customers_country_id_fkey FOREIGN KEY (country_id) REFERENCES public.country_master(country_id);


--
-- TOC entry 4965 (class 2606 OID 58191)
-- Name: booking_payments fk_bookingpayments_tenant; Type: FK CONSTRAINT; Schema: public; Owner: postgres
--

ALTER TABLE ONLY public.booking_payments
    ADD CONSTRAINT fk_bookingpayments_tenant FOREIGN KEY (tenant_id) REFERENCES public.tenant(tenant_id);


--
-- TOC entry 4966 (class 2606 OID 58196)
-- Name: bookings fk_bookings_tenant; Type: FK CONSTRAINT; Schema: public; Owner: postgres
--

ALTER TABLE ONLY public.bookings
    ADD CONSTRAINT fk_bookings_tenant FOREIGN KEY (tenant_id) REFERENCES public.tenant(tenant_id);


--
-- TOC entry 4967 (class 2606 OID 58201)
-- Name: cars fk_cars_tenant; Type: FK CONSTRAINT; Schema: public; Owner: postgres
--

ALTER TABLE ONLY public.cars
    ADD CONSTRAINT fk_cars_tenant FOREIGN KEY (tenant_id) REFERENCES public.tenant(tenant_id);


--
-- TOC entry 4969 (class 2606 OID 58206)
-- Name: customers fk_customers_tenant; Type: FK CONSTRAINT; Schema: public; Owner: postgres
--

ALTER TABLE ONLY public.customers
    ADD CONSTRAINT fk_customers_tenant FOREIGN KEY (tenant_id) REFERENCES public.tenant(tenant_id);