Refresh Tokens

This commit is contained in:
2025-03-11 22:39:58 +02:00
parent 5fe09f0a2f
commit 1bad21ae45
13 changed files with 254 additions and 15 deletions

View File

@@ -5,6 +5,7 @@
package database
import (
"database/sql"
"time"
"github.com/google/uuid"
@@ -18,6 +19,15 @@ type Chirp struct {
UserID uuid.UUID
}
type RefreshToken struct {
Token string
CreatedAt time.Time
UpdatedAt time.Time
UserID uuid.UUID
ExpiresAt time.Time
RevokedAt sql.NullTime
}
type User struct {
ID uuid.UUID
CreatedAt time.Time