// 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 ReportTexts = Table[
	reportTextColumns,
	reportTextIndexes,
	reportTextForeignKeys,
	reportTextUniques,
	reportTextChecks,
]{
	Schema: "",
	Name:   "report_text",
	Columns: reportTextColumns{
		CreatorID: column{
			Name:      "creator_id",
			DBType:    "integer",
			Default:   "",
			Comment:   "",
			Nullable:  false,
			Generated: false,
			AutoIncr:  false,
		},
		ReportID: column{
			Name:      "report_id",
			DBType:    "integer",
			Default:   "",
			Comment:   "",
			Nullable:  false,
			Generated: false,
			AutoIncr:  false,
		},
		TextLogID: column{
			Name:      "text_log_id",
			DBType:    "integer",
			Default:   "",
			Comment:   "",
			Nullable:  false,
			Generated: false,
			AutoIncr:  false,
		},
	},
	Indexes: reportTextIndexes{
		ReportTextPkey: index{
			Type: "btree",
			Name: "report_text_pkey",
			Columns: []indexColumn{
				{
					Name:         "creator_id",
					Desc:         null.FromCond(false, true),
					IsExpression: false,
				},
				{
					Name:         "report_id",
					Desc:         null.FromCond(false, true),
					IsExpression: false,
				},
				{
					Name:         "text_log_id",
					Desc:         null.FromCond(false, true),
					IsExpression: false,
				},
			},
			Unique:        true,
			Comment:       "",
			NullsFirst:    []bool{false, false, false},
			NullsDistinct: false,
			Where:         "",
			Include:       []string{},
		},
	},
	PrimaryKey: &constraint{
		Name:    "report_text_pkey",
		Columns: []string{"creator_id", "report_id", "text_log_id"},
		Comment: "",
	},
	ForeignKeys: reportTextForeignKeys{
		ReportTextReportTextCreatorIDFkey: foreignKey{
			constraint: constraint{
				Name:    "report_text.report_text_creator_id_fkey",
				Columns: []string{"creator_id"},
				Comment: "",
			},
			ForeignTable:   "user_",
			ForeignColumns: []string{"id"},
		},
		ReportTextReportTextReportIDFkey: foreignKey{
			constraint: constraint{
				Name:    "report_text.report_text_report_id_fkey",
				Columns: []string{"report_id"},
				Comment: "",
			},
			ForeignTable:   "publicreport.report",
			ForeignColumns: []string{"id"},
		},
		ReportTextReportTextTextLogIDFkey: foreignKey{
			constraint: constraint{
				Name:    "report_text.report_text_text_log_id_fkey",
				Columns: []string{"text_log_id"},
				Comment: "",
			},
			ForeignTable:   "comms.text_log",
			ForeignColumns: []string{"id"},
		},
	},

	Comment: "",
}

type reportTextColumns struct {
	CreatorID column
	ReportID  column
	TextLogID column
}

func (c reportTextColumns) AsSlice() []column {
	return []column{
		c.CreatorID, c.ReportID, c.TextLogID,
	}
}

type reportTextIndexes struct {
	ReportTextPkey index
}

func (i reportTextIndexes) AsSlice() []index {
	return []index{
		i.ReportTextPkey,
	}
}

type reportTextForeignKeys struct {
	ReportTextReportTextCreatorIDFkey foreignKey
	ReportTextReportTextReportIDFkey  foreignKey
	ReportTextReportTextTextLogIDFkey foreignKey
}

func (f reportTextForeignKeys) AsSlice() []foreignKey {
	return []foreignKey{
		f.ReportTextReportTextCreatorIDFkey, f.ReportTextReportTextReportIDFkey, f.ReportTextReportTextTextLogIDFkey,
	}
}

type reportTextUniques struct{}

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

type reportTextChecks struct{}

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