package kr.co.accura.wtm.domain.teal.entity;

import jakarta.persistence.*;
import kr.co.accura.wtm.domain.wbs.entity.CanonicalWbs;
import lombok.*;

@Entity
@Table(name = "teal_entries")
@Getter
@Setter
@NoArgsConstructor
@AllArgsConstructor
@Builder
public class TealEntry {

    @Id
    @GeneratedValue(strategy = GenerationType.IDENTITY)
    private Long id;

    @ManyToOne(fetch = FetchType.LAZY)
    @JoinColumn(name = "teal_version_id", nullable = false)
    private TealVersion tealVersion;

    @ManyToOne(fetch = FetchType.LAZY)
    @JoinColumn(name = "canonical_wbs_id")
    private CanonicalWbs canonicalWbs;

    @Column(name = "activity_code", nullable = false, length = 100)
    private String activityCode;

    @Column(name = "activity_name", length = 500)
    private String activityName;

    @Column(length = 50)
    private String discipline;

    @Column(name = "is_active")
    @Builder.Default
    private Boolean isActive = true;
}
