model

package
v0.0.0-...-8a048ba Latest Latest
Warning

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

Go to latest
Published: Nov 27, 2024 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Init

func Init()

Types

type CatModel

type CatModel struct {
	DB *db.DB
}

func GetCatModel

func GetCatModel() *CatModel

func NewCatModel

func NewCatModel() *CatModel

func (*CatModel) BatchCreate

func (m *CatModel) BatchCreate(ctx context.Context, cat ...*cat.Cat) (int64, error)

func (*CatModel) BatchDelete

func (m *CatModel) BatchDelete(ctx context.Context, ids ...string) (int64, error)

func (*CatModel) BatchGet

func (m *CatModel) BatchGet(ctx context.Context, ids ...string) ([]*cat.Cat, error)

func (*CatModel) BatchUpdate

func (m *CatModel) BatchUpdate(ctx context.Context, cat []*cat.Cat) (int64, error)

func (*CatModel) Create

func (m *CatModel) Create(ctx context.Context, cat *cat.Cat) (int64, error)

func (*CatModel) Delete

func (m *CatModel) Delete(ctx context.Context, id string) (int64, error)

func (*CatModel) Get

func (m *CatModel) Get(ctx context.Context, id string) (*cat.Cat, error)

func (*CatModel) List

func (m *CatModel) List(ctx context.Context, filter string, condition ...string) ([]*cat.Cat, error)

func (*CatModel) Update

func (m *CatModel) Update(ctx context.Context, cat *cat.Cat) (int64, error)

Jump to

Keyboard shortcuts

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