feat: major feature updates and cleanup

- Add Redis architecture implementation
- Update browser extension functionality
- Clean up deprecated files and documentation
- Enhance backend handlers for auth, messages, search
- Add new configuration options and settings
- Update Docker and deployment configurations
This commit is contained in:
Tomas Dvorak
2026-03-03 11:03:37 +01:00
parent 446bc7acfb
commit 083373a24f
241 changed files with 46662 additions and 24880 deletions
+33
View File
@@ -0,0 +1,33 @@
package models
import (
"time"
)
// APIKey represents an API key for browser extension
type APIKey struct {
ID uint `json:"id" gorm:"primaryKey"`
Name string `json:"name" gorm:"not null"`
Key string `json:"key" gorm:"not null;uniqueIndex"`
UserID uint `json:"user_id" gorm:"not null"`
Permissions []string `json:"permissions" gorm:"serializer:json"`
IsActive bool `json:"is_active" gorm:"default:true"`
LastUsed *time.Time `json:"last_used,omitempty" gorm:"not null"`
CreatedAt time.Time `json:"created_at" gorm:"autoCreateTime"`
UpdatedAt time.Time `json:"updated_at" gorm:"autoUpdateTime"`
ExpiresAt *time.Time `json:"expires_at,omitempty" gorm:"not null"`
User User `json:"user,omitempty" gorm:"foreignKey:UserID"`
}
// BrowserExtension represents a browser extension registration
type BrowserExtension struct {
ID uint `json:"id" gorm:"primaryKey"`
UserID uint `json:"user_id" gorm:"not null"`
ExtensionID string `json:"extension_id" gorm:"not null"`
Name string `json:"name" gorm:"not null"`
IsActive bool `json:"is_active" gorm:"default:true"`
LastSeen *time.Time `json:"last_seen,omitempty" gorm:"not null"`
CreatedAt time.Time `json:"created_at" gorm:"autoCreateTime"`
UpdatedAt time.Time `json:"updated_at" gorm:"autoUpdateTime"`
User User `json:"user,omitempty" gorm:"foreignKey:UserID"`
}