source: src/main/java/com/example/villadihovo/model/offers/PreparedMeal.java

Last change on this file was f7c05a1, checked in by Elena Shulevska <elena.shulevska@…>, 15 months ago

initial commit of the source code on origin

  • Property mode set to 100644
File size: 689 bytes
Line 
1package com.example.villadihovo.model.offers;
2
3import com.example.villadihovo.model.users.UserTable;
4import jakarta.persistence.*;
5import lombok.AllArgsConstructor;
6import lombok.Data;
7import lombok.NoArgsConstructor;
8
9@Data
10@NoArgsConstructor
11@AllArgsConstructor
12@Entity
13@IdClass(PreparedMealId.class)
14@Table(name="prepared_meal")
15public class PreparedMeal {
16
17 @Id
18 @ManyToOne
19 @JoinColumn(name = "meal_id", nullable = false)
20 private Meal meal;
21
22 @Id
23 @GeneratedValue(strategy = GenerationType.IDENTITY)
24 @Column(nullable = false)
25 private int prepared_meal_id;
26
27 @ManyToOne
28 @JoinColumn(name = "user_id", nullable = false)
29 private UserTable user_id;
30}
Note: See TracBrowser for help on using the repository browser.