2015-02-06 04:52:16 +01:00
|
|
|
<?php namespace FireflyIII\Models;
|
|
|
|
|
|
|
|
use Illuminate\Database\Eloquent\Model;
|
|
|
|
|
2015-02-06 05:04:06 +01:00
|
|
|
class PiggyBank extends Model
|
|
|
|
{
|
2015-02-06 04:52:16 +01:00
|
|
|
|
2015-02-06 05:14:27 +01:00
|
|
|
public function account()
|
|
|
|
{
|
|
|
|
return $this->belongsTo('Account');
|
|
|
|
}
|
2015-02-06 04:52:16 +01:00
|
|
|
|
2015-02-06 05:14:27 +01:00
|
|
|
public function piggyBankEvents()
|
|
|
|
{
|
|
|
|
return $this->hasMany('PiggyBankEvent');
|
|
|
|
}
|
|
|
|
|
|
|
|
public function piggyBankRepetitions()
|
|
|
|
{
|
|
|
|
return $this->hasMany('PiggyBankRepetition');
|
|
|
|
}
|
|
|
|
|
|
|
|
public function reminders()
|
|
|
|
{
|
|
|
|
return $this->morphMany('Reminder', 'remindersable');
|
|
|
|
}
|
2015-02-06 04:52:16 +01:00
|
|
|
}
|