mirror of
https://github.com/firefly-iii/firefly-iii.git
synced 2024-11-27 11:20:39 -06:00
55 lines
1.2 KiB
PHP
55 lines
1.2 KiB
PHP
<?php namespace FireflyIII\Models;
|
|
|
|
use Illuminate\Database\Eloquent\Model;
|
|
use Illuminate\Database\Eloquent\SoftDeletes;
|
|
|
|
/**
|
|
* Class PiggyBank
|
|
*
|
|
* @package FireflyIII\Models
|
|
*/
|
|
class PiggyBank extends Model
|
|
{
|
|
use SoftDeletes;
|
|
|
|
/**
|
|
* @return \Illuminate\Database\Eloquent\Relations\BelongsTo
|
|
*/
|
|
public function account()
|
|
{
|
|
return $this->belongsTo('FireflyIII\Models\Account');
|
|
}
|
|
|
|
/**
|
|
* @return array
|
|
*/
|
|
public function getDates()
|
|
{
|
|
return ['created_at', 'updated_at', 'deleted_at', 'startdate', 'targetdate'];
|
|
}
|
|
|
|
/**
|
|
* @return \Illuminate\Database\Eloquent\Relations\HasMany
|
|
*/
|
|
public function piggyBankEvents()
|
|
{
|
|
return $this->hasMany('FireflyIII\Models\PiggyBankEvent');
|
|
}
|
|
|
|
/**
|
|
* @return \Illuminate\Database\Eloquent\Relations\HasMany
|
|
*/
|
|
public function piggyBankRepetitions()
|
|
{
|
|
return $this->hasMany('FireflyIII\Models\PiggyBankRepetition');
|
|
}
|
|
|
|
/**
|
|
* @return \Illuminate\Database\Eloquent\Relations\MorphMany
|
|
*/
|
|
public function reminders()
|
|
{
|
|
return $this->morphMany('FireflyIII\Models\Reminder', 'remindersable');
|
|
}
|
|
}
|