package com.template.model.pojo;

import com.baomidou.mybatisplus.annotation.IdType;
import java.util.Date;

import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.Version;
import com.baomidou.mybatisplus.annotation.TableId;
import java.io.Serializable;

import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;

/**
 * <p>
 * 数据源配置
 * </p>
 *
 * @author ceshi
 * @since 2023-12-05
 */
@Data
@EqualsAndHashCode(callSuper = false)
@Accessors(chain = true)
@ApiModel(value="SmartDataSource对象", description="数据源配置")
public class SmartDataSource implements Serializable {

    private static final long serialVersionUID = 1L;

    @ApiModelProperty(value = "主键id")
    @TableId(value = "ds_id", type = IdType.AUTO)
    private Integer dsId;

    @ApiModelProperty(value = "数据源类型id")
    private Integer dsClsId;

    @ApiModelProperty(value = "数据源名称")
    private String dsName;

    @ApiModelProperty(value = "数据源连接地址")
    private String dsUrl;

    @ApiModelProperty(value = "数据源用户")
    private String dsUser;

    @ApiModelProperty(value = "数据源密码")
    private String dsPassword;

    @ApiModelProperty(value = "数据源状态：0异常，1正常")
    private Integer dsStatus;

    @ApiModelProperty(value = "数据源描述")
    private String dsDescrition;

    @ApiModelProperty(value = "来源数据库使用次数")
    private Integer dsSource;

    @ApiModelProperty(value = "目的数据库使用次数")
    private Integer dsTarget;

    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    @ApiModelProperty(value = "创建时间")
    private Date dsCreateTime;

    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    @ApiModelProperty(value = "更新时间")
    private Date dsUpdateTime;

    @ApiModelProperty(value = "数据源名称")
    @TableField(exist = false)
    private String dsClsName;
}
