| 12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152 |
- <?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 Receber avulsas 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
- */
- class CompanyAccountReceivable extends Model
- {
- use HasFactory, SoftDeletes;
- public const ORIGIN_MANUAL = 'manual';
- protected $table = 'company_account_receivables';
- 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');
- }
- }
|