|
|
@@ -1,97 +0,0 @@
|
|
|
-<?php
|
|
|
-
|
|
|
-namespace App\Models;
|
|
|
-
|
|
|
-use Illuminate\Database\Eloquent\Factories\HasFactory;
|
|
|
-use Illuminate\Database\Eloquent\Model;
|
|
|
-use Illuminate\Database\Eloquent\Relations\BelongsTo;
|
|
|
-
|
|
|
-/**
|
|
|
- * @property int $id
|
|
|
- * @property int $franchisee_id
|
|
|
- * @property int $contract_id
|
|
|
- * @property int $inhabitant_classification_id
|
|
|
- * @property int $year
|
|
|
- * @property numeric $tbr_value
|
|
|
- * @property \Illuminate\Support\Carbon $start_date
|
|
|
- * @property int $invoice_due_day
|
|
|
- * @property numeric $base_royalties_percentage
|
|
|
- * @property numeric $base_fnm_percentage
|
|
|
- * @property int|null $franchisee_royalties_bracket_id
|
|
|
- * @property int|null $franchisee_fnm_bracket_id
|
|
|
- * @property int|null $franchisee_maintenance_bracket_id
|
|
|
- * @property \Illuminate\Support\Carbon|null $created_at
|
|
|
- * @property \Illuminate\Support\Carbon|null $updated_at
|
|
|
- * @property-read \App\Models\FranchiseeContract $contract
|
|
|
- * @property-read \App\Models\FranchiseeFnmBracket|null $fnmBracket
|
|
|
- * @property-read \App\Models\Franchisee $franchisee
|
|
|
- * @property-read \App\Models\InhabitantClassification $inhabitantClassification
|
|
|
- * @property-read \App\Models\FranchiseeMaintenanceBracket|null $maintenanceBracket
|
|
|
- * @property-read \App\Models\FranchiseeRoyaltiesBracket|null $royaltiesBracket
|
|
|
- * @method static \Illuminate\Database\Eloquent\Builder<static>|FranchiseeTbr newModelQuery()
|
|
|
- * @method static \Illuminate\Database\Eloquent\Builder<static>|FranchiseeTbr newQuery()
|
|
|
- * @method static \Illuminate\Database\Eloquent\Builder<static>|FranchiseeTbr query()
|
|
|
- * @method static \Illuminate\Database\Eloquent\Builder<static>|FranchiseeTbr whereBaseFnmPercentage($value)
|
|
|
- * @method static \Illuminate\Database\Eloquent\Builder<static>|FranchiseeTbr whereBaseRoyaltiesPercentage($value)
|
|
|
- * @method static \Illuminate\Database\Eloquent\Builder<static>|FranchiseeTbr whereContractId($value)
|
|
|
- * @method static \Illuminate\Database\Eloquent\Builder<static>|FranchiseeTbr whereCreatedAt($value)
|
|
|
- * @method static \Illuminate\Database\Eloquent\Builder<static>|FranchiseeTbr whereFranchiseeFnmBracketId($value)
|
|
|
- * @method static \Illuminate\Database\Eloquent\Builder<static>|FranchiseeTbr whereFranchiseeId($value)
|
|
|
- * @method static \Illuminate\Database\Eloquent\Builder<static>|FranchiseeTbr whereFranchiseeMaintenanceBracketId($value)
|
|
|
- * @method static \Illuminate\Database\Eloquent\Builder<static>|FranchiseeTbr whereFranchiseeRoyaltiesBracketId($value)
|
|
|
- * @method static \Illuminate\Database\Eloquent\Builder<static>|FranchiseeTbr whereId($value)
|
|
|
- * @method static \Illuminate\Database\Eloquent\Builder<static>|FranchiseeTbr whereInhabitantClassificationId($value)
|
|
|
- * @method static \Illuminate\Database\Eloquent\Builder<static>|FranchiseeTbr whereInvoiceDueDay($value)
|
|
|
- * @method static \Illuminate\Database\Eloquent\Builder<static>|FranchiseeTbr whereStartDate($value)
|
|
|
- * @method static \Illuminate\Database\Eloquent\Builder<static>|FranchiseeTbr whereTbrValue($value)
|
|
|
- * @method static \Illuminate\Database\Eloquent\Builder<static>|FranchiseeTbr whereUpdatedAt($value)
|
|
|
- * @method static \Illuminate\Database\Eloquent\Builder<static>|FranchiseeTbr whereYear($value)
|
|
|
- * @mixin \Eloquent
|
|
|
- */
|
|
|
-class FranchiseeTbr extends Model
|
|
|
-{
|
|
|
- use HasFactory;
|
|
|
-
|
|
|
- protected $table = 'franchisee_tbrs';
|
|
|
-
|
|
|
- protected $guarded = ['id'];
|
|
|
-
|
|
|
- protected $casts = [
|
|
|
- 'tbr_value' => 'decimal:2',
|
|
|
- 'base_royalties_percentage' => 'decimal:4',
|
|
|
- 'base_fnm_percentage' => 'decimal:4',
|
|
|
- 'start_date' => 'date',
|
|
|
- 'created_at' => 'datetime',
|
|
|
- 'updated_at' => 'datetime',
|
|
|
- ];
|
|
|
-
|
|
|
- public function franchisee(): BelongsTo
|
|
|
- {
|
|
|
- return $this->belongsTo(Franchisee::class, 'franchisee_id');
|
|
|
- }
|
|
|
-
|
|
|
- public function contract(): BelongsTo
|
|
|
- {
|
|
|
- return $this->belongsTo(FranchiseeContract::class, 'contract_id');
|
|
|
- }
|
|
|
-
|
|
|
- public function inhabitantClassification(): BelongsTo
|
|
|
- {
|
|
|
- return $this->belongsTo(InhabitantClassification::class, 'inhabitant_classification_id');
|
|
|
- }
|
|
|
-
|
|
|
- public function royaltiesBracket(): BelongsTo
|
|
|
- {
|
|
|
- return $this->belongsTo(FranchiseeRoyaltiesBracket::class, 'franchisee_royalties_bracket_id');
|
|
|
- }
|
|
|
-
|
|
|
- public function fnmBracket(): BelongsTo
|
|
|
- {
|
|
|
- return $this->belongsTo(FranchiseeFnmBracket::class, 'franchisee_fnm_bracket_id');
|
|
|
- }
|
|
|
-
|
|
|
- public function maintenanceBracket(): BelongsTo
|
|
|
- {
|
|
|
- return $this->belongsTo(FranchiseeMaintenanceBracket::class, 'franchisee_maintenance_bracket_id');
|
|
|
- }
|
|
|
-}
|