Przeglądaj źródła

refactor: rename database tables and methods shops to sites

Rename all database interfaces, tables, columns, methods, and SQL from
shop/shops naming to site/sites naming. Add migration method to handle
existing databases with old table names. Add 'generic' to SitePlatform.
fszontagh 3 miesięcy temu
rodzic
commit
d971f941d6

+ 0 - 0
src/api/components/ShopsEndpoint.ts → src/api/components/SitesEndpoint.ts


Plik diff jest za duży
+ 226 - 196
src/database/Database.ts


+ 0 - 0
src/scraper/WebshopScraper.ts → src/scraper/WebScraper.ts


+ 2 - 2
src/types/index.ts

@@ -6,7 +6,7 @@ export interface ScraperJob {
   error?: string;
   error?: string;
   createdAt: Date;
   createdAt: Date;
   updatedAt: Date;
   updatedAt: Date;
-  shopId?: string; // UUID of the shop this job belongs to
+  siteId?: string; // UUID of the site this job belongs to
   scrapeHistoryId?: string; // ID of the scrape history record
   scrapeHistoryId?: string; // ID of the scrape history record
 }
 }
 
 
@@ -24,7 +24,7 @@ export interface PageContent {
   title?: string;
   title?: string;
 }
 }
 
 
-export type WebshopType = 'shoprenter' | 'woocommerce' | 'shopify';
+export type SitePlatform = 'shoprenter' | 'woocommerce' | 'shopify' | 'generic';
 
 
 export interface SitemapUrl {
 export interface SitemapUrl {
   loc: string;
   loc: string;

Niektóre pliki nie zostały wyświetlone z powodu dużej ilości zmienionych plików