部分表改用软删除
This commit is contained in:
parent
7684079f0e
commit
2ed82019f6
@ -7,6 +7,9 @@ import (
|
|||||||
"crypto/md5"
|
"crypto/md5"
|
||||||
"fmt"
|
"fmt"
|
||||||
"log"
|
"log"
|
||||||
|
"time"
|
||||||
|
|
||||||
|
"github.com/jinzhu/gorm"
|
||||||
)
|
)
|
||||||
|
|
||||||
type Plan struct {
|
type Plan struct {
|
||||||
@ -19,12 +22,15 @@ type Plan struct {
|
|||||||
}
|
}
|
||||||
|
|
||||||
type Undo struct {
|
type Undo struct {
|
||||||
|
model gorm.Model
|
||||||
ID int32 `json:"id" gorm:"column:id" sql:"id"`
|
ID int32 `json:"id" gorm:"column:id" sql:"id"`
|
||||||
Content string `json:"content" gorm:"column:content" sql:"content"`
|
Content string `json:"content" gorm:"column:content" sql:"content"`
|
||||||
SpendTime int32 `json:"spend_time" gorm:"column:spend_time" sql:"spend_time"`
|
SpendTime int32 `json:"spend_time" gorm:"column:spend_time" sql:"spend_time"`
|
||||||
Parent int32 `json:"parent" gorm:"column:parent" sql:"parent"`
|
Parent int32 `json:"parent" gorm:"column:parent" sql:"parent"`
|
||||||
Level int32 `json:"level" gorm:"column:level" sql:"level"`
|
Level int32 `json:"level" gorm:"column:level" sql:"level"`
|
||||||
Type int32 `json:"type" gorm:"column:type" sql:"type"`
|
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 {
|
type PlanType struct {
|
||||||
|
Loading…
Reference in New Issue
Block a user