// 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 Notifications = Table[
	notificationColumns,
	notificationIndexes,
	notificationForeignKeys,
	notificationUniques,
	notificationChecks,
]{
	Schema: "",
	Name:   "notification",
	Columns: notificationColumns{
		ID: column{
			Name:      "id",
			DBType:    "integer",
			Default:   "nextval('notification_id_seq'::regclass)",
			Comment:   "",
			Nullable:  false,
			Generated: false,
			AutoIncr:  false,
		},
		Created: column{
			Name:      "created",
			DBType:    "timestamp without time zone",
			Default:   "",
			Comment:   "",
			Nullable:  false,
			Generated: false,
			AutoIncr:  false,
		},
		Link: column{
			Name:      "link",
			DBType:    "text",
			Default:   "",
			Comment:   "",
			Nullable:  false,
			Generated: false,
			AutoIncr:  false,
		},
		Message: column{
			Name:      "message",
			DBType:    "text",
			Default:   "",
			Comment:   "",
			Nullable:  false,
			Generated: false,
			AutoIncr:  false,
		},
		Type: column{
			Name:      "type",
			DBType:    "public.notificationtype",
			Default:   "",
			Comment:   "",
			Nullable:  false,
			Generated: false,
			AutoIncr:  false,
		},
		UserID: column{
			Name:      "user_id",
			DBType:    "integer",
			Default:   "",
			Comment:   "",
			Nullable:  false,
			Generated: false,
			AutoIncr:  false,
		},
		ResolvedAt: column{
			Name:      "resolved_at",
			DBType:    "timestamp without time zone",
			Default:   "NULL",
			Comment:   "",
			Nullable:  true,
			Generated: false,
			AutoIncr:  false,
		},
	},
	Indexes: notificationIndexes{
		NotificationPkey: index{
			Type: "btree",
			Name: "notification_pkey",
			Columns: []indexColumn{
				{
					Name:         "id",
					Desc:         null.FromCond(false, true),
					IsExpression: false,
				},
			},
			Unique:        true,
			Comment:       "",
			NullsFirst:    []bool{false},
			NullsDistinct: false,
			Where:         "",
			Include:       []string{},
		},
		UniqueUserLinkNotResolved: index{
			Type: "btree",
			Name: "unique_user_link_not_resolved",
			Columns: []indexColumn{
				{
					Name:         "user_id",
					Desc:         null.FromCond(false, true),
					IsExpression: false,
				},
				{
					Name:         "link",
					Desc:         null.FromCond(false, true),
					IsExpression: false,
				},
			},
			Unique:        true,
			Comment:       "",
			NullsFirst:    []bool{false, false},
			NullsDistinct: false,
			Where:         "(resolved_at IS NULL)",
			Include:       []string{},
		},
	},
	PrimaryKey: &constraint{
		Name:    "notification_pkey",
		Columns: []string{"id"},
		Comment: "",
	},
	ForeignKeys: notificationForeignKeys{
		NotificationNotificationUserIDFkey: foreignKey{
			constraint: constraint{
				Name:    "notification.notification_user_id_fkey",
				Columns: []string{"user_id"},
				Comment: "",
			},
			ForeignTable:   "user_",
			ForeignColumns: []string{"id"},
		},
	},

	Comment: "",
}

type notificationColumns struct {
	ID         column
	Created    column
	Link       column
	Message    column
	Type       column
	UserID     column
	ResolvedAt column
}

func (c notificationColumns) AsSlice() []column {
	return []column{
		c.ID, c.Created, c.Link, c.Message, c.Type, c.UserID, c.ResolvedAt,
	}
}

type notificationIndexes struct {
	NotificationPkey          index
	UniqueUserLinkNotResolved index
}

func (i notificationIndexes) AsSlice() []index {
	return []index{
		i.NotificationPkey, i.UniqueUserLinkNotResolved,
	}
}

type notificationForeignKeys struct {
	NotificationNotificationUserIDFkey foreignKey
}

func (f notificationForeignKeys) AsSlice() []foreignKey {
	return []foreignKey{
		f.NotificationNotificationUserIDFkey,
	}
}

type notificationUniques struct{}

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

type notificationChecks struct{}

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