nidus-sync/dbinfo/notification.bob.go
Eli Ribble a2e67e3d60
Add oauth token failure model and notification
This will allow me to mark when an oauth token fails and surface it to
the user so that they can re-up on their auth token.
2025-11-11 20:10:56 +00:00

147 lines
2.9 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,
},
UserID: column{
Name: "user_id",
DBType: "integer",
Default: "NULL",
Comment: "",
Nullable: true,
Generated: false,
AutoIncr: false,
},
Message: column{
Name: "message",
DBType: "text",
Default: "NULL",
Comment: "",
Nullable: true,
Generated: false,
AutoIncr: false,
},
Link: column{
Name: "link",
DBType: "text",
Default: "NULL",
Comment: "",
Nullable: true,
Generated: false,
AutoIncr: false,
},
Type: column{
Name: "type",
DBType: "public.notificationtype",
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{},
},
},
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
UserID column
Message column
Link column
Type column
}
func (c notificationColumns) AsSlice() []column {
return []column{
c.ID, c.UserID, c.Message, c.Link, c.Type,
}
}
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{}
}