basemodel

package
v1.0.1-rel-02 Latest Latest
Warning

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

Go to latest
Published: Nov 12, 2024 License: AFL-3.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func InjectModelBase

func InjectModelBase(s *ModelBase)

func LoadModelBase

func LoadModelBase() baseiface.ISingleton

Types

type BaseModel

type BaseModel struct {
	BaseModelSimple
	//Id            string `json:"id"`
	// 时间类型
	DeletedAt *time.Time `json:"deleted_at"`
	//ui used 时间整型
	DeleteAtInt *int64 `json:"deleted_at_int" gorm:"-"`
	// 创建与更新者
	DeletedBy int64 `json:"deleted_by"`
	// biz set2ui 创建与更新人名称 `
	DeletedByName string `json:"deleted_by_name" gorm:"-"`
}

func NewBaseModel

func NewBaseModel() *BaseModel

func (*BaseModel) BaseInt2Time

func (self *BaseModel) BaseInt2Time()

func (*BaseModel) BaseTime2Int

func (self *BaseModel) BaseTime2Int()

type BaseModelSimple

type BaseModelSimple struct {
	//Id            string `json:"id"`
	// 时间类型
	CreatedAt time.Time `json:"created_at"`
	UpdatedAt time.Time `json:"updated_at"`
	//	DeletedAt *time.Time `json:"deleted_at"`
	//ui used 时间整型
	CreatedAtInt int64 `json:"created_at_int" gorm:"-"`
	UpdatedAtInt int64 `json:"updated_at_int" gorm:"-"`
	//	DeleteAtInt  *int64 `json:"deleted_at_int" gorm:"-"`
	// 创建与更新者
	CreatedBy int64 `json:"created_by"`
	UpdatedBy int64 `json:"updated_by"`
	//DeletedBy int64 `json:"deleted_by"`
	// biz set2ui 创建与更新人名称
	CreatedByName string `json:"created_by_name" gorm:"-"`
	UpdatedByName string `json:"updated_by_name" gorm:"-"`

	baseiface.IbizModel `json:"-" gorm:"-"`
}

func NewBaseModelSimple

func NewBaseModelSimple() *BaseModelSimple

func (*BaseModelSimple) BaseInt2Time

func (self *BaseModelSimple) BaseInt2Time()

func (*BaseModelSimple) BaseTime2Int

func (self *BaseModelSimple) BaseTime2Int()

func (*BaseModelSimple) HandleCheck

func (self *BaseModelSimple) HandleCheck() error

func (*BaseModelSimple) HandleRequest

func (self *BaseModelSimple) HandleRequest() error

func (*BaseModelSimple) HandleResult

func (self *BaseModelSimple) HandleResult() error

func (*BaseModelSimple) Int2Time

func (self *BaseModelSimple) Int2Time(intime int64) time.Time

func (*BaseModelSimple) Time2Int

func (self *BaseModelSimple) Time2Int(intime time.Time) int64

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 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 {
	basedto.BaseEntity
	BaseModel
}

func FindBeanModelBase

func FindBeanModelBase() *ModelBase

FindBeanModelBase

func NewModelBase

func NewModelBase() *ModelBase

Jump to

Keyboard shortcuts

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