mirror of
https://github.com/firefly-iii/firefly-iii.git
synced 2025-02-25 18:45:27 -06:00
Updated models and tests to match.
This commit is contained in:
parent
72e72c60c2
commit
07ad43f7a2
@ -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'];
|
||||
}
|
||||
}
|
||||
|
@ -1,5 +1,7 @@
|
||||
<?php
|
||||
|
||||
use FireflyIII\User;
|
||||
|
||||
/**
|
||||
* Class BillControllerCest
|
||||
*
|
||||
|
@ -1,5 +1,6 @@
|
||||
<?php
|
||||
|
||||
use FireflyIII\Models\Preference;
|
||||
/**
|
||||
*
|
||||
* @SuppressWarnings("CamelCase")
|
||||
@ -50,8 +51,8 @@ class HomeControllerCest
|
||||
*/
|
||||
public function indexWithPrefs(FunctionalTester $I)
|
||||
{
|
||||
\Preference::whereName('frontPageAccounts')->delete();
|
||||
\Preference::create(
|
||||
Preference::whereName('frontPageAccounts')->delete();
|
||||
Preference::create(
|
||||
[
|
||||
'user_id' => 1,
|
||||
'name' => 'frontPageAccounts',
|
||||
|
@ -1,5 +1,7 @@
|
||||
<?php
|
||||
|
||||
use FireflyIII\Models\TransactionJournal;
|
||||
use FireflyIII\Models\TransactionGroup;
|
||||
/**
|
||||
* @SuppressWarnings("CamelCase")
|
||||
* @SuppressWarnings("short")
|
||||
|
@ -1,5 +1,5 @@
|
||||
<?php
|
||||
|
||||
use FireflyIII\Models\Reminder;
|
||||
/**
|
||||
* Class ReminderControllerCest
|
||||
*
|
||||
|
@ -1,6 +1,6 @@
|
||||
<?php
|
||||
use Carbon\Carbon;
|
||||
|
||||
use FireflyIII\Models\PiggyBank;
|
||||
/**
|
||||
* Class RepeatedExpenseControllerCest
|
||||
*
|
||||
|
@ -1,5 +1,8 @@
|
||||
<?php
|
||||
|
||||
use FireflyIII\Models\TransactionType;
|
||||
use FireflyIII\Models\TransactionJournal;
|
||||
|
||||
/**
|
||||
* Class TransactionControllerCest
|
||||
*/
|
||||
|
Loading…
Reference in New Issue
Block a user