Skip to content

Commit 865d2ce

Browse files
committed
fix: soft delete
1 parent 431a9fd commit 865d2ce

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

server/model/model.go

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -17,10 +17,10 @@ import (
1717
var db *gorm.DB
1818

1919
type Model struct {
20-
ID int `gorm:"primary_key" json:"id"`
21-
CreatedAt time.Time `json:"created_at"`
22-
UpdatedAt time.Time `json:"updated_at"`
23-
DeletedAt *time.Time `gorm:"index" json:"deleted_at"`
20+
ID int `gorm:"primary_key" json:"id"`
21+
CreatedAt time.Time `json:"created_at"`
22+
UpdatedAt time.Time `json:"updated_at"`
23+
DeletedAt *gorm.DeletedAt `gorm:"index" json:"deleted_at"`
2424
}
2525

2626
func GenerateAllModel() []any {

0 commit comments

Comments
 (0)