Add schema for agent personas, parts, traits, and character arcs
Some checks failed
CI / build-and-test (push) Failing after -31m18s
Some checks failed
CI / build-and-test (push) Failing after -31m18s
- Created tables for agent_personas, agent_parts, agent_traits, and character_arcs. - Established relationships between personas, parts, skills, guardrails, and traits. - Added arc stages and their corresponding parts, along with a persona_arc table to track current stages. - Implemented cascading delete rules for referential integrity.
This commit is contained in:
@@ -8,18 +8,19 @@ import (
|
||||
)
|
||||
|
||||
type ModelPublicAgentGuardrails struct {
|
||||
bun.BaseModel `bun:"table:public.agent_guardrails,alias:agent_guardrails"`
|
||||
ID resolvespec_common.SqlInt64 `bun:"id,type:bigserial,pk,autoincrement," json:"id"`
|
||||
Content resolvespec_common.SqlString `bun:"content,type:text,notnull," json:"content"`
|
||||
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"`
|
||||
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"`
|
||||
Severity resolvespec_common.SqlString `bun:"severity,type:text,default:'medium',notnull," json:"severity"`
|
||||
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"`
|
||||
RelGuardrailIDPublicPlanGuardrails []*ModelPublicPlanGuardrails `bun:"rel:has-many,join:id=guardrail_id" json:"relguardrailidpublicplanguardrails,omitempty"` // Has many ModelPublicPlanGuardrails
|
||||
RelGuardrailIDPublicProjectGuardrails []*ModelPublicProjectGuardrails `bun:"rel:has-many,join:id=guardrail_id" json:"relguardrailidpublicprojectguardrails,omitempty"` // Has many ModelPublicProjectGuardrails
|
||||
bun.BaseModel `bun:"table:public.agent_guardrails,alias:agent_guardrails"`
|
||||
ID resolvespec_common.SqlInt64 `bun:"id,type:bigserial,pk,autoincrement," json:"id"`
|
||||
Content resolvespec_common.SqlString `bun:"content,type:text,notnull," json:"content"`
|
||||
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"`
|
||||
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"`
|
||||
Severity resolvespec_common.SqlString `bun:"severity,type:text,default:'medium',notnull," json:"severity"`
|
||||
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"`
|
||||
RelGuardrailIDPublicAgentPersonaGuardrails []*ModelPublicAgentPersonaGuardrails `bun:"rel:has-many,join:id=guardrail_id" json:"relguardrailidpublicagentpersonaguardrails,omitempty"` // Has many ModelPublicAgentPersonaGuardrails
|
||||
RelGuardrailIDPublicPlanGuardrails []*ModelPublicPlanGuardrails `bun:"rel:has-many,join:id=guardrail_id" json:"relguardrailidpublicplanguardrails,omitempty"` // Has many ModelPublicPlanGuardrails
|
||||
RelGuardrailIDPublicProjectGuardrails []*ModelPublicProjectGuardrails `bun:"rel:has-many,join:id=guardrail_id" json:"relguardrailidpublicprojectguardrails,omitempty"` // Has many ModelPublicProjectGuardrails
|
||||
}
|
||||
|
||||
// TableName returns the table name for ModelPublicAgentGuardrails
|
||||
|
||||
69
internal/generatedmodels/sql_public_agent_parts.go
Normal file
69
internal/generatedmodels/sql_public_agent_parts.go
Normal file
@@ -0,0 +1,69 @@
|
||||
// Code generated by relspecgo. DO NOT EDIT.
|
||||
package generatedmodels
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
resolvespec_common "github.com/bitechdev/ResolveSpec/pkg/spectypes"
|
||||
"github.com/uptrace/bun"
|
||||
)
|
||||
|
||||
type ModelPublicAgentParts struct {
|
||||
bun.BaseModel `bun:"table:public.agent_parts,alias:agent_parts"`
|
||||
ID resolvespec_common.SqlInt64 `bun:"id,type:bigserial,pk,autoincrement," json:"id"`
|
||||
Content resolvespec_common.SqlString `bun:"content,type:text,default:'',notnull," json:"content"`
|
||||
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"`
|
||||
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"`
|
||||
PartType resolvespec_common.SqlString `bun:"part_type,type:text,notnull," json:"part_type"`
|
||||
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"`
|
||||
RelPartIDPublicAgentPersonaParts []*ModelPublicAgentPersonaParts `bun:"rel:has-many,join:id=part_id" json:"relpartidpublicagentpersonaparts,omitempty"` // Has many ModelPublicAgentPersonaParts
|
||||
RelPartIDPublicArcStageParts []*ModelPublicArcStageParts `bun:"rel:has-many,join:id=part_id" json:"relpartidpublicarcstageparts,omitempty"` // Has many ModelPublicArcStageParts
|
||||
}
|
||||
|
||||
// TableName returns the table name for ModelPublicAgentParts
|
||||
func (m ModelPublicAgentParts) TableName() string {
|
||||
return "public.agent_parts"
|
||||
}
|
||||
|
||||
// TableNameOnly returns the table name without schema for ModelPublicAgentParts
|
||||
func (m ModelPublicAgentParts) TableNameOnly() string {
|
||||
return "agent_parts"
|
||||
}
|
||||
|
||||
// SchemaName returns the schema name for ModelPublicAgentParts
|
||||
func (m ModelPublicAgentParts) SchemaName() string {
|
||||
return "public"
|
||||
}
|
||||
|
||||
// GetID returns the primary key value
|
||||
func (m ModelPublicAgentParts) GetID() int64 {
|
||||
return m.ID.Int64()
|
||||
}
|
||||
|
||||
// GetIDStr returns the primary key as a string
|
||||
func (m ModelPublicAgentParts) GetIDStr() string {
|
||||
return fmt.Sprintf("%v", m.ID)
|
||||
}
|
||||
|
||||
// SetID sets the primary key value
|
||||
func (m ModelPublicAgentParts) SetID(newid int64) {
|
||||
m.UpdateID(newid)
|
||||
}
|
||||
|
||||
// UpdateID updates the primary key value
|
||||
func (m *ModelPublicAgentParts) UpdateID(newid int64) {
|
||||
m.ID.FromString(fmt.Sprintf("%d", newid))
|
||||
}
|
||||
|
||||
// GetIDName returns the name of the primary key column
|
||||
func (m ModelPublicAgentParts) GetIDName() string {
|
||||
return "id"
|
||||
}
|
||||
|
||||
// GetPrefix returns the table prefix
|
||||
func (m ModelPublicAgentParts) GetPrefix() string {
|
||||
return "APG"
|
||||
}
|
||||
@@ -0,0 +1,34 @@
|
||||
// Code generated by relspecgo. DO NOT EDIT.
|
||||
package generatedmodels
|
||||
|
||||
import (
|
||||
"github.com/uptrace/bun"
|
||||
)
|
||||
|
||||
type ModelPublicAgentPersonaGuardrails struct {
|
||||
bun.BaseModel `bun:"table:public.agent_persona_guardrails,alias:agent_persona_guardrails"`
|
||||
GuardrailID int64 `bun:"guardrail_id,type:bigint,notnull," json:"guardrail_id"`
|
||||
PersonaID int64 `bun:"persona_id,type:bigint,notnull," json:"persona_id"`
|
||||
RelGuardrailID *ModelPublicAgentGuardrails `bun:"rel:has-one,join:guardrail_id=id" json:"relguardrailid,omitempty"` // Has one ModelPublicAgentGuardrails
|
||||
RelPersonaID *ModelPublicAgentPersonas `bun:"rel:has-one,join:persona_id=id" json:"relpersonaid,omitempty"` // Has one ModelPublicAgentPersonas
|
||||
}
|
||||
|
||||
// TableName returns the table name for ModelPublicAgentPersonaGuardrails
|
||||
func (m ModelPublicAgentPersonaGuardrails) TableName() string {
|
||||
return "public.agent_persona_guardrails"
|
||||
}
|
||||
|
||||
// TableNameOnly returns the table name without schema for ModelPublicAgentPersonaGuardrails
|
||||
func (m ModelPublicAgentPersonaGuardrails) TableNameOnly() string {
|
||||
return "agent_persona_guardrails"
|
||||
}
|
||||
|
||||
// SchemaName returns the schema name for ModelPublicAgentPersonaGuardrails
|
||||
func (m ModelPublicAgentPersonaGuardrails) SchemaName() string {
|
||||
return "public"
|
||||
}
|
||||
|
||||
// GetPrefix returns the table prefix
|
||||
func (m ModelPublicAgentPersonaGuardrails) GetPrefix() string {
|
||||
return "APG"
|
||||
}
|
||||
36
internal/generatedmodels/sql_public_agent_persona_parts.go
Normal file
36
internal/generatedmodels/sql_public_agent_persona_parts.go
Normal file
@@ -0,0 +1,36 @@
|
||||
// Code generated by relspecgo. DO NOT EDIT.
|
||||
package generatedmodels
|
||||
|
||||
import (
|
||||
"github.com/uptrace/bun"
|
||||
)
|
||||
|
||||
type ModelPublicAgentPersonaParts struct {
|
||||
bun.BaseModel `bun:"table:public.agent_persona_parts,alias:agent_persona_parts"`
|
||||
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"
|
||||
}
|
||||
|
||||
// GetPrefix returns the table prefix
|
||||
func (m ModelPublicAgentPersonaParts) GetPrefix() string {
|
||||
return "APP"
|
||||
}
|
||||
34
internal/generatedmodels/sql_public_agent_persona_skills.go
Normal file
34
internal/generatedmodels/sql_public_agent_persona_skills.go
Normal file
@@ -0,0 +1,34 @@
|
||||
// Code generated by relspecgo. DO NOT EDIT.
|
||||
package generatedmodels
|
||||
|
||||
import (
|
||||
"github.com/uptrace/bun"
|
||||
)
|
||||
|
||||
type ModelPublicAgentPersonaSkills struct {
|
||||
bun.BaseModel `bun:"table:public.agent_persona_skills,alias:agent_persona_skills"`
|
||||
PersonaID int64 `bun:"persona_id,type:bigint,notnull," json:"persona_id"`
|
||||
SkillID int64 `bun:"skill_id,type:bigint,notnull," json:"skill_id"`
|
||||
RelPersonaID *ModelPublicAgentPersonas `bun:"rel:has-one,join:persona_id=id" json:"relpersonaid,omitempty"` // Has one ModelPublicAgentPersonas
|
||||
RelSkillID *ModelPublicAgentSkills `bun:"rel:has-one,join:skill_id=id" json:"relskillid,omitempty"` // Has one ModelPublicAgentSkills
|
||||
}
|
||||
|
||||
// TableName returns the table name for ModelPublicAgentPersonaSkills
|
||||
func (m ModelPublicAgentPersonaSkills) TableName() string {
|
||||
return "public.agent_persona_skills"
|
||||
}
|
||||
|
||||
// TableNameOnly returns the table name without schema for ModelPublicAgentPersonaSkills
|
||||
func (m ModelPublicAgentPersonaSkills) TableNameOnly() string {
|
||||
return "agent_persona_skills"
|
||||
}
|
||||
|
||||
// SchemaName returns the schema name for ModelPublicAgentPersonaSkills
|
||||
func (m ModelPublicAgentPersonaSkills) SchemaName() string {
|
||||
return "public"
|
||||
}
|
||||
|
||||
// GetPrefix returns the table prefix
|
||||
func (m ModelPublicAgentPersonaSkills) GetPrefix() string {
|
||||
return "APS"
|
||||
}
|
||||
34
internal/generatedmodels/sql_public_agent_persona_traits.go
Normal file
34
internal/generatedmodels/sql_public_agent_persona_traits.go
Normal file
@@ -0,0 +1,34 @@
|
||||
// Code generated by relspecgo. DO NOT EDIT.
|
||||
package generatedmodels
|
||||
|
||||
import (
|
||||
"github.com/uptrace/bun"
|
||||
)
|
||||
|
||||
type ModelPublicAgentPersonaTraits struct {
|
||||
bun.BaseModel `bun:"table:public.agent_persona_traits,alias:agent_persona_traits"`
|
||||
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"
|
||||
}
|
||||
|
||||
// GetPrefix returns the table prefix
|
||||
func (m ModelPublicAgentPersonaTraits) GetPrefix() string {
|
||||
return "APT"
|
||||
}
|
||||
74
internal/generatedmodels/sql_public_agent_personas.go
Normal file
74
internal/generatedmodels/sql_public_agent_personas.go
Normal file
@@ -0,0 +1,74 @@
|
||||
// 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"
|
||||
}
|
||||
@@ -8,22 +8,23 @@ import (
|
||||
)
|
||||
|
||||
type ModelPublicAgentSkills struct {
|
||||
bun.BaseModel `bun:"table:public.agent_skills,alias:agent_skills"`
|
||||
ID resolvespec_common.SqlInt64 `bun:"id,type:bigserial,pk,autoincrement," json:"id"`
|
||||
Content resolvespec_common.SqlString `bun:"content,type:text,notnull," json:"content"`
|
||||
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"`
|
||||
DomainTags resolvespec_common.SqlStringArray `bun:"domain_tags,type:text[],default:'{}',notnull," json:"domain_tags"`
|
||||
FrameworkTags resolvespec_common.SqlStringArray `bun:"framework_tags,type:text[],default:'{}',notnull," json:"framework_tags"`
|
||||
GUID resolvespec_common.SqlUUID `bun:"guid,type:uuid,default:gen_random_uuid(),notnull," json:"guid"`
|
||||
LanguageTags resolvespec_common.SqlStringArray `bun:"language_tags,type:text[],default:'{}',notnull," json:"language_tags"`
|
||||
LibraryTags resolvespec_common.SqlStringArray `bun:"library_tags,type:text[],default:'{}',notnull," json:"library_tags"`
|
||||
Name resolvespec_common.SqlString `bun:"name,type:text,notnull," json:"name"`
|
||||
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"`
|
||||
RelRelatedSkillIDPublicLearnings []*ModelPublicLearnings `bun:"rel:has-many,join:id=related_skill_id" json:"relrelatedskillidpubliclearnings,omitempty"` // Has many ModelPublicLearnings
|
||||
RelSkillIDPublicPlanSkills []*ModelPublicPlanSkills `bun:"rel:has-many,join:id=skill_id" json:"relskillidpublicplanskills,omitempty"` // Has many ModelPublicPlanSkills
|
||||
RelSkillIDPublicProjectSkills []*ModelPublicProjectSkills `bun:"rel:has-many,join:id=skill_id" json:"relskillidpublicprojectskills,omitempty"` // Has many ModelPublicProjectSkills
|
||||
bun.BaseModel `bun:"table:public.agent_skills,alias:agent_skills"`
|
||||
ID resolvespec_common.SqlInt64 `bun:"id,type:bigserial,pk,autoincrement," json:"id"`
|
||||
Content resolvespec_common.SqlString `bun:"content,type:text,notnull," json:"content"`
|
||||
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"`
|
||||
DomainTags resolvespec_common.SqlStringArray `bun:"domain_tags,type:text[],default:'{}',notnull," json:"domain_tags"`
|
||||
FrameworkTags resolvespec_common.SqlStringArray `bun:"framework_tags,type:text[],default:'{}',notnull," json:"framework_tags"`
|
||||
GUID resolvespec_common.SqlUUID `bun:"guid,type:uuid,default:gen_random_uuid(),notnull," json:"guid"`
|
||||
LanguageTags resolvespec_common.SqlStringArray `bun:"language_tags,type:text[],default:'{}',notnull," json:"language_tags"`
|
||||
LibraryTags resolvespec_common.SqlStringArray `bun:"library_tags,type:text[],default:'{}',notnull," json:"library_tags"`
|
||||
Name resolvespec_common.SqlString `bun:"name,type:text,notnull," json:"name"`
|
||||
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"`
|
||||
RelSkillIDPublicAgentPersonaSkills []*ModelPublicAgentPersonaSkills `bun:"rel:has-many,join:id=skill_id" json:"relskillidpublicagentpersonaskills,omitempty"` // Has many ModelPublicAgentPersonaSkills
|
||||
RelRelatedSkillIDPublicLearnings []*ModelPublicLearnings `bun:"rel:has-many,join:id=related_skill_id" json:"relrelatedskillidpubliclearnings,omitempty"` // Has many ModelPublicLearnings
|
||||
RelSkillIDPublicPlanSkills []*ModelPublicPlanSkills `bun:"rel:has-many,join:id=skill_id" json:"relskillidpublicplanskills,omitempty"` // Has many ModelPublicPlanSkills
|
||||
RelSkillIDPublicProjectSkills []*ModelPublicProjectSkills `bun:"rel:has-many,join:id=skill_id" json:"relskillidpublicprojectskills,omitempty"` // Has many ModelPublicProjectSkills
|
||||
}
|
||||
|
||||
// TableName returns the table name for ModelPublicAgentSkills
|
||||
|
||||
67
internal/generatedmodels/sql_public_agent_traits.go
Normal file
67
internal/generatedmodels/sql_public_agent_traits.go
Normal file
@@ -0,0 +1,67 @@
|
||||
// Code generated by relspecgo. DO NOT EDIT.
|
||||
package generatedmodels
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
resolvespec_common "github.com/bitechdev/ResolveSpec/pkg/spectypes"
|
||||
"github.com/uptrace/bun"
|
||||
)
|
||||
|
||||
type ModelPublicAgentTraits struct {
|
||||
bun.BaseModel `bun:"table:public.agent_traits,alias:agent_traits"`
|
||||
ID resolvespec_common.SqlInt64 `bun:"id,type:bigserial,pk,autoincrement," json:"id"`
|
||||
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"`
|
||||
GUID resolvespec_common.SqlUUID `bun:"guid,type:uuid,default:gen_random_uuid(),notnull," json:"guid"`
|
||||
Instruction resolvespec_common.SqlString `bun:"instruction,type:text,default:'',notnull," json:"instruction"`
|
||||
Name resolvespec_common.SqlString `bun:"name,type:text,notnull," json:"name"`
|
||||
Tags resolvespec_common.SqlStringArray `bun:"tags,type:text[],default:'{}',notnull," json:"tags"`
|
||||
TraitType resolvespec_common.SqlString `bun:"trait_type,type:text,notnull," json:"trait_type"`
|
||||
UpdatedAt resolvespec_common.SqlTimeStamp `bun:"updated_at,type:timestamptz,default:now(),notnull," json:"updated_at"`
|
||||
RelTraitIDPublicAgentPersonaTraits []*ModelPublicAgentPersonaTraits `bun:"rel:has-many,join:id=trait_id" json:"reltraitidpublicagentpersonatraits,omitempty"` // Has many ModelPublicAgentPersonaTraits
|
||||
}
|
||||
|
||||
// TableName returns the table name for ModelPublicAgentTraits
|
||||
func (m ModelPublicAgentTraits) TableName() string {
|
||||
return "public.agent_traits"
|
||||
}
|
||||
|
||||
// TableNameOnly returns the table name without schema for ModelPublicAgentTraits
|
||||
func (m ModelPublicAgentTraits) TableNameOnly() string {
|
||||
return "agent_traits"
|
||||
}
|
||||
|
||||
// SchemaName returns the schema name for ModelPublicAgentTraits
|
||||
func (m ModelPublicAgentTraits) SchemaName() string {
|
||||
return "public"
|
||||
}
|
||||
|
||||
// GetID returns the primary key value
|
||||
func (m ModelPublicAgentTraits) GetID() int64 {
|
||||
return m.ID.Int64()
|
||||
}
|
||||
|
||||
// GetIDStr returns the primary key as a string
|
||||
func (m ModelPublicAgentTraits) GetIDStr() string {
|
||||
return fmt.Sprintf("%v", m.ID)
|
||||
}
|
||||
|
||||
// SetID sets the primary key value
|
||||
func (m ModelPublicAgentTraits) SetID(newid int64) {
|
||||
m.UpdateID(newid)
|
||||
}
|
||||
|
||||
// UpdateID updates the primary key value
|
||||
func (m *ModelPublicAgentTraits) UpdateID(newid int64) {
|
||||
m.ID.FromString(fmt.Sprintf("%d", newid))
|
||||
}
|
||||
|
||||
// GetIDName returns the name of the primary key column
|
||||
func (m ModelPublicAgentTraits) GetIDName() string {
|
||||
return "id"
|
||||
}
|
||||
|
||||
// GetPrefix returns the table prefix
|
||||
func (m ModelPublicAgentTraits) GetPrefix() string {
|
||||
return "ATG"
|
||||
}
|
||||
34
internal/generatedmodels/sql_public_arc_stage_parts.go
Normal file
34
internal/generatedmodels/sql_public_arc_stage_parts.go
Normal file
@@ -0,0 +1,34 @@
|
||||
// Code generated by relspecgo. DO NOT EDIT.
|
||||
package generatedmodels
|
||||
|
||||
import (
|
||||
"github.com/uptrace/bun"
|
||||
)
|
||||
|
||||
type ModelPublicArcStageParts struct {
|
||||
bun.BaseModel `bun:"table:public.arc_stage_parts,alias:arc_stage_parts"`
|
||||
PartID int64 `bun:"part_id,type:bigint,notnull," json:"part_id"`
|
||||
StageID int64 `bun:"stage_id,type:bigint,notnull," json:"stage_id"`
|
||||
RelPartID *ModelPublicAgentParts `bun:"rel:has-one,join:part_id=id" json:"relpartid,omitempty"` // Has one ModelPublicAgentParts
|
||||
RelStageID *ModelPublicArcStages `bun:"rel:has-one,join:stage_id=id" json:"relstageid,omitempty"` // Has one ModelPublicArcStages
|
||||
}
|
||||
|
||||
// TableName returns the table name for ModelPublicArcStageParts
|
||||
func (m ModelPublicArcStageParts) TableName() string {
|
||||
return "public.arc_stage_parts"
|
||||
}
|
||||
|
||||
// TableNameOnly returns the table name without schema for ModelPublicArcStageParts
|
||||
func (m ModelPublicArcStageParts) TableNameOnly() string {
|
||||
return "arc_stage_parts"
|
||||
}
|
||||
|
||||
// SchemaName returns the schema name for ModelPublicArcStageParts
|
||||
func (m ModelPublicArcStageParts) SchemaName() string {
|
||||
return "public"
|
||||
}
|
||||
|
||||
// GetPrefix returns the table prefix
|
||||
func (m ModelPublicArcStageParts) GetPrefix() string {
|
||||
return "ASP"
|
||||
}
|
||||
67
internal/generatedmodels/sql_public_arc_stages.go
Normal file
67
internal/generatedmodels/sql_public_arc_stages.go
Normal file
@@ -0,0 +1,67 @@
|
||||
// Code generated by relspecgo. DO NOT EDIT.
|
||||
package generatedmodels
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
resolvespec_common "github.com/bitechdev/ResolveSpec/pkg/spectypes"
|
||||
"github.com/uptrace/bun"
|
||||
)
|
||||
|
||||
type ModelPublicArcStages struct {
|
||||
bun.BaseModel `bun:"table:public.arc_stages,alias:arc_stages"`
|
||||
ID resolvespec_common.SqlInt64 `bun:"id,type:bigserial,pk,autoincrement," json:"id"`
|
||||
ArcID int64 `bun:"arc_id,type:bigint,notnull," json:"arc_id"`
|
||||
Condition resolvespec_common.SqlString `bun:"condition,type:text,default:'',notnull," json:"condition"`
|
||||
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"`
|
||||
Name resolvespec_common.SqlString `bun:"name,type:text,notnull," json:"name"`
|
||||
StageOrder int32 `bun:"stage_order,type:int,default:0,notnull," json:"stage_order"`
|
||||
RelArcID *ModelPublicCharacterArcs `bun:"rel:has-one,join:arc_id=id" json:"relarcid,omitempty"` // Has one ModelPublicCharacterArcs
|
||||
RelStageIDPublicArcStageParts []*ModelPublicArcStageParts `bun:"rel:has-many,join:id=stage_id" json:"relstageidpublicarcstageparts,omitempty"` // Has many ModelPublicArcStageParts
|
||||
RelCurrentStageIDPublicPersonaArcs []*ModelPublicPersonaArc `bun:"rel:has-many,join:id=current_stage_id" json:"relcurrentstageidpublicpersonaarcs,omitempty"` // Has many ModelPublicPersonaArc
|
||||
}
|
||||
|
||||
// TableName returns the table name for ModelPublicArcStages
|
||||
func (m ModelPublicArcStages) TableName() string {
|
||||
return "public.arc_stages"
|
||||
}
|
||||
|
||||
// TableNameOnly returns the table name without schema for ModelPublicArcStages
|
||||
func (m ModelPublicArcStages) TableNameOnly() string {
|
||||
return "arc_stages"
|
||||
}
|
||||
|
||||
// SchemaName returns the schema name for ModelPublicArcStages
|
||||
func (m ModelPublicArcStages) SchemaName() string {
|
||||
return "public"
|
||||
}
|
||||
|
||||
// GetID returns the primary key value
|
||||
func (m ModelPublicArcStages) GetID() int64 {
|
||||
return m.ID.Int64()
|
||||
}
|
||||
|
||||
// GetIDStr returns the primary key as a string
|
||||
func (m ModelPublicArcStages) GetIDStr() string {
|
||||
return fmt.Sprintf("%v", m.ID)
|
||||
}
|
||||
|
||||
// SetID sets the primary key value
|
||||
func (m ModelPublicArcStages) SetID(newid int64) {
|
||||
m.UpdateID(newid)
|
||||
}
|
||||
|
||||
// UpdateID updates the primary key value
|
||||
func (m *ModelPublicArcStages) UpdateID(newid int64) {
|
||||
m.ID.FromString(fmt.Sprintf("%d", newid))
|
||||
}
|
||||
|
||||
// GetIDName returns the name of the primary key column
|
||||
func (m ModelPublicArcStages) GetIDName() string {
|
||||
return "id"
|
||||
}
|
||||
|
||||
// GetPrefix returns the table prefix
|
||||
func (m ModelPublicArcStages) GetPrefix() string {
|
||||
return "ASR"
|
||||
}
|
||||
65
internal/generatedmodels/sql_public_character_arcs.go
Normal file
65
internal/generatedmodels/sql_public_character_arcs.go
Normal file
@@ -0,0 +1,65 @@
|
||||
// Code generated by relspecgo. DO NOT EDIT.
|
||||
package generatedmodels
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
resolvespec_common "github.com/bitechdev/ResolveSpec/pkg/spectypes"
|
||||
"github.com/uptrace/bun"
|
||||
)
|
||||
|
||||
type ModelPublicCharacterArcs struct {
|
||||
bun.BaseModel `bun:"table:public.character_arcs,alias:character_arcs"`
|
||||
ID resolvespec_common.SqlInt64 `bun:"id,type:bigserial,pk,autoincrement," json:"id"`
|
||||
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"`
|
||||
Name resolvespec_common.SqlString `bun:"name,type:text,notnull," json:"name"`
|
||||
Summary resolvespec_common.SqlString `bun:"summary,type:text,default:'',notnull," json:"summary"`
|
||||
UpdatedAt resolvespec_common.SqlTimeStamp `bun:"updated_at,type:timestamptz,default:now(),notnull," json:"updated_at"`
|
||||
RelArcIDPublicArcStages []*ModelPublicArcStages `bun:"rel:has-many,join:id=arc_id" json:"relarcidpublicarcstages,omitempty"` // Has many ModelPublicArcStages
|
||||
RelArcIDPublicPersonaArcs []*ModelPublicPersonaArc `bun:"rel:has-many,join:id=arc_id" json:"relarcidpublicpersonaarcs,omitempty"` // Has many ModelPublicPersonaArc
|
||||
}
|
||||
|
||||
// TableName returns the table name for ModelPublicCharacterArcs
|
||||
func (m ModelPublicCharacterArcs) TableName() string {
|
||||
return "public.character_arcs"
|
||||
}
|
||||
|
||||
// TableNameOnly returns the table name without schema for ModelPublicCharacterArcs
|
||||
func (m ModelPublicCharacterArcs) TableNameOnly() string {
|
||||
return "character_arcs"
|
||||
}
|
||||
|
||||
// SchemaName returns the schema name for ModelPublicCharacterArcs
|
||||
func (m ModelPublicCharacterArcs) SchemaName() string {
|
||||
return "public"
|
||||
}
|
||||
|
||||
// GetID returns the primary key value
|
||||
func (m ModelPublicCharacterArcs) GetID() int64 {
|
||||
return m.ID.Int64()
|
||||
}
|
||||
|
||||
// GetIDStr returns the primary key as a string
|
||||
func (m ModelPublicCharacterArcs) GetIDStr() string {
|
||||
return fmt.Sprintf("%v", m.ID)
|
||||
}
|
||||
|
||||
// SetID sets the primary key value
|
||||
func (m ModelPublicCharacterArcs) SetID(newid int64) {
|
||||
m.UpdateID(newid)
|
||||
}
|
||||
|
||||
// UpdateID updates the primary key value
|
||||
func (m *ModelPublicCharacterArcs) UpdateID(newid int64) {
|
||||
m.ID.FromString(fmt.Sprintf("%d", newid))
|
||||
}
|
||||
|
||||
// GetIDName returns the name of the primary key column
|
||||
func (m ModelPublicCharacterArcs) GetIDName() string {
|
||||
return "id"
|
||||
}
|
||||
|
||||
// GetPrefix returns the table prefix
|
||||
func (m ModelPublicCharacterArcs) GetPrefix() string {
|
||||
return "CAH"
|
||||
}
|
||||
64
internal/generatedmodels/sql_public_persona_arc.go
Normal file
64
internal/generatedmodels/sql_public_persona_arc.go
Normal file
@@ -0,0 +1,64 @@
|
||||
// Code generated by relspecgo. DO NOT EDIT.
|
||||
package generatedmodels
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
resolvespec_common "github.com/bitechdev/ResolveSpec/pkg/spectypes"
|
||||
"github.com/uptrace/bun"
|
||||
)
|
||||
|
||||
type ModelPublicPersonaArc struct {
|
||||
bun.BaseModel `bun:"table:public.persona_arc,alias:persona_arc"`
|
||||
PersonaID int64 `bun:"persona_id,type:bigint,pk," json:"persona_id"`
|
||||
ArcID int64 `bun:"arc_id,type:bigint,notnull," json:"arc_id"`
|
||||
CurrentStageID int64 `bun:"current_stage_id,type:bigint,notnull," json:"current_stage_id"`
|
||||
UpdatedAt resolvespec_common.SqlTimeStamp `bun:"updated_at,type:timestamptz,default:now(),notnull," json:"updated_at"`
|
||||
RelArcID *ModelPublicCharacterArcs `bun:"rel:has-one,join:arc_id=id" json:"relarcid,omitempty"` // Has one ModelPublicCharacterArcs
|
||||
RelCurrentStageID *ModelPublicArcStages `bun:"rel:has-one,join:current_stage_id=id" json:"relcurrentstageid,omitempty"` // Has one ModelPublicArcStages
|
||||
RelPersonaID *ModelPublicAgentPersonas `bun:"rel:has-one,join:persona_id=id" json:"relpersonaid,omitempty"` // Has one ModelPublicAgentPersonas
|
||||
}
|
||||
|
||||
// TableName returns the table name for ModelPublicPersonaArc
|
||||
func (m ModelPublicPersonaArc) TableName() string {
|
||||
return "public.persona_arc"
|
||||
}
|
||||
|
||||
// TableNameOnly returns the table name without schema for ModelPublicPersonaArc
|
||||
func (m ModelPublicPersonaArc) TableNameOnly() string {
|
||||
return "persona_arc"
|
||||
}
|
||||
|
||||
// SchemaName returns the schema name for ModelPublicPersonaArc
|
||||
func (m ModelPublicPersonaArc) SchemaName() string {
|
||||
return "public"
|
||||
}
|
||||
|
||||
// GetID returns the primary key value
|
||||
func (m ModelPublicPersonaArc) GetID() int64 {
|
||||
return int64(m.PersonaID)
|
||||
}
|
||||
|
||||
// GetIDStr returns the primary key as a string
|
||||
func (m ModelPublicPersonaArc) GetIDStr() string {
|
||||
return fmt.Sprintf("%d", m.PersonaID)
|
||||
}
|
||||
|
||||
// SetID sets the primary key value
|
||||
func (m ModelPublicPersonaArc) SetID(newid int64) {
|
||||
m.UpdateID(newid)
|
||||
}
|
||||
|
||||
// UpdateID updates the primary key value
|
||||
func (m *ModelPublicPersonaArc) UpdateID(newid int64) {
|
||||
m.PersonaID = newid
|
||||
}
|
||||
|
||||
// GetIDName returns the name of the primary key column
|
||||
func (m ModelPublicPersonaArc) GetIDName() string {
|
||||
return "persona_id"
|
||||
}
|
||||
|
||||
// GetPrefix returns the table prefix
|
||||
func (m ModelPublicPersonaArc) GetPrefix() string {
|
||||
return "PAE"
|
||||
}
|
||||
Reference in New Issue
Block a user