1
0
mirror of https://github.com/invoiceninja/invoiceninja.git synced 2024-11-14 07:02:34 +01:00
invoiceninja/app/Models/ExpenseCategory.php

78 lines
3.0 KiB
PHP
Raw Normal View History

<?php
/**
* Invoice Ninja (https://invoiceninja.com).
*
* @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)
*
2021-06-16 08:58:16 +02:00
* @license https://www.elastic.co/licensing/elastic-license
*/
namespace App\Models;
2020-10-28 11:10:49 +01:00
use Illuminate\Database\Eloquent\Relations\BelongsTo;
use Illuminate\Database\Eloquent\SoftDeletes;
2023-03-08 08:33:42 +01:00
/**
* 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',
2021-01-05 05:41:43 +01:00
'color',
];
public function getEntityType()
{
return self::class;
}
/**
2020-10-28 11:10:49 +01:00
* @return BelongsTo
*/
public function expense()
{
2020-10-28 11:10:49 +01:00
return $this->belongsTo(Expense::class);
}
}