Add GroupScore, Group and StageSerializer
This commit is contained in:
parent
bfe1c07fdc
commit
2f4df349c0
|
|
@ -0,0 +1,7 @@
|
||||||
|
# frozen_string_literal: true
|
||||||
|
|
||||||
|
class GroupScoreSerializer < ApplicationSerializer
|
||||||
|
attributes :group_points, :received_points, :scored_points
|
||||||
|
|
||||||
|
belongs_to :team
|
||||||
|
end
|
||||||
|
|
@ -0,0 +1,8 @@
|
||||||
|
# frozen_string_literal: true
|
||||||
|
|
||||||
|
class GroupSerializer < ApplicationSerializer
|
||||||
|
attributes :number
|
||||||
|
|
||||||
|
has_many :matches
|
||||||
|
has_many :group_scores
|
||||||
|
end
|
||||||
|
|
@ -0,0 +1,8 @@
|
||||||
|
# frozen_string_literal: true
|
||||||
|
|
||||||
|
class StageSerializer < ApplicationSerializer
|
||||||
|
attributes :level
|
||||||
|
|
||||||
|
has_many :matches
|
||||||
|
has_many :groups
|
||||||
|
end
|
||||||
Loading…
Reference in New Issue