mirror of
https://github.com/0xJacky/nginx-ui.git
synced 2025-05-12 02:45:49 +02:00
fix: soft delete
This commit is contained in:
parent
431a9fd874
commit
865d2ceaa4
1 changed files with 4 additions and 4 deletions
|
@ -17,10 +17,10 @@ import (
|
||||||
var db *gorm.DB
|
var db *gorm.DB
|
||||||
|
|
||||||
type Model struct {
|
type Model struct {
|
||||||
ID int `gorm:"primary_key" json:"id"`
|
ID int `gorm:"primary_key" json:"id"`
|
||||||
CreatedAt time.Time `json:"created_at"`
|
CreatedAt time.Time `json:"created_at"`
|
||||||
UpdatedAt time.Time `json:"updated_at"`
|
UpdatedAt time.Time `json:"updated_at"`
|
||||||
DeletedAt *time.Time `gorm:"index" json:"deleted_at"`
|
DeletedAt *gorm.DeletedAt `gorm:"index" json:"deleted_at"`
|
||||||
}
|
}
|
||||||
|
|
||||||
func GenerateAllModel() []any {
|
func GenerateAllModel() []any {
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue