package handler

import (
	"github.com/gin-gonic/gin"
	"youngee_b_api/model/http_model"
	"youngee_b_api/service"
)

func WrapFullSProjectBillListHandler(ctx *gin.Context) {
	handler := newFullSProjectBillListHandler(ctx)
	baseRun(handler)
}

func newFullSProjectBillListHandler(ctx *gin.Context) *FullSProjectBillListHandler {
	return &FullSProjectBillListHandler{
		req:  http_model.NewFullSProjectBillRequest(),
		resp: http_model.NewFullSProjectBillResponse(),
		ctx:  ctx,
	}
}

type FullSProjectBillListHandler struct {
	req  *http_model.FullSProjectBillListRequest
	resp *http_model.CommonResponse
	ctx  *gin.Context
}

func (h *FullSProjectBillListHandler) getRequest() interface{} {
	return h.req
}
func (h *FullSProjectBillListHandler) getContext() *gin.Context {
	return h.ctx
}
func (h *FullSProjectBillListHandler) getResponse() interface{} {
	return h.resp
}
func (h *FullSProjectBillListHandler) run() {
	data, err := service.SProject.FullSProjectBillList(h.ctx, h.req)
	if err != nil {
		h.resp.Message = err.Error()
	}
	h.resp.Data = data
	h.resp.Message = "成功查询"
}

func (h *FullSProjectBillListHandler) checkParam() error {
	return nil
}
