goal.proto 941 B

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