From b7c3e058e9b161065b9024458fc7be0b3c5e8cb5 Mon Sep 17 00:00:00 2001 From: Julien Dessaux Date: Sat, 10 Apr 2021 20:11:35 +0200 Subject: Implemented a user table and the CreateUser function --- pkg/model/users.go | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) create mode 100644 pkg/model/users.go (limited to 'pkg/model/users.go') diff --git a/pkg/model/users.go b/pkg/model/users.go new file mode 100644 index 0000000..dfef67b --- /dev/null +++ b/pkg/model/users.go @@ -0,0 +1,17 @@ +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"` +} + +type UserRegistration struct { + Username string `json:"username"` + Password string `json:"password"` + Email string `json:"email"` +} -- cgit v1.2.3