syntax = "proto3";

package pb_common_types;

option go_package = "github.com/acompany-develop/QuickMPC/src/Proto/common_types";

enum JobStatus {
    UNKNOWN = 0;
    PRE_JOB = 1;
    READ_DB = 2;
    COMPUTE = 3;
    WRITE_DB = 4;
    COMPLETED = 5;
}

enum ComputationMethod {
    COMPUTATION_METHOD_UNSPECIFIED = 0;
    COMPUTATION_METHOD_MEAN = 1;
    COMPUTATION_METHOD_VARIANCE = 2;
    COMPUTATION_METHOD_SUM = 3;
    COMPUTATION_METHOD_CORREL = 4;
    COMPUTATION_METHOD_LINEAR_REGRESSION = 5;
    COMPUTATION_METHOD_LOGISTIC_REGRESSION = 6;
    COMPUTATION_METHOD_MESH_CODE = 7;
    COMPUTATION_METHOD_DECISION_TREE = 8;
    COMPUTATION_METHOD_JOIN_TABLE= 9;
}

enum PredictMethod {
    PREDICT_METHOD_UNSPECIFIED = 0;
    PREDICT_METHOD_LINEAR_REGRESSION = 1;
    PREDICT_METHOD_LOGISTIC_REGRESSION = 2;
    PREDICT_METHOD_DECISION_TREE = 3;
    PREDICT_METHOD_SID3_TREE = 4;
}

message ProcedureProgress {
    uint64 id = 1;                // unique id in ProgressManager context
    string description = 2;       // describe specific process in job
    float progress = 3;           // describe progress by [0.0, 100.0]
    bool completed = 4;           // describe that procedure is completed or not
    optional string details = 5;  // describe progress in details
}

message JobProgress {
    string job_uuid = 1;
    JobStatus status = 2;
    repeated ProcedureProgress progresses = 3;
}
