<?php

namespace App\Classes\Modules\Addresses\Services;

use App\Classes\General\Eloquent\AbstractUpdateRecord;
use App\Classes\Modules\Addresses\DataTransferObjects\AddressObject;
use App\Models\Address;

class ResetsAddressDefault
{

    /**
     * @param Address $model
     * @return void
     */
    public function execute(Address $model) {
        $model->company->addresses()->update([
            'default' => false,
            'billing' => false
        ]);

    }
}