nidus-sync/db/dbinfo/user_.bob.go
Eli Ribble 1395e3d3ac Remove old FieldSeeker tables, use v2 generated tables.
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.
2025-12-24 17:58:08 -07:00

217 lines
4.6 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 Users = Table[
userColumns,
userIndexes,
userForeignKeys,
userUniques,
userChecks,
]{
Schema: "",
Name: "user_",
Columns: userColumns{
ID: column{
Name: "id",
DBType: "integer",
Default: "nextval('user__id_seq'::regclass)",
Comment: "",
Nullable: false,
Generated: false,
AutoIncr: false,
},
ArcgisAccessToken: column{
Name: "arcgis_access_token",
DBType: "text",
Default: "NULL",
Comment: "",
Nullable: true,
Generated: false,
AutoIncr: false,
},
ArcgisLicense: column{
Name: "arcgis_license",
DBType: "public.arcgislicensetype",
Default: "NULL",
Comment: "",
Nullable: true,
Generated: false,
AutoIncr: false,
},
ArcgisRefreshToken: column{
Name: "arcgis_refresh_token",
DBType: "text",
Default: "NULL",
Comment: "",
Nullable: true,
Generated: false,
AutoIncr: false,
},
ArcgisRefreshTokenExpires: column{
Name: "arcgis_refresh_token_expires",
DBType: "timestamp without time zone",
Default: "NULL",
Comment: "",
Nullable: true,
Generated: false,
AutoIncr: false,
},
ArcgisRole: column{
Name: "arcgis_role",
DBType: "text",
Default: "NULL",
Comment: "",
Nullable: true,
Generated: false,
AutoIncr: false,
},
DisplayName: column{
Name: "display_name",
DBType: "character varying",
Default: "",
Comment: "",
Nullable: false,
Generated: false,
AutoIncr: false,
},
Email: column{
Name: "email",
DBType: "text",
Default: "NULL",
Comment: "",
Nullable: true,
Generated: false,
AutoIncr: false,
},
OrganizationID: column{
Name: "organization_id",
DBType: "integer",
Default: "NULL",
Comment: "",
Nullable: true,
Generated: false,
AutoIncr: false,
},
Username: column{
Name: "username",
DBType: "text",
Default: "",
Comment: "",
Nullable: false,
Generated: false,
AutoIncr: false,
},
PasswordHashType: column{
Name: "password_hash_type",
DBType: "public.hashtype",
Default: "",
Comment: "",
Nullable: false,
Generated: false,
AutoIncr: false,
},
PasswordHash: column{
Name: "password_hash",
DBType: "text",
Default: "",
Comment: "",
Nullable: false,
Generated: false,
AutoIncr: false,
},
},
Indexes: userIndexes{
UserPkey: index{
Type: "btree",
Name: "user__pkey",
Columns: []indexColumn{
{
Name: "id",
Desc: null.FromCond(false, true),
IsExpression: false,
},
},
Unique: true,
Comment: "",
NullsFirst: []bool{false},
NullsDistinct: false,
Where: "",
Include: []string{},
},
},
PrimaryKey: &constraint{
Name: "user__pkey",
Columns: []string{"id"},
Comment: "",
},
ForeignKeys: userForeignKeys{
UserUserOrganizationIDFkey: foreignKey{
constraint: constraint{
Name: "user_.user__organization_id_fkey",
Columns: []string{"organization_id"},
Comment: "",
},
ForeignTable: "organization",
ForeignColumns: []string{"id"},
},
},
Comment: "",
}
type userColumns struct {
ID column
ArcgisAccessToken column
ArcgisLicense column
ArcgisRefreshToken column
ArcgisRefreshTokenExpires column
ArcgisRole column
DisplayName column
Email column
OrganizationID column
Username column
PasswordHashType column
PasswordHash column
}
func (c userColumns) AsSlice() []column {
return []column{
c.ID, c.ArcgisAccessToken, c.ArcgisLicense, c.ArcgisRefreshToken, c.ArcgisRefreshTokenExpires, c.ArcgisRole, c.DisplayName, c.Email, c.OrganizationID, c.Username, c.PasswordHashType, c.PasswordHash,
}
}
type userIndexes struct {
UserPkey index
}
func (i userIndexes) AsSlice() []index {
return []index{
i.UserPkey,
}
}
type userForeignKeys struct {
UserUserOrganizationIDFkey foreignKey
}
func (f userForeignKeys) AsSlice() []foreignKey {
return []foreignKey{
f.UserUserOrganizationIDFkey,
}
}
type userUniques struct{}
func (u userUniques) AsSlice() []constraint {
return []constraint{}
}
type userChecks struct{}
func (c userChecks) AsSlice() []check {
return []check{}
}