mirror of
https://github.com/firefly-iii/firefly-iii.git
synced 2025-09-19 02:45:58 +00:00
Code cleanup
This commit is contained in:
@@ -39,13 +39,13 @@ use Symfony\Component\HttpKernel\Exception\NotFoundHttpException;
|
||||
/**
|
||||
* Class UserGroup
|
||||
*
|
||||
* @property int $id
|
||||
* @property Carbon|null $created_at
|
||||
* @property Carbon|null $updated_at
|
||||
* @property string|null $deleted_at
|
||||
* @property string $title
|
||||
* @property-read Collection|GroupMembership[] $groupMemberships
|
||||
* @property-read int|null $group_memberships_count
|
||||
* @property int $id
|
||||
* @property Carbon|null $created_at
|
||||
* @property Carbon|null $updated_at
|
||||
* @property string|null $deleted_at
|
||||
* @property string $title
|
||||
* @property-read Collection|GroupMembership[] $groupMemberships
|
||||
* @property-read int|null $group_memberships_count
|
||||
* @method static Builder|UserGroup newModelQuery()
|
||||
* @method static Builder|UserGroup newQuery()
|
||||
* @method static Builder|UserGroup query()
|
||||
@@ -54,40 +54,40 @@ use Symfony\Component\HttpKernel\Exception\NotFoundHttpException;
|
||||
* @method static Builder|UserGroup whereId($value)
|
||||
* @method static Builder|UserGroup whereTitle($value)
|
||||
* @method static Builder|UserGroup whereUpdatedAt($value)
|
||||
* @property-read Collection<int, Account> $accounts
|
||||
* @property-read int|null $accounts_count
|
||||
* @property-read Collection<int, AvailableBudget> $availableBudgets
|
||||
* @property-read int|null $available_budgets_count
|
||||
* @property-read Collection<int, Bill> $bills
|
||||
* @property-read int|null $bills_count
|
||||
* @property-read Collection<int, Budget> $budgets
|
||||
* @property-read int|null $budgets_count
|
||||
* @property-read Collection<int, PiggyBank> $piggyBanks
|
||||
* @property-read int|null $piggy_banks_count
|
||||
* @property-read Collection<int, TransactionJournal> $transactionJournals
|
||||
* @property-read int|null $transaction_journals_count
|
||||
* @property-read Collection<int, \FireflyIII\Models\Attachment> $attachments
|
||||
* @property-read int|null $attachments_count
|
||||
* @property-read Collection<int, \FireflyIII\Models\Category> $categories
|
||||
* @property-read int|null $categories_count
|
||||
* @property-read Collection<int, \FireflyIII\Models\CurrencyExchangeRate> $currencyExchangeRates
|
||||
* @property-read int|null $currency_exchange_rates_count
|
||||
* @property-read Collection<int, \FireflyIII\Models\ObjectGroup> $objectGroups
|
||||
* @property-read int|null $object_groups_count
|
||||
* @property-read Collection<int, \FireflyIII\Models\Recurrence> $recurrences
|
||||
* @property-read int|null $recurrences_count
|
||||
* @property-read Collection<int, \FireflyIII\Models\RuleGroup> $ruleGroups
|
||||
* @property-read int|null $rule_groups_count
|
||||
* @property-read Collection<int, \FireflyIII\Models\Rule> $rules
|
||||
* @property-read int|null $rules_count
|
||||
* @property-read Collection<int, \FireflyIII\Models\Tag> $tags
|
||||
* @property-read int|null $tags_count
|
||||
* @property-read Collection<int, \FireflyIII\Models\TransactionGroup> $transactionGroups
|
||||
* @property-read int|null $transaction_groups_count
|
||||
* @property-read Collection<int, \FireflyIII\Models\Webhook> $webhooks
|
||||
* @property-read int|null $webhooks_count
|
||||
* @property-read Collection<int, \FireflyIII\Models\TransactionCurrency> $currencies
|
||||
* @property-read int|null $currencies_count
|
||||
* @property-read Collection<int, Account> $accounts
|
||||
* @property-read int|null $accounts_count
|
||||
* @property-read Collection<int, AvailableBudget> $availableBudgets
|
||||
* @property-read int|null $available_budgets_count
|
||||
* @property-read Collection<int, Bill> $bills
|
||||
* @property-read int|null $bills_count
|
||||
* @property-read Collection<int, Budget> $budgets
|
||||
* @property-read int|null $budgets_count
|
||||
* @property-read Collection<int, PiggyBank> $piggyBanks
|
||||
* @property-read int|null $piggy_banks_count
|
||||
* @property-read Collection<int, TransactionJournal> $transactionJournals
|
||||
* @property-read int|null $transaction_journals_count
|
||||
* @property-read Collection<int, Attachment> $attachments
|
||||
* @property-read int|null $attachments_count
|
||||
* @property-read Collection<int, Category> $categories
|
||||
* @property-read int|null $categories_count
|
||||
* @property-read Collection<int, CurrencyExchangeRate> $currencyExchangeRates
|
||||
* @property-read int|null $currency_exchange_rates_count
|
||||
* @property-read Collection<int, ObjectGroup> $objectGroups
|
||||
* @property-read int|null $object_groups_count
|
||||
* @property-read Collection<int, Recurrence> $recurrences
|
||||
* @property-read int|null $recurrences_count
|
||||
* @property-read Collection<int, RuleGroup> $ruleGroups
|
||||
* @property-read int|null $rule_groups_count
|
||||
* @property-read Collection<int, Rule> $rules
|
||||
* @property-read int|null $rules_count
|
||||
* @property-read Collection<int, Tag> $tags
|
||||
* @property-read int|null $tags_count
|
||||
* @property-read Collection<int, TransactionGroup> $transactionGroups
|
||||
* @property-read int|null $transaction_groups_count
|
||||
* @property-read Collection<int, Webhook> $webhooks
|
||||
* @property-read int|null $webhooks_count
|
||||
* @property-read Collection<int, TransactionCurrency> $currencies
|
||||
* @property-read int|null $currencies_count
|
||||
* @mixin Eloquent
|
||||
*/
|
||||
class UserGroup extends Model
|
||||
@@ -132,16 +132,6 @@ class UserGroup extends Model
|
||||
return $this->hasMany(Account::class);
|
||||
}
|
||||
|
||||
/**
|
||||
* Link to currencies
|
||||
*
|
||||
* @return BelongsToMany
|
||||
*/
|
||||
public function currencies(): BelongsToMany
|
||||
{
|
||||
return $this->belongsToMany(TransactionCurrency::class)->withTimestamps()->withPivot('group_default');
|
||||
}
|
||||
|
||||
/**
|
||||
* Link to attachments.
|
||||
*
|
||||
@@ -192,6 +182,16 @@ class UserGroup extends Model
|
||||
return $this->hasMany(Category::class);
|
||||
}
|
||||
|
||||
/**
|
||||
* Link to currencies
|
||||
*
|
||||
* @return BelongsToMany
|
||||
*/
|
||||
public function currencies(): BelongsToMany
|
||||
{
|
||||
return $this->belongsToMany(TransactionCurrency::class)->withTimestamps()->withPivot('group_default');
|
||||
}
|
||||
|
||||
/**
|
||||
* Link to exchange rates.
|
||||
*
|
||||
|
Reference in New Issue
Block a user