Add the sort for delete time.

This commit is contained in:
lishuang
2020-07-18 14:02:36 +08:00
parent 36581ded16
commit ff87ea8e39
2 changed files with 7 additions and 2 deletions

View File

@ -45,8 +45,8 @@ type Matter struct {
Children []*Matter `json:"-" gorm:"-"`
Prop string `json:"prop" gorm:"type:varchar(1024) not null;default:'{}'"`
VisitTime time.Time `json:"visitTime" gorm:"type:timestamp not null;default:'2018-01-01 00:00:00'"`
Deleted bool `json:"deleted" gorm:"type:tinyint(1) not null;default:0"`
DeleteTime time.Time `json:"deleteTime" gorm:"type:timestamp not null;default:'2018-01-01 00:00:00'"`
Deleted bool `json:"deleted" gorm:"type:tinyint(1) not null:idx_del;default:0"`
DeleteTime time.Time `json:"deleteTime" gorm:"type:timestamp not null;index:idx_delt;default:'2018-01-01 00:00:00'"`
}
// set File's table name to be `profiles`