Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Model ¶
type Model struct { Id int `json:"id,omitempty" gorm:"column:id;type:INT UNSIGNED AUTO_INCREMENT;primary_key;" comment:"主键标识"` CreatedAt Time `json:"created_at,omitempty" gorm:"column:created_at" comment:"创建时间"` UpdatedAt Time `json:"updated_at,omitempty" gorm:"column:updated_at" comment:"更新时间"` DeletedAt gorm.DeletedAt `json:"-" gorm:"column:deleted_at;index" comment:"删除时间"` }
type Time ¶
func (Time) MarshalJSON ¶
func (*Time) UnmarshalJSON ¶
UnmarshalJSON 为 Time 重写 MarshaJSON 和 UnmarshalJSON 方法,在此方法中实现自定义格式的转换;
Click to show internal directories.
Click to hide internal directories.