package com.ikon.projectmanagement.entity;

import jakarta.persistence.*;
import lombok.*;

@Entity
@Table(name = "project_schedule_dependency")
@Data
@AllArgsConstructor
@NoArgsConstructor
@Builder
public class ProjectScheduleDependency {

    @Id
    @Column(name = "id")
    private Long id;

    @Column(name = "predecessor_id")
    private Long predecessorId;

    @Column(name = "dependency_type")
    private Integer dependencyType;

    @ManyToOne(fetch = FetchType.LAZY)
    @JoinColumn(name = "schedule_identifier", nullable = false)
    private ProjectSchedule schedule;
}
