chore: defer Sourcery auth; continue work

This commit is contained in:
Wikid82
2025-11-17 22:08:59 -05:00
parent 4f3b7d8f99
commit 4602cbd100
6114 changed files with 1457188 additions and 0 deletions

View File

@@ -0,0 +1,20 @@
package models
import (
"time"
)
// User represents authenticated users with role-based access control.
// Supports local auth, SSO integration planned for later phases.
type User struct {
ID uint `json:"id" gorm:"primaryKey"`
UUID string `json:"uuid" gorm:"uniqueIndex"`
Email string `json:"email" gorm:"uniqueIndex"`
PasswordHash string `json:"-"` // Never serialize password hash
Name string `json:"name"`
Role string `json:"role" gorm:"default:'user'"` // "admin", "user", "viewer"
Enabled bool `json:"enabled" gorm:"default:true"`
LastLogin *time.Time `json:"last_login,omitempty"`
CreatedAt time.Time `json:"created_at"`
UpdatedAt time.Time `json:"updated_at"`
}