// 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 LogImpersonations = Table[
	logImpersonationColumns,
	logImpersonationIndexes,
	logImpersonationForeignKeys,
	logImpersonationUniques,
	logImpersonationChecks,
]{
	Schema: "",
	Name:   "log_impersonation",
	Columns: logImpersonationColumns{
		BeginAt: column{
			Name:      "begin_at",
			DBType:    "timestamp without time zone",
			Default:   "",
			Comment:   "",
			Nullable:  false,
			Generated: false,
			AutoIncr:  false,
		},
		EndAt: column{
			Name:      "end_at",
			DBType:    "timestamp without time zone",
			Default:   "NULL",
			Comment:   "",
			Nullable:  true,
			Generated: false,
			AutoIncr:  false,
		},
		ID: column{
			Name:      "id",
			DBType:    "integer",
			Default:   "nextval('log_impersonation_id_seq'::regclass)",
			Comment:   "",
			Nullable:  false,
			Generated: false,
			AutoIncr:  false,
		},
		ImpersonatorID: column{
			Name:      "impersonator_id",
			DBType:    "integer",
			Default:   "",
			Comment:   "",
			Nullable:  false,
			Generated: false,
			AutoIncr:  false,
		},
		TargetID: column{
			Name:      "target_id",
			DBType:    "integer",
			Default:   "",
			Comment:   "",
			Nullable:  false,
			Generated: false,
			AutoIncr:  false,
		},
	},
	Indexes: logImpersonationIndexes{
		LogImpersonationPkey: index{
			Type: "btree",
			Name: "log_impersonation_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:    "log_impersonation_pkey",
		Columns: []string{"id"},
		Comment: "",
	},
	ForeignKeys: logImpersonationForeignKeys{
		LogImpersonationLogImpersonationImpersonatorIDFkey: foreignKey{
			constraint: constraint{
				Name:    "log_impersonation.log_impersonation_impersonator_id_fkey",
				Columns: []string{"impersonator_id"},
				Comment: "",
			},
			ForeignTable:   "user_",
			ForeignColumns: []string{"id"},
		},
		LogImpersonationLogImpersonationTargetIDFkey: foreignKey{
			constraint: constraint{
				Name:    "log_impersonation.log_impersonation_target_id_fkey",
				Columns: []string{"target_id"},
				Comment: "",
			},
			ForeignTable:   "user_",
			ForeignColumns: []string{"id"},
		},
	},

	Comment: "",
}

type logImpersonationColumns struct {
	BeginAt        column
	EndAt          column
	ID             column
	ImpersonatorID column
	TargetID       column
}

func (c logImpersonationColumns) AsSlice() []column {
	return []column{
		c.BeginAt, c.EndAt, c.ID, c.ImpersonatorID, c.TargetID,
	}
}

type logImpersonationIndexes struct {
	LogImpersonationPkey index
}

func (i logImpersonationIndexes) AsSlice() []index {
	return []index{
		i.LogImpersonationPkey,
	}
}

type logImpersonationForeignKeys struct {
	LogImpersonationLogImpersonationImpersonatorIDFkey foreignKey
	LogImpersonationLogImpersonationTargetIDFkey       foreignKey
}

func (f logImpersonationForeignKeys) AsSlice() []foreignKey {
	return []foreignKey{
		f.LogImpersonationLogImpersonationImpersonatorIDFkey, f.LogImpersonationLogImpersonationTargetIDFkey,
	}
}

type logImpersonationUniques struct{}

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

type logImpersonationChecks struct{}

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