Add GroupScore, Group and StageSerializer

This commit is contained in:
Thor77 2018-12-11 14:30:50 +01:00
parent bfe1c07fdc
commit 2f4df349c0
3 changed files with 23 additions and 0 deletions

View File

@ -0,0 +1,7 @@
# frozen_string_literal: true
class GroupScoreSerializer < ApplicationSerializer
attributes :group_points, :received_points, :scored_points
belongs_to :team
end

View File

@ -0,0 +1,8 @@
# frozen_string_literal: true
class GroupSerializer < ApplicationSerializer
attributes :number
has_many :matches
has_many :group_scores
end

View File

@ -0,0 +1,8 @@
# frozen_string_literal: true
class StageSerializer < ApplicationSerializer
attributes :level
has_many :matches
has_many :groups
end