// 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 FileuploadFiles = Table[
	fileuploadFileColumns,
	fileuploadFileIndexes,
	fileuploadFileForeignKeys,
	fileuploadFileUniques,
	fileuploadFileChecks,
]{
	Schema: "fileupload",
	Name:   "file",
	Columns: fileuploadFileColumns{
		ID: column{
			Name:      "id",
			DBType:    "integer",
			Default:   "nextval('fileupload.file_id_seq'::regclass)",
			Comment:   "",
			Nullable:  false,
			Generated: false,
			AutoIncr:  false,
		},
		ContentType: column{
			Name:      "content_type",
			DBType:    "text",
			Default:   "",
			Comment:   "",
			Nullable:  false,
			Generated: false,
			AutoIncr:  false,
		},
		Created: column{
			Name:      "created",
			DBType:    "timestamp without time zone",
			Default:   "",
			Comment:   "",
			Nullable:  false,
			Generated: false,
			AutoIncr:  false,
		},
		CreatorID: column{
			Name:      "creator_id",
			DBType:    "integer",
			Default:   "",
			Comment:   "",
			Nullable:  false,
			Generated: false,
			AutoIncr:  false,
		},
		Deleted: column{
			Name:      "deleted",
			DBType:    "timestamp without time zone",
			Default:   "NULL",
			Comment:   "",
			Nullable:  true,
			Generated: false,
			AutoIncr:  false,
		},
		Name: column{
			Name:      "name",
			DBType:    "text",
			Default:   "",
			Comment:   "",
			Nullable:  false,
			Generated: false,
			AutoIncr:  false,
		},
		OrganizationID: column{
			Name:      "organization_id",
			DBType:    "integer",
			Default:   "",
			Comment:   "",
			Nullable:  false,
			Generated: false,
			AutoIncr:  false,
		},
		Status: column{
			Name:      "status",
			DBType:    "fileupload.filestatustype",
			Default:   "",
			Comment:   "",
			Nullable:  false,
			Generated: false,
			AutoIncr:  false,
		},
		SizeBytes: column{
			Name:      "size_bytes",
			DBType:    "integer",
			Default:   "",
			Comment:   "",
			Nullable:  false,
			Generated: false,
			AutoIncr:  false,
		},
		FileUUID: column{
			Name:      "file_uuid",
			DBType:    "uuid",
			Default:   "",
			Comment:   "",
			Nullable:  false,
			Generated: false,
			AutoIncr:  false,
		},
		Committer: column{
			Name:      "committer",
			DBType:    "integer",
			Default:   "NULL",
			Comment:   "",
			Nullable:  true,
			Generated: false,
			AutoIncr:  false,
		},
		Error: column{
			Name:      "error",
			DBType:    "text",
			Default:   "",
			Comment:   "",
			Nullable:  false,
			Generated: false,
			AutoIncr:  false,
		},
	},
	Indexes: fileuploadFileIndexes{
		FilePkey: index{
			Type: "btree",
			Name: "file_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:    "file_pkey",
		Columns: []string{"id"},
		Comment: "",
	},
	ForeignKeys: fileuploadFileForeignKeys{
		FileuploadFileFileCommitterFkey: foreignKey{
			constraint: constraint{
				Name:    "fileupload.file.file_committer_fkey",
				Columns: []string{"committer"},
				Comment: "",
			},
			ForeignTable:   "user_",
			ForeignColumns: []string{"id"},
		},
		FileuploadFileFileCreatorIDFkey: foreignKey{
			constraint: constraint{
				Name:    "fileupload.file.file_creator_id_fkey",
				Columns: []string{"creator_id"},
				Comment: "",
			},
			ForeignTable:   "user_",
			ForeignColumns: []string{"id"},
		},
		FileuploadFileFileOrganizationIDFkey: foreignKey{
			constraint: constraint{
				Name:    "fileupload.file.file_organization_id_fkey",
				Columns: []string{"organization_id"},
				Comment: "",
			},
			ForeignTable:   "organization",
			ForeignColumns: []string{"id"},
		},
	},

	Comment: "",
}

type fileuploadFileColumns struct {
	ID             column
	ContentType    column
	Created        column
	CreatorID      column
	Deleted        column
	Name           column
	OrganizationID column
	Status         column
	SizeBytes      column
	FileUUID       column
	Committer      column
	Error          column
}

func (c fileuploadFileColumns) AsSlice() []column {
	return []column{
		c.ID, c.ContentType, c.Created, c.CreatorID, c.Deleted, c.Name, c.OrganizationID, c.Status, c.SizeBytes, c.FileUUID, c.Committer, c.Error,
	}
}

type fileuploadFileIndexes struct {
	FilePkey index
}

func (i fileuploadFileIndexes) AsSlice() []index {
	return []index{
		i.FilePkey,
	}
}

type fileuploadFileForeignKeys struct {
	FileuploadFileFileCommitterFkey      foreignKey
	FileuploadFileFileCreatorIDFkey      foreignKey
	FileuploadFileFileOrganizationIDFkey foreignKey
}

func (f fileuploadFileForeignKeys) AsSlice() []foreignKey {
	return []foreignKey{
		f.FileuploadFileFileCommitterFkey, f.FileuploadFileFileCreatorIDFkey, f.FileuploadFileFileOrganizationIDFkey,
	}
}

type fileuploadFileUniques struct{}

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

type fileuploadFileChecks struct{}

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