Django backend for WorkX project
25개 이상의 토픽을 선택하실 수 없습니다. Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
This repo is archived. You can view files and clone it, but cannot push or open issues/pull-requests.

15 lines
383 B

  1. from rest_framework import serializers
  2. from .models import Role, Representative
  3. class RoleSerializer(serializers.ModelSerializer):
  4. class Meta:
  5. model = Role
  6. fields = ['id', 'name']
  7. class RepresentativeSerializer(serializers.ModelSerializer):
  8. class Meta:
  9. model = Representative
  10. fields = ['id', 'user', 'phone', 'role', 'projects', 'client']