cds-snc / covid-alert-server

Exposure Notification: Diagnosis Server implementation / Notification d’exposition : Mise en œuvre du serveur de diagnostic
Apache License 2.0
298 stars 31 forks source link

feat: add severity to location model and change location ID to 8 chars #440

Closed maxneuvians closed 3 years ago

maxneuvians commented 3 years ago

This PR changes the data model for the outbreak event to include a severity field as well as reducing the character length of the location ID from 32 to 8. The resulting protobuf model looks like this:

message OutbreakEvent {
  // location ID references the ID in the portal
  optional string location_id = 1;
  optional google.protobuf.Timestamp start_time = 2;
  optional google.protobuf.Timestamp end_time = 3;
  optional uint32 severity = 4;
}

Also the validation for Location ID has changed from 32 chars to 8 chars:

if len(submission.GetLocationId()) != 8 {