BaseLookup

package
v5.1.29 Latest Latest
Warning

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

Go to latest
Published: Apr 18, 2024 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DeleteDomain

func DeleteDomain(id int64) (err error)

func DeleteLookup

func DeleteLookup(id int64) (err error)

func GetDomainNameByID

func GetDomainNameByID(id int64) (name string)

func Init

func Init()

func UpdateDomain

func UpdateDomain(args *ArgsUpdateDomain) (err error)

func UpdateLookup

func UpdateLookup(args *ArgsUpdateLookup) (err error)

Types

type ArgsCreateDomain

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

type ArgsCreateLookup

type ArgsCreateLookup struct {
	//是否为系统预设
	IsSys bool `db:"is_sys" json:"isSys" check:"bool"`
	//领域ID
	DomainID int64 `db:"domain_id" json:"domainID" check:"id" empty:"true"`
	//管理单元
	UnitID int64 `db:"unit_id" json:"unitID" check:"id" empty:"true"`
	//编码
	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 ArgsGetDomainList

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

type ArgsGetLookupList

type ArgsGetLookupList struct {
	//分页参数
	Pages CoreSQL2.ArgsPages `json:"pages"`
	//是否为系统预设
	IsSys bool `db:"is_sys" json:"isSys" check:"bool"`
	//领域ID
	DomainID int64 `db:"domain_id" json:"domainID" check:"id" empty:"true"`
	//管理单元
	UnitID int64 `db:"unit_id" json:"unitID" check:"id" empty:"true"`
	//是否删除
	IsRemove bool `json:"isRemove" check:"bool"`
	//搜索
	Search string `json:"search" check:"search" empty:"true"`
}

type ArgsUpdateDomain

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

type ArgsUpdateLookup

type ArgsUpdateLookup struct {
	//ID
	ID int64 `db:"id" json:"id" check:"id"`
	//领域ID
	DomainID int64 `db:"domain_id" json:"domainID" check:"id" empty:"true"`
	//管理单元
	UnitID int64 `db:"unit_id" json:"unitID" check:"id" empty:"true"`
	//编码
	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 FieldsDomain

type FieldsDomain 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"`
	//名称
	Name string `db:"name" json:"name" check:"des" min:"1" max:"300"`
}

func CreateDomain

func CreateDomain(args *ArgsCreateDomain) (data FieldsDomain, err error)

func GetDomainID

func GetDomainID(id int64) (data FieldsDomain)

func GetDomainList

func GetDomainList(args *ArgsGetDomainList) (dataList []FieldsDomain, dataCount int64, err error)

type FieldsLookup

type FieldsLookup 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"`
	//是否为系统预设
	IsSys bool `db:"is_sys" json:"isSys" check:"bool"`
	//领域ID
	DomainID int64 `db:"domain_id" json:"domainID" check:"id" empty:"true"`
	//管理单元
	UnitID int64 `db:"unit_id" json:"unitID" check:"id" empty:"true"`
	//编码
	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 CreateLookup

func CreateLookup(args *ArgsCreateLookup) (data FieldsLookup, err error)

func GetLookupCode

func GetLookupCode(code string) (data FieldsLookup)

func GetLookupID

func GetLookupID(id int64) (data FieldsLookup)

func GetLookupList

func GetLookupList(args *ArgsGetLookupList) (dataList []FieldsLookup, dataCount int64, err error)

Jump to

Keyboard shortcuts

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