Last change
on this file since 401a211 was cf9cdbf, checked in by Gjoko <goko_kostadinov@…>, 21 months ago |
Initial commit.
|
-
Property mode
set to
100644
|
File size:
629 bytes
|
Rev | Line | |
---|
[cf9cdbf] | 1 | package edu.gjoko.schedlr.entity;
|
---|
| 2 |
|
---|
| 3 | import lombok.AllArgsConstructor;
|
---|
| 4 | import lombok.Getter;
|
---|
| 5 | import lombok.NoArgsConstructor;
|
---|
| 6 | import lombok.Setter;
|
---|
| 7 |
|
---|
| 8 | import javax.persistence.*;
|
---|
| 9 |
|
---|
| 10 | @Entity
|
---|
| 11 | @Table(name = "service")
|
---|
| 12 | @Getter
|
---|
| 13 | @Setter
|
---|
| 14 | @NoArgsConstructor
|
---|
| 15 | @AllArgsConstructor
|
---|
| 16 | public class Service {
|
---|
| 17 |
|
---|
| 18 | @Id
|
---|
| 19 | @GeneratedValue(strategy = GenerationType.SEQUENCE)
|
---|
| 20 | private Long id;
|
---|
| 21 |
|
---|
| 22 | @Column(name = "name")
|
---|
| 23 | private String name;
|
---|
| 24 |
|
---|
| 25 | @Column(name = "duration")
|
---|
| 26 | private Integer duration;
|
---|
| 27 |
|
---|
| 28 | @Column(name = "price")
|
---|
| 29 | private Float price;
|
---|
| 30 |
|
---|
| 31 | @ManyToOne
|
---|
| 32 | @JoinColumn(name = "business_id")
|
---|
| 33 | private Business business;
|
---|
| 34 | }
|
---|
Note:
See
TracBrowser
for help on using the repository browser.