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:
925 bytes
|
Line | |
---|
1 | package com.example.task.entity.subject;
|
---|
2 |
|
---|
3 | import com.example.task.entity.schoolyear.SchoolYearEntity;
|
---|
4 | import com.example.task.entity.term.TermEntity;
|
---|
5 | import jakarta.persistence.*;
|
---|
6 | import lombok.AllArgsConstructor;
|
---|
7 | import lombok.Getter;
|
---|
8 | import lombok.NoArgsConstructor;
|
---|
9 | import lombok.Setter;
|
---|
10 |
|
---|
11 | import java.io.Serializable;
|
---|
12 |
|
---|
13 | @Embeddable
|
---|
14 | @Getter
|
---|
15 | @Setter
|
---|
16 | @AllArgsConstructor
|
---|
17 | @NoArgsConstructor
|
---|
18 | public 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.