model

package
v1.0.7 Latest Latest
Warning

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

Go to latest
Published: Jul 16, 2021 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type LocalDate

type LocalDate struct {
	time.Time
}

func (LocalDate) MarshalJSON

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

func (*LocalDate) Scan

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

func (*LocalDate) UnmarshalJSON

func (t *LocalDate) UnmarshalJSON(b []byte) (err error)

func (LocalDate) Value

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

type LocalTime

type LocalTime struct {
	time.Time
}

func (LocalTime) MarshalJSON

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

func (*LocalTime) Scan

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

func (*LocalTime) UnmarshalJSON

func (t *LocalTime) UnmarshalJSON(b []byte) (err error)

func (LocalTime) Value

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

type Model

type Model struct {
	Id        uint           `json:"id" gorm:"primary_key"`
	CreatedAt LocalTime      `json:"created_at" gorm:"type:datetime(6);not null;default:CURRENT_TIMESTAMP(6);comment:创建时间"`
	UpdatedAt LocalTime      `` /* 131-byte string literal not displayed */
	DeletedAt gorm.DeletedAt `json:"-" gorm:"index" `
}

type NullString

type NullString struct {
	sql.NullString
}

func (NullString) MarshalJSON

func (ns NullString) MarshalJSON() ([]byte, error)

func (*NullString) UnmarshalJSON

func (ns *NullString) UnmarshalJSON(b []byte) error

func (NullString) Value

func (ns NullString) Value() (driver.Value, error)

type NullUint

type NullUint struct {
	Uint  uint
	Valid bool
}

func (NullUint) MarshalJSON

func (ns NullUint) MarshalJSON() ([]byte, error)

func (*NullUint) UnmarshalJSON

func (ns *NullUint) UnmarshalJSON(b []byte) error

func (NullUint) Value

func (ns NullUint) Value() (driver.Value, error)

Jump to

Keyboard shortcuts

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