- API 사용 테이블 22개(23개 모델) 제외하고 55개 모델만 $connection = 'codebridge' 적용 - config/database.php에 codebridge connection 재추가 - 제외 대상: Barobill 12개, ESign 4개, Audit 2개, DevTools 1개, System 2개, HR 1개
38 lines
747 B
PHP
38 lines
747 B
PHP
<?php
|
|
|
|
namespace App\Models\Finance;
|
|
|
|
use Illuminate\Database\Eloquent\Model;
|
|
use Illuminate\Database\Eloquent\SoftDeletes;
|
|
|
|
class DailyFundTransaction extends Model
|
|
{
|
|
use SoftDeletes;
|
|
|
|
protected $connection = 'codebridge';
|
|
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);
|
|
}
|
|
}
|