package org.qinan.safetyeval.infrastructure.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.Delete;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.qinan.safetyeval.infrastructure.dataobject.QualFilingCommitmentDO;

@Mapper
public interface QualFilingCommitmentMapper extends BaseMapper<QualFilingCommitmentDO> {

    /** 物理删除：变更审核通过需替换承诺书，逻辑删会占用 filing_id 唯一键 */
    @Delete("DELETE FROM qual_filing_commitment WHERE filing_id = #{filingId}")
    int physicalDeleteByFilingId(@Param("filingId") Long filingId);
}
