示例#1
0
def customer_app_data_schema():
    return status_msg_extra_schema(data=dict_schema(
        cities=list_schema(schema=dict_schema(
            id=num_schema(), name=str_schema(), state=str_schema())),
        vehicles=list_schema(schema=dict_schema(id=num_schema(),
                                                vehicle_type=null_str_schema(),
                                                capacity=null_str_schema())),
        vendors=list_schema(schema=dict_schema(
            id=num_schema(),
            name=null_str_schema(),
            phone=null_str_schema(),
        )),
        city_scores=list_schema(schema=list_schema(min_items=2, max_items=2)),
        address_scores=list_schema(
            schema=list_schema(min_items=3, max_items=3)),
        user=sme_user_schema(),
    ))
示例#2
0
def fms_user_schema():
    return dict_schema(full_name=null_str_schema(),
                       contact_name=null_str_schema(),
                       address=address_schema(),
                       username=str_schema(),
                       phone=null_str_schema(),
                       email=null_str_schema(),
                       designation=null_str_schema(),
                       id=num_schema())
示例#3
0
def fms_send_quote_schema():
    return status_msg_extra_schema(
        data=dict_schema(id=num_schema(),
                         transaction_id=num_schema(),
                         vehicle_request_id=num_schema(),
                         user_id=num_schema(),
                         quantity=num_schema(gt=0, multiple_of=1),
                         amount=num_schema(gt=0),
                         comments=null_str_schema()))
示例#4
0
def fms_list_vehicles_schema():
    return status_msg_extra_schema(
        data=list_schema(schema=dict_schema(
            id=num_schema(),
            vehicle_number=str_schema(),
            vehicle_type=null_num_schema(),
            vehicle_model=null_str_schema(),
        )),
        owners_data=list_schema(schema=dict_schema(
            id=num_schema(),
            name=null_str_schema(),
            phone=null_str_schema(),
        )),
        drivers_data=list_schema(
            schema=dict_schema(id=num_schema(),
                               name=str_schema(),
                               phone=str_schema(),
                               driving_licence_number=null_str_schema())),
        accounts_data=list_schema(schema=account_schema()))
示例#5
0
def customer_new_booking_schema():
    return status_msg_extra_schema(
        booking_id=num_schema(gt=0, multiple_of=1),
        vendors=list_schema(schema=dict_schema(
            id=num_schema(),
            name=null_str_schema(),
            phone=null_str_schema(),
        )),
        city_scores=list_schema(schema=list_schema(min_items=2, max_items=2)),
        address_scores=list_schema(
            schema=list_schema(min_items=3, max_items=3)))
示例#6
0
def fms_track_vehicles_schema():
    return status_msg_extra_schema(data=list_schema(schema=dict_schema(
        vehicle_id=num_schema(),
        vehicle_number=str_schema(),
        vehicle_status=vehicle_status_schema(),
        driver=null_dict_schema(
            id=num_schema(), name=str_schema(), phone=str_schema()),
        location=null_dict_schema(name=str_schema(),
                                  district=str_schema(),
                                  state=str_schema(),
                                  country=str_schema(),
                                  latitude=num_schema(gt=-90.0, lt=90.0),
                                  longitude=num_schema(gt=-180.0, lt=180.0),
                                  time=str_schema()),
        path=list_schema(
            schema=list_schema(schema=num_schema(), min_items=3, max_items=3)),
        bearing=num_schema(),
    )))
示例#7
0
def fms_app_data_schema():
    return status_msg_extra_schema(
        data=dict_schema(cities=list_schema(schema=dict_schema(
            id=num_schema(), name=str_schema(), state=str_schema())),
                         vehicles=list_schema(
                             schema=dict_schema(id=num_schema(),
                                                vehicle_type=null_str_schema(),
                                                capacity=null_str_schema())),
                         vendors=list_schema(schema=dict_schema(
                             id=num_schema(),
                             name=null_str_schema(),
                             phone=null_str_schema(),
                         )),
                         city_scores=list_schema(schema=dict_schema()),
                         address_scores=list_schema(schema=dict_schema()),
                         user=dict_schema(),
                         accounts_data=list_schema(schema=account_schema())))
示例#8
0
def fms_available_loads_schema():
    return status_msg_extra_schema(data=list_schema(schema=dict_schema(
        vehicle_request_id=num_schema(),
        vehicle_category_id=num_schema(),
        vehicle_category=str_schema(),
        vehicle_quantity=num_schema(gt=0, multiple_of=1),
        transaction_id=num_schema(),
        transaction_number=str_schema(),
        shipment_datetime=str_schema(),
        from_city=str_schema(),
        from_state=str_schema(),
        to_city=str_schema(),
        to_state=str_schema(),
        quote=null_dict_schema(id=num_schema(),
                               transaction_id=num_schema(),
                               vehicle_request_id=num_schema(),
                               user_id=num_schema(),
                               quantity=num_schema(gt=0, multiple_of=1),
                               amount=num_schema(),
                               comments=null_str_schema()))))
示例#9
0
def fms_list_drivers_schema():
    return status_msg_extra_schema(data=list_schema(
        schema=dict_schema(id=num_schema(),
                           name=str_schema(),
                           phone=str_schema(),
                           driving_licence_number=null_str_schema())), )
示例#10
0
def update_pod_schema():
    return status_msg_extra_schema(pod_details=dict_schema())
示例#11
0
def customer_add_vendor_schema():
    return status_msg_extra_schema(vendors=list_schema(schema=dict_schema(
        id=num_schema(), name=str_schema(), phone=str_schema())))