generaliface

package
v1.0.1-rel-01 Latest Latest
Warning

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

Go to latest
Published: Nov 12, 2024 License: AFL-3.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type GeneralDaoIface

type GeneralDaoIface[P GoPkey, E IBaseModel[P]] interface {
	Insert(entity E) (P, error)
	DeleteById(pkey P) error
	Save(entity E) (P, error)
	Update(entity E) (P, error)
	UpdateNotNull(pkey P, maps map[string]any) (P, error)
	UpdateMap(pkey P, maps map[string]interface{}) (P, error)

	GeneralDaoQueryIface[P, E]
}

type GeneralDaoQueryIface

type GeneralDaoQueryIface[P GoPkey, E IBaseModel[P]] interface {
	FindById(pkey P) (entity E, found bool, err error)
	FindByIds(pks string) (*[]E, error)
	Query() *page.PageResult
	QueryModel() *pagemodel.PageResult[E]
	QueryPageui() *pageui.PageuiResult
	QueryPageuiModel() *pageuimodel.PageuiResult[E]
	Count() (int, error)

	GetDB() *gorm.DB
}

type GoPkey

type GoPkey interface {
	~int | ~int32 | ~int64 | ~string | ~uint32 | ~uint64 | ~uint
}

type IBaseEsModel

type IBaseEsModel[P GoPkey] interface {
	//	PkeyName() string
	//	PkeyValue() P
	TableName() string
	CreateAliasIndex() error
	GetMapping() string
}

type IBaseModel

type IBaseModel[P GoPkey] interface {
	PkeyName() string
	PkeyValue() P
	TableName() string
}

type ServiceIface

type ServiceIface interface {
	Query(param *page.PageRequest) *page.PageResult
	Count(param *page.PageRequest) (int, error)

	FindById(SubsysId int32) *basedto.IchubResult
	FindByIds(pks string) *page.PageResult
	DeleteById(Id int32) *basedto.IchubResult
	//Save(entity any) *basedto.IchubResult
	UpdateNotNull(Id int32, entity map[string]interface{}) *basedto.IchubResult
}

type WebIface

type WebIface interface {
	Query(ctx *gin.Context)
	FindById(ctx *gin.Context)
	DeleteById(ctx *gin.Context)
	Save(ctx *gin.Context)
	UpdateNotNull(ctx *gin.Context)
}

Jump to

Keyboard shortcuts

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