model

package
v0.0.4 Latest Latest
Warning

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

Go to latest
Published: Nov 16, 2021 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type BaseMysqlStruct

type BaseMysqlStruct struct {
	Id         int       `json:"id" gorm:"primary_key;AUTO_INCREMENT;comment:'主键'"`
	CreateTime LocalTime `json:"create_time" gorm:"NOT NULL;DEFAULT:CURRENT_TIMESTAMP;comment:'创建时间'"`
	UpdateTime LocalTime `json:"update_time" gorm:"NULL; DEFAULT:NULL ON UPDATE CURRENT_TIMESTAMP;comment:'更新时间'"`
	IsDelete   bool      `json:"is_delete" gorm:"DEFAULT:'0';comment:'是否删除 0 未删除 1删除'"`
}

type LocalTime

type LocalTime struct {
	time.Time
}

func (LocalTime) MarshalJSON

func (t LocalTime) MarshalJSON() ([]byte, error)

func (LocalTime) Now

func (t LocalTime) Now() LocalTime

func (*LocalTime) Scan

func (t *LocalTime) Scan(v interface{}) error

func (LocalTime) Value

func (t LocalTime) Value() (driver.Value, error)

Jump to

Keyboard shortcuts

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