package app.insti.api.model;

import androidx.annotation.NonNull;

import com.google.gson.annotations.SerializedName;

import java.sql.Timestamp;
import java.util.List;

import app.insti.interfaces.CardInterface;

public class NewEvent implements CardInterface {

    @NonNull()
    @SerializedName("id")
    private String newEventID;

    @SerializedName("str_id")
    private String newEventStrID;

    @SerializedName("name")
    private String newEventName;

    @SerializedName("description")
    private String newEventDescription;

    @SerializedName("image_url")
    private String newEventImageURL;

    @SerializedName("date")
    private Timestamp newEventDate;

    @SerializedName("start_time")
    private Timestamp newEventStartTime;

    @SerializedName("end_time")
    private Timestamp newEventEndTime;

    @SerializedName("venue")
    private String newEventVenue;

    @SerializedName("parent")
    private SubActivity newEventParent;

    @SerializedName("interested_count")
    private int newEventInterestedCount;

    @SerializedName("going_count")
    private int newEventGoingCount;

    @SerializedName("interested")
    private List<User> newEventInterested;

    @SerializedName("going")
    private List<User> newEventGoing;

    @NonNull
    public String getNewEventID() {
        return newEventID;
    }

    public String getNewEventStrID() {
        return newEventStrID;
    }

    public String getNewEventName() {
        return newEventName;
    }

    public String getNewEventDescription() {
        return newEventDescription;
    }

    public String getNewEventImageURL() {
        return newEventImageURL;
    }

    public Timestamp getNewEventDate() {
        return newEventDate;
    }

    public Timestamp getNewEventStartTime() {
        return newEventStartTime;
    }

    public Timestamp getNewEventEndTime() {
        return newEventEndTime;
    }

    public String getNewEventVenue() {
        return newEventVenue;
    }

    public SubActivity getNewEventParent() {
        return newEventParent;
    }

    public int getNewEventInterestedCount() {
        return newEventInterestedCount;
    }

    public int getNewEventGoingCount() {
        return newEventGoingCount;
    }

    public List<User> getNewEventInterested() {
        return newEventInterested;
    }

    public List<User> getNewEventGoing() {
        return newEventGoing;
    }

    public void setNewEventID(@NonNull String newEventID) {
        this.newEventID = newEventID;
    }

    public void setNewEventStrID(String newEventStrID) {
        this.newEventStrID = newEventStrID;
    }

    public void setNewEventName(String newEventName) {
        this.newEventName = newEventName;
    }

    public void setNewEventDescription(String newEventDescription) {
        this.newEventDescription = newEventDescription;
    }

    public void setNewEventImageURL(String newEventImageURL) {
        this.newEventImageURL = newEventImageURL;
    }

    public void setNewEventDate(Timestamp newEventDate) {
        this.newEventDate = newEventDate;
    }

    public void setNewEventStartTime(Timestamp newEventStartTime) {
        this.newEventStartTime = newEventStartTime;
    }

    public void setNewEventEndTime(Timestamp newEventEndTime) {
        this.newEventEndTime = newEventEndTime;
    }

    public void setNewEventVenue(String newEventVenue) {
        this.newEventVenue = newEventVenue;
    }

    public void setNewEventParent(SubActivity newEventParent) {
        this.newEventParent = newEventParent;
    }

    public void setNewEventInterestedCount(int newEventInterestedCount) {
        this.newEventInterestedCount = newEventInterestedCount;
    }

    public void setNewEventGoingCount(int newEventGoingCount) {
        this.newEventGoingCount = newEventGoingCount;
    }

    public void setNewEventInterested(List<User> newEventInterested) {
        this.newEventInterested = newEventInterested;
    }

    public void setNewEventGoing(List<User> newEventGoing) {
        this.newEventGoing = newEventGoing;
    }

    @Override
    public long getId() {
        return getNewEventID().hashCode();
    }

    @Override
    public String getTitle() {
        return getNewEventName();
    }

    @Override
    public String getSubtitle() {
        String subtitle = getNewEventDate() + "|" + getNewEventStartTime().toString() + "|" + getNewEventVenue();
        return subtitle;
    }

    @Override
    public String getAvatarUrl() {
        return getNewEventImageURL();
    }
}
