package cn.estsh.i3plus.pojo.softswitch.bean;

import cn.estsh.i3plus.pojo.base.bean.BaseBean;
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import com.fasterxml.jackson.databind.ser.std.ToStringSerializer;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiParam;
import lombok.Data;
import lombok.EqualsAndHashCode;
import org.hibernate.annotations.DynamicInsert;
import org.hibernate.annotations.DynamicUpdate;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Table;
import javax.persistence.Transient;
import java.util.List;

/**
 * @Description : 数据库套件
 * @Reference :
 * @Author : yunhao
 * @CreateDate : 2019-08-13 9:21
 * @Modify:
 */
@Data
@Entity
@DynamicInsert
@DynamicUpdate
@EqualsAndHashCode(callSuper = true)
@Table(name = "BS_SUIT_CASE_DATA_SOURCE")
@Api(value = "数据库套件", description = "数据库套件")
public class BsSuitCaseDataSource extends BaseBean {

    private static final long serialVersionUID = 5519482989293937465L;
    @Column(name = "SUIT_CASE_ID")
    @ApiParam(value = "套件id")
    @JsonSerialize(using = ToStringSerializer.class)
    private Long suitCaseId;

    @Column(name = "DATA_SOURCE_CODE")
    @ApiParam(value = "数据源编码")
    private String dataSourceCode;

    @Column(name = "DATA_SOURCE_NAME_RDD")
    @ApiParam(value = "数据源名称")
    private String dataSourceNameRdd;

    @Transient
    @ApiParam(value = "数据源")
    private BsDataSource bsDataSource;

    @Transient
    @ApiParam(value = "数据库操作")
    private List<BsSuitCaseDataSourceTable> bsDataSourceSuitCaseTableList;
}

