Skip to content

Commit

Permalink
Update Review model
Browse files Browse the repository at this point in the history
  • Loading branch information
Hoxtygen committed Mar 25, 2023
1 parent a1116b2 commit bb832b9
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 3 deletions.
14 changes: 11 additions & 3 deletions src/main/java/com/codeplanks/movies/Review.java
Original file line number Diff line number Diff line change
Expand Up @@ -7,12 +7,20 @@
import org.springframework.data.annotation.Id;
import org.springframework.data.mongodb.core.mapping.Document;

import java.time.LocalDateTime;

@Document(collection = "reviews")
@Data
@AllArgsConstructor
@NoArgsConstructor
@AllArgsConstructor @NoArgsConstructor
public class Review {
@Id
private ObjectId id;
private String body;
private LocalDateTime created;
private LocalDateTime updated;

public Review(String body, LocalDateTime created, LocalDateTime updated) {
this.body = body;
this.created = created;
this.updated = updated;
}
}
2 changes: 2 additions & 0 deletions src/main/java/com/codeplanks/movies/ReviewRepository.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
package com.codeplanks.movies;public interface ReviewRepository {
}

0 comments on commit bb832b9

Please sign in to comment.