package user import ( "github.com/google/uuid" ) // UserRole represents user roles in the system type UserRole string const ( UserRoleAdmin UserRole = "admin" UserRoleManager UserRole = "manager" UserRoleOperator UserRole = "operator" UserRoleViewer UserRole = "viewer" ) // UserStatus represents user account status type UserStatus string const ( UserStatusActive UserStatus = "active" UserStatusInactive UserStatus = "inactive" UserStatusSuspended UserStatus = "suspended" ) // User represents a system user (admin/manager/operator) type User struct { ID uuid.UUID `bson:"_id"` FullName string `bson:"full_name"` Username string `bson:"username"` Email string `bson:"email"` Password string `bson:"password"` // Never serialize password Role UserRole `bson:"role"` Status UserStatus `bson:"status"` CompanyID *uuid.UUID `bson:"company_id,omitempty"` Department *string `bson:"department,omitempty"` Position *string `bson:"position,omitempty"` Phone *string `bson:"phone,omitempty"` ProfileImage *string `bson:"profile_image,omitempty"` IsVerified bool `bson:"is_verified"` LastLoginAt *int64 `bson:"last_login_at,omitempty"` // Unix timestamp CreatedAt int64 `bson:"created_at"` // Unix timestamp UpdatedAt int64 `bson:"updated_at"` // Unix timestamp CreatedBy *uuid.UUID `bson:"created_by,omitempty"` UpdatedBy *uuid.UUID `bson:"updated_by,omitempty"` }