package Database;

import lombok.Data;

import static Config.SomeCodes.MakeArray;

@Data
public class PhotoReviewClass {
    private int id;
    private String DateTime;
    private String Prefix;
    private String FileLeft90;
    private String CompressedLeft90;
    private String CroppedLeft90;
    private String CompressedCropLeft90;
    private String FileLeft45;
    private String CompressedLeft45;
    private String CroppedLeft45;
    private String CompressedCropLeft45;
    private String FileCenter;
    private String CompressedCenter;
    private String CroppedCenter;
    private String CompressedCropCenter;
    private String FileRight45;
    private String CompressedRight45;
    private String CroppedRight45;
    private String CompressedCropRight45;
    private String FileRight90;
    private String CompressedRight90;
    private String CroppedRight90;
    private String CompressedCropRight90;
    private String ThumbLeft90;
    private String ThumbLeft45;
    private String ThumbCenter;
    private String ThumbRight45;
    private String ThumbRight90;

    public PhotoReviewClass(){
        this.id = 0;
        this.DateTime = "";
        this.Prefix = "";
        this.FileLeft90 = "";
        this.FileLeft45 = "";
        this.FileCenter = "";
        this.FileRight45 = "";
        this.FileRight90 = "";
        this.ThumbLeft90 = "";
        this.ThumbLeft45 = "";
        this.ThumbCenter = "";
        this.ThumbRight45 = "";
        this.ThumbRight90 = "";
    }

    public PhotoReviewClass(int id, String DateTime, String Prefix, String FileLeft90, String FileLeft45, String FileCenter, String FileRight45, String FileRight90, String ThumbLeft90, String ThumbLeft45, String ThumbCenter, String ThumbRight45, String ThumbRight90){
        this.id = id;
        this.DateTime = DateTime;
        this.Prefix = Prefix;
        this.FileLeft90 = FileLeft90;
        this.FileLeft45 = FileLeft45;
        this.FileCenter = FileCenter;
        this.FileRight45 = FileRight45;
        this.FileRight90 = FileRight90;
        this.ThumbLeft90 = ThumbLeft90;
        this.ThumbLeft45 = ThumbLeft45;
        this.ThumbCenter = ThumbCenter;
        this.ThumbRight45 = ThumbRight45;
        this.ThumbRight90 = ThumbRight90;
    }

    @Override
    public String toString(){
        return "id: "+id+"\r\nDateTime: "+DateTime+"\r\nPrefix: "+Prefix+"\r\nFileLeft90: "+FileLeft90+"\r\nFileLeft45: "+FileLeft45+"\r\nFileCenter: "+FileCenter+"\r\nFileRight45: "+FileRight45+"\r\nFileRight90: "+FileRight90+"\r\nThumbLeft90: "+ThumbLeft90+"\r\nThumbLeft45: "+ThumbLeft45+"\r\nThumbCenter: "+ThumbCenter+"\r\nThumbRight45: "+ThumbRight45+"\r\nThumbRight90: "+ThumbRight90;
    }

    /**
     * Get all Full Resolution files that are not null
     * @return array of files
     */
    public String[] fullres(){
        return MakeArray(FileLeft90, FileLeft45, FileCenter, FileRight45, FileRight90);
    }

    /**
     * Get all Thumbnail files that are not null
     * @return array of files
     */
    public String[] thumbnails(){
        return MakeArray(ThumbLeft90, ThumbLeft45, ThumbCenter, ThumbRight45, ThumbRight90);
    }

    /**
     * Get all Compressed files that are not null
     * @return array of files
     */
    public String[] compressed(){
        return MakeArray(CompressedLeft90, CompressedLeft45, CompressedCenter, CompressedRight45, CompressedRight90);
    }

    /**
     * Get all Cropped full resolution files that are not null
     * @return array of files
     */
    public String[] cropped(){
        return MakeArray(CroppedLeft90, CroppedLeft45, CroppedCenter, CroppedRight45, CroppedRight90);
    }

    /**
     * Get all Cropped compressed files that are not null
     * @return array of files
     */
    public String[] compressedcrop(){
        return MakeArray(CompressedCropLeft90, CompressedCropLeft45, CompressedCropCenter, CompressedCropRight45, CompressedCropRight90);
    }

}
