From 865d2ceaa47652937d032d66c066fabd8371ea42 Mon Sep 17 00:00:00 2001 From: 0xJacky Date: Thu, 13 Apr 2023 15:40:35 +0800 Subject: [PATCH] fix: soft delete --- server/model/model.go | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/server/model/model.go b/server/model/model.go index 7b08c9ab..54d7597b 100644 --- a/server/model/model.go +++ b/server/model/model.go @@ -17,10 +17,10 @@ import ( var db *gorm.DB type Model struct { - ID int `gorm:"primary_key" json:"id"` - CreatedAt time.Time `json:"created_at"` - UpdatedAt time.Time `json:"updated_at"` - DeletedAt *time.Time `gorm:"index" json:"deleted_at"` + ID int `gorm:"primary_key" json:"id"` + CreatedAt time.Time `json:"created_at"` + UpdatedAt time.Time `json:"updated_at"` + DeletedAt *gorm.DeletedAt `gorm:"index" json:"deleted_at"` } func GenerateAllModel() []any {