package com.yonge.cooleshow.classroom.controller;

import com.yonge.cooleshow.biz.dal.dto.HereWhiteDto;
import com.yonge.cooleshow.biz.dal.entity.ImNetworkHereWhite;
import com.yonge.cooleshow.biz.dal.service.ImNetworkHereWhiteService;
import com.yonge.cooleshow.common.controller.BaseController;
import com.yonge.cooleshow.common.entity.HttpResponseResult;
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;

@RestController
@RequestMapping("/hereWhite")
public class HereWhiteController extends BaseController {

    @Autowired
    private ImNetworkHereWhiteService hereWhiteService;

    @ApiOperation("创建白板，默认全部采用零时白板")
    @PostMapping(value = "create")
    public HttpResponseResult<ImNetworkHereWhite> userAdd(@RequestBody HereWhiteDto hereWhiteDto) throws Exception {
        return succeed(hereWhiteService.create(hereWhiteDto.getName(), hereWhiteDto.getUserNum(),hereWhiteDto.getCourseScheduleId()));
    }
}
