com.feingto.cloud.domain.system.LfDatabase Maven / Gradle / Ivy
package com.feingto.cloud.domain.system;
import com.feingto.cloud.domain.BaseEntity;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;
import org.hibernate.annotations.DynamicUpdate;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Table;
import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;
/**
* 数据库
*
* @author longfei
*/
@Data
@EqualsAndHashCode(callSuper = true)
@Accessors(chain = true)
@Entity
@Table(name = "lf_database")
@DynamicUpdate
public class LfDatabase extends BaseEntity {
private static final long serialVersionUID = 1063673031685858980L;
public static final String TYPE_ES = "elasticsearch";
/**
* 数据库名称
*/
@NotBlank(message = "名称不能为空")
@Column(length = 64, nullable = false)
private String name;
/**
* 数据库类型
*/
@NotNull(message = "类型不能为空")
@Column(length = 64, nullable = false)
private String type;
/**
* 数据库驱动
*/
@Column(length = 64)
private String driver;
/**
* 主机地址
*/
@NotBlank(message = "主机地址不能为空")
@Column(length = 64, nullable = false)
private String host;
/**
* 端口
*/
@NotNull(message = "端口不能为空")
@Column(nullable = false)
private Integer port;
/**
* 数据库名称
*/
@NotBlank(message = "数据库名称不能为空")
@Column(length = 64, nullable = false)
private String dbName;
/**
* 数据库连接
*/
@Column
private String url;
/**
* 数据库用户名
*/
@Column(length = 64)
private String username;
/**
* 数据库密码
*/
@Column(length = 64)
private String password;
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy