2024-07-15 10:12:53 -04:00
|
|
|
// Code generated by sqlc. DO NOT EDIT.
|
|
|
|
// versions:
|
2024-11-15 11:34:54 -05:00
|
|
|
// sqlc v1.27.0
|
2024-07-15 10:12:53 -04:00
|
|
|
|
|
|
|
package database
|
|
|
|
|
|
|
|
import (
|
2024-07-26 09:29:58 -04:00
|
|
|
"time"
|
|
|
|
|
2024-11-13 09:24:11 -05:00
|
|
|
"dynatron.me/x/stillbox/internal/jsontypes"
|
2024-11-12 08:40:56 -05:00
|
|
|
"dynatron.me/x/stillbox/pkg/alerting/rules"
|
2024-07-24 22:42:30 -04:00
|
|
|
"github.com/google/uuid"
|
2024-07-15 10:12:53 -04:00
|
|
|
"github.com/jackc/pgx/v5/pgtype"
|
|
|
|
)
|
|
|
|
|
2024-10-25 16:02:08 -04:00
|
|
|
type Alert struct {
|
2025-01-20 22:38:27 -05:00
|
|
|
ID int `json:"id"`
|
|
|
|
Time pgtype.Timestamptz `json:"time"`
|
|
|
|
TGID int `json:"tgid"`
|
|
|
|
SystemID int `json:"system_id"`
|
|
|
|
Weight *float32 `json:"weight"`
|
|
|
|
Score *float32 `json:"score"`
|
|
|
|
OrigScore *float32 `json:"orig_score"`
|
|
|
|
Notified bool `json:"notified"`
|
|
|
|
Metadata []byte `json:"metadata"`
|
2024-10-25 16:02:08 -04:00
|
|
|
}
|
|
|
|
|
2024-07-16 19:31:30 -04:00
|
|
|
type ApiKey struct {
|
2025-01-20 22:38:27 -05:00
|
|
|
ID int `json:"id"`
|
|
|
|
Owner int `json:"owner"`
|
|
|
|
CreatedAt time.Time `json:"created_at"`
|
|
|
|
Expires pgtype.Timestamp `json:"expires"`
|
|
|
|
Disabled *bool `json:"disabled"`
|
|
|
|
ApiKey string `json:"api_key"`
|
2024-07-15 10:12:53 -04:00
|
|
|
}
|
|
|
|
|
|
|
|
type Call struct {
|
2025-01-20 22:38:27 -05:00
|
|
|
ID uuid.UUID `json:"id"`
|
|
|
|
Submitter *int32 `json:"submitter"`
|
|
|
|
System int `json:"system"`
|
|
|
|
Talkgroup int `json:"talkgroup"`
|
|
|
|
CallDate pgtype.Timestamptz `json:"call_date"`
|
|
|
|
AudioName *string `json:"audio_name"`
|
|
|
|
AudioBlob []byte `json:"audio_blob"`
|
|
|
|
Duration *int32 `json:"duration"`
|
|
|
|
AudioType *string `json:"audio_type"`
|
|
|
|
AudioUrl *string `json:"audio_url"`
|
|
|
|
Frequency int `json:"frequency"`
|
|
|
|
Frequencies []int `json:"frequencies"`
|
|
|
|
Patches []int `json:"patches"`
|
|
|
|
TGLabel *string `json:"tg_label"`
|
|
|
|
TGAlphaTag *string `json:"tg_alpha_tag"`
|
|
|
|
TGGroup *string `json:"tg_group"`
|
|
|
|
Source int `json:"source"`
|
|
|
|
Transcript *string `json:"transcript"`
|
2024-12-01 03:01:09 -05:00
|
|
|
}
|
|
|
|
|
2024-07-16 19:31:30 -04:00
|
|
|
type Incident struct {
|
2025-01-20 22:38:27 -05:00
|
|
|
ID uuid.UUID `json:"id"`
|
|
|
|
Name string `json:"name"`
|
|
|
|
Owner int `json:"owner"`
|
|
|
|
Description *string `json:"description"`
|
|
|
|
StartTime pgtype.Timestamptz `json:"start_time"`
|
|
|
|
EndTime pgtype.Timestamptz `json:"end_time"`
|
|
|
|
Location []byte `json:"location"`
|
|
|
|
Metadata jsontypes.Metadata `json:"metadata"`
|
2024-07-16 19:31:30 -04:00
|
|
|
}
|
|
|
|
|
|
|
|
type IncidentsCall struct {
|
2025-01-20 22:38:27 -05:00
|
|
|
IncidentID uuid.UUID `json:"incident_id"`
|
|
|
|
CallID uuid.UUID `json:"call_id"`
|
|
|
|
CallsTblID pgtype.UUID `json:"calls_tbl_id"`
|
|
|
|
SweptCallID pgtype.UUID `json:"swept_call_id"`
|
|
|
|
CallDate pgtype.Timestamptz `json:"call_date"`
|
|
|
|
Notes []byte `json:"notes"`
|
2024-07-15 19:03:48 -04:00
|
|
|
}
|
|
|
|
|
|
|
|
type Setting struct {
|
2025-01-20 22:38:27 -05:00
|
|
|
Name string `json:"name"`
|
|
|
|
UpdatedBy *int32 `json:"updated_by"`
|
|
|
|
Value []byte `json:"value"`
|
2024-07-15 19:03:48 -04:00
|
|
|
}
|
|
|
|
|
2025-01-18 17:22:08 -05:00
|
|
|
type Share struct {
|
2025-01-20 22:38:27 -05:00
|
|
|
ID string `json:"id"`
|
|
|
|
EntityType string `json:"entity_type"`
|
|
|
|
EntityID uuid.UUID `json:"entity_id"`
|
|
|
|
EntityDate pgtype.Timestamptz `json:"entity_date"`
|
|
|
|
Owner int `json:"owner"`
|
|
|
|
Expiration pgtype.Timestamptz `json:"expiration"`
|
2025-01-18 17:22:08 -05:00
|
|
|
}
|
|
|
|
|
2024-12-01 03:01:09 -05:00
|
|
|
type SweptCall struct {
|
2025-01-20 22:38:27 -05:00
|
|
|
ID uuid.UUID `json:"id"`
|
|
|
|
Submitter *int32 `json:"submitter"`
|
|
|
|
System int `json:"system"`
|
|
|
|
Talkgroup int `json:"talkgroup"`
|
|
|
|
CallDate pgtype.Timestamptz `json:"call_date"`
|
|
|
|
AudioName *string `json:"audio_name"`
|
|
|
|
AudioBlob []byte `json:"audio_blob"`
|
|
|
|
Duration *int32 `json:"duration"`
|
|
|
|
AudioType *string `json:"audio_type"`
|
|
|
|
AudioUrl *string `json:"audio_url"`
|
|
|
|
Frequency int `json:"frequency"`
|
|
|
|
Frequencies []int `json:"frequencies"`
|
|
|
|
Patches []int `json:"patches"`
|
|
|
|
TGLabel *string `json:"tg_label"`
|
|
|
|
TGAlphaTag *string `json:"tg_alpha_tag"`
|
|
|
|
TGGroup *string `json:"tg_group"`
|
|
|
|
Source int `json:"source"`
|
|
|
|
Transcript *string `json:"transcript"`
|
2024-12-01 03:01:09 -05:00
|
|
|
}
|
|
|
|
|
2024-07-15 19:03:48 -04:00
|
|
|
type System struct {
|
2025-01-20 22:38:27 -05:00
|
|
|
ID int `json:"id"`
|
|
|
|
Name string `json:"name"`
|
2024-07-15 19:03:48 -04:00
|
|
|
}
|
|
|
|
|
|
|
|
type Talkgroup struct {
|
2025-01-20 22:38:27 -05:00
|
|
|
ID int `json:"id"`
|
|
|
|
SystemID int32 `json:"system_id"`
|
|
|
|
TGID int32 `json:"tgid"`
|
|
|
|
Name *string `json:"name"`
|
|
|
|
AlphaTag *string `json:"alpha_tag"`
|
|
|
|
TGGroup *string `json:"tg_group"`
|
|
|
|
Frequency *int32 `json:"frequency"`
|
|
|
|
Metadata jsontypes.Metadata `json:"metadata"`
|
|
|
|
Tags []string `json:"tags"`
|
|
|
|
Alert bool `json:"alert"`
|
|
|
|
AlertRules rules.AlertRules `json:"alert_rules"`
|
|
|
|
Weight float32 `json:"weight"`
|
|
|
|
Learned bool `json:"learned"`
|
|
|
|
Ignored bool `json:"ignored"`
|
2024-07-15 10:12:53 -04:00
|
|
|
}
|
|
|
|
|
2024-11-20 19:15:26 -05:00
|
|
|
type TalkgroupVersion struct {
|
2025-01-20 22:38:27 -05:00
|
|
|
ID int `json:"id"`
|
|
|
|
Time pgtype.Timestamptz `json:"time"`
|
|
|
|
CreatedBy *int32 `json:"created_by"`
|
|
|
|
Deleted *bool `json:"deleted"`
|
|
|
|
SystemID *int32 `json:"system_id"`
|
|
|
|
TGID *int32 `json:"tgid"`
|
|
|
|
Name *string `json:"name"`
|
|
|
|
AlphaTag *string `json:"alpha_tag"`
|
|
|
|
TGGroup *string `json:"tg_group"`
|
|
|
|
Frequency *int32 `json:"frequency"`
|
|
|
|
Metadata []byte `json:"metadata"`
|
|
|
|
Tags []string `json:"tags"`
|
|
|
|
Alert *bool `json:"alert"`
|
|
|
|
AlertRules []byte `json:"alert_rules"`
|
|
|
|
Weight *float32 `json:"weight"`
|
|
|
|
Learned *bool `json:"learned"`
|
|
|
|
Ignored *bool `json:"ignored"`
|
2024-11-20 19:15:26 -05:00
|
|
|
}
|
|
|
|
|
2024-07-15 10:12:53 -04:00
|
|
|
type User struct {
|
2025-01-20 22:38:27 -05:00
|
|
|
ID int `json:"id"`
|
|
|
|
Username string `json:"username"`
|
|
|
|
Password string `json:"password"`
|
|
|
|
Email string `json:"email"`
|
|
|
|
IsAdmin bool `json:"is_admin"`
|
|
|
|
Prefs []byte `json:"prefs"`
|
2024-07-15 10:12:53 -04:00
|
|
|
}
|