from marshmallow_jsonapi.flask import Schema
from marshmallow_jsonapi import fields


class SchemaAirState(Schema):
    class Meta:
        type_ = 'air_state'
        self_view = 'air_state_detail'
        self_view_kwargs = {'id': '<id>'}
        self_view_many = 'air_state_list'

    # id = fields.Integer(as_string=True, dump_only=True) # make troubles during update.
    id = fields.Integer(as_string=True, required=False, missing=None, allow_none=True)
    temperature = fields.Decimal(required=True)
    humidity = fields.Decimal(required=True)
    location = fields.Str(required=True)
    device = fields.Str(required=True)
    created = fields.DateTime(format="%Y-%m-%d %H:%M:%S")


class SchemaInsolation(Schema):
    class Meta:
        type_ = 'insolation'
        self_view = 'insolation_detail'
        self_view_kwargs = {'id': '<id>'}
        self_view_many = 'insolation_list'

    # id = fields.Integer(as_string=True, dump_only=True) # make troubles during update.
    id = fields.Integer(as_string=True, required=False, missing=None, allow_none=True)
    insolation = fields.Integer(required=True)
    device = fields.Str(required=True)
    created = fields.DateTime(format="%Y-%m-%d %H:%M:%S")

43a97eaf4c3a6ff9eb451b901fb281d051874cdf
<mask token>


class SchemaInsolation(Schema):


    class Meta:
        type_ = 'insolation'
        self_view = 'insolation_detail'
        self_view_kwargs = {'id': '<id>'}
        self_view_many = 'insolation_list'
    id = fields.Integer(as_string=True, required=False, missing=None,
        allow_none=True)
    insolation = fields.Integer(required=True)
    device = fields.Str(required=True)
    created = fields.DateTime(format='%Y-%m-%d %H:%M:%S')

<mask token>


class SchemaAirState(Schema):


    class Meta:
        type_ = 'air_state'
        self_view = 'air_state_detail'
        self_view_kwargs = {'id': '<id>'}
        self_view_many = 'air_state_list'
    <mask token>
    <mask token>
    <mask token>
    <mask token>
    <mask token>
    <mask token>


class SchemaInsolation(Schema):


    class Meta:
        type_ = 'insolation'
        self_view = 'insolation_detail'
        self_view_kwargs = {'id': '<id>'}
        self_view_many = 'insolation_list'
    id = fields.Integer(as_string=True, required=False, missing=None,
        allow_none=True)
    insolation = fields.Integer(required=True)
    device = fields.Str(required=True)
    created = fields.DateTime(format='%Y-%m-%d %H:%M:%S')

<mask token>


class SchemaAirState(Schema):


    class Meta:
        type_ = 'air_state'
        self_view = 'air_state_detail'
        self_view_kwargs = {'id': '<id>'}
        self_view_many = 'air_state_list'
    id = fields.Integer(as_string=True, required=False, missing=None,
        allow_none=True)
    temperature = fields.Decimal(required=True)
    humidity = fields.Decimal(required=True)
    location = fields.Str(required=True)
    device = fields.Str(required=True)
    created = fields.DateTime(format='%Y-%m-%d %H:%M:%S')


class SchemaInsolation(Schema):


    class Meta:
        type_ = 'insolation'
        self_view = 'insolation_detail'
        self_view_kwargs = {'id': '<id>'}
        self_view_many = 'insolation_list'
    id = fields.Integer(as_string=True, required=False, missing=None,
        allow_none=True)
    insolation = fields.Integer(required=True)
    device = fields.Str(required=True)
    created = fields.DateTime(format='%Y-%m-%d %H:%M:%S')

from marshmallow_jsonapi.flask import Schema
from marshmallow_jsonapi import fields


class SchemaAirState(Schema):


    class Meta:
        type_ = 'air_state'
        self_view = 'air_state_detail'
        self_view_kwargs = {'id': '<id>'}
        self_view_many = 'air_state_list'
    id = fields.Integer(as_string=True, required=False, missing=None,
        allow_none=True)
    temperature = fields.Decimal(required=True)
    humidity = fields.Decimal(required=True)
    location = fields.Str(required=True)
    device = fields.Str(required=True)
    created = fields.DateTime(format='%Y-%m-%d %H:%M:%S')


class SchemaInsolation(Schema):


    class Meta:
        type_ = 'insolation'
        self_view = 'insolation_detail'
        self_view_kwargs = {'id': '<id>'}
        self_view_many = 'insolation_list'
    id = fields.Integer(as_string=True, required=False, missing=None,
        allow_none=True)
    insolation = fields.Integer(required=True)
    device = fields.Str(required=True)
    created = fields.DateTime(format='%Y-%m-%d %H:%M:%S')

from marshmallow_jsonapi.flask import Schema
from marshmallow_jsonapi import fields


class SchemaAirState(Schema):
    class Meta:
        type_ = 'air_state'
        self_view = 'air_state_detail'
        self_view_kwargs = {'id': '<id>'}
        self_view_many = 'air_state_list'

    # id = fields.Integer(as_string=True, dump_only=True) # make troubles during update.
    id = fields.Integer(as_string=True, required=False, missing=None, allow_none=True)
    temperature = fields.Decimal(required=True)
    humidity = fields.Decimal(required=True)
    location = fields.Str(required=True)
    device = fields.Str(required=True)
    created = fields.DateTime(format="%Y-%m-%d %H:%M:%S")


class SchemaInsolation(Schema):
    class Meta:
        type_ = 'insolation'
        self_view = 'insolation_detail'
        self_view_kwargs = {'id': '<id>'}
        self_view_many = 'insolation_list'

    # id = fields.Integer(as_string=True, dump_only=True) # make troubles during update.
    id = fields.Integer(as_string=True, required=False, missing=None, allow_none=True)
    insolation = fields.Integer(required=True)
    device = fields.Str(required=True)
    created = fields.DateTime(format="%Y-%m-%d %H:%M:%S")
