package dto

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

type OrgClubGetPageReq struct {
	dto.Pagination     `search:"-"`
    OrgClubOrder
}

type OrgClubOrder struct {Id int `form:"idOrder"  search:"type:order;column:id;table:org_club"`
    ClubName string `form:"clubNameOrder"  search:"type:order;column:club_name;table:org_club"`
    ClubContacts string `form:"clubContactsOrder"  search:"type:order;column:club_contacts;table:org_club"`
    ClubMobile string `form:"clubMobileOrder"  search:"type:order;column:club_mobile;table:org_club"`
    ClubLogo string `form:"clubLogoOrder"  search:"type:order;column:club_logo;table:org_club"`
    ClubQrcode string `form:"clubQrcodeOrder"  search:"type:order;column:club_qrcode;table:org_club"`
    CreateBy string `form:"createByOrder"  search:"type:order;column:create_by;table:org_club"`
    UpdateBy string `form:"updateByOrder"  search:"type:order;column:update_by;table:org_club"`
    CreatedAt time.Time `form:"createdAtOrder"  search:"type:order;column:created_at;table:org_club"`
    UpdatedAt time.Time `form:"updatedAtOrder"  search:"type:order;column:updated_at;table:org_club"`
    DeletedAt time.Time `form:"deletedAtOrder"  search:"type:order;column:deleted_at;table:org_club"`
    
}

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

type OrgClubInsertReq struct {
    Id int `json:"-" comment:""` // 
    ClubName string `json:"clubName" comment:"俱乐部名称"`
    ClubContacts string `json:"clubContacts" comment:"俱乐部联系人"`
    ClubMobile string `json:"clubMobile" comment:"俱乐部联系电话"`
    ClubLogo string `json:"clubLogo" comment:"俱乐部logo"`
    ClubQrcode string `json:"clubQrcode" comment:"俱乐部二维码"`
    common.ControlBy
}

func (s *OrgClubInsertReq) Generate(model *models.OrgClub)  {
    if s.Id == 0 {
        model.Model = common.Model{ Id: s.Id }
    }
    model.ClubName = s.ClubName
    model.ClubContacts = s.ClubContacts
    model.ClubMobile = s.ClubMobile
    model.ClubLogo = s.ClubLogo
    model.ClubQrcode = s.ClubQrcode
}

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

type OrgClubUpdateReq struct {
    Id int `uri:"id" comment:""` // 
    ClubName string `json:"clubName" comment:"俱乐部名称"`
    ClubContacts string `json:"clubContacts" comment:"俱乐部联系人"`
    ClubMobile string `json:"clubMobile" comment:"俱乐部联系电话"`
    ClubLogo string `json:"clubLogo" comment:"俱乐部logo"`
    ClubQrcode string `json:"clubQrcode" comment:"俱乐部二维码"`
    common.ControlBy
}

func (s *OrgClubUpdateReq) Generate(model *models.OrgClub)  {
    if s.Id == 0 {
        model.Model = common.Model{ Id: s.Id }
    }
    model.ClubName = s.ClubName
    model.ClubContacts = s.ClubContacts
    model.ClubMobile = s.ClubMobile
    model.ClubLogo = s.ClubLogo
    model.ClubQrcode = s.ClubQrcode
}

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

// OrgClubGetReq 功能获取请求参数
type OrgClubGetReq struct {
     Id int `uri:"id"`
}
func (s *OrgClubGetReq) GetId() interface{} {
	return s.Id
}

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

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