diff options
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 } |