models

package
v1.3.0 Latest Latest
Warning

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

Go to latest
Published: Jun 2, 2026 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

View Source
const (
	LOCAL_TIME_FORMAT = "2006-01-02 15:04:05"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type IntegerTime

type IntegerTime struct {
	time.Time
}

func NowIntegerTime

func NowIntegerTime() *IntegerTime

func (IntegerTime) MarshalJSON

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

func (*IntegerTime) Scan

func (t *IntegerTime) Scan(value interface{}) error

func (*IntegerTime) UnmarshalJSON

func (t *IntegerTime) UnmarshalJSON(data []byte) error

func (IntegerTime) Value

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

type ModelID

type ModelID string

func NewModelID

func NewModelID(id uint64) ModelID

func (ModelID) Uint64

func (m ModelID) Uint64() uint64

func (ModelID) Value

func (m ModelID) Value() (driver.Value, error)

Value 实现数据库驱动所支持的值 没有该方法会将ModelID在驱动层转换后string,导致与数据库定义类型不匹配

type StringTime

type StringTime struct {
	time.Time
}

func NowStringTime

func NowStringTime() *StringTime

func (StringTime) MarshalJSON

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

func (*StringTime) Scan

func (t *StringTime) Scan(value interface{}) error

func (*StringTime) UnmarshalJSON

func (t *StringTime) UnmarshalJSON(data []byte) error

func (StringTime) Value

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

Jump to

Keyboard shortcuts

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