Move away from "SMS" as the operative word - we're going RCS. Move all comms processing to a separate goroutine Rename the DB tables
157 lines
3.4 KiB
Go
157 lines
3.4 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 CommsEmailLogs = Table[
|
|
commsEmailLogColumns,
|
|
commsEmailLogIndexes,
|
|
commsEmailLogForeignKeys,
|
|
commsEmailLogUniques,
|
|
commsEmailLogChecks,
|
|
]{
|
|
Schema: "comms",
|
|
Name: "email_log",
|
|
Columns: commsEmailLogColumns{
|
|
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.messagetypeemail",
|
|
Default: "",
|
|
Comment: "",
|
|
Nullable: false,
|
|
Generated: false,
|
|
AutoIncr: false,
|
|
},
|
|
},
|
|
Indexes: commsEmailLogIndexes{
|
|
EmailLogPkey: index{
|
|
Type: "btree",
|
|
Name: "email_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: "email_log_pkey",
|
|
Columns: []string{"destination", "source", "type"},
|
|
Comment: "",
|
|
},
|
|
ForeignKeys: commsEmailLogForeignKeys{
|
|
CommsEmailLogEmailLogDestinationFkey: foreignKey{
|
|
constraint: constraint{
|
|
Name: "comms.email_log.email_log_destination_fkey",
|
|
Columns: []string{"destination"},
|
|
Comment: "",
|
|
},
|
|
ForeignTable: "comms.email",
|
|
ForeignColumns: []string{"address"},
|
|
},
|
|
CommsEmailLogEmailLogSourceFkey: foreignKey{
|
|
constraint: constraint{
|
|
Name: "comms.email_log.email_log_source_fkey",
|
|
Columns: []string{"source"},
|
|
Comment: "",
|
|
},
|
|
ForeignTable: "comms.phone",
|
|
ForeignColumns: []string{"e164"},
|
|
},
|
|
},
|
|
|
|
Comment: "",
|
|
}
|
|
|
|
type commsEmailLogColumns struct {
|
|
Created column
|
|
Destination column
|
|
Source column
|
|
Type column
|
|
}
|
|
|
|
func (c commsEmailLogColumns) AsSlice() []column {
|
|
return []column{
|
|
c.Created, c.Destination, c.Source, c.Type,
|
|
}
|
|
}
|
|
|
|
type commsEmailLogIndexes struct {
|
|
EmailLogPkey index
|
|
}
|
|
|
|
func (i commsEmailLogIndexes) AsSlice() []index {
|
|
return []index{
|
|
i.EmailLogPkey,
|
|
}
|
|
}
|
|
|
|
type commsEmailLogForeignKeys struct {
|
|
CommsEmailLogEmailLogDestinationFkey foreignKey
|
|
CommsEmailLogEmailLogSourceFkey foreignKey
|
|
}
|
|
|
|
func (f commsEmailLogForeignKeys) AsSlice() []foreignKey {
|
|
return []foreignKey{
|
|
f.CommsEmailLogEmailLogDestinationFkey, f.CommsEmailLogEmailLogSourceFkey,
|
|
}
|
|
}
|
|
|
|
type commsEmailLogUniques struct{}
|
|
|
|
func (u commsEmailLogUniques) AsSlice() []constraint {
|
|
return []constraint{}
|
|
}
|
|
|
|
type commsEmailLogChecks struct{}
|
|
|
|
func (c commsEmailLogChecks) AsSlice() []check {
|
|
return []check{}
|
|
}
|