1
0
mirror of https://github.com/muety/wakapi.git synced 2023-08-10 21:12:56 +03:00

feat: persist user creation date (resolve #31)

This commit is contained in:
Ferdinand Mütsch
2020-05-30 22:19:05 +02:00
parent 1872bf4b4c
commit c1e6a3e265
7 changed files with 111 additions and 69 deletions

View File

@@ -1,9 +1,11 @@
package models
type User struct {
ID string `json:"id" gorm:"primary_key"`
ApiKey string `json:"api_key" gorm:"unique"`
Password string `json:"-"`
ID string `json:"id" gorm:"primary_key"`
ApiKey string `json:"api_key" gorm:"unique"`
Password string `json:"-"`
CreatedAt CustomTime `gorm:"type:timestamp; default:CURRENT_TIMESTAMP"`
LastLoggedInAt CustomTime `gorm:"type:timestamp; default:CURRENT_TIMESTAMP"`
}
type Login struct {