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

Addresses #26

Open
drewroberts opened this issue Mar 1, 2021 · 2 comments
Open

Addresses #26

drewroberts opened this issue Mar 1, 2021 · 2 comments
Labels
model description Description of a model perpetual Never ending issues

Comments

@drewroberts
Copy link
Member

There should be a polymorhic table for Addressables.

This will include an Address (#19) relationship and a $table->morphs('addressable'); column type with a unique key added for address_id, addressable_id, addressable_type. It will have the following additional fields:

  • timestamps
  • creator
  • updater
  • primary_billing (nullable)
  • primary_shipping (nullable)
  • first_name (nullable)
  • last_name (nullable)
  • care_of (nullable)
  • company (nullable)
  • extended_zip (nullable)
  • phone (nullable)

We'll use this for a few models, but primarily:

We'll just use an address relationship for:

@drewroberts
Copy link
Member Author

With the renaming of the existing Addresses model to Domestic Addresses (#19) and the future model of Foreign Addresses (#51), we can rename this table and create a model for it called Addresses.

@drewroberts drewroberts changed the title Addressable Addresses Mar 9, 2021
@pdbreen
Copy link
Contributor

pdbreen commented Mar 12, 2021

Correction to initial description - cart, order (and vouchers and payments) use the polymorphic relation to Address, not a direct relation to DomesticAddress. Any object that needs the enhanced fields will use the polymorphic relation.

@alliroberts alliroberts added model description Description of a model perpetual Never ending issues labels Mar 13, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
model description Description of a model perpetual Never ending issues
Projects
None yet
Development

No branches or pull requests

3 participants