class Visit(Schema): id = fields.Integer() visitor = fields.Nested(Visitor) visited_on = fields.String() message = fields.String() class Meta: dump_only = ["id", "visitor", "visited_on", "created_on"] load_only = ["visit_id", "visitor_id"]
class Match(Schema): id = fields.Integer() game = fields.Nested(GameLight) results = fields.List(fields.Nested(Result)) created_at = fields.String() updated_at = fields.String() class Meta: dump_only = ["id", "created_at", "updated_at"]
class Player(Schema): id = fields.Integer() name = fields.String() stats = fields.List(fields.Nested(Stats)) class Meta: dump_only = ["id"]
class Side(Schema): id = fields.Integer() name = fields.String() players = fields.List(fields.Nested(PlayerLight)) stats = fields.List(fields.Nested(Stats)) class Meta: dump_only = ["id"]
class Game(Schema): id = fields.Integer() name = fields.String() side_size_min = fields.Integer(default=1) side_size_max = fields.Integer(default=2) side_count_min = fields.Integer(default=2) side_count_max = fields.Integer(default=2) class Meta: dump_only = ["id"]
class OpenApiPath(Schema): package_name = fields.String()
class ResultNew(Schema): players = fields.List(fields.String()) score = fields.Integer(default=0)
class SideNew(Schema): players = fields.List(fields.String()) name = fields.String(optional=True)
class OpenApiPath(Schema): unit_name = fields.String()
class Visitor(Schema): id = fields.Integer() name = fields.String() location = fields.String() ip_addr = fields.String()
class VisitNew(Visit): message = fields.String(required=True) visitor_name = fields.String(required=True)
class MatchNew(Schema): game = fields.String() results = fields.List(fields.Nested(ResultNew))