package com.reading.platform.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.reading.platform.entity.Tenant;
import org.apache.ibatis.annotations.Delete;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

@Mapper
public interface TenantMapper extends BaseMapper<Tenant> {

    /**
     * 物理删除租户（忽略逻辑删除）
     */
    @Delete("DELETE FROM t_tenant WHERE id = #{id}")
    int deletePhysical(@Param("id") Long id);

    /**
     * 物理删除租户按 code
     */
    @Delete("DELETE FROM t_tenant WHERE code = #{code}")
    int deletePhysicalByCode(@Param("code") String code);
}
