c179e014ad
CI / build-and-test (push) Failing after 1m52s
* Introduce project_personas table with foreign keys to projects and agent_personas * Add project_skills table with foreign key to projects and agent_skills * Include override boolean field in agent_persona_skills and project_skills * Update schema and migration files to reflect new tables and fields * Enhance CORS handling to reflect request origin
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 m.ID.String()
|
|
}
|
|
|
|
// 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"
|
|
}
|