dao

package
v0.0.0-...-3237e8e Latest Latest
Warning

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

Go to latest
Published: Feb 28, 2022 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var DB *gorm.DB

Functions

func Init

func Init(config configs.Mysql)

Types

type Age

type Age struct {
	CommonTimeModel
	Id        uint64 `json:"id" gorm"primaryKey"`
	Age       uint64 `json:"age"`
	IsDeleted uint64 `json:"is_deleted" gorm:"default:0" `
}

type AgeDao

type AgeDao struct {
	DB *gorm.DB
}

func NewAgeDao

func NewAgeDao() *AgeDao

func (*AgeDao) Create

func (dao *AgeDao) Create(data Age) (err error)

func (*AgeDao) DeleteByIds

func (dao *AgeDao) DeleteByIds(ids []uint64) (err error)

func (*AgeDao) FindAgeByAge

func (dao *AgeDao) FindAgeByAge(age uint64) (Age, error)

func (*AgeDao) FindByFields

func (dao *AgeDao) FindByFields(fields map[string]interface{}) ([]Age, error)

func (*AgeDao) UpdateFields

func (dao *AgeDao) UpdateFields(where map[string]interface{}, updateFileds map[string]interface{}) (err error)

type CommonTimeModel

type CommonTimeModel struct {
	CreatedAt time.Time `json:"created_at"`
	UpdatedAt time.Time `json:"updated_at"`
}

Jump to

Keyboard shortcuts

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