source: src/main/java/com/example/task/entity/term/TermId.java

Last change on this file was fdfbdde, checked in by Stojilkova Sara <sara.stojilkova.students.finki.ukim.mk>, 9 months ago

Initial commit

  • Property mode set to 100644
File size: 841 bytes
Line 
1package com.example.task.entity.term;
2
3import com.example.task.entity.StudentEntity;
4import com.example.task.entity.schoolyear.SchoolYearEntity;
5import jakarta.persistence.*;
6import lombok.AllArgsConstructor;
7import lombok.Getter;
8import lombok.NoArgsConstructor;
9import lombok.Setter;
10
11import java.io.Serializable;
12
13@Embeddable
14@Getter
15@Setter
16@AllArgsConstructor
17@NoArgsConstructor
18public class TermId implements Serializable {
19
20
21 @Column(name = "term_type")
22 private String termType;
23
24 @ManyToOne
25 @JoinColumns({
26 @JoinColumn(name = "student_id", referencedColumnName = "student_id"),
27 @JoinColumn(name = "starting_year", referencedColumnName = "starting_year"),
28 @JoinColumn(name = "finishing_year", referencedColumnName = "finishing_year")
29 })
30 private SchoolYearEntity schoolYear;
31
32}
Note: See TracBrowser for help on using the repository browser.