18 lines
337 B
Go
18 lines
337 B
Go
|
package model
|
||
|
|
||
|
import (
|
||
|
"gorm.io/gorm"
|
||
|
"time"
|
||
|
)
|
||
|
|
||
|
type Account struct {
|
||
|
gorm.Model
|
||
|
ID uint `gorm:"primaryKey"`
|
||
|
Email string `gorm:"uniqueIndex"`
|
||
|
Password *string
|
||
|
CreatedAt time.Time
|
||
|
UpdatedAt time.Time
|
||
|
LoginTokens []LoginSession `gorm:"references:ID"`
|
||
|
Keys []Key `gorm:"references:ID"`
|
||
|
}
|