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 Bank

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

type BankDao

type BankDao struct {
	DB *gorm.DB
}

func NewBankDao

func NewBankDao() *BankDao

func (*BankDao) Create

func (dao *BankDao) Create(data Bank) (err error)

func (*BankDao) DeleteByIds

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

func (*BankDao) FindAgeByAge

func (dao *BankDao) FindAgeByAge(age uint64) (Bank, error)

func (*BankDao) FindByFields

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

func (*BankDao) UpdateFields

func (dao *BankDao) 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