Clean up models.

This commit is contained in:
James Cole 2020-03-25 06:58:29 +01:00
parent 5e3d00ecde
commit 7e6cd77203
No known key found for this signature in database
GPG Key ID: C16961E655E74B5E
24 changed files with 171 additions and 15 deletions

View File

@ -85,6 +85,15 @@ use Symfony\Component\HttpKernel\Exception\NotFoundHttpException;
* @method static Builder|Account withTrashed()
* @method static Builder|Account withoutTrashed()
* @mixin Eloquent
* @property-read int|null $account_meta_count
* @property-read \Illuminate\Database\Eloquent\Collection|Attachment[] $attachments
* @property-read int|null $attachments_count
* @property-read string $account_number
* @property-read \Illuminate\Database\Eloquent\Collection|Location[] $locations
* @property-read int|null $locations_count
* @property-read int|null $notes_count
* @property-read int|null $piggy_banks_count
* @property-read int|null $transactions_count
*/
class Account extends Model
{

View File

@ -45,6 +45,7 @@ use Illuminate\Support\Carbon;
* @method static Builder|AccountType whereId($value)
* @method static Builder|AccountType whereUpdatedAt($value)
* @mixin Eloquent
* @property-read int|null $accounts_count
*/
class AccountType extends Model
{

View File

@ -78,6 +78,7 @@ use Symfony\Component\HttpKernel\Exception\NotFoundHttpException;
* @method static Builder|Attachment withTrashed()
* @method static Builder|Attachment withoutTrashed()
* @mixin Eloquent
* @property-read int|null $notes_count
*/
class Attachment extends Model
{

View File

@ -21,12 +21,45 @@
namespace FireflyIII\Models;
use Eloquent;
use Illuminate\Database\Eloquent\Model;
use Illuminate\Database\Eloquent\Relations\BelongsTo;
use Illuminate\Database\Eloquent\SoftDeletes;
use Illuminate\Database\Query\Builder;
use Illuminate\Support\Carbon;
/**
* Class AutoBudget
*
* @property int $id
* @property Carbon|null $created_at
* @property Carbon|null $updated_at
* @property Carbon|null $deleted_at
* @property int $budget_id
* @property int $transaction_currency_id
* @property int $auto_budget_type
* @property float $amount
* @property string $period
* @property-read Budget $budget
* @property-read TransactionCurrency $transactionCurrency
* @method static bool|null forceDelete()
* @method static \Illuminate\Database\Eloquent\Builder|AutoBudget newModelQuery()
* @method static \Illuminate\Database\Eloquent\Builder|AutoBudget newQuery()
* @method static Builder|AutoBudget onlyTrashed()
* @method static \Illuminate\Database\Eloquent\Builder|AutoBudget query()
* @method static bool|null restore()
* @method static \Illuminate\Database\Eloquent\Builder|AutoBudget whereAmount($value)
* @method static \Illuminate\Database\Eloquent\Builder|AutoBudget whereAutoBudgetType($value)
* @method static \Illuminate\Database\Eloquent\Builder|AutoBudget whereBudgetId($value)
* @method static \Illuminate\Database\Eloquent\Builder|AutoBudget whereCreatedAt($value)
* @method static \Illuminate\Database\Eloquent\Builder|AutoBudget whereDeletedAt($value)
* @method static \Illuminate\Database\Eloquent\Builder|AutoBudget whereId($value)
* @method static \Illuminate\Database\Eloquent\Builder|AutoBudget wherePeriod($value)
* @method static \Illuminate\Database\Eloquent\Builder|AutoBudget whereTransactionCurrencyId($value)
* @method static \Illuminate\Database\Eloquent\Builder|AutoBudget whereUpdatedAt($value)
* @method static Builder|AutoBudget withTrashed()
* @method static Builder|AutoBudget withoutTrashed()
* @mixin Eloquent
*/
class AutoBudget extends Model
{

View File

@ -86,6 +86,9 @@ use Symfony\Component\HttpKernel\Exception\NotFoundHttpException;
* @method static Builder|Bill withTrashed()
* @method static Builder|Bill withoutTrashed()
* @mixin Eloquent
* @property-read int|null $attachments_count
* @property-read int|null $notes_count
* @property-read int|null $transaction_journals_count
*/
class Bill extends Model
{

View File

@ -70,6 +70,13 @@ use Symfony\Component\HttpKernel\Exception\NotFoundHttpException;
* @method static Builder|Budget withTrashed()
* @method static Builder|Budget withoutTrashed()
* @mixin Eloquent
* @property-read \Illuminate\Database\Eloquent\Collection|Attachment[] $attachments
* @property-read int|null $attachments_count
* @property-read \Illuminate\Database\Eloquent\Collection|AutoBudget[] $autoBudgets
* @property-read int|null $auto_budgets_count
* @property-read int|null $budgetlimits_count
* @property-read int|null $transaction_journals_count
* @property-read int|null $transactions_count
*/
class Budget extends Model
{

View File

@ -66,6 +66,10 @@ use Symfony\Component\HttpKernel\Exception\NotFoundHttpException;
* @method static Builder|Category withTrashed()
* @method static Builder|Category withoutTrashed()
* @mixin Eloquent
* @property-read Collection|Attachment[] $attachments
* @property-read int|null $attachments_count
* @property-read int|null $transaction_journals_count
* @property-read int|null $transactions_count
*/
class Category extends Model
{

View File

@ -72,6 +72,7 @@ use Symfony\Component\HttpKernel\Exception\NotFoundHttpException;
* @method static Builder|ImportJob whereUpdatedAt($value)
* @method static Builder|ImportJob whereUserId($value)
* @mixin Eloquent
* @property-read int|null $attachments_count
*/
class ImportJob extends Model
{

View File

@ -62,6 +62,7 @@ use Symfony\Component\HttpKernel\Exception\NotFoundHttpException;
* @method static Builder|LinkType withTrashed()
* @method static Builder|LinkType withoutTrashed()
* @mixin Eloquent
* @property-read int|null $transaction_journal_links_count
*/
class LinkType extends Model
{

View File

@ -22,12 +22,42 @@
namespace FireflyIII\Models;
use Eloquent;
use Illuminate\Database\Eloquent\Builder;
use Illuminate\Database\Eloquent\Collection;
use Illuminate\Database\Eloquent\Model;
use Illuminate\Database\Eloquent\Relations\MorphMany;
use Illuminate\Database\Eloquent\Relations\MorphTo;
use Illuminate\Support\Carbon;
/**
* Class Location
*
* @property int $id
* @property Carbon|null $created_at
* @property Carbon|null $updated_at
* @property Carbon|null $deleted_at
* @property int $locatable_id
* @property string $locatable_type
* @property float|null $latitude
* @property float|null $longitude
* @property int|null $zoom_level
* @property-read Collection|Account[] $accounts
* @property-read int|null $accounts_count
* @property-read Model|Eloquent $locatable
* @method static Builder|Location newModelQuery()
* @method static Builder|Location newQuery()
* @method static Builder|Location query()
* @method static Builder|Location whereCreatedAt($value)
* @method static Builder|Location whereDeletedAt($value)
* @method static Builder|Location whereId($value)
* @method static Builder|Location whereLatitude($value)
* @method static Builder|Location whereLocatableId($value)
* @method static Builder|Location whereLocatableType($value)
* @method static Builder|Location whereLongitude($value)
* @method static Builder|Location whereUpdatedAt($value)
* @method static Builder|Location whereZoomLevel($value)
* @mixin Eloquent
*/
class Location extends Model
{

View File

@ -73,6 +73,11 @@ use Symfony\Component\HttpKernel\Exception\NotFoundHttpException;
* @method static Builder|PiggyBank withTrashed()
* @method static Builder|PiggyBank withoutTrashed()
* @mixin Eloquent
* @property-read Collection|Attachment[] $attachments
* @property-read int|null $attachments_count
* @property-read int|null $notes_count
* @property-read int|null $piggy_bank_events_count
* @property-read int|null $piggy_bank_repetitions_count
*/
class PiggyBank extends Model
{

View File

@ -87,6 +87,10 @@ use Symfony\Component\HttpKernel\Exception\NotFoundHttpException;
* @method static Builder|Recurrence withTrashed()
* @method static Builder|Recurrence withoutTrashed()
* @mixin Eloquent
* @property-read int|null $notes_count
* @property-read int|null $recurrence_meta_count
* @property-read int|null $recurrence_repetitions_count
* @property-read int|null $recurrence_transactions_count
*/
class Recurrence extends Model
{

View File

@ -75,6 +75,7 @@ use Illuminate\Support\Collection;
* @method static Builder|RecurrenceTransaction withTrashed()
* @method static Builder|RecurrenceTransaction withoutTrashed()
* @mixin Eloquent
* @property-read int|null $recurrence_transaction_meta_count
*/
class RecurrenceTransaction extends Model
{

View File

@ -50,6 +50,7 @@ use Illuminate\Support\Carbon;
* @method static Builder|Role whereName($value)
* @method static Builder|Role whereUpdatedAt($value)
* @mixin Eloquent
* @property-read int|null $users_count
*/
class Role extends Model
{

View File

@ -73,6 +73,8 @@ use Symfony\Component\HttpKernel\Exception\NotFoundHttpException;
* @method static Builder|Rule withTrashed()
* @method static Builder|Rule withoutTrashed()
* @mixin Eloquent
* @property-read int|null $rule_actions_count
* @property-read int|null $rule_triggers_count
*/
class Rule extends Model
{

View File

@ -67,6 +67,8 @@ use Symfony\Component\HttpKernel\Exception\NotFoundHttpException;
* @method static Builder|RuleGroup withoutTrashed()
* @property bool $stop_processing
* @mixin Eloquent
* @property-read int|null $rules_count
* @method static \Illuminate\Database\Eloquent\Builder|RuleGroup whereStopProcessing($value)
*/
class RuleGroup extends Model
{

View File

@ -73,6 +73,11 @@ use Symfony\Component\HttpKernel\Exception\NotFoundHttpException;
* @method static Builder|Tag withTrashed()
* @method static Builder|Tag withoutTrashed()
* @mixin Eloquent
* @property-read \Illuminate\Database\Eloquent\Collection|Attachment[] $attachments
* @property-read int|null $attachments_count
* @property-read \Illuminate\Database\Eloquent\Collection|Location[] $locations
* @property-read int|null $locations_count
* @property-read int|null $transaction_journals_count
*/
class Tag extends Model
{

View File

@ -22,10 +22,36 @@
namespace FireflyIII\Models;
use Eloquent;
use Illuminate\Database\Eloquent\Builder;
use Illuminate\Database\Eloquent\Model;
use Illuminate\Support\Carbon;
/**
* Class Telemetry
*
* @property int $id
* @property Carbon|null $created_at
* @property Carbon|null $updated_at
* @property Carbon|null $submitted
* @property int|null $user_id
* @property string $installation_id
* @property string $type
* @property string $key
* @property array $value
* @method static Builder|Telemetry newModelQuery()
* @method static Builder|Telemetry newQuery()
* @method static Builder|Telemetry query()
* @method static Builder|Telemetry whereCreatedAt($value)
* @method static Builder|Telemetry whereId($value)
* @method static Builder|Telemetry whereInstallationId($value)
* @method static Builder|Telemetry whereKey($value)
* @method static Builder|Telemetry whereSubmitted($value)
* @method static Builder|Telemetry whereType($value)
* @method static Builder|Telemetry whereUpdatedAt($value)
* @method static Builder|Telemetry whereUserId($value)
* @method static Builder|Telemetry whereValue($value)
* @mixin Eloquent
*/
class Telemetry extends Model
{

View File

@ -130,6 +130,8 @@ use Illuminate\Database\Eloquent\SoftDeletes;
* @method static \Illuminate\Database\Query\Builder|Transaction withTrashed()
* @method static \Illuminate\Database\Query\Builder|Transaction withoutTrashed()
* @mixin Eloquent
* @property-read int|null $budgets_count
* @property-read int|null $categories_count
*/
class Transaction extends Model
{

View File

@ -64,6 +64,9 @@ use Symfony\Component\HttpKernel\Exception\NotFoundHttpException;
* @method static Builder|TransactionCurrency withTrashed()
* @method static Builder|TransactionCurrency withoutTrashed()
* @mixin Eloquent
* @property-read int|null $budget_limits_count
* @property-read int|null $transaction_journals_count
* @property-read int|null $transactions_count
*/
class TransactionCurrency extends Model
{

View File

@ -65,6 +65,7 @@ use Symfony\Component\HttpKernel\Exception\NotFoundHttpException;
* @property int transaction_group_id
* @property int transaction_journal_id
* @property string transaction_group_title
* @property-read int|null $transaction_journals_count
*/
class TransactionGroup extends Model
{

View File

@ -109,6 +109,18 @@ use Symfony\Component\HttpKernel\Exception\NotFoundHttpException;
* @method static \Illuminate\Database\Query\Builder|TransactionJournal withTrashed()
* @method static \Illuminate\Database\Query\Builder|TransactionJournal withoutTrashed()
* @mixin Eloquent
* @property-read int|null $attachments_count
* @property-read int|null $budgets_count
* @property-read int|null $categories_count
* @property-read \Illuminate\Database\Eloquent\Collection|TransactionJournalLink[] $destJournalLinks
* @property-read int|null $dest_journal_links_count
* @property-read int|null $notes_count
* @property-read int|null $piggy_bank_events_count
* @property-read int|null $source_journal_links_count
* @property-read int|null $tags_count
* @property-read int|null $transaction_journal_meta_count
* @property-read int|null $transactions_count
* @method static EloquentBuilder|TransactionJournal whereTransactionGroupId($value)
*/
class TransactionJournal extends Model
{

View File

@ -56,6 +56,7 @@ use Symfony\Component\HttpKernel\Exception\NotFoundHttpException;
* @method static Builder|TransactionJournalLink whereSourceId($value)
* @method static Builder|TransactionJournalLink whereUpdatedAt($value)
* @mixin Eloquent
* @property-read int|null $notes_count
*/
class TransactionJournalLink extends Model
{

View File

@ -54,6 +54,7 @@ use Symfony\Component\HttpKernel\Exception\NotFoundHttpException;
* @method static Builder|TransactionType withTrashed()
* @method static Builder|TransactionType withoutTrashed()
* @mixin Eloquent
* @property-read int|null $transaction_journals_count
*/
class TransactionType extends Model
{