feat(domain): chỉnh ngày bắt đầu/hết hạn tên miền và điền hạn từ dữ liệu cũ

PUT administrator/domains/{id}/term, LegacyDomainTerms và migration backfill hạn cho dịch vụ domain chưa có expires_at.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
This commit is contained in:
baodev0
2026-10-28 17:26:41 +07:00
co-authored by Claude Sonnet 5.5
parent e37106f2dc
commit 7136bec265
6 changed files with 171 additions and 2 deletions
@@ -0,0 +1,21 @@
<?php
use App\Models\Service;
use App\Support\LegacyDomainTerms;
use Illuminate\Database\Migrations\Migration;
return new class extends Migration
{
public function up(): void
{
Service::query()
->where('type', 'domain')
->whereNull('expires_at')
->each(function (Service $service): void {
LegacyDomainTerms::fill($service);
$service->save();
});
}
public function down(): void {}
};