firefly-iii/app/Models/TransactionCurrency.php
2016-01-01 21:49:27 +01:00

43 lines
1.2 KiB
PHP

<?php namespace FireflyIII\Models;
use Carbon\Carbon;
use Illuminate\Database\Eloquent\Collection;
use Illuminate\Database\Eloquent\Model;
use Illuminate\Database\Eloquent\SoftDeletes;
/**
* FireflyIII\Models\TransactionCurrency
*
* @property integer $id
* @property Carbon $created_at
* @property Carbon $updated_at
* @property Carbon $deleted_at
* @property string $code
* @property string $name
* @property string $symbol
* @property-read Collection|TransactionJournal[] $transactionJournals
*/
class TransactionCurrency extends Model
{
use SoftDeletes;
protected $fillable = ['name', 'code', 'symbol'];
/**
* @return array
*/
public function getDates()
{
return ['created_at', 'updated_at', 'deleted_at'];
}
/**
* @return \Illuminate\Database\Eloquent\Relations\HasMany
*/
public function transactionJournals()
{
return $this->hasMany('FireflyIII\Models\TransactionJournal');
}
}