nidus-sync/db/dbinfo/communication.bob.go
Eli Ribble a82b2b8cb8
Add new communication table
It allows us to track when communication tasks are complete, and
information about how they were completed, separate from the entries
that created the tasks in the first place (reports, emails, texts)
2026-05-01 15:13:05 +00:00

327 lines
8.6 KiB
Go

// Code generated by BobGen psql v0.42.5. DO NOT EDIT.
// This file is meant to be re-generated in place and/or deleted at any time.
package dbinfo
import "github.com/aarondl/opt/null"
var Communications = Table[
communicationColumns,
communicationIndexes,
communicationForeignKeys,
communicationUniques,
communicationChecks,
]{
Schema: "",
Name: "communication",
Columns: communicationColumns{
Closed: column{
Name: "closed",
DBType: "timestamp without time zone",
Default: "NULL",
Comment: "",
Nullable: true,
Generated: false,
AutoIncr: false,
},
ClosedBy: column{
Name: "closed_by",
DBType: "integer",
Default: "NULL",
Comment: "",
Nullable: true,
Generated: false,
AutoIncr: false,
},
Created: column{
Name: "created",
DBType: "timestamp without time zone",
Default: "",
Comment: "",
Nullable: false,
Generated: false,
AutoIncr: false,
},
ID: column{
Name: "id",
DBType: "integer",
Default: "nextval('communication_id_seq'::regclass)",
Comment: "",
Nullable: false,
Generated: false,
AutoIncr: false,
},
Invalidated: column{
Name: "invalidated",
DBType: "timestamp without time zone",
Default: "NULL",
Comment: "",
Nullable: true,
Generated: false,
AutoIncr: false,
},
InvalidatedBy: column{
Name: "invalidated_by",
DBType: "integer",
Default: "NULL",
Comment: "",
Nullable: true,
Generated: false,
AutoIncr: false,
},
Opened: column{
Name: "opened",
DBType: "timestamp without time zone",
Default: "NULL",
Comment: "",
Nullable: true,
Generated: false,
AutoIncr: false,
},
OpenedBy: column{
Name: "opened_by",
DBType: "integer",
Default: "NULL",
Comment: "",
Nullable: true,
Generated: false,
AutoIncr: false,
},
ResponseEmailLogID: column{
Name: "response_email_log_id",
DBType: "integer",
Default: "NULL",
Comment: "",
Nullable: true,
Generated: false,
AutoIncr: false,
},
ResponseTextLogID: column{
Name: "response_text_log_id",
DBType: "integer",
Default: "NULL",
Comment: "",
Nullable: true,
Generated: false,
AutoIncr: false,
},
SetPending: column{
Name: "set_pending",
DBType: "timestamp without time zone",
Default: "NULL",
Comment: "",
Nullable: true,
Generated: false,
AutoIncr: false,
},
SetPendingBy: column{
Name: "set_pending_by",
DBType: "integer",
Default: "NULL",
Comment: "",
Nullable: true,
Generated: false,
AutoIncr: false,
},
SourceEmailLogID: column{
Name: "source_email_log_id",
DBType: "integer",
Default: "NULL",
Comment: "",
Nullable: true,
Generated: false,
AutoIncr: false,
},
SourceReportID: column{
Name: "source_report_id",
DBType: "integer",
Default: "NULL",
Comment: "",
Nullable: true,
Generated: false,
AutoIncr: false,
},
SourceTextLogID: column{
Name: "source_text_log_id",
DBType: "integer",
Default: "NULL",
Comment: "",
Nullable: true,
Generated: false,
AutoIncr: false,
},
},
Indexes: communicationIndexes{
CommunicationPkey: index{
Type: "btree",
Name: "communication_pkey",
Columns: []indexColumn{
{
Name: "id",
Desc: null.FromCond(false, true),
IsExpression: false,
},
},
Unique: true,
Comment: "",
NullsFirst: []bool{false},
NullsDistinct: false,
Where: "",
Include: []string{},
},
},
PrimaryKey: &constraint{
Name: "communication_pkey",
Columns: []string{"id"},
Comment: "",
},
ForeignKeys: communicationForeignKeys{
CommunicationCommunicationClosedByFkey: foreignKey{
constraint: constraint{
Name: "communication.communication_closed_by_fkey",
Columns: []string{"closed_by"},
Comment: "",
},
ForeignTable: "user_",
ForeignColumns: []string{"id"},
},
CommunicationCommunicationInvalidatedByFkey: foreignKey{
constraint: constraint{
Name: "communication.communication_invalidated_by_fkey",
Columns: []string{"invalidated_by"},
Comment: "",
},
ForeignTable: "user_",
ForeignColumns: []string{"id"},
},
CommunicationCommunicationOpenedByFkey: foreignKey{
constraint: constraint{
Name: "communication.communication_opened_by_fkey",
Columns: []string{"opened_by"},
Comment: "",
},
ForeignTable: "user_",
ForeignColumns: []string{"id"},
},
CommunicationCommunicationResponseEmailLogIDFkey: foreignKey{
constraint: constraint{
Name: "communication.communication_response_email_log_id_fkey",
Columns: []string{"response_email_log_id"},
Comment: "",
},
ForeignTable: "comms.email_log",
ForeignColumns: []string{"id"},
},
CommunicationCommunicationResponseTextLogIDFkey: foreignKey{
constraint: constraint{
Name: "communication.communication_response_text_log_id_fkey",
Columns: []string{"response_text_log_id"},
Comment: "",
},
ForeignTable: "comms.text_log",
ForeignColumns: []string{"id"},
},
CommunicationCommunicationSetPendingByFkey: foreignKey{
constraint: constraint{
Name: "communication.communication_set_pending_by_fkey",
Columns: []string{"set_pending_by"},
Comment: "",
},
ForeignTable: "user_",
ForeignColumns: []string{"id"},
},
CommunicationCommunicationSourceEmailLogIDFkey: foreignKey{
constraint: constraint{
Name: "communication.communication_source_email_log_id_fkey",
Columns: []string{"source_email_log_id"},
Comment: "",
},
ForeignTable: "comms.email_log",
ForeignColumns: []string{"id"},
},
CommunicationCommunicationSourceReportIDFkey: foreignKey{
constraint: constraint{
Name: "communication.communication_source_report_id_fkey",
Columns: []string{"source_report_id"},
Comment: "",
},
ForeignTable: "publicreport.report",
ForeignColumns: []string{"id"},
},
CommunicationCommunicationSourceTextLogIDFkey: foreignKey{
constraint: constraint{
Name: "communication.communication_source_text_log_id_fkey",
Columns: []string{"source_text_log_id"},
Comment: "",
},
ForeignTable: "comms.text_log",
ForeignColumns: []string{"id"},
},
},
Comment: "",
}
type communicationColumns struct {
Closed column
ClosedBy column
Created column
ID column
Invalidated column
InvalidatedBy column
Opened column
OpenedBy column
ResponseEmailLogID column
ResponseTextLogID column
SetPending column
SetPendingBy column
SourceEmailLogID column
SourceReportID column
SourceTextLogID column
}
func (c communicationColumns) AsSlice() []column {
return []column{
c.Closed, c.ClosedBy, c.Created, c.ID, c.Invalidated, c.InvalidatedBy, c.Opened, c.OpenedBy, c.ResponseEmailLogID, c.ResponseTextLogID, c.SetPending, c.SetPendingBy, c.SourceEmailLogID, c.SourceReportID, c.SourceTextLogID,
}
}
type communicationIndexes struct {
CommunicationPkey index
}
func (i communicationIndexes) AsSlice() []index {
return []index{
i.CommunicationPkey,
}
}
type communicationForeignKeys struct {
CommunicationCommunicationClosedByFkey foreignKey
CommunicationCommunicationInvalidatedByFkey foreignKey
CommunicationCommunicationOpenedByFkey foreignKey
CommunicationCommunicationResponseEmailLogIDFkey foreignKey
CommunicationCommunicationResponseTextLogIDFkey foreignKey
CommunicationCommunicationSetPendingByFkey foreignKey
CommunicationCommunicationSourceEmailLogIDFkey foreignKey
CommunicationCommunicationSourceReportIDFkey foreignKey
CommunicationCommunicationSourceTextLogIDFkey foreignKey
}
func (f communicationForeignKeys) AsSlice() []foreignKey {
return []foreignKey{
f.CommunicationCommunicationClosedByFkey, f.CommunicationCommunicationInvalidatedByFkey, f.CommunicationCommunicationOpenedByFkey, f.CommunicationCommunicationResponseEmailLogIDFkey, f.CommunicationCommunicationResponseTextLogIDFkey, f.CommunicationCommunicationSetPendingByFkey, f.CommunicationCommunicationSourceEmailLogIDFkey, f.CommunicationCommunicationSourceReportIDFkey, f.CommunicationCommunicationSourceTextLogIDFkey,
}
}
type communicationUniques struct{}
func (u communicationUniques) AsSlice() []constraint {
return []constraint{}
}
type communicationChecks struct{}
func (c communicationChecks) AsSlice() []check {
return []check{}
}