1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889 |
- package dto
- import (
- "go-admin/app/admin/models"
- "go-admin/common/dto"
- common "go-admin/common/models"
- )
- type OtAppDashboardGetPageReq struct {
- dto.Pagination `search:"-"`
- OtAppDashboardOrder
- }
- type OtAppDashboardOrder struct {
- Id string `form:"idOrder" search:"type:order;column:id;table:ot_app_dashboard"`
- CreatedAt string `form:"createdAtOrder" search:"type:order;column:created_at;table:ot_app_dashboard"`
- UpdatedAt string `form:"updatedAtOrder" search:"type:order;column:updated_at;table:ot_app_dashboard"`
- DeletedAt string `form:"deletedAtOrder" search:"type:order;column:deleted_at;table:ot_app_dashboard"`
- CreateBy string `form:"createByOrder" search:"type:order;column:create_by;table:ot_app_dashboard"`
- UpdateBy string `form:"updateByOrder" search:"type:order;column:update_by;table:ot_app_dashboard"`
- AppId string `form:"appIdOrder" search:"type:order;column:app_id;table:ot_app_dashboard"`
- DashboardUid string `form:"dashboardUidOrder" search:"type:order;column:dashboard_uid;table:ot_app_dashboard"`
- }
- func (m *OtAppDashboardGetPageReq) GetNeedSearch() interface{} {
- return *m
- }
- type OtAppDashboardInsertReq struct {
- Id int `json:"-" comment:""` //
- AppId int64 `json:"appId" comment:"应用ID"`
- DashboardUid string `json:"dashboardUid" comment:"grafana dashboard uid"`
- common.ControlBy
- }
- func (s *OtAppDashboardInsertReq) Generate(model *models.OtAppDashboard) {
- if s.Id == 0 {
- model.Model = common.Model{Id: s.Id}
- }
- model.CreateBy = s.CreateBy // 添加这而,需要记录是被谁创建的
- model.AppId = s.AppId
- model.DashboardUid = s.DashboardUid
- }
- func (s *OtAppDashboardInsertReq) GetId() interface{} {
- return s.Id
- }
- type OtAppDashboardUpdateReq struct {
- Id int `uri:"id" comment:""` //
- AppId int64 `json:"appId" comment:"应用ID"`
- DashboardUid string `json:"dashboardUid" comment:"grafana dashboard uid"`
- common.ControlBy
- }
- func (s *OtAppDashboardUpdateReq) Generate(model *models.OtAppDashboard) {
- if s.Id == 0 {
- model.Model = common.Model{Id: s.Id}
- }
- model.UpdateBy = s.UpdateBy // 添加这而,需要记录是被谁更新的
- model.AppId = s.AppId
- model.DashboardUid = s.DashboardUid
- }
- func (s *OtAppDashboardUpdateReq) GetId() interface{} {
- return s.Id
- }
- // OtAppDashboardGetReq 功能获取请求参数
- type OtAppDashboardGetReq struct {
- Id int `uri:"id"`
- }
- func (s *OtAppDashboardGetReq) GetId() interface{} {
- return s.Id
- }
- // OtAppDashboardDeleteReq 功能删除请求参数
- type OtAppDashboardDeleteReq struct {
- Ids []int `json:"ids"`
- }
- func (s *OtAppDashboardDeleteReq) GetId() interface{} {
- return s.Ids
- }
- type OtAppDashboardGetByAppReq struct {
- AppId int64 `uri:"appid"`
- }
|