package dto

import (

	"go-admin/app/admin/models"
	"go-admin/common/dto"
	common "go-admin/common/models"
)

type LineUserFundingTrendGetPageReq struct {
	dto.Pagination     `search:"-"`
    LineUserFundingTrendOrder
}

type LineUserFundingTrendOrder struct {
    Id string `form:"idOrder"  search:"type:order;column:id;table:line_user_funding_trend"`
    UserId string `form:"userIdOrder"  search:"type:order;column:user_id;table:line_user_funding_trend"`
    Funding string `form:"fundingOrder"  search:"type:order;column:funding;table:line_user_funding_trend"`
    CreatedAt string `form:"createdAtOrder"  search:"type:order;column:created_at;table:line_user_funding_trend"`
    UpdatedAt string `form:"updatedAtOrder"  search:"type:order;column:updated_at;table:line_user_funding_trend"`
    DeletedAt string `form:"deletedAtOrder"  search:"type:order;column:deleted_at;table:line_user_funding_trend"`
    
}

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

type LineUserFundingTrendInsertReq struct {
    Id int `json:"-" comment:""` // 
    UserId int64 `json:"userId" comment:"用户id"`
    Funding string `json:"funding" comment:"资金账户总额 换算U"`
    common.ControlBy
}

func (s *LineUserFundingTrendInsertReq) Generate(model *models.LineUserFundingTrend)  {
    if s.Id == 0 {
        model.Model = common.Model{ Id: s.Id }
    }
    model.UserId = s.UserId
    model.Funding = s.Funding
}

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

type LineUserFundingTrendUpdateReq struct {
    Id int `uri:"id" comment:""` // 
    UserId int64 `json:"userId" comment:"用户id"`
    Funding string `json:"funding" comment:"资金账户总额 换算U"`
    common.ControlBy
}

func (s *LineUserFundingTrendUpdateReq) Generate(model *models.LineUserFundingTrend)  {
    if s.Id == 0 {
        model.Model = common.Model{ Id: s.Id }
    }
    model.UserId = s.UserId
    model.Funding = s.Funding
}

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

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

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

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