Versions Compared

Key

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

...

  • 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.

...

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: Experience id.

        1. Date.

        2. Location.

        3. PhotoFile Name.

        4. 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 Id previously obtained.

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

    1. Request QR upload and validate QR id:

      1. Open camera to scan QR.

      2. Take only the QR _id from the QR value.

      3. Invoke API /qrstatus/(qr_id):

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

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

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

    2. Show Experience Registration form:

      1. Photo Upload: Filename + date + User id.

      2. Experience Record: Experience id.

        1. Date.

        2. Location.

        3. PhotoFile Name.

        4. 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 previously obtained.

  3. The new experience has been Registered:

    1. User receives confirmation of registration and can see the new Experience uploaded in the Experience History.

    2. After validating the experience by the admin, it changes to "pending validation" "assigned", or indicates that the tokens have been credited to the user.

QR code Initial Generation

  • Table Wine The token ratio is now 1 to 1. 1 wine = 1 NFT token.

BOTTLE_NO: Sequential number of bottles, from 1 to 16384.

QR_ID: Wine + bottle number + 5-digit random alphanumeric code
The ur of the QR would be as follows: https://nft.openvino.org/M1818.00006

  • Experience: QR_ID: add qr_id to Experience, and after inserting experience, update Wine. ExperienceId with the new id generated for that qe_id. The initial status of a new experience is accredited, no more pending validation.

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.

...

Diagrama entidad-relacionRelationship Entity Diagram

...