Code Monkey home page Code Monkey logo

hprueba's Introduction

H_PRUEBA

Instalacion

git clone https://github.com/DavidNazareno/HPrueba.git

Uso

Para ejecutar acceder desde la terminal y escribir

Nota:

Cuando se hace una mutacion GenerateRequest retonar url, esa url abre un html statico sencillo donde le muestra la informacion de la solicitud y su tecnico.

Ejecutar

go run ./main.go

Crear Ticket

mutation{
  AddClient{
    id
    ticket
  }
}

Generar Solicitud

mutation {
  GenerateRequest(ticket: "Agregar Ticket para validar cliente y crear solicitud")
}

Database

Digrama de base de datos, con relacions corresondientes para la funcionalidad de la app

Querys

  • getRequest() recibe como parametro el token generado, y retorna el Objecto Request desde la tabla requests en la base de datos.
  • getTechOrders() recibe como parametro el id del tecnico y retorna la cantidad de ordenes que tiene el tecnico en ese momento.
 getRequest(token: String!): Request!
 getTechOrders(id: String!): String!

Mutation

  AddClient: Client!
  GenerateRequest(ticket: String!): String!
  • AddClient() recibe como parametro el cliente y es para crear el ticket y almacenarlo en la base de datos

  • GenerateRequest() recibe como parametro el input NewRequest creado en AddCliente para validar el cliente y crear la solicitud junto al token y asingarlo aleatoriamente a un tecnico, retornando el link para el seguimiento.

  input NewRequest {
  token: String!
  client: Int!
  status: Int!
  score: Int!
}

Schemas

Client

Objeto client para gestionar los ticket y validacion de cada cliente que haga una solictud al servicio

type Client {
  id: ID!
  ticket: String!
}

Order

Objeto Order para construir las ordenes y relacionarla a la tabla technician

type Order {
  id: ID!
  technician: Technician!

}

Request

Objeto Request para construir las solicitudes de los clientes, cuando se valida el ticket, con relacion a a las tablas Client y Status

type Request {
  token: String!
  clients: Client!
  status: Int!
  score: Int
}

Technician

Objeto Technician para hacer hacer uso de los tecnicos almacenados en la base de datos.

type Technician {
  id: ID!
  name: String!
}

hprueba's People

Contributors

davidnazareno avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.