2026-02-05 07:43:57 +09:00
|
|
|
<?php
|
|
|
|
|
|
|
|
|
|
namespace App\Models\Finance;
|
|
|
|
|
|
|
|
|
|
use Illuminate\Database\Eloquent\Model;
|
|
|
|
|
use Illuminate\Database\Eloquent\SoftDeletes;
|
|
|
|
|
|
|
|
|
|
class DailyFundTransaction extends Model
|
|
|
|
|
{
|
|
|
|
|
use SoftDeletes;
|
|
|
|
|
|
2026-03-09 20:02:04 +09:00
|
|
|
protected $connection = 'codebridge';
|
2026-02-05 07:43:57 +09:00
|
|
|
protected $table = 'daily_fund_transactions';
|
|
|
|
|
|
|
|
|
|
protected $fillable = [
|
|
|
|
|
'tenant_id',
|
|
|
|
|
'transaction_date',
|
|
|
|
|
'type',
|
|
|
|
|
'time',
|
|
|
|
|
'account_id',
|
|
|
|
|
'account_name',
|
|
|
|
|
'description',
|
|
|
|
|
'amount',
|
|
|
|
|
'category',
|
|
|
|
|
'note',
|
|
|
|
|
];
|
|
|
|
|
|
|
|
|
|
protected $casts = [
|
|
|
|
|
'transaction_date' => 'date',
|
|
|
|
|
'amount' => 'integer',
|
|
|
|
|
];
|
|
|
|
|
|
|
|
|
|
public function scopeForTenant($query, $tenantId)
|
|
|
|
|
{
|
|
|
|
|
return $query->where('tenant_id', $tenantId);
|
|
|
|
|
}
|
|
|
|
|
}
|