• haoyanbin's avatar
    1 · f4300b15
    haoyanbin authored
    f4300b15
org_club_user.go 2.27 KB
package dto

import (
	"go-admin/app/operate/models"
	"go-admin/common/dto"
	common "go-admin/common/models"
	"time"
)

type OrgClubUserGetPageReq struct {
	dto.Pagination `search:"-"`
	OrgClubUserOrder
}

type OrgClubUserOrder struct {
	Id        int       `form:"idOrder"  search:"type:order;column:id;table:org_club_user"`
	UserId    string    `form:"userIdOrder"  search:"type:order;column:user_id;table:org_club_user"`
	ClubId    string    `form:"clubIdOrder"  search:"type:order;column:club_id;table:org_club_user"`
	CreateBy  string    `form:"createByOrder"  search:"type:order;column:create_by;table:org_club_user"`
	UpdateBy  string    `form:"updateByOrder"  search:"type:order;column:update_by;table:org_club_user"`
	CreatedAt time.Time `form:"createdAtOrder"  search:"type:order;column:created_at;table:org_club_user"`
	UpdatedAt time.Time `form:"updatedAtOrder"  search:"type:order;column:updated_at;table:org_club_user"`
	DeletedAt time.Time `form:"deletedAtOrder"  search:"type:order;column:deleted_at;table:org_club_user"`
}

func (m *OrgClubUserGetPageReq) GetNeedSearch() interface{} {
	return *m
}

type OrgClubUserInsertReq struct {
	Id     int    `json:"-" comment:""` //
	UserId string `json:"userId" comment:""`
	ClubId string `json:"clubId" comment:""`
	common.ControlBy
}

func (s *OrgClubUserInsertReq) Generate(model *models.OrgClubUser) {
	if s.Id == 0 {
		model.Model = common.Model{Id: s.Id}
	}
	model.UserId = s.UserId
	model.ClubId = s.ClubId
}

func (s *OrgClubUserInsertReq) GetId() interface{} {
	return s.Id
}

type OrgClubUserUpdateReq struct {
	Id     int    `uri:"id" comment:""` //
	UserId string `json:"userId" comment:""`
	ClubId string `json:"clubId" comment:""`
	common.ControlBy
}

func (s *OrgClubUserUpdateReq) Generate(model *models.OrgClubUser) {
	if s.Id == 0 {
		model.Model = common.Model{Id: s.Id}
	}
	model.UserId = s.UserId
	model.ClubId = s.ClubId
}

func (s *OrgClubUserUpdateReq) GetId() interface{} {
	return s.Id
}

// OrgClubUserGetReq 功能获取请求参数
type OrgClubUserGetReq struct {
	Id int `uri:"id"`
}

func (s *OrgClubUserGetReq) GetId() interface{} {
	return s.Id
}

// OrgClubUserDeleteReq 功能删除请求参数
type OrgClubUserDeleteReq struct {
	Ids []int `json:"ids"`
}

func (s *OrgClubUserDeleteReq) GetId() interface{} {
	return s.Ids
}