1
0
mirror of https://github.com/invoiceninja/invoiceninja.git synced 2024-11-14 15:13:29 +01:00
invoiceninja/app/Models/TaxRate.php

44 lines
823 B
PHP
Raw Normal View History

<?php
2019-05-11 05:32:07 +02:00
/**
* Invoice Ninja (https://invoiceninja.com).
2019-05-11 05:32:07 +02:00
*
* @link https://github.com/invoiceninja/invoiceninja source repository
*
* @copyright Copyright (c) 2020. Invoice Ninja LLC (https://invoiceninja.com)
2019-05-11 05:32:07 +02:00
*
* @license https://opensource.org/licenses/AAL
*/
namespace App\Models;
use App\Utils\Traits\MakesHash;
2020-02-26 07:46:27 +01:00
use Illuminate\Database\Eloquent\SoftDeletes;
class TaxRate extends BaseModel
{
use MakesHash;
2020-02-26 07:46:27 +01:00
use SoftDeletes;
protected $fillable = [
'name',
'rate',
];
protected $appends = ['tax_rate_id'];
public function getEntityType()
{
return self::class;
}
public function getRouteKeyName()
{
return 'tax_rate_id';
}
public function getTaxRateIdAttribute()
{
return $this->encodePrimaryKey($this->id);
}
}