60 lines
1.4 KiB
Java
60 lines
1.4 KiB
Java
|
|
package com.hitcommunications.servermanager.model;
|
||
|
|
|
||
|
|
import com.hitcommunications.servermanager.model.enums.Applications;
|
||
|
|
import com.hitcommunications.servermanager.model.enums.DatabaseType;
|
||
|
|
import com.hitcommunications.servermanager.model.enums.ServersType;
|
||
|
|
import com.hitcommunications.servermanager.utils.ServerIdGenerator;
|
||
|
|
import jakarta.persistence.*;
|
||
|
|
import lombok.*;
|
||
|
|
import org.hibernate.annotations.CreationTimestamp;
|
||
|
|
import org.hibernate.annotations.UpdateTimestamp;
|
||
|
|
|
||
|
|
import java.sql.Timestamp;
|
||
|
|
|
||
|
|
@Entity
|
||
|
|
@Table(name = "tab_servers")
|
||
|
|
@AllArgsConstructor
|
||
|
|
@NoArgsConstructor
|
||
|
|
@Getter
|
||
|
|
@Setter
|
||
|
|
@Builder
|
||
|
|
public class Servers {
|
||
|
|
|
||
|
|
@Id
|
||
|
|
@ServerIdGenerator
|
||
|
|
@Column(nullable = false, unique = true)
|
||
|
|
private String id;
|
||
|
|
|
||
|
|
@Column(nullable = false)
|
||
|
|
private String name;
|
||
|
|
|
||
|
|
@Column(nullable = false)
|
||
|
|
private String ip;
|
||
|
|
|
||
|
|
@Column(nullable = false)
|
||
|
|
private Integer port;
|
||
|
|
|
||
|
|
@Column(nullable = false, name = "username")
|
||
|
|
private String user;
|
||
|
|
|
||
|
|
@Column(nullable = false)
|
||
|
|
private String password;
|
||
|
|
|
||
|
|
@Column(nullable = false)
|
||
|
|
@Enumerated(EnumType.STRING)
|
||
|
|
private ServersType type;
|
||
|
|
|
||
|
|
@Column(nullable = false)
|
||
|
|
@Enumerated(EnumType.STRING)
|
||
|
|
private Applications application;
|
||
|
|
|
||
|
|
@Column(nullable = false)
|
||
|
|
@Enumerated(EnumType.STRING)
|
||
|
|
private DatabaseType dbType;
|
||
|
|
|
||
|
|
@CreationTimestamp
|
||
|
|
private Timestamp createdAt;
|
||
|
|
@UpdateTimestamp
|
||
|
|
private Timestamp updatedAt;
|
||
|
|
}
|