We need the org ID so that we can avoid bleedover between different organizations.
572 lines
13 KiB
Go
572 lines
13 KiB
Go
// Code generated by BobGen psql v0.41.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 HistoryTrapdata = Table[
|
|
historyTrapdatumColumns,
|
|
historyTrapdatumIndexes,
|
|
historyTrapdatumForeignKeys,
|
|
historyTrapdatumUniques,
|
|
historyTrapdatumChecks,
|
|
]{
|
|
Schema: "",
|
|
Name: "history_trapdata",
|
|
Columns: historyTrapdatumColumns{
|
|
OrganizationID: column{
|
|
Name: "organization_id",
|
|
DBType: "integer",
|
|
Default: "",
|
|
Comment: "",
|
|
Nullable: false,
|
|
Generated: false,
|
|
AutoIncr: false,
|
|
},
|
|
Avetemp: column{
|
|
Name: "avetemp",
|
|
DBType: "double precision",
|
|
Default: "NULL",
|
|
Comment: "",
|
|
Nullable: true,
|
|
Generated: false,
|
|
AutoIncr: false,
|
|
},
|
|
Comments: column{
|
|
Name: "comments",
|
|
DBType: "text",
|
|
Default: "NULL",
|
|
Comment: "",
|
|
Nullable: true,
|
|
Generated: false,
|
|
AutoIncr: false,
|
|
},
|
|
Creationdate: column{
|
|
Name: "creationdate",
|
|
DBType: "bigint",
|
|
Default: "NULL",
|
|
Comment: "",
|
|
Nullable: true,
|
|
Generated: false,
|
|
AutoIncr: false,
|
|
},
|
|
Creator: column{
|
|
Name: "creator",
|
|
DBType: "text",
|
|
Default: "NULL",
|
|
Comment: "",
|
|
Nullable: true,
|
|
Generated: false,
|
|
AutoIncr: false,
|
|
},
|
|
Enddatetime: column{
|
|
Name: "enddatetime",
|
|
DBType: "bigint",
|
|
Default: "NULL",
|
|
Comment: "",
|
|
Nullable: true,
|
|
Generated: false,
|
|
AutoIncr: false,
|
|
},
|
|
Editdate: column{
|
|
Name: "editdate",
|
|
DBType: "bigint",
|
|
Default: "NULL",
|
|
Comment: "",
|
|
Nullable: true,
|
|
Generated: false,
|
|
AutoIncr: false,
|
|
},
|
|
Editor: column{
|
|
Name: "editor",
|
|
DBType: "text",
|
|
Default: "NULL",
|
|
Comment: "",
|
|
Nullable: true,
|
|
Generated: false,
|
|
AutoIncr: false,
|
|
},
|
|
Fieldtech: column{
|
|
Name: "fieldtech",
|
|
DBType: "text",
|
|
Default: "NULL",
|
|
Comment: "",
|
|
Nullable: true,
|
|
Generated: false,
|
|
AutoIncr: false,
|
|
},
|
|
Field: column{
|
|
Name: "field",
|
|
DBType: "bigint",
|
|
Default: "NULL",
|
|
Comment: "",
|
|
Nullable: true,
|
|
Generated: false,
|
|
AutoIncr: false,
|
|
},
|
|
Gatewaysync: column{
|
|
Name: "gatewaysync",
|
|
DBType: "smallint",
|
|
Default: "NULL",
|
|
Comment: "",
|
|
Nullable: true,
|
|
Generated: false,
|
|
AutoIncr: false,
|
|
},
|
|
Globalid: column{
|
|
Name: "globalid",
|
|
DBType: "text",
|
|
Default: "NULL",
|
|
Comment: "",
|
|
Nullable: true,
|
|
Generated: false,
|
|
AutoIncr: false,
|
|
},
|
|
Idbytech: column{
|
|
Name: "idbytech",
|
|
DBType: "text",
|
|
Default: "NULL",
|
|
Comment: "",
|
|
Nullable: true,
|
|
Generated: false,
|
|
AutoIncr: false,
|
|
},
|
|
Locationname: column{
|
|
Name: "locationname",
|
|
DBType: "text",
|
|
Default: "NULL",
|
|
Comment: "",
|
|
Nullable: true,
|
|
Generated: false,
|
|
AutoIncr: false,
|
|
},
|
|
LocID: column{
|
|
Name: "loc_id",
|
|
DBType: "text",
|
|
Default: "NULL",
|
|
Comment: "",
|
|
Nullable: true,
|
|
Generated: false,
|
|
AutoIncr: false,
|
|
},
|
|
LR: column{
|
|
Name: "lr",
|
|
DBType: "smallint",
|
|
Default: "NULL",
|
|
Comment: "",
|
|
Nullable: true,
|
|
Generated: false,
|
|
AutoIncr: false,
|
|
},
|
|
Objectid: column{
|
|
Name: "objectid",
|
|
DBType: "integer",
|
|
Default: "",
|
|
Comment: "",
|
|
Nullable: false,
|
|
Generated: false,
|
|
AutoIncr: false,
|
|
},
|
|
Processed: column{
|
|
Name: "processed",
|
|
DBType: "smallint",
|
|
Default: "NULL",
|
|
Comment: "",
|
|
Nullable: true,
|
|
Generated: false,
|
|
AutoIncr: false,
|
|
},
|
|
Raingauge: column{
|
|
Name: "raingauge",
|
|
DBType: "double precision",
|
|
Default: "NULL",
|
|
Comment: "",
|
|
Nullable: true,
|
|
Generated: false,
|
|
AutoIncr: false,
|
|
},
|
|
Recordstatus: column{
|
|
Name: "recordstatus",
|
|
DBType: "smallint",
|
|
Default: "NULL",
|
|
Comment: "",
|
|
Nullable: true,
|
|
Generated: false,
|
|
AutoIncr: false,
|
|
},
|
|
Reviewed: column{
|
|
Name: "reviewed",
|
|
DBType: "smallint",
|
|
Default: "NULL",
|
|
Comment: "",
|
|
Nullable: true,
|
|
Generated: false,
|
|
AutoIncr: false,
|
|
},
|
|
Reviewedby: column{
|
|
Name: "reviewedby",
|
|
DBType: "text",
|
|
Default: "NULL",
|
|
Comment: "",
|
|
Nullable: true,
|
|
Generated: false,
|
|
AutoIncr: false,
|
|
},
|
|
Revieweddate: column{
|
|
Name: "revieweddate",
|
|
DBType: "bigint",
|
|
Default: "NULL",
|
|
Comment: "",
|
|
Nullable: true,
|
|
Generated: false,
|
|
AutoIncr: false,
|
|
},
|
|
Sitecond: column{
|
|
Name: "sitecond",
|
|
DBType: "text",
|
|
Default: "NULL",
|
|
Comment: "",
|
|
Nullable: true,
|
|
Generated: false,
|
|
AutoIncr: false,
|
|
},
|
|
Sortbytech: column{
|
|
Name: "sortbytech",
|
|
DBType: "text",
|
|
Default: "NULL",
|
|
Comment: "",
|
|
Nullable: true,
|
|
Generated: false,
|
|
AutoIncr: false,
|
|
},
|
|
Srid: column{
|
|
Name: "srid",
|
|
DBType: "text",
|
|
Default: "NULL",
|
|
Comment: "",
|
|
Nullable: true,
|
|
Generated: false,
|
|
AutoIncr: false,
|
|
},
|
|
Startdatetime: column{
|
|
Name: "startdatetime",
|
|
DBType: "bigint",
|
|
Default: "NULL",
|
|
Comment: "",
|
|
Nullable: true,
|
|
Generated: false,
|
|
AutoIncr: false,
|
|
},
|
|
Trapactivitytype: column{
|
|
Name: "trapactivitytype",
|
|
DBType: "text",
|
|
Default: "NULL",
|
|
Comment: "",
|
|
Nullable: true,
|
|
Generated: false,
|
|
AutoIncr: false,
|
|
},
|
|
Trapcondition: column{
|
|
Name: "trapcondition",
|
|
DBType: "text",
|
|
Default: "NULL",
|
|
Comment: "",
|
|
Nullable: true,
|
|
Generated: false,
|
|
AutoIncr: false,
|
|
},
|
|
Trapnights: column{
|
|
Name: "trapnights",
|
|
DBType: "smallint",
|
|
Default: "NULL",
|
|
Comment: "",
|
|
Nullable: true,
|
|
Generated: false,
|
|
AutoIncr: false,
|
|
},
|
|
Traptype: column{
|
|
Name: "traptype",
|
|
DBType: "text",
|
|
Default: "NULL",
|
|
Comment: "",
|
|
Nullable: true,
|
|
Generated: false,
|
|
AutoIncr: false,
|
|
},
|
|
Voltage: column{
|
|
Name: "voltage",
|
|
DBType: "double precision",
|
|
Default: "NULL",
|
|
Comment: "",
|
|
Nullable: true,
|
|
Generated: false,
|
|
AutoIncr: false,
|
|
},
|
|
Winddir: column{
|
|
Name: "winddir",
|
|
DBType: "text",
|
|
Default: "NULL",
|
|
Comment: "",
|
|
Nullable: true,
|
|
Generated: false,
|
|
AutoIncr: false,
|
|
},
|
|
Windspeed: column{
|
|
Name: "windspeed",
|
|
DBType: "double precision",
|
|
Default: "NULL",
|
|
Comment: "",
|
|
Nullable: true,
|
|
Generated: false,
|
|
AutoIncr: false,
|
|
},
|
|
Zone: column{
|
|
Name: "zone",
|
|
DBType: "text",
|
|
Default: "NULL",
|
|
Comment: "",
|
|
Nullable: true,
|
|
Generated: false,
|
|
AutoIncr: false,
|
|
},
|
|
Zone2: column{
|
|
Name: "zone2",
|
|
DBType: "text",
|
|
Default: "NULL",
|
|
Comment: "",
|
|
Nullable: true,
|
|
Generated: false,
|
|
AutoIncr: false,
|
|
},
|
|
Created: column{
|
|
Name: "created",
|
|
DBType: "timestamp without time zone",
|
|
Default: "NULL",
|
|
Comment: "",
|
|
Nullable: true,
|
|
Generated: false,
|
|
AutoIncr: false,
|
|
},
|
|
CreatedDate: column{
|
|
Name: "created_date",
|
|
DBType: "bigint",
|
|
Default: "NULL",
|
|
Comment: "",
|
|
Nullable: true,
|
|
Generated: false,
|
|
AutoIncr: false,
|
|
},
|
|
CreatedUser: column{
|
|
Name: "created_user",
|
|
DBType: "text",
|
|
Default: "NULL",
|
|
Comment: "",
|
|
Nullable: true,
|
|
Generated: false,
|
|
AutoIncr: false,
|
|
},
|
|
GeometryX: column{
|
|
Name: "geometry_x",
|
|
DBType: "double precision",
|
|
Default: "NULL",
|
|
Comment: "",
|
|
Nullable: true,
|
|
Generated: false,
|
|
AutoIncr: false,
|
|
},
|
|
GeometryY: column{
|
|
Name: "geometry_y",
|
|
DBType: "double precision",
|
|
Default: "NULL",
|
|
Comment: "",
|
|
Nullable: true,
|
|
Generated: false,
|
|
AutoIncr: false,
|
|
},
|
|
LastEditedDate: column{
|
|
Name: "last_edited_date",
|
|
DBType: "bigint",
|
|
Default: "NULL",
|
|
Comment: "",
|
|
Nullable: true,
|
|
Generated: false,
|
|
AutoIncr: false,
|
|
},
|
|
LastEditedUser: column{
|
|
Name: "last_edited_user",
|
|
DBType: "text",
|
|
Default: "NULL",
|
|
Comment: "",
|
|
Nullable: true,
|
|
Generated: false,
|
|
AutoIncr: false,
|
|
},
|
|
Lure: column{
|
|
Name: "lure",
|
|
DBType: "text",
|
|
Default: "NULL",
|
|
Comment: "",
|
|
Nullable: true,
|
|
Generated: false,
|
|
AutoIncr: false,
|
|
},
|
|
Vectorsurvtrapdataid: column{
|
|
Name: "vectorsurvtrapdataid",
|
|
DBType: "text",
|
|
Default: "NULL",
|
|
Comment: "",
|
|
Nullable: true,
|
|
Generated: false,
|
|
AutoIncr: false,
|
|
},
|
|
Vectorsurvtraplocationid: column{
|
|
Name: "vectorsurvtraplocationid",
|
|
DBType: "text",
|
|
Default: "NULL",
|
|
Comment: "",
|
|
Nullable: true,
|
|
Generated: false,
|
|
AutoIncr: false,
|
|
},
|
|
Version: column{
|
|
Name: "version",
|
|
DBType: "integer",
|
|
Default: "",
|
|
Comment: "",
|
|
Nullable: false,
|
|
Generated: false,
|
|
AutoIncr: false,
|
|
},
|
|
},
|
|
Indexes: historyTrapdatumIndexes{
|
|
HistoryTrapdataPkey: index{
|
|
Type: "btree",
|
|
Name: "history_trapdata_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: "history_trapdata_pkey",
|
|
Columns: []string{"objectid", "version"},
|
|
Comment: "",
|
|
},
|
|
ForeignKeys: historyTrapdatumForeignKeys{
|
|
HistoryTrapdataHistoryTrapdataOrganizationIDFkey: foreignKey{
|
|
constraint: constraint{
|
|
Name: "history_trapdata.history_trapdata_organization_id_fkey",
|
|
Columns: []string{"organization_id"},
|
|
Comment: "",
|
|
},
|
|
ForeignTable: "organization",
|
|
ForeignColumns: []string{"id"},
|
|
},
|
|
},
|
|
|
|
Comment: "",
|
|
}
|
|
|
|
type historyTrapdatumColumns struct {
|
|
OrganizationID column
|
|
Avetemp column
|
|
Comments column
|
|
Creationdate column
|
|
Creator column
|
|
Enddatetime column
|
|
Editdate column
|
|
Editor column
|
|
Fieldtech column
|
|
Field column
|
|
Gatewaysync column
|
|
Globalid column
|
|
Idbytech column
|
|
Locationname column
|
|
LocID column
|
|
LR column
|
|
Objectid column
|
|
Processed column
|
|
Raingauge column
|
|
Recordstatus column
|
|
Reviewed column
|
|
Reviewedby column
|
|
Revieweddate column
|
|
Sitecond column
|
|
Sortbytech column
|
|
Srid column
|
|
Startdatetime column
|
|
Trapactivitytype column
|
|
Trapcondition column
|
|
Trapnights column
|
|
Traptype column
|
|
Voltage column
|
|
Winddir column
|
|
Windspeed column
|
|
Zone column
|
|
Zone2 column
|
|
Created column
|
|
CreatedDate column
|
|
CreatedUser column
|
|
GeometryX column
|
|
GeometryY column
|
|
LastEditedDate column
|
|
LastEditedUser column
|
|
Lure column
|
|
Vectorsurvtrapdataid column
|
|
Vectorsurvtraplocationid column
|
|
Version column
|
|
}
|
|
|
|
func (c historyTrapdatumColumns) AsSlice() []column {
|
|
return []column{
|
|
c.OrganizationID, c.Avetemp, c.Comments, c.Creationdate, c.Creator, c.Enddatetime, c.Editdate, c.Editor, c.Fieldtech, c.Field, c.Gatewaysync, c.Globalid, c.Idbytech, c.Locationname, c.LocID, c.LR, c.Objectid, c.Processed, c.Raingauge, c.Recordstatus, c.Reviewed, c.Reviewedby, c.Revieweddate, c.Sitecond, c.Sortbytech, c.Srid, c.Startdatetime, c.Trapactivitytype, c.Trapcondition, c.Trapnights, c.Traptype, c.Voltage, c.Winddir, c.Windspeed, c.Zone, c.Zone2, c.Created, c.CreatedDate, c.CreatedUser, c.GeometryX, c.GeometryY, c.LastEditedDate, c.LastEditedUser, c.Lure, c.Vectorsurvtrapdataid, c.Vectorsurvtraplocationid, c.Version,
|
|
}
|
|
}
|
|
|
|
type historyTrapdatumIndexes struct {
|
|
HistoryTrapdataPkey index
|
|
}
|
|
|
|
func (i historyTrapdatumIndexes) AsSlice() []index {
|
|
return []index{
|
|
i.HistoryTrapdataPkey,
|
|
}
|
|
}
|
|
|
|
type historyTrapdatumForeignKeys struct {
|
|
HistoryTrapdataHistoryTrapdataOrganizationIDFkey foreignKey
|
|
}
|
|
|
|
func (f historyTrapdatumForeignKeys) AsSlice() []foreignKey {
|
|
return []foreignKey{
|
|
f.HistoryTrapdataHistoryTrapdataOrganizationIDFkey,
|
|
}
|
|
}
|
|
|
|
type historyTrapdatumUniques struct{}
|
|
|
|
func (u historyTrapdatumUniques) AsSlice() []constraint {
|
|
return []constraint{}
|
|
}
|
|
|
|
type historyTrapdatumChecks struct{}
|
|
|
|
func (c historyTrapdatumChecks) AsSlice() []check {
|
|
return []check{}
|
|
}
|