madipo2611 6f5298d420 v0.0.3
2025-05-03 02:37:08 +03:00

25 lines
734 B
Go

package domain
import "time"
type Device struct {
ID int `json:"id"`
UserID int `json:"userId"`
Name string `json:"name"`
IPAddress string `json:"ipAddress"`
UserAgent string `json:"userAgent"`
ConfirmationToken string `json:"-"`
ExpiresAt time.Time `json:"expiresAt"`
CreatedAt time.Time `json:"createdAt"`
}
type Session struct {
ID int `json:"id"`
UserID int `json:"userId"`
DeviceID int `json:"deviceId"`
Device *Device `json:"device,omitempty"`
StartedAt time.Time `json:"startedAt"`
EndedAt time.Time `json:"endedAt,omitempty"`
IsCurrent bool `json:"isCurrent,omitempty"`
}