@@ -5,16 +5,16 @@ import "time"
55// User represents a user in the identity provider system.
66// The ID and Email fields are unique identifiers.
77type User struct {
8- ID string `json:"id"`
9- Provider Provider `json:"provider"`
10- Name string `json:"name"`
11- Email string `json:"email"`
12- Verified bool `json:"verified"`
13- Password string `json:"password"`
14- Roles []string `json:"roles"` // e.g., ["admin", "user"]
15- CreatedAt time.Time `json:"created_at"`
16- IsActive bool `json:"is_active"`
17- Metadata map [string ]string `json:"metadata"` // Additional user metadata
8+ ID string `json:"id" bson:"id" `
9+ Provider Provider `json:"provider" bson:"provider" `
10+ Name string `json:"name" bson:"name" `
11+ Email string `json:"email" bson:"email" `
12+ Verified bool `json:"verified" bson:"verified" `
13+ Password string `json:"password" bson:"password" `
14+ Roles []string `json:"roles" bson:"roles" ` // e.g., ["admin", "user"]
15+ CreatedAt time.Time `json:"created_at" bson:"created_at" `
16+ IsActive bool `json:"is_active" bson:"is_active" `
17+ Metadata map [string ]string `json:"metadata" bson:"metadata" ` // Additional user metadata
1818}
1919
2020func (u * User ) IsAdmin () bool {
0 commit comments