You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
cookie-api/cookie_api/schema.py

14 lines
481 B
Python

from apistar import types, validators
from cookie_api.util import Decimal
class CookieSchema(types.Type):
id = validators.Integer(allow_null=True)
created_date = validators.DateTime(allow_null=True)
modified_date = validators.DateTime(allow_null=True)
name = validators.String(max_length=50)
recipe_url = validators.String(max_length=255)
sku = validators.String(max_length=55)
qoh = validators.Integer(minimum=0)
unit_cost = Decimal(minimum=0.0)