nidus-sync/db/dbinfo/signal.bob.go

228 lines
4.8 KiB
Go
Raw Normal View History

2026-03-04 14:58:43 +00:00
// 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 Signals = Table[
signalColumns,
signalIndexes,
signalForeignKeys,
signalUniques,
signalChecks,
]{
Schema: "",
Name: "signal",
Columns: signalColumns{
Addressed: column{
Name: "addressed",
DBType: "timestamp without time zone",
Default: "NULL",
Comment: "",
Nullable: true,
Generated: false,
AutoIncr: false,
},
Addressor: column{
Name: "addressor",
DBType: "integer",
Default: "NULL",
Comment: "",
Nullable: true,
Generated: false,
AutoIncr: false,
},
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('signal_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,
},
Species: column{
Name: "species",
DBType: "public.mosquitospecies",
Default: "NULL",
Comment: "",
Nullable: true,
Generated: false,
AutoIncr: false,
},
Title: column{
Name: "title",
DBType: "text",
Default: "",
Comment: "",
Nullable: false,
Generated: false,
AutoIncr: false,
},
Type: column{
Name: "type_",
DBType: "public.signaltype",
Default: "",
Comment: "",
Nullable: false,
Generated: false,
AutoIncr: false,
},
SiteID: column{
Name: "site_id",
DBType: "integer",
Default: "NULL",
Comment: "",
Nullable: true,
Generated: false,
AutoIncr: false,
},
2026-03-04 14:58:43 +00:00
},
Indexes: signalIndexes{
SignalPkey: index{
Type: "btree",
Name: "signal_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: "signal_pkey",
Columns: []string{"id"},
Comment: "",
},
ForeignKeys: signalForeignKeys{
SignalSignalAddressorFkey: foreignKey{
constraint: constraint{
Name: "signal.signal_addressor_fkey",
Columns: []string{"addressor"},
Comment: "",
},
ForeignTable: "user_",
ForeignColumns: []string{"id"},
},
SignalSignalCreatorFkey: foreignKey{
constraint: constraint{
Name: "signal.signal_creator_fkey",
Columns: []string{"creator"},
Comment: "",
},
ForeignTable: "user_",
ForeignColumns: []string{"id"},
},
SignalSignalOrganizationIDFkey: foreignKey{
constraint: constraint{
Name: "signal.signal_organization_id_fkey",
Columns: []string{"organization_id"},
Comment: "",
},
ForeignTable: "organization",
ForeignColumns: []string{"id"},
},
SignalSignalSiteIDFkey: foreignKey{
constraint: constraint{
Name: "signal.signal_site_id_fkey",
Columns: []string{"site_id"},
Comment: "",
},
ForeignTable: "site",
ForeignColumns: []string{"id"},
},
2026-03-04 14:58:43 +00:00
},
Comment: "",
}
type signalColumns struct {
Addressed column
Addressor column
Created column
Creator column
ID column
OrganizationID column
Species column
Title column
Type column
SiteID column
2026-03-04 14:58:43 +00:00
}
func (c signalColumns) AsSlice() []column {
return []column{
c.Addressed, c.Addressor, c.Created, c.Creator, c.ID, c.OrganizationID, c.Species, c.Title, c.Type, c.SiteID,
2026-03-04 14:58:43 +00:00
}
}
type signalIndexes struct {
SignalPkey index
}
func (i signalIndexes) AsSlice() []index {
return []index{
i.SignalPkey,
}
}
type signalForeignKeys struct {
SignalSignalAddressorFkey foreignKey
SignalSignalCreatorFkey foreignKey
SignalSignalOrganizationIDFkey foreignKey
SignalSignalSiteIDFkey foreignKey
2026-03-04 14:58:43 +00:00
}
func (f signalForeignKeys) AsSlice() []foreignKey {
return []foreignKey{
f.SignalSignalAddressorFkey, f.SignalSignalCreatorFkey, f.SignalSignalOrganizationIDFkey, f.SignalSignalSiteIDFkey,
2026-03-04 14:58:43 +00:00
}
}
type signalUniques struct{}
func (u signalUniques) AsSlice() []constraint {
return []constraint{}
}
type signalChecks struct{}
func (c signalChecks) AsSlice() []check {
return []check{}
}