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.
65 lines
2.3 KiB
Go
65 lines
2.3 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 ModelPublicAgentPersonaParts struct {
|
|
bun.BaseModel `bun:"table:public.agent_persona_parts,alias:agent_persona_parts"`
|
|
ID resolvespec_common.SqlInt64 `bun:"id,type:bigserial,pk,autoincrement," json:"id"`
|
|
PartID int64 `bun:"part_id,type:bigint,notnull," json:"part_id"`
|
|
PartOrder int32 `bun:"part_order,type:int,default:0,notnull," json:"part_order"`
|
|
PersonaID int64 `bun:"persona_id,type:bigint,notnull," json:"persona_id"`
|
|
Priority int32 `bun:"priority,type:int,default:0,notnull," json:"priority"`
|
|
RelPartID *ModelPublicAgentParts `bun:"rel:has-one,join:part_id=id" json:"relpartid,omitempty"` // Has one ModelPublicAgentParts
|
|
RelPersonaID *ModelPublicAgentPersonas `bun:"rel:has-one,join:persona_id=id" json:"relpersonaid,omitempty"` // Has one ModelPublicAgentPersonas
|
|
}
|
|
|
|
// TableName returns the table name for ModelPublicAgentPersonaParts
|
|
func (m ModelPublicAgentPersonaParts) TableName() string {
|
|
return "public.agent_persona_parts"
|
|
}
|
|
|
|
// TableNameOnly returns the table name without schema for ModelPublicAgentPersonaParts
|
|
func (m ModelPublicAgentPersonaParts) TableNameOnly() string {
|
|
return "agent_persona_parts"
|
|
}
|
|
|
|
// SchemaName returns the schema name for ModelPublicAgentPersonaParts
|
|
func (m ModelPublicAgentPersonaParts) SchemaName() string {
|
|
return "public"
|
|
}
|
|
|
|
// GetID returns the primary key value
|
|
func (m ModelPublicAgentPersonaParts) GetID() int64 {
|
|
return m.ID.Int64()
|
|
}
|
|
|
|
// GetIDStr returns the primary key as a string
|
|
func (m ModelPublicAgentPersonaParts) GetIDStr() string {
|
|
return fmt.Sprintf("%v", m.ID)
|
|
}
|
|
|
|
// SetID sets the primary key value
|
|
func (m ModelPublicAgentPersonaParts) SetID(newid int64) {
|
|
m.UpdateID(newid)
|
|
}
|
|
|
|
// UpdateID updates the primary key value
|
|
func (m *ModelPublicAgentPersonaParts) UpdateID(newid int64) {
|
|
m.ID.FromString(fmt.Sprintf("%d", newid))
|
|
}
|
|
|
|
// GetIDName returns the name of the primary key column
|
|
func (m ModelPublicAgentPersonaParts) GetIDName() string {
|
|
return "id"
|
|
}
|
|
|
|
// GetPrefix returns the table prefix
|
|
func (m ModelPublicAgentPersonaParts) GetPrefix() string {
|
|
return "APP"
|
|
}
|