Explorar o código

fix: soft delete

0xJacky %!s(int64=2) %!d(string=hai) anos
pai
achega
865d2ceaa4
Modificáronse 1 ficheiros con 4 adicións e 4 borrados
  1. 4 4
      server/model/model.go

+ 4 - 4
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 {