-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathscript.sql
385 lines (353 loc) · 19.1 KB
/
script.sql
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
-- This script was generated by the ERD tool in pgAdmin 4.
-- Please log an issue at https://github.com/pgadmin-org/pgadmin4/issues/new/choose if you find any bugs, including reproduction steps.
BEGIN;
CREATE TABLE IF NOT EXISTS public.cart_items
(
cart_id bigserial NOT NULL,
product_id bigint NOT NULL,
quantity bigint,
CONSTRAINT cart_items_pkey PRIMARY KEY (cart_id, product_id)
);
CREATE TABLE IF NOT EXISTS public.carts
(
cart_id bigserial NOT NULL,
user_id bigint,
is_deleted boolean DEFAULT false,
created_at timestamp without time zone DEFAULT CURRENT_TIMESTAMP,
CONSTRAINT carts_pkey PRIMARY KEY (cart_id)
);
CREATE TABLE IF NOT EXISTS public.categories
(
category_id bigserial NOT NULL,
category_name text COLLATE pg_catalog."default",
is_deleted boolean DEFAULT false,
created_at timestamp without time zone DEFAULT CURRENT_TIMESTAMP,
CONSTRAINT categories_pkey PRIMARY KEY (category_id)
);
CREATE TABLE IF NOT EXISTS public.couriers
(
courier_id bigserial NOT NULL,
courier_name text COLLATE pg_catalog."default",
is_deleted boolean DEFAULT false,
created_at timestamp without time zone DEFAULT CURRENT_TIMESTAMP,
CONSTRAINT couriers_pkey PRIMARY KEY (courier_id)
);
CREATE TABLE IF NOT EXISTS public.discounts
(
discount_id bigserial NOT NULL,
discount_type text COLLATE pg_catalog."default",
discount_value numeric,
start_date timestamp with time zone,
end_date timestamp with time zone,
is_deleted boolean DEFAULT false,
created_at timestamp without time zone DEFAULT CURRENT_TIMESTAMP,
CONSTRAINT discounts_pkey PRIMARY KEY (discount_id)
);
CREATE TABLE IF NOT EXISTS public.freight_rates
(
rate_id bigserial NOT NULL,
courier_id bigint,
distance_min_km numeric,
distance_max_km numeric,
cost_per_km numeric,
is_deleted boolean DEFAULT false,
created_at timestamp without time zone DEFAULT CURRENT_TIMESTAMP,
CONSTRAINT freight_rates_pkey PRIMARY KEY (rate_id)
);
CREATE TABLE IF NOT EXISTS public.news
(
news_id bigserial NOT NULL,
title text COLLATE pg_catalog."default",
content text COLLATE pg_catalog."default",
published_date timestamp with time zone,
author_id bigint,
image_url text COLLATE pg_catalog."default",
category text COLLATE pg_catalog."default",
is_deleted boolean DEFAULT false,
created_at timestamp without time zone DEFAULT CURRENT_TIMESTAMP,
CONSTRAINT news_pkey PRIMARY KEY (news_id)
);
CREATE TABLE IF NOT EXISTS public.order_details
(
order_id bigint NOT NULL,
product_id bigint NOT NULL,
quantity bigint,
unit_price numeric,
CONSTRAINT order_details_pkey PRIMARY KEY (order_id, product_id)
);
CREATE TABLE IF NOT EXISTS public.orders
(
order_id bigserial NOT NULL,
customer_id bigint,
order_date timestamp with time zone,
total_amount numeric,
order_status text COLLATE pg_catalog."default",
shipping_address text COLLATE pg_catalog."default",
courier_id bigint,
freight_price numeric,
estimated_delivery_date timestamp with time zone,
actual_delivery_date timestamp with time zone,
voucher_id bigint,
is_deleted boolean DEFAULT false,
created_at timestamp without time zone DEFAULT CURRENT_TIMESTAMP,
CONSTRAINT orders_pkey PRIMARY KEY (order_id)
);
CREATE TABLE IF NOT EXISTS public.payments
(
payment_id bigserial NOT NULL,
order_id bigint,
payment_amount numeric,
payment_date timestamp with time zone,
payment_method text COLLATE pg_catalog."default",
payment_status text COLLATE pg_catalog."default",
payment_signature text COLLATE pg_catalog."default",
CONSTRAINT payments_pkey PRIMARY KEY (payment_id)
);
CREATE TABLE IF NOT EXISTS public.product_discounts
(
product_id bigint NOT NULL,
discount_id bigint NOT NULL,
CONSTRAINT product_discounts_pkey PRIMARY KEY (product_id, discount_id)
);
CREATE TABLE IF NOT EXISTS public.products
(
product_id bigserial NOT NULL,
seller_id bigint,
product_name text COLLATE pg_catalog."default",
description text COLLATE pg_catalog."default",
price numeric,
quantity bigint,
category_id bigint,
image_url text COLLATE pg_catalog."default",
created_at timestamp without time zone DEFAULT CURRENT_TIMESTAMP,
is_deleted boolean DEFAULT false,
CONSTRAINT products_pkey PRIMARY KEY (product_id)
);
CREATE TABLE IF NOT EXISTS public.reviews
(
review_id bigserial NOT NULL,
product_id bigint,
user_id bigint,
rating bigint,
comment text COLLATE pg_catalog."default",
created_at timestamp without time zone DEFAULT CURRENT_TIMESTAMP,
is_deleted boolean DEFAULT false,
CONSTRAINT reviews_pkey PRIMARY KEY (review_id)
);
CREATE TABLE IF NOT EXISTS public.users
(
user_id bigserial NOT NULL,
email text COLLATE pg_catalog."default" NOT NULL,
password_hash text COLLATE pg_catalog."default",
full_name text COLLATE pg_catalog."default",
phone_number text COLLATE pg_catalog."default",
address text COLLATE pg_catalog."default",
role text COLLATE pg_catalog."default",
image_url text COLLATE pg_catalog."default",
provider text COLLATE pg_catalog."default",
created_at timestamp without time zone DEFAULT CURRENT_TIMESTAMP,
token text COLLATE pg_catalog."default",
token_expires timestamp with time zone,
is_deleted boolean DEFAULT false,
is_verified boolean DEFAULT false,
CONSTRAINT users_pkey PRIMARY KEY (user_id),
CONSTRAINT uni_users_email UNIQUE (email)
);
CREATE TABLE IF NOT EXISTS public.vouchers
(
voucher_id bigserial NOT NULL,
voucher_code text COLLATE pg_catalog."default" NOT NULL,
discount_type text COLLATE pg_catalog."default",
discount_value numeric,
minimum_order_amount numeric,
max_discount_amount numeric,
start_date timestamp with time zone,
end_date timestamp with time zone,
usage_limit bigint,
usage_count bigint,
is_deleted boolean DEFAULT false,
created_at timestamp without time zone DEFAULT CURRENT_TIMESTAMP,
CONSTRAINT vouchers_pkey PRIMARY KEY (voucher_id),
CONSTRAINT uni_vouchers_voucher_code UNIQUE (voucher_code)
);
-- Insert rows for the `carts` table
INSERT INTO public.carts (user_id, is_deleted, created_at) VALUES
(1, false, CURRENT_TIMESTAMP),
(2, false, CURRENT_TIMESTAMP),
(3, false, CURRENT_TIMESTAMP),
(4, false, CURRENT_TIMESTAMP),
(5, false, CURRENT_TIMESTAMP),
(6, false, CURRENT_TIMESTAMP),
(7, false, CURRENT_TIMESTAMP),
(8, false, CURRENT_TIMESTAMP),
(9, false, CURRENT_TIMESTAMP),
(10, false, CURRENT_TIMESTAMP);
-- Insert rows for the `cart_items` table
INSERT INTO public.cart_items (cart_id, product_id, quantity) VALUES
(1, 1, 2),
(2, 2, 1),
(3, 3, 3),
(4, 4, 4),
(5, 5, 2),
(6, 6, 5),
(7, 7, 1),
(8, 8, 3),
(9, 9, 6),
(10, 10, 4);
-- Insert rows for the `categories` table
INSERT INTO public.categories (category_name, is_deleted, created_at) VALUES
('Electronics', false, CURRENT_TIMESTAMP),
('Clothing', false, CURRENT_TIMESTAMP),
('Books', false, CURRENT_TIMESTAMP),
('Sports', false, CURRENT_TIMESTAMP),
('Toys', false, CURRENT_TIMESTAMP),
('Furniture', false, CURRENT_TIMESTAMP),
('Beauty', false, CURRENT_TIMESTAMP),
('Automotive', false, CURRENT_TIMESTAMP),
('Health', false, CURRENT_TIMESTAMP),
('Groceries', false, CURRENT_TIMESTAMP);
-- Insert rows for the `couriers` table
INSERT INTO public.couriers (courier_name, is_deleted, created_at) VALUES
('DHL', false, CURRENT_TIMESTAMP),
('FedEx', false, CURRENT_TIMESTAMP),
('UPS', false, CURRENT_TIMESTAMP),
('USPS', false, CURRENT_TIMESTAMP),
('DPD', false, CURRENT_TIMESTAMP),
('Hermes', false, CURRENT_TIMESTAMP),
('Royal Mail', false, CURRENT_TIMESTAMP),
('GLS', false, CURRENT_TIMESTAMP),
('TNT', false, CURRENT_TIMESTAMP),
('Amazon Delivery', false, CURRENT_TIMESTAMP);
-- Insert rows for the `discounts` table
INSERT INTO public.discounts (discount_type, discount_value, start_date, end_date, is_deleted, created_at) VALUES
('Percentage', 10, CURRENT_TIMESTAMP, CURRENT_TIMESTAMP + INTERVAL '30 days', false, CURRENT_TIMESTAMP),
('Fixed', 50, CURRENT_TIMESTAMP, CURRENT_TIMESTAMP + INTERVAL '30 days', false, CURRENT_TIMESTAMP),
('Percentage', 15, CURRENT_TIMESTAMP, CURRENT_TIMESTAMP + INTERVAL '30 days', false, CURRENT_TIMESTAMP),
('Fixed', 100, CURRENT_TIMESTAMP, CURRENT_TIMESTAMP + INTERVAL '30 days', false, CURRENT_TIMESTAMP),
('Percentage', 20, CURRENT_TIMESTAMP, CURRENT_TIMESTAMP + INTERVAL '30 days', false, CURRENT_TIMESTAMP),
('Fixed', 25, CURRENT_TIMESTAMP, CURRENT_TIMESTAMP + INTERVAL '30 days', false, CURRENT_TIMESTAMP),
('Percentage', 30, CURRENT_TIMESTAMP, CURRENT_TIMESTAMP + INTERVAL '30 days', false, CURRENT_TIMESTAMP),
('Fixed', 70, CURRENT_TIMESTAMP, CURRENT_TIMESTAMP + INTERVAL '30 days', false, CURRENT_TIMESTAMP),
('Percentage', 5, CURRENT_TIMESTAMP, CURRENT_TIMESTAMP + INTERVAL '30 days', false, CURRENT_TIMESTAMP),
('Fixed', 200, CURRENT_TIMESTAMP, CURRENT_TIMESTAMP + INTERVAL '30 days', false, CURRENT_TIMESTAMP);
-- Insert rows for the `freight_rates` table
INSERT INTO public.freight_rates (courier_id, distance_min_km, distance_max_km, cost_per_km, is_deleted, created_at) VALUES
(1, 0, 100, 5, false, CURRENT_TIMESTAMP),
(2, 0, 200, 6, false, CURRENT_TIMESTAMP),
(3, 100, 300, 7, false, CURRENT_TIMESTAMP),
(4, 200, 400, 8, false, CURRENT_TIMESTAMP),
(5, 300, 500, 9, false, CURRENT_TIMESTAMP),
(6, 400, 600, 10, false, CURRENT_TIMESTAMP),
(7, 500, 700, 11, false, CURRENT_TIMESTAMP),
(8, 600, 800, 12, false, CURRENT_TIMESTAMP),
(9, 700, 900, 13, false, CURRENT_TIMESTAMP),
(10, 800, 1000, 14, false, CURRENT_TIMESTAMP);
-- Insert rows for the `news` table
INSERT INTO public.news (title, content, published_date, author_id, image_url, category, is_deleted, created_at) VALUES
('New Product Launch', 'We are launching a new product!', CURRENT_TIMESTAMP, 1, 'image1.jpg', 'Products', false, CURRENT_TIMESTAMP),
('Holiday Sale', 'Huge discounts this holiday!', CURRENT_TIMESTAMP, 2, 'image2.jpg', 'Sales', false, CURRENT_TIMESTAMP),
('Store Opening', 'We are opening a new store!', CURRENT_TIMESTAMP, 3, 'image3.jpg', 'Announcements', false, CURRENT_TIMESTAMP),
('Black Friday Deals', 'Dont miss our Black Friday deals!', CURRENT_TIMESTAMP, 4, 'image4.jpg', 'Deals', false, CURRENT_TIMESTAMP),
('Summer Sale', 'Enjoy summer discounts!', CURRENT_TIMESTAMP, 5, 'image5.jpg', 'Sales', false, CURRENT_TIMESTAMP),
('New Brand Collaboration', 'We are collaborating with a new brand!', CURRENT_TIMESTAMP, 6, 'image6.jpg', 'Brand', false, CURRENT_TIMESTAMP),
('Exclusive Offers', 'Exclusive offers for members!', CURRENT_TIMESTAMP, 7, 'image7.jpg', 'Members', false, CURRENT_TIMESTAMP),
('Free Shipping', 'Free shipping for orders over $100!', CURRENT_TIMESTAMP, 8, 'image8.jpg', 'Shipping', false, CURRENT_TIMESTAMP),
('Gift Cards Available', 'Buy gift cards for your loved ones!', CURRENT_TIMESTAMP, 9, 'image9.jpg', 'Gift', false, CURRENT_TIMESTAMP),
('Year-End Sale', 'Year-end discounts are here!', CURRENT_TIMESTAMP, 10, 'image10.jpg', 'Sales', false, CURRENT_TIMESTAMP);
-- Insert rows for the `order_details` table
INSERT INTO public.order_details (order_id, product_id, quantity, unit_price) VALUES
(1, 1, 2, 100),
(2, 2, 1, 200),
(3, 3, 4, 150),
(4, 4, 3, 50),
(5, 5, 5, 75),
(6, 6, 2, 125),
(7, 7, 1, 60),
(8, 8, 3, 90),
(9, 9, 6, 110),
(10, 10, 4, 130);
-- Insert rows for the `orders` table
INSERT INTO public.orders (customer_id, order_date, total_amount, order_status, shipping_address, courier_id, freight_price, estimated_delivery_date, actual_delivery_date, voucher_id, is_deleted, created_at) VALUES
(1, CURRENT_TIMESTAMP, 1000, 'Pending', 'Address 1', 1, 50, CURRENT_TIMESTAMP + INTERVAL '5 days', NULL, NULL, false, CURRENT_TIMESTAMP),
(2, CURRENT_TIMESTAMP, 2000, 'Shipped', 'Address 2', 2, 60, CURRENT_TIMESTAMP + INTERVAL '6 days', NULL, NULL, false, CURRENT_TIMESTAMP),
(3, CURRENT_TIMESTAMP, 3000, 'Delivered', 'Address 3', 3, 70, CURRENT_TIMESTAMP + INTERVAL '7 days', CURRENT_TIMESTAMP, NULL, false, CURRENT_TIMESTAMP),
(4, CURRENT_TIMESTAMP, 4000, 'Pending', 'Address 4', 4, 80, CURRENT_TIMESTAMP + INTERVAL '8 days', NULL, NULL, false, CURRENT_TIMESTAMP),
(5, CURRENT_TIMESTAMP, 5000, 'Cancelled', 'Address 5', 5, 90, CURRENT_TIMESTAMP + INTERVAL '9 days', NULL, NULL, false, CURRENT_TIMESTAMP),
(6, CURRENT_TIMESTAMP, 6000, 'Delivered', 'Address 6', 6, 100, CURRENT_TIMESTAMP + INTERVAL '10 days', CURRENT_TIMESTAMP, NULL, false, CURRENT_TIMESTAMP),
(7, CURRENT_TIMESTAMP, 7000, 'Shipped', 'Address 7', 7, 110, CURRENT_TIMESTAMP + INTERVAL '11 days', NULL, NULL, false, CURRENT_TIMESTAMP),
(8, CURRENT_TIMESTAMP, 8000, 'Pending', 'Address 8', 8, 120, CURRENT_TIMESTAMP + INTERVAL '12 days', NULL, NULL, false, CURRENT_TIMESTAMP),
(9, CURRENT_TIMESTAMP, 9000, 'Cancelled', 'Address 9', 9, 130, CURRENT_TIMESTAMP + INTERVAL '13 days', NULL, NULL, false, CURRENT_TIMESTAMP),
(10, CURRENT_TIMESTAMP, 10000, 'Shipped', 'Address 10', 10, 140, CURRENT_TIMESTAMP + INTERVAL '14 days', NULL, NULL, false, CURRENT_TIMESTAMP);
-- Insert rows for the `payments` table
INSERT INTO public.payments (order_id, payment_amount, payment_date, payment_method, payment_status, payment_signature) VALUES
(1, 1000, CURRENT_TIMESTAMP, 'Credit Card', 'Completed', 'Signature1'),
(2, 2000, CURRENT_TIMESTAMP, 'PayPal', 'Completed', 'Signature2'),
(3, 3000, CURRENT_TIMESTAMP, 'Bank Transfer', 'Pending', 'Signature3'),
(4, 4000, CURRENT_TIMESTAMP, 'Credit Card', 'Completed', 'Signature4'),
(5, 5000, CURRENT_TIMESTAMP, 'PayPal', 'Failed', 'Signature5'),
(6, 6000, CURRENT_TIMESTAMP, 'Bank Transfer', 'Completed', 'Signature6'),
(7, 7000, CURRENT_TIMESTAMP, 'Credit Card', 'Pending', 'Signature7'),
(8, 8000, CURRENT_TIMESTAMP, 'PayPal', 'Completed', 'Signature8'),
(9, 9000, CURRENT_TIMESTAMP, 'Bank Transfer', 'Pending', 'Signature9'),
(10, 10000, CURRENT_TIMESTAMP, 'Credit Card', 'Completed', 'Signature10');
-- Insert rows for the `product_discounts` table
INSERT INTO public.product_discounts (product_id, discount_id) VALUES
(1, 1),
(2, 2),
(3, 3),
(4, 4),
(5, 5),
(6, 6),
(7, 7),
(8, 8),
(9, 9),
(10, 10);
-- Insert rows for the `products` table
INSERT INTO public.products (seller_id, product_name, description, price, quantity, category_id, image_url, is_deleted, created_at) VALUES
(1, 'Product 1', 'Description 1', 100, 10, 1, 'image1.jpg', false, CURRENT_TIMESTAMP),
(2, 'Product 2', 'Description 2', 200, 20, 2, 'image2.jpg', false, CURRENT_TIMESTAMP),
(3, 'Product 3', 'Description 3', 300, 30, 3, 'image3.jpg', false, CURRENT_TIMESTAMP),
(4, 'Product 4', 'Description 4', 400, 40, 4, 'image4.jpg', false, CURRENT_TIMESTAMP),
(5, 'Product 5', 'Description 5', 500, 50, 5, 'image5.jpg', false, CURRENT_TIMESTAMP),
(6, 'Product 6', 'Description 6', 600, 60, 6, 'image6.jpg', false, CURRENT_TIMESTAMP),
(7, 'Product 7', 'Description 7', 700, 70, 7, 'image7.jpg', false, CURRENT_TIMESTAMP),
(8, 'Product 8', 'Description 8', 800, 80, 8, 'image8.jpg', false, CURRENT_TIMESTAMP),
(9, 'Product 9', 'Description 9', 900, 90, 9, 'image9.jpg', false, CURRENT_TIMESTAMP),
(10, 'Product 10', 'Description 10', 1000, 100, 10, 'image10.jpg', false, CURRENT_TIMESTAMP);
-- Insert rows for the `reviews` table
INSERT INTO public.reviews (product_id, user_id, rating, comment, is_deleted, created_at) VALUES
(1, 1, 5, 'Excellent product!', false, CURRENT_TIMESTAMP),
(2, 2, 4, 'Very good quality.', false, CURRENT_TIMESTAMP),
(3, 3, 3, 'Average performance.', false, CURRENT_TIMESTAMP),
(4, 4, 2, 'Not as expected.', false, CURRENT_TIMESTAMP),
(5, 5, 1, 'Terrible experience.', false, CURRENT_TIMESTAMP),
(6, 6, 5, 'Highly recommend.', false, CURRENT_TIMESTAMP),
(7, 7, 4, 'Good value for money.', false, CURRENT_TIMESTAMP),
(8, 8, 3, 'Okay product.', false, CURRENT_TIMESTAMP),
(9, 9, 2, 'Not worth the price.', false, CURRENT_TIMESTAMP),
(10, 10, 1, 'Worst purchase ever.', false, CURRENT_TIMESTAMP);
-- Insert rows for the `users` table
INSERT INTO public.users (email, password_hash, full_name, phone_number, address, role, image_url, token, token_expires, is_deleted, created_at) VALUES
('user1@example.com', 'hashed_password_1', 'User One', '1234567890', 'Address 1', 'customer', 'image1.jpg', 'token1', CURRENT_TIMESTAMP + INTERVAL '1 day', false, CURRENT_TIMESTAMP),
('user2@example.com', 'hashed_password_2', 'User Two', '1234567891', 'Address 2', 'customer', 'image2.jpg', 'token2', CURRENT_TIMESTAMP + INTERVAL '1 day', false, CURRENT_TIMESTAMP),
('user3@example.com', 'hashed_password_3', 'User Three', '1234567892', 'Address 3', 'customer', 'image3.jpg', 'token3', CURRENT_TIMESTAMP + INTERVAL '1 day', false, CURRENT_TIMESTAMP),
('user4@example.com', 'hashed_password_4', 'User Four', '1234567893', 'Address 4', 'customer', 'image4.jpg', 'token4', CURRENT_TIMESTAMP + INTERVAL '1 day', false, CURRENT_TIMESTAMP),
('user5@example.com', 'hashed_password_5', 'User Five', '1234567894', 'Address 5', 'admin', 'image5.jpg', 'token5', CURRENT_TIMESTAMP + INTERVAL '1 day', false, CURRENT_TIMESTAMP),
('user6@example.com', 'hashed_password_6', 'User Six', '1234567895', 'Address 6', 'customer', 'image6.jpg', 'token6', CURRENT_TIMESTAMP + INTERVAL '1 day', false, CURRENT_TIMESTAMP),
('user7@example.com', 'hashed_password_7', 'User Seven', '1234567896', 'Address 7', 'seller', 'image7.jpg', 'token7', CURRENT_TIMESTAMP + INTERVAL '1 day', false, CURRENT_TIMESTAMP),
('user8@example.com', 'hashed_password_8', 'User Eight', '1234567897', 'Address 8', 'customer', 'image8.jpg', 'token8', CURRENT_TIMESTAMP + INTERVAL '1 day', false, CURRENT_TIMESTAMP),
('user9@example.com', 'hashed_password_9', 'User Nine', '1234567898', 'Address 9', 'customer', 'image9.jpg', 'token9', CURRENT_TIMESTAMP + INTERVAL '1 day', false, CURRENT_TIMESTAMP),
('user10@example.com', 'hashed_password_10', 'User Ten', '1234567899', 'Address 10', 'customer', 'image10.jpg', 'token10', CURRENT_TIMESTAMP + INTERVAL '1 day', false, CURRENT_TIMESTAMP);
-- Insert rows for the `vouchers` table
INSERT INTO public.vouchers (voucher_code, discount_type, discount_value, minimum_order_amount, max_discount_amount, start_date, end_date, usage_limit, usage_count, is_deleted, created_at) VALUES
('VOUCHER1', 'Percentage', 10, 100, 50, CURRENT_TIMESTAMP, CURRENT_TIMESTAMP + INTERVAL '30 days', 100, 10, false, CURRENT_TIMESTAMP),
('VOUCHER2', 'Fixed', 50, 200, 100, CURRENT_TIMESTAMP, CURRENT_TIMESTAMP + INTERVAL '30 days', 200, 20, false, CURRENT_TIMESTAMP),
('VOUCHER3', 'Percentage', 15, 300, 150, CURRENT_TIMESTAMP, CURRENT_TIMESTAMP + INTERVAL '30 days', 300, 30, false, CURRENT_TIMESTAMP),
('VOUCHER4', 'Fixed', 100, 400, 200, CURRENT_TIMESTAMP, CURRENT_TIMESTAMP + INTERVAL '30 days', 400, 40, false, CURRENT_TIMESTAMP),
('VOUCHER5', 'Percentage', 20, 500, 250, CURRENT_TIMESTAMP, CURRENT_TIMESTAMP + INTERVAL '30 days', 500, 50, false, CURRENT_TIMESTAMP),
('VOUCHER6', 'Fixed', 25, 600, 300, CURRENT_TIMESTAMP, CURRENT_TIMESTAMP + INTERVAL '30 days', 600, 60, false, CURRENT_TIMESTAMP),
('VOUCHER7', 'Percentage', 30, 700, 350, CURRENT_TIMESTAMP, CURRENT_TIMESTAMP + INTERVAL '30 days', 700, 70, false, CURRENT_TIMESTAMP),
('VOUCHER8', 'Fixed', 70, 800, 400, CURRENT_TIMESTAMP, CURRENT_TIMESTAMP + INTERVAL '30 days', 800, 80, false, CURRENT_TIMESTAMP),
('VOUCHER9', 'Percentage', 5, 900, 450, CURRENT_TIMESTAMP, CURRENT_TIMESTAMP + INTERVAL '30 days', 900, 90, false, CURRENT_TIMESTAMP),
('VOUCHER10', 'Fixed', 200, 1000, 500, CURRENT_TIMESTAMP, CURRENT_TIMESTAMP + INTERVAL '30 days', 1000, 100, false, CURRENT_TIMESTAMP);
END;