1
0
mirror of https://github.com/invoiceninja/invoiceninja.git synced 2024-11-10 21:22:58 +01:00
invoiceninja/app/Models/TaxRate.php

44 lines
839 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) 2021. Invoice Ninja LLC (https://invoiceninja.com)
2019-05-11 05:32:07 +02:00
*
2021-06-16 08:58:16 +02:00
* @license https://www.elastic.co/licensing/elastic-license
2019-05-11 05:32:07 +02:00
*/
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',
];
2021-09-10 13:40:49 +02:00
// 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);
}
}