package com.template.api;

import com.template.model.request.clubTopupRequest;
import com.template.model.request.insertHeartRequest;
import com.template.model.request.updateHeartRequest;
import com.template.model.result.CommonResult;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.validation.BindingResult;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.*;

import javax.servlet.http.HttpServletResponse;


@RequestMapping("/api/alumniHeart")
@Api(tags = {"AlumniHeartController"}, value = "心链")
public interface AlumniHeartControllerAPI {

    @PostMapping("/HeartTopup")
    @ApiOperation(value = "置顶", httpMethod = "POST")
    CommonResult HeartTopup(@Validated @RequestBody clubTopupRequest ctr, BindingResult bindingResult) throws Exception;

    @PostMapping("/insertHeartData")
    @ApiOperation(value = "新增心链", httpMethod = "POST")
    CommonResult insertHeartData(@Validated @RequestBody insertHeartRequest icr, BindingResult bindingResult);

    @PostMapping("/updateHeartData")
    @ApiOperation(value = "编辑心链", httpMethod = "POST")
    CommonResult updateHeartData(@Validated @RequestBody updateHeartRequest ucr, BindingResult bindingResult);

    /**
     * 获取心链分页数据
     *
     * @param currentPage
     * @param pageCount
     * @param name        权益名称
     * @param startTime   创建开始时间
     * @param endTime     创建结束时间
     * @return
     */
    @GetMapping(value = "/queryHeartPage")
    @ApiOperation(value = "获取心链分页数据", notes = "获取心链分页数据", httpMethod = "GET")
    CommonResult queryHeartPage(@RequestParam int currentPage, @RequestParam int pageCount, String name,  String startTime, String endTime);

    //删除
    @GetMapping(value = "/deleteHeartById")
    @ApiOperation(value = "删除心链", notes = "删除心链", httpMethod = "GET")
    CommonResult deleteHeartById(@RequestParam int id);

}
