package cn.estsh.i3plus.pojo.mes.pcn.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;
import java.io.Serializable;

/**
 * @Author: Wynne.Lu
 * @CreateDate: 2019/9/24 7:17 PM
 * @Description:
 **/
@Data
@Entity
@DynamicInsert
@DynamicUpdate
@EqualsAndHashCode(callSuper = true)
@Table(name = "MES_DATASOURCE")
@Api("地址清单")
public class MesDatasource extends BaseBean implements Serializable {

    private static final long serialVersionUID = -7387559860198655900L;
    @Column(name = "DS_CODE")
    @ApiParam("数据源代码")
    private String dsCode;

    @Column(name = "DS_NAME")
    @ApiParam("数据源名称")
    private String dsName;

    @Column(name = "DS_TYPE")
    @ApiParam("数据源类型")
    private String dsType;

    @Column(name = "DS_HOST")
    @ApiParam("主机")
    private String dsHost;

    @Column(name = "DS_PORT")
    @ApiParam("端口")
    private Integer dsPort;

    @Column(name = "DS_USER")
    @ApiParam("用户名")
    private String dsUser;

    @Column(name = "DS_PASSWORD")
    @ApiParam("密码")
    private String dsPassword;

    @Column(name = "DS_DB_NAME")
    @ApiParam("数据库名称")
    private String dsDbName;

    @Column(name = "EQUIPMENT_CODE")
    @ApiParam("设备代码")
    private String equipmentCode;

    @Override
    public String toString() {
        return "MesDatasource{" +
                "dsCode='" + dsCode + '\'' +
                ", dsName='" + dsName + '\'' +
                ", dsType='" + dsType + '\'' +
                ", dsHost='" + dsHost + '\'' +
                ", dsPort=" + dsPort +
                ", dsUser='" + dsUser + '\'' +
                ", dsPassword='" + dsPassword + '\'' +
                ", dsDbName='" + dsDbName + '\'' +
                ", equipmentCode='" + equipmentCode + '\'' +
                '}';
    }
}
