31 lines
666 B
PHP
31 lines
666 B
PHP
<?php
|
|
|
|
namespace App\Models\Finance;
|
|
|
|
use Illuminate\Database\Eloquent\Model;
|
|
use Illuminate\Database\Eloquent\SoftDeletes;
|
|
|
|
class ConsultingFee extends Model
|
|
{
|
|
use SoftDeletes;
|
|
|
|
protected $table = 'consulting_fees';
|
|
|
|
protected $fillable = [
|
|
'tenant_id', 'date', 'consultant', 'customer', 'service',
|
|
'hours', 'hourly_rate', 'amount', 'status', 'memo',
|
|
];
|
|
|
|
protected $casts = [
|
|
'date' => 'date',
|
|
'hours' => 'integer',
|
|
'hourly_rate' => 'integer',
|
|
'amount' => 'integer',
|
|
];
|
|
|
|
public function scopeForTenant($query, $tenantId)
|
|
{
|
|
return $query->where('tenant_id', $tenantId);
|
|
}
|
|
}
|