mirror of
https://github.com/firefly-iii/firefly-iii.git
synced 2025-09-30 02:26:58 +00:00
Re-arrange code. No changes.
This commit is contained in:
@@ -35,9 +35,8 @@ class Configuration extends Model
|
|||||||
{
|
{
|
||||||
use SoftDeletes;
|
use SoftDeletes;
|
||||||
|
|
||||||
protected $table = 'configuration';
|
|
||||||
|
|
||||||
protected $dates = ['created_at', 'updated_at', 'deleted_at'];
|
protected $dates = ['created_at', 'updated_at', 'deleted_at'];
|
||||||
|
protected $table = 'configuration';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @param $value
|
* @param $value
|
||||||
@@ -58,5 +57,4 @@ class Configuration extends Model
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@@ -40,9 +40,9 @@ use Illuminate\Database\Eloquent\Model;
|
|||||||
class PiggyBankRepetition extends Model
|
class PiggyBankRepetition extends Model
|
||||||
{
|
{
|
||||||
|
|
||||||
|
protected $dates = ['created_at', 'updated_at', 'startdate', 'targetdate'];
|
||||||
protected $fillable = ['piggy_bank_id', 'startdate', 'targetdate', 'currentamount'];
|
protected $fillable = ['piggy_bank_id', 'startdate', 'targetdate', 'currentamount'];
|
||||||
protected $hidden = ['currentamount_encrypted'];
|
protected $hidden = ['currentamount_encrypted'];
|
||||||
protected $dates = ['created_at', 'updated_at', 'startdate', 'targetdate'];
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @return \Illuminate\Database\Eloquent\Relations\BelongsTo
|
* @return \Illuminate\Database\Eloquent\Relations\BelongsTo
|
||||||
|
@@ -16,6 +16,7 @@ use FireflyIII\Exceptions\FireflyException;
|
|||||||
use Illuminate\Contracts\Encryption\DecryptException;
|
use Illuminate\Contracts\Encryption\DecryptException;
|
||||||
use Illuminate\Database\Eloquent\Model;
|
use Illuminate\Database\Eloquent\Model;
|
||||||
use Log;
|
use Log;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* FireflyIII\Models\Preference
|
* FireflyIII\Models\Preference
|
||||||
*
|
*
|
||||||
@@ -54,7 +55,7 @@ class Preference extends Model
|
|||||||
try {
|
try {
|
||||||
$data = Crypt::decrypt($value);
|
$data = Crypt::decrypt($value);
|
||||||
} catch (DecryptException $e) {
|
} catch (DecryptException $e) {
|
||||||
Log::error('Could not decrypt preference.', ['id' => $this->id,'name' => $this->name,'data' => $this->data]);
|
Log::error('Could not decrypt preference.', ['id' => $this->id, 'name' => $this->name, 'data' => $this->data]);
|
||||||
throw new FireflyException('Could not decrypt preference #' . $this->id . '.');
|
throw new FireflyException('Could not decrypt preference #' . $this->id . '.');
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -52,38 +52,6 @@ class Rule extends Model
|
|||||||
{
|
{
|
||||||
use SoftDeletes;
|
use SoftDeletes;
|
||||||
|
|
||||||
/**
|
|
||||||
* @return \Illuminate\Database\Eloquent\Relations\BelongsTo
|
|
||||||
*/
|
|
||||||
public function user()
|
|
||||||
{
|
|
||||||
return $this->belongsTo('FireflyIII\User');
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @return \Illuminate\Database\Eloquent\Relations\BelongsTo
|
|
||||||
*/
|
|
||||||
public function ruleGroup()
|
|
||||||
{
|
|
||||||
return $this->belongsTo('FireflyIII\Models\RuleGroup');
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @return \Illuminate\Database\Eloquent\Relations\HasMany
|
|
||||||
*/
|
|
||||||
public function ruleActions()
|
|
||||||
{
|
|
||||||
return $this->hasMany('FireflyIII\Models\RuleAction');
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @return \Illuminate\Database\Eloquent\Relations\HasMany
|
|
||||||
*/
|
|
||||||
public function ruleTriggers()
|
|
||||||
{
|
|
||||||
return $this->hasMany('FireflyIII\Models\RuleTrigger');
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @param Rule $value
|
* @param Rule $value
|
||||||
*
|
*
|
||||||
@@ -99,4 +67,36 @@ class Rule extends Model
|
|||||||
throw new NotFoundHttpException;
|
throw new NotFoundHttpException;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @return \Illuminate\Database\Eloquent\Relations\HasMany
|
||||||
|
*/
|
||||||
|
public function ruleActions()
|
||||||
|
{
|
||||||
|
return $this->hasMany('FireflyIII\Models\RuleAction');
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @return \Illuminate\Database\Eloquent\Relations\BelongsTo
|
||||||
|
*/
|
||||||
|
public function ruleGroup()
|
||||||
|
{
|
||||||
|
return $this->belongsTo('FireflyIII\Models\RuleGroup');
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @return \Illuminate\Database\Eloquent\Relations\HasMany
|
||||||
|
*/
|
||||||
|
public function ruleTriggers()
|
||||||
|
{
|
||||||
|
return $this->hasMany('FireflyIII\Models\RuleTrigger');
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @return \Illuminate\Database\Eloquent\Relations\BelongsTo
|
||||||
|
*/
|
||||||
|
public function user()
|
||||||
|
{
|
||||||
|
return $this->belongsTo('FireflyIII\User');
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@@ -48,23 +48,6 @@ class RuleGroup extends Model
|
|||||||
|
|
||||||
protected $fillable = ['user_id', 'order', 'title', 'description', 'active'];
|
protected $fillable = ['user_id', 'order', 'title', 'description', 'active'];
|
||||||
|
|
||||||
/**
|
|
||||||
* @return \Illuminate\Database\Eloquent\Relations\BelongsTo
|
|
||||||
*/
|
|
||||||
public function user()
|
|
||||||
{
|
|
||||||
return $this->belongsTo('FireflyIII\User');
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @return \Illuminate\Database\Eloquent\Relations\HasMany
|
|
||||||
*/
|
|
||||||
public function rules()
|
|
||||||
{
|
|
||||||
return $this->hasMany('FireflyIII\Models\Rule');
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @param RuleGroup $value
|
* @param RuleGroup $value
|
||||||
*
|
*
|
||||||
@@ -79,4 +62,20 @@ class RuleGroup extends Model
|
|||||||
}
|
}
|
||||||
throw new NotFoundHttpException;
|
throw new NotFoundHttpException;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @return \Illuminate\Database\Eloquent\Relations\HasMany
|
||||||
|
*/
|
||||||
|
public function rules()
|
||||||
|
{
|
||||||
|
return $this->hasMany('FireflyIII\Models\Rule');
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @return \Illuminate\Database\Eloquent\Relations\BelongsTo
|
||||||
|
*/
|
||||||
|
public function user()
|
||||||
|
{
|
||||||
|
return $this->belongsTo('FireflyIII\User');
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user