Files
sam-manage/app/Models/Finance/Income.php
김보곤 e272f16357 feat: [database] codebridge DB connection 적용 (merge 후 재적용)
- 78개 MNG 전용 모델에 $connection = 'codebridge' 재적용
- config/database.php codebridge connection 포함
2026-03-07 11:28:47 +09:00

29 lines
577 B
PHP

<?php
namespace App\Models\Finance;
use Illuminate\Database\Eloquent\Model;
use Illuminate\Database\Eloquent\SoftDeletes;
class Income extends Model
{
use SoftDeletes;
protected $table = 'incomes';
protected $fillable = [
'tenant_id', 'date', 'customer', 'description', 'category',
'amount', 'status', 'invoice_no', 'memo',
];
protected $casts = [
'date' => 'date',
'amount' => 'integer',
];
public function scopeForTenant($query, $tenantId)
{
return $query->where('tenant_id', $tenantId);
}
}