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

BillingData and ShopBillingData difference? #83

Closed
tautelis opened this issue Nov 19, 2018 · 1 comment
Closed

BillingData and ShopBillingData difference? #83

tautelis opened this issue Nov 19, 2018 · 1 comment
Labels
RFC Discussions about potential changes or new features.

Comments

@tautelis
Copy link
Contributor

tautelis commented Nov 19, 2018

What is the difference between BillingData and ShopBillingData?
Why one is declared in Sylius\InvoicingPlugin\DependencyInjection\Configuration and the other is not?
Relations should point interfaces not models.

@bartoszpietrzak1994
Copy link
Contributor

Hello Vytautas,

First of all, BillingData is a Resource (for more info, please visit https://docs.sylius.com/en/1.3/components_and_bundles/components/Resource/index.html), it's placed on every invoice and delivered by a customer. As a result, the database needs to store multiple BIllingData entities.

Since it's a Resource, it needs to be configured (you need to point to the class itself, its interface, repository etc.) and that's why it's present in Sylius\InvoicingPlugin\DependencyInjection\Configuration file.

On the other hand, ShopBillingData is set globally for one channel - that's why there's no need to declare repository, factory or controller for that entity and thus ShopBillingData is not a resource.

What do you mean by Relations should point interfaces not models.? I've checked the configuration, Invoice entity, ShopBillingDataTrait and relations are always based on interfaces.

@Zales0123 Zales0123 added the RFC Discussions about potential changes or new features. label Nov 26, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
RFC Discussions about potential changes or new features.
Projects
None yet
Development

No branches or pull requests

3 participants