# -*- coding: utf-8 -*-
from __future__ import unicode_literals

from rest_framework import serializers
from portal import models


class StudentSerializer(serializers.ModelSerializer):
    class Meta:
        model = models.Student
        fields = ('id', 'first_name', 'last_name', 'middle_name')


class TeacherSerializer(serializers.ModelSerializer):
    class Meta:
        model = models.Teacher
        fields = ('id', 'first_name', 'last_name', 'middle_name')


class LabSerializer(serializers.ModelSerializer):
    class Meta:
        model = models.Lab
        fields = ('id', 'name', 'number')


class StudyGroupSerializer(serializers.ModelSerializer):
    class Meta:
        model = models.StudyGroup
        fields = ('id', 'name')


class RoomSerializer(serializers.ModelSerializer):
    class Meta:
        model = models.Room
        fields = ('id', 'study_group', 'subject')
        depth = 1


class TaskSerializer(serializers.ModelSerializer):
    class Meta:
        model = models.Task
        fields = ('id', 'status', 'student', 'lab', 'mark')
