2014-06-29 15:12:33 -05:00
|
|
|
<?php
|
2014-09-04 01:31:45 -05:00
|
|
|
use Illuminate\Database\Eloquent\Model as Eloquent;
|
2014-12-06 05:12:55 -06:00
|
|
|
use Illuminate\Database\Eloquent\SoftDeletingTrait;
|
|
|
|
use Watson\Validating\ValidatingTrait;
|
2014-12-24 05:32:18 -06:00
|
|
|
|
2014-12-13 14:59:02 -06:00
|
|
|
/**
|
|
|
|
* Class TransactionCurrency
|
|
|
|
*/
|
2014-07-09 06:35:33 -05:00
|
|
|
class TransactionCurrency extends Eloquent
|
|
|
|
{
|
2014-06-29 15:12:33 -05:00
|
|
|
|
2014-12-06 05:12:55 -06:00
|
|
|
use SoftDeletingTrait, ValidatingTrait;
|
|
|
|
|
2014-12-24 05:32:18 -06:00
|
|
|
protected $fillable = ['name', 'symbol', 'code'];
|
2014-12-24 07:02:21 -06:00
|
|
|
protected $rules = [
|
|
|
|
'code' => 'required|alpha|between:3,3|min:3|max:3',
|
|
|
|
'name' => 'required|between:3,48|min:3|max:48',
|
|
|
|
'symbol' => 'required|between:1,8|min:1|max:8',
|
2014-12-24 05:32:18 -06:00
|
|
|
];
|
|
|
|
|
2014-08-10 11:22:42 -05:00
|
|
|
/**
|
|
|
|
* @return \Illuminate\Database\Eloquent\Relations\HasMany
|
|
|
|
*/
|
2014-11-21 04:11:52 -06:00
|
|
|
public function transactionJournals()
|
2014-07-09 06:35:33 -05:00
|
|
|
{
|
2014-06-29 15:12:33 -05:00
|
|
|
return $this->hasMany('TransactionJournal');
|
|
|
|
}
|
|
|
|
|
2015-01-01 23:16:49 -06:00
|
|
|
}
|