|UnitAccountPayable newModelQuery() * @method static \Illuminate\Database\Eloquent\Builder|UnitAccountPayable newQuery() * @method static \Illuminate\Database\Eloquent\Builder|UnitAccountPayable onlyTrashed() * @method static \Illuminate\Database\Eloquent\Builder|UnitAccountPayable query() * @method static \Illuminate\Database\Eloquent\Builder|UnitAccountPayable whereCreatedAt($value) * @method static \Illuminate\Database\Eloquent\Builder|UnitAccountPayable whereDeletedAt($value) * @method static \Illuminate\Database\Eloquent\Builder|UnitAccountPayable whereDiscount($value) * @method static \Illuminate\Database\Eloquent\Builder|UnitAccountPayable whereDueDate($value) * @method static \Illuminate\Database\Eloquent\Builder|UnitAccountPayable whereFine($value) * @method static \Illuminate\Database\Eloquent\Builder|UnitAccountPayable whereFranchiseeAccountReceiveId($value) * @method static \Illuminate\Database\Eloquent\Builder|UnitAccountPayable whereHistory($value) * @method static \Illuminate\Database\Eloquent\Builder|UnitAccountPayable whereId($value) * @method static \Illuminate\Database\Eloquent\Builder|UnitAccountPayable whereObs($value) * @method static \Illuminate\Database\Eloquent\Builder|UnitAccountPayable whereOrigin($value) * @method static \Illuminate\Database\Eloquent\Builder|UnitAccountPayable wherePaidValue($value) * @method static \Illuminate\Database\Eloquent\Builder|UnitAccountPayable wherePaymentDate($value) * @method static \Illuminate\Database\Eloquent\Builder|UnitAccountPayable whereStatus($value) * @method static \Illuminate\Database\Eloquent\Builder|UnitAccountPayable whereUnitId($value) * @method static \Illuminate\Database\Eloquent\Builder|UnitAccountPayable whereUpdatedAt($value) * @method static \Illuminate\Database\Eloquent\Builder|UnitAccountPayable whereValue($value) * @method static \Illuminate\Database\Eloquent\Builder|UnitAccountPayable withTrashed(bool $withTrashed = true) * @method static \Illuminate\Database\Eloquent\Builder|UnitAccountPayable withoutTrashed() * @mixin \Eloquent */ class UnitAccountPayable extends Model { use HasFactory, SoftDeletes; public const ORIGIN_TBR = 'tbr'; public const ORIGIN_MANUAL = 'manual'; protected $table = 'unit_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 unit(): BelongsTo { return $this->belongsTo(Unit::class, 'unit_id'); } public function franchiseeAccountReceive(): BelongsTo { return $this->belongsTo(FranchiseeAccountReceive::class, 'franchisee_account_receive_id'); } }