Kenmegne
7 days ago 23a46b4be35277e06ec89f48730eeb694e686be8
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
package com.megatim.fdxconsultation.model.supervision;
 
import com.fasterxml.jackson.annotation.JsonIgnore;
import java.io.Serializable;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.EnumType;
import javax.persistence.Enumerated;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.ManyToOne;
import javax.persistence.SequenceGenerator;
import javax.validation.constraints.NotEmpty;
import javax.validation.constraints.NotNull;
import lombok.Getter;
import lombok.Setter;
 
/**
 *
 * @author ASUS
 */
@Getter
@Setter
@Entity
public class AgentConfigurationEntity implements Serializable {
 
    @SequenceGenerator(name = "SEQ_AGENT_CONFIGURATION",
            sequenceName = "SEQ_AGENT_CONFIGURATION",
            allocationSize = 1,
            initialValue = 1)
    @GeneratedValue(strategy = GenerationType.SEQUENCE, generator = "SEQ_AGENT_CONFIGURATION")
    @Column(name = "ID")
    @Id
    private Long id;
 
    @NotEmpty(message = "Le code de l'agent est obligatoire")
    private String agentCode;
 
    @NotEmpty(message = "L'adresse IP de l'agent est obligatoire")
    private String agentAddress;
 
    @NotEmpty(message = "L'adresse MAC de l'agent est obligatoire")
    private String agentMAC;
 
    private boolean statut;
 
    @Enumerated(EnumType.STRING)
    @NotNull(message = "Le statut de la configuration est obligatoire")
    private StatutConfiguration statutConfiguration;
    
    @JsonIgnore
    @ManyToOne
    private StandaloneServerStateEntity standaloneServerState;
}