nidus-sync/dbinfo/notification.bob.go
Eli Ribble bf3dedf7cd
Pull notifications from the database
Previously we were storing them, just not showing them.
2025-11-11 22:53:48 +00:00

157 lines
3.1 KiB
Go

// Code generated by BobGen psql v0.41.1. 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,
},
},
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{},
},
},
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
}
func (c notificationColumns) AsSlice() []column {
return []column{
c.ID, c.Created, c.Link, c.Message, c.Type, c.UserID,
}
}
type notificationIndexes struct {
NotificationPkey index
}
func (i notificationIndexes) AsSlice() []index {
return []index{
i.NotificationPkey,
}
}
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{}
}