basemodel

package
v1.0.22 Latest Latest
Warning

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

Go to latest
Published: Apr 11, 2024 License: MulanPSL-2.0 Imports: 9 Imported by: 9

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func EsInit

func EsInit()

初始化

Types

type BitField

type BitField bool

func (*BitField) MarshalJSON

func (t *BitField) MarshalJSON() ([]byte, error)

func (*BitField) Scan

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

func (*BitField) UnmarshalJSON

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

func (*BitField) Value

func (t *BitField) Value() (driver.Value, error)

type EsModel

type EsModel struct {
	IndexName string
	TypeName  string
	ID        string
	Body      interface{}
}

func (*EsModel) DeleteById

func (es *EsModel) DeleteById(id string)

func (*EsModel) FindById

func (es *EsModel) FindById(id string)

func (*EsModel) Save

func (es *EsModel) Save()

type IchubLocalTime

type IchubLocalTime time.Time

type LocalDate

type LocalDate struct {
	time.Time
}

func (*LocalDate) FormatDate

func (t *LocalDate) FormatDate() string

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(data []byte) error

func (*LocalDate) Value

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

type LocalDateInt

type LocalDateInt struct {
	time.Time
}

func (*LocalDateInt) FormatDate

func (t *LocalDateInt) FormatDate() string

func (*LocalDateInt) FormatDatetime

func (t *LocalDateInt) FormatDatetime() string

func (LocalDateInt) MarshalJSON

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

func (*LocalDateInt) Scan

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

func (*LocalDateInt) UnmarshalJSON

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

func (LocalDateInt) Value

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

func (*LocalDateInt) Zero

func (t *LocalDateInt) Zero() LocalDateInt

type LocalTime

type LocalTime struct {
	time.Time
}

func NewLocalTime

func NewLocalTime(time time.Time) *LocalTime

func (*LocalTime) FormatDatetime

func (t *LocalTime) FormatDatetime() string

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(data []byte) error

func (*LocalTime) Value

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

type LocalTimeInt

type LocalTimeInt struct {
	time.Time
}

func (*LocalTimeInt) FormatDate

func (t *LocalTimeInt) FormatDate() string

func (*LocalTimeInt) FormatDatetime

func (t *LocalTimeInt) FormatDatetime() string

func (LocalTimeInt) MarshalJSON

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

func (*LocalTimeInt) Scan

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

func (*LocalTimeInt) UnmarshalJSON

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

func (LocalTimeInt) Value

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

func (*LocalTimeInt) Zero

func (t *LocalTimeInt) Zero() LocalTimeInt

type LocalTimeUTCInt

type LocalTimeUTCInt struct {
	time.Time
}

func (*LocalTimeUTCInt) FormatDate

func (t *LocalTimeUTCInt) FormatDate() string

func (*LocalTimeUTCInt) FormatDatetime

func (t *LocalTimeUTCInt) FormatDatetime() string

func (LocalTimeUTCInt) MarshalJSON

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

func (*LocalTimeUTCInt) Scan

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

func (*LocalTimeUTCInt) UnmarshalJSON

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

func (LocalTimeUTCInt) Value

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

func (*LocalTimeUTCInt) Zero

func (t *LocalTimeUTCInt) Zero() LocalTimeUTCInt

type ModelBase

type ModelBase struct {
	// gorm.Model
	// Id        *uint64     `gorm:"primary_key" json:"id"`
	CreatedAt *LocalDateInt `json:"created_at"`
	UpdatedAt *LocalDateInt `json:"updated_at"`
	DeletedAt *LocalDateInt `gorm:"column:deleted_at;type:timestamp" sql:"index" json:"-"`
	CreatedBy *uint64       `json:"create_by"`
	UpdatedBy *uint64       `json:"updated_by"`
	DeletedBy *uint64       `json:"deleted_by"`
}

func (*ModelBase) String

func (entity *ModelBase) String() string

func (*ModelBase) ToString

func (entity *ModelBase) ToString() string

type ParamBase

type ParamBase struct {
	DateRanges   map[string][]int64  `json:"date_ranges,string"`
	IntRanges    map[string][]int64  `json:"int_ranges,string"`
	StringRanges map[string][]string `json:"string_ranges"`

	InRanges map[string]string `json:"in_ranges"`
}

func (*ParamBase) Ini

func (pb *ParamBase) Ini()

func (*ParamBase) String

func (param *ParamBase) String() string

func (*ParamBase) ToString

func (param *ParamBase) ToString() string

Jump to

Keyboard shortcuts

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