package com.zioinfo.esn.mapper;

import com.zioinfo.esn.auth.EsnUser;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import java.util.List;

@Mapper
public interface UserMapper {
    List<EsnUser> findAll(@Param("tenantCode") String tenantCode,
                          @Param("role") String role);
    EsnUser findById(@Param("id") Long id);
    EsnUser findByUsername(@Param("username") String username);
    int insert(EsnUser user);
    int update(EsnUser user);
    int updatePassword(@Param("id") Long id, @Param("passwordHash") String passwordHash);
    int delete(@Param("id") Long id);
}
