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.
197 lines
4.2 KiB
Go
197 lines
4.2 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 OauthTokens = Table[
|
|
oauthTokenColumns,
|
|
oauthTokenIndexes,
|
|
oauthTokenForeignKeys,
|
|
oauthTokenUniques,
|
|
oauthTokenChecks,
|
|
]{
|
|
Schema: "",
|
|
Name: "oauth_token",
|
|
Columns: oauthTokenColumns{
|
|
ID: column{
|
|
Name: "id",
|
|
DBType: "integer",
|
|
Default: "nextval('oauth_token_id_seq'::regclass)",
|
|
Comment: "",
|
|
Nullable: false,
|
|
Generated: false,
|
|
AutoIncr: false,
|
|
},
|
|
AccessToken: column{
|
|
Name: "access_token",
|
|
DBType: "text",
|
|
Default: "",
|
|
Comment: "",
|
|
Nullable: false,
|
|
Generated: false,
|
|
AutoIncr: false,
|
|
},
|
|
AccessTokenExpires: column{
|
|
Name: "access_token_expires",
|
|
DBType: "timestamp without time zone",
|
|
Default: "",
|
|
Comment: "",
|
|
Nullable: false,
|
|
Generated: false,
|
|
AutoIncr: false,
|
|
},
|
|
RefreshToken: column{
|
|
Name: "refresh_token",
|
|
DBType: "text",
|
|
Default: "",
|
|
Comment: "",
|
|
Nullable: false,
|
|
Generated: false,
|
|
AutoIncr: false,
|
|
},
|
|
Username: column{
|
|
Name: "username",
|
|
DBType: "text",
|
|
Default: "",
|
|
Comment: "",
|
|
Nullable: false,
|
|
Generated: false,
|
|
AutoIncr: false,
|
|
},
|
|
UserID: column{
|
|
Name: "user_id",
|
|
DBType: "integer",
|
|
Default: "",
|
|
Comment: "",
|
|
Nullable: false,
|
|
Generated: false,
|
|
AutoIncr: false,
|
|
},
|
|
ArcgisID: column{
|
|
Name: "arcgis_id",
|
|
DBType: "text",
|
|
Default: "NULL",
|
|
Comment: "",
|
|
Nullable: true,
|
|
Generated: false,
|
|
AutoIncr: false,
|
|
},
|
|
ArcgisLicenseTypeID: column{
|
|
Name: "arcgis_license_type_id",
|
|
DBType: "text",
|
|
Default: "NULL",
|
|
Comment: "",
|
|
Nullable: true,
|
|
Generated: false,
|
|
AutoIncr: false,
|
|
},
|
|
RefreshTokenExpires: column{
|
|
Name: "refresh_token_expires",
|
|
DBType: "timestamp without time zone",
|
|
Default: "CURRENT_TIMESTAMP",
|
|
Comment: "",
|
|
Nullable: false,
|
|
Generated: false,
|
|
AutoIncr: false,
|
|
},
|
|
InvalidatedAt: column{
|
|
Name: "invalidated_at",
|
|
DBType: "timestamp without time zone",
|
|
Default: "NULL",
|
|
Comment: "",
|
|
Nullable: true,
|
|
Generated: false,
|
|
AutoIncr: false,
|
|
},
|
|
},
|
|
Indexes: oauthTokenIndexes{
|
|
OauthTokenPkey: index{
|
|
Type: "btree",
|
|
Name: "oauth_token_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: "oauth_token_pkey",
|
|
Columns: []string{"id"},
|
|
Comment: "",
|
|
},
|
|
ForeignKeys: oauthTokenForeignKeys{
|
|
OauthTokenOauthTokenUserIDFkey: foreignKey{
|
|
constraint: constraint{
|
|
Name: "oauth_token.oauth_token_user_id_fkey",
|
|
Columns: []string{"user_id"},
|
|
Comment: "",
|
|
},
|
|
ForeignTable: "user_",
|
|
ForeignColumns: []string{"id"},
|
|
},
|
|
},
|
|
|
|
Comment: "",
|
|
}
|
|
|
|
type oauthTokenColumns struct {
|
|
ID column
|
|
AccessToken column
|
|
AccessTokenExpires column
|
|
RefreshToken column
|
|
Username column
|
|
UserID column
|
|
ArcgisID column
|
|
ArcgisLicenseTypeID column
|
|
RefreshTokenExpires column
|
|
InvalidatedAt column
|
|
}
|
|
|
|
func (c oauthTokenColumns) AsSlice() []column {
|
|
return []column{
|
|
c.ID, c.AccessToken, c.AccessTokenExpires, c.RefreshToken, c.Username, c.UserID, c.ArcgisID, c.ArcgisLicenseTypeID, c.RefreshTokenExpires, c.InvalidatedAt,
|
|
}
|
|
}
|
|
|
|
type oauthTokenIndexes struct {
|
|
OauthTokenPkey index
|
|
}
|
|
|
|
func (i oauthTokenIndexes) AsSlice() []index {
|
|
return []index{
|
|
i.OauthTokenPkey,
|
|
}
|
|
}
|
|
|
|
type oauthTokenForeignKeys struct {
|
|
OauthTokenOauthTokenUserIDFkey foreignKey
|
|
}
|
|
|
|
func (f oauthTokenForeignKeys) AsSlice() []foreignKey {
|
|
return []foreignKey{
|
|
f.OauthTokenOauthTokenUserIDFkey,
|
|
}
|
|
}
|
|
|
|
type oauthTokenUniques struct{}
|
|
|
|
func (u oauthTokenUniques) AsSlice() []constraint {
|
|
return []constraint{}
|
|
}
|
|
|
|
type oauthTokenChecks struct{}
|
|
|
|
func (c oauthTokenChecks) AsSlice() []check {
|
|
return []check{}
|
|
}
|