mirror of
https://github.com/evgen-app/chess_rpg_backend.git
synced 2024-11-15 06:08:55 +03:00
24 lines
526 B
Python
24 lines
526 B
Python
|
from rest_framework import serializers
|
||
|
|
||
|
from game.models import Hero
|
||
|
|
||
|
|
||
|
class CreateHeroSerializer(serializers.ModelSerializer):
|
||
|
class Meta:
|
||
|
model = Hero
|
||
|
fields = ("type", "idle_img", "attack_img", "die_img", "health", "speed")
|
||
|
|
||
|
|
||
|
class GetHeroSerializer(serializers.ModelSerializer):
|
||
|
class Meta:
|
||
|
model = Hero
|
||
|
fields = (
|
||
|
"added",
|
||
|
"type",
|
||
|
"idle_img",
|
||
|
"attack_img",
|
||
|
"die_img",
|
||
|
"health",
|
||
|
"speed",
|
||
|
)
|