source: src/main/java/com/example/villadihovo/model/offers/Service.java@ f7c05a1

Last change on this file since f7c05a1 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: 727 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@AllArgsConstructor
10@NoArgsConstructor
11@Entity
12@Data
13@Table(name="service")
14public class Service {
15
16 @Id
17 @GeneratedValue(strategy = GenerationType.IDENTITY)
18 private int service_id;
19
20 @Column(nullable = false)
21 private String service_type;
22
23 @Column(nullable = false)
24 private float price;
25
26 @ManyToOne
27 @JoinColumn(name = "user_id", nullable = false)
28 private UserTable user_id;
29
30 @ManyToOne
31 @JoinColumn(name = "room_id", nullable = false)
32 private Rooms room_id;
33}
Note: See TracBrowser for help on using the repository browser.