package net.educoder.ecsonar.dao;

import net.educoder.ecsonar.model.GraduationProjectTaskInfo;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;
import org.apache.ibatis.annotations.Update;

/**
 * @Author: youys
 * @Date: 2023/8/31
 * @Description: 毕设质量分析任务dao
 */
public interface GraduationProjectTaskInfoDao {

    @Insert("insert into graduation_project_task_info(id,people_number) values(#{id},#{peopleNumber}  )")
    void insertTaskInfo(GraduationProjectTaskInfo taskInfo);


    @Update("update graduation_project_task_info set status=#{status},update_time=current_timestamp where id=#{id}")
    void updateTaskInfoStatus(@Param("id") String id, @Param("status") Integer status);


    @Select("select id,status,people_number peopleNumber,create_time createTime,update_time updateTime " +
            "from graduation_project_task_info where id=#{id}")
    GraduationProjectTaskInfo selectById(String id);
}
