mirror of
https://github.com/NginxProxyManager/nginx-proxy-manager.git
synced 2025-06-18 10:06:26 +00:00
Refactor some reflection
This commit is contained in:
@ -9,6 +9,8 @@ type Filter struct {
|
||||
|
||||
// FilterMapValue ...
|
||||
type FilterMapValue struct {
|
||||
Type string
|
||||
Field string
|
||||
Type string
|
||||
Field string
|
||||
Schema string
|
||||
Model string
|
||||
}
|
||||
|
13
backend/internal/model/model_base.go
Normal file
13
backend/internal/model/model_base.go
Normal file
@ -0,0 +1,13 @@
|
||||
package model
|
||||
|
||||
import (
|
||||
"gorm.io/plugin/soft_delete"
|
||||
)
|
||||
|
||||
// ModelBase include common fields for db control
|
||||
type ModelBase struct {
|
||||
ID uint `json:"id" gorm:"column:id;primaryKey" filter:"id,integer"`
|
||||
CreatedAt int64 `json:"created_at" gorm:"<-:create;autoCreateTime:milli;column:created_at" filter:"created_at,date"`
|
||||
UpdatedAt int64 `json:"updated_at" gorm:"<-;autoUpdateTime:milli;column:updated_at" filter:"updated_at,date"`
|
||||
DeletedAt soft_delete.DeletedAt `json:"-" gorm:"column:is_deleted;softDelete:flag"`
|
||||
}
|
Reference in New Issue
Block a user