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

import cn.estsh.i3plus.pojo.aps.annotation.FieldAnnotation;
import cn.estsh.i3plus.pojo.aps.common.BaseAPS;
import cn.estsh.i3plus.pojo.base.enumutil.ApsEnumUtil;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiParam;
import lombok.Data;
import lombok.EqualsAndHashCode;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Table;

/**
 * @Description :数据集成数据连接信息
 * @Reference :
 * @Author : jason.niu
 * @CreateDate : 2019-09-23
 * @Modify:
 **/
@Data
@EqualsAndHashCode(callSuper = true)
@Entity
@Table(name = "APS_DATA_LINK")
@Api("数据集成数据连接信息")
public class DataLink extends BaseAPS {
    private static final long serialVersionUID = 8324774871058505466L;
    @Column(name="CODE")
    @ApiParam(value ="编码")
    @FieldAnnotation(notEmpty = true)
    private String code;

    @Column(name="TYPE")
    @ApiParam(value ="链接类型")
    @FieldAnnotation(defaultValue = "EXCEL")
    private ApsEnumUtil.DATA_LINK_TYPE type;

    @Column(name="PATH")
    @ApiParam(value ="IP/文件路径")
    @FieldAnnotation(notEmpty = true)
    private String path;

    @Column(name="PORT")
    @ApiParam(value ="端口")
    private Integer port;

    @Column(name="DB_NAME")
    @ApiParam(value ="数据库名")
    private String dbName;

    @Column(name="USER_NAME")
    @ApiParam(value ="用户名")
    private String userName;

    @Column(name="PASSWORD")
    @ApiParam(value ="密码")
    private String password;

}
