Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Code Block
\i \path\TO\file_name.sql

QR scanning use case

The buyer of an MTB bottle scans the QR code on the bottle.

The QR code value is of the URL type with the format www.WebAppUrl.com/QR_id (https://nft.openvino.org/MTB18.00006)

The web App takes the QR id parameter and validates it.

Invoke API /qrstatus/{qr id}

  • The API returns: status id and if that wine can be claimed

  • {id: 5, allowClaim : false } allowClaim=false: the wine has already been claimed or does not exist.

  • {id: 1 , allowClaim : true } allowClaim=true: the wine can be claimed.

If the QR id is NOT valid, it comes out explaining the Error.

If the QR id is valid and has not been previously claimed, continue.

If the user is already registered on the platform and his password stored, he goes directly to the Experience Register.

If the user is already registered on the platform and his password is NOT stored, he goes to the Login screen.

If the user is NOT registered on the platform, they go to the User Registration screen.

After registration, the user remains in "PendiaValidation" state, waiting for an admin to validate their data and request additional information if necessary, after completing the information, it goes to "Active" status.

After login or registration:

If you arrive from the scan of a new valid QR, go to the Experience Registration form.

If it does NOT arrive from the scanning of a new QR, by default it shows experience history, experience status and tokens per experience.

Balance of tokens by status: Pending and validated.

Option to go to Experience Registration

Experience Record

  1. If it arrives from the scan of a new valid QR:

    1. Show Experience Registration form:

      1. Photo Upload: Filename + date + User id

      2. Experience Log:

        1. Experience id

        2. Date

        3. Location

        4. PhotoFile Name

        5. User id

      3. Survey Record

        1. Find active questions to answer.

          1. First Question

          2. First Answer

          3. Second Question

          4. Second Answer

          5. Third Question

          6. Third Answer

          7. Experience id

  2. If it does NOT arrive from the scan of a new QR.

NOTE: If no path is specified, then PSQL will use the directory that was last accessed before connecting to PostgreSQL in order to execute the SQL file.Caso de uso escaneo de QR

...

Diagrama entidad-relacion

...