package com.sonymusic.dx.dxadvsearchservice.controllers;

import java.util.Map;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

import com.sonymusic.dx.dxadvsearchservice.service.ParticipantListService;

@RestController
@RequestMapping("/participant")
public class ParticipantController {

    @Autowired
    private ParticipantListService participantListService;

    @GetMapping("/getParticipantList")
    public Map<String,Object> getParticipantList(@RequestParam(required = false) String name,
                                             @RequestParam(defaultValue = "1")int page,
                                             @RequestParam(defaultValue = "20")int size) {
        return participantListService.getParticipantList(name, page, size);

    }

}
