a993859c62
CI / build-and-test (push) Has been cancelled
* Introduced oauth_clients table with fields for client_id, client_name, redirect_uris, and created_at. * Updated agent_persona_parts, agent_persona_skills, agent_persona_guardrails, agent_persona_traits, and arc_stage_parts tables to use unique constraints instead of primary keys for composite indexes.
63 lines
2.1 KiB
Go
63 lines
2.1 KiB
Go
// Code generated by relspecgo. DO NOT EDIT.
|
|
package generatedmodels
|
|
|
|
import (
|
|
"fmt"
|
|
resolvespec_common "github.com/bitechdev/ResolveSpec/pkg/spectypes"
|
|
"github.com/uptrace/bun"
|
|
)
|
|
|
|
type ModelPublicAgentPersonaTraits struct {
|
|
bun.BaseModel `bun:"table:public.agent_persona_traits,alias:agent_persona_traits"`
|
|
ID resolvespec_common.SqlInt64 `bun:"id,type:bigserial,pk,autoincrement," json:"id"`
|
|
PersonaID int64 `bun:"persona_id,type:bigint,notnull," json:"persona_id"`
|
|
TraitID int64 `bun:"trait_id,type:bigint,notnull," json:"trait_id"`
|
|
RelPersonaID *ModelPublicAgentPersonas `bun:"rel:has-one,join:persona_id=id" json:"relpersonaid,omitempty"` // Has one ModelPublicAgentPersonas
|
|
RelTraitID *ModelPublicAgentTraits `bun:"rel:has-one,join:trait_id=id" json:"reltraitid,omitempty"` // Has one ModelPublicAgentTraits
|
|
}
|
|
|
|
// TableName returns the table name for ModelPublicAgentPersonaTraits
|
|
func (m ModelPublicAgentPersonaTraits) TableName() string {
|
|
return "public.agent_persona_traits"
|
|
}
|
|
|
|
// TableNameOnly returns the table name without schema for ModelPublicAgentPersonaTraits
|
|
func (m ModelPublicAgentPersonaTraits) TableNameOnly() string {
|
|
return "agent_persona_traits"
|
|
}
|
|
|
|
// SchemaName returns the schema name for ModelPublicAgentPersonaTraits
|
|
func (m ModelPublicAgentPersonaTraits) SchemaName() string {
|
|
return "public"
|
|
}
|
|
|
|
// GetID returns the primary key value
|
|
func (m ModelPublicAgentPersonaTraits) GetID() int64 {
|
|
return m.ID.Int64()
|
|
}
|
|
|
|
// GetIDStr returns the primary key as a string
|
|
func (m ModelPublicAgentPersonaTraits) GetIDStr() string {
|
|
return fmt.Sprintf("%v", m.ID)
|
|
}
|
|
|
|
// SetID sets the primary key value
|
|
func (m ModelPublicAgentPersonaTraits) SetID(newid int64) {
|
|
m.UpdateID(newid)
|
|
}
|
|
|
|
// UpdateID updates the primary key value
|
|
func (m *ModelPublicAgentPersonaTraits) UpdateID(newid int64) {
|
|
m.ID.FromString(fmt.Sprintf("%d", newid))
|
|
}
|
|
|
|
// GetIDName returns the name of the primary key column
|
|
func (m ModelPublicAgentPersonaTraits) GetIDName() string {
|
|
return "id"
|
|
}
|
|
|
|
// GetPrefix returns the table prefix
|
|
func (m ModelPublicAgentPersonaTraits) GetPrefix() string {
|
|
return "APT"
|
|
}
|