github.com/easysoft/zendata@v0.0.0-20240513203326-705bd5a7fd67/internal/pkg/model/request.go (about) 1 package model 2 3 import ( 4 "time" 5 ) 6 7 type ReqData struct { 8 Action string `json:"action"` 9 Id int `json:"id"` 10 DomainId int `json:"domainId"` 11 Mode string `json:"mode"` 12 Data interface{} `json:"data"` 13 14 Src int `json:"src"` 15 Dist int `json:"dist"` 16 17 Keywords string `json:"keywords"` 18 Page int `json:"page"` 19 } 20 21 type RespData struct { 22 Code int `json:"code"` 23 Msg string `json:"msg"` 24 Data interface{} `json:"data"` 25 Model interface{} `json:"model"` 26 Res interface{} `json:"res"` 27 WorkDir string `json:"workDir"` 28 29 Total int `json:"total"` 30 } 31 32 type Model struct { 33 ID uint `gorm:"column:id;primary_key" json:"id"` 34 CreatedAt time.Time `gorm:"column:createdAt" json:"createdAt" yaml:"-"` 35 UpdatedAt time.Time `gorm:"column:updatedAt" json:"updatedAt" yaml:"-"` 36 37 Disabled bool `gorm:"column:disabled;default:false" json:"disabled" yaml:"-"` 38 Deleted bool `gorm:"column:deleted;default:false" json:"deleted" yaml:"-"` 39 }