nidus-sync/db/dbinfo/comms.text_log.bob.go
Eli Ribble f4a88623af
Overhaul system for handling text messaging
Move away from "SMS" as the operative word - we're going RCS.
Move all comms processing to a separate goroutine
Rename the DB tables
2026-01-21 03:30:03 +00:00

157 lines
3.3 KiB
Go

// Code generated by BobGen psql v0.42.1. 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 CommsTextLogs = Table[
commsTextLogColumns,
commsTextLogIndexes,
commsTextLogForeignKeys,
commsTextLogUniques,
commsTextLogChecks,
]{
Schema: "comms",
Name: "text_log",
Columns: commsTextLogColumns{
Created: column{
Name: "created",
DBType: "timestamp without time zone",
Default: "",
Comment: "",
Nullable: false,
Generated: false,
AutoIncr: false,
},
Destination: column{
Name: "destination",
DBType: "text",
Default: "",
Comment: "",
Nullable: false,
Generated: false,
AutoIncr: false,
},
Source: column{
Name: "source",
DBType: "text",
Default: "",
Comment: "",
Nullable: false,
Generated: false,
AutoIncr: false,
},
Type: column{
Name: "type",
DBType: "comms.messagetypetext",
Default: "",
Comment: "",
Nullable: false,
Generated: false,
AutoIncr: false,
},
},
Indexes: commsTextLogIndexes{
TextLogPkey: index{
Type: "btree",
Name: "text_log_pkey",
Columns: []indexColumn{
{
Name: "destination",
Desc: null.FromCond(false, true),
IsExpression: false,
},
{
Name: "source",
Desc: null.FromCond(false, true),
IsExpression: false,
},
{
Name: "type",
Desc: null.FromCond(false, true),
IsExpression: false,
},
},
Unique: true,
Comment: "",
NullsFirst: []bool{false, false, false},
NullsDistinct: false,
Where: "",
Include: []string{},
},
},
PrimaryKey: &constraint{
Name: "text_log_pkey",
Columns: []string{"destination", "source", "type"},
Comment: "",
},
ForeignKeys: commsTextLogForeignKeys{
CommsTextLogTextLogDestinationFkey: foreignKey{
constraint: constraint{
Name: "comms.text_log.text_log_destination_fkey",
Columns: []string{"destination"},
Comment: "",
},
ForeignTable: "comms.phone",
ForeignColumns: []string{"e164"},
},
CommsTextLogTextLogSourceFkey: foreignKey{
constraint: constraint{
Name: "comms.text_log.text_log_source_fkey",
Columns: []string{"source"},
Comment: "",
},
ForeignTable: "comms.phone",
ForeignColumns: []string{"e164"},
},
},
Comment: "",
}
type commsTextLogColumns struct {
Created column
Destination column
Source column
Type column
}
func (c commsTextLogColumns) AsSlice() []column {
return []column{
c.Created, c.Destination, c.Source, c.Type,
}
}
type commsTextLogIndexes struct {
TextLogPkey index
}
func (i commsTextLogIndexes) AsSlice() []index {
return []index{
i.TextLogPkey,
}
}
type commsTextLogForeignKeys struct {
CommsTextLogTextLogDestinationFkey foreignKey
CommsTextLogTextLogSourceFkey foreignKey
}
func (f commsTextLogForeignKeys) AsSlice() []foreignKey {
return []foreignKey{
f.CommsTextLogTextLogDestinationFkey, f.CommsTextLogTextLogSourceFkey,
}
}
type commsTextLogUniques struct{}
func (u commsTextLogUniques) AsSlice() []constraint {
return []constraint{}
}
type commsTextLogChecks struct{}
func (c commsTextLogChecks) AsSlice() []check {
return []check{}
}