package com.persagy.dmp.rwd.digital.domain;

import com.alibaba.fastjson.annotation.JSONField;
import com.fasterxml.jackson.annotation.JsonAlias;
import com.fasterxml.jackson.annotation.JsonProperty;
import com.persagy.dmp.basic.dto.RelationCalDTO;
import com.persagy.dmp.basic.dto.RelationCalRuleDTO;
import com.persagy.dmp.define.entity.RelationDefine;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.util.List;
import java.util.Map;
import java.util.Set;

/***
 * Description: 计算关系中间结果存储类
 * @author : lijie
 * @date :2021/9/8 11:39
 * Update By lijie 2021/9/8 11:39
 */
@Data
@NoArgsConstructor
@AllArgsConstructor
@Builder
public class CalculatingDTO {

    /** 关系左侧id集合 */
    @JsonAlias({"fromIds","from_ids"})
    @JsonProperty("fromIds")
    @JSONField(name = "fromIds",alternateNames = {"fromIds","from_ids"})
    private Set<String> fromIds;
    /** 关系右侧id集合 */
    @JsonAlias({"toIds","to_ids"})
    @JsonProperty("toIds")
    @JSONField(name = "toIds",alternateNames = {"toIds","to_ids"})
    private Set<String> toIds;
    /** 主对象内容 */
    @JsonAlias({"mainContent","main_content"})
    @JsonProperty("mainContent")
    @JSONField(name = "mainContent",alternateNames = {"mainContent","main_content"})
    private String mainContent;
    /** 从对象内容 */
    @JsonAlias({"slaveContent","slave_content"})
    @JsonProperty("slaveContent")
    @JSONField(name = "slaveContent",alternateNames = {"slaveContent","slave_content"})
    private Set<String> slaveContent;
    /** 图类型编码 */
    @JsonAlias({"graphCode","graph_code"})
    @JsonProperty("graphCode")
    @JSONField(name = "graphCode",alternateNames = {"graphCode","graph_code"})
    private String graphCode;
    /** 关系值 */
    @JsonAlias({"relValue","rel_value"})
    @JsonProperty("relValue")
    @JSONField(name = "relValue",alternateNames = {"relValue","rel_value"})
    private String relValue;
    /** 关系Code */
    @JsonAlias({"rel_code","relCode"})
    @JsonProperty("relCode")
    @JSONField(name = "relCode",alternateNames = {"rel_code","relCode"})
    private String relCode;
    /** 是否计算前置关系,true-计算,false-不计算.默认不计算 */
    @JsonAlias({"calBeforeRelFlag","cal_before_rel_flag"})
    @JsonProperty("calBeforeRelFlag")
    @JSONField(name = "calBeforeRelFlag",alternateNames = {"calBeforeRelFlag","cal_before_rel_flag"})
    private Boolean calBeforeRelFlag=false;
    /** 是否根据关系id过滤,true-过滤,false-不过滤.默认过滤 */
    @JsonAlias({"filterRelFlag","filter_rel_flag"})
    @JsonProperty("filterRelFlag")
    @JSONField(name = "filterRelFlag",alternateNames = {"filterRelFlag","filter_rel_flag"})
    private Boolean filterRelFlag=true;
    /** 关系定义映射 */
    @JsonAlias({"relationDefineMap","relation_define_map"})
    @JsonProperty("relationDefineMap")
    @JSONField(name = "relationDefineMap",alternateNames = {"relationDefineMap","relation_define_map"})
    private Map<String, RelationDefine> relationDefineMap;
    /** 集团code */
    private String groupCode;
    /** 项目id */
    private String projectId;
    /** 应用APP */
    private String appId;
    /** 账号id */
    private String accountId;
    /** 关系链 */
    private List<RelationCalDTO> chain;
    /** 关系定义 */
    private RelationDefine relationDefine;
    /** 关系定义 */
    private RelationCalRuleDTO relationCalRule;



}
