feat: add SeedDemoDataCommand for seeding production-like demo data for testing representations, doctors, clinics, users, appointments, and commissions

This commit is contained in:
hamed
2026-07-09 08:07:41 +03:30
parent 0750bc9812
commit 0ad8487aac
16 changed files with 3454 additions and 1155 deletions
@@ -56,7 +56,10 @@ class DomainContextResolver
return new DomainContext($rep, $city, false);
}
$rep = $this->representationRepo->findActiveByDomain($domain);
// exact ابتدا (production: host = دامنه‌ی واقعی)، سپس fallback اولین-label
// (dev: host = `<prefix>.localhost` باید نماینده‌ی `<prefix>.ir` را بیابد).
$rep = $this->representationRepo->findActiveByDomain($domain)
?? $this->representationRepo->findActiveByDomainPrefix(explode('.', $domain)[0]);
if ($rep !== null) {
return new DomainContext($rep, null, $rep->isGlobal());
}