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:
914 bytes
|
Rev | Line | |
---|
[fdfbdde] | 1 | package com.example.task.entity;
|
---|
| 2 |
|
---|
| 3 | import com.example.task.entity.StudentEntity;
|
---|
| 4 | import jakarta.persistence.*;
|
---|
| 5 | import lombok.AllArgsConstructor;
|
---|
| 6 | import lombok.Getter;
|
---|
| 7 | import lombok.NoArgsConstructor;
|
---|
| 8 | import lombok.Setter;
|
---|
| 9 |
|
---|
| 10 | import java.time.LocalDate;
|
---|
| 11 |
|
---|
| 12 | @Entity
|
---|
| 13 | @Table(name = "dashboard", schema = "project")
|
---|
| 14 | @NoArgsConstructor
|
---|
| 15 | @AllArgsConstructor
|
---|
| 16 | @Getter
|
---|
| 17 | @Setter
|
---|
| 18 | public class DashboardEntity {
|
---|
| 19 |
|
---|
| 20 | @Id
|
---|
| 21 | @GeneratedValue(strategy = GenerationType.IDENTITY)
|
---|
| 22 | @Column(name = "dashboard_id")
|
---|
| 23 | private Integer dashboardId;
|
---|
| 24 |
|
---|
| 25 | @ManyToOne
|
---|
| 26 | @JoinColumn(name = "student_id", referencedColumnName = "student_id")
|
---|
| 27 | private StudentEntity studentId;
|
---|
| 28 |
|
---|
| 29 |
|
---|
| 30 | @Column(name = "dashboard_date", nullable = false)
|
---|
| 31 | private LocalDate dashboardDate;
|
---|
| 32 |
|
---|
| 33 | public DashboardEntity(StudentEntity studentId, LocalDate dashboardDate) {
|
---|
| 34 | this.studentId = studentId;
|
---|
| 35 | this.dashboardDate = dashboardDate;
|
---|
| 36 | }
|
---|
| 37 | }
|
---|
Note:
See
TracBrowser
for help on using the repository browser.