package de.oaa.libredeck.web.service;

import java.util.List;

import de.oaa.libredeck.web.model.Track;

public class GenerationJob {

    public enum Phase { FETCHING, LOOKUP, REVIEW_READY, GENERATING, DONE, ERROR, CANCELLED }

    public final String id;
    public final long createdAt = System.currentTimeMillis();

    public volatile Phase       phase        = Phase.FETCHING;
    public volatile int         done         = 0;
    public volatile int         total        = 0;
    public volatile String      errorMessage = null;
    public volatile byte[]      pdf          = null;
    public volatile String      filename     = null;
    public volatile String      playlistTitle = null;
    public volatile List<Track> tracks       = null;

    public GenerationJob(String id) {
        this.id = id;
    }
}
