routing and model __init__ updates

This commit is contained in:
Gardient
2021-09-22 19:25:51 +03:00
parent 98a8747821
commit ef431c28ca
5 changed files with 36 additions and 21 deletions

View File

@@ -1,11 +1,14 @@
from marshmallow import Schema, fields
from api.target_exchange.serializers import TargetExchangeSchema
class TargetSchema(Schema):
id = fields.Int()
name = fields.Str()
routing_key = fields.Str(required=True)
exchange = fields.Nested(TargetExchangeSchema)
target_schema = TargetSchema()
targets_schema = TargetSchema(many=True)