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

import cn.estsh.i3plus.pojo.base.bean.BaseBean;
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;

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

    private static final long serialVersionUID = 2763423692635373368L;
    @Column(name = "DATA_SOURCE_NAME")
    @ApiParam(value = "数据源名称")
    private String dataSourceName;

    @Column(name = "DATA_SOURCE_CODE")
    @ApiParam(value = "数据源编码",access = "作为关系引用，在数据切换的时候会找不到ID 数据变了引用还在")
    private String dataSourceCode;

    @Column(name = "DATA_BASE_NAME")
    @ApiParam(value = "数据库名称")
    private String dataBaseName;

    @Column(name = "DATA_SOURCE_TYPE_ID")
    @ApiParam(value = "数据源类型id")
    private Integer dataSourceTypeId;

    @Column(name = "DATA_SOURCE_HOST")
    @ApiParam(value = "数据源ip地址")
    private String dataSourceHost;

    @Column(name = "DATA_SOURCE_PORT")
    @ApiParam(value = "数据源端口")
    private Integer dataSourcePort;

    @Column(name = "DATA_SOURCE_INSTANCE_NAME")
    @ApiParam(value = "数据源实例名称")
    private String dataSourceInstanceName;

    @Column(name = "DATA_SOURCE_USER")
    @ApiParam(value = "用户名")
    private String dataSourceUser;

    @Column(name = "DATA_SOURCE_PASSWORD")
    @ApiParam(value = "密码")
    private String dataSourcePassword;

    @Column(name = "DATA_SOURCE_STATUS")
    @ApiParam(value = "数据源状态")
    private Integer dataSourceStatus;

    @Column(name = "DATA_SOURCE_DESCRIPTION")
    @ApiParam(value = "数据源描述")
    private String dataSourceDescription;

}

