Add table for holding subscriptions from users
This commit is contained in:
parent
41f59f0518
commit
b25daf12fa
21 changed files with 4648 additions and 8 deletions
152
db/dbinfo/publicreport.subscribe_phone.bob.go
Normal file
152
db/dbinfo/publicreport.subscribe_phone.bob.go
Normal file
|
|
@ -0,0 +1,152 @@
|
|||
// 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 PublicreportSubscribePhones = Table[
|
||||
publicreportSubscribePhoneColumns,
|
||||
publicreportSubscribePhoneIndexes,
|
||||
publicreportSubscribePhoneForeignKeys,
|
||||
publicreportSubscribePhoneUniques,
|
||||
publicreportSubscribePhoneChecks,
|
||||
]{
|
||||
Schema: "publicreport",
|
||||
Name: "subscribe_phone",
|
||||
Columns: publicreportSubscribePhoneColumns{
|
||||
Created: column{
|
||||
Name: "created",
|
||||
DBType: "timestamp without time zone",
|
||||
Default: "",
|
||||
Comment: "",
|
||||
Nullable: false,
|
||||
Generated: false,
|
||||
AutoIncr: false,
|
||||
},
|
||||
Deleted: column{
|
||||
Name: "deleted",
|
||||
DBType: "timestamp without time zone",
|
||||
Default: "NULL",
|
||||
Comment: "",
|
||||
Nullable: true,
|
||||
Generated: false,
|
||||
AutoIncr: false,
|
||||
},
|
||||
DistrictID: column{
|
||||
Name: "district_id",
|
||||
DBType: "integer",
|
||||
Default: "",
|
||||
Comment: "",
|
||||
Nullable: false,
|
||||
Generated: false,
|
||||
AutoIncr: false,
|
||||
},
|
||||
PhoneE164: column{
|
||||
Name: "phone_e164",
|
||||
DBType: "text",
|
||||
Default: "",
|
||||
Comment: "",
|
||||
Nullable: false,
|
||||
Generated: false,
|
||||
AutoIncr: false,
|
||||
},
|
||||
},
|
||||
Indexes: publicreportSubscribePhoneIndexes{
|
||||
SubscribePhonePkey: index{
|
||||
Type: "btree",
|
||||
Name: "subscribe_phone_pkey",
|
||||
Columns: []indexColumn{
|
||||
{
|
||||
Name: "district_id",
|
||||
Desc: null.FromCond(false, true),
|
||||
IsExpression: false,
|
||||
},
|
||||
{
|
||||
Name: "phone_e164",
|
||||
Desc: null.FromCond(false, true),
|
||||
IsExpression: false,
|
||||
},
|
||||
},
|
||||
Unique: true,
|
||||
Comment: "",
|
||||
NullsFirst: []bool{false, false},
|
||||
NullsDistinct: false,
|
||||
Where: "",
|
||||
Include: []string{},
|
||||
},
|
||||
},
|
||||
PrimaryKey: &constraint{
|
||||
Name: "subscribe_phone_pkey",
|
||||
Columns: []string{"district_id", "phone_e164"},
|
||||
Comment: "",
|
||||
},
|
||||
ForeignKeys: publicreportSubscribePhoneForeignKeys{
|
||||
PublicreportSubscribePhoneSubscribePhoneDistrictIDFkey: foreignKey{
|
||||
constraint: constraint{
|
||||
Name: "publicreport.subscribe_phone.subscribe_phone_district_id_fkey",
|
||||
Columns: []string{"district_id"},
|
||||
Comment: "",
|
||||
},
|
||||
ForeignTable: "organization",
|
||||
ForeignColumns: []string{"id"},
|
||||
},
|
||||
PublicreportSubscribePhoneSubscribePhonePhoneE164Fkey: foreignKey{
|
||||
constraint: constraint{
|
||||
Name: "publicreport.subscribe_phone.subscribe_phone_phone_e164_fkey",
|
||||
Columns: []string{"phone_e164"},
|
||||
Comment: "",
|
||||
},
|
||||
ForeignTable: "comms.phone",
|
||||
ForeignColumns: []string{"e164"},
|
||||
},
|
||||
},
|
||||
|
||||
Comment: "",
|
||||
}
|
||||
|
||||
type publicreportSubscribePhoneColumns struct {
|
||||
Created column
|
||||
Deleted column
|
||||
DistrictID column
|
||||
PhoneE164 column
|
||||
}
|
||||
|
||||
func (c publicreportSubscribePhoneColumns) AsSlice() []column {
|
||||
return []column{
|
||||
c.Created, c.Deleted, c.DistrictID, c.PhoneE164,
|
||||
}
|
||||
}
|
||||
|
||||
type publicreportSubscribePhoneIndexes struct {
|
||||
SubscribePhonePkey index
|
||||
}
|
||||
|
||||
func (i publicreportSubscribePhoneIndexes) AsSlice() []index {
|
||||
return []index{
|
||||
i.SubscribePhonePkey,
|
||||
}
|
||||
}
|
||||
|
||||
type publicreportSubscribePhoneForeignKeys struct {
|
||||
PublicreportSubscribePhoneSubscribePhoneDistrictIDFkey foreignKey
|
||||
PublicreportSubscribePhoneSubscribePhonePhoneE164Fkey foreignKey
|
||||
}
|
||||
|
||||
func (f publicreportSubscribePhoneForeignKeys) AsSlice() []foreignKey {
|
||||
return []foreignKey{
|
||||
f.PublicreportSubscribePhoneSubscribePhoneDistrictIDFkey, f.PublicreportSubscribePhoneSubscribePhonePhoneE164Fkey,
|
||||
}
|
||||
}
|
||||
|
||||
type publicreportSubscribePhoneUniques struct{}
|
||||
|
||||
func (u publicreportSubscribePhoneUniques) AsSlice() []constraint {
|
||||
return []constraint{}
|
||||
}
|
||||
|
||||
type publicreportSubscribePhoneChecks struct{}
|
||||
|
||||
func (c publicreportSubscribePhoneChecks) AsSlice() []check {
|
||||
return []check{}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue