ITegs / trippify

🌍 Share your roadtrip travel experiences on an interactive map
0 stars 0 forks source link

[Database] Optimize database scheme #7

Open ITegs opened 3 months ago

ITegs commented 3 months ago

[!IMPORTANT] TBD: Use RFC-Dates or unix timestamps?

edit: using RFC3339 for now


Trip:

Contains the overall information about the trip:

Example object ```json { "_id": ObjectId("..."), "name": "Roadtrip A", "startDate": "2023-08-01", "endDate": "2023-08-15", "spots": [{ "spotId": ObjectId("..."), "longitude": 1234, "latitude": 1234, }, {...}] } ```

Spots:

Contains all spots:

Example object ```json { "_id": ObjectId("..."), "roadtripId": ObjectId("..."), "title": "Garmisch-Partenkirchen", "longitude": 1234, "latitude": 1234, "image": [{"src": "base64encodedstring1", "timestamp": 1722929583}], "description": "Beautiful mountain view", "date_from": 1722929583, "date_to": 1722939583, } ```
ITegs commented 3 months ago

Using RFC3339 dates for now. 2006-01-02T15:04:05Z07:00

ITegs commented 3 months ago

Schema updated in 5ca82c4