Add admin password reset functionality for users and customers

This commit is contained in:
Mazyar
2026-05-29 20:15:09 +03:30
parent 42cd0452ce
commit bb221f3cda
20 changed files with 686 additions and 16 deletions
+13 -12
View File
@@ -45,22 +45,23 @@ const (
// Customer represents a customer in the tender management system
// A customer can have an associated company for login purposes
type Customer struct {
mongo.Model `bson:",inline"`
FullName *string `bson:"full_name"`
Username string `bson:"username"`
Email string `bson:"email"`
Password string `bson:"password"`
Status CustomerStatus `bson:"status"`
Type CustomerType `bson:"type"`
Role CustomerRole `bson:"role"`
Phone *string `bson:"phone"`
mongo.Model `bson:",inline"`
FullName *string `bson:"full_name"`
Username string `bson:"username"`
Email string `bson:"email"`
Password string `bson:"password"`
Status CustomerStatus `bson:"status"`
Type CustomerType `bson:"type"`
Role CustomerRole `bson:"role"`
Phone *string `bson:"phone"`
Companies []string `bson:"companies"`
Keywords []string `bson:"keywords,omitempty"`
KeywordsStatus KeywordsStatus `bson:"keywords_status,omitempty"`
DeviceToken []string `bson:"device_token"`
LastLoginAt *int64 `bson:"last_login_at"`
UpdatedAt int64 `bson:"updated_at"`
CreatedAt int64 `bson:"created_at"`
LastLoginAt *int64 `bson:"last_login_at"`
UpdatedBy *string `bson:"updated_by,omitempty"`
UpdatedAt int64 `bson:"updated_at"`
CreatedAt int64 `bson:"created_at"`
}
// SetID sets the customer ID (implements IDSetter interface)