mirror of
https://github.com/firefly-iii/firefly-iii.git
synced 2025-10-12 23:45:10 +00:00
Also add no budget and no category overview.
This commit is contained in:
@@ -8,6 +8,7 @@ use FireflyIII\Casts\SeparateTimezoneCaster;
|
||||
use FireflyIII\Support\Models\ReturnsIntegerUserIdTrait;
|
||||
use Illuminate\Database\Eloquent\Casts\Attribute;
|
||||
use Illuminate\Database\Eloquent\Model;
|
||||
use Illuminate\Database\Eloquent\Relations\BelongsTo;
|
||||
use Illuminate\Database\Eloquent\Relations\MorphTo;
|
||||
|
||||
class PeriodStatistic extends Model
|
||||
@@ -24,6 +25,11 @@ class PeriodStatistic extends Model
|
||||
];
|
||||
}
|
||||
|
||||
public function userGroup(): BelongsTo
|
||||
{
|
||||
return $this->belongsTo(UserGroup::class);
|
||||
}
|
||||
|
||||
protected function count(): Attribute
|
||||
{
|
||||
return Attribute::make(
|
||||
|
@@ -76,6 +76,14 @@ class UserGroup extends Model
|
||||
return $this->hasMany(Account::class);
|
||||
}
|
||||
|
||||
/**
|
||||
* Link to accounts.
|
||||
*/
|
||||
public function periodStatistics(): HasMany
|
||||
{
|
||||
return $this->hasMany(PeriodStatistic::class);
|
||||
}
|
||||
|
||||
/**
|
||||
* Link to attachments.
|
||||
*/
|
||||
|
Reference in New Issue
Block a user