2015-02-05 21:52:16 -06:00
|
|
|
<?php namespace FireflyIII\Models;
|
|
|
|
|
|
|
|
use Illuminate\Database\Eloquent\Model;
|
|
|
|
|
2015-02-11 00:35:10 -06:00
|
|
|
/**
|
|
|
|
* Class PiggyBankEvent
|
|
|
|
*
|
|
|
|
* @package FireflyIII\Models
|
|
|
|
*/
|
2015-02-05 22:04:06 -06:00
|
|
|
class PiggyBankEvent extends Model
|
|
|
|
{
|
2015-02-05 21:52:16 -06:00
|
|
|
|
2015-02-11 00:35:10 -06:00
|
|
|
/**
|
|
|
|
* @return array
|
|
|
|
*/
|
2015-02-07 06:15:40 -06:00
|
|
|
public function getDates()
|
|
|
|
{
|
|
|
|
return ['created_at', 'updated_at', 'date'];
|
|
|
|
}
|
|
|
|
|
2015-02-11 00:35:10 -06:00
|
|
|
/**
|
|
|
|
* @return \Illuminate\Database\Eloquent\Relations\BelongsTo
|
|
|
|
*/
|
2015-02-05 22:14:27 -06:00
|
|
|
public function piggyBank()
|
|
|
|
{
|
2015-02-05 22:35:00 -06:00
|
|
|
return $this->belongsTo('FireflyIII\Models\PiggyBank');
|
2015-02-05 22:14:27 -06:00
|
|
|
}
|
|
|
|
|
2015-02-11 00:35:10 -06:00
|
|
|
/**
|
|
|
|
* @return \Illuminate\Database\Eloquent\Relations\BelongsTo
|
|
|
|
*/
|
2015-02-05 22:14:27 -06:00
|
|
|
public function transactionJournal()
|
|
|
|
{
|
2015-02-05 22:35:00 -06:00
|
|
|
return $this->belongsTo('FireflyIII\Models\TransactionJournal');
|
2015-02-05 22:14:27 -06:00
|
|
|
}
|
2015-02-05 21:52:16 -06:00
|
|
|
|
|
|
|
}
|