BaseUnit

package
v5.1.42 Latest Latest
Warning

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

Go to latest
Published: Jul 4, 2024 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DeleteUnit

func DeleteUnit(id int64) (err error)

func GetUnitNameByID

func GetUnitNameByID(id int64) (name string)

func Init

func Init()

func UpdateUnit

func UpdateUnit(args *ArgsUpdateUnit) (err error)

Types

type ArgsCreateUnit

type ArgsCreateUnit struct {
	//编码
	Code string `db:"code" json:"code" check:"des" min:"1" max:"100"`
	//名称
	Name string `db:"name" json:"name" check:"des" min:"1" max:"300"`
}

type ArgsGetUnitList

type ArgsGetUnitList struct {
	//分页参数
	Pages CoreSQL2.ArgsPages `json:"pages"`
	//是否删除
	IsRemove bool `json:"isRemove" check:"bool"`
	//搜索
	Search string `json:"search" check:"search" empty:"true"`
}

type ArgsUpdateUnit

type ArgsUpdateUnit struct {
	//ID
	ID int64 `db:"id" json:"id" check:"id"`
	//名称
	Name string `db:"name" json:"name" check:"des" min:"1" max:"300"`
}

type FieldsUnit

type FieldsUnit struct {
	//ID
	ID int64 `db:"id" json:"id"`
	//创建时间
	CreateAt time.Time `db:"create_at" json:"createAt"`
	//更新时间
	UpdateAt time.Time `db:"update_at" json:"updateAt"`
	//删除时间
	DeleteAt time.Time `db:"delete_at" json:"deleteAt"`
	//编码
	Code string `db:"code" json:"code" check:"des" min:"1" max:"100"`
	//名称
	Name string `db:"name" json:"name" check:"des" min:"1" max:"300"`
}

func CreateUnit

func CreateUnit(args *ArgsCreateUnit) (data FieldsUnit, err error)

func GetUnitByCode

func GetUnitByCode(code string) (data FieldsUnit)

func GetUnitByID

func GetUnitByID(id int64) (data FieldsUnit)

func GetUnitList

func GetUnitList(args *ArgsGetUnitList) (dataList []FieldsUnit, dataCount int64, err error)

func GetUnitNoDeleteByCode

func GetUnitNoDeleteByCode(code string) (data FieldsUnit)

Jump to

Keyboard shortcuts

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