Use call_date

This commit is contained in:
Daniel Ponte 2024-07-16 19:35:16 -04:00
parent d6d2da3e04
commit 72edd16d7b
4 changed files with 8 additions and 8 deletions

View file

@ -17,7 +17,7 @@ INSERT INTO calls (
submitter, submitter,
system, system,
talkgroup, talkgroup,
date, call_date,
audio_name, audio_name,
audio_blob, audio_blob,
audio_type, audio_type,
@ -28,14 +28,14 @@ INSERT INTO calls (
tg_label, tg_label,
source source
) VALUES (gen_random_uuid(), $1, $2, $3, $4, $5, $6, $7, $8, $9, $10, $11, $12, $13) ) VALUES (gen_random_uuid(), $1, $2, $3, $4, $5, $6, $7, $8, $9, $10, $11, $12, $13)
RETURNING id, submitter, system, talkgroup, date, audio_name, audio_blob, audio_type, audio_url, frequency, frequencies, patches, tg_label, source, transcript RETURNING id, submitter, system, talkgroup, call_date, audio_name, audio_blob, audio_type, audio_url, frequency, frequencies, patches, tg_label, source, transcript
` `
type AddCallParams struct { type AddCallParams struct {
Submitter pgtype.Int4 Submitter pgtype.Int4
System int32 System int32
Talkgroup int32 Talkgroup int32
Date pgtype.Timestamp CallDate pgtype.Timestamp
AudioName pgtype.Text AudioName pgtype.Text
AudioBlob []byte AudioBlob []byte
AudioType pgtype.Text AudioType pgtype.Text
@ -52,7 +52,7 @@ func (q *Queries) AddCall(ctx context.Context, arg AddCallParams) (Call, error)
arg.Submitter, arg.Submitter,
arg.System, arg.System,
arg.Talkgroup, arg.Talkgroup,
arg.Date, arg.CallDate,
arg.AudioName, arg.AudioName,
arg.AudioBlob, arg.AudioBlob,
arg.AudioType, arg.AudioType,
@ -69,7 +69,7 @@ func (q *Queries) AddCall(ctx context.Context, arg AddCallParams) (Call, error)
&i.Submitter, &i.Submitter,
&i.System, &i.System,
&i.Talkgroup, &i.Talkgroup,
&i.Date, &i.CallDate,
&i.AudioName, &i.AudioName,
&i.AudioBlob, &i.AudioBlob,
&i.AudioType, &i.AudioType,

View file

@ -22,7 +22,7 @@ type Call struct {
Submitter pgtype.Int4 Submitter pgtype.Int4
System int32 System int32
Talkgroup int32 Talkgroup int32
Date pgtype.Timestamp CallDate pgtype.Timestamp
AudioName pgtype.Text AudioName pgtype.Text
AudioBlob []byte AudioBlob []byte
AudioType pgtype.Text AudioType pgtype.Text

View file

@ -39,7 +39,7 @@ CREATE TABLE IF NOT EXISTS calls(
submitter INTEGER REFERENCES api_keys(id) ON DELETE SET NULL, submitter INTEGER REFERENCES api_keys(id) ON DELETE SET NULL,
system INTEGER NOT NULL, system INTEGER NOT NULL,
talkgroup INTEGER NOT NULL, talkgroup INTEGER NOT NULL,
date TIMESTAMP NOT NULL, call_date TIMESTAMP NOT NULL,
audio_name TEXT, audio_name TEXT,
audio_blob BYTEA, audio_blob BYTEA,
audio_type TEXT, audio_type TEXT,

View file

@ -4,7 +4,7 @@ INSERT INTO calls (
submitter, submitter,
system, system,
talkgroup, talkgroup,
date, call_date,
audio_name, audio_name,
audio_blob, audio_blob,
audio_type, audio_type,