package com.red.circle.other.adapter.app.user.user;

import com.red.circle.framework.web.controller.BaseController;
import com.red.circle.other.app.dto.cmd.user.user.RemoveNotActionUserCmd;
import com.red.circle.other.app.service.user.user.UserNotActiveLogService;
import lombok.RequiredArgsConstructor;
import org.springframework.http.MediaType;
import org.springframework.validation.annotation.Validated;
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;

/**
 * 用户不活跃记录日志 前端控制器.
 *
 * @author pengliang on 2023/9/18
 * @eo.api-type http
 * @eo.groupName 用户服务.日志管理
 * @eo.path /user/user-not-action-log
 */
@RestController
@RequiredArgsConstructor
@RequestMapping(value = "/user/user-not-action-log", produces = MediaType.APPLICATION_JSON_VALUE)
public class UserNotActiveLogRestController extends BaseController {

  private final UserNotActiveLogService userNotActiveLogService;

  /**
   * 将没有动作用户从房间移出.
   *
   * @eo.name 将没有动作用户从房间移出.
   * @eo.url /add
   * @eo.method post
   * @eo.request-type json
   */
  @PostMapping("/add")
  public void addLog(@RequestBody @Validated RemoveNotActionUserCmd cmd) {
    userNotActiveLogService.addLog(cmd);
  }

}
