package com.jdbernard.timeanalyzer;

import org.joda.time.DateTime;
import org.joda.time.Duration;

public class Entry {

    public String description;
    public String notes;
    public DateTime start;
    public Duration duration;
    public Category category;

    public Entry(Category c, String description, DateTime start,
    Duration duration) {
        this(c, description, "", start, duration);
    }

    public Entry(Category c, Event e) {
        this(c, e.description, e.notes, e.start, e.duration);
    }

    public Entry(Category c, String description, String notes, DateTime start,
    Duration duration) {
        this.description = description;
        this.notes = notes;
        this.start = start;
        this.duration = duration;
        this.category = c;
    }

    public String toString() {
        return category.description + ": " + description;
    }
}
