diff options
author | Vidhu Kant Sharma <vidhukant@vidhukant.com> | 2023-09-03 22:02:56 +0530 |
---|---|---|
committer | Vidhu Kant Sharma <vidhukant@vidhukant.com> | 2023-09-03 22:02:56 +0530 |
commit | c6bc8d0c6d1c1ab5d26b9e47e0248002d22ecf8f (patch) | |
tree | a80b66210b6f45aaa8b3c0c39baeda451b38f765 /customer/customer.go | |
parent | 6922e09f46a24b7bd70db5e78ab1c4a77e59303c (diff) |
moved contact details to customer model for simplicity
Diffstat (limited to 'customer/customer.go')
-rw-r--r-- | customer/customer.go | 24 |
1 files changed, 8 insertions, 16 deletions
diff --git a/customer/customer.go b/customer/customer.go index 23c630d..e411ad5 100644 --- a/customer/customer.go +++ b/customer/customer.go @@ -27,18 +27,7 @@ var db *gorm.DB func init() { db = d.DB - db.AutoMigrate(&Customer{}, &CustomerContact{}, &CustomerBillingAddress{}, &CustomerShippingAddress{}) -} - -type CustomerContact struct { - gorm.Model - UserID uint `json:"-"` - User user.User `json:"-"` - CustomerID uint - Name string - Phone string - Email string - Website string + db.AutoMigrate(&Customer{}, &CustomerBillingAddress{}, &CustomerShippingAddress{}) } type Address struct { @@ -64,8 +53,11 @@ type Customer struct { UserID uint `json:"-"` User user.User `json:"-"` Name string - Gstin string - Contact CustomerContact - BillingAddress CustomerBillingAddress - ShippingAddresses []CustomerShippingAddress + Gstin string + ContactName string + Phone string + Email string + Website string + //BillingAddress CustomerBillingAddress + //ShippingAddresses []CustomerShippingAddress } |