fix: soft delete

This commit is contained in:
0xJacky 2023-04-13 15:40:35 +08:00
parent 431a9fd874
commit 865d2ceaa4
No known key found for this signature in database
GPG key ID: B6E4A6E4A561BAF0

View file

@ -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 {