WuYongJie 9595267ee7
Some checks failed
Tests / PHP 8.1 (push) Has been cancelled
Tests / PHP 8.2 (push) Has been cancelled
Tests / PHP 8.3 (push) Has been cancelled
chore: 导入 Akaunting 初始源码与团队协作规则
2026-07-20 18:20:25 +08:00

31 lines
667 B
PHP

<?php
namespace App\Models\Common;
use App\Abstracts\Model;
use Bkwld\Cloner\Cloneable;
class ItemTax extends Model
{
use Cloneable;
protected $table = 'item_taxes';
/**
* Attributes that should be mass-assignable.
*
* @var array
*/
protected $fillable = ['company_id', 'item_id', 'tax_id', 'created_from', 'created_by'];
public function item()
{
return $this->belongsTo('App\Models\Common\Item')->withDefault(['name' => trans('general.na')]);
}
public function tax()
{
return $this->belongsTo('App\Models\Setting\Tax')->withDefault(['name' => trans('general.na'), 'rate' => 0]);
}
}