Finish the delete and sync by physics.

This commit is contained in:
lishuang
2020-07-11 19:56:13 +08:00
parent f16d48b432
commit 7fe673068b
5 changed files with 165 additions and 10 deletions

View File

@ -38,7 +38,7 @@ type Matter struct {
Md5 string `json:"md5" gorm:"type:varchar(45)"`
Size int64 `json:"size" gorm:"type:bigint(20) not null;default:0"`
Privacy bool `json:"privacy" gorm:"type:tinyint(1) not null;default:0"`
Path string `json:"path" gorm:"type:varchar(1024)"`
Path string `json:"path" gorm:"type:varchar(1024);index:idx_p"`
Times int64 `json:"times" gorm:"type:bigint(20) not null;default:0"`
Parent *Matter `json:"parent" gorm:"-"`
Children []*Matter `json:"-" gorm:"-"`