- google/uuid -> gofrs/uuid/v5 across server + agent - windows.go: cross-platform binding cleanup - linux install template: disable sudo lecture for TTY-less service user - README: XZ/SolarWinds lede, stable-release note, single attack-surface block
21 lines
No EOL
581 B
Go
21 lines
No EOL
581 B
Go
package models
|
|
|
|
import (
|
|
"time"
|
|
|
|
"github.com/gofrs/uuid/v5"
|
|
)
|
|
|
|
type User struct {
|
|
ID uuid.UUID `json:"id" db:"id"`
|
|
Username string `json:"username" db:"username"`
|
|
Email string `json:"email" db:"email"`
|
|
PasswordHash string `json:"-" db:"password_hash"` // Don't include in JSON
|
|
CreatedAt time.Time `json:"created_at" db:"created_at"`
|
|
LastLogin *time.Time `json:"last_login" db:"last_login"`
|
|
}
|
|
|
|
type UserCredentials struct {
|
|
Username string `json:"username" binding:"required"`
|
|
Password string `json:"password" binding:"required"`
|
|
} |