$products */ class IrrecusableProposalUnit extends Model { use HasFactory, SoftDeletes; protected $table = 'irrecusable_proposal_units'; protected $guarded = ['id']; protected $casts = [ 'registration_value' => 'float', 'registration_included_in_course' => 'boolean', 'registration_installments_allowed' => 'boolean', 'registration_max_installments' => 'integer', 'classes_value' => 'float', 'classes_included_in_course' => 'boolean', 'classes_installments_allowed' => 'boolean', 'classes_max_installments' => 'integer', 'classes_discount_percentage' => 'float', 'materials_total_value' => 'float', 'materials_included_in_course' => 'boolean', 'materials_installments_allowed' => 'boolean', 'materials_max_installments' => 'integer', 'total_value' => 'float', 'total_max_installments' => 'integer', ]; public function packageUnit(): BelongsTo { return $this->belongsTo(ClassPackageUnit::class, 'class_package_unit_id'); } public function baseIrrecusableProposal(): BelongsTo { return $this->belongsTo(IrrecusableProposal::class, 'irrecusable_proposal_id'); } public function products(): HasMany { return $this->hasMany(IrrecusableProposalUnitProduct::class); } }