Some checks failed
Tests / PHP 8.1 (push) Has been cancelled
Tests / PHP 8.2 (push) Has been cancelled
Tests / PHP 8.3 (push) Has been cancelled
41 lines
855 B
PHP
41 lines
855 B
PHP
<?php
|
|
|
|
namespace Modules\EcommerceFinance\Models;
|
|
|
|
use App\Abstracts\Model;
|
|
use Illuminate\Database\Eloquent\Relations\BelongsTo;
|
|
use Illuminate\Database\Eloquent\Relations\HasMany;
|
|
|
|
class SettlementLine extends Model
|
|
{
|
|
protected $table = 'ec_settlement_lines';
|
|
|
|
protected $fillable = [
|
|
'company_id',
|
|
'settlement_id',
|
|
'line_type',
|
|
'external_line_id',
|
|
'external_order_id',
|
|
'amount',
|
|
'occurred_at',
|
|
'payload',
|
|
'created_by',
|
|
'created_from',
|
|
];
|
|
|
|
protected $casts = [
|
|
'occurred_at' => 'datetime',
|
|
'payload' => 'array',
|
|
];
|
|
|
|
public function settlement(): BelongsTo
|
|
{
|
|
return $this->belongsTo(Settlement::class);
|
|
}
|
|
|
|
public function matches(): HasMany
|
|
{
|
|
return $this->hasMany(ReconciliationMatch::class);
|
|
}
|
|
}
|