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

81 lines
2.8 KiB
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
*
2023-01-28 23:21:40 +01:00
* @copyright Copyright (c) 2023. 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;
2023-03-08 08:33:42 +01:00
/**
* App\Models\TaxRate
*
* @property int $id
* @property int $company_id
* @property int|null $user_id
* @property int|null $created_at
* @property int|null $updated_at
* @property int|null $deleted_at
* @property string $name
2023-04-29 01:32:20 +02:00
* @property float $rate
* @property bool $is_deleted
2023-03-08 08:33:42 +01:00
* @property-read mixed $hashed_id
* @property-read mixed $tax_rate_id
* @method static \Illuminate\Database\Eloquent\Builder|BaseModel company()
* @method static \Illuminate\Database\Eloquent\Builder|BaseModel exclude($columns)
* @method static \Database\Factories\TaxRateFactory factory($count = null, $state = [])
* @method static \Illuminate\Database\Eloquent\Builder|TaxRate filter(\App\Filters\QueryFilters $filters)
* @method static \Illuminate\Database\Eloquent\Builder|TaxRate newModelQuery()
* @method static \Illuminate\Database\Eloquent\Builder|TaxRate newQuery()
* @method static \Illuminate\Database\Eloquent\Builder|TaxRate onlyTrashed()
* @method static \Illuminate\Database\Eloquent\Builder|TaxRate query()
* @method static \Illuminate\Database\Eloquent\Builder|BaseModel scope()
* @method static \Illuminate\Database\Eloquent\Builder|TaxRate whereCompanyId($value)
* @method static \Illuminate\Database\Eloquent\Builder|TaxRate whereCreatedAt($value)
* @method static \Illuminate\Database\Eloquent\Builder|TaxRate whereDeletedAt($value)
* @method static \Illuminate\Database\Eloquent\Builder|TaxRate whereId($value)
* @method static \Illuminate\Database\Eloquent\Builder|TaxRate whereIsDeleted($value)
* @method static \Illuminate\Database\Eloquent\Builder|TaxRate whereName($value)
* @method static \Illuminate\Database\Eloquent\Builder|TaxRate whereRate($value)
* @method static \Illuminate\Database\Eloquent\Builder|TaxRate whereUpdatedAt($value)
* @method static \Illuminate\Database\Eloquent\Builder|TaxRate whereUserId($value)
* @method static \Illuminate\Database\Eloquent\Builder|TaxRate withTrashed()
* @method static \Illuminate\Database\Eloquent\Builder|TaxRate withoutTrashed()
* @mixin \Eloquent
*/
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);
}
}