15 lines
357 B
Python
15 lines
357 B
Python
from marshmallow import Schema, fields
|
|
|
|
from api.target.serializers import TargetSchema
|
|
|
|
|
|
class Registration(Schema):
|
|
id = fields.Int()
|
|
name = fields.Str()
|
|
token = fields.Str(dump_only=True)
|
|
targets = fields.Nested(TargetSchema, required=True, many=True)
|
|
|
|
|
|
registration_schema = Registration()
|
|
registrations_schema = Registration(many=True)
|