2020-02-28 13:46:33 +00:00
|
|
|
from rest_framework import serializers
|
|
|
|
from .models import MatrixServiceProduct
|
2020-02-28 15:26:45 +00:00
|
|
|
from uncloud_vm.serializers import VMProductSerializer
|
2020-02-28 13:46:33 +00:00
|
|
|
|
|
|
|
class MatrixServiceProductSerializer(serializers.ModelSerializer):
|
2020-02-28 15:26:45 +00:00
|
|
|
vm = VMProductSerializer()
|
|
|
|
|
2020-02-28 13:46:33 +00:00
|
|
|
class Meta:
|
|
|
|
model = MatrixServiceProduct
|
2020-02-28 15:26:45 +00:00
|
|
|
fields = ['uuid', 'order', 'owner', 'status', 'vm', 'domain']
|
|
|
|
read_only_fields = ['uuid', 'order', 'owner', 'status']
|