mirror of
https://github.com/getAlby/lndhub.go.git
synced 2026-01-26 16:25:57 +01:00
* use null string for optional attributes * auto update created_at/updated_at * set indexes
19 lines
444 B
Go
19 lines
444 B
Go
package models
|
|
|
|
import (
|
|
"database/sql"
|
|
"time"
|
|
)
|
|
|
|
// User : User Model
|
|
type User struct {
|
|
ID uint `gorm:"primary_key"`
|
|
Email sql.NullString
|
|
Login string `gorm:"index"`
|
|
Password string `gorm:"index"`
|
|
RefreshToken sql.NullString `gorm:"index"`
|
|
AccessToken sql.NullString `gorm:"index"`
|
|
UpdatedAt time.Time `gorm:"autoUpdateTime`
|
|
CreatedAt time.Time `gorm:"autoCreateTime"`
|
|
}
|