Før direktekobling til Google Kalender
This commit is contained in:
parent
87d1fdfba2
commit
29a36e8a61
2 changed files with 22 additions and 10 deletions
|
|
@ -5,23 +5,25 @@ import com.google.gson.annotations.SerializedName;
|
|||
public class CalendarEvent {
|
||||
@SerializedName("title")
|
||||
private String title;
|
||||
|
||||
@SerializedName("start_date") // Juster denne nøkkelen til hva APIet faktisk returnerer (f.eks "start")
|
||||
private String rawDate;
|
||||
|
||||
@SerializedName("end_date") // Juster nøkkel (f.eks "end")
|
||||
private String rawEndDate;
|
||||
|
||||
@SerializedName("description")
|
||||
private String description;
|
||||
|
||||
@SerializedName("location")
|
||||
private String location;
|
||||
|
||||
// --- NYTT FELT: Varsling (minutter før start) ---
|
||||
// Nå henter denne verdien direkte fra "reminder_minutes" i JSON-responsen fra PHP
|
||||
@SerializedName("reminder_minutes")
|
||||
private int reminderMinutes = 15; // Default 15 min
|
||||
|
||||
// --- UI-hjelpefelter (settes manuelt i appen etter parsing) ---
|
||||
private String day; // F.eks "12"
|
||||
private String day; // F.eks "12"
|
||||
private String month; // F.eks "DES"
|
||||
private String time; // F.eks "10:00 - 11:30"
|
||||
private String time; // F.eks "10:00 - 11:30"
|
||||
|
||||
// Konstruktør for Retrofit (Gson)
|
||||
public CalendarEvent(String title, String rawDate, String rawEndDate, String description, String location) {
|
||||
|
|
@ -55,4 +57,8 @@ public class CalendarEvent {
|
|||
|
||||
public String getTime() { return time; }
|
||||
public void setTime(String time) { this.time = time; }
|
||||
|
||||
// --- NYE METODER FOR VARSLING ---
|
||||
public int getReminderMinutes() { return reminderMinutes; }
|
||||
public void setReminderMinutes(int minutes) { this.reminderMinutes = minutes; }
|
||||
}
|
||||
|
|
@ -467,23 +467,25 @@ import com.google.gson.annotations.SerializedName;
|
|||
public class CalendarEvent {
|
||||
@SerializedName("title")
|
||||
private String title;
|
||||
|
||||
@SerializedName("start_date") // Juster denne nøkkelen til hva APIet faktisk returnerer (f.eks "start")
|
||||
private String rawDate;
|
||||
|
||||
@SerializedName("end_date") // Juster nøkkel (f.eks "end")
|
||||
private String rawEndDate;
|
||||
|
||||
@SerializedName("description")
|
||||
private String description;
|
||||
|
||||
@SerializedName("location")
|
||||
private String location;
|
||||
|
||||
// --- NYTT FELT: Varsling (minutter før start) ---
|
||||
// Nå henter denne verdien direkte fra "reminder_minutes" i JSON-responsen fra PHP
|
||||
@SerializedName("reminder_minutes")
|
||||
private int reminderMinutes = 15; // Default 15 min
|
||||
|
||||
// --- UI-hjelpefelter (settes manuelt i appen etter parsing) ---
|
||||
private String day; // F.eks "12"
|
||||
private String day; // F.eks "12"
|
||||
private String month; // F.eks "DES"
|
||||
private String time; // F.eks "10:00 - 11:30"
|
||||
private String time; // F.eks "10:00 - 11:30"
|
||||
|
||||
// Konstruktør for Retrofit (Gson)
|
||||
public CalendarEvent(String title, String rawDate, String rawEndDate, String description, String location) {
|
||||
|
|
@ -517,6 +519,10 @@ public class CalendarEvent {
|
|||
|
||||
public String getTime() { return time; }
|
||||
public void setTime(String time) { this.time = time; }
|
||||
|
||||
// --- NYE METODER FOR VARSLING ---
|
||||
public int getReminderMinutes() { return reminderMinutes; }
|
||||
public void setReminderMinutes(int minutes) { this.reminderMinutes = minutes; }
|
||||
}
|
||||
|
||||
============================================================
|
||||
|
|
|
|||
Loading…
Reference in a new issue