main
Last change
on this file was 4d67d70, checked in by andrejtodorovski <82031894+andrejtodorovski@…>, 23 months ago |
Final touches
|
-
Property mode
set to
100644
|
File size:
610 bytes
|
Line | |
---|
1 | package com.example.autopartz.model.manytomany;
|
---|
2 |
|
---|
3 | import lombok.Getter;
|
---|
4 | import lombok.NoArgsConstructor;
|
---|
5 | import lombok.Setter;
|
---|
6 | import lombok.ToString;
|
---|
7 |
|
---|
8 | import javax.persistence.*;
|
---|
9 |
|
---|
10 | @Entity
|
---|
11 | @Getter
|
---|
12 | @Setter
|
---|
13 | @ToString
|
---|
14 | @NoArgsConstructor
|
---|
15 | @Table(name = "`part_is_appropriate_for_car`")
|
---|
16 | @IdClass(PartIsAppropriateForCarId.class)
|
---|
17 | public class PartIsAppropriateForCar {
|
---|
18 | @Id
|
---|
19 | @Column(name = "id_part")
|
---|
20 | Integer partid;
|
---|
21 | @Column(name = "id_car")
|
---|
22 | @Id
|
---|
23 | Integer carid;
|
---|
24 |
|
---|
25 | public PartIsAppropriateForCar(Integer partid, Integer carid) {
|
---|
26 | this.partid = partid;
|
---|
27 | this.carid = carid;
|
---|
28 | }
|
---|
29 | }
|
---|
Note:
See
TracBrowser
for help on using the repository browser.