/*
 *      Copyright (c) 2018-2028, Chill Zhuang All rights reserved.
 *
 *  Redistribution and use in source and binary forms, with or without
 *  modification, are permitted provided that the following conditions are met:
 *
 *  Redistributions of source code must retain the above copyright notice,
 *  this list of conditions and the following disclaimer.
 *  Redistributions in binary form must reproduce the above copyright
 *  notice, this list of conditions and the following disclaimer in the
 *  documentation and/or other materials provided with the distribution.
 *  Neither the name of the dreamlu.net developer nor the names of its
 *  contributors may be used to endorse or promote products derived from
 *  this software without specific prior written permission.
 *  Author: Chill 庄骞 (smallchill@163.com)
 */
package org.springblade.modules.martial.service;

import org.springblade.modules.martial.pojo.entity.MartialCompetitionRulesAttachment;
import org.springblade.modules.martial.pojo.entity.MartialCompetitionRulesChapter;
import org.springblade.modules.martial.pojo.entity.MartialCompetitionRulesContent;
import org.springblade.modules.martial.pojo.vo.MartialCompetitionRulesVO;

import java.util.List;

/**
 * 赛事规程服务类
 *
 * @author BladeX
 */
public interface IMartialCompetitionRulesService {

	/**
	 * 获取赛事规程（小程序端）
	 *
	 * @param competitionId 赛事ID
	 * @return 规程信息
	 */
	MartialCompetitionRulesVO getRulesByCompetitionId(Long competitionId);

	/**
	 * 获取附件列表
	 *
	 * @param competitionId 赛事ID
	 * @return 附件列表
	 */
	List<MartialCompetitionRulesAttachment> getAttachmentList(Long competitionId);

	/**
	 * 保存附件
	 *
	 * @param attachment 附件信息
	 * @return 是否成功
	 */
	boolean saveAttachment(MartialCompetitionRulesAttachment attachment);

	/**
	 * 删除附件
	 *
	 * @param id 附件ID
	 * @return 是否成功
	 */
	boolean removeAttachment(Long id);

	/**
	 * 获取章节列表
	 *
	 * @param competitionId 赛事ID
	 * @return 章节列表
	 */
	List<MartialCompetitionRulesChapter> getChapterList(Long competitionId);

	/**
	 * 保存章节
	 *
	 * @param chapter 章节信息
	 * @return 是否成功
	 */
	boolean saveChapter(MartialCompetitionRulesChapter chapter);

	/**
	 * 删除章节
	 *
	 * @param id 章节ID
	 * @return 是否成功
	 */
	boolean removeChapter(Long id);

	/**
	 * 获取章节内容列表
	 *
	 * @param chapterId 章节ID
	 * @return 内容列表
	 */
	List<MartialCompetitionRulesContent> getContentList(Long chapterId);

	/**
	 * 保存章节内容
	 *
	 * @param content 内容信息
	 * @return 是否成功
	 */
	boolean saveContent(MartialCompetitionRulesContent content);

	/**
	 * 删除章节内容
	 *
	 * @param id 内容ID
	 * @return 是否成功
	 */
	boolean removeContent(Long id);

	/**
	 * 批量保存章节内容
	 *
	 * @param chapterId 章节ID
	 * @param contents  内容列表
	 * @return 是否成功
	 */
	boolean batchSaveContents(Long chapterId, List<String> contents);

}
