summaryrefslogtreecommitdiff
path: root/internal/models/user.go
diff options
context:
space:
mode:
authorWayne-Cole <77279425+Wacky404@users.noreply.github.com>2025-06-14 12:01:58 -0500
committerWayne-Cole <77279425+Wacky404@users.noreply.github.com>2025-06-14 12:01:58 -0500
commit93abcd43c769737347e2d3ffd830eafa03e2a8d2 (patch)
tree9b985fb3aafdc5ceac59d389145a0fcd1a76d8d0 /internal/models/user.go
parent091e53e4f01562f48b9d97246c677e5ef44bbebf (diff)
downloadrpserver-93abcd43c769737347e2d3ffd830eafa03e2a8d2.tar.xz
rpserver-93abcd43c769737347e2d3ffd830eafa03e2a8d2.zip
chore: updating files; stilll not doone
Diffstat (limited to 'internal/models/user.go')
-rw-r--r--internal/models/user.go32
1 files changed, 32 insertions, 0 deletions
diff --git a/internal/models/user.go b/internal/models/user.go
new file mode 100644
index 0000000..938cf71
--- /dev/null
+++ b/internal/models/user.go
@@ -0,0 +1,32 @@
+package models
+
+import "time"
+
+// this is more than likely going to change
+type Password [16]byte
+type SessionID [16]byte
+
+type Token struct {
+ ID ID `json:"id"`
+ String string `json:"string"`
+ ExpiresAt time.Time `json:"expires_at"`
+}
+
+type User struct {
+ ID ID `json:"id"`
+ Name string `json:"name"`
+ Password Password `json:"password"`
+ Admin bool `json:"admin"`
+ Token Token `json:"token"`
+ CreatedAt time.Time `json:"created_at"`
+ LastUpdated time.Time `json:"last_updated"`
+}
+
+type UserSession struct {
+ SessionID SessionID `json:"session_id"`
+ IP string `json:"ip"`
+ UA string `json:"ua"`
+ UserID ID `json:"user_id"`
+ ExpiresAt time.Time `json:"expires_at"`
+ LastUpdated time.Time `json:"last_login"`
+}