aim-oscar-server/models/EmailVerification.go
2022-01-16 14:43:48 -05:00

18 lines
563 B
Go

package models
import (
"time"
"github.com/uptrace/bun"
)
// TODO: move this out of here and into API server
type EmailVerification struct {
bun.BaseModel `bun:"table:email_verification"`
UserUIN int64 `bun:",pk,notnull,unique"`
User *User `bun:"rel:has-one,join:user_uin=uin"`
Token string `bun:",notnull"`
Used bool `bun:",notnull,default:false"`
CreatedAt time.Time `bun:",nullzero,notnull,default:current_timestamp"`
UpdatedAt time.Time `bun:",nullzero,notnull,default:current_timestamp"`
}