chore: initial public commit

This commit is contained in:
Gabe Farrell 2025-06-11 19:45:39 -04:00
commit fc9054b78c
250 changed files with 32809 additions and 0 deletions

37
internal/models/user.go Normal file
View file

@ -0,0 +1,37 @@
package models
import (
"time"
"github.com/google/uuid"
)
type UserRole string
const (
UserRoleUser UserRole = "user"
UserRoleAdmin UserRole = "admin"
)
type User struct {
ID int32 `json:"id"`
Username string `json:"username"`
Role UserRole `json:"role"` // 'admin' | 'user'
Password []byte `json:"-"`
}
type ApiKey struct {
ID int32 `json:"id"`
Key string `json:"key"`
Label string `json:"label"`
UserID int32 `json:"user_id"`
CreatedAt time.Time `json:"created_at"`
}
type Session struct {
ID uuid.UUID
UserID int32
CreatedAt time.Time
ExpiresAt time.Time
Persistent bool
}