// 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 ReviewTasks = Table[
	reviewTaskColumns,
	reviewTaskIndexes,
	reviewTaskForeignKeys,
	reviewTaskUniques,
	reviewTaskChecks,
]{
	Schema: "",
	Name:   "review_task",
	Columns: reviewTaskColumns{
		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:   "NULL",
			Comment:   "",
			Nullable:  true,
			Generated: false,
			AutoIncr:  false,
		},
		ID: column{
			Name:      "id",
			DBType:    "integer",
			Default:   "nextval('review_task_id_seq'::regclass)",
			Comment:   "",
			Nullable:  false,
			Generated: false,
			AutoIncr:  false,
		},
		OrganizationID: column{
			Name:      "organization_id",
			DBType:    "integer",
			Default:   "",
			Comment:   "",
			Nullable:  false,
			Generated: false,
			AutoIncr:  false,
		},
		Reviewed: column{
			Name:      "reviewed",
			DBType:    "timestamp without time zone",
			Default:   "NULL",
			Comment:   "",
			Nullable:  true,
			Generated: false,
			AutoIncr:  false,
		},
		ReviewerID: column{
			Name:      "reviewer_id",
			DBType:    "integer",
			Default:   "NULL",
			Comment:   "",
			Nullable:  true,
			Generated: false,
			AutoIncr:  false,
		},
		Resolution: column{
			Name:      "resolution",
			DBType:    "public.reviewtaskresolutiontype",
			Default:   "NULL",
			Comment:   "",
			Nullable:  true,
			Generated: false,
			AutoIncr:  false,
		},
	},
	Indexes: reviewTaskIndexes{
		ReviewTaskPkey: index{
			Type: "btree",
			Name: "review_task_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:    "review_task_pkey",
		Columns: []string{"id"},
		Comment: "",
	},
	ForeignKeys: reviewTaskForeignKeys{
		ReviewTaskReviewTaskCreatorIDFkey: foreignKey{
			constraint: constraint{
				Name:    "review_task.review_task_creator_id_fkey",
				Columns: []string{"creator_id"},
				Comment: "",
			},
			ForeignTable:   "user_",
			ForeignColumns: []string{"id"},
		},
		ReviewTaskReviewTaskOrganizationIDFkey: foreignKey{
			constraint: constraint{
				Name:    "review_task.review_task_organization_id_fkey",
				Columns: []string{"organization_id"},
				Comment: "",
			},
			ForeignTable:   "organization",
			ForeignColumns: []string{"id"},
		},
		ReviewTaskReviewTaskReviewerIDFkey: foreignKey{
			constraint: constraint{
				Name:    "review_task.review_task_reviewer_id_fkey",
				Columns: []string{"reviewer_id"},
				Comment: "",
			},
			ForeignTable:   "user_",
			ForeignColumns: []string{"id"},
		},
	},

	Comment: "",
}

type reviewTaskColumns struct {
	Created        column
	CreatorID      column
	ID             column
	OrganizationID column
	Reviewed       column
	ReviewerID     column
	Resolution     column
}

func (c reviewTaskColumns) AsSlice() []column {
	return []column{
		c.Created, c.CreatorID, c.ID, c.OrganizationID, c.Reviewed, c.ReviewerID, c.Resolution,
	}
}

type reviewTaskIndexes struct {
	ReviewTaskPkey index
}

func (i reviewTaskIndexes) AsSlice() []index {
	return []index{
		i.ReviewTaskPkey,
	}
}

type reviewTaskForeignKeys struct {
	ReviewTaskReviewTaskCreatorIDFkey      foreignKey
	ReviewTaskReviewTaskOrganizationIDFkey foreignKey
	ReviewTaskReviewTaskReviewerIDFkey     foreignKey
}

func (f reviewTaskForeignKeys) AsSlice() []foreignKey {
	return []foreignKey{
		f.ReviewTaskReviewTaskCreatorIDFkey, f.ReviewTaskReviewTaskOrganizationIDFkey, f.ReviewTaskReviewTaskReviewerIDFkey,
	}
}

type reviewTaskUniques struct{}

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

type reviewTaskChecks struct{}

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