8 country: "France",
9 description: "The City of Light, known for its art, fashion, gastronomy, and culture.",
10 image: "๐ผ",
11 coordinates: { lat: 48.8566, lng: 2.3522 }
12 },
22 "It's painted every 7 years to protect it from rust"
23 ],
24 image: "๐ผ",
25 coordinates: { lat: 48.8584, lng: 2.2945 }
26 },
35 "It would take 100 days to see every piece if you spent 30 seconds on each"
36 ],
37 image: "๐๏ธ",
38 coordinates: { lat: 48.8606, lng: 2.3376 }
39 },
48 "The 2019 fire damaged the spire and roof, but restoration is ongoing"
49 ],
50 image: "โช",
51 coordinates: { lat: 48.8530, lng: 2.3499 }
52 }
153 country: "Japan",
154 description: "A vibrant metropolis blending ultra-modern technology with traditional culture.",
155 image: "๐ฏ",
156 coordinates: { lat: 35.6762, lng: 139.6503 }
157 },
167 "The temple was rebuilt after WWII bombing, maintaining its traditional design"
168 ],
169 image: "โฉ๏ธ",
170 coordinates: { lat: 35.7148, lng: 139.7967 }
171 },
180 "The nearby Hachiko statue commemorates Japan's most loyal dog"
181 ],
182 image: "๐ฆ",
183 coordinates: { lat: 35.6598, lng: 139.7006 }
184 },
193 "Best visited early morning for the freshest selections"
194 ],
195 image: "๐",
196 coordinates: { lat: 35.6654, lng: 139.7707 }
197 }
301 country: "Italy",
302 description: "The Eternal City, where ancient history meets vibrant modern life.",
303 image: "๐๏ธ",
304 coordinates: { lat: 41.9028, lng: 12.4964 }
305 },
315 "It's the largest amphitheater ever built and a UNESCO World Heritage Site"
316 ],
317 image: "๐๏ธ",
318 coordinates: { lat: 41.8902, lng: 12.4922 }
319 },
328 "Vatican City has its own postal system, telephone system, and euro coins"
329 ],
330 image: "โช",
331 coordinates: { lat: 41.9029, lng: 12.4534 }
332 },
341 "It was featured in the famous scene from Fellini's 'La Dolce Vita'"
342 ],
343 image: "โฒ",
344 coordinates: { lat: 41.9009, lng: 12.4833 }
345 }
11 "icons": [
12 {
13 "src": "data:image/svg+xml,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 192 192'><rect width='192' height='192' fill='%236366f1'/><text x='96' y='120' font-size='120' text-anchor='middle' fill='white'>๐</text></svg>",
14 "sizes": "192x192",
15 "type": "image/svg+xml",
16 "purpose": "any maskable"
17 },
18 {
19 "src": "data:image/svg+xml,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 512 512'><rect width='512' height='512' fill='%236366f1'/><text x='256' y='320' font-size='320' text-anchor='middle' fill='white'>๐</text></svg>",
20 "sizes": "512x512",
21 "type": "image/svg+xml",
22 "purpose": "any maskable"
23 }
25 "screenshots": [
26 {
27 "src": "data:image/svg+xml,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 390 844'><rect width='390' height='844' fill='%23f9fafb'/><rect x='0' y='0' width='390' height='100' fill='%236366f1'/><text x='195' y='60' font-size='24' text-anchor='middle' fill='white'>Esteem Collections</text></svg>",
28 "sizes": "390x844",
29 "type": "image/svg+xml",
30 "form_factor": "narrow"
31 }
39 "icons": [
40 {
41 "src": "data:image/svg+xml,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 96 96'><text y='.9em' font-size='80'>๐๏ธ</text></svg>",
42 "sizes": "96x96"
43 }
51 "icons": [
52 {
53 "src": "data:image/svg+xml,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 96 96'><text y='.9em' font-size='80'>๐</text></svg>",
54 "sizes": "96x96"
55 }
63 "icons": [
64 {
65 "src": "data:image/svg+xml,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 96 96'><text y='.9em' font-size='80'>โค๏ธ</text></svg>",
66 "sizes": "96x96"
67 }
67 hashtags: JSON.parse(row[9] as string || '[]'),
68 mentions: JSON.parse(row[10] as string || '[]'),
69 mediaType: row[11] as 'text' | 'image' | 'video' | 'gif',
70 isThread: Boolean(row[12]),
71 threadPosition: row[13] as number || undefined,
97 hashtags: JSON.parse(row[9] as string || '[]'),
98 mentions: JSON.parse(row[10] as string || '[]'),
99 mediaType: row[11] as 'text' | 'image' | 'video' | 'gif',
100 isThread: Boolean(row[12]),
101 threadPosition: row[13] as number || undefined,
137 subcategory: row.subcategory,
138 brand: row.brand,
139 images: JSON.parse(row.images),
140 sizes: JSON.parse(row.sizes),
141 colors: JSON.parse(row.colors),
172 subcategory: row.subcategory,
173 brand: row.brand,
174 images: JSON.parse(row.images),
175 sizes: JSON.parse(row.sizes),
176 colors: JSON.parse(row.colors),
194 categoryId: number;
195 brand: string;
196 images: string[];
197 sizes: string[];
198 colors: string[];
206 INSERT INTO products (
207 name, description, price, original_price, category_id, brand,
208 images, sizes, colors, in_stock, featured, trending, new_arrival, tags
209 ) VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)
210 `, [
215 productData.categoryId,
216 productData.brand,
217 JSON.stringify(productData.images),
218 JSON.stringify(productData.sizes),
219 JSON.stringify(productData.colors),
231export async function getCartItems(userId: number): Promise<CartItem[]> {
232 const result = await sqlite.execute(`
233 SELECT ci.*, p.name, p.price, p.images, p.brand, p.in_stock
234 FROM cart_items ci
235 JOIN products p ON ci.product_id = p.id
246 name: row.name,
247 price: row.price,
248 images: JSON.parse(row.images),
249 brand: row.brand,
250 inStock: row.in_stock
290export async function getWishlistItems(userId: number): Promise<WishlistItem[]> {
291 const result = await sqlite.execute(`
292 SELECT wi.*, p.name, p.price, p.original_price, p.images, p.brand, p.rating, p.review_count
293 FROM wishlist_items wi
294 JOIN products p ON wi.product_id = p.id
306 price: row.price,
307 originalPrice: row.original_price,
308 images: JSON.parse(row.images),
309 brand: row.brand,
310 rating: row.rating,
345 slug: row.slug,
346 description: row.description,
347 image: row.image,
348 parentId: row.parent_id,
349 productCount: row.product_count
412 for (const row of result) {
413 const itemsResult = await sqlite.execute(`
414 SELECT oi.*, p.name, p.images, p.brand
415 FROM order_items oi
416 JOIN products p ON oi.product_id = p.id
429 id: item.product_id,
430 name: item.name,
431 images: JSON.parse(item.images),
432 brand: item.brand
433 } as Product,
486
487 const topProductsResult = await sqlite.execute(`
488 SELECT p.id, p.name, p.price, p.images, p.brand,
489 SUM(oi.quantity) as sales,
490 SUM(oi.quantity * oi.price) as revenue
508 name: row.name,
509 price: row.price,
510 images: JSON.parse(row.images),
511 brand: row.brand
512 } as Product,