// Code generated by relspecgo. DO NOT EDIT. package generatedmodels import ( "fmt" resolvespec_common "github.com/bitechdev/ResolveSpec/pkg/spectypes" "github.com/uptrace/bun" ) type ModelPublicProfessionalContacts struct { bun.BaseModel `bun:"table:public.professional_contacts,alias:professional_contacts"` ID resolvespec_common.SqlUUID `bun:"id,type:uuid,pk,default:gen_random_uuid()," json:"id"` Company resolvespec_common.SqlString `bun:"company,type:text,nullzero," json:"company"` CreatedAt resolvespec_common.SqlTimeStamp `bun:"created_at,type:timestamptz,default:now(),notnull," json:"created_at"` Email resolvespec_common.SqlString `bun:"email,type:text,nullzero," json:"email"` FollowUpDate resolvespec_common.SqlDate `bun:"follow_up_date,type:date,nullzero," json:"follow_up_date"` HowWeMet resolvespec_common.SqlString `bun:"how_we_met,type:text,nullzero," json:"how_we_met"` LastContacted resolvespec_common.SqlTimeStamp `bun:"last_contacted,type:timestamptz,nullzero," json:"last_contacted"` LinkedinURL resolvespec_common.SqlString `bun:"linkedin_url,type:text,nullzero," json:"linkedin_url"` Name resolvespec_common.SqlString `bun:"name,type:text,notnull," json:"name"` Notes resolvespec_common.SqlString `bun:"notes,type:text,nullzero," json:"notes"` Phone resolvespec_common.SqlString `bun:"phone,type:text,nullzero," json:"phone"` Tags resolvespec_common.SqlString `bun:"tags,type:text,nullzero," json:"tags"` Title resolvespec_common.SqlString `bun:"title,type:text,nullzero," json:"title"` UpdatedAt resolvespec_common.SqlTimeStamp `bun:"updated_at,type:timestamptz,default:now(),notnull," json:"updated_at"` RelContactIDPublicContactInteractions []*ModelPublicContactInteractions `bun:"rel:has-many,join:id=contact_id" json:"relcontactidpubliccontactinteractions,omitempty"` // Has many ModelPublicContactInteractions RelContactIDPublicOpportunities []*ModelPublicOpportunities `bun:"rel:has-many,join:id=contact_id" json:"relcontactidpublicopportunities,omitempty"` // Has many ModelPublicOpportunities } // TableName returns the table name for ModelPublicProfessionalContacts func (m ModelPublicProfessionalContacts) TableName() string { return "public.professional_contacts" } // TableNameOnly returns the table name without schema for ModelPublicProfessionalContacts func (m ModelPublicProfessionalContacts) TableNameOnly() string { return "professional_contacts" } // SchemaName returns the schema name for ModelPublicProfessionalContacts func (m ModelPublicProfessionalContacts) SchemaName() string { return "public" } // GetID returns the primary key value func (m ModelPublicProfessionalContacts) GetID() int64 { return m.ID.Int64() } // GetIDStr returns the primary key as a string func (m ModelPublicProfessionalContacts) GetIDStr() string { return fmt.Sprintf("%v", m.ID) } // SetID sets the primary key value func (m ModelPublicProfessionalContacts) SetID(newid int64) { m.UpdateID(newid) } // UpdateID updates the primary key value func (m *ModelPublicProfessionalContacts) UpdateID(newid int64) { m.ID.FromString(fmt.Sprintf("%d", newid)) } // GetIDName returns the name of the primary key column func (m ModelPublicProfessionalContacts) GetIDName() string { return "id" } // GetPrefix returns the table prefix func (m ModelPublicProfessionalContacts) GetPrefix() string { return "PCR" }