source: src/main/java/com/example/task/entity/event/SubjectEvent.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: 941 bytes
Line 
1package com.example.task.entity.event;
2
3import com.example.task.entity.subject.SubjectEntity;
4import jakarta.persistence.*;
5import lombok.AllArgsConstructor;
6import lombok.Getter;
7import lombok.NoArgsConstructor;
8import lombok.Setter;
9
10@Entity
11@Table(name = "subject_event", schema = "project")
12@NoArgsConstructor
13@AllArgsConstructor
14@Getter
15@Setter
16public 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.