mirror of
https://github.com/lordmathis/lemma.git
synced 2025-11-06 07:54:22 +00:00
Rework db package to make it testable
This commit is contained in:
13
server/internal/models/session.go
Normal file
13
server/internal/models/session.go
Normal file
@@ -0,0 +1,13 @@
|
||||
// Package models contains the data models used throughout the application. These models are used to represent data in the database, as well as to validate and serialize data in the application.
|
||||
package models
|
||||
|
||||
import "time"
|
||||
|
||||
// Session represents a user session in the database
|
||||
type Session struct {
|
||||
ID string // Unique session identifier
|
||||
UserID int // ID of the user this session belongs to
|
||||
RefreshToken string // The refresh token associated with this session
|
||||
ExpiresAt time.Time // When this session expires
|
||||
CreatedAt time.Time // When this session was created
|
||||
}
|
||||
Reference in New Issue
Block a user