-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #10 from Prithvi333/prithvi_3
code updated with more services , all team members work on it
- Loading branch information
Showing
38 changed files
with
965 additions
and
251 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,56 +1,58 @@ | ||
package com.masai.entity; | ||
|
||
import com.fasterxml.jackson.annotation.JsonIgnore; | ||
import jakarta.persistence.*; | ||
|
||
import jakarta.persistence.CascadeType; | ||
import jakarta.persistence.Entity; | ||
import jakarta.persistence.GeneratedValue; | ||
import jakarta.persistence.GenerationType; | ||
import jakarta.persistence.Id; | ||
import jakarta.persistence.JoinColumn; | ||
import jakarta.persistence.ManyToOne; | ||
import jakarta.validation.constraints.NotBlank; | ||
import jakarta.validation.constraints.NotEmpty; | ||
import jakarta.validation.constraints.NotNull; | ||
import lombok.AllArgsConstructor; | ||
import lombok.Data; | ||
import lombok.NoArgsConstructor; | ||
|
||
import java.time.LocalDate; | ||
|
||
@Entity | ||
@Data | ||
@NoArgsConstructor | ||
@AllArgsConstructor | ||
public class Hotel { | ||
|
||
|
||
|
||
@Id | ||
@GeneratedValue(strategy = GenerationType.IDENTITY) | ||
private Integer hotelId; | ||
|
||
@NotBlank(message = "Please provide the hotel name") | ||
@NotNull(message = "Please provide the hotel name") | ||
private String hotelName; | ||
|
||
@NotNull(message = "Please provide the hotel type") | ||
@NotEmpty(message = "Please provide the hotel type") | ||
private HotelType hotelType; | ||
|
||
@NotNull(message = "Please provide the hotel description") | ||
@NotEmpty(message = "Please provide the hotel description") | ||
private String hotelDescription; | ||
|
||
@NotNull(message = "Please provide the hotel address") | ||
@NotEmpty(message = "Please provide the hotel address") | ||
private String address; | ||
|
||
@NotNull(message = "Please provide the rent details") | ||
@NotEmpty(message = "Please provide the rent details") | ||
private Double rent; | ||
|
||
@NotNull(message = "Please provide the STATUS") | ||
@NotEmpty(message = "Please provide the STATUS") | ||
private HotelStatus status; | ||
|
||
@JsonIgnore | ||
@ManyToOne(cascade = CascadeType.ALL) | ||
@JoinColumn(name = "destin_id") | ||
private Destination destination; | ||
|
||
@Id | ||
@GeneratedValue(strategy = GenerationType.IDENTITY) | ||
private Integer hotelId; | ||
|
||
@NotBlank(message = "Please provide the hotel name") | ||
@NotNull(message = "Please provide the hotel name") | ||
private String hotelName; | ||
|
||
@NotNull(message = "Please provide the hotel type") | ||
@NotEmpty(message = "Please provide the hotel type") | ||
private HotelType hotelType; | ||
|
||
@NotNull(message = "Please provide the hotel description") | ||
@NotEmpty(message = "Please provide the hotel description") | ||
private String hotelDescription; | ||
|
||
@NotNull(message = "Please provide the hotel address") | ||
@NotEmpty(message = "Please provide the hotel address") | ||
private String address; | ||
|
||
@NotNull(message = "Please provide the rent details") | ||
@NotEmpty(message = "Please provide the rent details") | ||
private Double rent; | ||
private boolean stats; | ||
@NotNull(message = "Please provide the STATUS") | ||
@NotEmpty(message = "Please provide the STATUS") | ||
private HotelStatus status; | ||
|
||
@JsonIgnore | ||
@ManyToOne(cascade = CascadeType.ALL) | ||
@JoinColumn(name = "destin_id") | ||
private Destination destination; | ||
|
||
} |
Oops, something went wrong.