This requires a bunch of changes since the types on these tables are much closer to the underlying types of the Fieldseeker data we are getting back from the API. I now need to use proper UUID types everywhere, which means I had to modify the bob gen config to consistently use google UUID, my UUID library of choice. I also had to add the organization_id to all the fieldseeker tables since we rely on them existing for some of our compound queries. There were some changes to the API type signatures to get things to build. I may yet regret those.
282 lines
7.1 KiB
Go
282 lines
7.1 KiB
Go
// Code generated by BobGen psql v0.0.4-0.20251216163753-8e325b7c773a+dirty. 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 FieldseekerContainerrelates = Table[
|
|
fieldseekerContainerrelateColumns,
|
|
fieldseekerContainerrelateIndexes,
|
|
fieldseekerContainerrelateForeignKeys,
|
|
fieldseekerContainerrelateUniques,
|
|
fieldseekerContainerrelateChecks,
|
|
]{
|
|
Schema: "fieldseeker",
|
|
Name: "containerrelate",
|
|
Columns: fieldseekerContainerrelateColumns{
|
|
Objectid: column{
|
|
Name: "objectid",
|
|
DBType: "bigint",
|
|
Default: "nextval('fieldseeker.containerrelate_objectid_seq'::regclass)",
|
|
Comment: "",
|
|
Nullable: false,
|
|
Generated: false,
|
|
AutoIncr: false,
|
|
},
|
|
Globalid: column{
|
|
Name: "globalid",
|
|
DBType: "uuid",
|
|
Default: "NULL",
|
|
Comment: "Original attribute from ArcGIS API is GlobalID",
|
|
Nullable: true,
|
|
Generated: false,
|
|
AutoIncr: false,
|
|
},
|
|
CreatedUser: column{
|
|
Name: "created_user",
|
|
DBType: "character varying",
|
|
Default: "NULL",
|
|
Comment: "Original attribute from ArcGIS API is created_user",
|
|
Nullable: true,
|
|
Generated: false,
|
|
AutoIncr: false,
|
|
},
|
|
CreatedDate: column{
|
|
Name: "created_date",
|
|
DBType: "timestamp without time zone",
|
|
Default: "NULL",
|
|
Comment: "Original attribute from ArcGIS API is created_date",
|
|
Nullable: true,
|
|
Generated: false,
|
|
AutoIncr: false,
|
|
},
|
|
LastEditedUser: column{
|
|
Name: "last_edited_user",
|
|
DBType: "character varying",
|
|
Default: "NULL",
|
|
Comment: "Original attribute from ArcGIS API is last_edited_user",
|
|
Nullable: true,
|
|
Generated: false,
|
|
AutoIncr: false,
|
|
},
|
|
LastEditedDate: column{
|
|
Name: "last_edited_date",
|
|
DBType: "timestamp without time zone",
|
|
Default: "NULL",
|
|
Comment: "Original attribute from ArcGIS API is last_edited_date",
|
|
Nullable: true,
|
|
Generated: false,
|
|
AutoIncr: false,
|
|
},
|
|
Inspsampleid: column{
|
|
Name: "inspsampleid",
|
|
DBType: "uuid",
|
|
Default: "NULL",
|
|
Comment: "Original attribute from ArcGIS API is INSPSAMPLEID",
|
|
Nullable: true,
|
|
Generated: false,
|
|
AutoIncr: false,
|
|
},
|
|
Mosquitoinspid: column{
|
|
Name: "mosquitoinspid",
|
|
DBType: "uuid",
|
|
Default: "NULL",
|
|
Comment: "Original attribute from ArcGIS API is MOSQUITOINSPID",
|
|
Nullable: true,
|
|
Generated: false,
|
|
AutoIncr: false,
|
|
},
|
|
Treatmentid: column{
|
|
Name: "treatmentid",
|
|
DBType: "uuid",
|
|
Default: "NULL",
|
|
Comment: "Original attribute from ArcGIS API is TREATMENTID",
|
|
Nullable: true,
|
|
Generated: false,
|
|
AutoIncr: false,
|
|
},
|
|
Containertype: column{
|
|
Name: "containertype",
|
|
DBType: "character varying",
|
|
Default: "NULL",
|
|
Comment: "Original attribute from ArcGIS API is CONTAINERTYPE",
|
|
Nullable: true,
|
|
Generated: false,
|
|
AutoIncr: false,
|
|
},
|
|
Creationdate: column{
|
|
Name: "creationdate",
|
|
DBType: "timestamp without time zone",
|
|
Default: "NULL",
|
|
Comment: "Original attribute from ArcGIS API is CreationDate",
|
|
Nullable: true,
|
|
Generated: false,
|
|
AutoIncr: false,
|
|
},
|
|
Creator: column{
|
|
Name: "creator",
|
|
DBType: "character varying",
|
|
Default: "NULL",
|
|
Comment: "Original attribute from ArcGIS API is Creator",
|
|
Nullable: true,
|
|
Generated: false,
|
|
AutoIncr: false,
|
|
},
|
|
Editdate: column{
|
|
Name: "editdate",
|
|
DBType: "timestamp without time zone",
|
|
Default: "NULL",
|
|
Comment: "Original attribute from ArcGIS API is EditDate",
|
|
Nullable: true,
|
|
Generated: false,
|
|
AutoIncr: false,
|
|
},
|
|
Editor: column{
|
|
Name: "editor",
|
|
DBType: "character varying",
|
|
Default: "NULL",
|
|
Comment: "Original attribute from ArcGIS API is Editor",
|
|
Nullable: true,
|
|
Generated: false,
|
|
AutoIncr: false,
|
|
},
|
|
Geometry: column{
|
|
Name: "geometry",
|
|
DBType: "jsonb",
|
|
Default: "",
|
|
Comment: "",
|
|
Nullable: false,
|
|
Generated: false,
|
|
AutoIncr: false,
|
|
},
|
|
Geospatial: column{
|
|
Name: "geospatial",
|
|
DBType: "geometry",
|
|
Default: "NULL",
|
|
Comment: "",
|
|
Nullable: true,
|
|
Generated: false,
|
|
AutoIncr: false,
|
|
},
|
|
Version: column{
|
|
Name: "version",
|
|
DBType: "integer",
|
|
Default: "1",
|
|
Comment: "",
|
|
Nullable: false,
|
|
Generated: false,
|
|
AutoIncr: false,
|
|
},
|
|
OrganizationID: column{
|
|
Name: "organization_id",
|
|
DBType: "integer",
|
|
Default: "",
|
|
Comment: "",
|
|
Nullable: false,
|
|
Generated: false,
|
|
AutoIncr: false,
|
|
},
|
|
},
|
|
Indexes: fieldseekerContainerrelateIndexes{
|
|
ContainerrelatePkey: index{
|
|
Type: "btree",
|
|
Name: "containerrelate_pkey",
|
|
Columns: []indexColumn{
|
|
{
|
|
Name: "objectid",
|
|
Desc: null.FromCond(false, true),
|
|
IsExpression: false,
|
|
},
|
|
{
|
|
Name: "version",
|
|
Desc: null.FromCond(false, true),
|
|
IsExpression: false,
|
|
},
|
|
},
|
|
Unique: true,
|
|
Comment: "",
|
|
NullsFirst: []bool{false, false},
|
|
NullsDistinct: false,
|
|
Where: "",
|
|
Include: []string{},
|
|
},
|
|
},
|
|
PrimaryKey: &constraint{
|
|
Name: "containerrelate_pkey",
|
|
Columns: []string{"objectid", "version"},
|
|
Comment: "",
|
|
},
|
|
ForeignKeys: fieldseekerContainerrelateForeignKeys{
|
|
FieldseekerContainerrelateContainerrelateOrganizationIDFkey: foreignKey{
|
|
constraint: constraint{
|
|
Name: "fieldseeker.containerrelate.containerrelate_organization_id_fkey",
|
|
Columns: []string{"organization_id"},
|
|
Comment: "",
|
|
},
|
|
ForeignTable: "organization",
|
|
ForeignColumns: []string{"id"},
|
|
},
|
|
},
|
|
|
|
Comment: "",
|
|
}
|
|
|
|
type fieldseekerContainerrelateColumns struct {
|
|
Objectid column
|
|
Globalid column
|
|
CreatedUser column
|
|
CreatedDate column
|
|
LastEditedUser column
|
|
LastEditedDate column
|
|
Inspsampleid column
|
|
Mosquitoinspid column
|
|
Treatmentid column
|
|
Containertype column
|
|
Creationdate column
|
|
Creator column
|
|
Editdate column
|
|
Editor column
|
|
Geometry column
|
|
Geospatial column
|
|
Version column
|
|
OrganizationID column
|
|
}
|
|
|
|
func (c fieldseekerContainerrelateColumns) AsSlice() []column {
|
|
return []column{
|
|
c.Objectid, c.Globalid, c.CreatedUser, c.CreatedDate, c.LastEditedUser, c.LastEditedDate, c.Inspsampleid, c.Mosquitoinspid, c.Treatmentid, c.Containertype, c.Creationdate, c.Creator, c.Editdate, c.Editor, c.Geometry, c.Geospatial, c.Version, c.OrganizationID,
|
|
}
|
|
}
|
|
|
|
type fieldseekerContainerrelateIndexes struct {
|
|
ContainerrelatePkey index
|
|
}
|
|
|
|
func (i fieldseekerContainerrelateIndexes) AsSlice() []index {
|
|
return []index{
|
|
i.ContainerrelatePkey,
|
|
}
|
|
}
|
|
|
|
type fieldseekerContainerrelateForeignKeys struct {
|
|
FieldseekerContainerrelateContainerrelateOrganizationIDFkey foreignKey
|
|
}
|
|
|
|
func (f fieldseekerContainerrelateForeignKeys) AsSlice() []foreignKey {
|
|
return []foreignKey{
|
|
f.FieldseekerContainerrelateContainerrelateOrganizationIDFkey,
|
|
}
|
|
}
|
|
|
|
type fieldseekerContainerrelateUniques struct{}
|
|
|
|
func (u fieldseekerContainerrelateUniques) AsSlice() []constraint {
|
|
return []constraint{}
|
|
}
|
|
|
|
type fieldseekerContainerrelateChecks struct{}
|
|
|
|
func (c fieldseekerContainerrelateChecks) AsSlice() []check {
|
|
return []check{}
|
|
}
|