2020-01-20 12:31:58 +11:00
|
|
|
<?php
|
|
|
|
|
/**
|
2020-09-06 19:38:10 +10:00
|
|
|
* Invoice Ninja (https://invoiceninja.com).
|
2020-01-20 12:31:58 +11:00
|
|
|
*
|
|
|
|
|
* @link https://github.com/invoiceninja/invoiceninja source repository
|
|
|
|
|
*
|
2021-01-04 08:54:54 +11:00
|
|
|
* @copyright Copyright (c) 2021. Invoice Ninja LLC (https://invoiceninja.com)
|
2020-01-20 12:31:58 +11:00
|
|
|
*
|
2021-06-16 16:58:16 +10:00
|
|
|
* @license https://www.elastic.co/licensing/elastic-license
|
2020-01-20 12:31:58 +11:00
|
|
|
*/
|
|
|
|
|
|
|
|
|
|
namespace App\Models;
|
|
|
|
|
|
2020-10-28 21:10:49 +11:00
|
|
|
use Illuminate\Database\Eloquent\Relations\BelongsTo;
|
2020-01-20 12:31:58 +11:00
|
|
|
use Illuminate\Database\Eloquent\SoftDeletes;
|
|
|
|
|
|
|
|
|
|
class ExpenseCategory extends BaseModel
|
|
|
|
|
{
|
|
|
|
|
use SoftDeletes;
|
|
|
|
|
|
|
|
|
|
protected $fillable = [
|
|
|
|
|
'name',
|
2021-01-05 15:41:43 +11:00
|
|
|
'color',
|
2020-01-20 12:31:58 +11:00
|
|
|
];
|
|
|
|
|
|
2020-05-06 21:49:42 +10:00
|
|
|
public function getEntityType()
|
|
|
|
|
{
|
2020-09-06 19:38:10 +10:00
|
|
|
return self::class;
|
2020-05-06 21:49:42 +10:00
|
|
|
}
|
|
|
|
|
|
2020-01-20 12:31:58 +11:00
|
|
|
/**
|
2020-10-28 21:10:49 +11:00
|
|
|
* @return BelongsTo
|
2020-01-20 12:31:58 +11:00
|
|
|
*/
|
|
|
|
|
public function expense()
|
|
|
|
|
{
|
2020-10-28 21:10:49 +11:00
|
|
|
return $this->belongsTo(Expense::class);
|
2020-01-20 12:31:58 +11:00
|
|
|
}
|
|
|
|
|
}
|