feat:법인카드 거래내역 모델 및 컨트롤러 추가
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
36
app/Models/Finance/CardTransaction.php
Normal file
36
app/Models/Finance/CardTransaction.php
Normal 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);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user