Files
portal-api/app/Models/InvoiceAttachment.php
T
baodev0andClaude Opus 5.5 94614d9cb3 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>
2026-10-11 09:56:18 +07:00

29 lines
581 B
PHP

<?php
namespace App\Models;
use Illuminate\Database\Eloquent\Model;
use Illuminate\Support\Facades\Storage;
class InvoiceAttachment extends Model
{
public const TYPE_PAYMENT_PROOF = 'payment_proof';
public const TYPE_DEPLOYMENT = 'deployment';
protected $table = 'invoice_attachments';
protected $guarded = [];
protected $appends = ['url'];
public function invoice()
{
return $this->belongsTo(Invoice::class);
}
public function getUrlAttribute(): string
{
return Storage::disk($this->disk)->url($this->path);
}
}