from common.models import Job, Server, Component, KPI, Ammo, RegressionComment, Task, Server
from mobilepage.models import MobileJob
from rest_framework import serializers


class AmmoSerializer(serializers.ModelSerializer):
    class Meta:
        model = Ammo
        fields = '__all__'


class ServerSerializer(serializers.ModelSerializer):
    class Meta:
        model = Server
        fields = '__all__'


class TaskSerializer(serializers.ModelSerializer):
    class Meta:
        model = Task
        fields = '__all__'


class ComponentSerializer(serializers.ModelSerializer):
    class Meta:
        model = Component
        fields = '__all__'


class KpiSerializer(serializers.ModelSerializer):
    class Meta:
        model = KPI
        fields = '__all__'


class RegressionCommentSerializer(serializers.ModelSerializer):
    class Meta:
        model = RegressionComment
        fields = '__all__'


class ServerSerializer(serializers.ModelSerializer):
    class Meta:
        model = Server
        fields = '__all__'


class JobSerializer(serializers.ModelSerializer):
    tank = ServerSerializer(read_only=True)
    srv = ServerSerializer(read_only=True)

    class Meta:
        model = Job
        fields = '__all__'


class MobileJobSerializer(serializers.ModelSerializer):
    class Meta:
        model = MobileJob
        fields = '__all__'
