Overhaul email sending system

Add logging and saving templates to the database for historical
accuracy.
This commit is contained in:
Eli Ribble 2026-01-23 20:36:16 +00:00
parent 3fed489258
commit 196792810b
No known key found for this signature in database
44 changed files with 4846 additions and 2361 deletions

View file

@ -0,0 +1,122 @@
// 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 CommsEmailContacts = Table[
commsEmailContactColumns,
commsEmailContactIndexes,
commsEmailContactForeignKeys,
commsEmailContactUniques,
commsEmailContactChecks,
]{
Schema: "comms",
Name: "email_contact",
Columns: commsEmailContactColumns{
Address: column{
Name: "address",
DBType: "text",
Default: "",
Comment: "",
Nullable: false,
Generated: false,
AutoIncr: false,
},
Confirmed: column{
Name: "confirmed",
DBType: "boolean",
Default: "",
Comment: "",
Nullable: false,
Generated: false,
AutoIncr: false,
},
IsSubscribed: column{
Name: "is_subscribed",
DBType: "boolean",
Default: "",
Comment: "",
Nullable: false,
Generated: false,
AutoIncr: false,
},
PublicID: column{
Name: "public_id",
DBType: "text",
Default: "",
Comment: "",
Nullable: false,
Generated: false,
AutoIncr: false,
},
},
Indexes: commsEmailContactIndexes{
EmailPkey: index{
Type: "btree",
Name: "email_pkey",
Columns: []indexColumn{
{
Name: "address",
Desc: null.FromCond(false, true),
IsExpression: false,
},
},
Unique: true,
Comment: "",
NullsFirst: []bool{false},
NullsDistinct: false,
Where: "",
Include: []string{},
},
},
PrimaryKey: &constraint{
Name: "email_pkey",
Columns: []string{"address"},
Comment: "",
},
Comment: "",
}
type commsEmailContactColumns struct {
Address column
Confirmed column
IsSubscribed column
PublicID column
}
func (c commsEmailContactColumns) AsSlice() []column {
return []column{
c.Address, c.Confirmed, c.IsSubscribed, c.PublicID,
}
}
type commsEmailContactIndexes struct {
EmailPkey index
}
func (i commsEmailContactIndexes) AsSlice() []index {
return []index{
i.EmailPkey,
}
}
type commsEmailContactForeignKeys struct{}
func (f commsEmailContactForeignKeys) AsSlice() []foreignKey {
return []foreignKey{}
}
type commsEmailContactUniques struct{}
func (u commsEmailContactUniques) AsSlice() []constraint {
return []constraint{}
}
type commsEmailContactChecks struct{}
func (c commsEmailContactChecks) AsSlice() []check {
return []check{}
}