Documentation ¶
Index ¶
- Variables
- type LocalTime
- type ModifyingBehavior
- type Timestamp
- func (t *Timestamp) AutoTime(now time.Time) (interface{}, error)
- func (t *Timestamp) FromDB(b []byte) error
- func (t *Timestamp) Scan(value interface{}) error
- func (t Timestamp) String() string
- func (t *Timestamp) Time() time.Time
- func (t *Timestamp) ToDB() ([]byte, error)
- func (t *Timestamp) Value() (driver.Value, error)
Constants ¶
This section is empty.
Variables ¶
View Source
var MicroSecondsTimestamp = true
Functions ¶
This section is empty.
Types ¶
type LocalTime ¶ added in v0.2.6
LocalTime parsing and serializing time object as micro seconds number format
type ModifyingBehavior ¶
type ModifyingBehavior struct { Obsoleted bool `xorm:"'obsoleted' Bool index comment('Obsoleted if true or 1')" json:"obsoleted"` Changes int `xorm:"'changes' version comment('Change version')" json:"changes"` CreatedAt Timestamp `xorm:"'created_at' BigInt index comment('Timestamp created')" json:"created_at"` // If you want to save as datetime, add DateTime in tag UpdatedAt Timestamp `xorm:"'updated_at' BigInt index comment('Timestamp updated')" json:"updated_at"` CreatedBy string `xorm:"'created_by' Varchar(50) default('') comment('User ID that created')" json:"created_by"` UpdatedBy string `xorm:"'updated_by' Varchar(50) default('') comment('User ID that updated')" json:"updated_by"` }
ModifyingBehavior modifying behavior
func (*ModifyingBehavior) BeforeInsert ¶ added in v0.2.6
func (mb *ModifyingBehavior) BeforeInsert()
func (*ModifyingBehavior) BeforeUpdate ¶ added in v0.2.6
func (mb *ModifyingBehavior) BeforeUpdate()
Click to show internal directories.
Click to hide internal directories.