mirror of
https://gitee.com/dromara/MaxKey.git
synced 2026-05-14 20:50:14 +08:00
Email and LDAP store to database
This commit is contained in:
251
maxkey-core/src/main/java/org/maxkey/entity/EmailSenders.java
Normal file
251
maxkey-core/src/main/java/org/maxkey/entity/EmailSenders.java
Normal file
@@ -0,0 +1,251 @@
|
||||
package org.maxkey.entity;
|
||||
|
||||
import javax.persistence.Column;
|
||||
import javax.persistence.Entity;
|
||||
import javax.persistence.GeneratedValue;
|
||||
import javax.persistence.GenerationType;
|
||||
import javax.persistence.Id;
|
||||
import javax.persistence.Table;
|
||||
|
||||
import org.apache.mybatis.jpa.persistence.JpaBaseEntity;
|
||||
|
||||
@Entity
|
||||
@Table(name = "MXK_EMAIL_SENDERS")
|
||||
public class EmailSenders extends JpaBaseEntity{
|
||||
|
||||
/**
|
||||
*
|
||||
*/
|
||||
private static final long serialVersionUID = 3689854324601731505L;
|
||||
|
||||
@Id
|
||||
@Column
|
||||
@GeneratedValue(strategy = GenerationType.AUTO, generator = "snowflakeid")
|
||||
private String id;
|
||||
|
||||
@Column
|
||||
private String account;
|
||||
|
||||
@Column
|
||||
private String credentials;
|
||||
|
||||
@Column
|
||||
private String smtpHost;
|
||||
|
||||
@Column
|
||||
private Integer port;
|
||||
|
||||
@Column
|
||||
private int sslSwitch;
|
||||
|
||||
@Column
|
||||
private String sender;
|
||||
|
||||
@Column
|
||||
private String encoding;
|
||||
|
||||
@Column
|
||||
private String protocol;
|
||||
|
||||
@Column
|
||||
private int status;
|
||||
|
||||
@Column
|
||||
private String instId;
|
||||
|
||||
private String instName;
|
||||
|
||||
@Column
|
||||
private String description;
|
||||
|
||||
@Column
|
||||
private String createdBy;
|
||||
|
||||
@Column
|
||||
private String createdDate;
|
||||
|
||||
@Column
|
||||
private String modifiedBy;
|
||||
|
||||
@Column
|
||||
private String modifiedDate;
|
||||
|
||||
public EmailSenders() {
|
||||
super();
|
||||
}
|
||||
|
||||
public String getId() {
|
||||
return id;
|
||||
}
|
||||
|
||||
public void setId(String id) {
|
||||
this.id = id;
|
||||
}
|
||||
|
||||
public String getAccount() {
|
||||
return account;
|
||||
}
|
||||
|
||||
public void setAccount(String account) {
|
||||
this.account = account;
|
||||
}
|
||||
|
||||
public String getCredentials() {
|
||||
return credentials;
|
||||
}
|
||||
|
||||
public void setCredentials(String credentials) {
|
||||
this.credentials = credentials;
|
||||
}
|
||||
|
||||
public String getSmtpHost() {
|
||||
return smtpHost;
|
||||
}
|
||||
|
||||
public void setSmtpHost(String smtpHost) {
|
||||
this.smtpHost = smtpHost;
|
||||
}
|
||||
|
||||
public Integer getPort() {
|
||||
return port;
|
||||
}
|
||||
|
||||
public void setPort(Integer port) {
|
||||
this.port = port;
|
||||
}
|
||||
|
||||
|
||||
public int getSslSwitch() {
|
||||
return sslSwitch;
|
||||
}
|
||||
|
||||
public void setSslSwitch(int sslSwitch) {
|
||||
this.sslSwitch = sslSwitch;
|
||||
}
|
||||
|
||||
public String getEncoding() {
|
||||
return encoding;
|
||||
}
|
||||
|
||||
public void setEncoding(String encoding) {
|
||||
this.encoding = encoding;
|
||||
}
|
||||
|
||||
public String getProtocol() {
|
||||
return protocol;
|
||||
}
|
||||
|
||||
public void setProtocol(String protocol) {
|
||||
this.protocol = protocol;
|
||||
}
|
||||
|
||||
public String getSender() {
|
||||
return sender;
|
||||
}
|
||||
|
||||
public void setSender(String sender) {
|
||||
this.sender = sender;
|
||||
}
|
||||
|
||||
public int getStatus() {
|
||||
return status;
|
||||
}
|
||||
|
||||
public void setStatus(int status) {
|
||||
this.status = status;
|
||||
}
|
||||
|
||||
public String getInstId() {
|
||||
return instId;
|
||||
}
|
||||
|
||||
public void setInstId(String instId) {
|
||||
this.instId = instId;
|
||||
}
|
||||
|
||||
public String getInstName() {
|
||||
return instName;
|
||||
}
|
||||
|
||||
public void setInstName(String instName) {
|
||||
this.instName = instName;
|
||||
}
|
||||
|
||||
public String getDescription() {
|
||||
return description;
|
||||
}
|
||||
|
||||
public void setDescription(String description) {
|
||||
this.description = description;
|
||||
}
|
||||
|
||||
public String getCreatedBy() {
|
||||
return createdBy;
|
||||
}
|
||||
|
||||
public void setCreatedBy(String createdBy) {
|
||||
this.createdBy = createdBy;
|
||||
}
|
||||
|
||||
public String getCreatedDate() {
|
||||
return createdDate;
|
||||
}
|
||||
|
||||
public void setCreatedDate(String createdDate) {
|
||||
this.createdDate = createdDate;
|
||||
}
|
||||
|
||||
public String getModifiedBy() {
|
||||
return modifiedBy;
|
||||
}
|
||||
|
||||
public void setModifiedBy(String modifiedBy) {
|
||||
this.modifiedBy = modifiedBy;
|
||||
}
|
||||
|
||||
public String getModifiedDate() {
|
||||
return modifiedDate;
|
||||
}
|
||||
|
||||
public void setModifiedDate(String modifiedDate) {
|
||||
this.modifiedDate = modifiedDate;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
StringBuilder builder = new StringBuilder();
|
||||
builder.append("EmailSenders [id=");
|
||||
builder.append(id);
|
||||
builder.append(", account=");
|
||||
builder.append(account);
|
||||
builder.append(", credentials=");
|
||||
builder.append(credentials);
|
||||
builder.append(", smtpHost=");
|
||||
builder.append(smtpHost);
|
||||
builder.append(", port=");
|
||||
builder.append(port);
|
||||
builder.append(", sslSwitch=");
|
||||
builder.append(sslSwitch);
|
||||
builder.append(", sender=");
|
||||
builder.append(sender);
|
||||
builder.append(", status=");
|
||||
builder.append(status);
|
||||
builder.append(", instId=");
|
||||
builder.append(instId);
|
||||
builder.append(", instName=");
|
||||
builder.append(instName);
|
||||
builder.append(", description=");
|
||||
builder.append(description);
|
||||
builder.append(", createdBy=");
|
||||
builder.append(createdBy);
|
||||
builder.append(", createdDate=");
|
||||
builder.append(createdDate);
|
||||
builder.append(", modifiedBy=");
|
||||
builder.append(modifiedBy);
|
||||
builder.append(", modifiedDate=");
|
||||
builder.append(modifiedDate);
|
||||
builder.append("]");
|
||||
return builder.toString();
|
||||
}
|
||||
|
||||
}
|
||||
@@ -161,23 +161,23 @@ public class PasswordPolicyRowMapper implements RowMapper<PasswordPolicy> {
|
||||
@Override
|
||||
public PasswordPolicy mapRow(ResultSet rs, int rowNum) throws SQLException {
|
||||
PasswordPolicy passwordPolicy = new PasswordPolicy();
|
||||
passwordPolicy.setId(rs.getString("ID"));
|
||||
passwordPolicy.setMinLength(rs.getInt("MINLENGTH"));
|
||||
passwordPolicy.setMaxLength(rs.getInt("MAXLENGTH"));
|
||||
passwordPolicy.setLowerCase(rs.getInt("LOWERCASE"));
|
||||
passwordPolicy.setUpperCase(rs.getInt("UPPERCASE"));
|
||||
passwordPolicy.setDigits(rs.getInt("DIGITS"));
|
||||
passwordPolicy.setSpecialChar(rs.getInt("SPECIALCHAR"));
|
||||
passwordPolicy.setAttempts(rs.getInt("ATTEMPTS"));
|
||||
passwordPolicy.setDuration(rs.getInt("DURATION"));
|
||||
passwordPolicy.setExpiration(rs.getInt("EXPIRATION"));
|
||||
passwordPolicy.setUsername(rs.getInt("USERNAME"));
|
||||
passwordPolicy.setHistory(rs.getInt("HISTORY"));
|
||||
passwordPolicy.setDictionary(rs.getInt("DICTIONARY"));
|
||||
passwordPolicy.setAlphabetical(rs.getInt("ALPHABETICAL"));
|
||||
passwordPolicy.setNumerical(rs.getInt("NUMERICAL"));
|
||||
passwordPolicy.setQwerty(rs.getInt("QWERTY"));
|
||||
passwordPolicy.setOccurances(rs.getInt("OCCURANCES"));
|
||||
passwordPolicy.setId(rs.getString("id"));
|
||||
passwordPolicy.setMinLength(rs.getInt("minlength"));
|
||||
passwordPolicy.setMaxLength(rs.getInt("maxlength"));
|
||||
passwordPolicy.setLowerCase(rs.getInt("lowercase"));
|
||||
passwordPolicy.setUpperCase(rs.getInt("uppercase"));
|
||||
passwordPolicy.setDigits(rs.getInt("digits"));
|
||||
passwordPolicy.setSpecialChar(rs.getInt("specialchar"));
|
||||
passwordPolicy.setAttempts(rs.getInt("attempts"));
|
||||
passwordPolicy.setDuration(rs.getInt("duration"));
|
||||
passwordPolicy.setExpiration(rs.getInt("expiration"));
|
||||
passwordPolicy.setUsername(rs.getInt("username"));
|
||||
passwordPolicy.setHistory(rs.getInt("history"));
|
||||
passwordPolicy.setDictionary(rs.getInt("dictionary"));
|
||||
passwordPolicy.setAlphabetical(rs.getInt("alphabetical"));
|
||||
passwordPolicy.setNumerical(rs.getInt("numerical"));
|
||||
passwordPolicy.setQwerty(rs.getInt("qwerty"));
|
||||
passwordPolicy.setOccurances(rs.getInt("occurances"));
|
||||
return passwordPolicy;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user