This was an epically long change, and a terrible idea, but it compiles. This was essentially a cascade that came about because I can't blend jet and bob in the same transaction. In for a penny, I guess...
237 lines
6.1 KiB
Go
237 lines
6.1 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{
|
|
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,
|
|
},
|
|
OrganizationID: column{
|
|
Name: "organization_id",
|
|
DBType: "integer",
|
|
Default: "",
|
|
Comment: "",
|
|
Nullable: false,
|
|
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,
|
|
},
|
|
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,
|
|
},
|
|
Status: column{
|
|
Name: "status",
|
|
DBType: "public.communicationstatus",
|
|
Default: "",
|
|
Comment: "",
|
|
Nullable: false,
|
|
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{
|
|
CommunicationCommunicationOrganizationIDFkey: foreignKey{
|
|
constraint: constraint{
|
|
Name: "communication.communication_organization_id_fkey",
|
|
Columns: []string{"organization_id"},
|
|
Comment: "",
|
|
},
|
|
ForeignTable: "organization",
|
|
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"},
|
|
},
|
|
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 {
|
|
Created column
|
|
ID column
|
|
OrganizationID column
|
|
ResponseEmailLogID column
|
|
ResponseTextLogID column
|
|
SourceEmailLogID column
|
|
SourceReportID column
|
|
SourceTextLogID column
|
|
Status column
|
|
}
|
|
|
|
func (c communicationColumns) AsSlice() []column {
|
|
return []column{
|
|
c.Created, c.ID, c.OrganizationID, c.ResponseEmailLogID, c.ResponseTextLogID, c.SourceEmailLogID, c.SourceReportID, c.SourceTextLogID, c.Status,
|
|
}
|
|
}
|
|
|
|
type communicationIndexes struct {
|
|
CommunicationPkey index
|
|
}
|
|
|
|
func (i communicationIndexes) AsSlice() []index {
|
|
return []index{
|
|
i.CommunicationPkey,
|
|
}
|
|
}
|
|
|
|
type communicationForeignKeys struct {
|
|
CommunicationCommunicationOrganizationIDFkey foreignKey
|
|
CommunicationCommunicationResponseEmailLogIDFkey foreignKey
|
|
CommunicationCommunicationResponseTextLogIDFkey foreignKey
|
|
CommunicationCommunicationSourceEmailLogIDFkey foreignKey
|
|
CommunicationCommunicationSourceReportIDFkey foreignKey
|
|
CommunicationCommunicationSourceTextLogIDFkey foreignKey
|
|
}
|
|
|
|
func (f communicationForeignKeys) AsSlice() []foreignKey {
|
|
return []foreignKey{
|
|
f.CommunicationCommunicationOrganizationIDFkey, f.CommunicationCommunicationResponseEmailLogIDFkey, f.CommunicationCommunicationResponseTextLogIDFkey, 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{}
|
|
}
|