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.DevopsFlink;
import net.wicp.tams.app.duckula.controller.bean.models.DevopsFlinkExample;

public interface DevopsFlinkMapper extends BaseMapper<DevopsFlink>{

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

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

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

	/**
	 * This method was generated by MyBatis Generator. This method corresponds to the database table devops_flink
	 * @mbg.generated
	 */
	@Insert({ "insert into devops_flink (id, name, ", "cluster, ip, hostname, ", "root_user, root_pwd, ",
			"need_free, is_init, ", "is_free, create_time, ", "update_time)",
			"values (#{id,jdbcType=BIGINT}, #{name,jdbcType=VARCHAR}, ",
			"#{cluster,jdbcType=VARCHAR}, #{ip,jdbcType=VARCHAR}, #{hostname,jdbcType=VARCHAR}, ",
			"#{rootUser,jdbcType=VARCHAR}, #{rootPwd,jdbcType=VARCHAR}, ",
			"#{needFree,jdbcType=VARCHAR}, #{isInit,jdbcType=VARCHAR}, ",
			"#{isFree,jdbcType=VARCHAR}, #{createTime,jdbcType=TIMESTAMP}, ", "#{updateTime,jdbcType=TIMESTAMP})" })
	int insert(DevopsFlink record);

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

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

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

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

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

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

	/**
	 * This method was generated by MyBatis Generator. This method corresponds to the database table devops_flink
	 * @mbg.generated
	 */
	@Update({ "update devops_flink", "set name = #{name,jdbcType=VARCHAR},", "cluster = #{cluster,jdbcType=VARCHAR},",
			"ip = #{ip,jdbcType=VARCHAR},", "hostname = #{hostname,jdbcType=VARCHAR},",
			"root_user = #{rootUser,jdbcType=VARCHAR},", "root_pwd = #{rootPwd,jdbcType=VARCHAR},",
			"need_free = #{needFree,jdbcType=VARCHAR},", "is_init = #{isInit,jdbcType=VARCHAR},",
			"is_free = #{isFree,jdbcType=VARCHAR},", "create_time = #{createTime,jdbcType=TIMESTAMP},",
			"update_time = #{updateTime,jdbcType=TIMESTAMP}", "where id = #{id,jdbcType=BIGINT}" })
	int updateByPrimaryKey(DevopsFlink record);
}