Marble/server/appointment/serializers.py
2024-10-09 21:15:08 +04:00

17 lines
529 B
Python

from rest_framework import serializers
from server.user.serializers import CustomUserDetailsSerializer
from server.gym_program.serializers import GymProgramSerializer
from .models import Appointment
class AppointmentSerializer(serializers.ModelSerializer):
user = CustomUserDetailsSerializer(read_only=True)
gym_program = GymProgramSerializer(read_only=True)
class Meta:
model = Appointment
fields = ('id',
'user',
'gym_program',
'start_date')