Last change
on this file since cc52b09 was 204464d, checked in by Gjoko <goko_kostadinov@…>, 21 months ago |
Adding register customer functionality
|
-
Property mode
set to
100644
|
File size:
1.1 KB
|
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 | import java.time.LocalDateTime;
|
---|
| 10 | import java.util.List;
|
---|
| 11 |
|
---|
| 12 | @Entity
|
---|
| 13 | @Table(name = "business")
|
---|
| 14 | @Getter
|
---|
| 15 | @Setter
|
---|
| 16 | @NoArgsConstructor
|
---|
| 17 | @AllArgsConstructor
|
---|
| 18 | public class Business {
|
---|
| 19 |
|
---|
| 20 | @Id
|
---|
| 21 | @GeneratedValue(strategy = GenerationType.SEQUENCE)
|
---|
| 22 | private Long id;
|
---|
| 23 |
|
---|
| 24 | @Column(name = "name")
|
---|
| 25 | private String name;
|
---|
| 26 |
|
---|
| 27 | @Column(name = "business_type")
|
---|
| 28 | @Enumerated(EnumType.STRING)
|
---|
| 29 | private BusinessType businessType;
|
---|
| 30 |
|
---|
| 31 | @Column(name = "opening_time")
|
---|
| 32 | private LocalDateTime openingTime;
|
---|
| 33 |
|
---|
| 34 | @Column(name = "closing_time")
|
---|
| 35 | private LocalDateTime closingTime;
|
---|
| 36 |
|
---|
[204464d] | 37 | @ManyToOne
|
---|
| 38 | @JoinColumn(name = "owner_id", referencedColumnName = "id", nullable = false)
|
---|
[cf9cdbf] | 39 | private Stakeholder owner;
|
---|
| 40 |
|
---|
| 41 | @Column(name = "created")
|
---|
| 42 | private LocalDateTime created;
|
---|
| 43 |
|
---|
| 44 | @Column(name = "modified")
|
---|
| 45 | private LocalDateTime modified;
|
---|
| 46 |
|
---|
| 47 | @OneToMany(mappedBy = "business")
|
---|
| 48 | private List<Service> services;
|
---|
| 49 | }
|
---|
Note:
See
TracBrowser
for help on using the repository browser.