// 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 FileuploadCSVS = Table[
	fileuploadCSVColumns,
	fileuploadCSVIndexes,
	fileuploadCSVForeignKeys,
	fileuploadCSVUniques,
	fileuploadCSVChecks,
]{
	Schema: "fileupload",
	Name:   "csv",
	Columns: fileuploadCSVColumns{
		Committed: column{
			Name:      "committed",
			DBType:    "timestamp without time zone",
			Default:   "NULL",
			Comment:   "",
			Nullable:  true,
			Generated: false,
			AutoIncr:  false,
		},
		FileID: column{
			Name:      "file_id",
			DBType:    "integer",
			Default:   "",
			Comment:   "",
			Nullable:  false,
			Generated: false,
			AutoIncr:  false,
		},
		Rowcount: column{
			Name:      "rowcount",
			DBType:    "integer",
			Default:   "",
			Comment:   "",
			Nullable:  false,
			Generated: false,
			AutoIncr:  false,
		},
		Type: column{
			Name:      "type_",
			DBType:    "fileupload.csvtype",
			Default:   "",
			Comment:   "",
			Nullable:  false,
			Generated: false,
			AutoIncr:  false,
		},
	},
	Indexes: fileuploadCSVIndexes{
		CSVPkey: index{
			Type: "btree",
			Name: "csv_pkey",
			Columns: []indexColumn{
				{
					Name:         "file_id",
					Desc:         null.FromCond(false, true),
					IsExpression: false,
				},
			},
			Unique:        true,
			Comment:       "",
			NullsFirst:    []bool{false},
			NullsDistinct: false,
			Where:         "",
			Include:       []string{},
		},
	},
	PrimaryKey: &constraint{
		Name:    "csv_pkey",
		Columns: []string{"file_id"},
		Comment: "",
	},
	ForeignKeys: fileuploadCSVForeignKeys{
		FileuploadCSVCSVFileIDFkey: foreignKey{
			constraint: constraint{
				Name:    "fileupload.csv.csv_file_id_fkey",
				Columns: []string{"file_id"},
				Comment: "",
			},
			ForeignTable:   "fileupload.file",
			ForeignColumns: []string{"id"},
		},
	},

	Comment: "",
}

type fileuploadCSVColumns struct {
	Committed column
	FileID    column
	Rowcount  column
	Type      column
}

func (c fileuploadCSVColumns) AsSlice() []column {
	return []column{
		c.Committed, c.FileID, c.Rowcount, c.Type,
	}
}

type fileuploadCSVIndexes struct {
	CSVPkey index
}

func (i fileuploadCSVIndexes) AsSlice() []index {
	return []index{
		i.CSVPkey,
	}
}

type fileuploadCSVForeignKeys struct {
	FileuploadCSVCSVFileIDFkey foreignKey
}

func (f fileuploadCSVForeignKeys) AsSlice() []foreignKey {
	return []foreignKey{
		f.FileuploadCSVCSVFileIDFkey,
	}
}

type fileuploadCSVUniques struct{}

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

type fileuploadCSVChecks struct{}

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