44 lines
877 B
PHP
44 lines
877 B
PHP
<?php
|
|
|
|
namespace App\Domains\Purchase\Models;
|
|
|
|
use Illuminate\Database\Eloquent\Attributes\Fillable;
|
|
use Illuminate\Database\Eloquent\Factories\HasFactory;
|
|
use Illuminate\Database\Eloquent\Model;
|
|
use Illuminate\Database\Eloquent\Relations\BelongsTo;
|
|
|
|
#[Fillable([
|
|
'compra_id',
|
|
'cuit_buyer',
|
|
'cvu_buyer',
|
|
'amount',
|
|
'concept',
|
|
'operation',
|
|
'operation_id',
|
|
'transaction_id',
|
|
'qr_order_id',
|
|
'link_id',
|
|
])]
|
|
class TelepagosPayment extends Model
|
|
{
|
|
use HasFactory;
|
|
|
|
protected $table = 'telepagos_payments';
|
|
|
|
protected function casts(): array
|
|
{
|
|
return [
|
|
'compra_id' => 'integer',
|
|
'amount' => 'decimal:2',
|
|
];
|
|
}
|
|
|
|
/**
|
|
* @return BelongsTo<Purchase, $this>
|
|
*/
|
|
public function compra(): BelongsTo
|
|
{
|
|
return $this->belongsTo(Purchase::class, 'compra_id');
|
|
}
|
|
}
|