12-05-2026 Frontend dev
This commit is contained in:
parent
405df0a122
commit
5b8bdf4182
779 changed files with 480564 additions and 6241 deletions
55
app/Models/LegacyInvoice.php
Normal file
55
app/Models/LegacyInvoice.php
Normal file
|
|
@ -0,0 +1,55 @@
|
|||
<?php
|
||||
|
||||
namespace App\Models;
|
||||
|
||||
use App\Enums\Portal;
|
||||
use Illuminate\Database\Eloquent\Model;
|
||||
use Illuminate\Database\Eloquent\Relations\BelongsTo;
|
||||
|
||||
class LegacyInvoice extends Model
|
||||
{
|
||||
public $timestamps = false;
|
||||
|
||||
protected $fillable = [
|
||||
'legacy_portal',
|
||||
'legacy_id',
|
||||
'user_id',
|
||||
'legacy_user_id',
|
||||
'number',
|
||||
'amount_cents',
|
||||
'tax_cents',
|
||||
'total_cents',
|
||||
'status',
|
||||
'invoice_date',
|
||||
'due_date',
|
||||
'paid_at',
|
||||
'payment_method',
|
||||
'pdf_path',
|
||||
'raw_snapshot',
|
||||
'pdf_payload',
|
||||
'pdf_generated_at',
|
||||
'imported_at',
|
||||
];
|
||||
|
||||
protected function casts(): array
|
||||
{
|
||||
return [
|
||||
'legacy_portal' => Portal::class,
|
||||
'amount_cents' => 'integer',
|
||||
'tax_cents' => 'integer',
|
||||
'total_cents' => 'integer',
|
||||
'invoice_date' => 'date',
|
||||
'due_date' => 'date',
|
||||
'paid_at' => 'datetime',
|
||||
'raw_snapshot' => 'array',
|
||||
'pdf_payload' => 'array',
|
||||
'pdf_generated_at' => 'datetime',
|
||||
'imported_at' => 'datetime',
|
||||
];
|
||||
}
|
||||
|
||||
public function user(): BelongsTo
|
||||
{
|
||||
return $this->belongsTo(User::class);
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue