| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778 |
- <?php
- namespace App\Models;
- use Illuminate\Database\Eloquent\Factories\HasFactory;
- use Illuminate\Database\Eloquent\Model;
- use Illuminate\Database\Eloquent\Relations\BelongsTo;
- use Illuminate\Database\Eloquent\SoftDeletes;
- /**
- * Contas a Pagar da matriz (franqueadora) — lançamentos manuais.
- *
- * @property int $id
- * @property int|null $financial_plan_account_id
- * @property string $origin
- * @property string $history
- * @property numeric $value
- * @property numeric $paid_value
- * @property numeric $discount
- * @property numeric $fine
- * @property \Illuminate\Support\Carbon $due_date
- * @property \Illuminate\Support\Carbon|null $payment_date
- * @property string $status
- * @property string|null $obs
- * @property \Illuminate\Support\Carbon|null $created_at
- * @property \Illuminate\Support\Carbon|null $updated_at
- * @property \Illuminate\Support\Carbon|null $deleted_at
- * @property-read \App\Models\FinancialPlanAccount|null $planAccount
- * @method static \Illuminate\Database\Eloquent\Builder<static>|CompanyAccountPayable newModelQuery()
- * @method static \Illuminate\Database\Eloquent\Builder<static>|CompanyAccountPayable newQuery()
- * @method static \Illuminate\Database\Eloquent\Builder<static>|CompanyAccountPayable onlyTrashed()
- * @method static \Illuminate\Database\Eloquent\Builder<static>|CompanyAccountPayable query()
- * @method static \Illuminate\Database\Eloquent\Builder<static>|CompanyAccountPayable whereCreatedAt($value)
- * @method static \Illuminate\Database\Eloquent\Builder<static>|CompanyAccountPayable whereDeletedAt($value)
- * @method static \Illuminate\Database\Eloquent\Builder<static>|CompanyAccountPayable whereDiscount($value)
- * @method static \Illuminate\Database\Eloquent\Builder<static>|CompanyAccountPayable whereDueDate($value)
- * @method static \Illuminate\Database\Eloquent\Builder<static>|CompanyAccountPayable whereFinancialPlanAccountId($value)
- * @method static \Illuminate\Database\Eloquent\Builder<static>|CompanyAccountPayable whereFine($value)
- * @method static \Illuminate\Database\Eloquent\Builder<static>|CompanyAccountPayable whereHistory($value)
- * @method static \Illuminate\Database\Eloquent\Builder<static>|CompanyAccountPayable whereId($value)
- * @method static \Illuminate\Database\Eloquent\Builder<static>|CompanyAccountPayable whereObs($value)
- * @method static \Illuminate\Database\Eloquent\Builder<static>|CompanyAccountPayable whereOrigin($value)
- * @method static \Illuminate\Database\Eloquent\Builder<static>|CompanyAccountPayable wherePaidValue($value)
- * @method static \Illuminate\Database\Eloquent\Builder<static>|CompanyAccountPayable wherePaymentDate($value)
- * @method static \Illuminate\Database\Eloquent\Builder<static>|CompanyAccountPayable whereStatus($value)
- * @method static \Illuminate\Database\Eloquent\Builder<static>|CompanyAccountPayable whereUpdatedAt($value)
- * @method static \Illuminate\Database\Eloquent\Builder<static>|CompanyAccountPayable whereValue($value)
- * @method static \Illuminate\Database\Eloquent\Builder<static>|CompanyAccountPayable withTrashed(bool $withTrashed = true)
- * @method static \Illuminate\Database\Eloquent\Builder<static>|CompanyAccountPayable withoutTrashed()
- * @mixin \Eloquent
- */
- class CompanyAccountPayable extends Model
- {
- use HasFactory, SoftDeletes;
- public const ORIGIN_MANUAL = 'manual';
- protected $table = 'company_account_payables';
- protected $guarded = ['id'];
- protected $casts = [
- 'value' => 'decimal:2',
- 'paid_value' => 'decimal:2',
- 'discount' => 'decimal:2',
- 'fine' => 'decimal:2',
- 'due_date' => 'date',
- 'payment_date' => 'date',
- 'created_at' => 'datetime',
- 'updated_at' => 'datetime',
- 'deleted_at' => 'datetime',
- ];
- public function planAccount(): BelongsTo
- {
- return $this->belongsTo(FinancialPlanAccount::class, 'financial_plan_account_id');
- }
- }
|