Bladeren bron

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 maanden geleden
bovenliggende
commit
d971f941d6
4 gewijzigde bestanden met toevoegingen van 228 en 198 verwijderingen
  1. 0 0
      src/api/components/SitesEndpoint.ts
  2. 226 196
      src/database/Database.ts
  3. 0 0
      src/scraper/WebScraper.ts
  4. 2 2
      src/types/index.ts

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


File diff suppressed because it is too large
+ 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;
   createdAt: 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
 }
 
@@ -24,7 +24,7 @@ export interface PageContent {
   title?: string;
 }
 
-export type WebshopType = 'shoprenter' | 'woocommerce' | 'shopify';
+export type SitePlatform = 'shoprenter' | 'woocommerce' | 'shopify' | 'generic';
 
 export interface SitemapUrl {
   loc: string;

Some files were not shown because too many files changed in this diff