42 lines
1.1 KiB
PHP
42 lines
1.1 KiB
PHP
|
|
<?php
|
||
|
|
|
||
|
|
namespace App\Models\Barobill;
|
||
|
|
|
||
|
|
use Illuminate\Database\Eloquent\Model;
|
||
|
|
use Illuminate\Database\Eloquent\Relations\BelongsTo;
|
||
|
|
|
||
|
|
class BarobillCardTransactionAmountLog extends Model
|
||
|
|
{
|
||
|
|
protected $table = 'barobill_card_transaction_amount_logs';
|
||
|
|
|
||
|
|
public $timestamps = false;
|
||
|
|
|
||
|
|
protected $fillable = [
|
||
|
|
'card_transaction_id',
|
||
|
|
'original_unique_key',
|
||
|
|
'before_supply_amount',
|
||
|
|
'before_tax',
|
||
|
|
'after_supply_amount',
|
||
|
|
'after_tax',
|
||
|
|
'modified_by',
|
||
|
|
'modified_by_name',
|
||
|
|
'ip_address',
|
||
|
|
];
|
||
|
|
|
||
|
|
protected $casts = [
|
||
|
|
'before_supply_amount' => 'decimal:2',
|
||
|
|
'before_tax' => 'decimal:2',
|
||
|
|
'after_supply_amount' => 'decimal:2',
|
||
|
|
'after_tax' => 'decimal:2',
|
||
|
|
];
|
||
|
|
|
||
|
|
// =========================================================================
|
||
|
|
// 관계 정의
|
||
|
|
// =========================================================================
|
||
|
|
|
||
|
|
public function cardTransaction(): BelongsTo
|
||
|
|
{
|
||
|
|
return $this->belongsTo(BarobillCardTransaction::class, 'card_transaction_id');
|
||
|
|
}
|
||
|
|
}
|