aboutsummaryrefslogtreecommitdiff
path: root/customer/customer.go
diff options
context:
space:
mode:
Diffstat (limited to 'customer/customer.go')
-rw-r--r--customer/customer.go15
1 files changed, 4 insertions, 11 deletions
diff --git a/customer/customer.go b/customer/customer.go
index 1a5d6f1..21cae9e 100644
--- a/customer/customer.go
+++ b/customer/customer.go
@@ -1,5 +1,5 @@
/* openbills - Server for web based Libre Billing Software
- * Copyright (C) 2023 Vidhu Kant Sharma <vidhukant@vidhukant.com>
+ * Copyright (C) 2023-2024 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,6 +20,7 @@ package customer
import (
"gorm.io/gorm"
d "vidhukant.com/openbills/db"
+ u "vidhukant.com/openbills/util"
"vidhukant.com/openbills/user"
)
@@ -30,23 +31,15 @@ func init() {
db.AutoMigrate(&Customer{}, &CustomerBillingAddress{}, &CustomerShippingAddress{})
}
-type Address struct {
- AddressText string
- City string
- State string
- PostalCode string
- Country string
-}
-
type CustomerBillingAddress struct {
gorm.Model
- Address
+ u.Address
CustomerID uint
}
type CustomerShippingAddress struct {
gorm.Model
- Address
+ u.Address
CustomerID uint
}