Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Track-and-trace standard (CIS6) #82

Closed
3 tasks done
DOBEN opened this issue Apr 22, 2024 · 0 comments · Fixed by #84
Closed
3 tasks done

Track-and-trace standard (CIS6) #82

DOBEN opened this issue Apr 22, 2024 · 0 comments · Fixed by #84
Labels
[Type] Task An additional feature or improvement.

Comments

@DOBEN
Copy link
Member

DOBEN commented Apr 22, 2024

Task description

The standard defines the two events to enable tracking of items by external tools (e.g. block explorers).

pub struct ItemCreatedEvent {
    /// The item's id.
    pub item_id:      String,
    /// The item's metadata_url.
    pub metadata_url: Option<MetadataUrl>,
    /// Status when item was created.
    pub initial_status:      Status,
}

pub struct ItemStatusChangedEvent<A: Serial> {
    /// The item's id.
    pub item_id:         String,
    /// The item's new status.
    pub new_status:      Status,
    /// Any additional data encoded as generic bytes. Usecase-specific data can
    /// be included here such as temperature, longitude, latitude, ... .
    pub additional_data: A,
}

In preparation for the standard, the following changes were discussed:

  • Change itemId from a number to a String so that Universally Unique Identifier (UUID) can be used as well.
  • Add initial_status to the CreateEvent and display it at the front end.
  • Add supports (CIS0) function.
@DOBEN DOBEN added the [Type] Task An additional feature or improvement. label Apr 22, 2024
@DOBEN DOBEN closed this as completed in #84 May 1, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
[Type] Task An additional feature or improvement.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant