from rest_framework import serializers
from .models import WeatherRecord


class WeatherRecordSerializer(serializers.ModelSerializer):
    class Meta:
        model = WeatherRecord
        fields = '__all__'


class WeatherSyncSerializer(serializers.ModelSerializer):
    """Windmill からの POST 用（id不要）"""
    class Meta:
        model = WeatherRecord
        fields = ['date', 'temp_mean', 'temp_max', 'temp_min',
                  'sunshine_h', 'precip_mm', 'wind_max', 'pressure_min']
