diff --git a/models/reportevent.go b/models/reportevent.go index 8809b3c..491c12d 100644 --- a/models/reportevent.go +++ b/models/reportevent.go @@ -1,15 +1,20 @@ package models -import "sort" +import ( + "sort" + + "github.com/google/uuid" +) type ReportEvent struct { - Report Unique `json:"report_id" db:"report_id"` // References the original report ID - Index int64 `json:"index" db:"event_index"` // Order of sections - Timestamp Timestamp `json:"timestamp" db:"event_timestamp"` // Timestamp of event - Type ReportEventType `json:"type" db:"event_type"` // Type of event - Section ReportEventSection `json:"section" db:"event_section"` // Section event is in - Content string `json:"content" db:"event_content"` // Content of event, if ReportEventNote - Drug Drug `json:"drug,omitempty" db:"event_drug"` // Drug of event, if ReportEventDrug + Report uuid.UUID `json:"report_id" db:"report_id"` // References the original report ID + Index int64 `json:"index" db:"event_index"` // Order of sections + Timestamp Timestamp `json:"timestamp" db:"event_timestamp"` // Timestamp of event + Type ReportEventType `json:"type" db:"event_type"` // Type of event + Section ReportEventSection `json:"section" db:"event_section"` // Section event is in + Content string `json:"content" db:"event_content"` // Content of event, if ReportEventNote + DrugID uuid.UUID `json:"drug_id,omitempty" db:"event_drug"` // DrugID of event, corresponds to Drug, if ReportEventDrug + Drug Drug `json:"drug,omitempty"` // Drug of event,if ReportEventDrug } type ReportEventType int64