dbops

package
v0.0.0-...-8221240 Latest Latest
Warning

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

Go to latest
Published: Feb 25, 2020 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AddRecord

func AddRecord(re *Record) error

func GetTimestampSec

func GetTimestampSec(t time.Time) int

Types

type Record

type Record struct {
	ID         uint       `gorm:"AUTO_INCREMENT;not null"`
	Name       string     `gorm:"type:varchar(64)" form:"name"`
	StudentID  string     `gorm:"type:varchar(64);not null" form:"student_id"`
	Phone      string     `gorm:"type:varchar(64)" form:"phone"`
	Province   string     `gorm:"type:text" form:"province"`
	Address    string     `gorm:"type:text" form:"address"`
	Temp       uint       `form:"temp"`
	CreateTime *time.Time `gorm:"default:current_timestamp"`
}

data model

func ListRecords

func ListRecords(from, to time.Time) ([]*Record, error)

Jump to

Keyboard shortcuts

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