diff options
author | Vidhu Kant Sharma <vidhukant@vidhukant.xyz> | 2023-01-31 14:45:55 +0530 |
---|---|---|
committer | Vidhu Kant Sharma <vidhukant@vidhukant.xyz> | 2023-01-31 14:45:55 +0530 |
commit | 894042060791ec106ad12ddf1b4a7b872c4a6aa6 (patch) | |
tree | 7c305ce72b296794065fa5f36f62290a9f48ea17 /user | |
parent | 7be2937c84c7b9e260498268c210fd6f4bebf2a3 (diff) |
Diffstat (limited to 'user')
-rw-r--r-- | user/user.go | 14 |
1 files changed, 10 insertions, 4 deletions
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"` } |