from rest_framework import serializers

from horse_race.models import Race


class RaceSerializer(serializers.ModelSerializer):
    class Meta:
        model = Race
        fields = ('id', 'date', 'time', 'city', 'going', 'distance')


class CreateRaceSerializer(serializers.ModelSerializer):
    class Meta:
        model = Race
        fields = ('date', 'time', 'city', 'going', 'distance')
