firefly-iii/app/Models/Bill.php
2015-02-27 16:48:33 +01:00

41 lines
814 B
PHP

<?php namespace FireflyIII\Models;
use Illuminate\Database\Eloquent\Model;
/**
* Class Bill
*
* @package FireflyIII\Models
*/
class Bill extends Model
{
protected $fillable = ['name', 'match', 'amount_min','user_id', 'amount_max', 'date', 'repeat_freq', 'skip', 'automatch', 'active',];
/**
* @return array
*/
public function getDates()
{
return ['created_at', 'updated_at', 'date'];
}
/**
* @return \Illuminate\Database\Eloquent\Relations\HasMany
*/
public function transactionjournals()
{
return $this->hasMany('FireflyIII\Models\TransactionJournal');
}
/**
* @return \Illuminate\Database\Eloquent\Relations\BelongsTo
*/
public function user()
{
return $this->belongsTo('FireflyIII\User');
}
}