150 lines
3.2 KiB
Java
150 lines
3.2 KiB
Java
package eu.eudat.migration.entities;
|
|
|
|
import javax.persistence.*;
|
|
import java.util.Date;
|
|
|
|
@Entity
|
|
@Table(name = "api_clients")
|
|
public class ApiClient {
|
|
|
|
@Id
|
|
private Long id;
|
|
private String name;
|
|
private String description;
|
|
private String homepage;
|
|
@Column(name = "contact_name")
|
|
private String contactName;
|
|
@Column(name = "contact_email")
|
|
private String contactEmail;
|
|
@Column(name = "client_id")
|
|
private String clientId;
|
|
@Column(name = "client_secret")
|
|
private String clientSecret;
|
|
@Column(name = "last_access")
|
|
@Temporal(TemporalType.TIMESTAMP)
|
|
private Date lastAccess;
|
|
@Column(name = "created_at")
|
|
@Temporal(TemporalType.TIMESTAMP)
|
|
private Date createdAt;
|
|
@Column(name = "updated_at")
|
|
@Temporal(TemporalType.TIMESTAMP)
|
|
private Date updatedAt;
|
|
@ManyToOne(fetch = FetchType.EAGER)
|
|
@JoinColumn(name = "org_id")
|
|
private Organization organization;
|
|
|
|
@Override
|
|
public String toString() {
|
|
return "ApiClient{" +
|
|
"id=" + id +
|
|
", name='" + name + '\'' +
|
|
", description='" + description + '\'' +
|
|
", homepage='" + homepage + '\'' +
|
|
", contactName='" + contactName + '\'' +
|
|
", contactEmail='" + contactEmail + '\'' +
|
|
", clientId='" + clientId + '\'' +
|
|
", clientSecret='" + clientSecret + '\'' +
|
|
", lastAccess=" + lastAccess +
|
|
", createdAt=" + createdAt +
|
|
", updatedAt=" + updatedAt +
|
|
", organization=" + organization +
|
|
'}';
|
|
}
|
|
|
|
public Long getId() {
|
|
return id;
|
|
}
|
|
|
|
public void setId(Long id) {
|
|
this.id = id;
|
|
}
|
|
|
|
public String getName() {
|
|
return name;
|
|
}
|
|
|
|
public void setName(String name) {
|
|
this.name = name;
|
|
}
|
|
|
|
public String getDescription() {
|
|
return description;
|
|
}
|
|
|
|
public void setDescription(String description) {
|
|
this.description = description;
|
|
}
|
|
|
|
public String getHomepage() {
|
|
return homepage;
|
|
}
|
|
|
|
public void setHomepage(String homepage) {
|
|
this.homepage = homepage;
|
|
}
|
|
|
|
public String getContactName() {
|
|
return contactName;
|
|
}
|
|
|
|
public void setContactName(String contactName) {
|
|
this.contactName = contactName;
|
|
}
|
|
|
|
public String getContactEmail() {
|
|
return contactEmail;
|
|
}
|
|
|
|
public void setContactEmail(String contactEmail) {
|
|
this.contactEmail = contactEmail;
|
|
}
|
|
|
|
public String getClientId() {
|
|
return clientId;
|
|
}
|
|
|
|
public void setClientId(String clientId) {
|
|
this.clientId = clientId;
|
|
}
|
|
|
|
public String getClientSecret() {
|
|
return clientSecret;
|
|
}
|
|
|
|
public void setClientSecret(String clientSecret) {
|
|
this.clientSecret = clientSecret;
|
|
}
|
|
|
|
public Date getLastAccess() {
|
|
return lastAccess;
|
|
}
|
|
|
|
public void setLastAccess(Date lastAccess) {
|
|
this.lastAccess = lastAccess;
|
|
}
|
|
|
|
public Date getCreatedAt() {
|
|
return createdAt;
|
|
}
|
|
|
|
public void setCreatedAt(Date createdAt) {
|
|
this.createdAt = createdAt;
|
|
}
|
|
|
|
public Date getUpdatedAt() {
|
|
return updatedAt;
|
|
}
|
|
|
|
public void setUpdatedAt(Date updatedAt) {
|
|
this.updatedAt = updatedAt;
|
|
}
|
|
|
|
public Organization getOrganization() {
|
|
return organization;
|
|
}
|
|
|
|
public void setOrganization(Organization organization) {
|
|
this.organization = organization;
|
|
}
|
|
}
|