[Demo] Add admin demo-mode toggle + generic website ingest source
- AppSetting: DemoMode, WebsitesEnabled, WebsiteUrls - Facility.IsDemo flag; SeedData split into SeedReferenceAsync (always) + SeedDemoAsync/ClearDemoAsync (idempotent, toggleable at runtime) - WebsiteListingSource: scrape any admin-configured URL (og:title + content) - Admin Settings: seed/clear demo card, demo-mode checkbox, website source fields; Program.cs seeds demo when DemoMode on (or in Development) - EF migration DemoModeAndWebsites Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
@@ -44,6 +44,13 @@ public class AppSetting
|
||||
public bool BaleEnabled { get; set; } = false;
|
||||
[MaxLength(200)] public string? BaleBotToken { get; set; }
|
||||
|
||||
/// <summary>Demo mode — keep the sample Tehran board seeded/visible (for showcasing).</summary>
|
||||
public bool DemoMode { get; set; } = false;
|
||||
|
||||
public bool WebsitesEnabled { get; set; } = false;
|
||||
/// <summary>Generic web pages to scrape, one URL per line.</summary>
|
||||
[MaxLength(4000)] public string? WebsiteUrls { get; set; }
|
||||
|
||||
public bool DivarEnabled { get; set; } = false;
|
||||
[MaxLength(60)] public string? DivarCity { get; set; } = "tehran";
|
||||
/// <summary>Divar search terms, one per line or comma-separated.</summary>
|
||||
|
||||
@@ -18,6 +18,9 @@ public class Facility
|
||||
public int? DistrictId { get; set; } // محله/منطقه
|
||||
public District? District { get; set; }
|
||||
|
||||
/// <summary>Seeded sample facility (demo mode) — lets admins seed/clear demo data cleanly.</summary>
|
||||
public bool IsDemo { get; set; }
|
||||
|
||||
[MaxLength(500)]
|
||||
public string? Address { get; set; } // آدرس
|
||||
|
||||
|
||||
Reference in New Issue
Block a user