package com.zhongshu.card.server.core.domain.scene;

import com.zhongshu.card.server.core.domain.base.SuperMain;
import com.zhongshu.card.server.core.domain.org.Role;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;
import org.springframework.data.mongodb.core.mapping.DBRef;
import org.springframework.data.mongodb.core.mapping.Document;

/**
 * 项目引用应用
 *
 * @author TRX
 * @date 2024/11/22
 */
@Data
@Builder
@Document
@AllArgsConstructor
@NoArgsConstructor
public class RoleSceneInfo extends SuperMain {

    @Schema(description = "应用数据")
    @DBRef(lazy = true)
    private SceneInfo sceneInfo;

    @Schema(description = "组件")
    @DBRef(lazy = true)
    private SceneComponent component;

    @Schema(description = "组件ID")
    private String componentId;

    @Schema(description = "关联的数据ID")
    private String sceneInfoId;

    @Schema(description = "项目关联的应用数据")
    @DBRef(lazy = true)
    private ProjectSceneInfo projectSceneInfo;

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

    @Schema(description = "应用数据")
    @DBRef(lazy = true)
    private Role role;

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