db

package
v0.0.0-...-3fa6b80 Latest Latest
Warning

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

Go to latest
Published: Aug 31, 2021 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AddBirthday

func AddBirthday(b *Birthday) error

AddBirthday 添加生日

func ConnDB

func ConnDB() error

func CountBirthday

func CountBirthday() int64

CountBirthday 返回生日的总数

func IsBirthdayExist

func IsBirthdayExist(animate string, name string) bool

func IsErrBirthdayAlreadyExist

func IsErrBirthdayAlreadyExist(err error) bool

Types

type Birthday

type Birthday struct {
	gorm.Model

	Animate string
	Name    string
	Date    string
}

Birthday 数据库表结构

func GetBirthday

func GetBirthday() []*Birthday

GetBirthday 批量获取生日 options[0] offset options[1] limit

func GetTodayBirthday

func GetTodayBirthday() []*Birthday

GetTodayBirthday 获取当日生日

type ErrBirthdayAlreadyExist

type ErrBirthdayAlreadyExist struct {
	// contains filtered or unexported fields
}

func (ErrBirthdayAlreadyExist) Error

func (err ErrBirthdayAlreadyExist) Error() string

Jump to

Keyboard shortcuts

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