Exemplo n.º 1
0
class ToDoNote(typesystem.Object):
    properties = {
        'id': typesystem.integer(minimum=0),
        'text': typesystem.string(max_length=100),
        'complete': typesystem.boolean(),
        'percent_complete': typesystem.number(),
        'category': Category
    }
Exemplo n.º 2
0
class Kitten(typesystem.Object):
    properties = {
        'name': KittenName,
        'color': KittenColor,
        'cuteness': typesystem.number(minimum=0.0,
                                      maximum=10.0,
                                      multiple_of=0.1)
    }
Exemplo n.º 3
0
class Payment(typesystem.Object):
    properties = {
        # 'user_id': User,
        'amount': typesystem.number(maximum=1000000, description='Payment Amount.'),
        # 'length': typesystem.string(max_length=100),  # time
        'method': Method,
        # 'data': typesystem.string(max_length=100),
        'status': Status,
        # 'date': Quality  # time
    }
Exemplo n.º 4
0
class Location(typesystem.Object):
    properties = {
        'latitude': typesystem.number(minimum=-90.0, maximum=90.0),
        'longitude': typesystem.number(minimum=-180.0, maximum=180.0)
    }