 Documentation
      ¶
      Documentation
      ¶
    
    
  
    
  
    Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func SetTimeFormat ¶ added in v0.1.1
func SetTimeFormat(format string)
func SetTimeLocalZone ¶ added in v0.1.1
func SetTimeLocalZone(zone string)
Types ¶
type Model ¶
type Model struct {
	ID        string         `json:"id" gorm:"primarykey"`
	CreatedAt LocalTime      `json:"createdAt"`
	UpdatedAt LocalTime      `json:"updatedAt"`
	DeletedAt gorm.DeletedAt `json:"-" gorm:"index"`
}
    Model ID 值使用UUID, 避免分布式环境下key冲突
LocalTime
1.可以通过配置指定格式 app.timeFormat 1.1.string -> time (指定根式序列化) 1.2.time -> string (指定根式反序列化)
 Click to show internal directories. 
   Click to hide internal directories.