source: src/main/java/com/example/model/Product.java

Last change on this file was a51a591, checked in by colovik <j.colovik@…>, 14 months ago

final

  • Property mode set to 100644
File size: 609 bytes
Line 
1package com.example.model;
2
3import lombok.Data;
4
5import javax.persistence.*;
6import java.util.List;
7
8@Data
9@Entity
10@Table(name = "produkti")
11@Inheritance(strategy = InheritanceType.JOINED)
12public class Product {
13 @Id
14 @GeneratedValue(strategy = GenerationType.IDENTITY)
15 @Column(name = "produkt_id")
16 Integer product_id;
17
18 @Column(name = "ime")
19 String name;
20
21 @ManyToMany(mappedBy = "productList")
22 List<Catering> cateringList;
23 public Product(Integer product_id, String name) {
24 this.product_id = product_id;
25 this.name = name;
26 }
27
28 public Product() {
29 }
30}
Note: See TracBrowser for help on using the repository browser.