package com.zhongshu.card.client.model.scene;

import com.zhongshu.card.client.model.base.SuperModel;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import org.apache.commons.lang3.ObjectUtils;

/**
 * @author TRX
 * @date 2024/11/22
 */
@Data
@AllArgsConstructor
@NoArgsConstructor
public class RoleSceneInfoModel extends SuperModel {

    @Schema(description = "应用信息")
    private SceneInfoModel sceneInfo;

    private String sceneInfoName;

    public String getSceneInfoName() {
        if (ObjectUtils.isNotEmpty(sceneInfo)) {
            return sceneInfo.getName();
        }
        return "";
    }

    @Schema(description = "项目管理的应用ID")
    private String projectSceneInfoId;

    @Schema(description = "角色ID")
    private String roleId;

    @Schema(description = "组件信息")
    private SceneComponentModel sceneComponent;

}
