Documentation
¶
Index ¶
- Variables
- func JSONScan(dbValue interface{}, value interface{}) error
- func JSONValue(value interface{}) (driver.Value, error)
- type Bool
- type Datetime
- func (Datetime) DataType(e string) string
- func (dt Datetime) Format(layout string) string
- func (dt Datetime) In(loc *time.Location) Datetime
- func (dt Datetime) IsZero() bool
- func (dt Datetime) MarshalText() ([]byte, error)
- func (dt *Datetime) Scan(value interface{}) error
- func (dt Datetime) String() string
- func (dt Datetime) Unix() int64
- func (dt *Datetime) UnmarshalText(data []byte) (err error)
- func (dt Datetime) Value() (driver.Value, error)
- type MySQLDatetime
- type MySQLTimestamp
- type OperateTime
- type PrimaryID
- type ReserveFields
- type SoftDelete
- type Timestamp
- func (dt *Timestamp) DataType(engine string) string
- func (dt Timestamp) Format(layout string) string
- func (dt Timestamp) In(loc *time.Location) Timestamp
- func (dt Timestamp) IsZero() bool
- func (dt Timestamp) MarshalText() ([]byte, error)
- func (dt *Timestamp) Scan(value interface{}) error
- func (dt Timestamp) String() string
- func (dt Timestamp) Unix() int64
- func (dt *Timestamp) UnmarshalText(data []byte) (err error)
- func (dt Timestamp) Value() (driver.Value, error)
Constants ¶
This section is empty.
Variables ¶
View Source
var ( UTC = time.UTC CST = time.FixedZone("CST", 8*60*60) TimestampZero = Timestamp(time.Time{}) TimestampUnixZero = Timestamp(time.Unix(0, 0)) )
View Source
var (
DatetimeZero = Datetime(time.Time{})
)
Functions ¶
Types ¶
type Bool ¶
type Bool int
openapi:type boolean
func (Bool) MarshalJSON ¶
func (Bool) MarshalText ¶
func (*Bool) UnmarshalJSON ¶
func (*Bool) UnmarshalText ¶
type Datetime ¶
openapi:strfmt date-time
func ParseDatetimeFromString ¶
func (Datetime) MarshalText ¶
func (*Datetime) UnmarshalText ¶
type MySQLDatetime ¶
type MySQLDatetime = Datetime
type MySQLTimestamp ¶
type MySQLTimestamp = Timestamp
type OperateTime ¶
type OperateTime struct { // 创建时间 CreatedAt MySQLTimestamp `db:"f_created_at,default='0'" json:"createdAt" ` // 更新时间 UpdatedAt MySQLTimestamp `db:"f_updated_at,default='0'" json:"updatedAt"` // 删除时间 DeletedAt MySQLTimestamp `db:"f_deleted_at,default='0'" json:"-"` }
type ReserveFields ¶
type ReserveFields struct { // 预留整数1 ReserveInt1 int32 `db:"F_reserve_int1" json:"-" sql:"int(32) NOT NULL DEFAULT '0'"` // 预留整数2 ReserveInt2 int32 `db:"F_reserve_int2" json:"-" sql:"int(32) NOT NULL DEFAULT '0'"` // 预留字符串1 ReserveString1 string `db:"F_reserve_string1" json:"-" sql:"varchar(255) NOT NULL DEFAULT ''"` // 预留字符串2 ReserveString2 string `db:"F_reserve_string2" json:"-" sql:"varchar(255) NOT NULL DEFAULT ''"` }
type SoftDelete ¶
type SoftDelete struct {
Enabled enumeration.Bool `db:"F_enabled" sql:"int(8) unsigned NOT NULL DEFAULT '1'" json:"-"`
}
func (*SoftDelete) Disable ¶
func (e *SoftDelete) Disable()
func (*SoftDelete) Enable ¶
func (e *SoftDelete) Enable()
type Timestamp ¶
openapi:strfmt date-time
func (Timestamp) MarshalText ¶
func (*Timestamp) UnmarshalText ¶
Click to show internal directories.
Click to hide internal directories.