
package nlib.bbs.service.impl;

import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.stereotype.Repository;

import nlib.cmm.web.MainController;
import nlib.restful.DataApi;
import nlib.restful.service.DataApiReqVO;
import nlib.restful.service.DataApiResVO;

@Repository("boardDAO")
public class BoardDAOApi extends DataApi
{
	private static final Logger log = LoggerFactory.getLogger(BoardDAOApi.class);

	/**
	 * 주 자원의 URI  
	 */
	public static final String RESOURCE_URI = "/uac/service/board";

	public DataApiResVO listNotices(DataApiReqVO reqVO)  {
		reqVO.setReqUrl(RESOURCE_URI + "/notice/list");
		return request(reqVO);
	}

	public DataApiResVO selectNotice(DataApiReqVO reqVO)  {
		reqVO.setReqUrl(RESOURCE_URI + "/notice");
		return request(reqVO);
	}

	public DataApiResVO listFAQs(DataApiReqVO reqVO)  {
		reqVO.setReqUrl(RESOURCE_URI + "/faq/list");
		return request(reqVO);
	}
	
	public DataApiResVO selectFAQ(DataApiReqVO reqVO)  {
		reqVO.setReqUrl(RESOURCE_URI + "/faq");
		return request(reqVO);
	}
	

	/**
	 * 묻고답하기 목록 조회한다.
	 * 
	 * @param reqVO
	 * @return
	 */
	public DataApiResVO listQnAs(DataApiReqVO reqVO)  {
		reqVO.setReqUrl(RESOURCE_URI + "/qna/list");
		return request(reqVO);
	}

	public DataApiResVO selectQnA(DataApiReqVO reqVO)  {
		reqVO.setReqUrl(RESOURCE_URI + "/qna");
		return request(reqVO);
	}

	public DataApiResVO verifyWriter(DataApiReqVO reqVO)  {
		return null;
	}

	public DataApiResVO updateQnA(DataApiReqVO reqVO)  {
		reqVO.setReqUrl(RESOURCE_URI + "/qna");
		return request(reqVO);
	}

	public DataApiResVO deleteQnA(DataApiReqVO reqVO)  {
		reqVO.setReqUrl(RESOURCE_URI + "/qna");
		return request(reqVO);
	}

	public DataApiResVO insertQnA(DataApiReqVO reqVO)  {
		reqVO.setReqUrl(RESOURCE_URI + "/qna");
		return request(reqVO);
	}


}