nidus-sync/db/dbinfo/organization.bob.go
Eli Ribble 684c424131
Move imported districts to its own schema, add ref from organization
This will make it possible to assign reports to an organization
2026-01-16 14:43:26 +00:00

220 lines
4.9 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 Organizations = Table[
organizationColumns,
organizationIndexes,
organizationForeignKeys,
organizationUniques,
organizationChecks,
]{
Schema: "",
Name: "organization",
Columns: organizationColumns{
ID: column{
Name: "id",
DBType: "integer",
Default: "nextval('organization_id_seq'::regclass)",
Comment: "",
Nullable: false,
Generated: false,
AutoIncr: false,
},
Name: column{
Name: "name",
DBType: "text",
Default: "",
Comment: "",
Nullable: false,
Generated: false,
AutoIncr: false,
},
ArcgisID: column{
Name: "arcgis_id",
DBType: "text",
Default: "NULL",
Comment: "",
Nullable: true,
Generated: false,
AutoIncr: false,
},
ArcgisName: column{
Name: "arcgis_name",
DBType: "text",
Default: "NULL",
Comment: "",
Nullable: true,
Generated: false,
AutoIncr: false,
},
FieldseekerURL: column{
Name: "fieldseeker_url",
DBType: "text",
Default: "NULL",
Comment: "",
Nullable: true,
Generated: false,
AutoIncr: false,
},
ImportDistrictGid: column{
Name: "import_district_gid",
DBType: "integer",
Default: "NULL",
Comment: "",
Nullable: true,
Generated: false,
AutoIncr: false,
},
Website: column{
Name: "website",
DBType: "text",
Default: "NULL",
Comment: "",
Nullable: true,
Generated: false,
AutoIncr: false,
},
},
Indexes: organizationIndexes{
OrganizationPkey: index{
Type: "btree",
Name: "organization_pkey",
Columns: []indexColumn{
{
Name: "id",
Desc: null.FromCond(false, true),
IsExpression: false,
},
},
Unique: true,
Comment: "",
NullsFirst: []bool{false},
NullsDistinct: false,
Where: "",
Include: []string{},
},
OrganizationImportDistrictGidKey: index{
Type: "btree",
Name: "organization_import_district_gid_key",
Columns: []indexColumn{
{
Name: "import_district_gid",
Desc: null.FromCond(false, true),
IsExpression: false,
},
},
Unique: true,
Comment: "",
NullsFirst: []bool{false},
NullsDistinct: false,
Where: "",
Include: []string{},
},
OrganizationWebsiteKey: index{
Type: "btree",
Name: "organization_website_key",
Columns: []indexColumn{
{
Name: "website",
Desc: null.FromCond(false, true),
IsExpression: false,
},
},
Unique: true,
Comment: "",
NullsFirst: []bool{false},
NullsDistinct: false,
Where: "",
Include: []string{},
},
},
PrimaryKey: &constraint{
Name: "organization_pkey",
Columns: []string{"id"},
Comment: "",
},
ForeignKeys: organizationForeignKeys{
OrganizationOrganizationImportDistrictGidFkey: foreignKey{
constraint: constraint{
Name: "organization.organization_import_district_gid_fkey",
Columns: []string{"import_district_gid"},
Comment: "",
},
ForeignTable: "import.district",
ForeignColumns: []string{"gid"},
},
},
Uniques: organizationUniques{
OrganizationImportDistrictGidKey: constraint{
Name: "organization_import_district_gid_key",
Columns: []string{"import_district_gid"},
Comment: "",
},
OrganizationWebsiteKey: constraint{
Name: "organization_website_key",
Columns: []string{"website"},
Comment: "",
},
},
Comment: "",
}
type organizationColumns struct {
ID column
Name column
ArcgisID column
ArcgisName column
FieldseekerURL column
ImportDistrictGid column
Website column
}
func (c organizationColumns) AsSlice() []column {
return []column{
c.ID, c.Name, c.ArcgisID, c.ArcgisName, c.FieldseekerURL, c.ImportDistrictGid, c.Website,
}
}
type organizationIndexes struct {
OrganizationPkey index
OrganizationImportDistrictGidKey index
OrganizationWebsiteKey index
}
func (i organizationIndexes) AsSlice() []index {
return []index{
i.OrganizationPkey, i.OrganizationImportDistrictGidKey, i.OrganizationWebsiteKey,
}
}
type organizationForeignKeys struct {
OrganizationOrganizationImportDistrictGidFkey foreignKey
}
func (f organizationForeignKeys) AsSlice() []foreignKey {
return []foreignKey{
f.OrganizationOrganizationImportDistrictGidFkey,
}
}
type organizationUniques struct {
OrganizationImportDistrictGidKey constraint
OrganizationWebsiteKey constraint
}
func (u organizationUniques) AsSlice() []constraint {
return []constraint{
u.OrganizationImportDistrictGidKey, u.OrganizationWebsiteKey,
}
}
type organizationChecks struct{}
func (c organizationChecks) AsSlice() []check {
return []check{}
}