246 lines
8.8 KiB
JSON
246 lines
8.8 KiB
JSON
{
|
|
"ambiente": "prafrot",
|
|
"label": "Prafrot (Prafrota)",
|
|
"recursoBase": "/cadastro_frota",
|
|
"rotas": [
|
|
{
|
|
"id": "cadastro_frota-listar",
|
|
"recurso": "cadastro_frota",
|
|
"operations": [
|
|
{
|
|
"method": "GET",
|
|
"path": "/cadastro_frota/apresentar",
|
|
"descricao": "Lista veículos cadastrados na frota",
|
|
"responseShape": [
|
|
{
|
|
"field": "idveiculo_frota",
|
|
"type": "number",
|
|
"description": "ID do veículo"
|
|
},
|
|
{
|
|
"field": "placa",
|
|
"type": "string",
|
|
"description": "Placa"
|
|
},
|
|
{
|
|
"field": "modelo",
|
|
"type": "string",
|
|
"description": "Modelo"
|
|
},
|
|
{
|
|
"field": "base",
|
|
"type": "string",
|
|
"description": "Unidade/Base"
|
|
},
|
|
{
|
|
"field": "motorista",
|
|
"type": "string",
|
|
"description": "Motorista"
|
|
},
|
|
{
|
|
"field": "status",
|
|
"type": "string",
|
|
"description": "Status"
|
|
}
|
|
],
|
|
"suggestedColumns": [
|
|
{
|
|
"field": "placa",
|
|
"header": "Placa",
|
|
"width": "100px"
|
|
},
|
|
{
|
|
"field": "modelo",
|
|
"header": "Modelo",
|
|
"width": "150px"
|
|
}
|
|
],
|
|
"filterDefs": [
|
|
{
|
|
"field": "placa",
|
|
"label": "Placa",
|
|
"type": "text"
|
|
}
|
|
]
|
|
},
|
|
{
|
|
"method": "GET",
|
|
"path": "/cadastro_frota/:id",
|
|
"descricao": "Detalhe de um veículo",
|
|
"responseShape": [
|
|
{
|
|
"field": "idveiculo_frota",
|
|
"type": "number",
|
|
"description": "ID"
|
|
},
|
|
{
|
|
"field": "placa",
|
|
"type": "string",
|
|
"description": "Placa"
|
|
}
|
|
]
|
|
},
|
|
{
|
|
"method": "POST",
|
|
"path": "/cadastro_frota",
|
|
"descricao": "Criar novo veículo",
|
|
"requestBody": [
|
|
{
|
|
"field": "placa",
|
|
"type": "string",
|
|
"required": true
|
|
},
|
|
{
|
|
"field": "modelo",
|
|
"type": "string",
|
|
"required": true
|
|
}
|
|
]
|
|
},
|
|
{
|
|
"method": "PUT",
|
|
"path": "/cadastro_frota/:id",
|
|
"descricao": "Atualizar veículo",
|
|
"requestBody": [
|
|
{
|
|
"field": "placa",
|
|
"type": "string",
|
|
"required": false
|
|
},
|
|
{
|
|
"field": "status",
|
|
"type": "string",
|
|
"required": false
|
|
}
|
|
]
|
|
}
|
|
]
|
|
},
|
|
{
|
|
"id": "manutencao_frota-listar",
|
|
"recurso": "manutencao_frota",
|
|
"operations": [
|
|
{
|
|
"method": "GET",
|
|
"path": "/manutencao_frota/apresentar",
|
|
"descricao": "Lista todas as manutenções",
|
|
"responseShape": [
|
|
{
|
|
"field": "idmanutencao_frota",
|
|
"type": "number",
|
|
"description": "ID manutenção"
|
|
},
|
|
{
|
|
"field": "placa",
|
|
"type": "string",
|
|
"description": "Placa"
|
|
},
|
|
{
|
|
"field": "oficina",
|
|
"type": "string",
|
|
"description": "Oficina"
|
|
},
|
|
{
|
|
"field": "status",
|
|
"type": "string",
|
|
"description": "Status"
|
|
}
|
|
],
|
|
"suggestedColumns": [
|
|
{
|
|
"field": "idmanutencao_frota",
|
|
"header": "ID",
|
|
"width": "80px"
|
|
},
|
|
{
|
|
"field": "placa",
|
|
"header": "PLACA",
|
|
"width": "100px"
|
|
}
|
|
],
|
|
"filterDefs": [
|
|
{
|
|
"field": "placa",
|
|
"label": "Placa",
|
|
"type": "text"
|
|
},
|
|
{
|
|
"field": "status",
|
|
"label": "Status",
|
|
"type": "select"
|
|
}
|
|
]
|
|
},
|
|
{
|
|
"method": "GET",
|
|
"path": "/manutencao_frota/:id",
|
|
"descricao": "Detalhe de uma manutenção",
|
|
"responseShape": [
|
|
{
|
|
"field": "idmanutencao_frota",
|
|
"type": "number",
|
|
"description": "ID"
|
|
},
|
|
{
|
|
"field": "placa",
|
|
"type": "string",
|
|
"description": "Placa"
|
|
}
|
|
]
|
|
},
|
|
{
|
|
"method": "POST",
|
|
"path": "/manutencao_frota",
|
|
"descricao": "Criar nova manutenção",
|
|
"requestBody": [
|
|
{
|
|
"field": "placa",
|
|
"type": "string",
|
|
"required": true
|
|
},
|
|
{
|
|
"field": "oficina",
|
|
"type": "string",
|
|
"required": true
|
|
}
|
|
]
|
|
},
|
|
{
|
|
"method": "PUT",
|
|
"path": "/manutencao_frota/:id",
|
|
"descricao": "Atualizar manutenção",
|
|
"requestBody": [
|
|
{
|
|
"field": "status",
|
|
"type": "string",
|
|
"required": false
|
|
}
|
|
]
|
|
}
|
|
]
|
|
},
|
|
{
|
|
"id": "disponibilidade_frota",
|
|
"recurso": "disponibilidade_frota",
|
|
"operations": [
|
|
{
|
|
"method": "GET",
|
|
"path": "/disponibilidade_frota/apresentar",
|
|
"descricao": "Lista disponibilidade",
|
|
"responseShape": [
|
|
{
|
|
"field": "placa",
|
|
"type": "string",
|
|
"description": "Placa"
|
|
},
|
|
{
|
|
"field": "disponivel",
|
|
"type": "boolean",
|
|
"description": "Disponível"
|
|
}
|
|
]
|
|
}
|
|
]
|
|
}
|
|
]
|
|
} |