aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--pkg/database/migrations.go3
-rw-r--r--pkg/model/users.go9
2 files changed, 5 insertions, 7 deletions
diff --git a/pkg/database/migrations.go b/pkg/database/migrations.go
index 7c74bcf..ada638a 100644
--- a/pkg/database/migrations.go
+++ b/pkg/database/migrations.go
@@ -15,8 +15,7 @@ var allMigrations = []func(tx *sql.Tx) error{
username TEXT NOT NULL UNIQUE,
hash TEXT,
email TEXT,
- created_at DATE DEFAULT (datetime('now')),
- last_login_at DATE DEFAULT NULL
+ created_at DATE DEFAULT (datetime('now'))
);
CREATE TABLE sessions (
token TEXT PRIMARY KEY,
diff --git a/pkg/model/users.go b/pkg/model/users.go
index 943d161..0edee32 100644
--- a/pkg/model/users.go
+++ b/pkg/model/users.go
@@ -3,11 +3,10 @@ package model
import "time"
type User struct {
- Id int `json:"id"`
- Username string `json:"username"`
- Email string `json:"email"`
- Created_at *time.Time `json:"created_at"`
- Last_login_at *time.Time `json:"last_login_at"`
+ Id int
+ Username string
+ Email string
+ CreatedAt *time.Time
}
type UserLogin struct {