model

package
v0.0.45 Latest Latest
Warning

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

Go to latest
Published: Jun 16, 2022 License: Apache-2.0 Imports: 6 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:"type:datetime;NOT NULL; DEFAULT:CURRENT_TIMESTAMP;comment:创建时间"`
	UpdateTime LocalTime             `json:"update_time" gorm:"type:datetime;DEFAULT:NULL ON UPDATE CURRENT_TIMESTAMP;comment:更新时间"`
	IsDelete   soft_delete.DeletedAt `json:"is_delete" gorm:"softDelete:flag;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) String added in v0.0.21

func (t LocalTime) String() string

func (LocalTime) StringDate added in v0.0.21

func (t LocalTime) StringDate() string

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