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

231 lines
5 KiB
Go

// 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 NoteImages = Table[
noteImageColumns,
noteImageIndexes,
noteImageForeignKeys,
noteImageUniques,
noteImageChecks,
]{
Schema: "",
Name: "note_image",
Columns: noteImageColumns{
Created: column{
Name: "created",
DBType: "timestamp without time zone",
Default: "",
Comment: "",
Nullable: false,
Generated: false,
AutoIncr: false,
},
CreatorID: column{
Name: "creator_id",
DBType: "integer",
Default: "",
Comment: "",
Nullable: false,
Generated: false,
AutoIncr: false,
},
Deleted: column{
Name: "deleted",
DBType: "timestamp without time zone",
Default: "NULL",
Comment: "",
Nullable: true,
Generated: false,
AutoIncr: false,
},
DeletorID: column{
Name: "deletor_id",
DBType: "integer",
Default: "NULL",
Comment: "",
Nullable: true,
Generated: false,
AutoIncr: false,
},
OrganizationID: column{
Name: "organization_id",
DBType: "integer",
Default: "",
Comment: "",
Nullable: false,
Generated: false,
AutoIncr: false,
},
Version: column{
Name: "version",
DBType: "integer",
Default: "",
Comment: "",
Nullable: false,
Generated: false,
AutoIncr: false,
},
UUID: column{
Name: "uuid",
DBType: "uuid",
Default: "",
Comment: "",
Nullable: false,
Generated: false,
AutoIncr: false,
},
ID: column{
Name: "id",
DBType: "integer",
Default: "IDENTITY",
Comment: "",
Nullable: false,
Generated: true,
AutoIncr: false,
},
},
Indexes: noteImageIndexes{
NoteImagePkey: index{
Type: "btree",
Name: "note_image_pkey",
Columns: []indexColumn{
{
Name: "version",
Desc: null.FromCond(false, true),
IsExpression: false,
},
{
Name: "uuid",
Desc: null.FromCond(false, true),
IsExpression: false,
},
},
Unique: true,
Comment: "",
NullsFirst: []bool{false, false},
NullsDistinct: false,
Where: "",
Include: []string{},
},
NoteImageIDUnique: index{
Type: "btree",
Name: "note_image_id_unique",
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: "note_image_pkey",
Columns: []string{"version", "uuid"},
Comment: "",
},
ForeignKeys: noteImageForeignKeys{
NoteImageNoteImageCreatorIDFkey: foreignKey{
constraint: constraint{
Name: "note_image.note_image_creator_id_fkey",
Columns: []string{"creator_id"},
Comment: "",
},
ForeignTable: "user_",
ForeignColumns: []string{"id"},
},
NoteImageNoteImageDeletorIDFkey: foreignKey{
constraint: constraint{
Name: "note_image.note_image_deletor_id_fkey",
Columns: []string{"deletor_id"},
Comment: "",
},
ForeignTable: "user_",
ForeignColumns: []string{"id"},
},
NoteImageNoteImageOrganizationIDFkey: foreignKey{
constraint: constraint{
Name: "note_image.note_image_organization_id_fkey",
Columns: []string{"organization_id"},
Comment: "",
},
ForeignTable: "organization",
ForeignColumns: []string{"id"},
},
},
Uniques: noteImageUniques{
NoteImageIDUnique: constraint{
Name: "note_image_id_unique",
Columns: []string{"id"},
Comment: "",
},
},
Comment: "",
}
type noteImageColumns struct {
Created column
CreatorID column
Deleted column
DeletorID column
OrganizationID column
Version column
UUID column
ID column
}
func (c noteImageColumns) AsSlice() []column {
return []column{
c.Created, c.CreatorID, c.Deleted, c.DeletorID, c.OrganizationID, c.Version, c.UUID, c.ID,
}
}
type noteImageIndexes struct {
NoteImagePkey index
NoteImageIDUnique index
}
func (i noteImageIndexes) AsSlice() []index {
return []index{
i.NoteImagePkey, i.NoteImageIDUnique,
}
}
type noteImageForeignKeys struct {
NoteImageNoteImageCreatorIDFkey foreignKey
NoteImageNoteImageDeletorIDFkey foreignKey
NoteImageNoteImageOrganizationIDFkey foreignKey
}
func (f noteImageForeignKeys) AsSlice() []foreignKey {
return []foreignKey{
f.NoteImageNoteImageCreatorIDFkey, f.NoteImageNoteImageDeletorIDFkey, f.NoteImageNoteImageOrganizationIDFkey,
}
}
type noteImageUniques struct {
NoteImageIDUnique constraint
}
func (u noteImageUniques) AsSlice() []constraint {
return []constraint{
u.NoteImageIDUnique,
}
}
type noteImageChecks struct{}
func (c noteImageChecks) AsSlice() []check {
return []check{}
}