All kinds of new stuff: finished most of the importing routines, extended the database (single table inheritance) and expanded some other stuff.

This commit is contained in:
James Cole
2014-07-05 19:44:26 +02:00
parent a0c0dc288d
commit 188105492c
26 changed files with 430 additions and 587 deletions

View File

@@ -1,8 +1,12 @@
<?php
class Component extends Elegant
class Component extends Firefly\Database\SingleTableInheritanceEntity
{
protected $table = 'components';
protected $subclassField = 'class';
public static $rules
= [
'user_id' => 'exists:users,id|required',
@@ -11,15 +15,14 @@ class Component extends Elegant
];
public function componentType()
{
return $this->belongsTo('ComponentType');
}
public function transactions()
{
return $this->belongsToMany('Transaction');
}
public function transactionjournals()
{
return $this->belongsToMany('TransactionJournal');
}
public function user()
{