"""
    smorest_sfs.modules.codes.schemas
    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

    编码模块的Schemas
"""
from marshmallow import Schema, fields

from smorest_sfs.extensions.marshal.bases import BaseMsgSchema


class TypeCodeSchema(Schema):
    type_code = fields.Str()


class CodeOptsSchema(Schema):
    """编码的选项"""

    class Meta:
        fields = ("id", "name")


class NestedCodeSchema(Schema):

    children = fields.List(fields.Nested("NestedCodeSchema"))

    class Meta:
        fields = ("id", "name", "children")


class CodeListSchema(BaseMsgSchema):
    """编码的选项列表"""

    data = fields.List(fields.Nested(NestedCodeSchema))

8827964fa43a2542b6cfc122d9141d36ec37b1a8
<mask token>


class NestedCodeSchema(Schema):
    <mask token>


    class Meta:
        fields = 'id', 'name', 'children'


class CodeListSchema(BaseMsgSchema):
    """编码的选项列表"""
    data = fields.List(fields.Nested(NestedCodeSchema))

<mask token>


class CodeOptsSchema(Schema):
    <mask token>


    class Meta:
        fields = 'id', 'name'


class NestedCodeSchema(Schema):
    children = fields.List(fields.Nested('NestedCodeSchema'))


    class Meta:
        fields = 'id', 'name', 'children'


class CodeListSchema(BaseMsgSchema):
    """编码的选项列表"""
    data = fields.List(fields.Nested(NestedCodeSchema))

<mask token>


class TypeCodeSchema(Schema):
    <mask token>


class CodeOptsSchema(Schema):
    """编码的选项"""


    class Meta:
        fields = 'id', 'name'


class NestedCodeSchema(Schema):
    children = fields.List(fields.Nested('NestedCodeSchema'))


    class Meta:
        fields = 'id', 'name', 'children'


class CodeListSchema(BaseMsgSchema):
    """编码的选项列表"""
    data = fields.List(fields.Nested(NestedCodeSchema))

<mask token>
from marshmallow import Schema, fields
from smorest_sfs.extensions.marshal.bases import BaseMsgSchema


class TypeCodeSchema(Schema):
    type_code = fields.Str()


class CodeOptsSchema(Schema):
    """编码的选项"""


    class Meta:
        fields = 'id', 'name'


class NestedCodeSchema(Schema):
    children = fields.List(fields.Nested('NestedCodeSchema'))


    class Meta:
        fields = 'id', 'name', 'children'


class CodeListSchema(BaseMsgSchema):
    """编码的选项列表"""
    data = fields.List(fields.Nested(NestedCodeSchema))

"""
    smorest_sfs.modules.codes.schemas
    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

    编码模块的Schemas
"""
from marshmallow import Schema, fields

from smorest_sfs.extensions.marshal.bases import BaseMsgSchema


class TypeCodeSchema(Schema):
    type_code = fields.Str()


class CodeOptsSchema(Schema):
    """编码的选项"""

    class Meta:
        fields = ("id", "name")


class NestedCodeSchema(Schema):

    children = fields.List(fields.Nested("NestedCodeSchema"))

    class Meta:
        fields = ("id", "name", "children")


class CodeListSchema(BaseMsgSchema):
    """编码的选项列表"""

    data = fields.List(fields.Nested(NestedCodeSchema))
