package com.red.circle.console.adapter.app.game;

import com.red.circle.common.business.dto.cmd.IdLongCmd;
import com.red.circle.console.app.dto.clienobject.game.GameTrumpetRecordCO;
import com.red.circle.console.app.service.app.game.GameTrumpetService;
import com.red.circle.framework.web.controller.BaseController;
import com.red.circle.other.inner.model.cmd.game.GameTrumpetQryCmd;
import java.util.List;
import lombok.RequiredArgsConstructor;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * 喇叭 前端控制器.
 *
 * @author pengshigang
 * @since 2022-8-24
 */
@RequiredArgsConstructor
@RestController
@RequestMapping("/game/trumpet")
public class GameTrumpetRestController extends BaseController {

  private final GameTrumpetService gameTrumpetService;

  /**
   * 喇叭记录.
   */
  @GetMapping("/list")
  public List<GameTrumpetRecordCO> list(GameTrumpetQryCmd query) {
    return gameTrumpetService.list(query);
  }

  /**
   * 删除指定喇叭记录.
   */
  @GetMapping("/delete")
  public void delete(IdLongCmd cmd) {
    gameTrumpetService.delete(cmd.getId(), cmd.requiredReqUserId());
  }

}
