cymzjsmodel

package
v0.0.0-...-5aa174a Latest Latest
Warning

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

Go to latest
Published: Mar 25, 2024 License: MIT Imports: 17 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrNotFound = sqlx.ErrNotFound

Functions

This section is empty.

Types

type Api

type Api struct {
	Id    int64  `db:"id" json:"id"`
	Path  string `db:"path" json:"path"`
	Value string `db:"value" json:"value"`
}

type ApiModel

type ApiModel struct {
	sqlx.CachedConn
	// contains filtered or unexported fields
}

func NewApiModel

func NewApiModel(conn sqlx.Conn, clusterConf cache.ClusterConf) *ApiModel

func (*ApiModel) Delete

func (m *ApiModel) Delete(id ...int64) error

func (*ApiModel) FindMany

func (m *ApiModel) FindMany(ids []int64, workers ...int) (list []*Api)

func (*ApiModel) FindManyByPaths

func (m *ApiModel) FindManyByPaths(oKeys []string, workers ...int) (list []*Api)

func (*ApiModel) FindOne

func (m *ApiModel) FindOne(id int64) (*Api, error)

func (*ApiModel) FindOneByPath

func (m *ApiModel) FindOneByPath(path string) (*Api, error)

func (*ApiModel) Insert

func (m *ApiModel) Insert(data Api) (sql.Result, error)

func (*ApiModel) TxDelete

func (m *ApiModel) TxDelete(tx sqlx.TxSession, id ...int64) error

func (*ApiModel) TxInsert

func (m *ApiModel) TxInsert(tx sqlx.TxSession, data Api) (sql.Result, error)

func (*ApiModel) TxUpdate

func (m *ApiModel) TxUpdate(tx sqlx.TxSession, data Api) error

func (*ApiModel) TxUpdatePartial

func (m *ApiModel) TxUpdatePartial(tx sqlx.TxSession, ms ...g.Map) (err error)

func (*ApiModel) Update

func (m *ApiModel) Update(data Api) error

func (*ApiModel) UpdatePartial

func (m *ApiModel) UpdatePartial(ms ...g.Map) (err error)

type Memorial

type Memorial struct {
	Id          int64     `db:"id" json:"id"`
	UserId      int64     `db:"user_id" json:"userId"`
	HeadImg     string    `db:"head_img" json:"headImg"`
	NameOne     string    `db:"name_one" json:"nameOne"`
	RelationOne string    `db:"relation_one" json:"relationOne"`
	NameTwo     string    `db:"name_two" json:"nameTwo"`
	RelationTwo string    `db:"relation_two" json:"relationTwo"`
	CreateTime  time.Time `db:"create_time" json:"createTime"` // 创建时间
	UpdateTime  time.Time `db:"update_time" json:"updateTime"` // 更新时间
}

type MemorialModel

type MemorialModel struct {
	sqlx.CachedConn
	// contains filtered or unexported fields
}

func NewMemorialModel

func NewMemorialModel(conn sqlx.Conn, clusterConf cache.ClusterConf) *MemorialModel

func (*MemorialModel) Delete

func (m *MemorialModel) Delete(id ...int64) error

func (*MemorialModel) FindMany

func (m *MemorialModel) FindMany(ids []int64, workers ...int) (list []*Memorial)

func (*MemorialModel) FindOne

func (m *MemorialModel) FindOne(id int64) (*Memorial, error)

func (*MemorialModel) Insert

func (m *MemorialModel) Insert(data Memorial) (sql.Result, error)

func (*MemorialModel) TxDelete

func (m *MemorialModel) TxDelete(tx sqlx.TxSession, id ...int64) error

func (*MemorialModel) TxInsert

func (m *MemorialModel) TxInsert(tx sqlx.TxSession, data Memorial) (sql.Result, error)

func (*MemorialModel) TxUpdate

func (m *MemorialModel) TxUpdate(tx sqlx.TxSession, data Memorial) error

func (*MemorialModel) TxUpdatePartial

func (m *MemorialModel) TxUpdatePartial(tx sqlx.TxSession, ms ...g.Map) (err error)

func (*MemorialModel) Update

func (m *MemorialModel) Update(data Memorial) error

func (*MemorialModel) UpdatePartial

func (m *MemorialModel) UpdatePartial(ms ...g.Map) (err error)

type User

type User struct {
	Id         int64     `db:"id" json:"id"`
	Openid     string    `db:"openid" json:"openid"`
	CreateTime time.Time `db:"create_time" json:"createTime"` // 创建时间
	UpdateTime time.Time `db:"update_time" json:"updateTime"` // 更新时间
}

type UserModel

type UserModel struct {
	sqlx.CachedConn
	// contains filtered or unexported fields
}

func NewUserModel

func NewUserModel(conn sqlx.Conn, clusterConf cache.ClusterConf) *UserModel

func (*UserModel) Delete

func (m *UserModel) Delete(id ...int64) error

func (*UserModel) FindMany

func (m *UserModel) FindMany(ids []int64, workers ...int) (list []*User)

func (*UserModel) FindManyByOpenids

func (m *UserModel) FindManyByOpenids(oKeys []string, workers ...int) (list []*User)

func (*UserModel) FindOne

func (m *UserModel) FindOne(id int64) (*User, error)

func (*UserModel) FindOneByOpenid

func (m *UserModel) FindOneByOpenid(openid string) (*User, error)

func (*UserModel) Insert

func (m *UserModel) Insert(data User) (sql.Result, error)

func (*UserModel) TxDelete

func (m *UserModel) TxDelete(tx sqlx.TxSession, id ...int64) error

func (*UserModel) TxInsert

func (m *UserModel) TxInsert(tx sqlx.TxSession, data User) (sql.Result, error)

func (*UserModel) TxUpdate

func (m *UserModel) TxUpdate(tx sqlx.TxSession, data User) error

func (*UserModel) TxUpdatePartial

func (m *UserModel) TxUpdatePartial(tx sqlx.TxSession, ms ...g.Map) (err error)

func (*UserModel) Update

func (m *UserModel) Update(data User) error

func (*UserModel) UpdatePartial

func (m *UserModel) UpdatePartial(ms ...g.Map) (err error)

Jump to

Keyboard shortcuts

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