1
0
mirror of https://github.com/invoiceninja/invoiceninja.git synced 2024-09-20 16:31:33 +02:00
invoiceninja/app/Models/ExpenseCategory.php
2023-03-08 18:33:42 +11:00

78 lines
3.0 KiB
PHP

<?php
/**
* Invoice Ninja (https://invoiceninja.com).
*
* @link https://github.com/invoiceninja/invoiceninja source repository
*
* @copyright Copyright (c) 2023. Invoice Ninja LLC (https://invoiceninja.com)
*
* @license https://www.elastic.co/licensing/elastic-license
*/
namespace App\Models;
use Illuminate\Database\Eloquent\Relations\BelongsTo;
use Illuminate\Database\Eloquent\SoftDeletes;
/**
* App\Models\ExpenseCategory
*
* @property int $id
* @property int $user_id
* @property int $company_id
* @property string|null $name
* @property int|null $created_at
* @property int|null $updated_at
* @property int|null $deleted_at
* @property int $is_deleted
* @property string $color
* @property int|null $bank_category_id
* @property-read \App\Models\Expense|null $expense
* @property-read mixed $hashed_id
* @method static \Illuminate\Database\Eloquent\Builder|BaseModel company()
* @method static \Illuminate\Database\Eloquent\Builder|BaseModel exclude($columns)
* @method static \Database\Factories\ExpenseCategoryFactory factory($count = null, $state = [])
* @method static \Illuminate\Database\Eloquent\Builder|ExpenseCategory filter(\App\Filters\QueryFilters $filters)
* @method static \Illuminate\Database\Eloquent\Builder|ExpenseCategory newModelQuery()
* @method static \Illuminate\Database\Eloquent\Builder|ExpenseCategory newQuery()
* @method static \Illuminate\Database\Eloquent\Builder|ExpenseCategory onlyTrashed()
* @method static \Illuminate\Database\Eloquent\Builder|ExpenseCategory query()
* @method static \Illuminate\Database\Eloquent\Builder|BaseModel scope()
* @method static \Illuminate\Database\Eloquent\Builder|ExpenseCategory whereBankCategoryId($value)
* @method static \Illuminate\Database\Eloquent\Builder|ExpenseCategory whereColor($value)
* @method static \Illuminate\Database\Eloquent\Builder|ExpenseCategory whereCompanyId($value)
* @method static \Illuminate\Database\Eloquent\Builder|ExpenseCategory whereCreatedAt($value)
* @method static \Illuminate\Database\Eloquent\Builder|ExpenseCategory whereDeletedAt($value)
* @method static \Illuminate\Database\Eloquent\Builder|ExpenseCategory whereId($value)
* @method static \Illuminate\Database\Eloquent\Builder|ExpenseCategory whereIsDeleted($value)
* @method static \Illuminate\Database\Eloquent\Builder|ExpenseCategory whereName($value)
* @method static \Illuminate\Database\Eloquent\Builder|ExpenseCategory whereUpdatedAt($value)
* @method static \Illuminate\Database\Eloquent\Builder|ExpenseCategory whereUserId($value)
* @method static \Illuminate\Database\Eloquent\Builder|ExpenseCategory withTrashed()
* @method static \Illuminate\Database\Eloquent\Builder|ExpenseCategory withoutTrashed()
* @mixin \Eloquent
*/
class ExpenseCategory extends BaseModel
{
use SoftDeletes;
use Filterable;
protected $fillable = [
'name',
'color',
];
public function getEntityType()
{
return self::class;
}
/**
* @return BelongsTo
*/
public function expense()
{
return $this->belongsTo(Expense::class);
}
}