model

package
v1.2.0 Latest Latest
Warning

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

Go to latest
Published: Feb 1, 2024 License: MulanPSL-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

View Source
const (
	TimeTemplate = "2006-01-02 15:04:05"
	DateTemplate = "2006-01-02"

	UTCTimeTemplate = "2006-01-02T15:04:05.000Z"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type CmsUser

type CmsUser struct {
	gorm.Model
	Name      string `gorm:"type:varchar(20);not null"`
	Telephone string `gorm:"varchar(110);not null;unique"`
	Password  string `gorm:"size:255;not null"`
}

type Date

type Date struct {
	time.Time
}

func (*Date) MarshalJSON

func (d *Date) MarshalJSON() ([]byte, error)

func (*Date) UnmarshalJSON

func (d *Date) UnmarshalJSON(b []byte) error

type Datetime

type Datetime struct {
	time.Time
}

func (Datetime) MarshalJSON

func (d Datetime) MarshalJSON() ([]byte, error)

func (Datetime) UnmarshalJSON

func (d Datetime) UnmarshalJSON(b []byte) error

type DatetimeUTC

type DatetimeUTC struct {
	time.Time
}

func (*DatetimeUTC) MarshalJSON

func (d *DatetimeUTC) MarshalJSON() ([]byte, error)

func (*DatetimeUTC) UnmarshalJSON

func (d *DatetimeUTC) UnmarshalJSON(b []byte) error

type Hr

type Hr struct {
	HrBase
	Id        *int32  `gorm:"column:id" json:"id"`
	Name      *string `gorm:"column:name" json:"name"`
	Phone     *string `gorm:"column:phone" json:"phone"`
	Telephone *string `gorm:"column:telephone" json:"telephone"`
	Address   *string `gorm:"column:address" json:"address"`
	Enabled   *int8   `gorm:"column:enabled" json:"enabled"`
	Username  *string `gorm:"column:username" json:"username"`
	Password  *string `gorm:"column:password" json:"password"`
	Userface  *string `gorm:"column:userface" json:"userface"`
	Remark    *string `gorm:"column:remark" json:"remark"`
}

func (*Hr) TableName

func (*Hr) TableName() string

type HrBase

type HrBase struct{}

type UnixTime

type UnixTime struct {
	timestamp.Timestamp
}

func (UnixTime) MarshalJSON

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

Jump to

Keyboard shortcuts

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