first commit
This commit is contained in:
28
core/apps/accounts/serializers/participant/participant.py
Normal file
28
core/apps/accounts/serializers/participant/participant.py
Normal file
@@ -0,0 +1,28 @@
|
||||
from rest_framework import serializers
|
||||
|
||||
from core.apps.accounts.models import ParticipantModel
|
||||
|
||||
|
||||
class BaseParticipantSerializer(serializers.ModelSerializer):
|
||||
class Meta:
|
||||
model = ParticipantModel
|
||||
fields = [
|
||||
"id",
|
||||
"name",
|
||||
]
|
||||
|
||||
|
||||
class ListParticipantSerializer(BaseParticipantSerializer):
|
||||
class Meta(BaseParticipantSerializer.Meta): ...
|
||||
|
||||
|
||||
class RetrieveParticipantSerializer(BaseParticipantSerializer):
|
||||
class Meta(BaseParticipantSerializer.Meta): ...
|
||||
|
||||
|
||||
class CreateParticipantSerializer(BaseParticipantSerializer):
|
||||
class Meta(BaseParticipantSerializer.Meta):
|
||||
fields = [
|
||||
"id",
|
||||
"name",
|
||||
]
|
||||
Reference in New Issue
Block a user