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