// 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 ComplianceReportRequests = Table[
	complianceReportRequestColumns,
	complianceReportRequestIndexes,
	complianceReportRequestForeignKeys,
	complianceReportRequestUniques,
	complianceReportRequestChecks,
]{
	Schema: "",
	Name:   "compliance_report_request",
	Columns: complianceReportRequestColumns{
		Created: column{
			Name:      "created",
			DBType:    "timestamp without time zone",
			Default:   "",
			Comment:   "",
			Nullable:  false,
			Generated: false,
			AutoIncr:  false,
		},
		Creator: column{
			Name:      "creator",
			DBType:    "integer",
			Default:   "",
			Comment:   "",
			Nullable:  false,
			Generated: false,
			AutoIncr:  false,
		},
		ID: column{
			Name:      "id",
			DBType:    "integer",
			Default:   "nextval('compliance_report_request_id_seq'::regclass)",
			Comment:   "",
			Nullable:  false,
			Generated: false,
			AutoIncr:  false,
		},
		PublicID: column{
			Name:      "public_id",
			DBType:    "text",
			Default:   "",
			Comment:   "",
			Nullable:  false,
			Generated: false,
			AutoIncr:  false,
		},
		LeadID: column{
			Name:      "lead_id",
			DBType:    "integer",
			Default:   "NULL",
			Comment:   "",
			Nullable:  true,
			Generated: false,
			AutoIncr:  false,
		},
	},
	Indexes: complianceReportRequestIndexes{
		ComplianceReportRequestPkey: index{
			Type: "btree",
			Name: "compliance_report_request_pkey",
			Columns: []indexColumn{
				{
					Name:         "id",
					Desc:         null.FromCond(false, true),
					IsExpression: false,
				},
			},
			Unique:        true,
			Comment:       "",
			NullsFirst:    []bool{false},
			NullsDistinct: false,
			Where:         "",
			Include:       []string{},
		},
		ComplianceReportRequestPublicIDKey: index{
			Type: "btree",
			Name: "compliance_report_request_public_id_key",
			Columns: []indexColumn{
				{
					Name:         "public_id",
					Desc:         null.FromCond(false, true),
					IsExpression: false,
				},
			},
			Unique:        true,
			Comment:       "",
			NullsFirst:    []bool{false},
			NullsDistinct: false,
			Where:         "",
			Include:       []string{},
		},
	},
	PrimaryKey: &constraint{
		Name:    "compliance_report_request_pkey",
		Columns: []string{"id"},
		Comment: "",
	},
	ForeignKeys: complianceReportRequestForeignKeys{
		ComplianceReportRequestComplianceReportRequestCreatorFkey: foreignKey{
			constraint: constraint{
				Name:    "compliance_report_request.compliance_report_request_creator_fkey",
				Columns: []string{"creator"},
				Comment: "",
			},
			ForeignTable:   "user_",
			ForeignColumns: []string{"id"},
		},
		ComplianceReportRequestComplianceReportRequestLeadIDFkey: foreignKey{
			constraint: constraint{
				Name:    "compliance_report_request.compliance_report_request_lead_id_fkey",
				Columns: []string{"lead_id"},
				Comment: "",
			},
			ForeignTable:   "lead",
			ForeignColumns: []string{"id"},
		},
	},
	Uniques: complianceReportRequestUniques{
		ComplianceReportRequestPublicIDKey: constraint{
			Name:    "compliance_report_request_public_id_key",
			Columns: []string{"public_id"},
			Comment: "",
		},
	},

	Comment: "",
}

type complianceReportRequestColumns struct {
	Created  column
	Creator  column
	ID       column
	PublicID column
	LeadID   column
}

func (c complianceReportRequestColumns) AsSlice() []column {
	return []column{
		c.Created, c.Creator, c.ID, c.PublicID, c.LeadID,
	}
}

type complianceReportRequestIndexes struct {
	ComplianceReportRequestPkey        index
	ComplianceReportRequestPublicIDKey index
}

func (i complianceReportRequestIndexes) AsSlice() []index {
	return []index{
		i.ComplianceReportRequestPkey, i.ComplianceReportRequestPublicIDKey,
	}
}

type complianceReportRequestForeignKeys struct {
	ComplianceReportRequestComplianceReportRequestCreatorFkey foreignKey
	ComplianceReportRequestComplianceReportRequestLeadIDFkey  foreignKey
}

func (f complianceReportRequestForeignKeys) AsSlice() []foreignKey {
	return []foreignKey{
		f.ComplianceReportRequestComplianceReportRequestCreatorFkey, f.ComplianceReportRequestComplianceReportRequestLeadIDFkey,
	}
}

type complianceReportRequestUniques struct {
	ComplianceReportRequestPublicIDKey constraint
}

func (u complianceReportRequestUniques) AsSlice() []constraint {
	return []constraint{
		u.ComplianceReportRequestPublicIDKey,
	}
}

type complianceReportRequestChecks struct{}

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