powermeter/app/schemas/impulse.py

21 lines
406 B
Python
Raw Permalink Normal View History

2021-01-24 13:58:29 +01:00
from .. import ma
from ..models.impulse import Impulse
from marshmallow import fields
from .namespacedSchema import NamespacedSchema
class ImpulseQuerySchema(ma.Schema):
class Meta:
strict = True
timeperiod = fields.String()
class ImpulseSchema(NamespacedSchema):
class Meta:
strict = True
model = Impulse
name = "impulse"
plural_name = "impulses"