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