tournaments.hrl 1.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657
  1. -ifndef(TOURNAMENTS_HRL).
  2. -define(TOURNAMENTS_HRL, "tournaments.hrl").
  3. -include_lib("kvs/include/kvs.hrl").
  4. -record(team,
  5. {
  6. ?ITERATOR(feed),
  7. name, %% team name for now will bu just first player username
  8. play_record, %% linked list history of played users under that ticket
  9. type
  10. }
  11. ).
  12. -record(tournament,
  13. {
  14. ?ITERATOR(feed),
  15. name, %% tournament name
  16. game_type,
  17. description,
  18. creator,
  19. created,
  20. start_date,
  21. start_time,
  22. end_date,
  23. status, %% activated, ongoing, finished, canceled
  24. quota,
  25. tours,
  26. awards,
  27. winners :: list(), %% [{UserId, Position, GiftId}]
  28. waiting_queue, %% play_record, added here when user wants to join tournament
  29. avatar,
  30. owner,
  31. players_count,
  32. speed,
  33. type,
  34. game_mode
  35. }
  36. ). %% eliminatin, pointing, etc
  37. -record(play_record, %% tournament_player, game_record, tournament_info, choose your name :)
  38. {
  39. ?ITERATOR(feed),
  40. who, %% user
  41. tournament, %% tournament in which user played
  42. team, %% team under which user player tournament
  43. game_id, %% game id that user played under that team
  44. realname,
  45. game_points,
  46. kakush,
  47. kakush_currency,
  48. quota,
  49. other
  50. }
  51. ).
  52. -endif.