diff --git a/apps/backend/dumps/latest.sql b/apps/backend/dumps/latest.sql index 1d84169..e54f04b 100644 --- a/apps/backend/dumps/latest.sql +++ b/apps/backend/dumps/latest.sql @@ -317,7 +317,7 @@ INSERT INTO "addresses" ("id","user_id","is_default","name","phone","address_lin INSERT INTO "addresses" ("id","user_id","is_default","name","phone","address_line1","address_line2","city","state","pincode","latitude","longitude","created_at","zone_id","admin_latitude","admin_longitude","google_maps_url") VALUES(332,438,0,'Neha Nahid','9581983703','Aayesha manzil ','','Mahabubnagar','Telangana','509001',16.7310199,77.989817,'2026-05-12 04:57:54',NULL,NULL,NULL,NULL); INSERT INTO "addresses" ("id","user_id","is_default","name","phone","address_line1","address_line2","city","state","pincode","latitude","longitude","created_at","zone_id","admin_latitude","admin_longitude","google_maps_url") VALUES(333,441,0,'Syeda sara ','8897511092','Shah shab gutta , DO NAL ,TIPU SULTAN CHOWK','A.R CLINIC,SMS BUILDING ','Mahabubnagar','Telangana','509001',NULL,NULL,'2026-05-12 08:42:56',NULL,NULL,NULL,NULL); INSERT INTO "addresses" ("id","user_id","is_default","name","phone","address_line1","address_line2","city","state","pincode","latitude","longitude","created_at","zone_id","admin_latitude","admin_longitude","google_maps_url") VALUES(334,412,1,'Mohd shezan','8125912433','Shah sahab gutta near kakatiya school ','','Mahabubnagar','Telangana','509001',16.7478762,78.0087191,'2026-05-12 19:32:42',NULL,NULL,NULL,NULL); -INSERT INTO "addresses" ("id","user_id","is_default","name","phone","address_line1","address_line2","city","state","pincode","latitude","longitude","created_at","zone_id","admin_latitude","admin_longitude","google_maps_url") VALUES(335,444,1,'K Ravi Prakash ','9849767367','7-5-115/2 laxminagar colony ','Mahbubnagar ','Mahabubnagar','Telangana','509001',NULL,NULL,'2026-05-13 02:14:17',NULL,16.75587,78.0188336,NULL); +INSERT INTO "addresses" ("id","user_id","is_default","name","phone","address_line1","address_line2","city","state","pincode","latitude","longitude","created_at","zone_id","admin_latitude","admin_longitude","google_maps_url") VALUES(335,444,1,'K Ravi Prakash ','9849767367','7-5-115/2 laxminagar colony ','Mahbubnagar ','Mahabubnagar','Telangana','509001',NULL,NULL,'2026-05-13 02:14:17',NULL,16.7560587,78.0188354,NULL); INSERT INTO "addresses" ("id","user_id","is_default","name","phone","address_line1","address_line2","city","state","pincode","latitude","longitude","created_at","zone_id","admin_latitude","admin_longitude","google_maps_url") VALUES(336,22,1,'14-2-105/3, Madhuranagar Colony, Near Hanuman Temple, Mahabubnagar, Telangana 509001','9066454938','N','','Mahabubnagar','Telangana','509001',NULL,NULL,'2026-05-13 06:16:14',NULL,NULL,NULL,NULL); INSERT INTO "addresses" ("id","user_id","is_default","name","phone","address_line1","address_line2","city","state","pincode","latitude","longitude","created_at","zone_id","admin_latitude","admin_longitude","google_maps_url") VALUES(337,178,0,'Khadhar','7799492001','Najha Pride apartment door no 304 near district court beside Shiva dental clinic ','','Mahabubnagar','Telangana','509001',16.7329562,77.990655,'2026-05-13 14:35:45',NULL,NULL,NULL,NULL); INSERT INTO "addresses" ("id","user_id","is_default","name","phone","address_line1","address_line2","city","state","pincode","latitude","longitude","created_at","zone_id","admin_latitude","admin_longitude","google_maps_url") VALUES(338,447,0,'Chandu','9052466966','Near Hero Showroom, opposite Kallu dukhnam','Old palamoor, Ambedkar statue','Mahabubnagar','Telangana','509001',NULL,NULL,'2026-05-14 05:44:41',NULL,NULL,NULL,NULL); @@ -485,7 +485,7 @@ INSERT INTO "addresses" ("id","user_id","is_default","name","phone","address_lin INSERT INTO "addresses" ("id","user_id","is_default","name","phone","address_line1","address_line2","city","state","pincode","latitude","longitude","created_at","zone_id","admin_latitude","admin_longitude","google_maps_url") VALUES(506,692,0,'Arkanti','7731850260','1st floor RS super market','Balaji Nagar Colony','Mahabubnagar','Telangana','509001',16.731537426355906,77.99689417378941,'2026-07-14 04:12:09',NULL,NULL,NULL,NULL); INSERT INTO "addresses" ("id","user_id","is_default","name","phone","address_line1","address_line2","city","state","pincode","latitude","longitude","created_at","zone_id","admin_latitude","admin_longitude","google_maps_url") VALUES(507,693,1,'Vineeth ','8074137261','Shiva shakti nagar','','Mahabubnagar','Telangana','509001',NULL,NULL,'2026-07-14 08:17:27',NULL,NULL,NULL,'https://maps.app.goo.gl/yksVAjnxvkBUd6fS9'); INSERT INTO "addresses" ("id","user_id","is_default","name","phone","address_line1","address_line2","city","state","pincode","latitude","longitude","created_at","zone_id","admin_latitude","admin_longitude","google_maps_url") VALUES(508,695,1,'Ayam','9553889447','4-2-24, Ramaiahbowli, MBNR','','Mahabubnagar','Telangana','509001',NULL,NULL,'2026-07-14 15:25:21',NULL,NULL,NULL,NULL); -INSERT INTO "addresses" ("id","user_id","is_default","name","phone","address_line1","address_line2","city","state","pincode","latitude","longitude","created_at","zone_id","admin_latitude","admin_longitude","google_maps_url") VALUES(509,679,1,'Santosh ','9603705128','Newtown opposite to malabar','','Mahabubnagar','Telangana','509001',NULL,NULL,'2026-07-15 11:51:00',NULL,NULL,NULL,NULL); +INSERT INTO "addresses" ("id","user_id","is_default","name","phone","address_line1","address_line2","city","state","pincode","latitude","longitude","created_at","zone_id","admin_latitude","admin_longitude","google_maps_url") VALUES(509,679,1,'Santosh ','9603705128','Newtown opposite to malabar','','Mahabubnagar','Telangana','509001',16.7113319,78.0250026,'2026-07-15 11:51:00',NULL,NULL,NULL,NULL); INSERT INTO "addresses" ("id","user_id","is_default","name","phone","address_line1","address_line2","city","state","pincode","latitude","longitude","created_at","zone_id","admin_latitude","admin_longitude","google_maps_url") VALUES(510,586,1,'Syed Ibrahim Hashmi','7396199405','Bk reddy colony ','','Mahabubnagar','Telangana','509001',16.7403003,78.0079772,'2026-07-15 20:56:51',NULL,NULL,NULL,NULL); INSERT INTO "addresses" ("id","user_id","is_default","name","phone","address_line1","address_line2","city","state","pincode","latitude","longitude","created_at","zone_id","admin_latitude","admin_longitude","google_maps_url") VALUES(511,696,0,'Meraj ','8099235943','Rajendra Nagar، near railway station mahabunag ','1-3-75/38','Mahabubnagar','Telangana','509001',NULL,NULL,'2026-07-16 08:21:40',NULL,NULL,NULL,NULL); INSERT INTO "addresses" ("id","user_id","is_default","name","phone","address_line1","address_line2","city","state","pincode","latitude","longitude","created_at","zone_id","admin_latitude","admin_longitude","google_maps_url") VALUES(512,683,0,'Abdul raheem','7675938678','H.no: 5-4-85/F14/4','Opp Amena masjid, Tayyab nagar','Mahabubnagar','Telangana','509001',16.7375051,77.9926007,'2026-07-17 06:15:42',NULL,NULL,NULL,NULL); @@ -766,7 +766,7 @@ INSERT INTO "addresses" ("id","user_id","is_default","name","phone","address_lin INSERT INTO "addresses" ("id","user_id","is_default","name","phone","address_line1","address_line2","city","state","pincode","latitude","longitude","created_at","zone_id","admin_latitude","admin_longitude","google_maps_url") VALUES(788,1203,0,'G Lingareddy ','9912090428','PBR residency 3rd floor b block 3016','Near pista House bypass 🛣️','Mahabubnagar','Telangana','509001',NULL,NULL,'2026-09-19 15:55:49',NULL,NULL,NULL,NULL); INSERT INTO "addresses" ("id","user_id","is_default","name","phone","address_line1","address_line2","city","state","pincode","latitude","longitude","created_at","zone_id","admin_latitude","admin_longitude","google_maps_url") VALUES(789,1204,1,'Anil Kumar','9182449569','Near SR mart, Dist Sagara (uppara) Committee Hall','Yenugonda','Mahabubnagar','Telangana','509001',16.7511042,78.0341519,'2026-09-20 01:17:59',NULL,NULL,NULL,NULL); INSERT INTO "addresses" ("id","user_id","is_default","name","phone","address_line1","address_line2","city","state","pincode","latitude","longitude","created_at","zone_id","admin_latitude","admin_longitude","google_maps_url") VALUES(790,1206,1,'M RAMANA','9553257224','Near Chaithanya Central school ','Yenugonda near Kendriya vidyalaya','Mahabubnagar','Telangana','509001',16.7621603,78.0462386,'2026-09-20 02:18:53',NULL,NULL,NULL,NULL); -INSERT INTO "addresses" ("id","user_id","is_default","name","phone","address_line1","address_line2","city","state","pincode","latitude","longitude","created_at","zone_id","admin_latitude","admin_longitude","google_maps_url") VALUES(791,1207,1,'Vijay','7989347494','1-6-9/3 palsab gutta opp lane to sri ramulu hospital','','Mahabubnagar','Telangana','509001',16.7535639,77.9991416,'2026-09-20 02:33:38',NULL,NULL,NULL,NULL); +INSERT INTO "addresses" ("id","user_id","is_default","name","phone","address_line1","address_line2","city","state","pincode","latitude","longitude","created_at","zone_id","admin_latitude","admin_longitude","google_maps_url") VALUES(791,1207,0,'Vijay','7989347494','1-6-9/3 palsab gutta opp lane to sri ramulu hospital','','Mahabubnagar','Telangana','509001',16.7535639,77.9991416,'2026-09-20 02:33:38',NULL,NULL,NULL,NULL); INSERT INTO "addresses" ("id","user_id","is_default","name","phone","address_line1","address_line2","city","state","pincode","latitude","longitude","created_at","zone_id","admin_latitude","admin_longitude","google_maps_url") VALUES(792,1208,0,'Teja sri','7601018548','Ayodhya nagar colony ','Christanpally','Mahabubnagar','Telangana','509001',16.7258081,78.0096389,'2026-09-20 03:19:17',NULL,16.7254208,78.0097279,'https://maps.app.goo.gl/ESZA7HD9z6e9R5yH7'); INSERT INTO "addresses" ("id","user_id","is_default","name","phone","address_line1","address_line2","city","state","pincode","latitude","longitude","created_at","zone_id","admin_latitude","admin_longitude","google_maps_url") VALUES(793,1048,0,'G Umesh Kumar ','9912564056','Market Road','Near Samreen Chickhen Center','Mahabubnagar','Telangana','509001',16.7475781,77.9854545,'2026-09-20 03:39:19',NULL,NULL,NULL,NULL); INSERT INTO "addresses" ("id","user_id","is_default","name","phone","address_line1","address_line2","city","state","pincode","latitude","longitude","created_at","zone_id","admin_latitude","admin_longitude","google_maps_url") VALUES(794,1209,1,'Swetha ','6301975348','Ayodhya nagar chirstian pally','Hunman temple ','Mahabubnagar','Telangana','509001',16.7248072,78.0079245,'2026-09-20 03:44:49',NULL,NULL,NULL,NULL); @@ -810,7 +810,7 @@ INSERT INTO "addresses" ("id","user_id","is_default","name","phone","address_lin INSERT INTO "addresses" ("id","user_id","is_default","name","phone","address_line1","address_line2","city","state","pincode","latitude","longitude","created_at","zone_id","admin_latitude","admin_longitude","google_maps_url") VALUES(832,1240,1,'Hafsa ','8121052035','4-1-116/7/e/1','Nimra cafe, Ramaiah bowli','Mahabubnagar','Telangana','509001',16.74141140037474,77.99183470574646,'2026-09-26 13:00:07',NULL,NULL,NULL,NULL); INSERT INTO "addresses" ("id","user_id","is_default","name","phone","address_line1","address_line2","city","state","pincode","latitude","longitude","created_at","zone_id","admin_latitude","admin_longitude","google_maps_url") VALUES(833,1255,1,'M umadevi','7382268404','Near chaithanya central school','Srieam colony yenugonda','Mahabubnagar','Telangana','509001',16.7621669,78.0461954,'2026-09-27 01:41:06',NULL,NULL,NULL,NULL); INSERT INTO "addresses" ("id","user_id","is_default","name","phone","address_line1","address_line2","city","state","pincode","latitude","longitude","created_at","zone_id","admin_latitude","admin_longitude","google_maps_url") VALUES(834,1256,1,'C vinodkumar ','9985440716','Flatno 416,manatown apartments','Nalanda autostart,shashabgutta','Mahabubnagar','Telangana','509001',NULL,NULL,'2026-09-27 01:56:09',NULL,NULL,NULL,NULL); -INSERT INTO "addresses" ("id","user_id","is_default","name","phone","address_line1","address_line2","city","state","pincode","latitude","longitude","created_at","zone_id","admin_latitude","admin_longitude","google_maps_url") VALUES(835,1257,0,'Hajra','6302068018','1-1-81/A4','Mothinagar','Mahabubnagar','Telangana','509001',16.7557058,77.9933981,'2026-09-27 02:41:05',NULL,NULL,NULL,NULL); +INSERT INTO "addresses" ("id","user_id","is_default","name","phone","address_line1","address_line2","city","state","pincode","latitude","longitude","created_at","zone_id","admin_latitude","admin_longitude","google_maps_url") VALUES(835,1257,0,'Hajra','6302068018','1-1-81/A4','Mothinagar','Mahabubnagar','Telangana','509001',16.7557058,77.9933981,'2026-09-27 02:41:05',NULL,16.755685,77.9933083,NULL); INSERT INTO "addresses" ("id","user_id","is_default","name","phone","address_line1","address_line2","city","state","pincode","latitude","longitude","created_at","zone_id","admin_latitude","admin_longitude","google_maps_url") VALUES(836,1258,1,'Kusuma','9701920124','7-5-18','Venkateshwara colony ','Mahabubnagar','Telangana','509001',NULL,NULL,'2026-09-27 03:11:52',NULL,16.7555812,78.0143206,NULL); INSERT INTO "addresses" ("id","user_id","is_default","name","phone","address_line1","address_line2","city","state","pincode","latitude","longitude","created_at","zone_id","admin_latitude","admin_longitude","google_maps_url") VALUES(837,1259,1,'Samyukta','9704905100','H.No 14-2-90/68/B, Srirama colony',' christianpally','Mahabubnagar','Telangana','509001',NULL,NULL,'2026-09-27 03:37:20',NULL,16.7282973,78.0135654,NULL); INSERT INTO "addresses" ("id","user_id","is_default","name","phone","address_line1","address_line2","city","state","pincode","latitude","longitude","created_at","zone_id","admin_latitude","admin_longitude","google_maps_url") VALUES(838,1261,0,'Devayani','9951464320','Christian pally , double bed room','Bhagiratha , adharshnagar','Mahabubnagar','Telangana','509001',16.7191348,78.0111408,'2026-09-27 04:32:42',NULL,NULL,NULL,NULL); @@ -856,6 +856,8 @@ INSERT INTO "addresses" ("id","user_id","is_default","name","phone","address_lin INSERT INTO "addresses" ("id","user_id","is_default","name","phone","address_line1","address_line2","city","state","pincode","latitude","longitude","created_at","zone_id","admin_latitude","admin_longitude","google_maps_url") VALUES(878,1313,0,'vamshi','8523031242','House no. 14-3-68, NEAR Fatima vidhyalayam school, christianpally Ayodhyanagar','','Mahabubnagar','Telangana','509001',16.7263356,78.0086242,'2026-10-10 08:59:42',NULL,NULL,NULL,NULL); INSERT INTO "addresses" ("id","user_id","is_default","name","phone","address_line1","address_line2","city","state","pincode","latitude","longitude","created_at","zone_id","admin_latitude","admin_longitude","google_maps_url") VALUES(879,1316,1,'Mudassir ','8688942045','10-7-17/2, Near SV Mart, Srinivasa Colony','','Mahabubnagar','Telangana','509001',NULL,NULL,'2026-10-10 17:58:52',NULL,16.7512383,78.0254683,'https://maps.app.goo.gl/EW66q4XDntduJ24T7?g_st=ac'); INSERT INTO "addresses" ("id","user_id","is_default","name","phone","address_line1","address_line2","city","state","pincode","latitude","longitude","created_at","zone_id","admin_latitude","admin_longitude","google_maps_url") VALUES(880,1160,0,'SHANKAR','9505751237','8-5-42/A Dhanalaxmi Colony ','Abhaya Anjaneya Swamy temple,Teachers colony Mettugadda ','Mahabubnagar','Telangana','509001',16.7489837,78.0153721,'2026-10-11 08:48:07',NULL,NULL,NULL,NULL); +INSERT INTO "addresses" ("id","user_id","is_default","name","phone","address_line1","address_line2","city","state","pincode","latitude","longitude","created_at","zone_id","admin_latitude","admin_longitude","google_maps_url") VALUES(881,679,0,'Priyanka ','8919926863','Sarika township ','','Mahabubnagar','Telangana','509001',16.7112532,78.0250534,'2026-10-12 04:15:13',NULL,NULL,NULL,NULL); +INSERT INTO "addresses" ("id","user_id","is_default","name","phone","address_line1","address_line2","city","state","pincode","latitude","longitude","created_at","zone_id","admin_latitude","admin_longitude","google_maps_url") VALUES(882,1207,1,'Vijay','7989347494','1-6-9/3 palsab gutta','Opp lane to sri ramulu hospital','Mahabubnagar','Telangana','509001',NULL,NULL,'2026-10-12 05:03:14',NULL,NULL,NULL,NULL); CREATE TABLE IF NOT EXISTS "complaints" ("id" INTEGER PRIMARY KEY, "user_id" INTEGER NOT NULL, "order_id" INTEGER, "complaint_body" TEXT NOT NULL, "is_resolved" INTEGER NOT NULL DEFAULT false, "created_at" TEXT NOT NULL DEFAULT CURRENT_TIMESTAMP, "response" TEXT, "images" TEXT); INSERT INTO "complaints" ("id","user_id","order_id","complaint_body","is_resolved","created_at","response","images") VALUES(4,17,NULL,'Hello',1,'2025-12-19T08:34:32.924Z','Hi',NULL); INSERT INTO "complaints" ("id","user_id","order_id","complaint_body","is_resolved","created_at","response","images") VALUES(5,17,NULL,'Hello',1,'2025-12-19T09:32:59.187Z','','["complaint-images/1766136777180-0"]'); @@ -2756,6 +2758,16 @@ INSERT INTO "delivery_slot_info" ("id","delivery_time","freeze_time","is_active" INSERT INTO "delivery_slot_info" ("id","delivery_time","freeze_time","is_active","delivery_sequence","is_flash","group_ids","is_capacity_full","sku_ids") VALUES(2046,'2026-10-12T10:30:00.000Z','2026-10-12T10:00:00.000Z',1,'{}',0,'[12,11,10,9,8,5]',0,'[1,2,3,5,7,8,9,10,11,13,16,17,18,19,21,22,23,24,25,26,27,28,29,30,31,32,33,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,76,77,78,79,80,81,82,88,89,90,91,92,94,95,96,97,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,129,130,131,132,133,134,135,136,137,138,139,140,141,144,145,146,147,148,149]'); INSERT INTO "delivery_slot_info" ("id","delivery_time","freeze_time","is_active","delivery_sequence","is_flash","group_ids","is_capacity_full","sku_ids") VALUES(2047,'2026-10-12T12:30:00.000Z','2026-10-12T12:00:00.000Z',1,'{}',0,'[12,11,10,9,5]',0,'[129,130,131,132,133,134,135,104,105,106,107,108,109,110,111,112,113,114,115,116,117,118,119,120,121,122,123,124,148,6,7,8,11,13,25,26,38,39,43,44,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,73,96,100,125,126,9,22,81,82,102,2,3,10,21,23,24,36,40,41,42,80,137]'); INSERT INTO "delivery_slot_info" ("id","delivery_time","freeze_time","is_active","delivery_sequence","is_flash","group_ids","is_capacity_full","sku_ids") VALUES(2048,'2026-10-12T13:30:00.000Z','2026-10-12T13:00:00.000Z',1,'{}',0,'[12,11,10,9,5]',0,'[2,3,6,7,8,9,10,11,13,21,22,23,24,25,26,36,38,39,40,41,42,43,44,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,73,80,81,82,96,100,102,104,105,106,107,108,109,110,111,112,113,114,115,116,117,118,119,120,121,122,123,124,125,126,129,130,131,132,133,134,135,137,148]'); +INSERT INTO "delivery_slot_info" ("id","delivery_time","freeze_time","is_active","delivery_sequence","is_flash","group_ids","is_capacity_full","sku_ids") VALUES(2049,'2026-10-13T01:30:00.000Z','2026-10-13T01:20:00.000Z',1,'{}',0,'[9,8,7,5]',0,'[9,22,81,82,102,5,6,13,16,17,18,19,27,28,29,30,31,32,33,37,45,64,65,66,67,68,69,70,71,72,74,76,77,78,79,88,89,90,91,92,94,95,97,101,103,127,144,145,146,4,14,35,86,98,99,2,3,10,21,23,24,36,40,41,42,80,137,149,147,140,139,138,136]'); +INSERT INTO "delivery_slot_info" ("id","delivery_time","freeze_time","is_active","delivery_sequence","is_flash","group_ids","is_capacity_full","sku_ids") VALUES(2050,'2026-10-13T02:30:00.000Z','2026-10-13T02:20:00.000Z',1,'{}',0,'[12,11,10,9,8,7,5]',0,'[129,130,131,132,133,134,135,104,105,106,107,108,109,110,111,112,113,114,115,116,117,118,119,120,121,122,123,124,148,6,7,8,11,13,25,26,38,39,43,44,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,73,96,100,125,126,9,22,81,82,102,5,16,17,18,19,27,28,29,30,31,32,33,37,45,64,65,66,67,68,69,70,71,72,74,76,77,78,79,88,89,90,91,92,94,95,97,101,103,127,144,145,146,4,14,35,86,98,99,2,3,10,21,23,24,36,40,41,42,80,137,149,147,141,140,139,138,136]'); +INSERT INTO "delivery_slot_info" ("id","delivery_time","freeze_time","is_active","delivery_sequence","is_flash","group_ids","is_capacity_full","sku_ids") VALUES(2051,'2026-10-13T05:30:00.000Z','2026-10-13T05:20:00.000Z',1,'{}',0,'[12,11,10,9,8,7,5]',0,'[129,130,131,132,133,134,135,104,105,106,107,108,109,110,111,112,113,114,115,116,117,118,119,120,121,122,123,124,148,6,7,8,11,13,25,26,38,39,43,44,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,73,96,100,125,126,9,22,81,82,102,5,16,17,18,19,27,28,29,30,31,32,33,37,45,64,65,66,67,68,69,70,71,72,74,76,77,78,79,88,89,90,91,92,94,95,97,101,103,127,144,145,146,4,14,35,86,98,99,2,3,10,21,23,24,36,40,41,42,80,137,149,147,141,140,139,138,136]'); +INSERT INTO "delivery_slot_info" ("id","delivery_time","freeze_time","is_active","delivery_sequence","is_flash","group_ids","is_capacity_full","sku_ids") VALUES(2052,'2026-10-13T06:30:00.000Z','2026-10-13T06:20:00.000Z',1,'{}',0,'[12,11,10,9,8,7,5]',0,'[129,130,131,132,133,134,135,104,105,106,107,108,109,110,111,112,113,114,115,116,117,118,119,120,121,122,123,124,148,6,7,8,11,13,25,26,38,39,43,44,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,73,96,100,125,126,9,22,81,82,102,5,16,17,18,19,27,28,29,30,31,32,33,37,45,64,65,66,67,68,69,70,71,72,74,76,77,78,79,88,89,90,91,92,94,95,97,101,103,127,144,145,146,4,14,35,86,98,99,2,3,10,21,23,24,36,40,41,42,80,137,149,147,141,140,139,138,136]'); +INSERT INTO "delivery_slot_info" ("id","delivery_time","freeze_time","is_active","delivery_sequence","is_flash","group_ids","is_capacity_full","sku_ids") VALUES(2053,'2026-10-13T09:30:00.000Z','2026-10-13T09:20:00.000Z',1,'{}',0,'[12,11,10,9,8,5]',0,'[129,130,131,132,133,134,135,104,105,106,107,108,109,110,111,112,113,114,115,116,117,118,119,120,121,122,123,124,148,6,7,8,11,13,25,26,38,39,43,44,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,73,96,100,125,126,9,22,81,82,102,5,16,17,18,19,27,28,29,30,31,32,33,37,45,64,65,66,67,68,69,70,71,72,74,76,77,78,79,88,89,90,91,92,94,95,97,101,103,127,144,145,146,2,3,10,21,23,24,36,40,41,42,80,137,149,147,141,140,139,138,136]'); +INSERT INTO "delivery_slot_info" ("id","delivery_time","freeze_time","is_active","delivery_sequence","is_flash","group_ids","is_capacity_full","sku_ids") VALUES(2054,'2026-10-13T10:30:00.000Z','2026-10-13T10:20:00.000Z',1,'{}',0,'[12,11,10,9,8,5]',0,'[129,130,131,132,133,134,135,104,105,106,107,108,109,110,111,112,113,114,115,116,117,118,119,120,121,122,123,124,148,7,8,11,13,25,26,38,39,43,44,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,73,96,100,125,126,9,22,81,82,102,5,16,17,18,19,27,28,29,30,31,32,33,37,45,64,65,66,67,68,69,70,71,72,74,76,77,78,79,88,89,90,91,92,94,95,97,101,103,127,144,145,146,2,3,10,21,23,24,36,40,41,42,80,137,149,147,141,140,139,136,138]'); +INSERT INTO "delivery_slot_info" ("id","delivery_time","freeze_time","is_active","delivery_sequence","is_flash","group_ids","is_capacity_full","sku_ids") VALUES(2055,'2026-10-13T12:30:00.000Z','2026-10-13T12:20:00.000Z',1,'{}',0,'[12,11,10,9,5]',0,'[129,130,131,132,133,134,135,104,105,106,107,108,109,110,111,112,113,114,115,116,117,118,119,120,121,122,123,124,148,6,7,8,11,13,25,26,38,39,43,44,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,73,96,100,125,126,9,22,81,82,102,2,3,10,21,23,24,36,40,41,42,80,137,141]'); +INSERT INTO "delivery_slot_info" ("id","delivery_time","freeze_time","is_active","delivery_sequence","is_flash","group_ids","is_capacity_full","sku_ids") VALUES(2056,'2026-10-13T13:30:00.000Z','2026-10-13T13:20:00.000Z',1,'{}',0,'[12,11,10,9,5]',0,'[129,130,131,132,133,134,135,104,105,106,107,108,109,110,111,112,113,114,115,116,117,118,119,120,121,122,123,124,148,6,7,8,11,13,25,26,38,39,43,44,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,73,96,100,125,126,9,22,81,82,102,2,3,10,21,23,24,36,40,41,42,80,137,141]'); +INSERT INTO "delivery_slot_info" ("id","delivery_time","freeze_time","is_active","delivery_sequence","is_flash","group_ids","is_capacity_full","sku_ids") VALUES(2057,'2026-10-14T01:30:00.000Z','2026-10-14T01:20:00.000Z',1,'{}',0,'[9,8,7,5]',0,'[9,22,81,82,102,5,6,13,16,17,18,19,27,28,29,30,31,32,33,37,45,64,65,66,67,68,69,70,71,72,74,76,77,78,79,88,89,90,91,92,94,95,97,101,103,127,144,145,146,4,14,35,86,98,99,2,3,10,21,23,24,36,40,41,42,80,137,149,147,140,139,138,136]'); +INSERT INTO "delivery_slot_info" ("id","delivery_time","freeze_time","is_active","delivery_sequence","is_flash","group_ids","is_capacity_full","sku_ids") VALUES(2058,'2026-10-14T02:30:00.000Z','2026-10-14T02:20:00.000Z',1,'{}',0,'[12,11,10,9,8,7,5]',0,'[129,130,131,132,133,134,135,104,105,106,107,108,109,110,111,112,113,114,115,116,117,118,119,120,121,122,123,124,148,6,7,8,11,13,25,26,38,39,43,44,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,73,96,100,125,126,9,22,81,82,102,5,16,17,18,19,27,28,29,30,31,32,33,37,45,64,65,66,67,68,69,70,71,72,74,76,77,78,79,88,89,90,91,92,94,95,97,101,103,127,144,145,146,4,14,35,86,98,99,2,3,10,21,23,24,36,40,41,42,80,137,149,147,141,140,139,138,136]'); CREATE TABLE IF NOT EXISTS "home_banners" ("id" INTEGER PRIMARY KEY, "name" TEXT NOT NULL, "image_url" TEXT NOT NULL, "description" TEXT, "redirect_url" TEXT, "serial_num" INTEGER, "is_active" INTEGER NOT NULL DEFAULT false, "created_at" TEXT NOT NULL DEFAULT CURRENT_TIMESTAMP, "last_updated" TEXT NOT NULL DEFAULT CURRENT_TIMESTAMP, "sku_ids" TEXT); INSERT INTO "home_banners" ("id","name","image_url","description","redirect_url","serial_num","is_active","created_at","last_updated","sku_ids") VALUES(9,'10%off ','1770281046297.jpg',NULL,NULL,NULL,0,'2026-02-05T08:44:06.996Z','2026-09-04T15:04:56.030Z','[1,2,3,4,5,6,8,7,9,11,13,12,10]'); INSERT INTO "home_banners" ("id","name","image_url","description","redirect_url","serial_num","is_active","created_at","last_updated","sku_ids") VALUES(11,'Daily veggies ','store-images/1770429593455.jpg','Under 19 ',NULL,3,0,'2026-02-07T01:59:57.566Z','2026-08-19T04:14:07.794Z','[45,72,76,97,70,32,74,77,33]'); @@ -2768,7 +2780,7 @@ INSERT INTO "key_val_store" ("key","value") VALUES('deliveryCharge','15'); INSERT INTO "key_val_store" ("key","value") VALUES('flashDeliveryCharge','39.0'); INSERT INTO "key_val_store" ("key","value") VALUES('flashFreeDeliveryThreshold','399'); INSERT INTO "key_val_store" ("key","value") VALUES('freeDeliveryThreshold','249'); -INSERT INTO "key_val_store" ("key","value") VALUES('isFlashDeliveryEnabled','false'); +INSERT INTO "key_val_store" ("key","value") VALUES('isFlashDeliveryEnabled','true'); INSERT INTO "key_val_store" ("key","value") VALUES('minRegularOrderValue','249'); INSERT INTO "key_val_store" ("key","value") VALUES('playStoreUrl','https://info.freshyo.in/qr-based-download'); INSERT INTO "key_val_store" ("key","value") VALUES('popularItems','40,109,9,75,98,6,24,59'); @@ -2777,9 +2789,9 @@ INSERT INTO "key_val_store" ("key","value") VALUES('supportEmail','qushammohd@gm INSERT INTO "key_val_store" ("key","value") VALUES('supportMobile','9000885620'); INSERT INTO "key_val_store" ("key","value") VALUES('tester','value41'); INSERT INTO "key_val_store" ("key","value") VALUES('versionNum','1.2.0'); -INSERT INTO "key_val_store" ("key","value") VALUES('cache_version','768'); -INSERT INTO "key_val_store" ("key","value") VALUES('slots_version_num','655'); -INSERT INTO "key_val_store" ("key","value") VALUES('availability_version_num','109'); +INSERT INTO "key_val_store" ("key","value") VALUES('cache_version','769'); +INSERT INTO "key_val_store" ("key","value") VALUES('slots_version_num','666'); +INSERT INTO "key_val_store" ("key","value") VALUES('availability_version_num','110'); INSERT INTO "key_val_store" ("key","value") VALUES('tagsOrder','9,1,2,4,5,8,3,7,6'); CREATE TABLE IF NOT EXISTS "notif_creds" ("id" INTEGER PRIMARY KEY, "token" TEXT NOT NULL, "added_at" TEXT NOT NULL DEFAULT CURRENT_TIMESTAMP, "user_id" INTEGER NOT NULL, "last_verified" TEXT); INSERT INTO "notif_creds" ("id","token","added_at","user_id","last_verified") VALUES(3,'ExponentPushToken[iv6POIJTUIiGpkElL84fG7]','2026-02-07T16:46:24.831Z',7,'2026-10-10T17:57:30.367Z'); @@ -2803,25 +2815,25 @@ INSERT INTO "notif_creds" ("id","token","added_at","user_id","last_verified") VA INSERT INTO "notif_creds" ("id","token","added_at","user_id","last_verified") VALUES(24,'ExponentPushToken[B2zWnHNaumIgbeFFKO-15D]','2026-02-09T19:53:37.594Z',113,'2026-02-10T07:43:48.632Z'); INSERT INTO "notif_creds" ("id","token","added_at","user_id","last_verified") VALUES(25,'ExponentPushToken[wIhrdlAmwj0Eytvz3W3TTZ]','2026-02-10T11:09:24.848Z',127,'2026-04-18T06:53:49.329Z'); INSERT INTO "notif_creds" ("id","token","added_at","user_id","last_verified") VALUES(26,'ExponentPushToken[hFUlPFOKMdAUgtDP7EtSzM]','2026-02-10T11:33:43.821Z',3,'2026-02-24T11:16:46.799Z'); -INSERT INTO "notif_creds" ("id","token","added_at","user_id","last_verified") VALUES(27,'ExponentPushToken[NymZTEED3G7YCyDg7ihgBA]','2026-02-11T03:16:04.540Z',2,'2026-10-11T13:24:38.971Z'); +INSERT INTO "notif_creds" ("id","token","added_at","user_id","last_verified") VALUES(27,'ExponentPushToken[NymZTEED3G7YCyDg7ihgBA]','2026-02-11T03:16:04.540Z',2,'2026-10-13T01:59:56.710Z'); INSERT INTO "notif_creds" ("id","token","added_at","user_id","last_verified") VALUES(28,'ExponentPushToken[ARCT4KD7CJ_pFF_GkywepP]','2026-02-11T11:34:32.238Z',115,'2026-10-11T08:16:00.995Z'); INSERT INTO "notif_creds" ("id","token","added_at","user_id","last_verified") VALUES(29,'ExponentPushToken[NN4v16BFslBX8ryVXDwQIg]','2026-02-12T08:46:42.421Z',128,'2026-02-17T19:04:12.936Z'); INSERT INTO "notif_creds" ("id","token","added_at","user_id","last_verified") VALUES(30,'ExponentPushToken[qbteKBC1wbLMCe1ltpul7u]','2026-02-12T13:28:00.376Z',129,'2026-02-12T13:28:00.375Z'); -INSERT INTO "notif_creds" ("id","token","added_at","user_id","last_verified") VALUES(31,'ExponentPushToken[PfjMc_CTRvSvOWtSNmaHhL]','2026-02-14T10:25:41.451Z',131,'2026-10-11T12:52:17.790Z'); +INSERT INTO "notif_creds" ("id","token","added_at","user_id","last_verified") VALUES(31,'ExponentPushToken[PfjMc_CTRvSvOWtSNmaHhL]','2026-02-14T10:25:41.451Z',131,'2026-10-13T06:20:51.433Z'); INSERT INTO "notif_creds" ("id","token","added_at","user_id","last_verified") VALUES(32,'ExponentPushToken[dugZtvNyRBevvIcQED783-]','2026-02-14T18:42:44.549Z',120,'2026-10-11T03:28:44.506Z'); -INSERT INTO "notif_creds" ("id","token","added_at","user_id","last_verified") VALUES(33,'ExponentPushToken[5AOIo1AxGkk5zpoVANRRxq]','2026-02-15T04:35:26.237Z',132,'2026-10-10T12:29:32.906Z'); +INSERT INTO "notif_creds" ("id","token","added_at","user_id","last_verified") VALUES(33,'ExponentPushToken[5AOIo1AxGkk5zpoVANRRxq]','2026-02-15T04:35:26.237Z',132,'2026-10-13T04:51:49.909Z'); INSERT INTO "notif_creds" ("id","token","added_at","user_id","last_verified") VALUES(34,'ExponentPushToken[1ZJ_ubPRINgtgfF4JcRz7Q]','2026-02-15T06:45:32.122Z',133,'2026-02-15T06:45:32.121Z'); INSERT INTO "notif_creds" ("id","token","added_at","user_id","last_verified") VALUES(35,'ExponentPushToken[pIQ2waNDjjSHjQYJbXKD8m]','2026-02-15T07:14:10.912Z',9,'2026-02-15T07:14:10.910Z'); INSERT INTO "notif_creds" ("id","token","added_at","user_id","last_verified") VALUES(37,'ExponentPushToken[kq0I8ADfcQ4VcsZ0yK0Mlc]','2026-02-16T04:01:56.375Z',102,'2026-07-05T14:39:51.366Z'); INSERT INTO "notif_creds" ("id","token","added_at","user_id","last_verified") VALUES(38,'ExponentPushToken[8wH85rFtQRMk7ciFszmirX]','2026-02-16T09:30:32.930Z',134,'2026-09-08T07:22:34.339Z'); -INSERT INTO "notif_creds" ("id","token","added_at","user_id","last_verified") VALUES(39,'ExponentPushToken[YJRSQmMUEUbaI2VCZLaoN_]','2026-02-16T09:49:56.439Z',6,'2026-10-11T07:45:56.290Z'); +INSERT INTO "notif_creds" ("id","token","added_at","user_id","last_verified") VALUES(39,'ExponentPushToken[YJRSQmMUEUbaI2VCZLaoN_]','2026-02-16T09:49:56.439Z',6,'2026-10-13T05:14:17.480Z'); INSERT INTO "notif_creds" ("id","token","added_at","user_id","last_verified") VALUES(40,'ExponentPushToken[QoWbURL2N8-3jRhQwfnRP_]','2026-02-17T08:59:14.561Z',135,'2026-02-17T08:59:14.561Z'); INSERT INTO "notif_creds" ("id","token","added_at","user_id","last_verified") VALUES(41,'ExponentPushToken[sz_g75Il_CNAG6KpEAxYUH]','2026-02-17T12:56:33.589Z',136,'2026-02-21T08:42:45.220Z'); INSERT INTO "notif_creds" ("id","token","added_at","user_id","last_verified") VALUES(42,'ExponentPushToken[JMEvkUHKT0n34hcs-MiJAJ]','2026-02-17T14:22:02.805Z',137,'2026-02-17T18:35:14.821Z'); INSERT INTO "notif_creds" ("id","token","added_at","user_id","last_verified") VALUES(43,'ExponentPushToken[1msqBjJghAi4y8iYwJU-mS]','2026-02-17T14:36:43.131Z',138,'2026-02-23T07:55:49.796Z'); INSERT INTO "notif_creds" ("id","token","added_at","user_id","last_verified") VALUES(44,'ExponentPushToken[Wvc-xZKA5atNZTuIldtSIw]','2026-02-17T14:52:56.267Z',139,'2026-02-22T09:24:47.956Z'); INSERT INTO "notif_creds" ("id","token","added_at","user_id","last_verified") VALUES(45,'ExponentPushToken[cZOImkGKtoAxHQZgVtqP2K]','2026-02-17T19:17:10.364Z',140,'2026-02-20T09:47:44.482Z'); -INSERT INTO "notif_creds" ("id","token","added_at","user_id","last_verified") VALUES(46,'ExponentPushToken[Z9RdieHVKXjshIx5Fde2N_]','2026-02-18T01:14:42.642Z',141,'2026-10-09T02:43:00.335Z'); +INSERT INTO "notif_creds" ("id","token","added_at","user_id","last_verified") VALUES(46,'ExponentPushToken[Z9RdieHVKXjshIx5Fde2N_]','2026-02-18T01:14:42.642Z',141,'2026-10-12T03:44:37.150Z'); INSERT INTO "notif_creds" ("id","token","added_at","user_id","last_verified") VALUES(47,'ExponentPushToken[y_gztJB3YIgxaTIe90h081]','2026-02-18T03:09:14.285Z',26,'2026-08-29T06:18:28.107Z'); INSERT INTO "notif_creds" ("id","token","added_at","user_id","last_verified") VALUES(48,'ExponentPushToken[PwdA7uENlBKK9zfX0IUQHX]','2026-02-18T03:53:25.609Z',142,'2026-02-18T03:58:05.274Z'); INSERT INTO "notif_creds" ("id","token","added_at","user_id","last_verified") VALUES(49,'ExponentPushToken[I9t84QIYuJ2wkBXTQCrWiO]','2026-02-18T04:24:14.079Z',143,'2026-02-20T07:23:38.305Z'); @@ -2937,7 +2949,7 @@ INSERT INTO "notif_creds" ("id","token","added_at","user_id","last_verified") VA INSERT INTO "notif_creds" ("id","token","added_at","user_id","last_verified") VALUES(178,'ExponentPushToken[7GSJrGD9NaX281KgJzBLLH]','2026-03-03T14:06:35.808Z',253,'2026-03-03T14:06:35.807Z'); INSERT INTO "notif_creds" ("id","token","added_at","user_id","last_verified") VALUES(179,'ExponentPushToken[UcUA5tEEV70FB2Ntz-oFJ2]','2026-03-03T16:06:53.662Z',254,'2026-03-20T07:56:23.132Z'); INSERT INTO "notif_creds" ("id","token","added_at","user_id","last_verified") VALUES(181,'ExponentPushToken[1ls_ZXJwn3uuvQh4ePvAne]','2026-03-04T04:13:02.637Z',255,'2026-03-04T04:20:17.120Z'); -INSERT INTO "notif_creds" ("id","token","added_at","user_id","last_verified") VALUES(182,'ExponentPushToken[M_HyPqPheUp3I3i9Z5stZt]','2026-03-04T08:31:03.048Z',256,'2026-10-06T06:23:50.978Z'); +INSERT INTO "notif_creds" ("id","token","added_at","user_id","last_verified") VALUES(182,'ExponentPushToken[M_HyPqPheUp3I3i9Z5stZt]','2026-03-04T08:31:03.048Z',256,'2026-10-13T06:15:13.381Z'); INSERT INTO "notif_creds" ("id","token","added_at","user_id","last_verified") VALUES(183,'ExponentPushToken[qvh_3nP9G4GL0AEDqg7SGg]','2026-03-04T09:19:36.095Z',257,'2026-03-10T19:55:04.631Z'); INSERT INTO "notif_creds" ("id","token","added_at","user_id","last_verified") VALUES(184,'ExponentPushToken[E_ph_sC9qUQOUhnQmTcaCO]','2026-03-04T09:38:31.976Z',258,'2026-03-16T12:25:30.120Z'); INSERT INTO "notif_creds" ("id","token","added_at","user_id","last_verified") VALUES(185,'ExponentPushToken[GrgPQsDgwa5N3D4zYWM6Bq]','2026-03-04T10:37:39.397Z',259,'2026-03-09T15:41:51.843Z'); @@ -2979,7 +2991,7 @@ INSERT INTO "notif_creds" ("id","token","added_at","user_id","last_verified") VA INSERT INTO "notif_creds" ("id","token","added_at","user_id","last_verified") VALUES(227,'ExponentPushToken[KrzenZDKrmKjs9nnlDdqVp]','2026-03-18T12:07:56.003Z',295,'2026-03-20T16:17:15.569Z'); INSERT INTO "notif_creds" ("id","token","added_at","user_id","last_verified") VALUES(228,'ExponentPushToken[6jP5awEVcOkUF3xzx3sY7g]','2026-03-18T14:53:18.855Z',296,'2026-03-20T15:10:45.983Z'); INSERT INTO "notif_creds" ("id","token","added_at","user_id","last_verified") VALUES(229,'ExponentPushToken[SjZtCwG48V9kckmazhCxBU]','2026-03-18T15:00:21.098Z',297,'2026-03-18T15:00:21.097Z'); -INSERT INTO "notif_creds" ("id","token","added_at","user_id","last_verified") VALUES(230,'ExponentPushToken[4VLV_PLSbgxLfKYSwZHxpk]','2026-03-19T09:24:17.902Z',299,'2026-10-10T12:35:51.773Z'); +INSERT INTO "notif_creds" ("id","token","added_at","user_id","last_verified") VALUES(230,'ExponentPushToken[4VLV_PLSbgxLfKYSwZHxpk]','2026-03-19T09:24:17.902Z',299,'2026-10-13T01:20:07.686Z'); INSERT INTO "notif_creds" ("id","token","added_at","user_id","last_verified") VALUES(231,'ExponentPushToken[YZHGJjG1PTLMLMrm4X4YAv]','2026-03-19T10:02:09.265Z',300,'2026-03-20T11:21:41.947Z'); INSERT INTO "notif_creds" ("id","token","added_at","user_id","last_verified") VALUES(233,'ExponentPushToken[QzIvHhP38LpZlCk4Yoy7YW]','2026-03-20T06:54:00.415Z',227,'2026-03-21T15:29:41.502Z'); INSERT INTO "notif_creds" ("id","token","added_at","user_id","last_verified") VALUES(236,'ExponentPushToken[aYViaUOIQOkf4RLpcMFgWY]','2026-03-21T01:24:29.259Z',303,'2026-03-26T15:13:31.451Z'); @@ -3071,7 +3083,7 @@ INSERT INTO "notif_creds" ("id","token","added_at","user_id","last_verified") VA INSERT INTO "notif_creds" ("id","token","added_at","user_id","last_verified") VALUES(324,'ExponentPushToken[vWtCMdGn-7K6jWyQk2lFKx]','2026-04-24 01:12:19',389,'2026-09-13T04:46:40.892Z'); INSERT INTO "notif_creds" ("id","token","added_at","user_id","last_verified") VALUES(325,'ExponentPushToken[TJHw09Gpo526UDmzi9NQdO]','2026-04-24 12:52:45',392,'2026-06-01T06:19:48.396Z'); INSERT INTO "notif_creds" ("id","token","added_at","user_id","last_verified") VALUES(326,'ExponentPushToken[iZh0JmFuUYDghpLdjpvRW3]','2026-04-25 09:42:12',311,'2026-10-09T09:09:27.937Z'); -INSERT INTO "notif_creds" ("id","token","added_at","user_id","last_verified") VALUES(327,'ExponentPushToken[tfiAuQDclBJ1ExvmA97AtP]','2026-04-26 05:27:43',178,'2026-10-11T02:40:19.924Z'); +INSERT INTO "notif_creds" ("id","token","added_at","user_id","last_verified") VALUES(327,'ExponentPushToken[tfiAuQDclBJ1ExvmA97AtP]','2026-04-26 05:27:43',178,'2026-10-13T07:01:14.162Z'); INSERT INTO "notif_creds" ("id","token","added_at","user_id","last_verified") VALUES(328,'ExponentPushToken[-TfvgjCm-H5f5KUd_dst3z]','2026-04-26 06:54:10',393,'2026-04-26T06:54:10.942Z'); INSERT INTO "notif_creds" ("id","token","added_at","user_id","last_verified") VALUES(329,'ExponentPushToken[YRUnjbHj5rGddo3s1Jt1w_]','2026-04-26 12:20:32',394,'2026-04-27T13:58:37.560Z'); INSERT INTO "notif_creds" ("id","token","added_at","user_id","last_verified") VALUES(330,'ExponentPushToken[Y-FOBnKHoufsS0qOs7JgIo]','2026-04-26 19:07:59',395,'2026-05-06T10:55:07.749Z'); @@ -3099,7 +3111,7 @@ INSERT INTO "notif_creds" ("id","token","added_at","user_id","last_verified") VA INSERT INTO "notif_creds" ("id","token","added_at","user_id","last_verified") VALUES(352,'ExponentPushToken[ARCT4KD7CJ_pFF_GkywepP]','2026-05-03 07:42:43',252,'2026-08-04T06:47:49.709Z'); INSERT INTO "notif_creds" ("id","token","added_at","user_id","last_verified") VALUES(353,'ExponentPushToken[7cM08dMnBGFHy6xI2JNg92]','2026-05-03 08:25:16',415,'2026-05-03T12:46:28.748Z'); INSERT INTO "notif_creds" ("id","token","added_at","user_id","last_verified") VALUES(354,'ExponentPushToken[1iTOA2PRmS1yXMkeACyNhn]','2026-05-03 08:35:06',414,'2026-06-11T02:08:20.049Z'); -INSERT INTO "notif_creds" ("id","token","added_at","user_id","last_verified") VALUES(355,'ExponentPushToken[hiF_0uHNzkgGH-mGGzfN2Y]','2026-05-03 17:18:45',416,'2026-10-11T13:49:45.297Z'); +INSERT INTO "notif_creds" ("id","token","added_at","user_id","last_verified") VALUES(355,'ExponentPushToken[hiF_0uHNzkgGH-mGGzfN2Y]','2026-05-03 17:18:45',416,'2026-10-12T16:43:06.171Z'); INSERT INTO "notif_creds" ("id","token","added_at","user_id","last_verified") VALUES(356,'ExponentPushToken[yBptF0NDaIJ6Zhf1IqyTUe]','2026-05-04 08:43:26',417,'2026-05-04T08:43:26.929Z'); INSERT INTO "notif_creds" ("id","token","added_at","user_id","last_verified") VALUES(357,'ExponentPushToken[b5wNLBOa8Jce4cOmzgvVMr]','2026-05-04 12:38:42',415,'2026-05-04T12:59:40.224Z'); INSERT INTO "notif_creds" ("id","token","added_at","user_id","last_verified") VALUES(358,'ExponentPushToken[Z9CZXEK7YJHkZexvhbYVdk]','2026-05-05 08:39:11',418,'2026-05-12T04:05:26.268Z'); @@ -3126,7 +3138,7 @@ INSERT INTO "notif_creds" ("id","token","added_at","user_id","last_verified") VA INSERT INTO "notif_creds" ("id","token","added_at","user_id","last_verified") VALUES(379,'ExponentPushToken[VY1lpUFK2Fw6V6aJ5LokIt]','2026-05-12 06:03:32',439,'2026-06-10T04:33:08.668Z'); INSERT INTO "notif_creds" ("id","token","added_at","user_id","last_verified") VALUES(380,'ExponentPushToken[GA8vDtGZGSLyXTIw8p73Z2]','2026-05-12 07:14:36',440,'2026-10-07T02:10:55.325Z'); INSERT INTO "notif_creds" ("id","token","added_at","user_id","last_verified") VALUES(381,'ExponentPushToken[nTI6kIOJyQjAEsl9kLdguv]','2026-05-12 08:40:29',441,'2026-05-15T17:29:56.071Z'); -INSERT INTO "notif_creds" ("id","token","added_at","user_id","last_verified") VALUES(382,'ExponentPushToken[BwD4IWC1zCruWA2ZZcRZ9n]','2026-05-13 02:12:47',444,'2026-09-28T14:24:54.242Z'); +INSERT INTO "notif_creds" ("id","token","added_at","user_id","last_verified") VALUES(382,'ExponentPushToken[BwD4IWC1zCruWA2ZZcRZ9n]','2026-05-13 02:12:47',444,'2026-10-13T05:27:00.418Z'); INSERT INTO "notif_creds" ("id","token","added_at","user_id","last_verified") VALUES(383,'ExponentPushToken[89CRhTI7hACC4Z7qHwx0Ol]','2026-05-13 04:22:12',96,'2026-05-13T04:22:12.371Z'); INSERT INTO "notif_creds" ("id","token","added_at","user_id","last_verified") VALUES(384,'ExponentPushToken[nWqqVRF6SKgTNTezkCW9pi]','2026-05-13 10:55:35',446,'2026-05-13T10:55:35.073Z'); INSERT INTO "notif_creds" ("id","token","added_at","user_id","last_verified") VALUES(385,'ExponentPushToken[kVgsNRKL-vXKdfihxkHK69]','2026-05-14 05:41:13',447,'2026-05-14T05:41:13.163Z'); @@ -3172,7 +3184,7 @@ INSERT INTO "notif_creds" ("id","token","added_at","user_id","last_verified") VA INSERT INTO "notif_creds" ("id","token","added_at","user_id","last_verified") VALUES(425,'ExponentPushToken[PowDUOG3Bormg6-1SBsuiu]','2026-05-22 03:17:23',491,'2026-05-30T07:59:12.100Z'); INSERT INTO "notif_creds" ("id","token","added_at","user_id","last_verified") VALUES(426,'ExponentPushToken[tioFveItRlA7fTirESkDg6]','2026-05-22 05:06:05',492,'2026-10-05T15:34:46.197Z'); INSERT INTO "notif_creds" ("id","token","added_at","user_id","last_verified") VALUES(427,'ExponentPushToken[FILgJIA4CF8h6Th5PrBj-m]','2026-05-22 06:32:38',493,'2026-07-31T14:01:28.590Z'); -INSERT INTO "notif_creds" ("id","token","added_at","user_id","last_verified") VALUES(428,'ExponentPushToken[ixGazvOfrCBIMFMjov2-qW]','2026-05-22 14:02:48',494,'2026-10-08T09:57:03.760Z'); +INSERT INTO "notif_creds" ("id","token","added_at","user_id","last_verified") VALUES(428,'ExponentPushToken[ixGazvOfrCBIMFMjov2-qW]','2026-05-22 14:02:48',494,'2026-10-12T14:06:34.564Z'); INSERT INTO "notif_creds" ("id","token","added_at","user_id","last_verified") VALUES(429,'ExponentPushToken[F8ugp5MHbdW2gq6IU-mTj9]','2026-05-23 06:59:51',496,'2026-05-23T06:59:51.427Z'); INSERT INTO "notif_creds" ("id","token","added_at","user_id","last_verified") VALUES(430,'ExponentPushToken[mYGulxOHjS3smtYG6104Gj]','2026-05-23 07:00:44',497,'2026-06-03T07:46:58.286Z'); INSERT INTO "notif_creds" ("id","token","added_at","user_id","last_verified") VALUES(431,'ExponentPushToken[e25COGDjnLy9hJWwyZ3lwN]','2026-05-23 07:06:01',498,'2026-07-20T13:47:26.421Z'); @@ -3358,7 +3370,7 @@ INSERT INTO "notif_creds" ("id","token","added_at","user_id","last_verified") VA INSERT INTO "notif_creds" ("id","token","added_at","user_id","last_verified") VALUES(611,'ExponentPushToken[FPAgKfBKS1sh8jq517sevp]','2026-07-08 12:22:26',677,'2026-07-17T10:21:58.054Z'); INSERT INTO "notif_creds" ("id","token","added_at","user_id","last_verified") VALUES(612,'ExponentPushToken[oIarlYEtOCUFkVSqcc53O3]','2026-07-08 15:14:41',54,'2026-07-08T15:14:41.913Z'); INSERT INTO "notif_creds" ("id","token","added_at","user_id","last_verified") VALUES(613,'ExponentPushToken[3UNORxC2myXTjhYAds782V]','2026-07-09 12:32:51',678,'2026-09-15T15:04:23.177Z'); -INSERT INTO "notif_creds" ("id","token","added_at","user_id","last_verified") VALUES(614,'ExponentPushToken[q_KN8qFGPp3PakQnlphN4p]','2026-07-09 12:34:16',679,'2026-10-01T14:29:03.158Z'); +INSERT INTO "notif_creds" ("id","token","added_at","user_id","last_verified") VALUES(614,'ExponentPushToken[q_KN8qFGPp3PakQnlphN4p]','2026-07-09 12:34:16',679,'2026-10-12T04:59:35.792Z'); INSERT INTO "notif_creds" ("id","token","added_at","user_id","last_verified") VALUES(615,'ExponentPushToken[9MrERFDg6xP8pX26WBdHmn]','2026-07-10 00:46:23',680,'2026-08-09T07:14:59.003Z'); INSERT INTO "notif_creds" ("id","token","added_at","user_id","last_verified") VALUES(616,'ExponentPushToken[-c_Wi0EyO9S76beCpMviRu]','2026-07-10 13:32:38',683,'2026-08-08T13:50:45.234Z'); INSERT INTO "notif_creds" ("id","token","added_at","user_id","last_verified") VALUES(617,'ExponentPushToken[GSDi_oBQR1t6a4oYAbYymO]','2026-07-10 14:50:57',36,'2026-09-26T13:20:58.081Z'); @@ -3385,19 +3397,19 @@ INSERT INTO "notif_creds" ("id","token","added_at","user_id","last_verified") VA INSERT INTO "notif_creds" ("id","token","added_at","user_id","last_verified") VALUES(638,'ExponentPushToken[dOlEajFNIax8rdaTbBkNlc]','2026-07-21 02:30:00',706,'2026-08-07T04:10:38.432Z'); INSERT INTO "notif_creds" ("id","token","added_at","user_id","last_verified") VALUES(639,'ExponentPushToken[jW54u-I5_OejWjAkT2qUfE]','2026-07-23 16:57:18',287,'2026-09-12T12:33:12.087Z'); INSERT INTO "notif_creds" ("id","token","added_at","user_id","last_verified") VALUES(640,'ExponentPushToken[a_386KOA4xwSpcIkT0mGUi]','2026-07-25 10:18:36',709,'2026-07-25T10:18:36.972Z'); -INSERT INTO "notif_creds" ("id","token","added_at","user_id","last_verified") VALUES(641,'ExponentPushToken[2NZqtPL16Um00KZCcMh0us]','2026-07-25 15:14:10',710,'2026-10-11T11:15:24.883Z'); +INSERT INTO "notif_creds" ("id","token","added_at","user_id","last_verified") VALUES(641,'ExponentPushToken[2NZqtPL16Um00KZCcMh0us]','2026-07-25 15:14:10',710,'2026-10-12T04:49:41.735Z'); INSERT INTO "notif_creds" ("id","token","added_at","user_id","last_verified") VALUES(642,'ExponentPushToken[8hKXOnIpaUkmy10OUlclHN]','2026-07-25 15:17:25',711,'2026-09-19T03:34:28.425Z'); INSERT INTO "notif_creds" ("id","token","added_at","user_id","last_verified") VALUES(643,'ExponentPushToken[7h7wnsIG9HYUoyBvb4X8wS]','2026-07-26 02:54:02',677,'2026-09-28T02:22:48.903Z'); INSERT INTO "notif_creds" ("id","token","added_at","user_id","last_verified") VALUES(644,'ExponentPushToken[OKi6lkFWT3Qg5yj9DXJDO_]','2026-07-26 10:42:54',712,'2026-07-26T10:42:54.332Z'); INSERT INTO "notif_creds" ("id","token","added_at","user_id","last_verified") VALUES(645,'ExponentPushToken[8fp2aLMdcCfmHVIDQpXeAA]','2026-07-27 03:27:39',713,'2026-07-27T03:45:30.720Z'); INSERT INTO "notif_creds" ("id","token","added_at","user_id","last_verified") VALUES(646,'ExponentPushToken[BEVARONVXrlap4i5FLPKdf]','2026-07-28 06:28:09',714,'2026-09-29T05:06:55.257Z'); INSERT INTO "notif_creds" ("id","token","added_at","user_id","last_verified") VALUES(647,'ExponentPushToken[tMg5fFP6YY0DQ8rueB_S7m]','2026-07-28 12:55:09',704,'2026-09-30T07:32:50.341Z'); -INSERT INTO "notif_creds" ("id","token","added_at","user_id","last_verified") VALUES(648,'ExponentPushToken[FILgJIA4CF8h6Th5PrBj-m]','2026-07-31 14:01:52',517,'2026-10-11T04:57:36.790Z'); +INSERT INTO "notif_creds" ("id","token","added_at","user_id","last_verified") VALUES(648,'ExponentPushToken[FILgJIA4CF8h6Th5PrBj-m]','2026-07-31 14:01:52',517,'2026-10-13T03:39:53.402Z'); INSERT INTO "notif_creds" ("id","token","added_at","user_id","last_verified") VALUES(649,'ExponentPushToken[_fOMzgDKDz8CqLHUhEpLEk]','2026-08-01 01:08:10',715,'2026-08-01T01:08:10.898Z'); INSERT INTO "notif_creds" ("id","token","added_at","user_id","last_verified") VALUES(650,'ExponentPushToken[M1y705Lz8R6qQ1oxHcBoZw]','2026-08-01 10:52:12',716,'2026-08-06T11:51:50.451Z'); INSERT INTO "notif_creds" ("id","token","added_at","user_id","last_verified") VALUES(651,'ExponentPushToken[vos5rCCZVRHtLzGPjohv12]','2026-08-01 17:36:52',717,'2026-08-01T17:36:52.283Z'); INSERT INTO "notif_creds" ("id","token","added_at","user_id","last_verified") VALUES(652,'ExponentPushToken[f8LbUiDGtYwWAIY9O_1UQj]','2026-08-02 04:52:04',718,'2026-08-02T04:52:04.723Z'); -INSERT INTO "notif_creds" ("id","token","added_at","user_id","last_verified") VALUES(653,'ExponentPushToken[Qvv6yxDQHnsGehZ3M427Lf]','2026-08-03 03:41:15',721,'2026-10-10T03:41:46.243Z'); +INSERT INTO "notif_creds" ("id","token","added_at","user_id","last_verified") VALUES(653,'ExponentPushToken[Qvv6yxDQHnsGehZ3M427Lf]','2026-08-03 03:41:15',721,'2026-10-12T10:35:16.820Z'); INSERT INTO "notif_creds" ("id","token","added_at","user_id","last_verified") VALUES(654,'ExponentPushToken[lDQPQJLUVLFCcYGB1FQ2qR]','2026-08-03 04:32:25',722,'2026-08-03T04:32:25.734Z'); INSERT INTO "notif_creds" ("id","token","added_at","user_id","last_verified") VALUES(655,'ExponentPushToken[b4QA-aJ-ucaKCezt_Uyd4o]','2026-08-03 09:51:13',723,'2026-09-03T02:31:43.779Z'); INSERT INTO "notif_creds" ("id","token","added_at","user_id","last_verified") VALUES(656,'ExponentPushToken[lIHkB5A_on888D0p5-NW54]','2026-08-03 14:07:41',724,'2026-08-04T06:47:24.830Z'); @@ -3457,8 +3469,8 @@ INSERT INTO "notif_creds" ("id","token","added_at","user_id","last_verified") VA INSERT INTO "notif_creds" ("id","token","added_at","user_id","last_verified") VALUES(710,'ExponentPushToken[DfXROmDG8YJTmvfcfVxMpe]','2026-08-23 04:49:05',773,'2026-09-27T04:20:25.487Z'); INSERT INTO "notif_creds" ("id","token","added_at","user_id","last_verified") VALUES(711,'ExponentPushToken[tQsJhjJzn-50yVdmhNgCV6]','2026-08-23 12:41:26',774,'2026-10-01T13:02:10.973Z'); INSERT INTO "notif_creds" ("id","token","added_at","user_id","last_verified") VALUES(712,'ExponentPushToken[A7oX6UATJaJSzbqtsn0yr7]','2026-08-25 12:51:53',775,'2026-08-25T12:51:53.370Z'); -INSERT INTO "notif_creds" ("id","token","added_at","user_id","last_verified") VALUES(713,'ExponentPushToken[RQkA2GC-Bx6xDJte59EcBq]','2026-08-26 03:07:00',631,'2026-10-08T01:17:43.219Z'); -INSERT INTO "notif_creds" ("id","token","added_at","user_id","last_verified") VALUES(714,'ExponentPushToken[FtW_9WFmvw03mvp8R_IlWO]','2026-08-26 04:49:34',777,'2026-10-04T01:53:35.745Z'); +INSERT INTO "notif_creds" ("id","token","added_at","user_id","last_verified") VALUES(713,'ExponentPushToken[RQkA2GC-Bx6xDJte59EcBq]','2026-08-26 03:07:00',631,'2026-10-12T06:26:21.868Z'); +INSERT INTO "notif_creds" ("id","token","added_at","user_id","last_verified") VALUES(714,'ExponentPushToken[FtW_9WFmvw03mvp8R_IlWO]','2026-08-26 04:49:34',777,'2026-10-12T23:57:36.919Z'); INSERT INTO "notif_creds" ("id","token","added_at","user_id","last_verified") VALUES(715,'ExponentPushToken[T0eGUjNcmCOQ7NPLybYuA9]','2026-08-28 00:23:22',778,'2026-09-12T05:10:33.056Z'); INSERT INTO "notif_creds" ("id","token","added_at","user_id","last_verified") VALUES(716,'ExponentPushToken[x6SwyVAH1qfqZLVbCVQkex]','2026-08-28 04:02:04',753,'2026-08-28T04:02:04.916Z'); INSERT INTO "notif_creds" ("id","token","added_at","user_id","last_verified") VALUES(717,'ExponentPushToken[n7SxWSMs2W7ui6TYUgAEbK]','2026-08-28 13:47:11',779,'2026-09-22T13:05:37.131Z'); @@ -3467,7 +3479,7 @@ INSERT INTO "notif_creds" ("id","token","added_at","user_id","last_verified") VA INSERT INTO "notif_creds" ("id","token","added_at","user_id","last_verified") VALUES(720,'ExponentPushToken[xrdiTHAyODb8MC2Ods51zE]','2026-08-29 13:42:13',783,'2026-08-29T13:42:13.252Z'); INSERT INTO "notif_creds" ("id","token","added_at","user_id","last_verified") VALUES(721,'ExponentPushToken[MngcWzOVupG2jCP92aFAHU]','2026-08-29 15:28:31',784,'2026-09-27T03:02:00.567Z'); INSERT INTO "notif_creds" ("id","token","added_at","user_id","last_verified") VALUES(722,'ExponentPushToken[An3bpDJv4ViVBBpzCzM44a]','2026-08-30 01:19:31',29,'2026-08-30T01:19:31.979Z'); -INSERT INTO "notif_creds" ("id","token","added_at","user_id","last_verified") VALUES(723,'ExponentPushToken[t3FYXoICjlyY0mLg8oJk83]','2026-08-30 02:02:58',785,'2026-10-11T05:12:53.621Z'); +INSERT INTO "notif_creds" ("id","token","added_at","user_id","last_verified") VALUES(723,'ExponentPushToken[t3FYXoICjlyY0mLg8oJk83]','2026-08-30 02:02:58',785,'2026-10-13T06:28:02.440Z'); INSERT INTO "notif_creds" ("id","token","added_at","user_id","last_verified") VALUES(724,'ExponentPushToken[cqGWnjOjW7qpXvF00rCIwY]','2026-08-30 04:10:48',787,'2026-10-05T12:06:12.922Z'); INSERT INTO "notif_creds" ("id","token","added_at","user_id","last_verified") VALUES(725,'ExponentPushToken[loVe35LpngZFsQIIQLmHnS]','2026-08-30 14:44:23',788,'2026-10-10T15:23:27.423Z'); INSERT INTO "notif_creds" ("id","token","added_at","user_id","last_verified") VALUES(726,'ExponentPushToken[jMAuL9Kx7xb-v6TQ3-YEQ-]','2026-09-04 08:44:41',789,'2026-09-07T17:53:58.352Z'); @@ -3545,7 +3557,7 @@ INSERT INTO "notif_creds" ("id","token","added_at","user_id","last_verified") VA INSERT INTO "notif_creds" ("id","token","added_at","user_id","last_verified") VALUES(799,'ExponentPushToken[xD2AcXHpeT_IKIPzIxh4Sx]','2026-09-11 15:11:29',871,'2026-09-25T07:42:47.463Z'); INSERT INTO "notif_creds" ("id","token","added_at","user_id","last_verified") VALUES(800,'ExponentPushToken[Y8svYUGlN_BRtJ00DSdxYr]','2026-09-11 15:12:07',857,'2026-09-21T14:09:43.139Z'); INSERT INTO "notif_creds" ("id","token","added_at","user_id","last_verified") VALUES(801,'ExponentPushToken[FH0qtYJCfctA8uPKYKG0ak]','2026-09-11 15:13:33',872,'2026-10-03T05:13:24.995Z'); -INSERT INTO "notif_creds" ("id","token","added_at","user_id","last_verified") VALUES(802,'ExponentPushToken[e05_NhNcgYuIFWMxrqoP0X]','2026-09-11 15:13:51',846,'2026-10-11T11:49:11.058Z'); +INSERT INTO "notif_creds" ("id","token","added_at","user_id","last_verified") VALUES(802,'ExponentPushToken[e05_NhNcgYuIFWMxrqoP0X]','2026-09-11 15:13:51',846,'2026-10-12T05:12:29.626Z'); INSERT INTO "notif_creds" ("id","token","added_at","user_id","last_verified") VALUES(803,'ExponentPushToken[D2234ZJ9eR5EGO9vm46n-6]','2026-09-11 15:14:11',873,'2026-09-12T03:06:29.450Z'); INSERT INTO "notif_creds" ("id","token","added_at","user_id","last_verified") VALUES(804,'ExponentPushToken[kkHqX-K2DqsBAjmwn2lsue]','2026-09-11 15:14:14',874,'2026-09-13T06:34:05.086Z'); INSERT INTO "notif_creds" ("id","token","added_at","user_id","last_verified") VALUES(805,'ExponentPushToken[HtMoeZOHzv9tNf109UlRw9]','2026-09-11 15:25:15',875,'2026-10-09T02:49:59.745Z'); @@ -3557,7 +3569,7 @@ INSERT INTO "notif_creds" ("id","token","added_at","user_id","last_verified") VA INSERT INTO "notif_creds" ("id","token","added_at","user_id","last_verified") VALUES(811,'ExponentPushToken[Zpv0h8PmNMVjTBbE6VPDOW]','2026-09-11 15:40:07',881,'2026-09-11T15:40:07.099Z'); INSERT INTO "notif_creds" ("id","token","added_at","user_id","last_verified") VALUES(812,'ExponentPushToken[Czll9XPe6JW6Y_pwmVt7Yl]','2026-09-11 15:44:20',882,'2026-09-29T02:52:27.943Z'); INSERT INTO "notif_creds" ("id","token","added_at","user_id","last_verified") VALUES(813,'ExponentPushToken[PNKVoYFDkwMX4z1vlTBJZv]','2026-09-11 15:54:39',883,'2026-09-13T04:09:34.293Z'); -INSERT INTO "notif_creds" ("id","token","added_at","user_id","last_verified") VALUES(814,'ExponentPushToken[IN99jWFmKwUzfS8slyGooW]','2026-09-11 15:54:50',884,'2026-09-15T05:56:28.007Z'); +INSERT INTO "notif_creds" ("id","token","added_at","user_id","last_verified") VALUES(814,'ExponentPushToken[IN99jWFmKwUzfS8slyGooW]','2026-09-11 15:54:50',884,'2026-10-13T02:42:47.712Z'); INSERT INTO "notif_creds" ("id","token","added_at","user_id","last_verified") VALUES(815,'ExponentPushToken[S6e577KGRa5M8CVOC06FCC]','2026-09-11 15:56:35',885,'2026-10-08T06:09:50.935Z'); INSERT INTO "notif_creds" ("id","token","added_at","user_id","last_verified") VALUES(816,'ExponentPushToken[i2sfxDIRgo5tDmTrJc-Rht]','2026-09-11 15:59:25',886,'2026-09-27T10:03:30.506Z'); INSERT INTO "notif_creds" ("id","token","added_at","user_id","last_verified") VALUES(817,'ExponentPushToken[2CcucpFt9MYNsF3PFlgxt4]','2026-09-11 16:02:26',887,'2026-09-27T12:27:43.091Z'); @@ -3570,7 +3582,7 @@ INSERT INTO "notif_creds" ("id","token","added_at","user_id","last_verified") VA INSERT INTO "notif_creds" ("id","token","added_at","user_id","last_verified") VALUES(824,'ExponentPushToken[gwiCY_CTyAwHuYJCIXrlbl]','2026-09-11 16:14:01',894,'2026-09-11T16:14:01.637Z'); INSERT INTO "notif_creds" ("id","token","added_at","user_id","last_verified") VALUES(825,'ExponentPushToken[8og40zCvY95XruXNZmJuWV]','2026-09-11 16:15:54',895,'2026-09-11T16:24:32.458Z'); INSERT INTO "notif_creds" ("id","token","added_at","user_id","last_verified") VALUES(826,'ExponentPushToken[HMyHoaCdsbphjB4cA6bJ26]','2026-09-11 16:17:21',896,'2026-10-04T08:11:08.581Z'); -INSERT INTO "notif_creds" ("id","token","added_at","user_id","last_verified") VALUES(827,'ExponentPushToken[dvG0gYNqkghs8mPmAIwpkz]','2026-09-11 16:18:00',898,'2026-10-06T17:03:22.513Z'); +INSERT INTO "notif_creds" ("id","token","added_at","user_id","last_verified") VALUES(827,'ExponentPushToken[dvG0gYNqkghs8mPmAIwpkz]','2026-09-11 16:18:00',898,'2026-10-12T07:53:40.021Z'); INSERT INTO "notif_creds" ("id","token","added_at","user_id","last_verified") VALUES(828,'ExponentPushToken[lHJDcbPm2rj9OFPEA3vkO3]','2026-09-11 16:25:26',899,'2026-09-11T16:25:26.365Z'); INSERT INTO "notif_creds" ("id","token","added_at","user_id","last_verified") VALUES(829,'ExponentPushToken[6DbNeELLtm9itYXHz4zJR9]','2026-09-11 16:25:40',900,'2026-09-23T08:43:29.962Z'); INSERT INTO "notif_creds" ("id","token","added_at","user_id","last_verified") VALUES(830,'ExponentPushToken[n_L0AMOt4pPuOVgChD3tsF]','2026-09-11 16:42:18',901,'2026-09-11T16:42:18.251Z'); @@ -3579,7 +3591,7 @@ INSERT INTO "notif_creds" ("id","token","added_at","user_id","last_verified") VA INSERT INTO "notif_creds" ("id","token","added_at","user_id","last_verified") VALUES(833,'ExponentPushToken[kp0ymeGSIVOeWaxtNhaw2V]','2026-09-11 16:52:18',905,'2026-09-17T16:26:42.026Z'); INSERT INTO "notif_creds" ("id","token","added_at","user_id","last_verified") VALUES(834,'ExponentPushToken[b-zUibBhQhoRMgD7KGtOc2]','2026-09-11 16:53:44',906,'2026-09-12T12:40:33.633Z'); INSERT INTO "notif_creds" ("id","token","added_at","user_id","last_verified") VALUES(835,'ExponentPushToken[SL8AsVMaVxKonkaj0Qk39t]','2026-09-11 16:55:49',907,'2026-09-30T18:45:59.067Z'); -INSERT INTO "notif_creds" ("id","token","added_at","user_id","last_verified") VALUES(836,'ExponentPushToken[3g85aaNTX1PpJpU0L7P1-0]','2026-09-11 16:59:07',908,'2026-10-03T12:32:12.342Z'); +INSERT INTO "notif_creds" ("id","token","added_at","user_id","last_verified") VALUES(836,'ExponentPushToken[3g85aaNTX1PpJpU0L7P1-0]','2026-09-11 16:59:07',908,'2026-10-13T07:19:15.775Z'); INSERT INTO "notif_creds" ("id","token","added_at","user_id","last_verified") VALUES(837,'ExponentPushToken[y2FkqzKWrzwVA2jeCT1NSa]','2026-09-11 17:00:23',909,'2026-09-11T17:00:23.413Z'); INSERT INTO "notif_creds" ("id","token","added_at","user_id","last_verified") VALUES(838,'ExponentPushToken[zAxCaBNbOkZH_ICKffPhTg]','2026-09-11 17:01:03',910,'2026-09-12T10:19:35.881Z'); INSERT INTO "notif_creds" ("id","token","added_at","user_id","last_verified") VALUES(839,'ExponentPushToken[D3kDcNIAI0aCH92MjDjWp_]','2026-09-11 17:01:07',911,'2026-09-15T03:29:14.216Z'); @@ -3597,7 +3609,7 @@ INSERT INTO "notif_creds" ("id","token","added_at","user_id","last_verified") VA INSERT INTO "notif_creds" ("id","token","added_at","user_id","last_verified") VALUES(851,'ExponentPushToken[2zRCZ2IkPA-rmsr_3khxaG]','2026-09-11 18:20:41',925,'2026-09-27T08:11:09.293Z'); INSERT INTO "notif_creds" ("id","token","added_at","user_id","last_verified") VALUES(852,'ExponentPushToken[V4OTyvDkGRPWLQ9m3-ZPum]','2026-09-11 18:21:35',926,'2026-10-10T05:58:14.893Z'); INSERT INTO "notif_creds" ("id","token","added_at","user_id","last_verified") VALUES(853,'ExponentPushToken[Ai8DO-CqkdBB-Gf9JefRLI]','2026-09-11 18:24:29',927,'2026-09-11T20:51:53.421Z'); -INSERT INTO "notif_creds" ("id","token","added_at","user_id","last_verified") VALUES(854,'ExponentPushToken[ScbtN_A9XahHNF5-eA-4gF]','2026-09-11 18:27:51',928,'2026-09-28T13:30:12.148Z'); +INSERT INTO "notif_creds" ("id","token","added_at","user_id","last_verified") VALUES(854,'ExponentPushToken[ScbtN_A9XahHNF5-eA-4gF]','2026-09-11 18:27:51',928,'2026-10-12T18:32:30.352Z'); INSERT INTO "notif_creds" ("id","token","added_at","user_id","last_verified") VALUES(855,'ExponentPushToken[9IKUiPKAZQFXNEIH63pPcq]','2026-09-11 18:40:50',929,'2026-09-29T11:46:09.210Z'); INSERT INTO "notif_creds" ("id","token","added_at","user_id","last_verified") VALUES(856,'ExponentPushToken[wI4x-wBDmfrzhaYS8kGHOE]','2026-09-11 18:46:56',930,'2026-09-11T18:46:56.692Z'); INSERT INTO "notif_creds" ("id","token","added_at","user_id","last_verified") VALUES(857,'ExponentPushToken[Ookr5KJvOm6DKZSgqL8ZLk]','2026-09-11 18:58:45',931,'2026-09-11T18:58:45.321Z'); @@ -3623,7 +3635,7 @@ INSERT INTO "notif_creds" ("id","token","added_at","user_id","last_verified") VA INSERT INTO "notif_creds" ("id","token","added_at","user_id","last_verified") VALUES(877,'ExponentPushToken[Hj3rjFEUlL28rQiTH0Q-L6]','2026-09-12 02:04:29',955,'2026-10-08T11:21:44.391Z'); INSERT INTO "notif_creds" ("id","token","added_at","user_id","last_verified") VALUES(878,'ExponentPushToken[-9mhnGCZKic8qQZveVKccG]','2026-09-12 02:11:26',956,'2026-09-12T17:34:55.714Z'); INSERT INTO "notif_creds" ("id","token","added_at","user_id","last_verified") VALUES(879,'ExponentPushToken[uDBMyUAB_qbPAE1pW9nsZ-]','2026-09-12 02:11:41',957,'2026-09-15T12:51:44.974Z'); -INSERT INTO "notif_creds" ("id","token","added_at","user_id","last_verified") VALUES(880,'ExponentPushToken[hF8wbDCFGGtxmnvbynIXxB]','2026-09-12 02:15:50',958,'2026-09-20T06:40:54.653Z'); +INSERT INTO "notif_creds" ("id","token","added_at","user_id","last_verified") VALUES(880,'ExponentPushToken[hF8wbDCFGGtxmnvbynIXxB]','2026-09-12 02:15:50',958,'2026-10-12T04:16:35.116Z'); INSERT INTO "notif_creds" ("id","token","added_at","user_id","last_verified") VALUES(881,'ExponentPushToken[3u3FgANS2Z3bParIQ1jlc8]','2026-09-12 02:19:49',959,'2026-09-13T02:00:22.770Z'); INSERT INTO "notif_creds" ("id","token","added_at","user_id","last_verified") VALUES(882,'ExponentPushToken[f_Glq1MSqZdAr1GPIDIk6H]','2026-09-12 02:20:35',960,'2026-09-12T02:20:35.148Z'); INSERT INTO "notif_creds" ("id","token","added_at","user_id","last_verified") VALUES(883,'ExponentPushToken[UkoslbIX1w8yhYQcdIVHa1]','2026-09-12 02:39:53',831,'2026-09-13T08:06:25.990Z'); @@ -3660,13 +3672,13 @@ INSERT INTO "notif_creds" ("id","token","added_at","user_id","last_verified") VA INSERT INTO "notif_creds" ("id","token","added_at","user_id","last_verified") VALUES(914,'ExponentPushToken[UBamoTKWcyeg2I8YxvZB-N]','2026-09-12 06:01:48',999,'2026-09-12T06:01:48.818Z'); INSERT INTO "notif_creds" ("id","token","added_at","user_id","last_verified") VALUES(915,'ExponentPushToken[4VHSfIBkxU06tTdt95sNXf]','2026-09-12 06:06:23',198,'2026-09-27T04:18:38.168Z'); INSERT INTO "notif_creds" ("id","token","added_at","user_id","last_verified") VALUES(916,'ExponentPushToken[7hrqY9NGTYgwbOfKr0hxCw]','2026-09-12 06:28:19',1000,'2026-09-18T14:12:18.381Z'); -INSERT INTO "notif_creds" ("id","token","added_at","user_id","last_verified") VALUES(917,'ExponentPushToken[aITcTXM3kUTvLkCku51RVY]','2026-09-12 06:51:04',1001,'2026-09-19T03:38:45.890Z'); +INSERT INTO "notif_creds" ("id","token","added_at","user_id","last_verified") VALUES(917,'ExponentPushToken[aITcTXM3kUTvLkCku51RVY]','2026-09-12 06:51:04',1001,'2026-10-13T01:09:28.166Z'); INSERT INTO "notif_creds" ("id","token","added_at","user_id","last_verified") VALUES(918,'ExponentPushToken[fE-36BJAe4BrdZtboLvp4F]','2026-09-12 07:04:21',1002,'2026-09-12T07:04:21.069Z'); INSERT INTO "notif_creds" ("id","token","added_at","user_id","last_verified") VALUES(919,'ExponentPushToken[jUovkwKziUmllKK6xy0THV]','2026-09-12 07:07:55',1003,'2026-09-12T07:07:55.687Z'); INSERT INTO "notif_creds" ("id","token","added_at","user_id","last_verified") VALUES(920,'ExponentPushToken[yoginqEu07w8QGrlJkq-fq]','2026-09-12 07:12:06',1006,'2026-09-28T14:27:02.835Z'); INSERT INTO "notif_creds" ("id","token","added_at","user_id","last_verified") VALUES(921,'ExponentPushToken[ceqKVyFD0U8CUtECPCErHD]','2026-09-12 07:12:33',1007,'2026-09-20T08:00:44.074Z'); -INSERT INTO "notif_creds" ("id","token","added_at","user_id","last_verified") VALUES(922,'ExponentPushToken[G04tsDHh8i7hJbjofA07m3]','2026-09-12 07:20:52',1008,'2026-10-11T07:00:21.170Z'); -INSERT INTO "notif_creds" ("id","token","added_at","user_id","last_verified") VALUES(923,'ExponentPushToken[ZSldxmD8RXsz-HXinaVO3M]','2026-09-12 07:20:54',1009,'2026-10-10T08:22:08.067Z'); +INSERT INTO "notif_creds" ("id","token","added_at","user_id","last_verified") VALUES(922,'ExponentPushToken[G04tsDHh8i7hJbjofA07m3]','2026-09-12 07:20:52',1008,'2026-10-12T12:23:57.111Z'); +INSERT INTO "notif_creds" ("id","token","added_at","user_id","last_verified") VALUES(923,'ExponentPushToken[ZSldxmD8RXsz-HXinaVO3M]','2026-09-12 07:20:54',1009,'2026-10-13T05:10:30.369Z'); INSERT INTO "notif_creds" ("id","token","added_at","user_id","last_verified") VALUES(924,'ExponentPushToken[Ec-YZlJi14sZmFnBJMsaD4]','2026-09-12 07:28:19',1012,'2026-09-30T15:13:49.327Z'); INSERT INTO "notif_creds" ("id","token","added_at","user_id","last_verified") VALUES(925,'ExponentPushToken[qJx-_AF4AVCayQ9gliKogm]','2026-09-12 07:36:49',1014,'2026-09-12T07:36:49.806Z'); INSERT INTO "notif_creds" ("id","token","added_at","user_id","last_verified") VALUES(926,'ExponentPushToken[1ys58PAxbdv1srboHb095_]','2026-09-12 08:04:01',1015,'2026-09-19T09:48:45.111Z'); @@ -3684,7 +3696,7 @@ INSERT INTO "notif_creds" ("id","token","added_at","user_id","last_verified") VA INSERT INTO "notif_creds" ("id","token","added_at","user_id","last_verified") VALUES(938,'ExponentPushToken[QfvlTDDSSW9BJ1vOZy0lpO]','2026-09-12 09:56:18',1029,'2026-09-12T09:56:18.645Z'); INSERT INTO "notif_creds" ("id","token","added_at","user_id","last_verified") VALUES(939,'ExponentPushToken[ybmjZeA26-BwM7ymuKI-tr]','2026-09-12 10:05:49',1030,'2026-09-12T10:05:49.000Z'); INSERT INTO "notif_creds" ("id","token","added_at","user_id","last_verified") VALUES(940,'ExponentPushToken[b97mnTAPGJ8mZSs7G2pC0d]','2026-09-12 10:20:06',1032,'2026-09-12T10:20:06.220Z'); -INSERT INTO "notif_creds" ("id","token","added_at","user_id","last_verified") VALUES(941,'ExponentPushToken[A2lMsIFcwxNt1tcln5RRpc]','2026-09-12 10:26:37',1033,'2026-10-10T06:56:42.455Z'); +INSERT INTO "notif_creds" ("id","token","added_at","user_id","last_verified") VALUES(941,'ExponentPushToken[A2lMsIFcwxNt1tcln5RRpc]','2026-09-12 10:26:37',1033,'2026-10-12T15:28:15.069Z'); INSERT INTO "notif_creds" ("id","token","added_at","user_id","last_verified") VALUES(942,'ExponentPushToken[rf34CSCKTZ8lu5FhIDvgyW]','2026-09-12 10:39:38',1034,'2026-09-12T10:39:38.855Z'); INSERT INTO "notif_creds" ("id","token","added_at","user_id","last_verified") VALUES(943,'ExponentPushToken[iQXX1pIVCsJJJGy0Ai7r7L]','2026-09-12 11:15:20',1035,'2026-09-13T12:24:42.495Z'); INSERT INTO "notif_creds" ("id","token","added_at","user_id","last_verified") VALUES(944,'ExponentPushToken[mnOUodAfRrKayYT4a5oMei]','2026-09-12 11:54:22',1036,'2026-09-12T12:24:20.829Z'); @@ -3697,7 +3709,7 @@ INSERT INTO "notif_creds" ("id","token","added_at","user_id","last_verified") VA INSERT INTO "notif_creds" ("id","token","added_at","user_id","last_verified") VALUES(951,'ExponentPushToken[wijAQlAYzzj7IX9djyaCxP]','2026-09-12 12:30:30',1043,'2026-09-12T12:30:30.672Z'); INSERT INTO "notif_creds" ("id","token","added_at","user_id","last_verified") VALUES(952,'ExponentPushToken[J_SRfgFnrrM82Hroefuu8J]','2026-09-12 12:33:43',1044,'2026-09-12T12:33:43.553Z'); INSERT INTO "notif_creds" ("id","token","added_at","user_id","last_verified") VALUES(953,'ExponentPushToken[PHSVWDAZm57G6IKOf0hkyu]','2026-09-12 12:36:04',1045,'2026-09-22T02:53:28.861Z'); -INSERT INTO "notif_creds" ("id","token","added_at","user_id","last_verified") VALUES(954,'ExponentPushToken[5GlJFIFh8ny-NSOynaQ1JO]','2026-09-12 12:37:07',1046,'2026-09-12T12:37:07.275Z'); +INSERT INTO "notif_creds" ("id","token","added_at","user_id","last_verified") VALUES(954,'ExponentPushToken[5GlJFIFh8ny-NSOynaQ1JO]','2026-09-12 12:37:07',1046,'2026-10-13T04:23:07.919Z'); INSERT INTO "notif_creds" ("id","token","added_at","user_id","last_verified") VALUES(955,'ExponentPushToken[h7ROA1Pii6Pln89N-luMOa]','2026-09-12 12:50:42',1048,'2026-09-20T03:36:36.197Z'); INSERT INTO "notif_creds" ("id","token","added_at","user_id","last_verified") VALUES(956,'ExponentPushToken[TdVlGKMS3GLG4qKg3rLr_A]','2026-09-12 13:24:17',1052,'2026-09-18T14:30:04.302Z'); INSERT INTO "notif_creds" ("id","token","added_at","user_id","last_verified") VALUES(957,'ExponentPushToken[-pV9W1C1D8WpMXa5fdIRY0]','2026-09-12 13:36:14',1053,'2026-09-12T13:36:14.240Z'); @@ -3758,7 +3770,7 @@ INSERT INTO "notif_creds" ("id","token","added_at","user_id","last_verified") VA INSERT INTO "notif_creds" ("id","token","added_at","user_id","last_verified") VALUES(1013,'ExponentPushToken[L3yKDYPdb6ywdzKh5zTxQ2]','2026-09-13 11:33:05',1112,'2026-09-13T11:42:09.330Z'); INSERT INTO "notif_creds" ("id","token","added_at","user_id","last_verified") VALUES(1014,'ExponentPushToken[N5P1BlNaIgCZuRyw0mttc-]','2026-09-13 11:42:04',1113,'2026-09-30T01:27:07.123Z'); INSERT INTO "notif_creds" ("id","token","added_at","user_id","last_verified") VALUES(1015,'ExponentPushToken[V6phOrD8N5laDCKsOKkJSw]','2026-09-13 12:01:26',1114,'2026-10-04T05:21:51.585Z'); -INSERT INTO "notif_creds" ("id","token","added_at","user_id","last_verified") VALUES(1016,'ExponentPushToken[VBvJX0B613r4nNDvM4iSqN]','2026-09-13 12:35:53',1116,'2026-09-28T15:20:24.119Z'); +INSERT INTO "notif_creds" ("id","token","added_at","user_id","last_verified") VALUES(1016,'ExponentPushToken[VBvJX0B613r4nNDvM4iSqN]','2026-09-13 12:35:53',1116,'2026-10-13T01:17:31.503Z'); INSERT INTO "notif_creds" ("id","token","added_at","user_id","last_verified") VALUES(1017,'ExponentPushToken[sdtYWqPKk88x7980vODiGM]','2026-09-13 12:49:57',1117,'2026-09-13T12:49:57.422Z'); INSERT INTO "notif_creds" ("id","token","added_at","user_id","last_verified") VALUES(1018,'ExponentPushToken[vHEBbTIGOT2JPjRj1fUKn3]','2026-09-13 13:37:46',1118,'2026-09-13T13:37:46.001Z'); INSERT INTO "notif_creds" ("id","token","added_at","user_id","last_verified") VALUES(1019,'ExponentPushToken[AjR4jCMiJaLzTWN8G7sS-9]','2026-09-13 14:00:12',1119,'2026-09-22T10:02:28.421Z'); @@ -3784,8 +3796,8 @@ INSERT INTO "notif_creds" ("id","token","added_at","user_id","last_verified") VA INSERT INTO "notif_creds" ("id","token","added_at","user_id","last_verified") VALUES(1040,'ExponentPushToken[jRSrAHENnwF7QZfsUhsP0Z]','2026-09-14 16:04:43',1140,'2026-09-15T05:25:17.478Z'); INSERT INTO "notif_creds" ("id","token","added_at","user_id","last_verified") VALUES(1041,'ExponentPushToken[Sf2Oj8FGMXAaviqsHi5nEV]','2026-09-14 19:22:45',1142,'2026-09-30T04:55:48.428Z'); INSERT INTO "notif_creds" ("id","token","added_at","user_id","last_verified") VALUES(1042,'ExponentPushToken[_eOuGGJJ9BgI2032XP0FI1]','2026-09-15 01:05:33',1143,'2026-10-11T02:36:18.323Z'); -INSERT INTO "notif_creds" ("id","token","added_at","user_id","last_verified") VALUES(1043,'ExponentPushToken[16jaqrPx3FzyO_d1hHiGHg]','2026-09-15 01:40:21',1144,'2026-10-02T07:46:33.600Z'); -INSERT INTO "notif_creds" ("id","token","added_at","user_id","last_verified") VALUES(1044,'ExponentPushToken[QHpVTGLrRHYPMOHIukqWm-]','2026-09-15 01:40:30',1145,'2026-10-10T04:24:12.222Z'); +INSERT INTO "notif_creds" ("id","token","added_at","user_id","last_verified") VALUES(1043,'ExponentPushToken[16jaqrPx3FzyO_d1hHiGHg]','2026-09-15 01:40:21',1144,'2026-10-13T03:13:24.527Z'); +INSERT INTO "notif_creds" ("id","token","added_at","user_id","last_verified") VALUES(1044,'ExponentPushToken[QHpVTGLrRHYPMOHIukqWm-]','2026-09-15 01:40:30',1145,'2026-10-13T02:53:11.673Z'); INSERT INTO "notif_creds" ("id","token","added_at","user_id","last_verified") VALUES(1045,'ExponentPushToken[nCJ-e2JOLKdt1vAPNTnDl6]','2026-09-15 04:12:54',1146,'2026-09-16T05:55:47.489Z'); INSERT INTO "notif_creds" ("id","token","added_at","user_id","last_verified") VALUES(1046,'ExponentPushToken[WB3b2vGIAMbIP9GQZ5hO7Q]','2026-09-15 05:06:42',1147,'2026-10-09T05:07:01.797Z'); INSERT INTO "notif_creds" ("id","token","added_at","user_id","last_verified") VALUES(1047,'ExponentPushToken[YKeR0jCFe_PLXoT2aM4XbR]','2026-09-15 05:34:59',1148,'2026-09-19T07:19:48.963Z'); @@ -3823,7 +3835,7 @@ INSERT INTO "notif_creds" ("id","token","added_at","user_id","last_verified") VA INSERT INTO "notif_creds" ("id","token","added_at","user_id","last_verified") VALUES(1079,'ExponentPushToken[ye7MxxDDR0AwyeQGgFo8fd]','2026-09-16 13:30:36',1180,'2026-09-16T13:30:36.005Z'); INSERT INTO "notif_creds" ("id","token","added_at","user_id","last_verified") VALUES(1080,'ExponentPushToken[SEESKaBxsoIYTZLVY_K1sM]','2026-09-16 13:59:04',1181,'2026-10-07T14:54:07.352Z'); INSERT INTO "notif_creds" ("id","token","added_at","user_id","last_verified") VALUES(1081,'ExponentPushToken[D7fhIqNks_2h7Ehe5jlrJq]','2026-09-16 14:45:45',621,'2026-09-16T14:45:45.138Z'); -INSERT INTO "notif_creds" ("id","token","added_at","user_id","last_verified") VALUES(1082,'ExponentPushToken[-4qSKkCdK0SXapQiMDNtns]','2026-09-16 15:01:02',1182,'2026-10-11T04:27:54.662Z'); +INSERT INTO "notif_creds" ("id","token","added_at","user_id","last_verified") VALUES(1082,'ExponentPushToken[-4qSKkCdK0SXapQiMDNtns]','2026-09-16 15:01:02',1182,'2026-10-13T04:18:47.001Z'); INSERT INTO "notif_creds" ("id","token","added_at","user_id","last_verified") VALUES(1083,'ExponentPushToken[y8nVWRKuKgTA34bujyeLqJ]','2026-09-16 15:33:14',1183,'2026-10-04T10:38:51.995Z'); INSERT INTO "notif_creds" ("id","token","added_at","user_id","last_verified") VALUES(1084,'ExponentPushToken[Zx-QUbFXu-Kt4XasJVNfCB]','2026-09-16 17:02:48',1184,'2026-10-06T05:21:41.904Z'); INSERT INTO "notif_creds" ("id","token","added_at","user_id","last_verified") VALUES(1085,'ExponentPushToken[WNFDt7O_XwLLi9o4Kzkxh1]','2026-09-16 17:05:05',1141,'2026-09-16T17:05:05.695Z'); @@ -3846,7 +3858,7 @@ INSERT INTO "notif_creds" ("id","token","added_at","user_id","last_verified") VA INSERT INTO "notif_creds" ("id","token","added_at","user_id","last_verified") VALUES(1102,'ExponentPushToken[3uZhBQJSl7zx0qs_zjHy96]','2026-09-18 14:13:19',1199,'2026-09-28T13:07:41.246Z'); INSERT INTO "notif_creds" ("id","token","added_at","user_id","last_verified") VALUES(1103,'ExponentPushToken[tMoHveEoDz0OonLg1Pk3Cy]','2026-09-18 14:16:07',1000,'2026-09-29T14:13:31.991Z'); INSERT INTO "notif_creds" ("id","token","added_at","user_id","last_verified") VALUES(1104,'ExponentPushToken[BJwjKOBp3xFUnSdLaZ0yiz]','2026-09-19 12:14:28',1201,'2026-09-19T12:14:28.952Z'); -INSERT INTO "notif_creds" ("id","token","added_at","user_id","last_verified") VALUES(1105,'ExponentPushToken[sYn2CnJV_Focrm9PgNacHQ]','2026-09-19 15:53:55',1203,'2026-09-19T16:29:08.044Z'); +INSERT INTO "notif_creds" ("id","token","added_at","user_id","last_verified") VALUES(1105,'ExponentPushToken[sYn2CnJV_Focrm9PgNacHQ]','2026-09-19 15:53:55',1203,'2026-10-13T05:31:21.054Z'); INSERT INTO "notif_creds" ("id","token","added_at","user_id","last_verified") VALUES(1106,'ExponentPushToken[ZG7Fh9C5LLnFyvla3a_3Jn]','2026-09-20 01:12:46',1204,'2026-10-04T02:52:13.956Z'); INSERT INTO "notif_creds" ("id","token","added_at","user_id","last_verified") VALUES(1107,'ExponentPushToken[HMXpGGGvmTBCh7B61lF2U0]','2026-09-20 01:53:21',1100,'2026-10-04T09:34:36.839Z'); INSERT INTO "notif_creds" ("id","token","added_at","user_id","last_verified") VALUES(1108,'ExponentPushToken[HMXpGGGvmTBCh7B61lF2U0]','2026-09-20 01:54:47',1205,'2026-09-20T01:54:47.445Z'); @@ -3893,11 +3905,11 @@ INSERT INTO "notif_creds" ("id","token","added_at","user_id","last_verified") VA INSERT INTO "notif_creds" ("id","token","added_at","user_id","last_verified") VALUES(1149,'ExponentPushToken[__M9CLEVj_j9IpU3AsUdDC]','2026-09-26 05:51:38',119,'2026-09-26T05:51:38.509Z'); INSERT INTO "notif_creds" ("id","token","added_at","user_id","last_verified") VALUES(1150,'ExponentPushToken[mMJ-_6Ev70Hz-OnSi1oRY5]','2026-09-26 15:43:02',1254,'2026-10-04T14:39:21.788Z'); INSERT INTO "notif_creds" ("id","token","added_at","user_id","last_verified") VALUES(1151,'ExponentPushToken[cPo8IVBjvLXvjV1AFZoi68]','2026-09-27 01:27:58',1255,'2026-10-02T13:35:56.856Z'); -INSERT INTO "notif_creds" ("id","token","added_at","user_id","last_verified") VALUES(1152,'ExponentPushToken[TCFYIgFGUV7DFhrEMK3JqP]','2026-09-27 02:18:58',1257,'2026-10-11T10:41:06.170Z'); +INSERT INTO "notif_creds" ("id","token","added_at","user_id","last_verified") VALUES(1152,'ExponentPushToken[TCFYIgFGUV7DFhrEMK3JqP]','2026-09-27 02:18:58',1257,'2026-10-12T13:33:31.459Z'); INSERT INTO "notif_creds" ("id","token","added_at","user_id","last_verified") VALUES(1153,'ExponentPushToken[kXfKFoI9a0ydsNoCA2Ox4F]','2026-09-27 02:59:14',1258,'2026-10-11T04:50:39.136Z'); INSERT INTO "notif_creds" ("id","token","added_at","user_id","last_verified") VALUES(1154,'ExponentPushToken[a_TjBGIQuTFQFw9ZxIekcq]','2026-09-27 03:34:51',1259,'2026-10-05T13:33:57.163Z'); INSERT INTO "notif_creds" ("id","token","added_at","user_id","last_verified") VALUES(1155,'ExponentPushToken[H3VmShFfGbFHrDDmaQGcd9]','2026-09-27 04:28:20',1261,'2026-10-09T12:09:03.077Z'); -INSERT INTO "notif_creds" ("id","token","added_at","user_id","last_verified") VALUES(1156,'ExponentPushToken[RNP4FZNLcX77qQR4HTZbD6]','2026-09-27 04:35:24',1262,'2026-10-09T13:55:11.035Z'); +INSERT INTO "notif_creds" ("id","token","added_at","user_id","last_verified") VALUES(1156,'ExponentPushToken[RNP4FZNLcX77qQR4HTZbD6]','2026-09-27 04:35:24',1262,'2026-10-12T05:17:08.996Z'); INSERT INTO "notif_creds" ("id","token","added_at","user_id","last_verified") VALUES(1157,'ExponentPushToken[p8BSpIIv3AIgIwzmgm4FBD]','2026-09-27 05:06:59',1263,'2026-10-10T05:10:58.620Z'); INSERT INTO "notif_creds" ("id","token","added_at","user_id","last_verified") VALUES(1158,'ExponentPushToken[2WvYJ4EPGylmNQeHzYkCpy]','2026-09-27 05:49:57',1264,'2026-10-10T15:38:19.213Z'); INSERT INTO "notif_creds" ("id","token","added_at","user_id","last_verified") VALUES(1159,'ExponentPushToken[8T5k3AFi81wJwzH5pPkG43]','2026-09-27 09:43:04',1266,'2026-10-04T11:55:05.309Z'); @@ -3914,7 +3926,7 @@ INSERT INTO "notif_creds" ("id","token","added_at","user_id","last_verified") VA INSERT INTO "notif_creds" ("id","token","added_at","user_id","last_verified") VALUES(1170,'ExponentPushToken[sRFHdUK_qStCNkB0RFAOuY]','2026-09-29 00:46:12',1235,'2026-10-11T02:05:45.136Z'); INSERT INTO "notif_creds" ("id","token","added_at","user_id","last_verified") VALUES(1171,'ExponentPushToken[U2j41LIuA4ZqK-_keYGAzw]','2026-09-29 03:42:22',1221,'2026-10-04T04:37:33.017Z'); INSERT INTO "notif_creds" ("id","token","added_at","user_id","last_verified") VALUES(1172,'ExponentPushToken[HElBhxNE_Vv_5fB-VXVrBo]','2026-09-29 13:10:40',1279,'2026-10-05T11:58:12.981Z'); -INSERT INTO "notif_creds" ("id","token","added_at","user_id","last_verified") VALUES(1173,'ExponentPushToken[-9hmGvKmFnYseUN643bZBf]','2026-09-29 15:22:57',1280,'2026-10-11T08:04:18.115Z'); +INSERT INTO "notif_creds" ("id","token","added_at","user_id","last_verified") VALUES(1173,'ExponentPushToken[-9hmGvKmFnYseUN643bZBf]','2026-09-29 15:22:57',1280,'2026-10-12T17:03:19.597Z'); INSERT INTO "notif_creds" ("id","token","added_at","user_id","last_verified") VALUES(1174,'ExponentPushToken[FBpPOANc_R9a2U1AZT39AL]','2026-09-30 03:23:15',1281,'2026-09-30T03:23:15.752Z'); INSERT INTO "notif_creds" ("id","token","added_at","user_id","last_verified") VALUES(1175,'ExponentPushToken[hDWGA_O70ynKLkeymva6tV]','2026-09-30 08:20:55',1282,'2026-10-09T09:05:34.355Z'); INSERT INTO "notif_creds" ("id","token","added_at","user_id","last_verified") VALUES(1176,'ExponentPushToken[VhggFNCqqwrX-sH6HHN-8J]','2026-09-30 10:54:47',1283,'2026-10-08T11:18:27.117Z'); @@ -3927,11 +3939,11 @@ INSERT INTO "notif_creds" ("id","token","added_at","user_id","last_verified") VA INSERT INTO "notif_creds" ("id","token","added_at","user_id","last_verified") VALUES(1183,'ExponentPushToken[YqTvn4OCS3sf5UNuYGHdfC]','2026-10-02 03:09:59',988,'2026-10-03T15:14:46.226Z'); INSERT INTO "notif_creds" ("id","token","added_at","user_id","last_verified") VALUES(1184,'ExponentPushToken[4dMyItFoZPR9MiLxNrIKqz]','2026-10-02 03:37:50',1288,'2026-10-10T12:53:20.136Z'); INSERT INTO "notif_creds" ("id","token","added_at","user_id","last_verified") VALUES(1185,'ExponentPushToken[4PvgQAObU_b4Z_I2lSyL8g]','2026-10-02 05:07:34',992,'2026-10-02T05:07:33.999Z'); -INSERT INTO "notif_creds" ("id","token","added_at","user_id","last_verified") VALUES(1186,'ExponentPushToken[FSNk6WM1J7U1Jvja48EHsE]','2026-10-02 08:38:31',1289,'2026-10-11T04:26:49.379Z'); +INSERT INTO "notif_creds" ("id","token","added_at","user_id","last_verified") VALUES(1186,'ExponentPushToken[FSNk6WM1J7U1Jvja48EHsE]','2026-10-02 08:38:31',1289,'2026-10-13T01:13:15.920Z'); INSERT INTO "notif_creds" ("id","token","added_at","user_id","last_verified") VALUES(1187,'ExponentPushToken[iXaOH8D5iAsn6lh66GuWRa]','2026-10-02 12:51:37',1290,'2026-10-05T01:03:11.369Z'); INSERT INTO "notif_creds" ("id","token","added_at","user_id","last_verified") VALUES(1188,'ExponentPushToken[ycucWsL8Ci-AWWKiL6Na6R]','2026-10-03 02:19:44',1292,'2026-10-03T02:19:44.722Z'); INSERT INTO "notif_creds" ("id","token","added_at","user_id","last_verified") VALUES(1189,'ExponentPushToken[m4tPqTJay2E2_l8TrIEpJT]','2026-10-03 04:04:45',1293,'2026-10-05T11:14:48.980Z'); -INSERT INTO "notif_creds" ("id","token","added_at","user_id","last_verified") VALUES(1190,'ExponentPushToken[Y7kb0KFKDbU4YiK6DTORKV]','2026-10-03 07:35:55',1291,'2026-10-11T04:16:44.748Z'); +INSERT INTO "notif_creds" ("id","token","added_at","user_id","last_verified") VALUES(1190,'ExponentPushToken[Y7kb0KFKDbU4YiK6DTORKV]','2026-10-03 07:35:55',1291,'2026-10-13T07:44:07.092Z'); INSERT INTO "notif_creds" ("id","token","added_at","user_id","last_verified") VALUES(1191,'ExponentPushToken[iex6cpCl0n8JzF4Zu-VTTY]','2026-10-03 08:05:45',1295,'2026-10-06T18:09:08.740Z'); INSERT INTO "notif_creds" ("id","token","added_at","user_id","last_verified") VALUES(1192,'ExponentPushToken[gv4jP3Gd6hSD0r2rU86quf]','2026-10-03 11:30:28',1296,'2026-10-10T15:36:33.612Z'); INSERT INTO "notif_creds" ("id","token","added_at","user_id","last_verified") VALUES(1193,'ExponentPushToken[sAknjMCm2jKoeWHqDX7z9C]','2026-10-03 11:32:22',1004,'2026-10-09T11:21:57.442Z'); @@ -3956,6 +3968,9 @@ INSERT INTO "notif_creds" ("id","token","added_at","user_id","last_verified") VA INSERT INTO "notif_creds" ("id","token","added_at","user_id","last_verified") VALUES(1212,'ExponentPushToken[DtDZaYDoZ_TwpWVnbF733T]','2026-10-11 02:11:24',1205,'2026-10-11T02:11:24.376Z'); INSERT INTO "notif_creds" ("id","token","added_at","user_id","last_verified") VALUES(1213,'ExponentPushToken[nLYwtpFq3SAzUAEEV1HTPu]','2026-10-11 03:02:24',1317,'2026-10-11T03:02:24.222Z'); INSERT INTO "notif_creds" ("id","token","added_at","user_id","last_verified") VALUES(1214,'ExponentPushToken[_BXZshK2lSQuRCICuLTHiD]','2026-10-11 05:12:17',1318,'2026-10-11T05:12:17.723Z'); +INSERT INTO "notif_creds" ("id","token","added_at","user_id","last_verified") VALUES(1215,'ExponentPushToken[m60i1MPwY_u8XMTFEHSQSm]','2026-10-11 17:14:19',1319,'2026-10-11T17:14:19.431Z'); +INSERT INTO "notif_creds" ("id","token","added_at","user_id","last_verified") VALUES(1216,'ExponentPushToken[dQOhbqI5Xa2oazaM-X-FcN]','2026-10-13 00:54:25',1215,'2026-10-13T00:54:25.140Z'); +INSERT INTO "notif_creds" ("id","token","added_at","user_id","last_verified") VALUES(1217,'ExponentPushToken[_DdgjbH_6x9XoI59oucbpZ]','2026-10-13 04:12:36',1262,'2026-10-13T06:21:42.193Z'); CREATE TABLE IF NOT EXISTS "notifications" ("id" INTEGER PRIMARY KEY, "user_id" INTEGER NOT NULL, "title" TEXT NOT NULL, "body" TEXT NOT NULL, "type" TEXT, "is_read" INTEGER NOT NULL DEFAULT false, "created_at" TEXT NOT NULL DEFAULT CURRENT_TIMESTAMP); CREATE TABLE IF NOT EXISTS "order_status" ("id" INTEGER PRIMARY KEY, "order_time" TEXT NOT NULL DEFAULT CURRENT_TIMESTAMP, "user_id" INTEGER NOT NULL, "order_id" INTEGER NOT NULL, "is_packaged" INTEGER NOT NULL DEFAULT false, "is_delivered" INTEGER NOT NULL DEFAULT false, "is_cancelled" INTEGER NOT NULL DEFAULT false, "cancel_reason" TEXT, "payment_state" TEXT NOT NULL DEFAULT 'pending', "cancellation_user_notes" TEXT, "cancellation_admin_notes" TEXT, "cancellation_reviewed" INTEGER NOT NULL DEFAULT false, "cancellation_reviewed_at" TEXT, "refund_coupon_id" INTEGER, "is_cancelled_by_admin" INTEGER); INSERT INTO "order_status" ("id","order_time","user_id","order_id","is_packaged","is_delivered","is_cancelled","cancel_reason","payment_state","cancellation_user_notes","cancellation_admin_notes","cancellation_reviewed","cancellation_reviewed_at","refund_coupon_id","is_cancelled_by_admin") VALUES(105,'2025-12-24T02:50:33.284Z',22,105,0,0,1,'E','cod','E',NULL,0,NULL,NULL,NULL); @@ -6252,8 +6267,8 @@ INSERT INTO "order_status" ("id","order_time","user_id","order_id","is_packaged" INSERT INTO "order_status" ("id","order_time","user_id","order_id","is_packaged","is_delivered","is_cancelled","cancel_reason","payment_state","cancellation_user_notes","cancellation_admin_notes","cancellation_reviewed","cancellation_reviewed_at","refund_coupon_id","is_cancelled_by_admin") VALUES(2457,'2026-10-08 06:18:04',1063,2463,1,1,0,NULL,'cod',NULL,NULL,0,NULL,NULL,NULL); INSERT INTO "order_status" ("id","order_time","user_id","order_id","is_packaged","is_delivered","is_cancelled","cancel_reason","payment_state","cancellation_user_notes","cancellation_admin_notes","cancellation_reviewed","cancellation_reviewed_at","refund_coupon_id","is_cancelled_by_admin") VALUES(2458,'2026-10-08 06:20:46',82,2464,1,1,0,NULL,'cod',NULL,NULL,0,NULL,NULL,NULL); INSERT INTO "order_status" ("id","order_time","user_id","order_id","is_packaged","is_delivered","is_cancelled","cancel_reason","payment_state","cancellation_user_notes","cancellation_admin_notes","cancellation_reviewed","cancellation_reviewed_at","refund_coupon_id","is_cancelled_by_admin") VALUES(2459,'2026-10-08 06:20:46',82,2465,1,1,0,NULL,'cod',NULL,NULL,0,NULL,NULL,NULL); -INSERT INTO "order_status" ("id","order_time","user_id","order_id","is_packaged","is_delivered","is_cancelled","cancel_reason","payment_state","cancellation_user_notes","cancellation_admin_notes","cancellation_reviewed","cancellation_reviewed_at","refund_coupon_id","is_cancelled_by_admin") VALUES(2460,'2026-10-08 06:27:41',388,2466,0,0,0,NULL,'cod',NULL,NULL,0,NULL,NULL,NULL); -INSERT INTO "order_status" ("id","order_time","user_id","order_id","is_packaged","is_delivered","is_cancelled","cancel_reason","payment_state","cancellation_user_notes","cancellation_admin_notes","cancellation_reviewed","cancellation_reviewed_at","refund_coupon_id","is_cancelled_by_admin") VALUES(2461,'2026-10-08 06:27:41',388,2467,0,0,0,NULL,'cod',NULL,NULL,0,NULL,NULL,NULL); +INSERT INTO "order_status" ("id","order_time","user_id","order_id","is_packaged","is_delivered","is_cancelled","cancel_reason","payment_state","cancellation_user_notes","cancellation_admin_notes","cancellation_reviewed","cancellation_reviewed_at","refund_coupon_id","is_cancelled_by_admin") VALUES(2460,'2026-10-08 06:27:41',388,2466,1,1,0,NULL,'cod',NULL,NULL,0,NULL,NULL,NULL); +INSERT INTO "order_status" ("id","order_time","user_id","order_id","is_packaged","is_delivered","is_cancelled","cancel_reason","payment_state","cancellation_user_notes","cancellation_admin_notes","cancellation_reviewed","cancellation_reviewed_at","refund_coupon_id","is_cancelled_by_admin") VALUES(2461,'2026-10-08 06:27:41',388,2467,1,1,0,NULL,'cod',NULL,NULL,0,NULL,NULL,NULL); INSERT INTO "order_status" ("id","order_time","user_id","order_id","is_packaged","is_delivered","is_cancelled","cancel_reason","payment_state","cancellation_user_notes","cancellation_admin_notes","cancellation_reviewed","cancellation_reviewed_at","refund_coupon_id","is_cancelled_by_admin") VALUES(2462,'2026-10-08 07:43:33',499,2468,1,1,0,NULL,'cod',NULL,NULL,0,NULL,NULL,NULL); INSERT INTO "order_status" ("id","order_time","user_id","order_id","is_packaged","is_delivered","is_cancelled","cancel_reason","payment_state","cancellation_user_notes","cancellation_admin_notes","cancellation_reviewed","cancellation_reviewed_at","refund_coupon_id","is_cancelled_by_admin") VALUES(2463,'2026-10-08 08:04:33',494,2469,0,1,0,NULL,'cod',NULL,NULL,0,NULL,NULL,NULL); INSERT INTO "order_status" ("id","order_time","user_id","order_id","is_packaged","is_delivered","is_cancelled","cancel_reason","payment_state","cancellation_user_notes","cancellation_admin_notes","cancellation_reviewed","cancellation_reviewed_at","refund_coupon_id","is_cancelled_by_admin") VALUES(2464,'2026-10-08 08:55:40',1063,2470,1,1,0,NULL,'cod',NULL,NULL,0,NULL,NULL,NULL); @@ -6304,6 +6319,29 @@ INSERT INTO "order_status" ("id","order_time","user_id","order_id","is_packaged" INSERT INTO "order_status" ("id","order_time","user_id","order_id","is_packaged","is_delivered","is_cancelled","cancel_reason","payment_state","cancellation_user_notes","cancellation_admin_notes","cancellation_reviewed","cancellation_reviewed_at","refund_coupon_id","is_cancelled_by_admin") VALUES(2509,'2026-10-11 10:18:07',785,2515,1,1,0,NULL,'cod',NULL,NULL,0,NULL,NULL,NULL); INSERT INTO "order_status" ("id","order_time","user_id","order_id","is_packaged","is_delivered","is_cancelled","cancel_reason","payment_state","cancellation_user_notes","cancellation_admin_notes","cancellation_reviewed","cancellation_reviewed_at","refund_coupon_id","is_cancelled_by_admin") VALUES(2510,'2026-10-11 11:36:30',785,2516,1,1,0,NULL,'cod',NULL,NULL,0,NULL,NULL,NULL); INSERT INTO "order_status" ("id","order_time","user_id","order_id","is_packaged","is_delivered","is_cancelled","cancel_reason","payment_state","cancellation_user_notes","cancellation_admin_notes","cancellation_reviewed","cancellation_reviewed_at","refund_coupon_id","is_cancelled_by_admin") VALUES(2511,'2026-10-11 12:58:14',131,2517,1,1,0,NULL,'cod',NULL,NULL,0,NULL,NULL,NULL); +INSERT INTO "order_status" ("id","order_time","user_id","order_id","is_packaged","is_delivered","is_cancelled","cancel_reason","payment_state","cancellation_user_notes","cancellation_admin_notes","cancellation_reviewed","cancellation_reviewed_at","refund_coupon_id","is_cancelled_by_admin") VALUES(2512,'2026-10-11 14:16:03',132,2518,1,1,0,NULL,'cod',NULL,NULL,0,NULL,NULL,NULL); +INSERT INTO "order_status" ("id","order_time","user_id","order_id","is_packaged","is_delivered","is_cancelled","cancel_reason","payment_state","cancellation_user_notes","cancellation_admin_notes","cancellation_reviewed","cancellation_reviewed_at","refund_coupon_id","is_cancelled_by_admin") VALUES(2513,'2026-10-12 03:14:22',631,2519,0,1,0,NULL,'cod',NULL,NULL,0,NULL,NULL,NULL); +INSERT INTO "order_status" ("id","order_time","user_id","order_id","is_packaged","is_delivered","is_cancelled","cancel_reason","payment_state","cancellation_user_notes","cancellation_admin_notes","cancellation_reviewed","cancellation_reviewed_at","refund_coupon_id","is_cancelled_by_admin") VALUES(2514,'2026-10-12 03:17:37',1257,2520,0,1,0,NULL,'cod',NULL,NULL,0,NULL,NULL,NULL); +INSERT INTO "order_status" ("id","order_time","user_id","order_id","is_packaged","is_delivered","is_cancelled","cancel_reason","payment_state","cancellation_user_notes","cancellation_admin_notes","cancellation_reviewed","cancellation_reviewed_at","refund_coupon_id","is_cancelled_by_admin") VALUES(2515,'2026-10-12 04:14:06',1145,2521,1,1,0,NULL,'cod',NULL,NULL,0,NULL,NULL,NULL); +INSERT INTO "order_status" ("id","order_time","user_id","order_id","is_packaged","is_delivered","is_cancelled","cancel_reason","payment_state","cancellation_user_notes","cancellation_admin_notes","cancellation_reviewed","cancellation_reviewed_at","refund_coupon_id","is_cancelled_by_admin") VALUES(2516,'2026-10-12 04:15:17',679,2522,1,1,0,NULL,'cod',NULL,NULL,0,NULL,NULL,NULL); +INSERT INTO "order_status" ("id","order_time","user_id","order_id","is_packaged","is_delivered","is_cancelled","cancel_reason","payment_state","cancellation_user_notes","cancellation_admin_notes","cancellation_reviewed","cancellation_reviewed_at","refund_coupon_id","is_cancelled_by_admin") VALUES(2517,'2026-10-12 04:53:05',710,2523,0,1,0,NULL,'cod',NULL,NULL,0,NULL,NULL,NULL); +INSERT INTO "order_status" ("id","order_time","user_id","order_id","is_packaged","is_delivered","is_cancelled","cancel_reason","payment_state","cancellation_user_notes","cancellation_admin_notes","cancellation_reviewed","cancellation_reviewed_at","refund_coupon_id","is_cancelled_by_admin") VALUES(2518,'2026-10-12 05:03:33',1207,2524,1,1,0,NULL,'cod',NULL,NULL,0,NULL,NULL,NULL); +INSERT INTO "order_status" ("id","order_time","user_id","order_id","is_packaged","is_delivered","is_cancelled","cancel_reason","payment_state","cancellation_user_notes","cancellation_admin_notes","cancellation_reviewed","cancellation_reviewed_at","refund_coupon_id","is_cancelled_by_admin") VALUES(2519,'2026-10-12 12:01:08',1063,2525,1,1,0,NULL,'cod',NULL,NULL,0,NULL,NULL,NULL); +INSERT INTO "order_status" ("id","order_time","user_id","order_id","is_packaged","is_delivered","is_cancelled","cancel_reason","payment_state","cancellation_user_notes","cancellation_admin_notes","cancellation_reviewed","cancellation_reviewed_at","refund_coupon_id","is_cancelled_by_admin") VALUES(2520,'2026-10-12 12:54:21',416,2526,1,1,0,NULL,'cod',NULL,NULL,0,NULL,NULL,NULL); +INSERT INTO "order_status" ("id","order_time","user_id","order_id","is_packaged","is_delivered","is_cancelled","cancel_reason","payment_state","cancellation_user_notes","cancellation_admin_notes","cancellation_reviewed","cancellation_reviewed_at","refund_coupon_id","is_cancelled_by_admin") VALUES(2521,'2026-10-12 15:42:38',494,2527,0,1,0,NULL,'cod',NULL,NULL,0,NULL,NULL,NULL); +INSERT INTO "order_status" ("id","order_time","user_id","order_id","is_packaged","is_delivered","is_cancelled","cancel_reason","payment_state","cancellation_user_notes","cancellation_admin_notes","cancellation_reviewed","cancellation_reviewed_at","refund_coupon_id","is_cancelled_by_admin") VALUES(2522,'2026-10-12 15:42:38',494,2528,0,1,0,NULL,'cod',NULL,NULL,0,NULL,NULL,NULL); +INSERT INTO "order_status" ("id","order_time","user_id","order_id","is_packaged","is_delivered","is_cancelled","cancel_reason","payment_state","cancellation_user_notes","cancellation_admin_notes","cancellation_reviewed","cancellation_reviewed_at","refund_coupon_id","is_cancelled_by_admin") VALUES(2523,'2026-10-12 23:37:28',1294,2529,0,1,0,NULL,'cod',NULL,NULL,0,NULL,NULL,NULL); +INSERT INTO "order_status" ("id","order_time","user_id","order_id","is_packaged","is_delivered","is_cancelled","cancel_reason","payment_state","cancellation_user_notes","cancellation_admin_notes","cancellation_reviewed","cancellation_reviewed_at","refund_coupon_id","is_cancelled_by_admin") VALUES(2524,'2026-10-12 23:37:28',1294,2530,0,1,0,NULL,'cod',NULL,NULL,0,NULL,NULL,NULL); +INSERT INTO "order_status" ("id","order_time","user_id","order_id","is_packaged","is_delivered","is_cancelled","cancel_reason","payment_state","cancellation_user_notes","cancellation_admin_notes","cancellation_reviewed","cancellation_reviewed_at","refund_coupon_id","is_cancelled_by_admin") VALUES(2525,'2026-10-13 00:54:35',1215,2531,1,1,0,NULL,'cod',NULL,NULL,0,NULL,NULL,NULL); +INSERT INTO "order_status" ("id","order_time","user_id","order_id","is_packaged","is_delivered","is_cancelled","cancel_reason","payment_state","cancellation_user_notes","cancellation_admin_notes","cancellation_reviewed","cancellation_reviewed_at","refund_coupon_id","is_cancelled_by_admin") VALUES(2526,'2026-10-13 01:42:15',299,2532,1,1,0,NULL,'cod',NULL,NULL,0,NULL,NULL,NULL); +INSERT INTO "order_status" ("id","order_time","user_id","order_id","is_packaged","is_delivered","is_cancelled","cancel_reason","payment_state","cancellation_user_notes","cancellation_admin_notes","cancellation_reviewed","cancellation_reviewed_at","refund_coupon_id","is_cancelled_by_admin") VALUES(2527,'2026-10-13 03:56:14',256,2533,0,1,0,NULL,'cod',NULL,NULL,0,NULL,NULL,NULL); +INSERT INTO "order_status" ("id","order_time","user_id","order_id","is_packaged","is_delivered","is_cancelled","cancel_reason","payment_state","cancellation_user_notes","cancellation_admin_notes","cancellation_reviewed","cancellation_reviewed_at","refund_coupon_id","is_cancelled_by_admin") VALUES(2528,'2026-10-13 04:08:59',785,2534,1,1,0,NULL,'cod',NULL,NULL,0,NULL,NULL,NULL); +INSERT INTO "order_status" ("id","order_time","user_id","order_id","is_packaged","is_delivered","is_cancelled","cancel_reason","payment_state","cancellation_user_notes","cancellation_admin_notes","cancellation_reviewed","cancellation_reviewed_at","refund_coupon_id","is_cancelled_by_admin") VALUES(2529,'2026-10-13 04:12:52',131,2535,1,1,0,NULL,'cod',NULL,NULL,0,NULL,NULL,NULL); +INSERT INTO "order_status" ("id","order_time","user_id","order_id","is_packaged","is_delivered","is_cancelled","cancel_reason","payment_state","cancellation_user_notes","cancellation_admin_notes","cancellation_reviewed","cancellation_reviewed_at","refund_coupon_id","is_cancelled_by_admin") VALUES(2530,'2026-10-13 04:13:25',1262,2536,0,0,1,'No response from customer wantedly not lifting calls','cod',NULL,'No response from customer wantedly not lifting calls',1,'2026-10-13T07:24:14.679Z',NULL,1); +INSERT INTO "order_status" ("id","order_time","user_id","order_id","is_packaged","is_delivered","is_cancelled","cancel_reason","payment_state","cancellation_user_notes","cancellation_admin_notes","cancellation_reviewed","cancellation_reviewed_at","refund_coupon_id","is_cancelled_by_admin") VALUES(2531,'2026-10-13 04:28:25',132,2537,0,1,0,NULL,'cod',NULL,NULL,0,NULL,NULL,NULL); +INSERT INTO "order_status" ("id","order_time","user_id","order_id","is_packaged","is_delivered","is_cancelled","cancel_reason","payment_state","cancellation_user_notes","cancellation_admin_notes","cancellation_reviewed","cancellation_reviewed_at","refund_coupon_id","is_cancelled_by_admin") VALUES(2532,'2026-10-13 05:19:44',1009,2538,1,1,0,NULL,'cod',NULL,NULL,0,NULL,NULL,NULL); +INSERT INTO "order_status" ("id","order_time","user_id","order_id","is_packaged","is_delivered","is_cancelled","cancel_reason","payment_state","cancellation_user_notes","cancellation_admin_notes","cancellation_reviewed","cancellation_reviewed_at","refund_coupon_id","is_cancelled_by_admin") VALUES(2533,'2026-10-13 05:28:23',444,2539,1,1,0,NULL,'cod',NULL,NULL,0,NULL,NULL,NULL); +INSERT INTO "order_status" ("id","order_time","user_id","order_id","is_packaged","is_delivered","is_cancelled","cancel_reason","payment_state","cancellation_user_notes","cancellation_admin_notes","cancellation_reviewed","cancellation_reviewed_at","refund_coupon_id","is_cancelled_by_admin") VALUES(2534,'2026-10-13 05:33:33',1203,2540,1,1,0,NULL,'cod',NULL,NULL,0,NULL,NULL,NULL); CREATE TABLE IF NOT EXISTS "orders" ("id" INTEGER PRIMARY KEY, "user_id" INTEGER NOT NULL, "address_id" INTEGER NOT NULL, "slot_id" INTEGER, "total_amount" REAL NOT NULL, "created_at" TEXT NOT NULL DEFAULT CURRENT_TIMESTAMP, "is_cod" INTEGER NOT NULL DEFAULT false, "is_online_payment" INTEGER NOT NULL DEFAULT false, "payment_info_id" INTEGER, "readable_id" INTEGER NOT NULL, "admin_notes" TEXT, "user_notes" TEXT, "delivery_charge" REAL NOT NULL DEFAULT '0', "order_group_id" TEXT, "order_group_proportion" REAL, "is_flash_delivery" INTEGER NOT NULL DEFAULT false, `delivered_at` text); INSERT INTO "orders" ("id","user_id","address_id","slot_id","total_amount","created_at","is_cod","is_online_payment","payment_info_id","readable_id","admin_notes","user_notes","delivery_charge","order_group_id","order_group_proportion","is_flash_delivery","delivered_at") VALUES(105,22,31,9,7700,'2025-12-24T02:50:33.284Z',1,0,NULL,147,NULL,NULL,0,NULL,NULL,0,NULL); INSERT INTO "orders" ("id","user_id","address_id","slot_id","total_amount","created_at","is_cod","is_online_payment","payment_info_id","readable_id","admin_notes","user_notes","delivery_charge","order_group_id","order_group_proportion","is_flash_delivery","delivered_at") VALUES(106,15,24,8,92,'2025-12-24T10:32:01.957Z',1,0,NULL,149,NULL,NULL,20,NULL,NULL,0,NULL); @@ -8657,6 +8695,29 @@ INSERT INTO "orders" ("id","user_id","address_id","slot_id","total_amount","crea INSERT INTO "orders" ("id","user_id","address_id","slot_id","total_amount","created_at","is_cod","is_online_payment","payment_info_id","readable_id","admin_notes","user_notes","delivery_charge","order_group_id","order_group_proportion","is_flash_delivery","delivered_at") VALUES(2515,785,574,2038,644,'2026-10-11 10:18:07',1,0,NULL,-1,NULL,'Please send fresh fruits',0,'1791713887168-785',1,0,NULL); INSERT INTO "orders" ("id","user_id","address_id","slot_id","total_amount","created_at","is_cod","is_online_payment","payment_info_id","readable_id","admin_notes","user_notes","delivery_charge","order_group_id","order_group_proportion","is_flash_delivery","delivered_at") VALUES(2516,785,574,2039,366,'2026-10-11 11:36:30',1,0,NULL,-1,NULL,'Fresh fruits please ',0,'1791718590026-785',1,0,NULL); INSERT INTO "orders" ("id","user_id","address_id","slot_id","total_amount","created_at","is_cod","is_online_payment","payment_info_id","readable_id","admin_notes","user_notes","delivery_charge","order_group_id","order_group_proportion","is_flash_delivery","delivered_at") VALUES(2517,131,577,2040,257,'2026-10-11 12:58:14',1,0,NULL,-1,NULL,NULL,0,'1791723494656-131',1,0,NULL); +INSERT INTO "orders" ("id","user_id","address_id","slot_id","total_amount","created_at","is_cod","is_online_payment","payment_info_id","readable_id","admin_notes","user_notes","delivery_charge","order_group_id","order_group_proportion","is_flash_delivery","delivered_at") VALUES(2518,132,123,2041,449,'2026-10-11 14:16:03',1,0,NULL,-1,NULL,NULL,0,'1791728163935-132',1,0,NULL); +INSERT INTO "orders" ("id","user_id","address_id","slot_id","total_amount","created_at","is_cod","is_online_payment","payment_info_id","readable_id","admin_notes","user_notes","delivery_charge","order_group_id","order_group_proportion","is_flash_delivery","delivered_at") VALUES(2519,631,457,2043,758,'2026-10-12 03:14:22',1,0,NULL,-1,NULL,NULL,0,'1791774862064-631',1,0,NULL); +INSERT INTO "orders" ("id","user_id","address_id","slot_id","total_amount","created_at","is_cod","is_online_payment","payment_info_id","readable_id","admin_notes","user_notes","delivery_charge","order_group_id","order_group_proportion","is_flash_delivery","delivered_at") VALUES(2520,1257,835,2043,754,'2026-10-12 03:17:37',1,0,NULL,-1,NULL,NULL,0,'1791775057208-1257',1,0,NULL); +INSERT INTO "orders" ("id","user_id","address_id","slot_id","total_amount","created_at","is_cod","is_online_payment","payment_info_id","readable_id","admin_notes","user_notes","delivery_charge","order_group_id","order_group_proportion","is_flash_delivery","delivered_at") VALUES(2521,1145,749,2043,214,'2026-10-12 04:14:06',1,0,NULL,-1,NULL,NULL,15,'1791778446443-1145',1,0,NULL); +INSERT INTO "orders" ("id","user_id","address_id","slot_id","total_amount","created_at","is_cod","is_online_payment","payment_info_id","readable_id","admin_notes","user_notes","delivery_charge","order_group_id","order_group_proportion","is_flash_delivery","delivered_at") VALUES(2522,679,881,2043,304,'2026-10-12 04:15:17',1,0,NULL,-1,NULL,NULL,0,'1791778517895-679',1,0,NULL); +INSERT INTO "orders" ("id","user_id","address_id","slot_id","total_amount","created_at","is_cod","is_online_payment","payment_info_id","readable_id","admin_notes","user_notes","delivery_charge","order_group_id","order_group_proportion","is_flash_delivery","delivered_at") VALUES(2523,710,542,2043,281,'2026-10-12 04:53:05',1,0,NULL,-1,NULL,NULL,0,'1791780785129-710',1,0,NULL); +INSERT INTO "orders" ("id","user_id","address_id","slot_id","total_amount","created_at","is_cod","is_online_payment","payment_info_id","readable_id","admin_notes","user_notes","delivery_charge","order_group_id","order_group_proportion","is_flash_delivery","delivered_at") VALUES(2524,1207,791,NULL,304,'2026-10-12 05:03:33',1,0,NULL,-1,NULL,NULL,39,'1791781413426-1207',1,1,NULL); +INSERT INTO "orders" ("id","user_id","address_id","slot_id","total_amount","created_at","is_cod","is_online_payment","payment_info_id","readable_id","admin_notes","user_notes","delivery_charge","order_group_id","order_group_proportion","is_flash_delivery","delivered_at") VALUES(2525,1063,701,2047,167,'2026-10-12 12:01:07',1,0,NULL,-1,NULL,NULL,15,'1791806467670-1063',1,0,NULL); +INSERT INTO "orders" ("id","user_id","address_id","slot_id","total_amount","created_at","is_cod","is_online_payment","payment_info_id","readable_id","admin_notes","user_notes","delivery_charge","order_group_id","order_group_proportion","is_flash_delivery","delivered_at") VALUES(2526,416,312,2048,167,'2026-10-12 12:54:20',1,0,NULL,-1,NULL,NULL,15,'1791809660640-416',1,0,NULL); +INSERT INTO "orders" ("id","user_id","address_id","slot_id","total_amount","created_at","is_cod","is_online_payment","payment_info_id","readable_id","admin_notes","user_notes","delivery_charge","order_group_id","order_group_proportion","is_flash_delivery","delivered_at") VALUES(2527,494,369,2050,386,'2026-10-12 15:42:38',1,0,NULL,-1,NULL,NULL,0,'1791819756158-494',0.5105820105820106,0,NULL); +INSERT INTO "orders" ("id","user_id","address_id","slot_id","total_amount","created_at","is_cod","is_online_payment","payment_info_id","readable_id","admin_notes","user_notes","delivery_charge","order_group_id","order_group_proportion","is_flash_delivery","delivered_at") VALUES(2528,494,369,2049,370,'2026-10-12 15:42:38',1,0,NULL,-1,NULL,NULL,0,'1791819756158-494',0.4894179894179894,0,NULL); +INSERT INTO "orders" ("id","user_id","address_id","slot_id","total_amount","created_at","is_cod","is_online_payment","payment_info_id","readable_id","admin_notes","user_notes","delivery_charge","order_group_id","order_group_proportion","is_flash_delivery","delivered_at") VALUES(2529,1294,866,2050,676,'2026-10-12 23:37:28',1,0,NULL,-1,NULL,NULL,0,'1791848248238-1294',0.5822566752799311,0,NULL); +INSERT INTO "orders" ("id","user_id","address_id","slot_id","total_amount","created_at","is_cod","is_online_payment","payment_info_id","readable_id","admin_notes","user_notes","delivery_charge","order_group_id","order_group_proportion","is_flash_delivery","delivered_at") VALUES(2530,1294,866,2049,485,'2026-10-12 23:37:28',1,0,NULL,-1,NULL,NULL,0,'1791848248238-1294',0.4177433247200689,0,NULL); +INSERT INTO "orders" ("id","user_id","address_id","slot_id","total_amount","created_at","is_cod","is_online_payment","payment_info_id","readable_id","admin_notes","user_notes","delivery_charge","order_group_id","order_group_proportion","is_flash_delivery","delivered_at") VALUES(2531,1215,801,2049,214,'2026-10-13 00:54:35',1,0,NULL,-1,NULL,NULL,15,'1791852875863-1215',1,0,NULL); +INSERT INTO "orders" ("id","user_id","address_id","slot_id","total_amount","created_at","is_cod","is_online_payment","payment_info_id","readable_id","admin_notes","user_notes","delivery_charge","order_group_id","order_group_proportion","is_flash_delivery","delivered_at") VALUES(2532,299,220,2050,250,'2026-10-13 01:42:15',1,0,NULL,-1,NULL,NULL,0,'1791855735271-299',1,0,NULL); +INSERT INTO "orders" ("id","user_id","address_id","slot_id","total_amount","created_at","is_cod","is_online_payment","payment_info_id","readable_id","admin_notes","user_notes","delivery_charge","order_group_id","order_group_proportion","is_flash_delivery","delivered_at") VALUES(2533,256,191,2051,388,'2026-10-13 03:56:14',1,0,NULL,-1,NULL,NULL,0,'1791863773841-256',1,0,NULL); +INSERT INTO "orders" ("id","user_id","address_id","slot_id","total_amount","created_at","is_cod","is_online_payment","payment_info_id","readable_id","admin_notes","user_notes","delivery_charge","order_group_id","order_group_proportion","is_flash_delivery","delivered_at") VALUES(2534,785,574,2051,451,'2026-10-13 04:08:59',1,0,NULL,-1,NULL,'Please leg piece please ',0,'1791864539483-785',1,0,NULL); +INSERT INTO "orders" ("id","user_id","address_id","slot_id","total_amount","created_at","is_cod","is_online_payment","payment_info_id","readable_id","admin_notes","user_notes","delivery_charge","order_group_id","order_group_proportion","is_flash_delivery","delivered_at") VALUES(2535,131,577,2051,449,'2026-10-13 04:12:52',1,0,NULL,-1,NULL,NULL,0,'1791864771882-131',1,0,NULL); +INSERT INTO "orders" ("id","user_id","address_id","slot_id","total_amount","created_at","is_cod","is_online_payment","payment_info_id","readable_id","admin_notes","user_notes","delivery_charge","order_group_id","order_group_proportion","is_flash_delivery","delivered_at") VALUES(2536,1262,839,2051,351,'2026-10-13 04:13:24',1,0,NULL,-1,NULL,'Beside laxmi narsimha kiranam shop',0,'1791864804861-1262',1,0,NULL); +INSERT INTO "orders" ("id","user_id","address_id","slot_id","total_amount","created_at","is_cod","is_online_payment","payment_info_id","readable_id","admin_notes","user_notes","delivery_charge","order_group_id","order_group_proportion","is_flash_delivery","delivered_at") VALUES(2537,132,123,2051,294,'2026-10-13 04:28:25',1,0,NULL,-1,NULL,NULL,0,'1791865705105-132',1,0,NULL); +INSERT INTO "orders" ("id","user_id","address_id","slot_id","total_amount","created_at","is_cod","is_online_payment","payment_info_id","readable_id","admin_notes","user_notes","delivery_charge","order_group_id","order_group_proportion","is_flash_delivery","delivered_at") VALUES(2538,1009,686,2051,275,'2026-10-13 05:19:44',1,0,NULL,-1,NULL,NULL,0,'1791868783938-1009',1,0,NULL); +INSERT INTO "orders" ("id","user_id","address_id","slot_id","total_amount","created_at","is_cod","is_online_payment","payment_info_id","readable_id","admin_notes","user_notes","delivery_charge","order_group_id","order_group_proportion","is_flash_delivery","delivered_at") VALUES(2539,444,335,2052,399,'2026-10-13 05:28:23',1,0,NULL,-1,NULL,NULL,0,'1791869303033-444',1,0,NULL); +INSERT INTO "orders" ("id","user_id","address_id","slot_id","total_amount","created_at","is_cod","is_online_payment","payment_info_id","readable_id","admin_notes","user_notes","delivery_charge","order_group_id","order_group_proportion","is_flash_delivery","delivered_at") VALUES(2540,1203,787,NULL,456,'2026-10-13 05:33:32',1,0,NULL,-1,NULL,NULL,0,'1791869612764-1203',1,1,NULL); CREATE TABLE IF NOT EXISTS "payment_info" ("id" INTEGER PRIMARY KEY, "status" TEXT NOT NULL, "gateway" TEXT NOT NULL, "order_id" TEXT, "token" TEXT, "merchant_order_id" TEXT NOT NULL, "payload" TEXT); INSERT INTO "payment_info" ("id","status","gateway","order_id","token","merchant_order_id","payload") VALUES(1,'pending','phonepe',NULL,NULL,'order_1763563896010',NULL); INSERT INTO "payment_info" ("id","status","gateway","order_id","token","merchant_order_id","payload") VALUES(2,'pending','phonepe',NULL,NULL,'order_1763564910006',NULL); @@ -8999,6 +9060,7 @@ INSERT INTO "refunds" ("id","order_id","refund_amount","refund_status","merchant INSERT INTO "refunds" ("id","order_id","refund_amount","refund_status","merchant_refund_id","refund_processed_at","created_at") VALUES(282,2476,NULL,'na',NULL,NULL,'2026-10-08 14:18:26'); INSERT INTO "refunds" ("id","order_id","refund_amount","refund_status","merchant_refund_id","refund_processed_at","created_at") VALUES(283,2477,NULL,'na',NULL,NULL,'2026-10-08 14:18:39'); INSERT INTO "refunds" ("id","order_id","refund_amount","refund_status","merchant_refund_id","refund_processed_at","created_at") VALUES(284,2479,NULL,'na',NULL,NULL,'2026-10-09 02:05:52'); +INSERT INTO "refunds" ("id","order_id","refund_amount","refund_status","merchant_refund_id","refund_processed_at","created_at") VALUES(285,2536,NULL,'na',NULL,NULL,'2026-10-13 07:24:14'); CREATE TABLE IF NOT EXISTS "reserved_coupons" ("id" INTEGER PRIMARY KEY, "secret_code" TEXT NOT NULL, "coupon_code" TEXT NOT NULL, "discount_percent" REAL, "flat_discount" REAL, "min_order" REAL, "sku_ids" TEXT, "max_value" REAL, "valid_till" TEXT, "max_limit_for_user" INTEGER, "exclusive_apply" INTEGER NOT NULL DEFAULT false, "is_redeemed" INTEGER NOT NULL DEFAULT false, "redeemed_by" INTEGER, "redeemed_at" TEXT, "created_by" INTEGER NOT NULL, "created_at" TEXT NOT NULL DEFAULT CURRENT_TIMESTAMP, `is_first_order_only` integer DEFAULT false NOT NULL); INSERT INTO "reserved_coupons" ("id","secret_code","coupon_code","discount_percent","flat_discount","min_order","sku_ids","max_value","valid_till","max_limit_for_user","exclusive_apply","is_redeemed","redeemed_by","redeemed_at","created_by","created_at","is_first_order_only") VALUES(1,'RESERVE_TEST34','RESERVE_TEST34',25,NULL,1000,'[]',250,'2026-01-30T13:16:00.000Z',2,0,1,NULL,'2026-01-12T08:58:20.468Z',6,'2026-01-07T13:16:53.387Z',0); INSERT INTO "reserved_coupons" ("id","secret_code","coupon_code","discount_percent","flat_discount","min_order","sku_ids","max_value","valid_till","max_limit_for_user","exclusive_apply","is_redeemed","redeemed_by","redeemed_at","created_by","created_at","is_first_order_only") VALUES(2,'TEST50OFF','TEST50OFF',10,NULL,250,'[]',500,'2026-08-13T02:30:00.000Z',1,0,1,6,'2026-08-12T16:15:10.211Z',4,'2026-08-12 16:14:27',0); @@ -9936,7 +9998,7 @@ INSERT INTO "unlogged_user_tokens" ("id","token","added_at","last_verified") VAL INSERT INTO "unlogged_user_tokens" ("id","token","added_at","last_verified") VALUES(377,'ExponentPushToken[KzS5P5F_tai5UTsmqICPEt]','2026-04-04T14:47:22.276Z','2026-04-07T07:37:24.102Z'); INSERT INTO "unlogged_user_tokens" ("id","token","added_at","last_verified") VALUES(381,'ExponentPushToken[ajyGklEpPuaF0semXEHmyh]','2026-04-05T11:48:04.798Z','2026-04-08T13:40:10.672Z'); INSERT INTO "unlogged_user_tokens" ("id","token","added_at","last_verified") VALUES(384,'ExponentPushToken[Gys045OR7dHYbQ2CPTMqAE]','2026-04-05T18:30:16.243Z','2026-04-29T08:13:52.853Z'); -INSERT INTO "unlogged_user_tokens" ("id","token","added_at","last_verified") VALUES(385,'ExponentPushToken[UBKsoGEwMZLkm4B3wUtx5S]','2026-04-05T18:34:52.401Z','2026-10-04T05:33:49.020Z'); +INSERT INTO "unlogged_user_tokens" ("id","token","added_at","last_verified") VALUES(385,'ExponentPushToken[UBKsoGEwMZLkm4B3wUtx5S]','2026-04-05T18:34:52.401Z','2026-10-12T04:27:53.320Z'); INSERT INTO "unlogged_user_tokens" ("id","token","added_at","last_verified") VALUES(389,'ExponentPushToken[q-CLMSMS5OX9ZwjRwfk2qp]','2026-04-06T15:10:01.277Z','2026-04-07T12:27:02.134Z'); INSERT INTO "unlogged_user_tokens" ("id","token","added_at","last_verified") VALUES(393,'ExponentPushToken[JMEvkUHKT0n34hcs-MiJAJ]','2026-04-07T05:11:31.283Z','2026-09-04T02:49:54.354Z'); INSERT INTO "unlogged_user_tokens" ("id","token","added_at","last_verified") VALUES(394,'ExponentPushToken[7phYIiLzUvAb8FKupVlpPz]','2026-04-07T07:11:45.731Z','2026-04-07T07:11:45.730Z'); @@ -10205,7 +10267,7 @@ INSERT INTO "unlogged_user_tokens" ("id","token","added_at","last_verified") VAL INSERT INTO "unlogged_user_tokens" ("id","token","added_at","last_verified") VALUES(799,'ExponentPushToken[Pe4vf3NBMKEUCH8XnSAarJ]','2026-06-06 12:34:20','2026-06-06T12:34:20.550Z'); INSERT INTO "unlogged_user_tokens" ("id","token","added_at","last_verified") VALUES(800,'ExponentPushToken[t94Qi7PwylitxJ9SEc33ST]','2026-06-06 15:06:06','2026-08-31T14:23:28.098Z'); INSERT INTO "unlogged_user_tokens" ("id","token","added_at","last_verified") VALUES(801,'ExponentPushToken[tEO2BSMaOYta_ySFk9-Xgv]','2026-06-06 16:05:33','2026-06-24T09:07:38.228Z'); -INSERT INTO "unlogged_user_tokens" ("id","token","added_at","last_verified") VALUES(802,'ExponentPushToken[tfH3Z5Nh1Bhi--an9eZ_Mi]','2026-06-06 16:10:51','2026-10-05T02:24:25.441Z'); +INSERT INTO "unlogged_user_tokens" ("id","token","added_at","last_verified") VALUES(802,'ExponentPushToken[tfH3Z5Nh1Bhi--an9eZ_Mi]','2026-06-06 16:10:51','2026-10-12T09:01:16.184Z'); INSERT INTO "unlogged_user_tokens" ("id","token","added_at","last_verified") VALUES(803,'ExponentPushToken[851EHSGWWQq55c_EOj92IM]','2026-06-06 17:39:55','2026-07-02T15:54:44.521Z'); INSERT INTO "unlogged_user_tokens" ("id","token","added_at","last_verified") VALUES(805,'ExponentPushToken[8SZ3aeIlY5Nu309zzGhxms]','2026-06-07 04:11:45','2026-06-07T06:15:32.738Z'); INSERT INTO "unlogged_user_tokens" ("id","token","added_at","last_verified") VALUES(806,'ExponentPushToken[wWBd_dLudieLX2on-NiKDo]','2026-06-07 08:07:14','2026-06-07T08:07:14.786Z'); @@ -10460,7 +10522,7 @@ INSERT INTO "unlogged_user_tokens" ("id","token","added_at","last_verified") VAL INSERT INTO "unlogged_user_tokens" ("id","token","added_at","last_verified") VALUES(1118,'ExponentPushToken[iUT0D6LFpXi71mAnqOQDd_]','2026-07-07 14:24:08','2026-07-07T14:24:08.886Z'); INSERT INTO "unlogged_user_tokens" ("id","token","added_at","last_verified") VALUES(1119,'ExponentPushToken[1EcQuAAg2ZFfp5oZNRAA2n]','2026-07-07 14:37:44','2026-10-11T12:42:51.037Z'); INSERT INTO "unlogged_user_tokens" ("id","token","added_at","last_verified") VALUES(1120,'ExponentPushToken[J-NPonMMXWXAajTocXsSDy]','2026-07-08 04:43:24','2026-07-12T17:02:30.272Z'); -INSERT INTO "unlogged_user_tokens" ("id","token","added_at","last_verified") VALUES(1121,'ExponentPushToken[nZjhjRFgxQyStzudkKK44-]','2026-07-08 08:44:37','2026-09-26T14:08:03.300Z'); +INSERT INTO "unlogged_user_tokens" ("id","token","added_at","last_verified") VALUES(1121,'ExponentPushToken[nZjhjRFgxQyStzudkKK44-]','2026-07-08 08:44:37','2026-10-11T15:15:13.435Z'); INSERT INTO "unlogged_user_tokens" ("id","token","added_at","last_verified") VALUES(1122,'ExponentPushToken[Gmmv-4LJ4HVJpwFuWb3-9y]','2026-07-08 19:30:32','2026-07-09T16:34:20.489Z'); INSERT INTO "unlogged_user_tokens" ("id","token","added_at","last_verified") VALUES(1123,'ExponentPushToken[U9gHvGGFa7wGkKjITJLYpK]','2026-07-09 04:41:02','2026-09-10T08:38:52.843Z'); INSERT INTO "unlogged_user_tokens" ("id","token","added_at","last_verified") VALUES(1124,'ExponentPushToken[igmC8WIEnkK2g4Ym9fuCTG]','2026-07-09 05:51:39','2026-07-09T05:51:39.233Z'); @@ -10687,7 +10749,7 @@ INSERT INTO "unlogged_user_tokens" ("id","token","added_at","last_verified") VAL INSERT INTO "unlogged_user_tokens" ("id","token","added_at","last_verified") VALUES(1427,'ExponentPushToken[TX6Z-ROaA9Pf5MUu5kW5gz]','2026-09-11 13:23:45','2026-09-11T13:23:45.515Z'); INSERT INTO "unlogged_user_tokens" ("id","token","added_at","last_verified") VALUES(1429,'ExponentPushToken[qCvmq6O2FTKYRrA5Qjik2i]','2026-09-11 13:24:09','2026-09-12T06:41:02.360Z'); INSERT INTO "unlogged_user_tokens" ("id","token","added_at","last_verified") VALUES(1431,'ExponentPushToken[vCdkhuInqaTjejakAhIdRT]','2026-09-11 13:25:50','2026-09-11T13:25:50.539Z'); -INSERT INTO "unlogged_user_tokens" ("id","token","added_at","last_verified") VALUES(1432,'ExponentPushToken[fOl_D8JtZsQHEjeIAihPgu]','2026-09-11 13:26:25','2026-10-06T13:12:27.266Z'); +INSERT INTO "unlogged_user_tokens" ("id","token","added_at","last_verified") VALUES(1432,'ExponentPushToken[fOl_D8JtZsQHEjeIAihPgu]','2026-09-11 13:26:25','2026-10-12T11:54:28.939Z'); INSERT INTO "unlogged_user_tokens" ("id","token","added_at","last_verified") VALUES(1434,'ExponentPushToken[1rIYucAokgb-SE-ij2z77f]','2026-09-11 13:26:34','2026-09-11T19:19:53.977Z'); INSERT INTO "unlogged_user_tokens" ("id","token","added_at","last_verified") VALUES(1435,'ExponentPushToken[PHkU7cGZVe-8bDgWOULXxl]','2026-09-11 13:27:07','2026-10-10T09:12:43.982Z'); INSERT INTO "unlogged_user_tokens" ("id","token","added_at","last_verified") VALUES(1437,'ExponentPushToken[TpUNN0MNBdsU0IwvRllvQS]','2026-09-11 13:28:17','2026-09-11T13:28:17.587Z'); @@ -11034,7 +11096,7 @@ INSERT INTO "unlogged_user_tokens" ("id","token","added_at","last_verified") VAL INSERT INTO "unlogged_user_tokens" ("id","token","added_at","last_verified") VALUES(1933,'ExponentPushToken[IIZlsyDWcIQtUi_jEj-myT]','2026-09-12 09:15:08','2026-09-26T08:24:34.152Z'); INSERT INTO "unlogged_user_tokens" ("id","token","added_at","last_verified") VALUES(1934,'ExponentPushToken[5PcRccOLXYBsQr8vgRg10P]','2026-09-12 09:15:25','2026-09-12T09:15:25.261Z'); INSERT INTO "unlogged_user_tokens" ("id","token","added_at","last_verified") VALUES(1935,'ExponentPushToken[8HUWaKGdwMj6gyHn6Vfhao]','2026-09-12 09:17:50','2026-09-12T09:17:50.599Z'); -INSERT INTO "unlogged_user_tokens" ("id","token","added_at","last_verified") VALUES(1936,'ExponentPushToken[lWe3ZNJBWissM0ReHbTzg7]','2026-09-12 09:20:04','2026-10-05T03:55:42.799Z'); +INSERT INTO "unlogged_user_tokens" ("id","token","added_at","last_verified") VALUES(1936,'ExponentPushToken[lWe3ZNJBWissM0ReHbTzg7]','2026-09-12 09:20:04','2026-10-12T03:45:34.656Z'); INSERT INTO "unlogged_user_tokens" ("id","token","added_at","last_verified") VALUES(1938,'ExponentPushToken[uo5mioA2THYhTnu4gskiPu]','2026-09-12 09:27:58','2026-09-12T09:27:58.655Z'); INSERT INTO "unlogged_user_tokens" ("id","token","added_at","last_verified") VALUES(1939,'ExponentPushToken[rbOcmbGd9wVfSKnZ6ViMho]','2026-09-12 09:30:24','2026-09-12T09:30:24.102Z'); INSERT INTO "unlogged_user_tokens" ("id","token","added_at","last_verified") VALUES(1940,'ExponentPushToken[UC5pKNCXpLRUyextZ6CjZ9]','2026-09-12 09:31:39','2026-09-12T09:31:39.864Z'); @@ -11251,7 +11313,7 @@ INSERT INTO "unlogged_user_tokens" ("id","token","added_at","last_verified") VAL INSERT INTO "unlogged_user_tokens" ("id","token","added_at","last_verified") VALUES(2212,'ExponentPushToken[Y1xmsQPVnH2UNvlGtr0Nt4]','2026-09-20 16:15:33','2026-09-20T16:15:33.362Z'); INSERT INTO "unlogged_user_tokens" ("id","token","added_at","last_verified") VALUES(2213,'ExponentPushToken[wy3nWjHVy48OYm2KEMDNwj]','2026-09-20 19:17:42','2026-09-21T08:05:48.498Z'); INSERT INTO "unlogged_user_tokens" ("id","token","added_at","last_verified") VALUES(2214,'ExponentPushToken[RpaDZ0GDZ0REU2tRacAOYZ]','2026-09-21 03:06:49','2026-09-21T03:06:49.181Z'); -INSERT INTO "unlogged_user_tokens" ("id","token","added_at","last_verified") VALUES(2215,'ExponentPushToken[lngJ7lL_1UAC636GXM7Yav]','2026-09-21 03:22:16','2026-10-11T12:36:56.221Z'); +INSERT INTO "unlogged_user_tokens" ("id","token","added_at","last_verified") VALUES(2215,'ExponentPushToken[lngJ7lL_1UAC636GXM7Yav]','2026-09-21 03:22:16','2026-10-12T08:06:42.325Z'); INSERT INTO "unlogged_user_tokens" ("id","token","added_at","last_verified") VALUES(2216,'ExponentPushToken[KCMpszLJRkko9txHhb8aHI]','2026-09-21 05:41:57','2026-09-21T05:42:47.752Z'); INSERT INTO "unlogged_user_tokens" ("id","token","added_at","last_verified") VALUES(2217,'ExponentPushToken[SlTUoWOqXf7ntBxBT2aZMn]','2026-09-21 08:37:21','2026-10-10T12:56:12.480Z'); INSERT INTO "unlogged_user_tokens" ("id","token","added_at","last_verified") VALUES(2218,'ExponentPushToken[O2Jt5xA6TxGjW-zSPd7NmQ]','2026-09-21 08:50:32','2026-09-27T02:15:26.373Z'); @@ -11349,7 +11411,7 @@ INSERT INTO "unlogged_user_tokens" ("id","token","added_at","last_verified") VAL INSERT INTO "unlogged_user_tokens" ("id","token","added_at","last_verified") VALUES(2322,'ExponentPushToken[VjojTWHgDMbjQTGxCEzBHG]','2026-10-05 16:28:14','2026-10-05T16:28:17.494Z'); INSERT INTO "unlogged_user_tokens" ("id","token","added_at","last_verified") VALUES(2323,'ExponentPushToken[lq78-dLjnT_SzMAXfv8WTr]','2026-10-06 05:02:03','2026-10-06T05:02:03.589Z'); INSERT INTO "unlogged_user_tokens" ("id","token","added_at","last_verified") VALUES(2324,'ExponentPushToken[VUqliPCvttnKYG9YKPOvVG]','2026-10-06 05:21:44','2026-10-06T05:22:50.004Z'); -INSERT INTO "unlogged_user_tokens" ("id","token","added_at","last_verified") VALUES(2325,'ExponentPushToken[L1bfdoLoTkcw9qozhkNDM5]','2026-10-07 03:19:08','2026-10-08T01:33:17.671Z'); +INSERT INTO "unlogged_user_tokens" ("id","token","added_at","last_verified") VALUES(2325,'ExponentPushToken[L1bfdoLoTkcw9qozhkNDM5]','2026-10-07 03:19:08','2026-10-11T15:38:39.519Z'); INSERT INTO "unlogged_user_tokens" ("id","token","added_at","last_verified") VALUES(2326,'ExponentPushToken[ojutPgA8s-meD1d83hvajC]','2026-10-07 11:53:55','2026-10-07T11:53:55.005Z'); INSERT INTO "unlogged_user_tokens" ("id","token","added_at","last_verified") VALUES(2327,'ExponentPushToken[QslZxBOLZB8NSvNMeV2O0F]','2026-10-07 14:44:31','2026-10-07T14:44:31.183Z'); INSERT INTO "unlogged_user_tokens" ("id","token","added_at","last_verified") VALUES(2328,'ExponentPushToken[qVUNieLihvoBi95FFlLwfr]','2026-10-07 16:14:14','2026-10-10T11:10:15.832Z'); @@ -11369,6 +11431,12 @@ INSERT INTO "unlogged_user_tokens" ("id","token","added_at","last_verified") VAL INSERT INTO "unlogged_user_tokens" ("id","token","added_at","last_verified") VALUES(2343,'ExponentPushToken[_OkaD2N_fNYBjHMOavDLp8]','2026-10-11 09:16:48','2026-10-11T09:16:48.349Z'); INSERT INTO "unlogged_user_tokens" ("id","token","added_at","last_verified") VALUES(2344,'ExponentPushToken[_OkaD2N_fNYBjHMOavDLp8]','2026-10-11 09:16:48','2026-10-11T09:16:48.470Z'); INSERT INTO "unlogged_user_tokens" ("id","token","added_at","last_verified") VALUES(2345,'ExponentPushToken[z8e6rCKmazVIPPozFZ9USn]','2026-10-11 12:54:43','2026-10-11T12:54:43.684Z'); +INSERT INTO "unlogged_user_tokens" ("id","token","added_at","last_verified") VALUES(2346,'ExponentPushToken[ag_N_XPLt8OSWxLLZWiVa9]','2026-10-11 15:43:17','2026-10-11T15:43:17.157Z'); +INSERT INTO "unlogged_user_tokens" ("id","token","added_at","last_verified") VALUES(2348,'ExponentPushToken[jh9OpsBESTlmoufy0PYJIi]','2026-10-11 17:08:24','2026-10-11T17:08:24.135Z'); +INSERT INTO "unlogged_user_tokens" ("id","token","added_at","last_verified") VALUES(2349,'ExponentPushToken[tBmqsUG-rRzp86sn13MGqG]','2026-10-12 05:43:03','2026-10-12T05:43:03.123Z'); +INSERT INTO "unlogged_user_tokens" ("id","token","added_at","last_verified") VALUES(2350,'ExponentPushToken[E8zmZIOr5954A7jmCnvmy-]','2026-10-12 06:34:02','2026-10-12T06:34:01.990Z'); +INSERT INTO "unlogged_user_tokens" ("id","token","added_at","last_verified") VALUES(2352,'ExponentPushToken[MoHqpvOqYdvNcJVwySrR35]','2026-10-12 16:41:06','2026-10-13T06:21:42.119Z'); +INSERT INTO "unlogged_user_tokens" ("id","token","added_at","last_verified") VALUES(2353,'ExponentPushToken[aITcTXM3kUTvLkCku51RVY]','2026-10-13 01:09:38','2026-10-13T01:09:38.688Z'); CREATE TABLE IF NOT EXISTS "upload_url_status" ("id" INTEGER PRIMARY KEY, "created_at" TEXT NOT NULL DEFAULT CURRENT_TIMESTAMP, "key" TEXT NOT NULL, "status" TEXT NOT NULL DEFAULT 'pending'); INSERT INTO "upload_url_status" ("id","created_at","key","status") VALUES(35,'2025-12-07T08:58:13.136Z','review-images/1765097892914.jpg','pending'); INSERT INTO "upload_url_status" ("id","created_at","key","status") VALUES(36,'2025-12-07T08:58:13.347Z','review-images/1765097893129.png','pending'); @@ -11720,6 +11788,7 @@ INSERT INTO "user_incidents" ("id","user_id","order_id","date_added","admin_comm INSERT INTO "user_incidents" ("id","user_id","order_id","date_added","admin_comment","added_by","negativity_score") VALUES(12,1215,2235,'2026-09-23 03:00:24','Not lifting calls ',4,90); INSERT INTO "user_incidents" ("id","user_id","order_id","date_added","admin_comment","added_by","negativity_score") VALUES(13,793,2280,'2026-09-26 03:17:15','Emergency user and not lifting calls ',4,40); INSERT INTO "user_incidents" ("id","user_id","order_id","date_added","admin_comment","added_by","negativity_score") VALUES(14,1295,NULL,'2026-10-03 10:16:31','Not lifting calls wantedly ',4,1000); +INSERT INTO "user_incidents" ("id","user_id","order_id","date_added","admin_comment","added_by","negativity_score") VALUES(15,1262,2536,'2026-10-13 07:23:36','Wantedly not lifting call',4,1000); CREATE TABLE IF NOT EXISTS "user_notifications" ("id" INTEGER PRIMARY KEY, "image_url" TEXT, "created_at" TEXT NOT NULL DEFAULT CURRENT_TIMESTAMP, "body" TEXT NOT NULL, "applicable_users" TEXT, "title" TEXT NOT NULL); INSERT INTO "user_notifications" ("id","image_url","created_at","body","applicable_users","title") VALUES(21,NULL,'2026-02-09T05:21:32.312Z',replace(replace('Van Winkle liked hunting, too. He liked going to the mountains to shoot squirrels. \r\nHe also liked sitting in the mountains and watching the world below—the','\r',char(13)),'\n',char(10)),'[1]','Hii'); INSERT INTO "user_notifications" ("id","image_url","created_at","body","applicable_users","title") VALUES(22,NULL,'2026-02-09T08:58:19.744Z','Test Notification','[65]','Hello'); @@ -13051,6 +13120,8 @@ INSERT INTO "users" ("id","name","email","mobile","created_at") VALUES(1315,NULL INSERT INTO "users" ("id","name","email","mobile","created_at") VALUES(1316,'Mohammed Mudassir Zama','mohammedmudassirzama50@gmail.com','8688942045','2026-10-10 16:55:12'); INSERT INTO "users" ("id","name","email","mobile","created_at") VALUES(1317,NULL,NULL,'9912563434','2026-10-11 03:02:22'); INSERT INTO "users" ("id","name","email","mobile","created_at") VALUES(1318,NULL,NULL,'7893626601','2026-10-11 05:12:16'); +INSERT INTO "users" ("id","name","email","mobile","created_at") VALUES(1319,NULL,NULL,'7402636363','2026-10-11 17:14:18'); +INSERT INTO "users" ("id","name","email","mobile","created_at") VALUES(1320,NULL,NULL,'9177185837','2026-10-12 13:33:27'); CREATE TABLE IF NOT EXISTS "vendor_snippets" ("id" INTEGER PRIMARY KEY, "snippet_code" TEXT NOT NULL, "slot_id" INTEGER, "sku_ids" TEXT NOT NULL, "valid_till" TEXT, "created_at" TEXT NOT NULL DEFAULT CURRENT_TIMESTAMP, "is_permanent" INTEGER NOT NULL DEFAULT false); INSERT INTO "vendor_snippets" ("id","snippet_code","slot_id","sku_ids","valid_till","created_at","is_permanent") VALUES(55,'Allvegetables1',NULL,'[88,66,70,64,91,19,71,27,79,32,5,65,45,77,74,17,16,72,33,13,89,29,78,30,69,31,76,90,18,68]','2027-01-27T17:56:00.000Z','2026-01-27T18:03:18.974Z',1); INSERT INTO "vendor_snippets" ("id","snippet_code","slot_id","sku_ids","valid_till","created_at","is_permanent") VALUES(56,'AllMuttonitems',NULL,'[34,85,14,87,35,84,28,86,4,12,99,98,20]','2027-03-31T02:51:00.000Z','2026-01-28T02:52:14.560Z',1); @@ -13304,7 +13375,7 @@ INSERT INTO "product_skus" ("id","product_id","name","images","is_offer","is_com INSERT INTO "product_skus" ("id","product_id","name","images","is_offer","is_combo_only","is_deleted","created_at") VALUES(75,75,NULL,'["product-images/1768817786453-0","product-images/1768817786455-1"]',0,0,0,'2026-01-18T05:38:16.173Z'); INSERT INTO "product_skus" ("id","product_id","name","images","is_offer","is_combo_only","is_deleted","created_at") VALUES(76,76,NULL,'["product-images/1768727264220-0"]',0,0,0,'2026-01-18T09:07:45.047Z'); INSERT INTO "product_skus" ("id","product_id","name","images","is_offer","is_combo_only","is_deleted","created_at") VALUES(77,77,NULL,'["product-images/1769396724595-0"]',0,0,0,'2026-01-18T14:26:30.867Z'); -INSERT INTO "product_skus" ("id","product_id","name","images","is_offer","is_combo_only","is_deleted","created_at") VALUES(78,78,NULL,'["product-images/1769241234003-0"]',0,0,0,'2026-01-18T14:33:36.108Z'); +INSERT INTO "product_skus" ("id","product_id","name","images","is_offer","is_combo_only","is_deleted","created_at") VALUES(78,78,NULL,'[]',0,0,0,'2026-01-18T14:33:36.108Z'); INSERT INTO "product_skus" ("id","product_id","name","images","is_offer","is_combo_only","is_deleted","created_at") VALUES(79,79,NULL,'["product-images/1768822893380-0"]',0,0,0,'2026-01-19T11:41:34.210Z'); INSERT INTO "product_skus" ("id","product_id","name","images","is_offer","is_combo_only","is_deleted","created_at") VALUES(80,80,NULL,'["product-images/1769063336125-0"]',0,0,0,'2026-01-22T06:28:57.053Z'); INSERT INTO "product_skus" ("id","product_id","name","images","is_offer","is_combo_only","is_deleted","created_at") VALUES(81,81,NULL,'["product-images/1769063467386-0"]',0,0,0,'2026-01-22T06:31:08.364Z'); @@ -13455,7 +13526,6 @@ INSERT INTO "sku_features" ("id","sku_id","feature_name","feature_value") VALUES INSERT INTO "sku_features" ("id","sku_id","feature_name","feature_value") VALUES(74,74,'quantity','1.0Pc'); INSERT INTO "sku_features" ("id","sku_id","feature_name","feature_value") VALUES(76,76,'quantity','1.0Pc'); INSERT INTO "sku_features" ("id","sku_id","feature_name","feature_value") VALUES(77,77,'quantity','8.0Pc'); -INSERT INTO "sku_features" ("id","sku_id","feature_name","feature_value") VALUES(78,78,'quantity','0.25Kg'); INSERT INTO "sku_features" ("id","sku_id","feature_name","feature_value") VALUES(79,79,'quantity','0.5Kg'); INSERT INTO "sku_features" ("id","sku_id","feature_name","feature_value") VALUES(80,80,'quantity','1.0Kg'); INSERT INTO "sku_features" ("id","sku_id","feature_name","feature_value") VALUES(82,82,'quantity','0.75Kg'); @@ -13534,6 +13604,7 @@ INSERT INTO "sku_features" ("id","sku_id","feature_name","feature_value") VALUES INSERT INTO "sku_features" ("id","sku_id","feature_name","feature_value") VALUES(176,136,'quantity','15 pc'); INSERT INTO "sku_features" ("id","sku_id","feature_name","feature_value") VALUES(179,45,'quantity','0.5Kg'); INSERT INTO "sku_features" ("id","sku_id","feature_name","feature_value") VALUES(180,138,'quantity','7'); +INSERT INTO "sku_features" ("id","sku_id","feature_name","feature_value") VALUES(182,78,'quantity','0.25Kg'); CREATE TABLE `product_market_stats` ( `id` integer PRIMARY KEY AUTOINCREMENT NOT NULL, `sku_id` integer NOT NULL, @@ -13622,7 +13693,7 @@ INSERT INTO "product_market_stats" ("id","sku_id","market_price","our_price","is INSERT INTO "product_market_stats" ("id","sku_id","market_price","our_price","is_flash_available","flash_price","is_out_of_stock","is_suspended") VALUES(75,75,'599','529',0,'529',0,0); INSERT INTO "product_market_stats" ("id","sku_id","market_price","our_price","is_flash_available","flash_price","is_out_of_stock","is_suspended") VALUES(76,76,'39.0','29.0',1,'39.0',0,0); INSERT INTO "product_market_stats" ("id","sku_id","market_price","our_price","is_flash_available","flash_price","is_out_of_stock","is_suspended") VALUES(77,77,'20.0','15.0',0,'15.0',0,0); -INSERT INTO "product_market_stats" ("id","sku_id","market_price","our_price","is_flash_available","flash_price","is_out_of_stock","is_suspended") VALUES(78,78,'19.0','15.0',1,'15.0',0,0); +INSERT INTO "product_market_stats" ("id","sku_id","market_price","our_price","is_flash_available","flash_price","is_out_of_stock","is_suspended") VALUES(78,78,'30','25',1,'28',0,0); INSERT INTO "product_market_stats" ("id","sku_id","market_price","our_price","is_flash_available","flash_price","is_out_of_stock","is_suspended") VALUES(79,79,'47.0','39.0',1,NULL,1,0); INSERT INTO "product_market_stats" ("id","sku_id","market_price","our_price","is_flash_available","flash_price","is_out_of_stock","is_suspended") VALUES(80,80,'569','799',0,'819',0,0); INSERT INTO "product_market_stats" ("id","sku_id","market_price","our_price","is_flash_available","flash_price","is_out_of_stock","is_suspended") VALUES(81,81,'599','569',1,'569',0,0); @@ -21753,8 +21824,8 @@ INSERT INTO "order_items" ("id","order_id","sku_id","quantity","price","discount INSERT INTO "order_items" ("id","order_id","sku_id","quantity","price","discounted_price","is_packaged","is_package_verified","packaged_at") VALUES(8273,2464,76,'1','29.0','29.0',1,0,NULL); INSERT INTO "order_items" ("id","order_id","sku_id","quantity","price","discounted_price","is_packaged","is_package_verified","packaged_at") VALUES(8274,2464,77,'1','15.0','15.0',1,0,NULL); INSERT INTO "order_items" ("id","order_id","sku_id","quantity","price","discounted_price","is_packaged","is_package_verified","packaged_at") VALUES(8275,2465,97,'1','19.0','19.0',1,0,NULL); -INSERT INTO "order_items" ("id","order_id","sku_id","quantity","price","discounted_price","is_packaged","is_package_verified","packaged_at") VALUES(8276,2466,7,'1','69.0','69.0',0,0,NULL); -INSERT INTO "order_items" ("id","order_id","sku_id","quantity","price","discounted_price","is_packaged","is_package_verified","packaged_at") VALUES(8277,2467,23,'1','152','152',0,0,NULL); +INSERT INTO "order_items" ("id","order_id","sku_id","quantity","price","discounted_price","is_packaged","is_package_verified","packaged_at") VALUES(8276,2466,7,'1','69.0','69.0',1,0,NULL); +INSERT INTO "order_items" ("id","order_id","sku_id","quantity","price","discounted_price","is_packaged","is_package_verified","packaged_at") VALUES(8277,2467,23,'1','152','152',1,0,NULL); INSERT INTO "order_items" ("id","order_id","sku_id","quantity","price","discounted_price","is_packaged","is_package_verified","packaged_at") VALUES(8278,2468,23,'2','152','152',1,0,NULL); INSERT INTO "order_items" ("id","order_id","sku_id","quantity","price","discounted_price","is_packaged","is_package_verified","packaged_at") VALUES(8279,2468,45,'2','25','25',1,0,NULL); INSERT INTO "order_items" ("id","order_id","sku_id","quantity","price","discounted_price","is_packaged","is_package_verified","packaged_at") VALUES(8280,2468,32,'1','19.0','19.0',1,0,NULL); @@ -21925,6 +21996,113 @@ INSERT INTO "order_items" ("id","order_id","sku_id","quantity","price","discount INSERT INTO "order_items" ("id","order_id","sku_id","quantity","price","discounted_price","is_packaged","is_package_verified","packaged_at") VALUES(8445,2516,61,'1','109.0','109.0',1,0,NULL); INSERT INTO "order_items" ("id","order_id","sku_id","quantity","price","discounted_price","is_packaged","is_package_verified","packaged_at") VALUES(8446,2517,6,'2','109.0','109.0',1,0,NULL); INSERT INTO "order_items" ("id","order_id","sku_id","quantity","price","discounted_price","is_packaged","is_package_verified","packaged_at") VALUES(8447,2517,118,'1','39.0','39.0',1,0,NULL); +INSERT INTO "order_items" ("id","order_id","sku_id","quantity","price","discounted_price","is_packaged","is_package_verified","packaged_at") VALUES(8448,2518,98,'1','449','449',1,0,NULL); +INSERT INTO "order_items" ("id","order_id","sku_id","quantity","price","discounted_price","is_packaged","is_package_verified","packaged_at") VALUES(8449,2519,72,'3','15.0','15.0',1,0,NULL); +INSERT INTO "order_items" ("id","order_id","sku_id","quantity","price","discounted_price","is_packaged","is_package_verified","packaged_at") VALUES(8450,2519,33,'3','15.0','15.0',1,0,NULL); +INSERT INTO "order_items" ("id","order_id","sku_id","quantity","price","discounted_price","is_packaged","is_package_verified","packaged_at") VALUES(8451,2519,19,'2','15.0','15.0',1,0,NULL); +INSERT INTO "order_items" ("id","order_id","sku_id","quantity","price","discounted_price","is_packaged","is_package_verified","packaged_at") VALUES(8452,2519,18,'2','69','69',1,0,NULL); +INSERT INTO "order_items" ("id","order_id","sku_id","quantity","price","discounted_price","is_packaged","is_package_verified","packaged_at") VALUES(8453,2519,76,'1','29.0','29.0',1,0,NULL); +INSERT INTO "order_items" ("id","order_id","sku_id","quantity","price","discounted_price","is_packaged","is_package_verified","packaged_at") VALUES(8454,2519,67,'2','35','35',1,0,NULL); +INSERT INTO "order_items" ("id","order_id","sku_id","quantity","price","discounted_price","is_packaged","is_package_verified","packaged_at") VALUES(8455,2519,16,'1','16.0','16.0',1,0,NULL); +INSERT INTO "order_items" ("id","order_id","sku_id","quantity","price","discounted_price","is_packaged","is_package_verified","packaged_at") VALUES(8456,2519,5,'1','15.0','15.0',1,0,NULL); +INSERT INTO "order_items" ("id","order_id","sku_id","quantity","price","discounted_price","is_packaged","is_package_verified","packaged_at") VALUES(8457,2519,78,'2','15.0','15.0',1,0,NULL); +INSERT INTO "order_items" ("id","order_id","sku_id","quantity","price","discounted_price","is_packaged","is_package_verified","packaged_at") VALUES(8458,2519,31,'3','16','16',1,0,NULL); +INSERT INTO "order_items" ("id","order_id","sku_id","quantity","price","discounted_price","is_packaged","is_package_verified","packaged_at") VALUES(8459,2519,45,'3','23','23',1,0,NULL); +INSERT INTO "order_items" ("id","order_id","sku_id","quantity","price","discounted_price","is_packaged","is_package_verified","packaged_at") VALUES(8460,2519,66,'1','29.0','29.0',1,0,NULL); +INSERT INTO "order_items" ("id","order_id","sku_id","quantity","price","discounted_price","is_packaged","is_package_verified","packaged_at") VALUES(8461,2519,71,'1','15.0','15.0',1,0,NULL); +INSERT INTO "order_items" ("id","order_id","sku_id","quantity","price","discounted_price","is_packaged","is_package_verified","packaged_at") VALUES(8462,2519,69,'1','15.0','15.0',1,0,NULL); +INSERT INTO "order_items" ("id","order_id","sku_id","quantity","price","discounted_price","is_packaged","is_package_verified","packaged_at") VALUES(8463,2519,94,'1','18','18',1,0,NULL); +INSERT INTO "order_items" ("id","order_id","sku_id","quantity","price","discounted_price","is_packaged","is_package_verified","packaged_at") VALUES(8464,2519,95,'2','15.0','15.0',1,0,NULL); +INSERT INTO "order_items" ("id","order_id","sku_id","quantity","price","discounted_price","is_packaged","is_package_verified","packaged_at") VALUES(8465,2519,103,'4','29.0','29.0',1,0,NULL); +INSERT INTO "order_items" ("id","order_id","sku_id","quantity","price","discounted_price","is_packaged","is_package_verified","packaged_at") VALUES(8466,2520,33,'1','15.0','15.0',1,0,NULL); +INSERT INTO "order_items" ("id","order_id","sku_id","quantity","price","discounted_price","is_packaged","is_package_verified","packaged_at") VALUES(8467,2520,72,'2','15.0','15.0',1,0,NULL); +INSERT INTO "order_items" ("id","order_id","sku_id","quantity","price","discounted_price","is_packaged","is_package_verified","packaged_at") VALUES(8468,2520,18,'1','69','69',1,0,NULL); +INSERT INTO "order_items" ("id","order_id","sku_id","quantity","price","discounted_price","is_packaged","is_package_verified","packaged_at") VALUES(8469,2520,30,'1','17.0','17.0',1,0,NULL); +INSERT INTO "order_items" ("id","order_id","sku_id","quantity","price","discounted_price","is_packaged","is_package_verified","packaged_at") VALUES(8470,2520,127,'1','33.0','33.0',1,0,NULL); +INSERT INTO "order_items" ("id","order_id","sku_id","quantity","price","discounted_price","is_packaged","is_package_verified","packaged_at") VALUES(8471,2520,45,'2','23','23',1,0,NULL); +INSERT INTO "order_items" ("id","order_id","sku_id","quantity","price","discounted_price","is_packaged","is_package_verified","packaged_at") VALUES(8472,2520,95,'2','15.0','15.0',1,0,NULL); +INSERT INTO "order_items" ("id","order_id","sku_id","quantity","price","discounted_price","is_packaged","is_package_verified","packaged_at") VALUES(8473,2520,19,'2','15.0','15.0',1,0,NULL); +INSERT INTO "order_items" ("id","order_id","sku_id","quantity","price","discounted_price","is_packaged","is_package_verified","packaged_at") VALUES(8474,2520,92,'1','35.0','35.0',1,0,NULL); +INSERT INTO "order_items" ("id","order_id","sku_id","quantity","price","discounted_price","is_packaged","is_package_verified","packaged_at") VALUES(8475,2520,98,'1','449','449',1,0,NULL); +INSERT INTO "order_items" ("id","order_id","sku_id","quantity","price","discounted_price","is_packaged","is_package_verified","packaged_at") VALUES(8476,2521,136,'1','199','199',1,0,NULL); +INSERT INTO "order_items" ("id","order_id","sku_id","quantity","price","discounted_price","is_packaged","is_package_verified","packaged_at") VALUES(8477,2522,23,'2','152','152',1,0,NULL); +INSERT INTO "order_items" ("id","order_id","sku_id","quantity","price","discounted_price","is_packaged","is_package_verified","packaged_at") VALUES(8478,2523,45,'2','23','23',1,0,NULL); +INSERT INTO "order_items" ("id","order_id","sku_id","quantity","price","discounted_price","is_packaged","is_package_verified","packaged_at") VALUES(8479,2523,66,'1','29.0','29.0',1,0,NULL); +INSERT INTO "order_items" ("id","order_id","sku_id","quantity","price","discounted_price","is_packaged","is_package_verified","packaged_at") VALUES(8480,2523,72,'2','15.0','15.0',1,0,NULL); +INSERT INTO "order_items" ("id","order_id","sku_id","quantity","price","discounted_price","is_packaged","is_package_verified","packaged_at") VALUES(8481,2523,71,'1','15.0','15.0',1,0,NULL); +INSERT INTO "order_items" ("id","order_id","sku_id","quantity","price","discounted_price","is_packaged","is_package_verified","packaged_at") VALUES(8482,2523,101,'1','19.0','19.0',1,0,NULL); +INSERT INTO "order_items" ("id","order_id","sku_id","quantity","price","discounted_price","is_packaged","is_package_verified","packaged_at") VALUES(8483,2523,146,'1','15','15',1,0,NULL); +INSERT INTO "order_items" ("id","order_id","sku_id","quantity","price","discounted_price","is_packaged","is_package_verified","packaged_at") VALUES(8484,2523,103,'1','29.0','29.0',1,0,NULL); +INSERT INTO "order_items" ("id","order_id","sku_id","quantity","price","discounted_price","is_packaged","is_package_verified","packaged_at") VALUES(8485,2523,94,'1','18','18',1,0,NULL); +INSERT INTO "order_items" ("id","order_id","sku_id","quantity","price","discounted_price","is_packaged","is_package_verified","packaged_at") VALUES(8486,2523,19,'1','15.0','15.0',1,0,NULL); +INSERT INTO "order_items" ("id","order_id","sku_id","quantity","price","discounted_price","is_packaged","is_package_verified","packaged_at") VALUES(8487,2523,78,'2','15.0','15.0',1,0,NULL); +INSERT INTO "order_items" ("id","order_id","sku_id","quantity","price","discounted_price","is_packaged","is_package_verified","packaged_at") VALUES(8488,2523,32,'1','19.0','19.0',1,0,NULL); +INSERT INTO "order_items" ("id","order_id","sku_id","quantity","price","discounted_price","is_packaged","is_package_verified","packaged_at") VALUES(8489,2523,31,'1','16','16',1,0,NULL); +INSERT INTO "order_items" ("id","order_id","sku_id","quantity","price","discounted_price","is_packaged","is_package_verified","packaged_at") VALUES(8490,2524,101,'1','20.0','20.0',1,0,NULL); +INSERT INTO "order_items" ("id","order_id","sku_id","quantity","price","discounted_price","is_packaged","is_package_verified","packaged_at") VALUES(8491,2524,48,'1','59','59',1,0,NULL); +INSERT INTO "order_items" ("id","order_id","sku_id","quantity","price","discounted_price","is_packaged","is_package_verified","packaged_at") VALUES(8492,2524,23,'1','152','152',1,0,NULL); +INSERT INTO "order_items" ("id","order_id","sku_id","quantity","price","discounted_price","is_packaged","is_package_verified","packaged_at") VALUES(8493,2524,32,'1','19.0','19.0',1,0,NULL); +INSERT INTO "order_items" ("id","order_id","sku_id","quantity","price","discounted_price","is_packaged","is_package_verified","packaged_at") VALUES(8494,2524,71,'1','15.0','15.0',1,0,NULL); +INSERT INTO "order_items" ("id","order_id","sku_id","quantity","price","discounted_price","is_packaged","is_package_verified","packaged_at") VALUES(8495,2525,23,'1','152','152',1,0,NULL); +INSERT INTO "order_items" ("id","order_id","sku_id","quantity","price","discounted_price","is_packaged","is_package_verified","packaged_at") VALUES(8496,2526,23,'1','152','152',1,0,NULL); +INSERT INTO "order_items" ("id","order_id","sku_id","quantity","price","discounted_price","is_packaged","is_package_verified","packaged_at") VALUES(8497,2527,46,'1','109.0','109.0',1,0,NULL); +INSERT INTO "order_items" ("id","order_id","sku_id","quantity","price","discounted_price","is_packaged","is_package_verified","packaged_at") VALUES(8498,2527,48,'1','79','79',1,0,NULL); +INSERT INTO "order_items" ("id","order_id","sku_id","quantity","price","discounted_price","is_packaged","is_package_verified","packaged_at") VALUES(8499,2527,8,'1','129','129',1,0,NULL); +INSERT INTO "order_items" ("id","order_id","sku_id","quantity","price","discounted_price","is_packaged","is_package_verified","packaged_at") VALUES(8500,2527,7,'1','69.0','69.0',1,0,NULL); +INSERT INTO "order_items" ("id","order_id","sku_id","quantity","price","discounted_price","is_packaged","is_package_verified","packaged_at") VALUES(8501,2528,45,'2','23','23',1,0,NULL); +INSERT INTO "order_items" ("id","order_id","sku_id","quantity","price","discounted_price","is_packaged","is_package_verified","packaged_at") VALUES(8502,2528,2,'1','233','233',1,0,NULL); +INSERT INTO "order_items" ("id","order_id","sku_id","quantity","price","discounted_price","is_packaged","is_package_verified","packaged_at") VALUES(8503,2528,5,'2','15.0','15.0',1,0,NULL); +INSERT INTO "order_items" ("id","order_id","sku_id","quantity","price","discounted_price","is_packaged","is_package_verified","packaged_at") VALUES(8504,2528,69,'1','15.0','15.0',1,0,NULL); +INSERT INTO "order_items" ("id","order_id","sku_id","quantity","price","discounted_price","is_packaged","is_package_verified","packaged_at") VALUES(8505,2528,72,'1','15.0','15.0',1,0,NULL); +INSERT INTO "order_items" ("id","order_id","sku_id","quantity","price","discounted_price","is_packaged","is_package_verified","packaged_at") VALUES(8506,2528,144,'1','15','15',1,0,NULL); +INSERT INTO "order_items" ("id","order_id","sku_id","quantity","price","discounted_price","is_packaged","is_package_verified","packaged_at") VALUES(8507,2528,65,'1','16.0','16.0',1,0,NULL); +INSERT INTO "order_items" ("id","order_id","sku_id","quantity","price","discounted_price","is_packaged","is_package_verified","packaged_at") VALUES(8508,2529,7,'1','69.0','69.0',1,0,NULL); +INSERT INTO "order_items" ("id","order_id","sku_id","quantity","price","discounted_price","is_packaged","is_package_verified","packaged_at") VALUES(8509,2529,35,'1','449','449',1,0,NULL); +INSERT INTO "order_items" ("id","order_id","sku_id","quantity","price","discounted_price","is_packaged","is_package_verified","packaged_at") VALUES(8510,2529,48,'2','79','79',1,0,NULL); +INSERT INTO "order_items" ("id","order_id","sku_id","quantity","price","discounted_price","is_packaged","is_package_verified","packaged_at") VALUES(8511,2530,6,'1','109.0','109.0',1,0,NULL); +INSERT INTO "order_items" ("id","order_id","sku_id","quantity","price","discounted_price","is_packaged","is_package_verified","packaged_at") VALUES(8512,2530,30,'2','17.0','17.0',1,0,NULL); +INSERT INTO "order_items" ("id","order_id","sku_id","quantity","price","discounted_price","is_packaged","is_package_verified","packaged_at") VALUES(8513,2530,19,'2','15.0','15.0',1,0,NULL); +INSERT INTO "order_items" ("id","order_id","sku_id","quantity","price","discounted_price","is_packaged","is_package_verified","packaged_at") VALUES(8514,2530,31,'4','16','16',1,0,NULL); +INSERT INTO "order_items" ("id","order_id","sku_id","quantity","price","discounted_price","is_packaged","is_package_verified","packaged_at") VALUES(8515,2530,37,'1','49.0','49.0',1,0,NULL); +INSERT INTO "order_items" ("id","order_id","sku_id","quantity","price","discounted_price","is_packaged","is_package_verified","packaged_at") VALUES(8516,2530,77,'1','15.0','15.0',1,0,NULL); +INSERT INTO "order_items" ("id","order_id","sku_id","quantity","price","discounted_price","is_packaged","is_package_verified","packaged_at") VALUES(8517,2530,94,'2','18','18',1,0,NULL); +INSERT INTO "order_items" ("id","order_id","sku_id","quantity","price","discounted_price","is_packaged","is_package_verified","packaged_at") VALUES(8518,2530,95,'2','15.0','15.0',1,0,NULL); +INSERT INTO "order_items" ("id","order_id","sku_id","quantity","price","discounted_price","is_packaged","is_package_verified","packaged_at") VALUES(8519,2530,103,'2','29.0','29.0',1,0,NULL); +INSERT INTO "order_items" ("id","order_id","sku_id","quantity","price","discounted_price","is_packaged","is_package_verified","packaged_at") VALUES(8520,2530,146,'2','15','15',1,0,NULL); +INSERT INTO "order_items" ("id","order_id","sku_id","quantity","price","discounted_price","is_packaged","is_package_verified","packaged_at") VALUES(8521,2530,69,'2','15.0','15.0',1,0,NULL); +INSERT INTO "order_items" ("id","order_id","sku_id","quantity","price","discounted_price","is_packaged","is_package_verified","packaged_at") VALUES(8522,2531,136,'1','199','199',1,0,NULL); +INSERT INTO "order_items" ("id","order_id","sku_id","quantity","price","discounted_price","is_packaged","is_package_verified","packaged_at") VALUES(8523,2532,103,'1','29.0','29.0',1,0,NULL); +INSERT INTO "order_items" ("id","order_id","sku_id","quantity","price","discounted_price","is_packaged","is_package_verified","packaged_at") VALUES(8524,2532,29,'1','29.0','29.0',1,0,NULL); +INSERT INTO "order_items" ("id","order_id","sku_id","quantity","price","discounted_price","is_packaged","is_package_verified","packaged_at") VALUES(8525,2532,69,'1','15.0','15.0',1,0,NULL); +INSERT INTO "order_items" ("id","order_id","sku_id","quantity","price","discounted_price","is_packaged","is_package_verified","packaged_at") VALUES(8526,2532,95,'1','15.0','15.0',1,0,NULL); +INSERT INTO "order_items" ("id","order_id","sku_id","quantity","price","discounted_price","is_packaged","is_package_verified","packaged_at") VALUES(8527,2532,71,'1','15.0','15.0',1,0,NULL); +INSERT INTO "order_items" ("id","order_id","sku_id","quantity","price","discounted_price","is_packaged","is_package_verified","packaged_at") VALUES(8528,2532,45,'1','23','23',1,0,NULL); +INSERT INTO "order_items" ("id","order_id","sku_id","quantity","price","discounted_price","is_packaged","is_package_verified","packaged_at") VALUES(8529,2532,72,'1','15.0','15.0',1,0,NULL); +INSERT INTO "order_items" ("id","order_id","sku_id","quantity","price","discounted_price","is_packaged","is_package_verified","packaged_at") VALUES(8530,2532,46,'1','109.0','109.0',1,0,NULL); +INSERT INTO "order_items" ("id","order_id","sku_id","quantity","price","discounted_price","is_packaged","is_package_verified","packaged_at") VALUES(8531,2533,23,'1','152','152',1,0,NULL); +INSERT INTO "order_items" ("id","order_id","sku_id","quantity","price","discounted_price","is_packaged","is_package_verified","packaged_at") VALUES(8532,2533,7,'1','69.0','69.0',1,0,NULL); +INSERT INTO "order_items" ("id","order_id","sku_id","quantity","price","discounted_price","is_packaged","is_package_verified","packaged_at") VALUES(8533,2533,31,'2','16','16',1,0,NULL); +INSERT INTO "order_items" ("id","order_id","sku_id","quantity","price","discounted_price","is_packaged","is_package_verified","packaged_at") VALUES(8534,2533,37,'1','49.0','49.0',1,0,NULL); +INSERT INTO "order_items" ("id","order_id","sku_id","quantity","price","discounted_price","is_packaged","is_package_verified","packaged_at") VALUES(8535,2533,101,'1','19.0','19.0',1,0,NULL); +INSERT INTO "order_items" ("id","order_id","sku_id","quantity","price","discounted_price","is_packaged","is_package_verified","packaged_at") VALUES(8536,2533,19,'1','15.0','15.0',1,0,NULL); +INSERT INTO "order_items" ("id","order_id","sku_id","quantity","price","discounted_price","is_packaged","is_package_verified","packaged_at") VALUES(8537,2533,29,'1','29.0','29.0',1,0,NULL); +INSERT INTO "order_items" ("id","order_id","sku_id","quantity","price","discounted_price","is_packaged","is_package_verified","packaged_at") VALUES(8538,2533,45,'1','23','23',1,0,NULL); +INSERT INTO "order_items" ("id","order_id","sku_id","quantity","price","discounted_price","is_packaged","is_package_verified","packaged_at") VALUES(8539,2534,10,'1','299','299',1,0,NULL); +INSERT INTO "order_items" ("id","order_id","sku_id","quantity","price","discounted_price","is_packaged","is_package_verified","packaged_at") VALUES(8540,2534,23,'1','152','152',1,0,NULL); +INSERT INTO "order_items" ("id","order_id","sku_id","quantity","price","discounted_price","is_packaged","is_package_verified","packaged_at") VALUES(8541,2535,98,'1','449','449',1,0,NULL); +INSERT INTO "order_items" ("id","order_id","sku_id","quantity","price","discounted_price","is_packaged","is_package_verified","packaged_at") VALUES(8542,2536,136,'1','199','199',0,0,NULL); +INSERT INTO "order_items" ("id","order_id","sku_id","quantity","price","discounted_price","is_packaged","is_package_verified","packaged_at") VALUES(8543,2536,23,'1','152','152',0,0,NULL); +INSERT INTO "order_items" ("id","order_id","sku_id","quantity","price","discounted_price","is_packaged","is_package_verified","packaged_at") VALUES(8544,2537,24,'1','235','235',1,0,NULL); +INSERT INTO "order_items" ("id","order_id","sku_id","quantity","price","discounted_price","is_packaged","is_package_verified","packaged_at") VALUES(8545,2537,73,'1','59.0','59.0',1,0,NULL); +INSERT INTO "order_items" ("id","order_id","sku_id","quantity","price","discounted_price","is_packaged","is_package_verified","packaged_at") VALUES(8546,2538,31,'4','16','16',1,0,NULL); +INSERT INTO "order_items" ("id","order_id","sku_id","quantity","price","discounted_price","is_packaged","is_package_verified","packaged_at") VALUES(8547,2538,45,'2','23','23',1,0,NULL); +INSERT INTO "order_items" ("id","order_id","sku_id","quantity","price","discounted_price","is_packaged","is_package_verified","packaged_at") VALUES(8548,2538,103,'1','29.0','29.0',1,0,NULL); +INSERT INTO "order_items" ("id","order_id","sku_id","quantity","price","discounted_price","is_packaged","is_package_verified","packaged_at") VALUES(8549,2538,58,'1','89','89',1,0,NULL); +INSERT INTO "order_items" ("id","order_id","sku_id","quantity","price","discounted_price","is_packaged","is_package_verified","packaged_at") VALUES(8550,2538,19,'1','15.0','15.0',1,0,NULL); +INSERT INTO "order_items" ("id","order_id","sku_id","quantity","price","discounted_price","is_packaged","is_package_verified","packaged_at") VALUES(8551,2538,72,'1','15.0','15.0',1,0,NULL); +INSERT INTO "order_items" ("id","order_id","sku_id","quantity","price","discounted_price","is_packaged","is_package_verified","packaged_at") VALUES(8552,2538,30,'1','17.0','17.0',1,0,NULL); +INSERT INTO "order_items" ("id","order_id","sku_id","quantity","price","discounted_price","is_packaged","is_package_verified","packaged_at") VALUES(8553,2539,82,'1','399','399',1,0,NULL); +INSERT INTO "order_items" ("id","order_id","sku_id","quantity","price","discounted_price","is_packaged","is_package_verified","packaged_at") VALUES(8554,2540,23,'3','152','152',1,0,NULL); CREATE TABLE IF NOT EXISTS "special_deals" ( `id` integer PRIMARY KEY AUTOINCREMENT NOT NULL, `sku_id` integer NOT NULL, @@ -22363,15 +22541,15 @@ CREATE TABLE `staff_notif_creds` ( FOREIGN KEY (`staff_user_id`) REFERENCES `staff_users`(`id`) ON UPDATE no action ON DELETE no action ); INSERT INTO "staff_notif_creds" ("id","token","added_at","staff_user_id","last_verified") VALUES(1,'ExponentPushToken[HyU1kPNunSJaasQweODhvH]','2026-10-02 10:49:17',6,'2026-10-04T07:19:37.555Z'); -INSERT INTO "staff_notif_creds" ("id","token","added_at","staff_user_id","last_verified") VALUES(2,'ExponentPushToken[QydqxGMsUfzHuiqxel0nA9]','2026-10-02 10:49:27',4,'2026-10-11T12:55:18.553Z'); -INSERT INTO "staff_notif_creds" ("id","token","added_at","staff_user_id","last_verified") VALUES(3,'ExponentPushToken[bqqW02IeK4XcC4iuzpkQIG]','2026-10-05 01:28:42',4,'2026-10-11T13:16:02.427Z'); +INSERT INTO "staff_notif_creds" ("id","token","added_at","staff_user_id","last_verified") VALUES(2,'ExponentPushToken[QydqxGMsUfzHuiqxel0nA9]','2026-10-02 10:49:27',4,'2026-10-13T07:23:08.580Z'); +INSERT INTO "staff_notif_creds" ("id","token","added_at","staff_user_id","last_verified") VALUES(3,'ExponentPushToken[bqqW02IeK4XcC4iuzpkQIG]','2026-10-05 01:28:42',4,'2026-10-13T07:50:31.719Z'); DELETE FROM sqlite_sequence; INSERT INTO "sqlite_sequence" ("name","seq") VALUES('product_skus',150); -INSERT INTO "sqlite_sequence" ("name","seq") VALUES('sku_features',180); +INSERT INTO "sqlite_sequence" ("name","seq") VALUES('sku_features',182); INSERT INTO "sqlite_sequence" ("name","seq") VALUES('product_market_stats',150); INSERT INTO "sqlite_sequence" ("name","seq") VALUES('product_info',150); INSERT INTO "sqlite_sequence" ("name","seq") VALUES('cart_items',128); -INSERT INTO "sqlite_sequence" ("name","seq") VALUES('order_items',8447); +INSERT INTO "sqlite_sequence" ("name","seq") VALUES('order_items',8554); INSERT INTO "sqlite_sequence" ("name","seq") VALUES('special_deals',12); INSERT INTO "sqlite_sequence" ("name","seq") VALUES('coupon_applicable_products',1); INSERT INTO "sqlite_sequence" ("name","seq") VALUES('product_tags',604); diff --git a/apps/backend/src/app.ts b/apps/backend/src/app.ts index a90ba7e..5796d06 100644 --- a/apps/backend/src/app.ts +++ b/apps/backend/src/app.ts @@ -15,7 +15,7 @@ export const createApp = () => { // CORS middleware app.use(cors({ - origin: ['http://localhost:5174', 'http://localhost:4174', 'http://localhost:4176', 'http://localhost:4175', 'https://ui.freshyo.in', 'https://www.freshyo.in', 'https://webui.freshyo.in', 'https://app.freshyo.in', 'https://admin.freshyo.in', 'https://superadmin.freshyo.in', 'http://192.168.100.126:4175'], + origin: ['http://localhost:5174', 'http://localhost:4174', 'http://localhost:4176', 'http://localhost:4175', 'https://ui.freshyo.in', 'https://www.freshyo.in', 'https://webui.freshyo.in', 'https://app.freshyo.in', 'https://admin.freshyo.in', 'https://superadmin.freshyo.in', 'http://192.168.100.126:4175', 'https://localsuperadmin.freshyo.in', 'https://localuserweb.freshyo.in'], allowMethods: ['GET', 'POST', 'PUT', 'PATCH', 'DELETE', 'OPTIONS'], allowHeaders: ['Origin', 'X-Requested-With', 'Content-Type', 'Accept', 'Authorization', 'Caller-Interface'], credentials: true, diff --git a/apps/backend/src/lib/region-geo.ts b/apps/backend/src/lib/region-geo.ts new file mode 100644 index 0000000..5132265 --- /dev/null +++ b/apps/backend/src/lib/region-geo.ts @@ -0,0 +1,81 @@ +import { polygon as turfPolygon, point as turfPoint } from '@turf/helpers' +import { booleanPointInPolygon } from '@turf/boolean-point-in-polygon' +import type { RegionGeoJson, ResolvedRegion } from '@packages/shared' +import { getAllRegionsWithBounds, getRegionWithBounds } from '@/src/dbService' + +export type BoundPolygon = ReturnType + +/** + * A bound's GeoJSON is a FeatureCollection; each feature geometry may be a + * Polygon or MultiPolygon. Flatten them into turf polygons for containment tests. + */ +export function boundToPolygons(geojson: RegionGeoJson): BoundPolygon[] { + const polygons: BoundPolygon[] = [] + for (const feature of geojson?.features ?? []) { + const geometry = feature?.geometry + if (!geometry) continue + if (geometry.type === 'Polygon') { + polygons.push(turfPolygon(geometry.coordinates as any)) + } else if (geometry.type === 'MultiPolygon') { + for (const coordinates of geometry.coordinates as any[]) { + polygons.push(turfPolygon(coordinates)) + } + } + } + return polygons +} + +/** + * Resolve a point to the bound of a region that contains it. Bounds are checked + * least-priority first (lowest number wins), matching `resolveRegionByLocation`. + * Returns `null` when the region is unknown or the point is outside every bound. + */ +export async function resolveBoundInRegion( + regionId: number, + lat: number, + lng: number +): Promise { + const region = await getRegionWithBounds(regionId) + if (!region) return null + + const point = turfPoint([lng, lat]) // GeoJSON: [longitude, latitude] + for (const bound of region.bounds) { + const polygons = boundToPolygons(bound.geojson) + if (polygons.length > 0 && polygons.some((poly) => booleanPointInPolygon(point, poly))) { + return bound.id + } + } + return null +} + +/** + * Resolve a point to the region + bound that contains it, scanning every region + * (regions by id, bounds least-priority first). Returns `null` when the point + * falls outside all bounds. This is the authoritative coords -> region mapping + * used for address creation and order placement. + */ +export async function resolveRegionAndBound( + lat: number, + lng: number +): Promise { + const regions = await getAllRegionsWithBounds() + const point = turfPoint([lng, lat]) // GeoJSON: [longitude, latitude] + + for (const region of regions) { + for (const bound of region.bounds) { + const polygons = boundToPolygons(bound.geojson) + if (polygons.length > 0 && polygons.some((poly) => booleanPointInPolygon(point, poly))) { + return { + region: { id: region.id, name: region.name, description: region.description }, + bound: { + id: bound.id, + regionId: bound.regionId, + description: bound.description, + priority: bound.priority, + }, + } + } + } + } + return null +} diff --git a/apps/backend/src/trpc/apis/common-apis/common-trpc-index.ts b/apps/backend/src/trpc/apis/common-apis/common-trpc-index.ts index 52281e8..aa3b97c 100644 --- a/apps/backend/src/trpc/apis/common-apis/common-trpc-index.ts +++ b/apps/backend/src/trpc/apis/common-apis/common-trpc-index.ts @@ -5,15 +5,15 @@ import { healthCheck, getBoundById, getAllRegions, - getAllRegionsWithBounds, getEffectiveRegionSettings, getBoundsForRegion, getEffectiveBoundId, getUserAddresses, } from '@/src/dbService' -import type { StoresSummaryResponse, RegionGeoJson, ResolvedRegion } from '@packages/shared' +import type { StoresSummaryResponse, ResolvedRegion } from '@packages/shared' import { polygon as turfPolygon, point as turfPoint } from '@turf/helpers'; import { booleanPointInPolygon } from '@turf/boolean-point-in-polygon'; +import { resolveBoundInRegion, resolveRegionAndBound } from '@/src/lib/region-geo' import { z } from 'zod'; import { mbnrGeoJson } from '@/src/lib/mbnr-geojson' import { generateUploadUrl } from '@/src/lib/s3-client' @@ -28,26 +28,6 @@ import { getAssetsDomain, getApiCacheKey } from '@/src/lib/env-exporter' const polygon = turfPolygon(mbnrGeoJson.features[0].geometry.coordinates); -type BoundPolygon = ReturnType - -// A bound's GeoJSON is a FeatureCollection; each feature geometry may be a -// Polygon or MultiPolygon. Flatten them into turf polygons for containment tests. -function boundToPolygons(geojson: RegionGeoJson): BoundPolygon[] { - const polygons: BoundPolygon[] = [] - for (const feature of geojson?.features ?? []) { - const geometry = feature?.geometry - if (!geometry) continue - if (geometry.type === 'Polygon') { - polygons.push(turfPolygon(geometry.coordinates as any)) - } else if (geometry.type === 'MultiPolygon') { - for (const coordinates of geometry.coordinates as any[]) { - polygons.push(turfPolygon(coordinates)) - } - } - } - return polygons -} - export async function scaffoldEssentialConsts(boundId: number) { const bound = await getBoundById(boundId) if (!bound) throw new ApiError('Bound not found', 404) @@ -207,27 +187,24 @@ export const commonApiRouter = router({ lng: z.number().min(-180).max(180), })) .query(async ({ input }): Promise => { - const point = turfPoint([input.lng, input.lat]); // GeoJSON: [longitude, latitude] - const regions = await getAllRegionsWithBounds(); + return resolveRegionAndBound(input.lat, input.lng) + }), - for (const region of regions) { - for (const bound of region.bounds) { - const polygons = boundToPolygons(bound.geojson); - if (polygons.some((poly) => booleanPointInPolygon(point, poly))) { - return { - region: { id: region.id, name: region.name, description: region.description }, - bound: { - id: bound.id, - regionId: bound.regionId, - description: bound.description, - priority: bound.priority, - }, - }; - } - } + // Resolve a point to the bound of a chosen region (used by the add-address + // flow: pick a region, then pick a point on the map). Throws when the point + // is outside every bound of that region. + resolveBound: publicProcedure + .input(z.object({ + regionId: z.number().int().positive(), + lat: z.number().min(-90).max(90), + lng: z.number().min(-180).max(180), + })) + .query(async ({ input }): Promise<{ regionId: number; boundId: number }> => { + const boundId = await resolveBoundInRegion(input.regionId, input.lat, input.lng) + if (boundId == null) { + throw new ApiError('Selected location is outside this region’s delivery area', 422) } - - return null; + return { regionId: input.regionId, boundId } }), // Effective business settings (from the region's lowest-priority bound). diff --git a/apps/backend/src/trpc/apis/user-apis/apis/address.ts b/apps/backend/src/trpc/apis/user-apis/apis/address.ts index f1687c0..0bc3a08 100644 --- a/apps/backend/src/trpc/apis/user-apis/apis/address.ts +++ b/apps/backend/src/trpc/apis/user-apis/apis/address.ts @@ -1,7 +1,8 @@ import { router, protectedProcedure } from '@/src/trpc/trpc-index' import { z } from 'zod' -import { extractCoordsFromRedirectUrl } from '@/src/lib/license-util' import { ApiError } from '@/src/lib/api-error' +import { extractCoordsFromRedirectUrl } from '@/src/lib/license-util' +import { resolveBoundInRegion } from '@/src/lib/region-geo' import { getUserDefaultAddress as getDefaultAddressInDb, getUserAddresses as getUserAddressesInDb, @@ -11,6 +12,7 @@ import { updateUserAddress as updateUserAddressInDb, deleteUserAddress as deleteUserAddressInDb, hasOngoingOrdersForAddress as hasOngoingOrdersForAddressInDb, + getEffectiveBoundId as getEffectiveBoundIdInDb, } from '@/src/dbService' import type { UserAddressResponse, @@ -43,7 +45,6 @@ export const addressRouter = router({ createAddress: protectedProcedure .input(z.object({ regionId: z.number().int().positive('Region is required'), - boundId: z.number().int().positive().optional(), name: z.string().min(1, 'Name is required'), phone: z.string().trim().min(1, 'Phone is required') .regex(PHONE_REGEX, 'Phone must be a 10-digit number starting with 6, 7, 8 or 9'), @@ -54,8 +55,11 @@ export const addressRouter = router({ pincode: z.string().trim().min(1, 'Pincode is required') .regex(PINCODE_REGEX, 'Pincode must be 6 digits'), isDefault: z.boolean().optional(), - latitude: z.number().optional(), - longitude: z.number().optional(), + // Coordinates picked on the map. The user app always sends them; the web + // app may omit them (legacy), in which case the bound falls back to the + // region's effective bound. + latitude: z.number().min(-90).max(90).optional(), + longitude: z.number().min(-180).max(180).optional(), googleMapsUrl: z.string().optional(), })) .mutation(async ({ input, ctx }): Promise => { @@ -64,7 +68,8 @@ export const addressRouter = router({ let { latitude, longitude } = input; - if (googleMapsUrl && latitude === undefined && longitude === undefined) { + // Legacy: a pasted Google Maps URL is a fallback source of coordinates. + if (latitude === undefined && longitude === undefined && googleMapsUrl) { const coords = await extractCoordsFromRedirectUrl(googleMapsUrl); if (coords) { latitude = Number(coords.latitude); @@ -72,6 +77,16 @@ export const addressRouter = router({ } } + // Coordinates present -> derive the containing bound (reject out-of-area). + // Absent -> fall back to the region's effective bound. + const boundId = + latitude != null && longitude != null + ? await resolveBoundInRegion(input.regionId, latitude, longitude) + : await getEffectiveBoundIdInDb(input.regionId) + if (boundId == null) { + throw new ApiError('Selected location is outside this region’s delivery area', 422) + } + // Validate required fields if (!name || !phone || !addressLine1 || !city || !state || !pincode) { throw new Error('Missing required fields'); @@ -89,7 +104,7 @@ export const addressRouter = router({ const newAddress = await createUserAddressInDb({ userId, regionId: input.regionId, - boundId: input.boundId, + boundId, name, phone, addressLine1, @@ -110,7 +125,6 @@ export const addressRouter = router({ .input(z.object({ id: z.number().int().positive(), regionId: z.number().int().positive('Region is required'), - boundId: z.number().int().positive().optional(), name: z.string().min(1, 'Name is required'), phone: z.string().trim().min(1, 'Phone is required') .regex(PHONE_REGEX, 'Phone must be a 10-digit number starting with 6, 7, 8 or 9'), @@ -121,8 +135,9 @@ export const addressRouter = router({ pincode: z.string().trim().min(1, 'Pincode is required') .regex(PINCODE_REGEX, 'Pincode must be 6 digits'), isDefault: z.boolean().optional(), - latitude: z.number().optional(), - longitude: z.number().optional(), + // See createAddress: coordinates are optional for the legacy web client. + latitude: z.number().min(-90).max(90).optional(), + longitude: z.number().min(-180).max(180).optional(), googleMapsUrl: z.string().optional(), })) .mutation(async ({ input, ctx }): Promise => { @@ -131,7 +146,8 @@ export const addressRouter = router({ let { latitude, longitude } = input; - if (googleMapsUrl && latitude === undefined && longitude === undefined) { + // Legacy: a pasted Google Maps URL is a fallback source of coordinates. + if (latitude === undefined && longitude === undefined && googleMapsUrl) { const coords = await extractCoordsFromRedirectUrl(googleMapsUrl); if (coords) { latitude = Number(coords.latitude); @@ -145,6 +161,23 @@ export const addressRouter = router({ throw new Error('Address not found') } + // Coordinates present -> containing bound (reject out-of-area). Absent -> + // region's effective bound. + const boundId = + latitude != null && longitude != null + ? await resolveBoundInRegion(input.regionId, latitude, longitude) + : await getEffectiveBoundIdInDb(input.regionId) + if (boundId == null) { + throw new ApiError('Selected location is outside this region’s delivery area', 422) + } + + // A previously backfilled address becomes "real" once its coordinates are + // changed by the user; otherwise the flag is preserved. + const coordsChanged = + latitude != null && + longitude != null && + (existingAddress.latitude !== latitude || existingAddress.longitude !== longitude) + // If setting as default, unset other defaults if (isDefault) { await clearDefaultAddressInDb(userId) @@ -154,7 +187,7 @@ export const addressRouter = router({ userId, addressId: id, regionId: input.regionId, - boundId: input.boundId, + boundId, name, phone, addressLine1, @@ -167,6 +200,7 @@ export const addressRouter = router({ googleMapsUrl, latitude, longitude, + vagueBackfilledCoords: coordsChanged ? false : existingAddress.vagueBackfilledCoords, }) return { success: true, data: updatedAddress } diff --git a/apps/backend/src/trpc/apis/user-apis/apis/order.ts b/apps/backend/src/trpc/apis/user-apis/apis/order.ts index 600d469..cded519 100644 --- a/apps/backend/src/trpc/apis/user-apis/apis/order.ts +++ b/apps/backend/src/trpc/apis/user-apis/apis/order.ts @@ -29,6 +29,7 @@ import { } from "@/src/dbService"; import { scaffoldAssetUrl } from "@/src/lib/s3-client"; import { ApiError } from "@/src/lib/api-error"; +import { resolveRegionAndBound } from "@/src/lib/region-geo"; import type { DeliveryStatus, OrderStatus } from "@packages/shared"; import { computeCartPricing, type CartLine } from "@packages/shared"; import { CONST_KEYS } from "@/src/lib/const-store"; @@ -74,25 +75,33 @@ const placeOrderUtil = async (params: { throw new ApiError("Invalid address", 400); } - // The address and the checkout must belong to the same region. - if (address.regionId != null && address.regionId !== params.regionId) { - throw new ApiError( - "Selected address belongs to a different region. Switch region and rebuild your cart to order there.", - 409 - ); + // The delivery address's coordinates are authoritative: they decide the + // region (and bound) the order is placed into, so a stale or spoofed client + // regionId cannot mis-scope pricing, products or slots. When the address has + // no coordinates we fall back to its stored region, then the client's. + let regionId = params.regionId; + let resolvedBoundId: number | null = null; + if (address.latitude != null && address.longitude != null) { + const resolved = await resolveRegionAndBound(address.latitude, address.longitude); + if (resolved) { + regionId = resolved.region.id; + resolvedBoundId = resolved.bound.id; + } + } else if (address.regionId != null) { + regionId = address.regionId; } // Bound-level constants (delivery charge/thresholds/min order) come from the bound the - // delivery address belongs to, so pricing cannot be changed by a client-supplied id. + // delivery address resolves to, so pricing cannot be changed by a client-supplied id. // Only when the address carries no bound do we fall back to the bound the client is // browsing in, then to the region's effective bound. This mirrors the customer app, which // already prices the selected address's bound (prominent-api-hooks useGetEssentialConsts). // Region-level constants are shared across the region's bounds. const boundId = - address.boundId ?? params.boundId ?? (await getEffectiveBoundId(params.regionId)); + resolvedBoundId ?? address.boundId ?? params.boundId ?? (await getEffectiveBoundId(regionId)); const effective = - (boundId != null ? await getRegionSettingsForBound(params.regionId, boundId) : null) ?? - (await getEffectiveRegionSettings(params.regionId)); + (boundId != null ? await getRegionSettingsForBound(regionId, boundId) : null) ?? + (await getEffectiveRegionSettings(regionId)); const boundSettings = effective?.settings ?? {}; const numSetting = (key: string): number => { const raw = boundSettings[key]; @@ -117,7 +126,7 @@ const placeOrderUtil = async (params: { >(); for (const item of selectedItems) { - const product = await getOrderProductById(item.skuId, params.regionId); + const product = await getOrderProductById(item.skuId, regionId); if (!product) { throw new ApiError(`Product ${item.skuId} not found`, 400); } @@ -126,7 +135,7 @@ const placeOrderUtil = async (params: { // GLOBAL: the catalogue reads (stores/products) serve it in every region by the same rule, so it // is accepted anywhere — only another region's product is rejected. const productRegionId = product.product?.regionId ?? null - if (productRegionId !== null && productRegionId !== params.regionId) { + if (productRegionId !== null && productRegionId !== regionId) { throw new ApiError( `Product ${item.skuId} is not available in this region`, 409 @@ -151,7 +160,7 @@ const placeOrderUtil = async (params: { if (params.isFlash) { for (const item of selectedItems) { - const product = await getOrderProductById(item.skuId, params.regionId); + const product = await getOrderProductById(item.skuId, regionId); if (!product?.isFlashAvailable) { throw new ApiError(`Product ${item.skuId} is not available for flash delivery`, 400); } @@ -171,7 +180,7 @@ const placeOrderUtil = async (params: { throw new ApiError("Selected delivery slot not found", 400); } - if (slot.regionId !== params.regionId) { + if (slot.regionId !== regionId) { throw new ApiError("Selected delivery slot belongs to a different region", 409); } @@ -223,7 +232,7 @@ const placeOrderUtil = async (params: { const validatedCoupons = await validateAndGetUserCoupons({ couponIds: couponIds ?? [], userId, - regionId: params.regionId, + regionId: regionId, items: subOrderInputs.flatMap((so) => so.items), }); @@ -263,7 +272,7 @@ const placeOrderUtil = async (params: { const order: Omit = { userId, - regionId: params.regionId, + regionId: regionId, addressId, slotId: params.isFlash ? null : slotId, isCod: paymentMethod === "cod", diff --git a/apps/superadmin-ui/vite.config.ts b/apps/superadmin-ui/vite.config.ts index 133e9fd..6a13047 100644 --- a/apps/superadmin-ui/vite.config.ts +++ b/apps/superadmin-ui/vite.config.ts @@ -9,7 +9,7 @@ import { cloudflare } from "@cloudflare/vite-plugin"; const config = defineConfig({ resolve: { tsconfigPaths: true }, - server: { port: 4175 }, + server: { port: 4175, allowedHosts: ['.freshyo.in'] }, plugins: [ devtools(), tailwindcss(), diff --git a/apps/user-ui/app/(drawer)/(tabs)/me/addresses/index.tsx b/apps/user-ui/app/(drawer)/(tabs)/me/addresses/index.tsx index 580ba70..43c3103 100644 --- a/apps/user-ui/app/(drawer)/(tabs)/me/addresses/index.tsx +++ b/apps/user-ui/app/(drawer)/(tabs)/me/addresses/index.tsx @@ -1,6 +1,6 @@ import React, { useState } from 'react'; import type { UserAddress } from '@packages/shared' -import { View, Alert } from 'react-native'; +import { View, Alert, Dimensions } from 'react-native'; import { useRouter } from 'expo-router'; import { AppContainer, MyText, tw, useMarkDataFetchers, MyFlatList, MyTouchableOpacity, BottomDialog, RawBottomDialog } from 'common-ui'; import { trpc } from '@/src/trpc-client'; @@ -161,6 +161,9 @@ export default function Addresses() { state: addressToUpdate.state, pincode: addressToUpdate.pincode, isDefault: true, + // Keep the stored coordinates so the bound is not re-derived from a fallback. + latitude: addressToUpdate.latitude ?? undefined, + longitude: addressToUpdate.longitude ?? undefined, }, { onSuccess: () => { refetch(); @@ -257,25 +260,27 @@ export default function Addresses() { /> setModalVisible(false)}> - + + + setDeleteError(null)}> diff --git a/apps/user-ui/app/(drawer)/(tabs)/me/index.tsx b/apps/user-ui/app/(drawer)/(tabs)/me/index.tsx index 31c8ce6..329f1b2 100644 --- a/apps/user-ui/app/(drawer)/(tabs)/me/index.tsx +++ b/apps/user-ui/app/(drawer)/(tabs)/me/index.tsx @@ -2,13 +2,13 @@ import React, { useState } from 'react'; import { View, ScrollView } from 'react-native'; import { useRouter } from 'expo-router'; import { useFocusEffect } from '@react-navigation/native'; -import { AppContainer, BottomDialog, MyText, tw, MyTouchableOpacity, ProfileImage, colors } from 'common-ui'; +import { AppContainer, MyText, tw, MyTouchableOpacity, ProfileImage, colors } from 'common-ui'; import TabLayoutWrapper from '@/components/TabLayoutWrapper'; import LocationBar from '@/src/components/LocationBar'; import { LinearGradient } from 'expo-linear-gradient'; import { Ionicons } from '@expo/vector-icons'; import NextOrderGlimpse from '@/components/NextOrderGlimpse'; -import RegionSelector from '@/src/components/RegionSelector'; +import AddressSwitcherSheet from '@/src/components/location/AddressSwitcherSheet'; import { useRegion } from '@/src/hooks/useRegion'; import { useAuth } from '@/src/contexts/AuthContext'; import { useNavigationTarget } from 'common-ui/hooks/useNavigationTarget'; @@ -18,7 +18,7 @@ export default function Me() { const { logout } = useAuth(); const { getNavigationTarget } = useNavigationTarget(); const [regionDialogOpen, setRegionDialogOpen] = useState(false); - const { region: selectedRegion, regionId } = useRegion(); + const { region: selectedRegion } = useRegion(); useFocusEffect(() => { const target = getNavigationTarget(); @@ -66,11 +66,11 @@ export default function Me() { subtitle: 'Manage delivery locations' }, { - title: 'Delivery Region', + title: 'Delivery Address', icon: 'globe-outline', color: '#0EA5E9', onPress: () => setRegionDialogOpen(true), - subtitle: selectedRegion?.name ? `Browsing ${selectedRegion.name}` : 'Choose your region' + subtitle: selectedRegion?.name ? `Delivering in ${selectedRegion.name}` : 'Choose or add an address' }, { title: 'Profile Settings', @@ -177,16 +177,7 @@ export default function Me() { - setRegionDialogOpen(false)}> - - setRegionDialogOpen(false)} - onCancel={() => setRegionDialogOpen(false)} - /> - - + setRegionDialogOpen(false)} /> diff --git a/apps/user-ui/app/_layout.tsx b/apps/user-ui/app/_layout.tsx index 8d5b2dd..450ded5 100755 --- a/apps/user-ui/app/_layout.tsx +++ b/apps/user-ui/app/_layout.tsx @@ -26,6 +26,8 @@ import { RefreshProvider } from "../../../packages/ui/src/lib/refresh-context"; import WebViewWrapper from "@/components/WebViewWrapper"; import BackHandlerWrapper from "@/components/BackHandler"; import AddToCartDialog from "@/src/components/AddToCartDialog"; +import PendingAddressSync from "@/src/components/PendingAddressSync"; +import LocationTestWrapper from "@/components/LocationTestWrapper"; import React from "react"; import { GestureHandlerRootView } from "react-native-gesture-handler"; import NotifChecker from "@/services/notif-service/notif-checker"; @@ -70,7 +72,9 @@ export default function RootLayout() { - + + + @@ -82,6 +86,7 @@ export default function RootLayout() { + diff --git a/apps/user-ui/components/FirstUserWrapper.tsx b/apps/user-ui/components/FirstUserWrapper.tsx index 8c5d4e3..a6d624b 100644 --- a/apps/user-ui/components/FirstUserWrapper.tsx +++ b/apps/user-ui/components/FirstUserWrapper.tsx @@ -2,7 +2,6 @@ import React, { useState, useEffect } from 'react' import { View } from 'react-native' import { MyButton, StorageServiceCasual, tw, MyText } from 'common-ui' import type { ReactParentComponent } from '@packages/shared' -import LocationTestWrapper from '@/components/LocationTestWrapper' const FirstUserWrapper: React.FC = ({ children }) => { const [isFirstTime, setIsFirstTime] = useState(null) @@ -35,7 +34,7 @@ const FirstUserWrapper: React.FC = ({ children }) => { ) } - return {children} + return <>{children} } export default FirstUserWrapper \ No newline at end of file diff --git a/apps/user-ui/components/LocationTestWrapper.tsx b/apps/user-ui/components/LocationTestWrapper.tsx index 19e4353..d1a2bfe 100644 --- a/apps/user-ui/components/LocationTestWrapper.tsx +++ b/apps/user-ui/components/LocationTestWrapper.tsx @@ -4,7 +4,7 @@ import { MyText, theme, tw } from 'common-ui' import type { ReactParentComponent } from '@packages/shared' import { trpc } from '../src/trpc-client' import { useRegion } from '@/src/hooks/useRegion' -import RegionSelector from '@/src/components/RegionSelector' +import LocationFallbackFlow from '@/src/components/location/LocationFallbackFlow' const LoadingScreen: React.FC<{ label?: string }> = ({ label }) => ( @@ -58,10 +58,10 @@ const LocationTestWrapper: React.FC = ({ children }) => { return } - // Location unavailable / denied / out of area -> choose a region manually. + // Location unavailable / denied / out of area -> pick an address or add one. return ( - + ) } diff --git a/apps/user-ui/src/components/AddressForm.tsx b/apps/user-ui/src/components/AddressForm.tsx index 544da3f..a0e7d30 100644 --- a/apps/user-ui/src/components/AddressForm.tsx +++ b/apps/user-ui/src/components/AddressForm.tsx @@ -1,33 +1,76 @@ -import React, { useState } from 'react'; -import { View, ScrollView, Dimensions } from 'react-native'; -import { useMutation } from '@tanstack/react-query'; +import React, { useCallback, useEffect, useState } from 'react'; +import { View, Modal, ScrollView, KeyboardAvoidingView, Platform } from 'react-native'; import { Formik } from 'formik'; import * as Yup from 'yup'; import { tw, MyText, MyTouchableOpacity , Checkbox , MyTextInput , LoadingDialog } from 'common-ui'; import MaterialIcons from '@expo/vector-icons/MaterialIcons'; import { trpc } from '../trpc-client'; import LocationAttacher from './LocationAttacher'; -import {KeyboardAwareScrollView} from 'react-native-keyboard-aware-scroll-view'; +import LocationMapStep from './location/LocationMapStep'; import type { AddressFormProps } from '@packages/shared'; -import { useRegion } from '@/src/hooks/useRegion'; +import { savePendingAddress } from '@/src/lib/pending-address'; -const AddressForm: React.FC = ({ onSuccess, initialValues, isEdit = false }) => { +type Coords = { latitude: number; longitude: number }; +type ResolvedRegion = { regionId: number; boundId: number | null }; + +const AddressForm: React.FC = ({ + onSuccess, + initialValues, + isEdit = false, + draftMode = false, + onResolvedRegion, +}) => { const [isSubmitting, setIsSubmitting] = useState(false); const [submitError, setSubmitError] = useState(null); - const [showGoogleMapsField, setShowGoogleMapsField] = useState(!!initialValues?.googleMapsUrl); - const [showRegionOptions, setShowRegionOptions] = useState(false); - const [currentLocation, setCurrentLocation] = useState<{ latitude: number; longitude: number } | null>( - initialValues?.latitude && initialValues?.longitude + const [mapOpen, setMapOpen] = useState(false); + const [currentLocation, setCurrentLocation] = useState( + initialValues?.latitude != null && initialValues?.longitude != null ? { latitude: initialValues.latitude, longitude: initialValues.longitude } : null ); + // Region is never picked directly: it is derived from the coordinates. + const [resolvedRegion, setResolvedRegion] = useState(null); + const [locationError, setLocationError] = useState(null); - const { regionId: browsingRegionId, boundId: browsingBoundId } = useRegion(); - const { data: regions } = trpc.common.listRegions.useQuery(); + const utils = trpc.useUtils(); - // Edits keep the stored region unless the user explicitly changes it; new - // addresses default to the region the user is currently browsing. - const initialRegionId = initialValues?.regionId ?? browsingRegionId ?? undefined; + // Resolve coordinates -> region + bound. Used for whichever source the user + // picks (attach current location or the map). Out-of-area points are refused. + const resolveLocation = useCallback( + async (coords: Coords) => { + setCurrentLocation(coords); + setLocationError(null); + try { + const resolved = await utils.common.resolveRegionByLocation.fetch({ + lat: coords.latitude, + lng: coords.longitude, + }); + if (!resolved) { + setResolvedRegion(null); + setLocationError('This location is outside our delivery area. Try selecting on the map.'); + return; + } + const info: ResolvedRegion = { + regionId: resolved.region.id, + boundId: resolved.bound?.id ?? null, + }; + setResolvedRegion(info); + onResolvedRegion?.(info); + } catch { + setResolvedRegion(null); + setLocationError('Could not verify this location. Please try again.'); + } + }, + [utils, onResolvedRegion] + ); + + // Resolve any prefilled coordinates once (e.g. edit, or coming from the map). + useEffect(() => { + if (initialValues?.latitude != null && initialValues?.longitude != null) { + void resolveLocation({ latitude: initialValues.latitude, longitude: initialValues.longitude }); + } + // eslint-disable-next-line react-hooks/exhaustive-deps + }, []); const createAddressMutation = trpc.user.address.createAddress.useMutation({ onSuccess: (data) => { @@ -55,9 +98,6 @@ const AddressForm: React.FC = ({ onSuccess, initialValues, isE }); const validationSchema = Yup.object({ - regionId: Yup.number() - .typeError('Region is required') - .required('Region is required'), name: Yup.string().required('Name is required'), phone: Yup.string().required('Phone is required') .matches(/^[6-9]\d{9}$/, 'Phone must be a 10-digit number starting with 6, 7, 8 or 9'), @@ -70,11 +110,16 @@ const AddressForm: React.FC = ({ onSuccess, initialValues, isE }); return ( - + {isEdit ? 'Edit Address' : 'Add Address'} {/* Service Area Notice */} @@ -94,8 +139,7 @@ const AddressForm: React.FC = ({ onSuccess, initialValues, isE )} = ({ onSuccess, initialValues, isE state: 'Telangana', pincode: '509001', isDefault: false, - latitude: undefined, - longitude: undefined, googleMapsUrl: '', }} validationSchema={validationSchema} - onSubmit={(values) => { - if (!values.regionId) { - setSubmitError('Please select a delivery region'); + onSubmit={async (values) => { + if (!currentLocation) { + setSubmitError('Please attach your current location or select it on the map.'); + return; + } + if (!resolvedRegion) { + setSubmitError(locationError || 'Please choose a location inside our delivery area.'); return; } setIsSubmitting(true); setSubmitError(null); const payload = { ...values, - regionId: values.regionId, - boundId: browsingBoundId ?? undefined, - latitude: currentLocation?.latitude, - longitude: currentLocation?.longitude, - googleMapsUrl: values.googleMapsUrl || undefined, - }; - if (isEdit && initialValues?.id) { - updateAddressMutation.mutate({ id: initialValues.id, ...payload }); - } else { - createAddressMutation.mutate(payload); - } + regionId: resolvedRegion.regionId, + latitude: currentLocation.latitude, + longitude: currentLocation.longitude, + googleMapsUrl: values.googleMapsUrl || undefined, + }; + + if (draftMode && !isEdit) { + // Signed-out flow: keep the address locally until the user has an + // account. PendingAddressSync posts it after signup/login. + await savePendingAddress({ + regionId: resolvedRegion.regionId, + name: values.name, + phone: values.phone, + addressLine1: values.addressLine1, + addressLine2: values.addressLine2 || undefined, + city: values.city, + state: values.state, + pincode: values.pincode, + isDefault: values.isDefault, + latitude: currentLocation.latitude, + longitude: currentLocation.longitude, + googleMapsUrl: values.googleMapsUrl || undefined, + }); + setIsSubmitting(false); + onSuccess(); + return; + } + + if (isEdit && initialValues?.id) { + updateAddressMutation.mutate({ id: initialValues.id, ...payload }); + } else { + createAddressMutation.mutate(payload); + } }} > {({ handleChange, handleBlur, handleSubmit, values, errors, touched, setFieldValue }) => ( - {/* Delivery Region (required) */} - - Delivery Region * - setShowRegionOptions((prev) => !prev)} - style={tw`border border-gray-200 rounded-lg p-3 flex-row items-center justify-between bg-gray-50`} - > - - {(regions ?? []).find((region) => region.id === values.regionId)?.name || 'Select region'} - - - - {showRegionOptions && ( - - {(regions ?? []).map((region) => ( - { - setFieldValue('regionId', region.id); - setShowRegionOptions(false); - }} - style={tw`p-3 border-b border-gray-50 flex-row items-center justify-between`} - > - {region.name} - {values.regionId === region.id && ( - - )} - - ))} - {(regions ?? []).length === 0 && ( - No regions available - )} - - )} - {touched.regionId && errors.regionId && ( - {errors.regionId} - )} - - = ({ onSuccess, initialValues, isE /> {touched.pincode && errors.pincode && {errors.pincode}} - setFieldValue('googleMapsUrl', url)} - onLocationChange={(location) => setCurrentLocation(location)} - disabled={false} - /> - - {!showGoogleMapsField && ( - setShowGoogleMapsField(true)} + {/* Location is mandatory and drives the region: attach or pick on map. */} + + Delivery Location * + { + if (location) void resolveLocation(location); + }} disabled={false} - style={tw`mb-1`} + /> + setMapOpen(true)} + style={tw`flex-row items-center mb-1`} > - - Attach with Google Maps - + + Select on map - )} - {showGoogleMapsField && ( - - - 1. Open Google Maps and Find location{'\n'} - 2. Long press the desired location{'\n'} - 3. Click on Share and Click on Copy{'\n'} - 4. Paste the copied url here in the field. + {currentLocation && ( + + 📍 {currentLocation.latitude.toFixed(5)}, {currentLocation.longitude.toFixed(5)} - - - )} + )} + {locationError && ( + {locationError} + )} + - + setFieldValue('isDefault', !values.isDefault)} @@ -314,8 +328,20 @@ const AddressForm: React.FC = ({ onSuccess, initialValues, isE open={isSubmitting} message={isEdit ? "Updating address..." : "Adding address..."} /> - + + {/* Full-screen map picker. */} + setMapOpen(false)}> + { + setMapOpen(false); + void resolveLocation(coords); + }} + onCancel={() => setMapOpen(false)} + /> + + + ); }; -export default AddressForm; \ No newline at end of file +export default AddressForm; diff --git a/apps/user-ui/src/components/LocationBar.tsx b/apps/user-ui/src/components/LocationBar.tsx index f26ab38..92f631f 100644 --- a/apps/user-ui/src/components/LocationBar.tsx +++ b/apps/user-ui/src/components/LocationBar.tsx @@ -1,19 +1,19 @@ import React, { useState } from 'react' import { View } from 'react-native' import MaterialIcons from '@expo/vector-icons/MaterialIcons' -import { tw, theme, MyText, MyTouchableOpacity, BottomDialog } from 'common-ui' +import { tw, theme, MyText, MyTouchableOpacity } from 'common-ui' import { useRegion } from '@/src/hooks/useRegion' -import RegionSelector from '@/src/components/RegionSelector' +import AddressSwitcherSheet from '@/src/components/location/AddressSwitcherSheet' /** * Location bar shown at the top of every top-level tab screen. * Rendered INSIDE the scroll content (first item / ListHeaderComponent) so it - * scrolls out with the page instead of sticking. Tapping opens a bottom - * sheet with the region list; switching is confirmed inside RegionSelector. + * scrolls out with the page instead of sticking. Tapping opens the address + * switcher: pick a saved address (region follows it) or add a new one. */ const LocationBar: React.FC = () => { const [sheetOpen, setSheetOpen] = useState(false) - const { region, regionId } = useRegion() + const { region } = useRegion() return ( @@ -31,22 +31,13 @@ const LocationBar: React.FC = () => { Deliver to - {region?.name ?? 'Choose your region'} + {region?.name ?? 'Choose your address'} - {sheetOpen && ( - setSheetOpen(false)}> - setSheetOpen(false)} - onCancel={() => setSheetOpen(false)} - /> - - )} + setSheetOpen(false)} /> ) } diff --git a/apps/user-ui/src/components/PendingAddressSync.tsx b/apps/user-ui/src/components/PendingAddressSync.tsx new file mode 100644 index 0000000..b0c7a0b --- /dev/null +++ b/apps/user-ui/src/components/PendingAddressSync.tsx @@ -0,0 +1,50 @@ +import { useEffect, useRef } from 'react' +import { trpc } from '@/src/trpc-client' +import { useAuth } from '@/src/contexts/AuthContext' +import { clearPendingAddress, getPendingAddress } from '@/src/lib/pending-address' + +/** + * Posts a locally-drafted address (created while signed out in the location + * fallback flow) once the user is authenticated. Also runs at order time, + * because ordering requires an account. The draft is kept on failure so it can + * be retried on the next authenticated mount. + */ +const PendingAddressSync: React.FC = () => { + const { isAuthenticated } = useAuth() + const utils = trpc.useUtils() + const createAddress = trpc.user.address.createAddress.useMutation() + const isSyncing = useRef(false) + + useEffect(() => { + if (!isAuthenticated || isSyncing.current) return + + let cancelled = false + + const run = async () => { + const pending = await getPendingAddress() + if (!pending || cancelled) return + + isSyncing.current = true + try { + await createAddress.mutateAsync(pending) + await clearPendingAddress() + await utils.user.address.getUserAddresses.invalidate() + await utils.user.address.getDefaultAddress.invalidate() + } catch { + // Leave the draft in place; a later authenticated mount retries it. + } finally { + isSyncing.current = false + } + } + + void run() + return () => { + cancelled = true + } + // eslint-disable-next-line react-hooks/exhaustive-deps + }, [isAuthenticated]) + + return null +} + +export default PendingAddressSync diff --git a/apps/user-ui/src/components/RegionSelector.tsx b/apps/user-ui/src/components/RegionSelector.tsx deleted file mode 100644 index a309d97..0000000 --- a/apps/user-ui/src/components/RegionSelector.tsx +++ /dev/null @@ -1,162 +0,0 @@ -import React, { useState } from 'react' -import { View, ScrollView, ActivityIndicator, Alert } from 'react-native' -import MaterialIcons from '@expo/vector-icons/MaterialIcons' -import { useQueryClient } from '@tanstack/react-query' -import { tw, MyText, MyTouchableOpacity, theme } from 'common-ui' -import type { RegionSummary } from '@packages/shared' -import { trpc } from '@/src/trpc-client' -import { confirmRegionSwitch } from '@/src/lib/region-switch' - -interface RegionSelectorProps { - /** - * 'gate' — first-run full-screen chooser, cannot be dismissed. - * 'switch' — content for a caller-owned dialog; shows a cart-clear confirmation. - */ - mode?: 'gate' | 'switch' - /** Current browsing region id, for highlighting. Supplied by the caller so - * this presentational picker never triggers location tracking itself. */ - selectedRegionId?: number | null - onComplete?: (region: RegionSummary) => void - onCancel?: () => void -} - -const RegionSelector: React.FC = ({ - mode = 'gate', - selectedRegionId = null, - onComplete, - onCancel, -}) => { - const queryClient = useQueryClient() - const [isSwitching, setIsSwitching] = useState(false) - const { data: regions, isLoading, error, refetch } = trpc.common.listRegions.useQuery() - - const applySwitch = async (region: RegionSummary) => { - setIsSwitching(true) - try { - // The active bound is derived from the user's addresses (see useRegion). - await confirmRegionSwitch(region, queryClient) - onComplete?.(region) - } finally { - setIsSwitching(false) - } - } - - const handlePick = (region: RegionSummary) => { - if (isSwitching) return - - // First run: no cart exists yet, select directly. - if (mode === 'gate') { - void applySwitch(region) - return - } - - if (region.id === selectedRegionId) { - onCancel?.() - return - } - - Alert.alert( - 'Switch region?', - `Switching to ${region.name} will clear your entire cart (regular and 1-hour delivery). This cannot be undone.`, - [ - { text: 'Cancel', style: 'cancel', onPress: () => onCancel?.() }, - { - text: 'Switch & clear cart', - style: 'destructive', - onPress: () => { - void applySwitch(region) - }, - }, - ] - ) - } - - const header = mode === 'gate' ? ( - - Choose your region - - We deliver to one region at a time. Pick where you want your groceries delivered. - - - ) : ( - - Delivery Region - - Switching region clears your current cart. - - - ) - - if (isLoading) { - return ( - - - Loading regions... - - ) - } - - if (error) { - return ( - - - Unable to load regions - - Please check your connection and try again. - - refetch()} - style={tw`bg-brand500 px-6 py-3 rounded-xl`} - > - Retry - - - ) - } - - return ( - - {header} - - {(regions ?? []).map((region) => { - const isSelected = region.id === selectedRegionId - return ( - handlePick(region)} - style={tw`flex-row items-center bg-white border ${isSelected ? 'border-brand500 bg-blue-50' : 'border-gray-100'} rounded-2xl p-4 mb-3 shadow-sm`} - > - - - - - {region.name} - {!!region.description && ( - - {region.description} - - )} - - {isSelected && ( - - )} - - ) - })} - - {isSwitching && ( - Switching region... - )} - - - ) -} - -export default RegionSelector diff --git a/apps/user-ui/src/components/location/AddressSwitcherSheet.tsx b/apps/user-ui/src/components/location/AddressSwitcherSheet.tsx new file mode 100644 index 0000000..b73ac47 --- /dev/null +++ b/apps/user-ui/src/components/location/AddressSwitcherSheet.tsx @@ -0,0 +1,24 @@ +import React from 'react' +import { Modal, View } from 'react-native' +import { tw } from 'common-ui' +import LocationFallbackFlow from './LocationFallbackFlow' + +interface AddressSwitcherSheetProps { + open: boolean + onClose: () => void +} + +/** + * Full-screen modal that lets the user switch the active delivery address (and + * therefore region/bound) or add a new one. Used by the location bar and the + * Me screen in place of the old direct region picker. + */ +const AddressSwitcherSheet: React.FC = ({ open, onClose }) => ( + + + + + +) + +export default AddressSwitcherSheet diff --git a/apps/user-ui/src/components/location/LocationFallbackFlow.tsx b/apps/user-ui/src/components/location/LocationFallbackFlow.tsx new file mode 100644 index 0000000..746698c --- /dev/null +++ b/apps/user-ui/src/components/location/LocationFallbackFlow.tsx @@ -0,0 +1,248 @@ +import React, { useCallback, useRef, useState } from 'react' +import { View, ScrollView, ActivityIndicator } from 'react-native' +import { useQueryClient } from '@tanstack/react-query' +import MaterialIcons from '@expo/vector-icons/MaterialIcons' +import { MyText, MyTouchableOpacity, tw, theme } from 'common-ui' +import { trpc } from '@/src/trpc-client' +import { useAuthOptional } from '@/src/contexts/AuthContext' +import { confirmRegionSwitch } from '@/src/lib/region-switch' +import AddressForm from '@/src/components/AddressForm' + +type ResolvedRegion = { regionId: number; boundId: number | null } + +/** Address fields the chooser needs (serialized API shape). */ +interface ChooserAddress { + id: number + regionId: number | null + boundId: number | null + latitude: number | null + longitude: number | null + name: string + phone: string + addressLine1: string + addressLine2: string | null + city: string + state: string + pincode: string + isDefault: boolean +} + +interface LocationFallbackFlowProps { + /** Present when hosted in a sheet; lets the caller dismiss after a choice. */ + onClose?: () => void +} + +/** + * Region is no longer chosen directly. The user either picks a saved address + * (which switches the browsing region + bound and clears the cart) or adds a + * new one (coordinates required, via attach-location or the map). + */ +const LocationFallbackFlow: React.FC = ({ onClose }) => { + const queryClient = useQueryClient() + const utils = trpc.useUtils() + const auth = useAuthOptional() + const isAuthenticated = auth?.isAuthenticated ?? false + + const [mode, setMode] = useState<'choose' | 'add'>('choose') + const [busy, setBusy] = useState(false) + const [message, setMessage] = useState(null) + const resolvedRef = useRef(null) + + const addressesQuery = trpc.user.address.getUserAddresses.useQuery(undefined, { + enabled: isAuthenticated, + }) + const updateAddress = trpc.user.address.updateAddress.useMutation() + + const addresses = (addressesQuery.data?.data ?? []) as unknown as ChooserAddress[] + + const activate = useCallback( + async (regionId: number, boundId: number | null) => { + setBusy(true) + try { + const regions = await utils.common.listRegions.fetch() + const region = regions.find((candidate) => candidate.id === regionId) + if (!region) { + setMessage('This location is no longer serviceable.') + return + } + await confirmRegionSwitch(region, queryClient, boundId) + } finally { + setBusy(false) + } + }, + [queryClient, utils] + ) + + const handleSelect = useCallback( + async (address: ChooserAddress) => { + if (address.regionId == null) { + setMessage('This saved address has no region. Please add a new address instead.') + return + } + + let boundId = address.boundId + if (boundId == null && address.latitude != null && address.longitude != null) { + try { + const resolved = await utils.common.resolveRegionByLocation.fetch({ + lat: address.latitude, + lng: address.longitude, + }) + boundId = resolved?.bound?.id ?? null + } catch { + boundId = null + } + } + + await activate(address.regionId, boundId) + onClose?.() + }, + [activate, onClose, utils] + ) + + const handleSetDefault = useCallback( + (address: ChooserAddress) => { + if (address.regionId == null) { + setMessage('This saved address has no region. Please add a new address instead.') + return + } + updateAddress.mutate( + { + id: address.id, + regionId: address.regionId, + name: address.name, + phone: address.phone, + addressLine1: address.addressLine1, + addressLine2: address.addressLine2 || undefined, + city: address.city, + state: address.state, + pincode: address.pincode, + isDefault: true, + latitude: address.latitude ?? undefined, + longitude: address.longitude ?? undefined, + }, + { + onSuccess: () => { + void utils.user.address.getUserAddresses.invalidate() + void utils.user.address.getDefaultAddress.invalidate() + }, + onError: (error: any) => setMessage(error?.message || 'Could not set default address.'), + } + ) + }, + [updateAddress, utils] + ) + + const handleFormSuccess = useCallback(async () => { + const resolved = resolvedRef.current + if (resolved) { + await activate(resolved.regionId, resolved.boundId) + } + onClose?.() + }, [activate, onClose]) + + if (mode === 'add') { + return ( + + setMode('choose')} + style={tw`px-5 pt-12 pb-2 flex-row items-center`} + > + + Back + + { + resolvedRef.current = info + }} + onSuccess={handleFormSuccess} + /> + + ) + } + + return ( + + + + Delivery Address + + Choose a saved address, or add a new one. Your region follows the address. + + + {onClose && ( + + + + )} + + + {message && ( + + {message} + + )} + + {isAuthenticated && addressesQuery.isLoading && ( + + + + )} + + + {isAuthenticated && + addresses.map((address) => ( + + handleSelect(address)}> + + {address.name} + {address.isDefault && ( + + Default + + )} + + + {address.addressLine1} + {address.addressLine2 ? `, ${address.addressLine2}` : ''}, {address.city} - {address.pincode} + + + + {!address.isDefault && ( + handleSetDefault(address)} + disabled={busy || updateAddress.isPending} + style={tw`mt-2 self-start`} + > + Set as default + + )} + + ))} + + {isAuthenticated && !addressesQuery.isLoading && addresses.length === 0 && ( + No saved addresses yet. + )} + + setMode('add')} + style={tw`bg-white border border-dashed border-gray-300 rounded-2xl p-4 flex-row items-center`} + > + + Add a new address + + + + {busy && ( + + + + )} + + ) +} + +export default LocationFallbackFlow diff --git a/apps/user-ui/src/components/location/LocationMapStep.tsx b/apps/user-ui/src/components/location/LocationMapStep.tsx new file mode 100644 index 0000000..7700f1d --- /dev/null +++ b/apps/user-ui/src/components/location/LocationMapStep.tsx @@ -0,0 +1,86 @@ +import React, { useCallback, useState } from 'react' +import { View, ActivityIndicator } from 'react-native' +import { WebView, type WebViewMessageEvent } from 'react-native-webview' +import { MyText, MyTouchableOpacity, tw, theme } from 'common-ui' +import constants from '@/src/constants' + +export interface PickedCoords { + latitude: number + longitude: number +} + +interface LocationMapStepProps { + /** Called with the coordinates the user confirmed on the map. */ + onSelect: (coords: PickedCoords) => void + /** Called when the user backs out of the map. */ + onCancel: () => void + /** Shown when a previously picked point was rejected (outside the region). */ + error?: string +} + +/** + * Full-screen WebView wrapping the web-ui `/location-selector` page. The page + * posts `{ type: 'location-selected', latitude, longitude }` back through + * `window.ReactNativeWebView.postMessage` when the user confirms a point. + */ +export default function LocationMapStep({ onSelect, onCancel, error }: LocationMapStepProps) { + const [isLoading, setIsLoading] = useState(true) + const url = `${constants.WEB_UI_BASE_URL}/location-selector` + + const handleMessage = useCallback( + (event: WebViewMessageEvent) => { + try { + const data = JSON.parse(event.nativeEvent.data) + if ( + data?.type === 'location-selected' && + typeof data.latitude === 'number' && + typeof data.longitude === 'number' + ) { + onSelect({ latitude: data.latitude, longitude: data.longitude }) + } + } catch { + // Ignore non-JSON or unrelated messages from the page. + } + }, + [onSelect] + ) + + return ( + + setIsLoading(false)} + startInLoadingState + // The map handles its own gestures; page scroll would just fight it. + scrollEnabled={false} + // Needed so the embedded page can geolocate/confirm on device. + geolocationEnabled + /> + + {isLoading && ( + + + Loading map... + + )} + + + Cancel + + + {!!error && ( + + {error} + + )} + + ) +} diff --git a/apps/user-ui/src/constants.ts b/apps/user-ui/src/constants.ts index 1b30d15..5c13138 100644 --- a/apps/user-ui/src/constants.ts +++ b/apps/user-ui/src/constants.ts @@ -4,6 +4,9 @@ const constants = { BASE_URL: process.env.BASE_URL, GOOGLE_AUTH_URL: process.env.GOOGLE_AUTH_URL, AUTH_REDIRECT_KEY: 'auth_redirect_state', + // Web app used inside the app for the map-based address picker + // (web-ui /location-selector route). Replace with the live URL later. + WEB_UI_BASE_URL: 'https://localuserweb.freshyo.in', // Bump this on every release. When it is lower than the backend's // `internalAppVersion` constant, UpdateChecker prompts the user to restart. INTERNAL_APP_VERSION: 2, diff --git a/apps/user-ui/src/hooks/useRegion.ts b/apps/user-ui/src/hooks/useRegion.ts index fd3187a..46570b5 100644 --- a/apps/user-ui/src/hooks/useRegion.ts +++ b/apps/user-ui/src/hooks/useRegion.ts @@ -105,7 +105,9 @@ export function useRegion(): UseRegionResult { // Keep the stored bound in sync with the derived active bound (region-level). useEffect(() => { if (regionId == null || !region) return - if (activeBoundId != null && activeBoundId !== storedBoundId) { + // Only fill in a MISSING bound. Never overwrite a bound already resolved + // from the device location or a chosen address: those win at startup. + if (storedBoundId == null && activeBoundId != null) { setRegion(region, activeBoundId) } }, [regionId, region, activeBoundId, storedBoundId, setRegion]) diff --git a/apps/user-ui/src/lib/pending-address.ts b/apps/user-ui/src/lib/pending-address.ts new file mode 100644 index 0000000..7f07cc7 --- /dev/null +++ b/apps/user-ui/src/lib/pending-address.ts @@ -0,0 +1,42 @@ +import { StorageServiceCasual } from 'common-ui' + +/** + * A delivery address the user filled in while signed out. It is kept in local + * storage and posted to the backend once the user has an account (see + * PendingAddressSync). Coordinates are always present because they come from + * the map picker. + */ +export interface PendingAddressInput { + regionId: number + name: string + phone: string + addressLine1: string + addressLine2?: string + city: string + state: string + pincode: string + isDefault?: boolean + latitude: number + longitude: number + googleMapsUrl?: string +} + +const PENDING_ADDRESS_KEY = 'freshyo_pending_address' + +export async function savePendingAddress(address: PendingAddressInput): Promise { + await StorageServiceCasual.setItem(PENDING_ADDRESS_KEY, JSON.stringify(address)) +} + +export async function getPendingAddress(): Promise { + const raw = await StorageServiceCasual.getItem(PENDING_ADDRESS_KEY) + if (!raw) return null + try { + return JSON.parse(raw) as PendingAddressInput + } catch { + return null + } +} + +export async function clearPendingAddress(): Promise { + await StorageServiceCasual.removeItem(PENDING_ADDRESS_KEY) +} diff --git a/apps/web-ui/.env b/apps/web-ui/.env new file mode 100644 index 0000000..fb49dce --- /dev/null +++ b/apps/web-ui/.env @@ -0,0 +1 @@ +VITE_GOOGLE_MAPS_API_KEY=AIzaSyAyvERo7W0k20RNNSKnaXCknfFXBGHRYeM \ No newline at end of file diff --git a/apps/web-ui/src/components/AddressForm.tsx b/apps/web-ui/src/components/AddressForm.tsx index f6251bf..0244049 100644 --- a/apps/web-ui/src/components/AddressForm.tsx +++ b/apps/web-ui/src/components/AddressForm.tsx @@ -1,15 +1,14 @@ -import React, { useState } from 'react' +import React, { useCallback, useEffect, useState } from 'react' import { trpc } from '../lib/trpc-client' -import { useRegionStore } from '../lib/stores/region-store' import { p, pInput as PInput, MyButton, div } from 'web-components' -import { MapPin, X, Plus } from 'lucide-react' +import { MapPin } from 'lucide-react' import * as Yup from 'yup' import type { AddressFormProps } from '@packages/shared' +type Coords = { latitude: number; longitude: number } +type ResolvedRegion = { regionId: number; boundId: number | null } + const validationSchema = Yup.object({ - regionId: Yup.number() - .typeError('Region is required') - .required('Region is required'), name: Yup.string().required('Name is required'), phone: Yup.string().required('Phone is required').matches(/^\d{10}$/, 'Phone must be 10 digits'), addressLine1: Yup.string().required('Address Line 1 is required'), @@ -20,39 +19,90 @@ const validationSchema = Yup.object({ isDefault: Yup.boolean(), }) -export function AddressForm({ onSuccess, initialValues, isEdit = false }: AddressFormProps) { +export function AddressForm({ onSuccess, initialValues, isEdit = false, onResolvedRegion }: AddressFormProps) { const [isSubmitting, setIsSubmitting] = useState(false) const [submitError, setSubmitError] = useState(null) - const [showGoogleMapsField, setShowGoogleMapsField] = useState(!!initialValues?.googleMapsUrl) - const [currentLocation, setCurrentLocation] = useState<{ latitude: number; longitude: number } | null>( - initialValues?.latitude && initialValues?.longitude + const [mapOpen, setMapOpen] = useState(false) + const [locating, setLocating] = useState(false) + const [locationError, setLocationError] = useState(null) + const [currentLocation, setCurrentLocation] = useState( + initialValues?.latitude != null && initialValues?.longitude != null ? { latitude: initialValues.latitude, longitude: initialValues.longitude } : null ) + // Region is derived from the coordinates, never picked directly. + const [resolvedRegion, setResolvedRegion] = useState(null) - const browsingRegionId = useRegionStore((state) => state.selectedRegionId) - const { data: regions } = trpc.common.listRegions.useQuery() + const utils = trpc.useUtils() - const [values, setValues] = useState(() => { - // Edits keep the stored region unless the user explicitly changes it; new - // addresses default to the region the user is currently browsing. - const initialRegionId = initialValues?.regionId ?? browsingRegionId ?? null - return { - regionId: initialRegionId as number | null, - name: initialValues?.name || '', - phone: initialValues?.phone || '', - addressLine1: initialValues?.addressLine1 || '', - addressLine2: initialValues?.addressLine2 || '', - city: initialValues?.city || 'Mahabubnagar', - state: initialValues?.state || 'Telangana', - pincode: initialValues?.pincode || '509001', - isDefault: initialValues?.isDefault || false, - googleMapsUrl: initialValues?.googleMapsUrl || '', - } - }) + const [values, setValues] = useState(() => ({ + name: initialValues?.name || '', + phone: initialValues?.phone || '', + addressLine1: initialValues?.addressLine1 || '', + addressLine2: initialValues?.addressLine2 || '', + city: initialValues?.city || 'Mahabubnagar', + state: initialValues?.state || 'Telangana', + pincode: initialValues?.pincode || '509001', + isDefault: initialValues?.isDefault || false, + googleMapsUrl: initialValues?.googleMapsUrl || '', + })) const [errors, setErrors] = useState>({}) + const resolveLocation = useCallback( + async (coords: Coords) => { + setCurrentLocation(coords) + setLocationError(null) + try { + const resolved = await utils.common.resolveRegionByLocation.fetch({ + lat: coords.latitude, + lng: coords.longitude, + }) + if (!resolved) { + setResolvedRegion(null) + setLocationError('This location is outside our delivery area. Try selecting on the map.') + return + } + const info: ResolvedRegion = { + regionId: resolved.region.id, + boundId: resolved.bound?.id ?? null, + } + setResolvedRegion(info) + onResolvedRegion?.(info) + } catch { + setResolvedRegion(null) + setLocationError('Could not verify this location. Please try again.') + } + }, + [utils, onResolvedRegion] + ) + + useEffect(() => { + if (initialValues?.latitude != null && initialValues?.longitude != null) { + void resolveLocation({ latitude: initialValues.latitude, longitude: initialValues.longitude }) + } + // eslint-disable-next-line react-hooks/exhaustive-deps + }, []) + + // Coordinates picked on the embedded map are delivered via postMessage. + useEffect(() => { + if (!mapOpen) return + const handler = (event: MessageEvent) => { + if (event.origin !== window.location.origin) return + const data = event.data + if ( + data?.type === 'location-selected' && + typeof data.latitude === 'number' && + typeof data.longitude === 'number' + ) { + setMapOpen(false) + void resolveLocation({ latitude: data.latitude, longitude: data.longitude }) + } + } + window.addEventListener('message', handler) + return () => window.removeEventListener('message', handler) + }, [mapOpen, resolveLocation]) + const createMutation = trpc.user.address.createAddress.useMutation({ onSuccess: (data) => { setIsSubmitting(false) @@ -75,20 +125,44 @@ export function AddressForm({ onSuccess, initialValues, isEdit = false }: Addres }, }) - const handleChange = (field: string, value: string | boolean | number | null) => { + const handleChange = (field: string, value: string | boolean) => { setValues((prev) => ({ ...prev, [field]: value })) if (errors[field]) { setErrors((prev) => ({ ...prev, [field]: '' })) } } + const handleDetectLocation = () => { + if (!navigator.geolocation) { + setLocationError('Location is not supported in this browser. Please select on the map.') + return + } + setLocating(true) + navigator.geolocation.getCurrentPosition( + (position) => { + setLocating(false) + void resolveLocation({ + latitude: position.coords.latitude, + longitude: position.coords.longitude, + }) + }, + () => { + setLocating(false) + setLocationError('Could not get your location. Please select on the map.') + }, + { enableHighAccuracy: true, timeout: 10000 } + ) + } + const handleSubmit = async () => { try { await validationSchema.validate(values, { abortEarly: false }) - const regionId = values.regionId - if (regionId == null) { - setErrors((prev) => ({ ...prev, regionId: 'Please select a delivery region' })) - setSubmitError('Please select a delivery region') + if (!currentLocation) { + setSubmitError('Please use your current location or select one on the map.') + return + } + if (!resolvedRegion) { + setSubmitError(locationError || 'Please choose a location inside our delivery area.') return } setIsSubmitting(true) @@ -96,9 +170,9 @@ export function AddressForm({ onSuccess, initialValues, isEdit = false }: Addres const payload = { ...values, - regionId, - latitude: currentLocation?.latitude, - longitude: currentLocation?.longitude, + regionId: resolvedRegion.regionId, + latitude: currentLocation.latitude, + longitude: currentLocation.longitude, googleMapsUrl: values.googleMapsUrl || undefined, } @@ -117,24 +191,18 @@ export function AddressForm({ onSuccess, initialValues, isEdit = false }: Addres } return ( -
+
-

- {isEdit ? 'Edit Address' : 'Add Address'} -

+

{isEdit ? 'Edit Address' : 'Add Address'}

- {/* Service Area Notice */}
ℹ️ -

- We currently serve only in Mahabubnagar town -

+

We currently serve only in Mahabubnagar town

- {/* Submit Error Message */} {submitError && (

{submitError}

@@ -142,28 +210,6 @@ export function AddressForm({ onSuccess, initialValues, isEdit = false }: Addres )}
-
-

Delivery Region *

- - {errors.regionId &&

{errors.regionId}

} -
-
- +
- +
- +
- {!showGoogleMapsField && ( -
setShowGoogleMapsField(true)} - className="text-blue-500" - > -

- Attach with Google Maps -

+ {/* Location is mandatory and drives the region. */} +
+

Delivery Location *

+
+ +
- )} - {showGoogleMapsField && ( -
-

- 1. Open Google Maps and Find location
- 2. Long press the desired location
- 3. Click on Share and Click on Copy
- 4. Paste the copied url here in the field. + {currentLocation && ( +

+ 📍 {currentLocation.latitude.toFixed(5)}, {currentLocation.longitude.toFixed(5)}

- handleChange('googleMapsUrl', e.target.value)} - /> -
- )} + )} + {locationError &&

{locationError}

} +
+ + {/* Full-screen in-page map picker (same origin, posts coordinates back). */} + {mapOpen && ( +
+