Various code cleanup.

This commit is contained in:
James Cole
2023-11-05 19:41:37 +01:00
parent a0564751d6
commit 1d2e95f5af
136 changed files with 1171 additions and 514 deletions

View File

@@ -25,6 +25,8 @@ namespace FireflyIII\Models;
use Carbon\Carbon;
use Eloquent;
use FireflyIII\Support\Models\ReturnsIntegerIdTrait;
use FireflyIII\Support\Models\ReturnsIntegerUserIdTrait;
use FireflyIII\User;
use Illuminate\Database\Eloquent\Collection;
use Illuminate\Database\Eloquent\Model;
@@ -39,15 +41,15 @@ use Symfony\Component\HttpKernel\Exception\NotFoundHttpException;
/**
* FireflyIII\Models\Budget
*
* @property int|string $id
* @property int $id
* @property Carbon|null $created_at
* @property Carbon|null $updated_at
* @property Carbon|null $deleted_at
* @property int|string $user_id
* @property int $user_id
* @property string $name
* @property bool $active
* @property bool $encrypted
* @property int|string $order
* @property int|string $order
* @property-read Collection|Attachment[] $attachments
* @property-read int|null $attachments_count
* @property-read Collection|AutoBudget[] $autoBudgets
@@ -75,7 +77,7 @@ use Symfony\Component\HttpKernel\Exception\NotFoundHttpException;
* @method static Builder|Budget withTrashed()
* @method static Builder|Budget withoutTrashed()
* @property string $email
* @property int|null $user_group_id
* @property int $user_group_id
* @method static \Illuminate\Database\Eloquent\Builder|Budget whereUserGroupId($value)
* @property-read Collection|Note[] $notes
* @property-read int|null $notes_count
@@ -83,8 +85,9 @@ use Symfony\Component\HttpKernel\Exception\NotFoundHttpException;
*/
class Budget extends Model
{
use ReturnsIntegerIdTrait;
use SoftDeletes;
use ReturnsIntegerUserIdTrait;
protected $casts
= [
@@ -177,4 +180,6 @@ class Budget extends Model
{
return $this->belongsToMany(Transaction::class, 'budget_transaction', 'budget_id');
}
}