from rest_framework import serializers
from phishingApp.models import *


class SignSerializer(serializers.ModelSerializer):
    class Meta:
        model = Signs
        fields = ('sign_id',
                  'text'
                  )


class TypeSerializer(serializers.ModelSerializer):
    class Meta:
        model = Types
        fields = ('type_id',
                  'type'
                  )


class EmailSerializer(serializers.ModelSerializer):
    class Meta:
        model = Emails
        fields = ('email_id',
                  'subject',
                  'sender',
                  'recipient',
                  'date',
                  'cc',
                  'body',
                  'type',
                  'sign'
                  )


class GameRunSerializer(serializers.ModelSerializer):
    class Meta:
        model = GameRuns
        fields = ('gamerun_id',
                  'session_id',
                  'player_name',
                  'start_time',
                  'end_time'
                  )


class EmailGameRunSerializer(serializers.ModelSerializer):
    class Meta:
        model = EmailGameRuns
        fields = ('id',
                  'email',
                  'game_run',
                  'order',
                  'player_answer',
                  'duration'
                  )

class SettingSerializer(serializers.ModelSerializer):
    class Meta:
        model = Settings
        fields = ('setting_id',
                  'item',
                  'value'
                  )
