package net.wicp.tams.app.duckula.controller.dao;

import java.util.List;

import org.apache.ibatis.annotations.Delete;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.ResultMap;
import org.apache.ibatis.annotations.Select;
import org.apache.ibatis.annotations.Update;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;

import net.wicp.tams.app.duckula.controller.bean.models.DevopsDoris;
import net.wicp.tams.app.duckula.controller.bean.models.DevopsDorisExample;

public interface DevopsDorisMapper extends BaseMapper<DevopsDoris> {

	/**
	 * This method was generated by MyBatis Generator. This method corresponds to the database table devops_doris
	 * @mbg.generated
	 */
	long countByExample(DevopsDorisExample example);

	/**
	 * This method was generated by MyBatis Generator. This method corresponds to the database table devops_doris
	 * @mbg.generated
	 */
	int deleteByExample(DevopsDorisExample example);

	/**
	 * This method was generated by MyBatis Generator. This method corresponds to the database table devops_doris
	 * @mbg.generated
	 */
	@Delete({ "delete from devops_doris", "where id = #{id,jdbcType=BIGINT}" })
	int deleteByPrimaryKey(Long id);

	/**
	 * This method was generated by MyBatis Generator. This method corresponds to the database table devops_doris
	 * @mbg.generated
	 */
	@Insert({ "insert into devops_doris (id, name, ", "ip, cluster, roles, ", "fs, root_pwd, is_init, ",
			"create_time, update_time)", "values (#{id,jdbcType=BIGINT}, #{name,jdbcType=VARCHAR}, ",
			"#{ip,jdbcType=VARCHAR}, #{cluster,jdbcType=VARCHAR}, #{roles,jdbcType=VARCHAR}, ",
			"#{fs,jdbcType=VARCHAR}, #{rootPwd,jdbcType=VARCHAR}, #{isInit,jdbcType=VARCHAR}, ",
			"#{createTime,jdbcType=TIMESTAMP}, #{updateTime,jdbcType=TIMESTAMP})" })
	int insert(DevopsDoris record);

	/**
	 * This method was generated by MyBatis Generator. This method corresponds to the database table devops_doris
	 * @mbg.generated
	 */
	int insertSelective(DevopsDoris record);

	/**
	 * This method was generated by MyBatis Generator. This method corresponds to the database table devops_doris
	 * @mbg.generated
	 */
	List<DevopsDoris> selectByExample(DevopsDorisExample example);

	/**
	 * This method was generated by MyBatis Generator. This method corresponds to the database table devops_doris
	 * @mbg.generated
	 */
	@Select({ "select", "id, name, ip, cluster, roles, fs, root_pwd, is_init, create_time, update_time",
			"from devops_doris", "where id = #{id,jdbcType=BIGINT}" })
	@ResultMap("net.wicp.tams.app.duckula.controller.dao.DevopsDorisMapper.BaseResultMap")
	DevopsDoris selectByPrimaryKey(Long id);

	/**
	 * This method was generated by MyBatis Generator. This method corresponds to the database table devops_doris
	 * @mbg.generated
	 */
	int updateByExampleSelective(@Param("record") DevopsDoris record, @Param("example") DevopsDorisExample example);

	/**
	 * This method was generated by MyBatis Generator. This method corresponds to the database table devops_doris
	 * @mbg.generated
	 */
	int updateByExample(@Param("record") DevopsDoris record, @Param("example") DevopsDorisExample example);

	/**
	 * This method was generated by MyBatis Generator. This method corresponds to the database table devops_doris
	 * @mbg.generated
	 */
	int updateByPrimaryKeySelective(DevopsDoris record);

	/**
	 * This method was generated by MyBatis Generator. This method corresponds to the database table devops_doris
	 * @mbg.generated
	 */
	@Update({ "update devops_doris", "set name = #{name,jdbcType=VARCHAR},", "ip = #{ip,jdbcType=VARCHAR},",
			"cluster = #{cluster,jdbcType=VARCHAR},", "roles = #{roles,jdbcType=VARCHAR},",
			"fs = #{fs,jdbcType=VARCHAR},", "root_pwd = #{rootPwd,jdbcType=VARCHAR},",
			"is_init = #{isInit,jdbcType=VARCHAR},", "create_time = #{createTime,jdbcType=TIMESTAMP},",
			"update_time = #{updateTime,jdbcType=TIMESTAMP}", "where id = #{id,jdbcType=BIGINT}" })
	int updateByPrimaryKey(DevopsDoris record);
}