dbmodel

package
v0.0.0-...-4cf6d85 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jun 18, 2022 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var DBInstance *gorm.DB

Functions

func InitializeDatabase

func InitializeDatabase(config *config.Configuration) (*gorm.DB, error)

Types

type AccessToken

type AccessToken struct {
	gorm.Model
	UserID uint   `json:"userId"`
	Token  string `json:"token"`
}

type DB

type DB struct {
	DB *gorm.DB
}

func Init

func Init(config *config.Configuration) (*DB, error)

type User

type User struct {
	gorm.Model
	Name         string `gorm:"Not Null" json:"name"`
	EmailID      string `gorm:"Not Null" json:"emailId"`
	Password     string `gorm:"Not Null" json:"password"`
	HighestScore uint   `json:"highestScore"`
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL