BAEL-5363 Mongodb crud by date (#12293)
Created new mongo module, model, mongo client and unit test Co-authored-by: Christian Jaimes <christian.jaimes@oracle> Co-authored-by: bipster <openbip@gmail.com>
This commit is contained in:
@@ -0,0 +1,28 @@
|
||||
package com.baeldung.mongo.crud.model;
|
||||
|
||||
import java.time.LocalDateTime;
|
||||
|
||||
public class Event {
|
||||
public String title;
|
||||
public String location;
|
||||
public LocalDateTime dateTime;
|
||||
public String timeZoneOffset;
|
||||
|
||||
public Event() {}
|
||||
public Event(String title, String location, LocalDateTime dateTime) {
|
||||
this.title = title;
|
||||
this.location = location;
|
||||
this.dateTime = dateTime;
|
||||
}
|
||||
|
||||
public Event(String title, String location, LocalDateTime dateTime, String timeZoneOffset) {
|
||||
this.title = title;
|
||||
this.location = location;
|
||||
this.dateTime = dateTime;
|
||||
this.timeZoneOffset = timeZoneOffset;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() { return "\nEvent: " + title + "\nWhere: " + location + "\nWhen: " + dateTime; }
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user