feat:거래처 관리 목업 데이터를 실제 DB CRUD로 전환
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
38
app/Models/Finance/TradingPartner.php
Normal file
38
app/Models/Finance/TradingPartner.php
Normal file
@@ -0,0 +1,38 @@
|
||||
<?php
|
||||
|
||||
namespace App\Models\Finance;
|
||||
|
||||
use Illuminate\Database\Eloquent\Model;
|
||||
use Illuminate\Database\Eloquent\SoftDeletes;
|
||||
|
||||
class TradingPartner extends Model
|
||||
{
|
||||
use SoftDeletes;
|
||||
|
||||
protected $table = 'trading_partners';
|
||||
|
||||
protected $fillable = [
|
||||
'tenant_id',
|
||||
'name',
|
||||
'type',
|
||||
'category',
|
||||
'biz_no',
|
||||
'bank_account',
|
||||
'contact',
|
||||
'email',
|
||||
'manager',
|
||||
'manager_phone',
|
||||
'status',
|
||||
'memo',
|
||||
];
|
||||
|
||||
public function scopeActive($query)
|
||||
{
|
||||
return $query->where('status', 'active');
|
||||
}
|
||||
|
||||
public function scopeForTenant($query, $tenantId)
|
||||
{
|
||||
return $query->where('tenant_id', $tenantId);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user