model

package
v0.0.0-...-52cd3d9 Latest Latest
Warning

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

Go to latest
Published: Mar 25, 2022 License: GPL-3.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewDBEngine

func NewDBEngine(databaseSettings *setting.DatabaseSetting) (*gorm.DB, error)

Types

type User

type User struct {
	ID        uint64 `json:"user_id" gorm:"autoIncrement"`
	UserName  string `json:"user_name"`
	Nickname  string `json:"nickname"`
	Password  string `json:"-"`
	CreatedAt int64  `json:"created_at"`
	UpdatedAt int64  `json:"updated_at"`
}

func (User) Create

func (u User) Create(db *gorm.DB) *errcode.Error

func (User) Get

func (u User) Get(db *gorm.DB) (*User, *errcode.Error)

Jump to

Keyboard shortcuts

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