package com.upsfj.sfjprojectbackend.mapper;


import com.upsfj.sfjprojectbackend.entity.Field;
import com.upsfj.sfjprojectbackend.entity.UseCase;
import org.apache.ibatis.annotations.Delete;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Update;

@Mapper
public interface UseMapper {
    @Insert("INSERT INTO sfj_usecase (usecase_name) VALUES (#{usecase_name}) ")
    void AddUsecase(String usecase_name);


    @Update("UPDATE sfj_usecase SET usecase_name=#{usecase_name} WHERE usecase_id = #{usecase_id}")
    void UpdateUsecase(UseCase usecase);


    @Delete("DELETE FROM sfj_usecase WHERE usecase_id = #{usecase_id}")
    void  DeleteUsecase(UseCase usecase);


    @Delete("DELETE FROM sfj_algorithm_usecases WHERE usecase_id = #{usecase_id}")
    void DeleteAlgorithmForUse(UseCase usecase);


}
