65 lines
2.0 KiB
Java
65 lines
2.0 KiB
Java
package com.srsystem.entity;
|
|
|
|
import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
|
|
import jakarta.persistence.*;
|
|
import lombok.*;
|
|
import org.hibernate.annotations.SQLDelete;
|
|
import org.hibernate.annotations.SQLRestriction;
|
|
|
|
import java.time.LocalDate;
|
|
|
|
@Entity
|
|
@Table(name = "tb_dispatch_history")
|
|
@Getter
|
|
@Setter
|
|
@NoArgsConstructor
|
|
@AllArgsConstructor
|
|
@Builder
|
|
@SQLDelete(sql = "UPDATE tb_dispatch_history SET is_deleted = 'Y' WHERE id = ?")
|
|
@SQLRestriction("is_deleted = 'N'")
|
|
public class DispatchHistory extends BaseEntity {
|
|
|
|
@Id
|
|
@GeneratedValue(strategy = GenerationType.SEQUENCE, generator = "sq_dispatch_histories")
|
|
@SequenceGenerator(name = "sq_dispatch_histories", sequenceName = "sq_dispatch_histories", allocationSize = 50)
|
|
@Column(name = "id")
|
|
private Long dispatchId;
|
|
|
|
@ManyToOne(fetch = FetchType.LAZY)
|
|
@JoinColumn(name = "employee_id", nullable = false)
|
|
@JsonIgnoreProperties({"hibernateLazyInitializer", "handler"})
|
|
private Employee employee;
|
|
|
|
@ManyToOne(fetch = FetchType.LAZY)
|
|
@JoinColumn(name = "project_id", nullable = false)
|
|
@JsonIgnoreProperties({"hibernateLazyInitializer", "handler"})
|
|
private Project project;
|
|
|
|
@Column(name = "start_date", nullable = false)
|
|
private LocalDate startDate;
|
|
|
|
@Column(name = "end_date")
|
|
private LocalDate endDate;
|
|
|
|
@Column(name = "role_title", nullable = false, length = 255)
|
|
private String roleTitle;
|
|
|
|
@Column(name = "contribution_rate", nullable = false)
|
|
private Integer contributionRate;
|
|
|
|
@Column(name = "individual_tech", columnDefinition = "TEXT", nullable = false)
|
|
private String individualTech;
|
|
|
|
@Column(name = "performed_tasks", columnDefinition = "TEXT", nullable = false)
|
|
private String performedTasks;
|
|
|
|
@Column(name = "achievements", columnDefinition = "TEXT")
|
|
private String achievements;
|
|
|
|
@Column(name = "client_feedback", columnDefinition = "TEXT")
|
|
private String clientFeedback;
|
|
|
|
@Column(name = "internal_rating")
|
|
private Integer internalRating;
|
|
}
|