mirror of
https://github.com/firefly-iii/firefly-iii.git
synced 2024-11-27 03:10:32 -06:00
Re-arrange code. No changes.
This commit is contained in:
parent
172634a55a
commit
4c015e2d12
@ -22,21 +22,21 @@ use Watson\Validating\ValidatingTrait;
|
||||
/**
|
||||
* FireflyIII\Models\Budget
|
||||
*
|
||||
* @property integer $id
|
||||
* @property \Carbon\Carbon $created_at
|
||||
* @property \Carbon\Carbon $updated_at
|
||||
* @property \Carbon\Carbon $deleted_at
|
||||
* @property string $name
|
||||
* @property integer $user_id
|
||||
* @property boolean $active
|
||||
* @property boolean $encrypted
|
||||
* @property-read \Illuminate\Database\Eloquent\Collection|BudgetLimit[] $budgetlimits
|
||||
* @property-read \Illuminate\Database\Eloquent\Collection|TransactionJournal[] $transactionjournals
|
||||
* @property-read \FireflyIII\User $user
|
||||
* @property string $dateFormatted
|
||||
* @property string $budgeted
|
||||
* @property float $amount
|
||||
* @property \Carbon\Carbon $date
|
||||
* @property integer $id
|
||||
* @property \Carbon\Carbon $created_at
|
||||
* @property \Carbon\Carbon $updated_at
|
||||
* @property \Carbon\Carbon $deleted_at
|
||||
* @property string $name
|
||||
* @property integer $user_id
|
||||
* @property boolean $active
|
||||
* @property boolean $encrypted
|
||||
* @property-read \Illuminate\Database\Eloquent\Collection|BudgetLimit[] $budgetlimits
|
||||
* @property-read \Illuminate\Database\Eloquent\Collection|TransactionJournal[] $transactionjournals
|
||||
* @property-read \FireflyIII\User $user
|
||||
* @property string $dateFormatted
|
||||
* @property string $budgeted
|
||||
* @property float $amount
|
||||
* @property \Carbon\Carbon $date
|
||||
* @method static \Illuminate\Database\Query\Builder|\FireflyIII\Models\Budget whereId($value)
|
||||
* @method static \Illuminate\Database\Query\Builder|\FireflyIII\Models\Budget whereCreatedAt($value)
|
||||
* @method static \Illuminate\Database\Query\Builder|\FireflyIII\Models\Budget whereUpdatedAt($value)
|
||||
@ -46,7 +46,7 @@ use Watson\Validating\ValidatingTrait;
|
||||
* @method static \Illuminate\Database\Query\Builder|\FireflyIII\Models\Budget whereActive($value)
|
||||
* @method static \Illuminate\Database\Query\Builder|\FireflyIII\Models\Budget whereEncrypted($value)
|
||||
* @mixin \Eloquent
|
||||
* @property-read \Illuminate\Database\Eloquent\Collection|\FireflyIII\Models\Transaction[] $transactions
|
||||
* @property-read \Illuminate\Database\Eloquent\Collection|\FireflyIII\Models\Transaction[] $transactions
|
||||
* @property-read \Illuminate\Database\Eloquent\Collection|\FireflyIII\Models\LimitRepetition[] $limitrepetitions
|
||||
*/
|
||||
class Budget extends Model
|
||||
|
@ -18,12 +18,12 @@ use Illuminate\Database\Eloquent\SoftDeletes;
|
||||
* FireflyIII\Models\Configuration
|
||||
*
|
||||
* @mixin \Eloquent
|
||||
* @property integer $id
|
||||
* @property integer $id
|
||||
* @property \Carbon\Carbon $created_at
|
||||
* @property \Carbon\Carbon $updated_at
|
||||
* @property \Carbon\Carbon $deleted_at
|
||||
* @property string $name
|
||||
* @property string $data
|
||||
* @property string $name
|
||||
* @property string $data
|
||||
* @method static \Illuminate\Database\Query\Builder|\FireflyIII\Models\Configuration whereId($value)
|
||||
* @method static \Illuminate\Database\Query\Builder|\FireflyIII\Models\Configuration whereCreatedAt($value)
|
||||
* @method static \Illuminate\Database\Query\Builder|\FireflyIII\Models\Configuration whereUpdatedAt($value)
|
||||
@ -35,9 +35,8 @@ class Configuration extends Model
|
||||
{
|
||||
use SoftDeletes;
|
||||
|
||||
protected $table = 'configuration';
|
||||
|
||||
protected $dates = ['created_at', 'updated_at', 'deleted_at'];
|
||||
protected $table = 'configuration';
|
||||
|
||||
/**
|
||||
* @param $value
|
||||
@ -58,5 +57,4 @@ class Configuration extends Model
|
||||
}
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
@ -40,9 +40,9 @@ use Illuminate\Database\Eloquent\Model;
|
||||
class PiggyBankRepetition extends Model
|
||||
{
|
||||
|
||||
protected $dates = ['created_at', 'updated_at', 'startdate', 'targetdate'];
|
||||
protected $fillable = ['piggy_bank_id', 'startdate', 'targetdate', 'currentamount'];
|
||||
protected $hidden = ['currentamount_encrypted'];
|
||||
protected $dates = ['created_at', 'updated_at', 'startdate', 'targetdate'];
|
||||
|
||||
/**
|
||||
* @return \Illuminate\Database\Eloquent\Relations\BelongsTo
|
||||
|
@ -16,6 +16,7 @@ use FireflyIII\Exceptions\FireflyException;
|
||||
use Illuminate\Contracts\Encryption\DecryptException;
|
||||
use Illuminate\Database\Eloquent\Model;
|
||||
use Log;
|
||||
|
||||
/**
|
||||
* FireflyIII\Models\Preference
|
||||
*
|
||||
@ -54,7 +55,7 @@ class Preference extends Model
|
||||
try {
|
||||
$data = Crypt::decrypt($value);
|
||||
} 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 . '.');
|
||||
}
|
||||
|
||||
|
@ -52,38 +52,6 @@ class Rule extends Model
|
||||
{
|
||||
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
|
||||
*
|
||||
@ -99,4 +67,36 @@ class Rule extends Model
|
||||
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'];
|
||||
|
||||
/**
|
||||
* @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
|
||||
*
|
||||
@ -79,4 +62,20 @@ class RuleGroup extends Model
|
||||
}
|
||||
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');
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user