// Code generated by relspecgo. DO NOT EDIT. package generatedmodels import ( "fmt" resolvespec_common "github.com/bitechdev/ResolveSpec/pkg/spectypes" "github.com/uptrace/bun" ) type ModelPublicAgentPersonas struct { bun.BaseModel `bun:"table:public.agent_personas,alias:agent_personas"` ID resolvespec_common.SqlInt64 `bun:"id,type:bigserial,pk,autoincrement," json:"id"` CompiledAt resolvespec_common.SqlTimeStamp `bun:"compiled_at,type:timestamptz,nullzero," json:"compiled_at"` CompiledDetail resolvespec_common.SqlString `bun:"compiled_detail,type:text,default:'',notnull," json:"compiled_detail"` CompiledSummary resolvespec_common.SqlString `bun:"compiled_summary,type:text,default:'',notnull," json:"compiled_summary"` CreatedAt resolvespec_common.SqlTimeStamp `bun:"created_at,type:timestamptz,default:now(),notnull," json:"created_at"` Description resolvespec_common.SqlString `bun:"description,type:text,default:'',notnull," json:"description"` Detail resolvespec_common.SqlString `bun:"detail,type:text,default:'',notnull," json:"detail"` GUID resolvespec_common.SqlUUID `bun:"guid,type:uuid,default:gen_random_uuid(),notnull," json:"guid"` Name resolvespec_common.SqlString `bun:"name,type:text,notnull," json:"name"` Summary resolvespec_common.SqlString `bun:"summary,type:text,notnull," json:"summary"` Tags resolvespec_common.SqlStringArray `bun:"tags,type:text[],default:'{}',notnull," json:"tags"` UpdatedAt resolvespec_common.SqlTimeStamp `bun:"updated_at,type:timestamptz,default:now(),notnull," json:"updated_at"` RelPersonaIDPublicAgentPersonaParts []*ModelPublicAgentPersonaParts `bun:"rel:has-many,join:id=persona_id" json:"relpersonaidpublicagentpersonaparts,omitempty"` // Has many ModelPublicAgentPersonaParts RelPersonaIDPublicAgentPersonaSkills []*ModelPublicAgentPersonaSkills `bun:"rel:has-many,join:id=persona_id" json:"relpersonaidpublicagentpersonaskills,omitempty"` // Has many ModelPublicAgentPersonaSkills RelPersonaIDPublicAgentPersonaGuardrails []*ModelPublicAgentPersonaGuardrails `bun:"rel:has-many,join:id=persona_id" json:"relpersonaidpublicagentpersonaguardrails,omitempty"` // Has many ModelPublicAgentPersonaGuardrails RelPersonaIDPublicAgentPersonaTraits []*ModelPublicAgentPersonaTraits `bun:"rel:has-many,join:id=persona_id" json:"relpersonaidpublicagentpersonatraits,omitempty"` // Has many ModelPublicAgentPersonaTraits RelPersonaIDPublicPersonaArcs []*ModelPublicPersonaArc `bun:"rel:has-many,join:id=persona_id" json:"relpersonaidpublicpersonaarcs,omitempty"` // Has many ModelPublicPersonaArc } // TableName returns the table name for ModelPublicAgentPersonas func (m ModelPublicAgentPersonas) TableName() string { return "public.agent_personas" } // TableNameOnly returns the table name without schema for ModelPublicAgentPersonas func (m ModelPublicAgentPersonas) TableNameOnly() string { return "agent_personas" } // SchemaName returns the schema name for ModelPublicAgentPersonas func (m ModelPublicAgentPersonas) SchemaName() string { return "public" } // GetID returns the primary key value func (m ModelPublicAgentPersonas) GetID() int64 { return m.ID.Int64() } // GetIDStr returns the primary key as a string func (m ModelPublicAgentPersonas) GetIDStr() string { return fmt.Sprintf("%v", m.ID) } // SetID sets the primary key value func (m ModelPublicAgentPersonas) SetID(newid int64) { m.UpdateID(newid) } // UpdateID updates the primary key value func (m *ModelPublicAgentPersonas) UpdateID(newid int64) { m.ID.FromString(fmt.Sprintf("%d", newid)) } // GetIDName returns the name of the primary key column func (m ModelPublicAgentPersonas) GetIDName() string { return "id" } // GetPrefix returns the table prefix func (m ModelPublicAgentPersonas) GetPrefix() string { return "APG" }