package com.schisandra.auth.domain.convert;

import com.schisandra.auth.domain.bo.SchisandraAuthRoleBO;
import com.schisandra.auth.domain.bo.SchisandraAuthUserBO;
import com.schisandra.auth.infra.basic.entity.SchisandraAuthRole;
import com.schisandra.auth.infra.basic.entity.SchisandraAuthUser;
import org.mapstruct.Mapper;
import org.mapstruct.factory.Mappers;

/**
 * ClassName:SchisandraAuthRoleBOConverter
 * Package:com.schisandra.auth.domain.convert
 * Description:角色Bo对象和entity对象的转换
 *
 * @Author:fanyang
 * @Create:2024/4/4 - 21:14
 * @Version: v1.0
 */
@Mapper(componentModel = "spring")
public interface SchisandraAuthRoleBOConverter {
    SchisandraAuthRoleBOConverter INSTANCE = Mappers.getMapper(SchisandraAuthRoleBOConverter.class);

    /**
     * @description 将bo转换为实体
     * @param schisandraAuthRoleBO
     * @return com.schisandra.auth.infra.basic.bo.SchisandraRoleUser
     * @author schisandra
     * @date 2024/3/21 23:13
     */
    SchisandraAuthRole convertBOToEntity(SchisandraAuthRoleBO schisandraAuthRoleBO);

    /**
     * @description 将实体转换为bo
     * @param schisandraAuthRole
     * @return com.schisandra.auth.domain.bo.SchisandraAuthRoleBO
     * @author schisandra
     * @date 2024/3/21 23:13
     */
    SchisandraAuthRoleBO convertEntityToBO(SchisandraAuthRole schisandraAuthRole);
}
