|
@@ -5,6 +5,7 @@ import (
|
|
|
"eta/eta_api/global"
|
|
|
"eta/eta_api/utils"
|
|
|
"fmt"
|
|
|
+ "gorm.io/gorm"
|
|
|
"time"
|
|
|
)
|
|
|
|
|
@@ -128,6 +129,12 @@ type VarietyItem struct {
|
|
|
Button VarietyButton `gorm:"-" description:"操作按钮权限"`
|
|
|
}
|
|
|
|
|
|
+func (m *VarietyItem) AfterFind(db *gorm.DB) (err error) {
|
|
|
+ m.CreateTime = utils.GormDateStrToDateTimeStr(m.CreateTime)
|
|
|
+ m.ModifyTime = utils.GormDateStrToDateTimeStr(m.ModifyTime)
|
|
|
+ return
|
|
|
+}
|
|
|
+
|
|
|
type VarietyButton struct {
|
|
|
Edit bool `description:"操作权限"`
|
|
|
Delete bool `description:"删除权限"`
|