diff options
author | Vidhu Kant Sharma <vidhukant@vidhukant.com> | 2025-10-12 13:38:07 +0530 |
---|---|---|
committer | Vidhu Kant Sharma <vidhukant@vidhukant.com> | 2025-10-12 13:38:07 +0530 |
commit | fd863aadf34b9837bd77587c1d36eb49000a8de7 (patch) | |
tree | c1ba13e609134451b8956b92f618d5e36c272839 /customer/customer.go | |
parent | a356803594ab36fa69e7dbcbd79261d8b46f4262 (diff) |
Diffstat (limited to 'customer/customer.go')
-rw-r--r-- | customer/customer.go | 41 |
1 files changed, 19 insertions, 22 deletions
diff --git a/customer/customer.go b/customer/customer.go index 521c531..0d107d7 100644 --- a/customer/customer.go +++ b/customer/customer.go @@ -1,5 +1,5 @@ /* openbills - Server for web based Libre Billing Software - * Copyright (C) 2023-2024 Vidhu Kant Sharma <vidhukant@vidhukant.com> + * Copyright (C) 2023-2025 Vidhu Kant Sharma <vidhukant@vidhukant.com> * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -20,36 +20,33 @@ package customer import ( "gorm.io/gorm" d "vidhukant.com/openbills/db" - u "vidhukant.com/openbills/util" ) var db *gorm.DB func init() { db = d.DB - db.AutoMigrate(&Customer{}, &CustomerBillingAddress{}, &CustomerShippingAddress{}) + db.AutoMigrate(&Customer{}) } -type CustomerBillingAddress struct { +type Customer struct { gorm.Model - u.Address - CustomerID uint -} + FirmName string + Gstin string + ContactName string + Phone string + Email string + Website string -type CustomerShippingAddress struct { - gorm.Model - u.Address - CustomerID uint -} + BillingAddressText string + BillingAddressCity string + BillingAddressState string + BillingAddressPostalCode string + BillingAddressCountry string -type Customer struct { - gorm.Model - FirmName string - Gstin string - ContactName string - Phone string - Email string - Website string - BillingAddress CustomerBillingAddress - ShippingAddress CustomerShippingAddress + ShippingAddressText string + ShippingAddressCity string + ShippingAddressState string + ShippingAddressPostalCode string + ShippingAddressCountry string } |