46 lines
1.0 KiB
Java
Executable File
46 lines
1.0 KiB
Java
Executable File
package es.recursoscatolicos.model;
|
|
|
|
import jakarta.persistence.*;
|
|
import lombok.Data;
|
|
import lombok.NoArgsConstructor;
|
|
import org.hibernate.annotations.CreationTimestamp;
|
|
|
|
import java.time.LocalDateTime;
|
|
|
|
@Entity
|
|
@Table(name = "intenciones")
|
|
@Data
|
|
@NoArgsConstructor
|
|
public class Intencion {
|
|
|
|
@Id
|
|
@GeneratedValue(strategy = GenerationType.IDENTITY)
|
|
private Long id;
|
|
|
|
@Column(nullable = false, length = 500)
|
|
private String texto;
|
|
|
|
@Column(length = 50)
|
|
private String icono;
|
|
|
|
@Enumerated(EnumType.STRING)
|
|
@Column(nullable = false)
|
|
private Ambito ambito;
|
|
|
|
@ManyToOne(fetch = FetchType.LAZY)
|
|
@JoinColumn(name = "usuario_id", nullable = false)
|
|
private Usuario usuario;
|
|
|
|
@ManyToOne(fetch = FetchType.LAZY)
|
|
@JoinColumn(name = "parroquia_id")
|
|
private Parroquia parroquia;
|
|
|
|
@ManyToOne(fetch = FetchType.LAZY)
|
|
@JoinColumn(name = "grupo_id")
|
|
private Grupo grupo;
|
|
|
|
@CreationTimestamp
|
|
@Column(name = "fecha_creacion", updatable = false)
|
|
private LocalDateTime fechaCreacion;
|
|
}
|