// Code generated by BobGen psql v0.42.5. 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 ArcgisOauthTokens = Table[
	arcgisOauthTokenColumns,
	arcgisOauthTokenIndexes,
	arcgisOauthTokenForeignKeys,
	arcgisOauthTokenUniques,
	arcgisOauthTokenChecks,
]{
	Schema: "arcgis",
	Name:   "oauth_token",
	Columns: arcgisOauthTokenColumns{
		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,
		},
		ArcgisAccountID: column{
			Name:      "arcgis_account_id",
			DBType:    "text",
			Default:   "NULL",
			Comment:   "",
			Nullable:  true,
			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,
		},
		Created: column{
			Name:      "created",
			DBType:    "timestamp without time zone",
			Default:   "",
			Comment:   "",
			Nullable:  false,
			Generated: false,
			AutoIncr:  false,
		},
		ID: column{
			Name:      "id",
			DBType:    "integer",
			Default:   "nextval('arcgis.oauth_token_id_seq'::regclass)",
			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,
		},
		RefreshToken: column{
			Name:      "refresh_token",
			DBType:    "text",
			Default:   "",
			Comment:   "",
			Nullable:  false,
			Generated: false,
			AutoIncr:  false,
		},
		RefreshTokenExpires: column{
			Name:      "refresh_token_expires",
			DBType:    "timestamp without time zone",
			Default:   "",
			Comment:   "",
			Nullable:  false,
			Generated: false,
			AutoIncr:  false,
		},
		UserID: column{
			Name:      "user_id",
			DBType:    "integer",
			Default:   "",
			Comment:   "",
			Nullable:  false,
			Generated: false,
			AutoIncr:  false,
		},
		Username: column{
			Name:      "username",
			DBType:    "text",
			Default:   "",
			Comment:   "",
			Nullable:  false,
			Generated: false,
			AutoIncr:  false,
		},
	},
	Indexes: arcgisOauthTokenIndexes{
		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: arcgisOauthTokenForeignKeys{
		ArcgisOauthTokenOauthTokenArcgisAccountIDFkey: foreignKey{
			constraint: constraint{
				Name:    "arcgis.oauth_token.oauth_token_arcgis_account_id_fkey",
				Columns: []string{"arcgis_account_id"},
				Comment: "",
			},
			ForeignTable:   "arcgis.account",
			ForeignColumns: []string{"id"},
		},
		ArcgisOauthTokenOauthTokenUserIDFkey: foreignKey{
			constraint: constraint{
				Name:    "arcgis.oauth_token.oauth_token_user_id_fkey",
				Columns: []string{"user_id"},
				Comment: "",
			},
			ForeignTable:   "user_",
			ForeignColumns: []string{"id"},
		},
	},

	Comment: "",
}

type arcgisOauthTokenColumns struct {
	AccessToken         column
	AccessTokenExpires  column
	ArcgisAccountID     column
	ArcgisID            column
	ArcgisLicenseTypeID column
	Created             column
	ID                  column
	InvalidatedAt       column
	RefreshToken        column
	RefreshTokenExpires column
	UserID              column
	Username            column
}

func (c arcgisOauthTokenColumns) AsSlice() []column {
	return []column{
		c.AccessToken, c.AccessTokenExpires, c.ArcgisAccountID, c.ArcgisID, c.ArcgisLicenseTypeID, c.Created, c.ID, c.InvalidatedAt, c.RefreshToken, c.RefreshTokenExpires, c.UserID, c.Username,
	}
}

type arcgisOauthTokenIndexes struct {
	OauthTokenPkey index
}

func (i arcgisOauthTokenIndexes) AsSlice() []index {
	return []index{
		i.OauthTokenPkey,
	}
}

type arcgisOauthTokenForeignKeys struct {
	ArcgisOauthTokenOauthTokenArcgisAccountIDFkey foreignKey
	ArcgisOauthTokenOauthTokenUserIDFkey          foreignKey
}

func (f arcgisOauthTokenForeignKeys) AsSlice() []foreignKey {
	return []foreignKey{
		f.ArcgisOauthTokenOauthTokenArcgisAccountIDFkey, f.ArcgisOauthTokenOauthTokenUserIDFkey,
	}
}

type arcgisOauthTokenUniques struct{}

func (u arcgisOauthTokenUniques) AsSlice() []constraint {
	return []constraint{}
}

type arcgisOauthTokenChecks struct{}

func (c arcgisOauthTokenChecks) AsSlice() []check {
	return []check{}
}
