model

package
v0.0.0-...-ce4b7f3 Latest Latest
Warning

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

Go to latest
Published: Mar 13, 2022 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Init

func Init(ctx context.Context)

func InitMysql

func InitMysql(ctx context.Context)

func Set

func Set(ctx context.Context, key string, value interface{}, expire time.Duration) (string, error)

Types

type TestTable

type TestTable struct {
	ID          int64     `gorm:"column:id"`
	OrderNo     string    `gorm:"column:order_no"`
	Name        string    `gorm:"column:name"`
	Content     string    `gorm:"column:content"`
	Num         int64     `gorm:"column:num"`
	GmtCreated  time.Time `gorm:"column:gmt_created"`
	GmtModified time.Time `gorm:"column:gmt_modified"`
}

func (*TestTable) TableName

func (*TestTable) TableName() string

TableName 重写表名方法

type TestTableDao

type TestTableDao struct {
}

TestTableDao 数据访问对象

func TestTableDaoInstance

func TestTableDaoInstance() *TestTableDao

func (*TestTableDao) Create

func (dao *TestTableDao) Create(ctx context.Context, order *TestTable) (bool, error)

Jump to

Keyboard shortcuts

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