mirror of
https://github.com/firefly-iii/firefly-iii.git
synced 2025-09-19 10:53:37 +00:00
Updated models and tests to match.
This commit is contained in:
@@ -42,7 +42,7 @@ class Account extends Model
|
|||||||
|
|
||||||
public function getDates()
|
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);
|
$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');
|
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');
|
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');
|
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');
|
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');
|
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
|
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');
|
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');
|
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');
|
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');
|
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');
|
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');
|
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');
|
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');
|
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');
|
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()
|
public function getDates()
|
||||||
{
|
{
|
||||||
return ['created_at', 'updated_at', 'date'];
|
return ['created_at', 'updated_at', 'date','deleted_at'];
|
||||||
}
|
}
|
||||||
|
|
||||||
public function getDescriptionAttribute($value)
|
public function getDescriptionAttribute($value)
|
||||||
|
@@ -5,6 +5,9 @@ use Illuminate\Database\Eloquent\Model;
|
|||||||
class TransactionRelation extends 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');
|
return $this->hasMany('FireflyIII\Models\TransactionJournal');
|
||||||
}
|
}
|
||||||
|
public function getDates()
|
||||||
|
{
|
||||||
|
return ['created_at', 'updated_at','deleted_at'];
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
@@ -1,5 +1,7 @@
|
|||||||
<?php
|
<?php
|
||||||
|
|
||||||
|
use FireflyIII\User;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Class BillControllerCest
|
* Class BillControllerCest
|
||||||
*
|
*
|
||||||
|
@@ -1,5 +1,6 @@
|
|||||||
<?php
|
<?php
|
||||||
|
|
||||||
|
use FireflyIII\Models\Preference;
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
* @SuppressWarnings("CamelCase")
|
* @SuppressWarnings("CamelCase")
|
||||||
@@ -50,8 +51,8 @@ class HomeControllerCest
|
|||||||
*/
|
*/
|
||||||
public function indexWithPrefs(FunctionalTester $I)
|
public function indexWithPrefs(FunctionalTester $I)
|
||||||
{
|
{
|
||||||
\Preference::whereName('frontPageAccounts')->delete();
|
Preference::whereName('frontPageAccounts')->delete();
|
||||||
\Preference::create(
|
Preference::create(
|
||||||
[
|
[
|
||||||
'user_id' => 1,
|
'user_id' => 1,
|
||||||
'name' => 'frontPageAccounts',
|
'name' => 'frontPageAccounts',
|
||||||
|
@@ -1,5 +1,7 @@
|
|||||||
<?php
|
<?php
|
||||||
|
|
||||||
|
use FireflyIII\Models\TransactionJournal;
|
||||||
|
use FireflyIII\Models\TransactionGroup;
|
||||||
/**
|
/**
|
||||||
* @SuppressWarnings("CamelCase")
|
* @SuppressWarnings("CamelCase")
|
||||||
* @SuppressWarnings("short")
|
* @SuppressWarnings("short")
|
||||||
|
@@ -1,5 +1,5 @@
|
|||||||
<?php
|
<?php
|
||||||
|
use FireflyIII\Models\Reminder;
|
||||||
/**
|
/**
|
||||||
* Class ReminderControllerCest
|
* Class ReminderControllerCest
|
||||||
*
|
*
|
||||||
|
@@ -1,6 +1,6 @@
|
|||||||
<?php
|
<?php
|
||||||
use Carbon\Carbon;
|
use Carbon\Carbon;
|
||||||
|
use FireflyIII\Models\PiggyBank;
|
||||||
/**
|
/**
|
||||||
* Class RepeatedExpenseControllerCest
|
* Class RepeatedExpenseControllerCest
|
||||||
*
|
*
|
||||||
|
@@ -1,5 +1,8 @@
|
|||||||
<?php
|
<?php
|
||||||
|
|
||||||
|
use FireflyIII\Models\TransactionType;
|
||||||
|
use FireflyIII\Models\TransactionJournal;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Class TransactionControllerCest
|
* Class TransactionControllerCest
|
||||||
*/
|
*/
|
||||||
|
Reference in New Issue
Block a user