diff options
| author | Vidhu Kant Sharma <vidhukant@vidhukant.com> | 2024-04-05 11:36:43 +0530 | 
|---|---|---|
| committer | Vidhu Kant Sharma <vidhukant@vidhukant.com> | 2024-04-05 11:36:43 +0530 | 
| commit | 10aed3cea7935f2f22ef713cff9839dd16afce48 (patch) | |
| tree | 54e8e150e93f172ecba37792059da2b2658c59df /customer/customer.go | |
| parent | bb088225a27d04c8237bfcdc7658a5564e838082 (diff) | |
moved some validator logic and common structs to util package
Diffstat (limited to 'customer/customer.go')
| -rw-r--r-- | customer/customer.go | 15 | 
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  }  |