package com.example.demo.controller;

import java.util.List;

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.RestController;

import com.example.demo.common.APIResponse;
import com.example.demo.entity.BidderCode;
import com.example.demo.repository.BidderCodeRepository;

@RestController
@RequestMapping("api/biddercode")
public class BidderCodeController {

	@Autowired
	private BidderCodeRepository repo;
	
	@GetMapping("list")
	private APIResponse listbidder() {
		APIResponse api = new APIResponse();
		List<BidderCode> bidder = repo.findAll();
		api.setData(bidder);
		api.setMessage("List Of Bidder Code Get Successfully");
		api.setMsgCode("LIST OF BIDDER CODE GET SUCCESSFULLY");
		return api;
		
	}
	
}
