source: src/main/java/com/example/task/entity/subject/SubjectId.java@ fdfbdde

Last change on this file since fdfbdde 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: 925 bytes
Line 
1package com.example.task.entity.subject;
2
3import com.example.task.entity.schoolyear.SchoolYearEntity;
4import com.example.task.entity.term.TermEntity;
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 SubjectId implements Serializable {
19
20
21 @Column(name = "term_subject_id")
22 private Integer id;
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 @JoinColumn(name = "term_type", referencedColumnName = "term_type")
30 })
31 private TermEntity termEntity;
32
33}
Note: See TracBrowser for help on using the repository browser.