28 lines
485 B
PHP
28 lines
485 B
PHP
|
|
<?php
|
||
|
|
|
||
|
|
namespace App\Models;
|
||
|
|
|
||
|
|
use Illuminate\Database\Eloquent\Model;
|
||
|
|
|
||
|
|
class InvoiceChargeGroup extends Model
|
||
|
|
{
|
||
|
|
protected $fillable = [
|
||
|
|
'invoice_id',
|
||
|
|
'group_name',
|
||
|
|
'basis_type',
|
||
|
|
'basis_value',
|
||
|
|
'rate',
|
||
|
|
'total_charge',
|
||
|
|
];
|
||
|
|
|
||
|
|
public function invoice()
|
||
|
|
{
|
||
|
|
return $this->belongsTo(Invoice::class);
|
||
|
|
}
|
||
|
|
|
||
|
|
public function items()
|
||
|
|
{
|
||
|
|
return $this->hasMany(InvoiceChargeGroupItem::class, 'group_id');
|
||
|
|
}
|
||
|
|
}
|