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:
941 bytes
|
Rev | Line | |
---|
[fdfbdde] | 1 | package com.example.task.entity.event;
|
---|
| 2 |
|
---|
| 3 | import com.example.task.entity.subject.SubjectEntity;
|
---|
| 4 | import jakarta.persistence.*;
|
---|
| 5 | import lombok.AllArgsConstructor;
|
---|
| 6 | import lombok.Getter;
|
---|
| 7 | import lombok.NoArgsConstructor;
|
---|
| 8 | import lombok.Setter;
|
---|
| 9 |
|
---|
| 10 | @Entity
|
---|
| 11 | @Table(name = "subject_event", schema = "project")
|
---|
| 12 | @NoArgsConstructor
|
---|
| 13 | @AllArgsConstructor
|
---|
| 14 | @Getter
|
---|
| 15 | @Setter
|
---|
| 16 | public class SubjectEvent {
|
---|
| 17 |
|
---|
| 18 | @EmbeddedId
|
---|
| 19 | private SubjectEventId id;
|
---|
| 20 |
|
---|
| 21 | @ManyToOne
|
---|
| 22 | @JoinColumns({
|
---|
| 23 | @JoinColumn(name = "student_id", referencedColumnName = "student_id"),
|
---|
| 24 | @JoinColumn(name = "starting_year", referencedColumnName = "starting_year"),
|
---|
| 25 | @JoinColumn(name = "finishing_year", referencedColumnName = "finishing_year"),
|
---|
| 26 | @JoinColumn(name = "term_type", referencedColumnName = "term_type"),
|
---|
| 27 | @JoinColumn(name = "term_subject_id", referencedColumnName = "term_subject_id")
|
---|
| 28 | })
|
---|
| 29 | private SubjectEntity subject;
|
---|
| 30 | }
|
---|
Note:
See
TracBrowser
for help on using the repository browser.