package com.lesingle.creation.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.lesingle.creation.entity.School;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;

/**
 * 学校信息 Mapper 接口
 */
@Mapper
public interface SchoolMapper extends BaseMapper<School> {

    /**
     * 根据租户 ID 查询学校
     *
     * @param tenantId 租户 ID
     * @return 学校实体
     */
    @Select("SELECT * FROM t_biz_school WHERE tenant_id = #{tenantId} AND deleted = 0")
    School selectByTenantId(@Param("tenantId") Long tenantId);
}
