Archived
Template
1
0
This repository has been archived on 2023-12-20. You can view files and clone it, but cannot push or open issues or pull requests.
Files
golang-base-project/models/user.go

18 lines
360 B
Go
Raw Normal View History

2021-12-12 14:56:13 +01:00
// Package models defines all the database models for the application
package models
import (
"gorm.io/gorm"
"time"
)
// User holds information relating to users that use the application
2021-12-12 14:56:13 +01:00
type User struct {
gorm.Model
Email string
Password string
ActivatedAt *time.Time
Tokens []Token `gorm:"polymorphic:Model;"`
Sessions []Session
}