Files
zwift-offline/protobuf/goal.proto
T
2022-09-23 13:04:20 -03:00

38 lines
941 B
Protocol Buffer

syntax = "proto2";
import "profile.proto"; //enum Sport
message Goal {
optional uint64 id = 1;
optional uint64 player_id = 2;
optional Sport sport = 3;
optional string name = 4; // i.e. "Monthly time goal"
optional GoalType type = 5;
optional GoalPeriod periodicity = 6;
optional float target_distance = 7; //in meters. set to dur for dur goals
optional float target_duration = 8; //in minutes. set to dist for dist goals
optional float actual_distance = 9; //in meters. is also set for dur goals?
optional float actual_duration = 10; //in minutes. is also set for dist goals?
optional uint64 created_on = 11; //in ms since epoch
optional uint64 period_end_date = 12;
optional GoalStatus status = 13;
optional string timezone = 14;
}
message Goals {
repeated Goal goals = 1;
}
enum GoalType {
DISTANCE = 0;
TIME = 1;
}
enum GoalPeriod {
WEEKLY = 0;
MONTHLY = 1;
}
enum GoalStatus {
ACTIVE = 0;
RETIRED = 1;
}