12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697 |
- package dto
- import (
- "go-admin/app/admin/models"
- "go-admin/common/dto"
- common "go-admin/common/models"
- )
- type OtPluginsGetPageReq struct {
- dto.Pagination `search:"-"`
- Name string `form:"name" search:"type:contains;column:name;table:ot_plugins" comment:"插件名"`
- Alias string `form:"alias" search:"type:contains;column:alias;table:ot_plugins" comment:"插件英文别名"`
- OtPluginsOrder
- }
- type OtPluginsOrder struct {
- Id string `form:"idOrder" search:"type:order;column:id;table:ot_plugins"`
- CreatedAt string `form:"createdAtOrder" search:"type:order;column:created_at;table:ot_plugins"`
- UpdatedAt string `form:"updatedAtOrder" search:"type:order;column:updated_at;table:ot_plugins"`
- DeletedAt string `form:"deletedAtOrder" search:"type:order;column:deleted_at;table:ot_plugins"`
- CreateBy string `form:"createByOrder" search:"type:order;column:create_by;table:ot_plugins"`
- UpdateBy string `form:"updateByOrder" search:"type:order;column:update_by;table:ot_plugins"`
- Name string `form:"nameOrder" search:"type:order;column:name;table:ot_plugins"`
- Alias string `form:"aliasOrder" search:"type:order;column:alias;table:ot_plugins"`
- Url string `form:"urlOrder" search:"type:order;column:url;table:ot_plugins"`
- Config string `form:"configOrder" search:"type:order;column:config;table:ot_plugins"`
- }
- func (m *OtPluginsGetPageReq) GetNeedSearch() interface{} {
- return *m
- }
- type OtPluginsInsertReq struct {
- Id int `json:"-" comment:""` //
- Name string `json:"name" comment:"插件名"`
- Alias string `json:"alias" comment:"插件英文别名"`
- Url string `json:"url" comment:"插件地址"`
- Config string `json:"config" comment:"配置json格式"`
- common.ControlBy
- }
- func (s *OtPluginsInsertReq) Generate(model *models.OtPlugins) {
- if s.Id == 0 {
- model.Model = common.Model{Id: s.Id}
- }
- model.CreateBy = s.CreateBy // 添加这而,需要记录是被谁创建的
- model.Name = s.Name
- model.Alias = s.Alias
- model.Url = s.Url
- model.Config = s.Config
- }
- func (s *OtPluginsInsertReq) GetId() interface{} {
- return s.Id
- }
- type OtPluginsUpdateReq struct {
- Id int `uri:"id" comment:""` //
- Name string `json:"name" comment:"插件名"`
- Alias string `json:"alias" comment:"插件英文别名"`
- Url string `json:"url" comment:"插件地址"`
- Config string `json:"config" comment:"配置json格式"`
- common.ControlBy
- }
- func (s *OtPluginsUpdateReq) Generate(model *models.OtPlugins) {
- if s.Id == 0 {
- model.Model = common.Model{Id: s.Id}
- }
- model.UpdateBy = s.UpdateBy // 添加这而,需要记录是被谁更新的
- model.Name = s.Name
- model.Alias = s.Alias
- model.Url = s.Url
- model.Config = s.Config
- }
- func (s *OtPluginsUpdateReq) GetId() interface{} {
- return s.Id
- }
- // OtPluginsGetReq 功能获取请求参数
- type OtPluginsGetReq struct {
- Id int `uri:"id"`
- }
- func (s *OtPluginsGetReq) GetId() interface{} {
- return s.Id
- }
- // OtPluginsDeleteReq 功能删除请求参数
- type OtPluginsDeleteReq struct {
- Ids []int `json:"ids"`
- }
- func (s *OtPluginsDeleteReq) GetId() interface{} {
- return s.Ids
- }
|