部分表改用软删除

master
zcy 2021-03-22 12:10:37 +08:00
parent 7684079f0e
commit 2ed82019f6
3 changed files with 24 additions and 18 deletions

View File

@ -7,6 +7,9 @@ import (
"crypto/md5"
"fmt"
"log"
"time"
"github.com/jinzhu/gorm"
)
type Plan struct {
@ -19,12 +22,15 @@ type Plan struct {
}
type Undo struct {
model gorm.Model
ID int32 `json:"id" gorm:"column:id" sql:"id"`
Content string `json:"content" gorm:"column:content" sql:"content"`
SpendTime int32 `json:"spend_time" gorm:"column:spend_time" sql:"spend_time"`
Parent int32 `json:"parent" gorm:"column:parent" sql:"parent"`
Level int32 `json:"level" gorm:"column:level" sql:"level"`
Type int32 `json:"type" gorm:"column:type" sql:"type"`
Done int `json:"done" gorm:"done" sql:"done"`
DeletedAt *time.Time `json:"deleted_at"`
}
type PlanType struct {