feat: khởi tạo/huỷ domain Plesk qua job, gửi mail hoá đơn qua queue, đính kèm triển khai

- ProvisionDnsDomainJob/SuspendDnsDomainJob: tạo domain admin lên Plesk, huỷ = suspend (is_created=3)
- Khách xem zone DNS được gán ở /dich-vu/domain, quản lý bản ghi A/AAAA/CNAME/TXT/MX/SRV
- send-mail hoá đơn đẩy SendInvoiceMailJob, preview + sửa nội dung, ghi mail.order_id
- invoice_attachments.type (payment_proof/deployment)
- CacheService xoá theo SCAN pattern, Redis không persistent mặc định
- Backfill transactions.public_code

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
baodev0
2026-10-11 09:56:18 +07:00
co-authored by Claude Opus 5.5
parent 30898ea46f
commit 94614d9cb3
55 changed files with 1190 additions and 236 deletions
@@ -2,6 +2,7 @@
namespace App\Http\Controllers\Api\Admin\Invoice\Concerns;
use App\Models\InvoiceAttachment;
use Illuminate\Http\JsonResponse;
use Illuminate\Http\Request;
@@ -30,7 +31,8 @@ trait HandlesInvoiceAttachments
}
$request->validate([
'file' => 'required|file|mimes:jpg,jpeg,png,gif,pdf,doc,docx,xls,xlsx|max:10240',
'file' => 'required|file|mimes:jpg,jpeg,png,gif,webp,pdf,doc,docx,xls,xlsx|max:51200',
'type' => 'nullable|in:' . InvoiceAttachment::TYPE_PAYMENT_PROOF . ',' . InvoiceAttachment::TYPE_DEPLOYMENT,
]);
$file = $request->file('file');
@@ -39,6 +41,7 @@ trait HandlesInvoiceAttachments
$attachment = $this->attachmentRepository->create([
'invoice_id' => $id,
'type' => $request->input('type', InvoiceAttachment::TYPE_PAYMENT_PROOF),
'filename' => $file->getClientOriginalName(),
'path' => $path,
'disk' => 'public',