From 894042060791ec106ad12ddf1b4a7b872c4a6aa6 Mon Sep 17 00:00:00 2001 From: Vidhu Kant Sharma Date: Tue, 31 Jan 2023 14:45:55 +0530 Subject: added contact and address info to user --- user/user.go | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) (limited to 'user') diff --git a/user/user.go b/user/user.go index 6fc6163..3ada9e6 100644 --- a/user/user.go +++ b/user/user.go @@ -19,6 +19,7 @@ package user import ( "errors" + c "github.com/MikunoNaka/OpenBills-server/client" "github.com/MikunoNaka/OpenBills-server/database" "go.mongodb.org/mongo-driver/bson/primitive" "go.mongodb.org/mongo-driver/mongo" @@ -43,10 +44,15 @@ type Session struct { type User struct { Id primitive.ObjectID `bson:"_id,omitempty" json:"Id"` UserName string `bson:"UserName" json:"UserName"` - Email string `bson:"Email" json:"Email"` - Password string `bson:"Password" json:"Password"` - Config Config `bson:"Config" json:"Config"` - Sessions []Session `bson:"Sessions" json:"Sessions"` + // business title, etc + Title string `bson:"Title" json:"Title"` + Email string `bson:"Email" json:"Email"` + Password string `bson:"Password" json:"Password"` + Config Config `bson:"Config" json:"Config"` + Sessions []Session `bson:"Sessions" json:"Sessions"` + Contact c.Contact `bson:"Contact" json:"Contact"` + Address c.Address `bson:"Address" json:"Address"` + GSTIN string `bson:"GSTIN" json:"GSTIN"` // some actions are only available when email is verified Verified bool `bson:"Verified" json:"Verified"` } -- cgit v1.2.3