Incident highlight backend
This commit is contained in:
parent
91e9b2ed8e
commit
db5e6e7ad8
2 changed files with 8 additions and 8 deletions
|
@ -255,8 +255,8 @@ SELECT
|
||||||
c.id,
|
c.id,
|
||||||
c.call_date,
|
c.call_date,
|
||||||
c.duration,
|
c.duration,
|
||||||
c.system,
|
c.system system_id,
|
||||||
c.talkgroup,
|
c.talkgroup tgid,
|
||||||
COUNT(ic.incident_id) incidents
|
COUNT(ic.incident_id) incidents
|
||||||
FROM calls c
|
FROM calls c
|
||||||
JOIN talkgroups tgs ON c.talkgroup = tgs.tgid AND c.system = tgs.system_id
|
JOIN talkgroups tgs ON c.talkgroup = tgs.tgid AND c.system = tgs.system_id
|
||||||
|
@ -303,8 +303,8 @@ type ListCallsPRow struct {
|
||||||
ID uuid.UUID `json:"id"`
|
ID uuid.UUID `json:"id"`
|
||||||
CallDate pgtype.Timestamptz `json:"call_date"`
|
CallDate pgtype.Timestamptz `json:"call_date"`
|
||||||
Duration *int32 `json:"duration"`
|
Duration *int32 `json:"duration"`
|
||||||
System int `json:"system"`
|
SystemID int `json:"system_id"`
|
||||||
Talkgroup int `json:"talkgroup"`
|
TGID int `json:"tgid"`
|
||||||
Incidents int64 `json:"incidents"`
|
Incidents int64 `json:"incidents"`
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -331,8 +331,8 @@ func (q *Queries) ListCallsP(ctx context.Context, arg ListCallsPParams) ([]ListC
|
||||||
&i.ID,
|
&i.ID,
|
||||||
&i.CallDate,
|
&i.CallDate,
|
||||||
&i.Duration,
|
&i.Duration,
|
||||||
&i.System,
|
&i.SystemID,
|
||||||
&i.Talkgroup,
|
&i.TGID,
|
||||||
&i.Incidents,
|
&i.Incidents,
|
||||||
); err != nil {
|
); err != nil {
|
||||||
return nil, err
|
return nil, err
|
||||||
|
|
|
@ -101,8 +101,8 @@ SELECT
|
||||||
c.id,
|
c.id,
|
||||||
c.call_date,
|
c.call_date,
|
||||||
c.duration,
|
c.duration,
|
||||||
c.system,
|
c.system system_id,
|
||||||
c.talkgroup,
|
c.talkgroup tgid,
|
||||||
COUNT(ic.incident_id) incidents
|
COUNT(ic.incident_id) incidents
|
||||||
FROM calls c
|
FROM calls c
|
||||||
JOIN talkgroups tgs ON c.talkgroup = tgs.tgid AND c.system = tgs.system_id
|
JOIN talkgroups tgs ON c.talkgroup = tgs.tgid AND c.system = tgs.system_id
|
||||||
|
|
Loading…
Reference in a new issue