diff options
author | Vidhu Kant Sharma <vidhukant@vidhukant.com> | 2023-09-03 23:39:05 +0530 |
---|---|---|
committer | Vidhu Kant Sharma <vidhukant@vidhukant.com> | 2023-09-03 23:39:05 +0530 |
commit | cba9f19ba50c60576a5961e89c24caefca52d740 (patch) | |
tree | 5dd36d4903c640e11a022c5fbf0e55adc3cdd5a5 /customer/customer.go | |
parent | 46083ff15e16b0b49132af9466bcab7c2ae71322 (diff) |
deleting addresses upon customer deletionv0.0.5
Diffstat (limited to 'customer/customer.go')
-rw-r--r-- | customer/customer.go | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/customer/customer.go b/customer/customer.go index e411ad5..1a5d6f1 100644 --- a/customer/customer.go +++ b/customer/customer.go @@ -39,11 +39,13 @@ type Address struct { } type CustomerBillingAddress struct { + gorm.Model Address CustomerID uint } type CustomerShippingAddress struct { + gorm.Model Address CustomerID uint } @@ -58,6 +60,6 @@ type Customer struct { Phone string Email string Website string - //BillingAddress CustomerBillingAddress - //ShippingAddresses []CustomerShippingAddress + BillingAddress CustomerBillingAddress + ShippingAddresses []CustomerShippingAddress } |