main
Last change
on this file since c3268ca was c3268ca, checked in by Stefan Risteski <stefanristeski2001@…>, 9 months ago |
Project
The whole Project
|
-
Property mode
set to
100644
|
File size:
630 bytes
|
Line | |
---|
1 | package com.example.kvizko.models;
|
---|
2 |
|
---|
3 | import com.example.kvizko.models.EmbeddedClasses.SelectedchoiceIdClass;
|
---|
4 | import jakarta.persistence.*;
|
---|
5 | import lombok.Data;
|
---|
6 |
|
---|
7 | @Entity
|
---|
8 | @Data
|
---|
9 | @Table(name = "selectedchoice")
|
---|
10 | public class Selectedchoice {
|
---|
11 |
|
---|
12 | @EmbeddedId
|
---|
13 | private SelectedchoiceIdClass selectedchoiceIdClass;
|
---|
14 |
|
---|
15 | @ManyToOne
|
---|
16 | @JoinColumn(name = "attemptid")
|
---|
17 | private Attempt attempt;
|
---|
18 | //private long attemptid;
|
---|
19 |
|
---|
20 | public Selectedchoice() {}
|
---|
21 |
|
---|
22 | public Selectedchoice(Long choiceid, Attempt attempt) {
|
---|
23 | this.attempt = attempt;
|
---|
24 | this.selectedchoiceIdClass=new SelectedchoiceIdClass(choiceid, this.attempt.getAttemptid());
|
---|
25 | }
|
---|
26 |
|
---|
27 |
|
---|
28 | }
|
---|
Note:
See
TracBrowser
for help on using the repository browser.