<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
	"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper
	namespace="com.xunhong.erp.turbo.rbac.infrastructure.mapper.RoleMapper">
	<resultMap id="BaseResultMap"
			   type="com.xunhong.erp.turbo.rbac.infrastructure.entity.RoleDO">
		<result property="roleId" column="role_id"/>
		<result property="slug" column="slug"/>
		<result property="name" column="name"/>
		<result property="description" column="description"/>
		<result property="type" column="type"/>
		<result property="platformId" column="platform_id"/>
		<result property="createdAt" column="created_at"/>
		<result property="updatedAt" column="updated_at"/>
		<result property="isDelete" column="is_delete"/>
		<result property="version" column="version"/>
	</resultMap>
	<select id="selectByRoleSlug"
			resultType="com.xunhong.erp.turbo.rbac.infrastructure.entity.RoleDO">
		SELECT r.*
		FROM role as r
		WHERE r.slug = #{slug}
		AND r.is_delete = 0
	</select>
</mapper>
