package com.liquidnet.service.sweet.controller;

import com.liquidnet.service.base.ResponseDto;
import com.liquidnet.service.sweet.dto.param.SweetFormSubmissionParam;
import com.liquidnet.service.sweet.service.ISweetFormSubmissionService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.validation.Valid;

/**
 * 动态表单报名
 */
@Api(tags = "动态表单报名")
@RestController
@RequestMapping("/form")
public class SweetFormSubmissionController {

    @Autowired
    private ISweetFormSubmissionService sweetFormSubmissionService;

    @PostMapping("submit")
    @ApiOperation("提交报名")
    public ResponseDto<Boolean> submit(@Valid @RequestBody SweetFormSubmissionParam param) {
        return sweetFormSubmissionService.submit(param);
    }
}
