feat:법인카드 거래내역 모델 및 컨트롤러 추가

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
김보곤
2026-02-05 07:44:10 +09:00
parent 96d41500b4
commit 6f3ebee084
2 changed files with 205 additions and 0 deletions

View File

@@ -0,0 +1,36 @@
<?php
namespace App\Models\Finance;
use Illuminate\Database\Eloquent\Model;
use Illuminate\Database\Eloquent\SoftDeletes;
class CardTransaction extends Model
{
use SoftDeletes;
protected $table = 'card_transactions';
protected $fillable = [
'tenant_id',
'card_id',
'transaction_date',
'time',
'merchant',
'category',
'amount',
'approval_no',
'status',
'memo',
];
protected $casts = [
'transaction_date' => 'date',
'amount' => 'integer',
];
public function scopeForTenant($query, $tenantId)
{
return $query->where('tenant_id', $tenantId);
}
}