package com.sonymusic.dx.persistence.gras;

import jakarta.persistence.*;

@Entity
@Table(name = "vgras029")
@IdClass(GlobalNotesPk.class)
public class GlobalNote extends RAASEntity {

    private static final long serialVersionUID = 1L;
    @Id
    @Column(name = "text_id")
    private Long textId;

    @Id
    @Column(name = "seq_no")
    private Long sequenceNo;

    @Column(name = "text_part")
    private String textPart;

    @ManyToOne(optional = false, fetch = FetchType.LAZY)
    @JoinColumn(name = "text_id", referencedColumnName = "global_notes_tid", insertable = false, updatable = false, nullable = false)
    private RecordingProject recordingProject;

    @ManyToOne(optional = false, fetch = FetchType.LAZY)
    @JoinColumn(name = "text_id", referencedColumnName = "characteristics_tid", insertable = false, updatable = false, nullable = false)
    private Participant participant;

//    @ManyToOne(optional = false, fetch = FetchType.LAZY)
//    @JoinColumn(name = "text_id", referencedColumnName = "company_notes_tid", insertable = false, updatable = false, nullable = false)
//    private Company company;

    public void setTextId(Long textId) {
        this.textId = textId;
    }

    public Long getTextId() {
        return textId;
    }

    public void setSequenceNo(Long sequenceNo) {
        this.sequenceNo = sequenceNo;
    }

    public Long getSequenceNo() {
        return sequenceNo;
    }

    public void setTextPart(String textPart) {
        this.textPart = textPart;
    }

    public String getTextPart() {
        return textPart;
    }

    public void setRecordingProject(RecordingProject recordingProject) {
        this.recordingProject = recordingProject;
    }

    public RecordingProject getRecordingProject() {
        return recordingProject;
    }

    public Participant getParticipant() {
        return participant;
    }

    public void setParticipant(Participant participant) {
        this.participant = participant;
    }

}
