Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

The Customer model refactoring [FEATURE] #181

Open
bohdan-vorona opened this issue Apr 17, 2023 · 0 comments
Open

The Customer model refactoring [FEATURE] #181

bohdan-vorona opened this issue Apr 17, 2023 · 0 comments
Assignees

Comments

@bohdan-vorona
Copy link
Contributor

Is your feature request related to a problem? Please describe.

We have two classes - common\models\Customer and frontend\models\Customer. The Order class uses the common\models\Customer class:

    public function getCustomer()
    {
        return $this->hasOne('common\models\Customer', ['id' => 'customer_id']);
    }

but in this task #180 I needed frontend\models\Customer since frontend\models\Customer has some additional methods like isLinkedToUser, getUserCustomer, and getUsers.

Describe the solution you'd like

Figure out why there are two different classes and potentially move the logic from frontend\models\Customer to common\models\Customer and leave only one class. Replace all the found places in the codebase with common\models\Customer instead of frontend\models\Customer.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant