package com.liquidnet.service.kylin.controller;

import com.liquidnet.service.kylin.model.FieldsModule;
import com.liquidnet.service.kylin.service.impl.FieldsServiceImpl;
import io.swagger.annotations.*;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

@Api
@RestController
@RequestMapping("/user/kylin/fields")
public class FieldsController {

    @Autowired
    private FieldsServiceImpl fieldsService;

    @PostMapping(value = "")
    @ApiOperation(value = "创建场地")
    @ApiImplicitParams({
            @ApiImplicitParam(name = "user_id", value = "用户id", dataType = "Integer", paramType = "query"),
            @ApiImplicitParam(name = "user_id", value = "用户id", dataType = "Integer", paramType = "query"),
            @ApiImplicitParam(name = "user_id", value = "用户id", dataType = "Integer", paramType = "query"),
            @ApiImplicitParam(name = "user_id", value = "用户id", dataType = "Integer", paramType = "query"),
            @ApiImplicitParam(name = "user_id", value = "用户id", dataType = "Integer", paramType = "query"),
    })
    @ApiResponse(response = FieldsModule.class, code = 200, message = "接口返回对象参数")
    public void createFields(@RequestBody FieldsModule fieldsModule) {
        System.out.println(fieldsModule.toString());
        fieldsService.createFiles(fieldsModule);
    }
}
