mysqlc

package
v1.0.6 Latest Latest
Warning

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

Go to latest
Published: Aug 31, 2023 License: MIT Imports: 7 Imported by: 0

Documentation

Overview

mysql

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Affair

func Affair(db *sql.DB, txFunc func(*sql.Tx) error) (err error)

Trans 事务

func InitStart

func InitStart(address, port, username, password, database string, config *gorm.Config) (*gorm.DB, error)

func InitUserProfile

func InitUserProfile()

Types

type User

type User struct {
	ID                     int64  `json:"id,omitempty" gorm:"primary_key;comment:'id'"`
	Name                   string `json:"name,omitempty" gorm:"not nul;unique_index:name;UNIQUE;comment:'用户名'"`
	Sex                    int
	Avatar                 string
	Birthday               string
	Email                  string `json:"email,omitempty" gorm:"not nul;unique_index:email;UNIQUE;comment:'邮箱'"` //邮箱
	Password               string
	Salt                   string
	CreatedAt              time.Time
	UpdatedAt              time.Time
	DeletedAExampleClientt gorm.DeletedAt `gorm:"index"`
}

Jump to

Keyboard shortcuts

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