package kr.co.jinwoosi.clfd.conts.bod.service;

import java.util.List;

import kr.co.jinwoosi.clfd.conts.bod.model.BodSearch;
import kr.co.jinwoosi.clfd.conts.bod.model.Bod;
import kr.co.jinwoosi.clfd.framework.base.service.BaseService;
import kr.co.jinwoosi.clfd.framework.security.model.Role;

public interface BodService extends BaseService<Bod, BodSearch> {

	void insert(Bod bod, String[] writeRole, String[] notiRole, String[] scrtRole, String[] answRole);
	void update(Bod bod, String[] writeRole, String[] notiRole, String[] scrtRole, String[] answRole);
	
	List<Bod> selectJson();
	Bod selectJson(Long bodId);
	void initJson();
	
	boolean isAuthInsert(Bod bod, Long userId);
	boolean isAuthInsert(Long bodId, Long userId);
	
	boolean isAuthNoti(Bod bod, Long userId);
	boolean isAuthNoti(Long bodId, Long userId);

	boolean isAuthAnsw(Bod bod, Long userId);
	boolean isAuthAnsw(Long bodId, Long userId);
	List<Role> selectRoleList(Role role);
}
