Documentation
¶
Index ¶
- type BaseModel
- type Date
- type Int32Array
- func (arr *Int32Array) GormDataType() string
- func (arr *Int32Array) Length() int
- func (arr *Int32Array) MarshalJSON() ([]byte, error)
- func (arr *Int32Array) Scan(value interface{}) error
- func (arr *Int32Array) String() string
- func (arr *Int32Array) UnmarshalJSON(by []byte) error
- func (arr *Int32Array) Value() (driver.Value, error)
- type Time
- type TimeRange
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type BaseModel ¶
type BaseModel struct { ID uint `gorm:"primarykey"` // 主键ID CreatedAt time.Time // 创建时间 UpdatedAt time.Time // 更新时间 DeletedAt gorm.DeletedAt `gorm:"index" json:"-"` // 删除时间 }
BaseModel 通用数据结构
type Int32Array ¶
type Int32Array struct {
// contains filtered or unexported fields
}
Int32Array 自定义Gorm字段类型,必须使用指针类型
func NewInt32Array ¶ added in v0.0.3
func NewInt32Array(len int) *Int32Array
func (*Int32Array) GormDataType ¶
func (arr *Int32Array) GormDataType() string
GormDataType -> sets type to binary(16)
func (*Int32Array) Length ¶
func (arr *Int32Array) Length() int
func (*Int32Array) MarshalJSON ¶
func (arr *Int32Array) MarshalJSON() ([]byte, error)
func (*Int32Array) Scan ¶
func (arr *Int32Array) Scan(value interface{}) error
Scan --> tells GORM how to receive from the database
func (*Int32Array) String ¶
func (arr *Int32Array) String() string
String -> String Representation of Binary16
func (*Int32Array) UnmarshalJSON ¶
func (arr *Int32Array) UnmarshalJSON(by []byte) error
type Time ¶
func (*Time) GormDataType ¶
GormDataType -> sets type to binary(16)
func (*Time) MarshalJSON ¶
func (*Time) UnmarshalJSON ¶
type TimeRange ¶
func (*TimeRange) GormDataType ¶
GormDataType -> sets type to binary(16)
func (*TimeRange) MarshalJSON ¶
func (*TimeRange) UnmarshalJSON ¶
Click to show internal directories.
Click to hide internal directories.