package com.bocloud.ims.entity.topology;

import com.bocloud.entity.annotations.Column;
import com.bocloud.entity.annotations.IgnoreAll;
import com.bocloud.entity.annotations.PK;
import com.bocloud.entity.annotations.Table;
import com.bocloud.entity.bean.Generic;
import com.bocloud.entity.meta.PKStrategy;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.NoArgsConstructor;

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

/**
 * @author liuyuanyuan
 */
@Data
@AllArgsConstructor
@NoArgsConstructor
@EqualsAndHashCode(callSuper = true)
@Table("ci_instance_value")
public class InstanceValue extends Generic {
    @PK(value = PKStrategy.AUTO)
    private Long id;
    @Column("instance_id")
    private Long instanceId;
    @Column("property_id")
    private Long propertyId;
    @Column("property_value")
    private String propertyValue;
    @Column("property_code")
    private String propertyCode;
    @IgnoreAll
    private List<InstanceGrid> grid;
    @IgnoreAll
    private Property property;
    @IgnoreAll
    // mq发过来的 grid属性
    private List<List<Map<String, String>>> table;

    public InstanceValue(Long instanceId, Long propertyId, String propertyCode, List<InstanceGrid> grid) {
        super();
        this.instanceId = instanceId;
        this.propertyCode = propertyCode;
        this.grid = grid;
        this.propertyId = propertyId;
    }

}
