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:
727 bytes
|
Line | |
---|
1 | package com.example.villadihovo.model.offers;
|
---|
2 |
|
---|
3 | import com.example.villadihovo.model.users.UserTable;
|
---|
4 | import jakarta.persistence.*;
|
---|
5 | import lombok.AllArgsConstructor;
|
---|
6 | import lombok.Data;
|
---|
7 | import lombok.NoArgsConstructor;
|
---|
8 |
|
---|
9 | @AllArgsConstructor
|
---|
10 | @NoArgsConstructor
|
---|
11 | @Entity
|
---|
12 | @Data
|
---|
13 | @Table(name="service")
|
---|
14 | public 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.