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

46 lines
890 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;
2022-01-03 02:14:24 +01:00
use App\Models\Filterable;
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;
2022-01-03 02:14:24 +01:00
use Filterable;
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);
}
}