mirror of
https://github.com/firefly-iii/firefly-iii.git
synced 2026-01-07 06:31:22 +00:00
Updated models and tests to match.
This commit is contained in:
@@ -42,7 +42,7 @@ class Account extends Model
|
||||
|
||||
public function getDates()
|
||||
{
|
||||
return ['created_at', 'updated_at'];
|
||||
return ['created_at', 'updated_at','deleted_at'];
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -20,5 +20,9 @@ class AccountMeta extends Model
|
||||
{
|
||||
$this->attributes['data'] = json_encode($value);
|
||||
}
|
||||
public function getDates()
|
||||
{
|
||||
return ['created_at', 'updated_at'];
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -10,4 +10,8 @@ class AccountType extends Model
|
||||
{
|
||||
return $this->hasMany('FireflyIII\Models\Account');
|
||||
}
|
||||
public function getDates()
|
||||
{
|
||||
return ['created_at', 'updated_at'];
|
||||
}
|
||||
}
|
||||
|
||||
@@ -14,6 +14,10 @@ class Bill extends Model
|
||||
{
|
||||
return $this->belongsTo('FireflyIII\User');
|
||||
}
|
||||
public function getDates()
|
||||
{
|
||||
return ['created_at', 'updated_at','date'];
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
@@ -25,6 +25,10 @@ class Budget extends Model
|
||||
{
|
||||
return $this->belongsTo('FireflyIII\User');
|
||||
}
|
||||
public function getDates()
|
||||
{
|
||||
return ['created_at', 'updated_at','deleted_at'];
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
@@ -14,5 +14,9 @@ class BudgetLimit extends Model
|
||||
{
|
||||
return $this->hasMany('FireflyIII\Models\LimitRepetition');
|
||||
}
|
||||
public function getDates()
|
||||
{
|
||||
return ['created_at', 'updated_at','startdate'];
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -14,5 +14,9 @@ class Category extends Model
|
||||
{
|
||||
return $this->belongsTo('FireflyIII\User');
|
||||
}
|
||||
public function getDates()
|
||||
{
|
||||
return ['created_at', 'updated_at','deleted_at'];
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -5,6 +5,8 @@ use Illuminate\Database\Eloquent\Model;
|
||||
class Component extends Model
|
||||
{
|
||||
|
||||
//
|
||||
|
||||
public function getDates()
|
||||
{
|
||||
return ['created_at', 'updated_at','deleted_at'];
|
||||
}
|
||||
}
|
||||
|
||||
@@ -9,5 +9,9 @@ class LimitRepetition extends Model
|
||||
{
|
||||
return $this->belongsTo('FireflyIII\Models\BudgetLimit');
|
||||
}
|
||||
public function getDates()
|
||||
{
|
||||
return ['created_at', 'updated_at','startdate','enddate'];
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -24,4 +24,8 @@ class PiggyBank extends Model
|
||||
{
|
||||
return $this->morphMany('FireflyIII\Models\Reminder', 'remindersable');
|
||||
}
|
||||
public function getDates()
|
||||
{
|
||||
return ['created_at', 'updated_at','deleted_at','startdate','targetdate'];
|
||||
}
|
||||
}
|
||||
|
||||
@@ -14,5 +14,9 @@ class PiggyBankEvent extends Model
|
||||
{
|
||||
return $this->belongsTo('FireflyIII\Models\TransactionJournal');
|
||||
}
|
||||
public function getDates()
|
||||
{
|
||||
return ['created_at', 'updated_at','date'];
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -9,5 +9,9 @@ class PiggyBankRepetition extends Model
|
||||
{
|
||||
return $this->belongsTo('FireflyIII\Models\PiggyBank');
|
||||
}
|
||||
public function getDates()
|
||||
{
|
||||
return ['created_at', 'updated_at','startdate','targetdate'];
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -19,5 +19,9 @@ class Preference extends Model
|
||||
{
|
||||
return $this->belongsTo('FireflyIII\User');
|
||||
}
|
||||
public function getDates()
|
||||
{
|
||||
return ['created_at', 'updated_at'];
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -14,6 +14,9 @@ class Reminder extends Model
|
||||
{
|
||||
return $this->belongsTo('FireflyIII\User');
|
||||
}
|
||||
|
||||
public function getDates()
|
||||
{
|
||||
return ['created_at', 'updated_at','startdate','enddate'];
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -14,5 +14,8 @@ class Transaction extends Model
|
||||
{
|
||||
return $this->belongsTo('FireflyIII\Models\TransactionJournal');
|
||||
}
|
||||
|
||||
public function getDates()
|
||||
{
|
||||
return ['created_at', 'updated_at','deleted_at'];
|
||||
}
|
||||
}
|
||||
|
||||
@@ -9,5 +9,8 @@ class TransactionCurrency extends Model
|
||||
{
|
||||
return $this->hasMany('FireflyIII\Models\TransactionJournal');
|
||||
}
|
||||
|
||||
public function getDates()
|
||||
{
|
||||
return ['created_at', 'updated_at','deleted_at'];
|
||||
}
|
||||
}
|
||||
|
||||
@@ -14,6 +14,9 @@ class TransactionGroup extends Model
|
||||
{
|
||||
return $this->belongsTo('FireflyIII\User');
|
||||
}
|
||||
|
||||
public function getDates()
|
||||
{
|
||||
return ['created_at', 'updated_at','deleted_at'];
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -25,7 +25,7 @@ class TransactionJournal extends Model
|
||||
|
||||
public function getDates()
|
||||
{
|
||||
return ['created_at', 'updated_at', 'date'];
|
||||
return ['created_at', 'updated_at', 'date','deleted_at'];
|
||||
}
|
||||
|
||||
public function getDescriptionAttribute($value)
|
||||
|
||||
@@ -5,6 +5,9 @@ use Illuminate\Database\Eloquent\Model;
|
||||
class TransactionRelation extends Model
|
||||
{
|
||||
|
||||
//
|
||||
public function getDates()
|
||||
{
|
||||
return ['created_at', 'updated_at'];
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -9,5 +9,8 @@ class TransactionType extends Model
|
||||
{
|
||||
return $this->hasMany('FireflyIII\Models\TransactionJournal');
|
||||
}
|
||||
|
||||
public function getDates()
|
||||
{
|
||||
return ['created_at', 'updated_at','deleted_at'];
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user