25 lines
533 B
PHP
25 lines
533 B
PHP
<?php
|
|
|
|
namespace App\Models\Finance;
|
|
|
|
use Illuminate\Database\Eloquent\Model;
|
|
use Illuminate\Database\Eloquent\SoftDeletes;
|
|
|
|
class Customer extends Model
|
|
{
|
|
use SoftDeletes;
|
|
|
|
protected $table = 'customers';
|
|
|
|
protected $fillable = [
|
|
'tenant_id', 'name', 'biz_no', 'ceo', 'industry', 'grade',
|
|
'contact', 'email', 'address', 'manager', 'manager_phone',
|
|
'status', 'memo',
|
|
];
|
|
|
|
public function scopeForTenant($query, $tenantId)
|
|
{
|
|
return $query->where('tenant_id', $tenantId);
|
|
}
|
|
}
|