From 776522d8741752832981b17ec81deb11a298ef57 Mon Sep 17 00:00:00 2001 From: Vidhu Kant Sharma Date: Sun, 3 Sep 2023 16:18:20 +0530 Subject: different customers for different users --- customer/customer.go | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'customer/customer.go') diff --git a/customer/customer.go b/customer/customer.go index 5f25e2d..23c630d 100644 --- a/customer/customer.go +++ b/customer/customer.go @@ -20,6 +20,7 @@ package customer import ( "gorm.io/gorm" d "vidhukant.com/openbills/db" + "vidhukant.com/openbills/user" ) var db *gorm.DB @@ -31,6 +32,8 @@ func init() { type CustomerContact struct { gorm.Model + UserID uint `json:"-"` + User user.User `json:"-"` CustomerID uint Name string Phone string @@ -58,6 +61,8 @@ type CustomerShippingAddress struct { type Customer struct { gorm.Model + UserID uint `json:"-"` + User user.User `json:"-"` Name string Gstin string Contact CustomerContact -- cgit v1.2.3