177 lines
3.5 KiB
Go
177 lines
3.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 Leads = Table[
|
|
leadColumns,
|
|
leadIndexes,
|
|
leadForeignKeys,
|
|
leadUniques,
|
|
leadChecks,
|
|
]{
|
|
Schema: "",
|
|
Name: "lead",
|
|
Columns: leadColumns{
|
|
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('lead_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,
|
|
},
|
|
SiteID: column{
|
|
Name: "site_id",
|
|
DBType: "integer",
|
|
Default: "NULL",
|
|
Comment: "",
|
|
Nullable: true,
|
|
Generated: false,
|
|
AutoIncr: false,
|
|
},
|
|
Type: column{
|
|
Name: "type_",
|
|
DBType: "public.leadtype",
|
|
Default: "",
|
|
Comment: "",
|
|
Nullable: false,
|
|
Generated: false,
|
|
AutoIncr: false,
|
|
},
|
|
},
|
|
Indexes: leadIndexes{
|
|
LeadPkey: index{
|
|
Type: "btree",
|
|
Name: "lead_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: "lead_pkey",
|
|
Columns: []string{"id"},
|
|
Comment: "",
|
|
},
|
|
ForeignKeys: leadForeignKeys{
|
|
LeadLeadCreatorFkey: foreignKey{
|
|
constraint: constraint{
|
|
Name: "lead.lead_creator_fkey",
|
|
Columns: []string{"creator"},
|
|
Comment: "",
|
|
},
|
|
ForeignTable: "user_",
|
|
ForeignColumns: []string{"id"},
|
|
},
|
|
LeadLeadOrganizationIDFkey: foreignKey{
|
|
constraint: constraint{
|
|
Name: "lead.lead_organization_id_fkey",
|
|
Columns: []string{"organization_id"},
|
|
Comment: "",
|
|
},
|
|
ForeignTable: "organization",
|
|
ForeignColumns: []string{"id"},
|
|
},
|
|
LeadLeadSiteIDFkey: foreignKey{
|
|
constraint: constraint{
|
|
Name: "lead.lead_site_id_fkey",
|
|
Columns: []string{"site_id"},
|
|
Comment: "",
|
|
},
|
|
ForeignTable: "site",
|
|
ForeignColumns: []string{"id"},
|
|
},
|
|
},
|
|
|
|
Comment: "",
|
|
}
|
|
|
|
type leadColumns struct {
|
|
Created column
|
|
Creator column
|
|
ID column
|
|
OrganizationID column
|
|
SiteID column
|
|
Type column
|
|
}
|
|
|
|
func (c leadColumns) AsSlice() []column {
|
|
return []column{
|
|
c.Created, c.Creator, c.ID, c.OrganizationID, c.SiteID, c.Type,
|
|
}
|
|
}
|
|
|
|
type leadIndexes struct {
|
|
LeadPkey index
|
|
}
|
|
|
|
func (i leadIndexes) AsSlice() []index {
|
|
return []index{
|
|
i.LeadPkey,
|
|
}
|
|
}
|
|
|
|
type leadForeignKeys struct {
|
|
LeadLeadCreatorFkey foreignKey
|
|
LeadLeadOrganizationIDFkey foreignKey
|
|
LeadLeadSiteIDFkey foreignKey
|
|
}
|
|
|
|
func (f leadForeignKeys) AsSlice() []foreignKey {
|
|
return []foreignKey{
|
|
f.LeadLeadCreatorFkey, f.LeadLeadOrganizationIDFkey, f.LeadLeadSiteIDFkey,
|
|
}
|
|
}
|
|
|
|
type leadUniques struct{}
|
|
|
|
func (u leadUniques) AsSlice() []constraint {
|
|
return []constraint{}
|
|
}
|
|
|
|
type leadChecks struct{}
|
|
|
|
func (c leadChecks) AsSlice() []check {
|
|
return []check{}
|
|
}
|