diff --git a/Makefile b/Makefile index 6b2fdc8..0986c7a 100644 --- a/Makefile +++ b/Makefile @@ -11,8 +11,8 @@ RELEASE_REMOTE ?= origin VERSION_TAG ?= $(shell git describe --tags --exact-match 2>/dev/null || echo dev) COMMIT_SHA ?= $(shell git rev-parse --short HEAD 2>/dev/null || echo unknown) BUILD_DATE ?= $(shell date -u +%Y-%m-%dT%H:%M:%SZ) -#RELSPEC ?= $(shell command -v relspec 2>/dev/null || echo $(HOME)/go/bin/relspec) -RELSPEC = /home/hein/dev/relspecgo/build/relspec +RELSPEC ?= $(shell command -v relspec 2>/dev/null || echo $(HOME)/go/bin/relspec) +#RELSPEC = /home/hein/dev/relspecgo/build/relspec SCHEMA_FILES := $(sort $(wildcard schema/*.dbml)) MERGE_TARGET_TMP := $(CURDIR)/.cache/schema.merge-target.dbml GENERATED_SCHEMA_MIGRATION := migrations/020_generated_schema.sql diff --git a/internal/generatedmodels/sql_public_agent_guardrails.go b/internal/generatedmodels/sql_public_agent_guardrails.go new file mode 100644 index 0000000..080b84d --- /dev/null +++ b/internal/generatedmodels/sql_public_agent_guardrails.go @@ -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 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"` + 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 +func (m ModelPublicAgentGuardrails) TableName() string { + return "public.agent_guardrails" +} + +// TableNameOnly returns the table name without schema for ModelPublicAgentGuardrails +func (m ModelPublicAgentGuardrails) TableNameOnly() string { + return "agent_guardrails" +} + +// SchemaName returns the schema name for ModelPublicAgentGuardrails +func (m ModelPublicAgentGuardrails) SchemaName() string { + return "public" +} + +// GetID returns the primary key value +func (m ModelPublicAgentGuardrails) GetID() int64 { + return m.ID.Int64() +} + +// GetIDStr returns the primary key as a string +func (m ModelPublicAgentGuardrails) GetIDStr() string { + return fmt.Sprintf("%v", m.ID) +} + +// SetID sets the primary key value +func (m ModelPublicAgentGuardrails) SetID(newid int64) { + m.UpdateID(newid) +} + +// UpdateID updates the primary key value +func (m *ModelPublicAgentGuardrails) UpdateID(newid int64) { + m.ID.FromString(fmt.Sprintf("%d", newid)) +} + +// GetIDName returns the name of the primary key column +func (m ModelPublicAgentGuardrails) GetIDName() string { + return "id" +} + +// GetPrefix returns the table prefix +func (m ModelPublicAgentGuardrails) GetPrefix() string { + return "AGG" +} diff --git a/internal/generatedmodels/sql_public_agent_parts.go b/internal/generatedmodels/sql_public_agent_parts.go new file mode 100644 index 0000000..2b29fd5 --- /dev/null +++ b/internal/generatedmodels/sql_public_agent_parts.go @@ -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" +} diff --git a/internal/generatedmodels/sql_public_agent_persona_guardrails.go b/internal/generatedmodels/sql_public_agent_persona_guardrails.go new file mode 100644 index 0000000..3b1dd3f --- /dev/null +++ b/internal/generatedmodels/sql_public_agent_persona_guardrails.go @@ -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" +} diff --git a/internal/generatedmodels/sql_public_agent_persona_parts.go b/internal/generatedmodels/sql_public_agent_persona_parts.go new file mode 100644 index 0000000..4b09d5a --- /dev/null +++ b/internal/generatedmodels/sql_public_agent_persona_parts.go @@ -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" +} diff --git a/internal/generatedmodels/sql_public_agent_persona_skills.go b/internal/generatedmodels/sql_public_agent_persona_skills.go new file mode 100644 index 0000000..f36e8b0 --- /dev/null +++ b/internal/generatedmodels/sql_public_agent_persona_skills.go @@ -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" +} diff --git a/internal/generatedmodels/sql_public_agent_persona_traits.go b/internal/generatedmodels/sql_public_agent_persona_traits.go new file mode 100644 index 0000000..855b459 --- /dev/null +++ b/internal/generatedmodels/sql_public_agent_persona_traits.go @@ -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" +} diff --git a/internal/generatedmodels/sql_public_agent_personas.go b/internal/generatedmodels/sql_public_agent_personas.go new file mode 100644 index 0000000..c319161 --- /dev/null +++ b/internal/generatedmodels/sql_public_agent_personas.go @@ -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" +} diff --git a/internal/generatedmodels/sql_public_agent_skills.go b/internal/generatedmodels/sql_public_agent_skills.go new file mode 100644 index 0000000..9e837aa --- /dev/null +++ b/internal/generatedmodels/sql_public_agent_skills.go @@ -0,0 +1,73 @@ +// Code generated by relspecgo. DO NOT EDIT. +package generatedmodels + +import ( + "fmt" + resolvespec_common "github.com/bitechdev/ResolveSpec/pkg/spectypes" + "github.com/uptrace/bun" +) + +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"` + 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 +func (m ModelPublicAgentSkills) TableName() string { + return "public.agent_skills" +} + +// TableNameOnly returns the table name without schema for ModelPublicAgentSkills +func (m ModelPublicAgentSkills) TableNameOnly() string { + return "agent_skills" +} + +// SchemaName returns the schema name for ModelPublicAgentSkills +func (m ModelPublicAgentSkills) SchemaName() string { + return "public" +} + +// GetID returns the primary key value +func (m ModelPublicAgentSkills) GetID() int64 { + return m.ID.Int64() +} + +// GetIDStr returns the primary key as a string +func (m ModelPublicAgentSkills) GetIDStr() string { + return fmt.Sprintf("%v", m.ID) +} + +// SetID sets the primary key value +func (m ModelPublicAgentSkills) SetID(newid int64) { + m.UpdateID(newid) +} + +// UpdateID updates the primary key value +func (m *ModelPublicAgentSkills) UpdateID(newid int64) { + m.ID.FromString(fmt.Sprintf("%d", newid)) +} + +// GetIDName returns the name of the primary key column +func (m ModelPublicAgentSkills) GetIDName() string { + return "id" +} + +// GetPrefix returns the table prefix +func (m ModelPublicAgentSkills) GetPrefix() string { + return "ASG" +} diff --git a/internal/generatedmodels/sql_public_agent_traits.go b/internal/generatedmodels/sql_public_agent_traits.go new file mode 100644 index 0000000..0d7e3a9 --- /dev/null +++ b/internal/generatedmodels/sql_public_agent_traits.go @@ -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" +} diff --git a/internal/generatedmodels/sql_public_arc_stage_parts.go b/internal/generatedmodels/sql_public_arc_stage_parts.go new file mode 100644 index 0000000..176d07d --- /dev/null +++ b/internal/generatedmodels/sql_public_arc_stage_parts.go @@ -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" +} diff --git a/internal/generatedmodels/sql_public_arc_stages.go b/internal/generatedmodels/sql_public_arc_stages.go new file mode 100644 index 0000000..30c58fc --- /dev/null +++ b/internal/generatedmodels/sql_public_arc_stages.go @@ -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" +} diff --git a/internal/generatedmodels/sql_public_character_arcs.go b/internal/generatedmodels/sql_public_character_arcs.go new file mode 100644 index 0000000..c7d194d --- /dev/null +++ b/internal/generatedmodels/sql_public_character_arcs.go @@ -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" +} diff --git a/internal/generatedmodels/sql_public_chat_histories.go b/internal/generatedmodels/sql_public_chat_histories.go new file mode 100644 index 0000000..f060bb8 --- /dev/null +++ b/internal/generatedmodels/sql_public_chat_histories.go @@ -0,0 +1,70 @@ +// Code generated by relspecgo. DO NOT EDIT. +package generatedmodels + +import ( + "fmt" + resolvespec_common "github.com/bitechdev/ResolveSpec/pkg/spectypes" + "github.com/uptrace/bun" +) + +type ModelPublicChatHistories struct { + bun.BaseModel `bun:"table:public.chat_histories,alias:chat_histories"` + ID resolvespec_common.SqlInt64 `bun:"id,type:bigserial,pk,autoincrement," json:"id"` + AgentID resolvespec_common.SqlString `bun:"agent_id,type:text,nullzero," json:"agent_id"` + Channel resolvespec_common.SqlString `bun:"channel,type:text,nullzero," json:"channel"` + CreatedAt resolvespec_common.SqlTimeStamp `bun:"created_at,type:timestamptz,default:now(),notnull," json:"created_at"` + GUID resolvespec_common.SqlUUID `bun:"guid,type:uuid,default:gen_random_uuid(),notnull," json:"guid"` + Messages resolvespec_common.SqlJSONB `bun:"messages,type:jsonb,default:'',notnull," json:"messages"` + Metadata resolvespec_common.SqlJSONB `bun:"metadata,type:jsonb,default:'{}',notnull," json:"metadata"` + ProjectID resolvespec_common.SqlInt64 `bun:"project_id,type:bigint,nullzero," json:"project_id"` + SessionID resolvespec_common.SqlString `bun:"session_id,type:text,notnull," json:"session_id"` + Summary resolvespec_common.SqlString `bun:"summary,type:text,nullzero," json:"summary"` + Title resolvespec_common.SqlString `bun:"title,type:text,nullzero," json:"title"` + UpdatedAt resolvespec_common.SqlTimeStamp `bun:"updated_at,type:timestamptz,default:now(),notnull," json:"updated_at"` + RelProjectID *ModelPublicProjects `bun:"rel:has-one,join:project_id=id" json:"relprojectid,omitempty"` // Has one ModelPublicProjects +} + +// TableName returns the table name for ModelPublicChatHistories +func (m ModelPublicChatHistories) TableName() string { + return "public.chat_histories" +} + +// TableNameOnly returns the table name without schema for ModelPublicChatHistories +func (m ModelPublicChatHistories) TableNameOnly() string { + return "chat_histories" +} + +// SchemaName returns the schema name for ModelPublicChatHistories +func (m ModelPublicChatHistories) SchemaName() string { + return "public" +} + +// GetID returns the primary key value +func (m ModelPublicChatHistories) GetID() int64 { + return m.ID.Int64() +} + +// GetIDStr returns the primary key as a string +func (m ModelPublicChatHistories) GetIDStr() string { + return fmt.Sprintf("%v", m.ID) +} + +// SetID sets the primary key value +func (m ModelPublicChatHistories) SetID(newid int64) { + m.UpdateID(newid) +} + +// UpdateID updates the primary key value +func (m *ModelPublicChatHistories) UpdateID(newid int64) { + m.ID.FromString(fmt.Sprintf("%d", newid)) +} + +// GetIDName returns the name of the primary key column +func (m ModelPublicChatHistories) GetIDName() string { + return "id" +} + +// GetPrefix returns the table prefix +func (m ModelPublicChatHistories) GetPrefix() string { + return "CHH" +} diff --git a/internal/generatedmodels/sql_public_embeddings.go b/internal/generatedmodels/sql_public_embeddings.go new file mode 100644 index 0000000..92d34f5 --- /dev/null +++ b/internal/generatedmodels/sql_public_embeddings.go @@ -0,0 +1,66 @@ +// Code generated by relspecgo. DO NOT EDIT. +package generatedmodels + +import ( + "fmt" + resolvespec_common "github.com/bitechdev/ResolveSpec/pkg/spectypes" + "github.com/uptrace/bun" +) + +type ModelPublicEmbeddings struct { + bun.BaseModel `bun:"table:public.embeddings,alias:embeddings"` + ID resolvespec_common.SqlInt64 `bun:"id,type:bigserial,pk,autoincrement," json:"id"` + CreatedAt resolvespec_common.SqlTimeStamp `bun:"created_at,type:timestamptz,default:now(),nullzero," json:"created_at"` + Dim int32 `bun:"dim,type:int,notnull," json:"dim"` + Embedding resolvespec_common.SqlVector `bun:"embedding,type:vector,notnull," json:"embedding"` + GUID resolvespec_common.SqlUUID `bun:"guid,type:uuid,default:gen_random_uuid(),notnull," json:"guid"` + Model resolvespec_common.SqlString `bun:"model,type:text,notnull,unique:uidx_embeddings_thought_id_model," json:"model"` + ThoughtID int64 `bun:"thought_id,type:bigint,notnull,unique:uidx_embeddings_thought_id_model," json:"thought_id"` + UpdatedAt resolvespec_common.SqlTimeStamp `bun:"updated_at,type:timestamptz,default:now(),nullzero," json:"updated_at"` + RelThoughtID *ModelPublicThoughts `bun:"rel:has-one,join:thought_id=id" json:"relthoughtid,omitempty"` // Has one ModelPublicThoughts +} + +// TableName returns the table name for ModelPublicEmbeddings +func (m ModelPublicEmbeddings) TableName() string { + return "public.embeddings" +} + +// TableNameOnly returns the table name without schema for ModelPublicEmbeddings +func (m ModelPublicEmbeddings) TableNameOnly() string { + return "embeddings" +} + +// SchemaName returns the schema name for ModelPublicEmbeddings +func (m ModelPublicEmbeddings) SchemaName() string { + return "public" +} + +// GetID returns the primary key value +func (m ModelPublicEmbeddings) GetID() int64 { + return m.ID.Int64() +} + +// GetIDStr returns the primary key as a string +func (m ModelPublicEmbeddings) GetIDStr() string { + return fmt.Sprintf("%v", m.ID) +} + +// SetID sets the primary key value +func (m ModelPublicEmbeddings) SetID(newid int64) { + m.UpdateID(newid) +} + +// UpdateID updates the primary key value +func (m *ModelPublicEmbeddings) UpdateID(newid int64) { + m.ID.FromString(fmt.Sprintf("%d", newid)) +} + +// GetIDName returns the name of the primary key column +func (m ModelPublicEmbeddings) GetIDName() string { + return "id" +} + +// GetPrefix returns the table prefix +func (m ModelPublicEmbeddings) GetPrefix() string { + return "EMB" +} diff --git a/internal/generatedmodels/sql_public_learnings.go b/internal/generatedmodels/sql_public_learnings.go new file mode 100644 index 0000000..83647ae --- /dev/null +++ b/internal/generatedmodels/sql_public_learnings.go @@ -0,0 +1,84 @@ +// Code generated by relspecgo. DO NOT EDIT. +package generatedmodels + +import ( + "fmt" + resolvespec_common "github.com/bitechdev/ResolveSpec/pkg/spectypes" + "github.com/uptrace/bun" +) + +type ModelPublicLearnings struct { + bun.BaseModel `bun:"table:public.learnings,alias:learnings"` + ID resolvespec_common.SqlInt64 `bun:"id,type:bigserial,pk,autoincrement," json:"id"` + ActionRequired bool `bun:"action_required,type:boolean,default:false,notnull," json:"action_required"` + Area resolvespec_common.SqlString `bun:"area,type:text,default:'other',notnull," json:"area"` + Category resolvespec_common.SqlString `bun:"category,type:text,default:'insight',notnull," json:"category"` + Confidence resolvespec_common.SqlString `bun:"confidence,type:text,default:'hypothesis',notnull," json:"confidence"` + CreatedAt resolvespec_common.SqlTimeStamp `bun:"created_at,type:timestamptz,default:now(),notnull," json:"created_at"` + Details resolvespec_common.SqlString `bun:"details,type:text,default:'',notnull," json:"details"` + DuplicateOfLearningID resolvespec_common.SqlInt64 `bun:"duplicate_of_learning_id,type:bigint,nullzero," json:"duplicate_of_learning_id"` + GUID resolvespec_common.SqlUUID `bun:"guid,type:uuid,default:gen_random_uuid(),notnull," json:"guid"` + Priority resolvespec_common.SqlString `bun:"priority,type:text,default:'medium',notnull," json:"priority"` + ProjectID resolvespec_common.SqlInt64 `bun:"project_id,type:bigint,nullzero," json:"project_id"` + RelatedSkillID resolvespec_common.SqlInt64 `bun:"related_skill_id,type:bigint,nullzero," json:"related_skill_id"` + RelatedThoughtID resolvespec_common.SqlInt64 `bun:"related_thought_id,type:bigint,nullzero," json:"related_thought_id"` + ReviewedAt resolvespec_common.SqlTimeStamp `bun:"reviewed_at,type:timestamptz,nullzero," json:"reviewed_at"` + ReviewedBy resolvespec_common.SqlString `bun:"reviewed_by,type:text,nullzero," json:"reviewed_by"` + SourceRef resolvespec_common.SqlString `bun:"source_ref,type:text,nullzero," json:"source_ref"` + SourceType resolvespec_common.SqlString `bun:"source_type,type:text,nullzero," json:"source_type"` + Status resolvespec_common.SqlString `bun:"status,type:text,default:'pending',notnull," json:"status"` + Summary resolvespec_common.SqlString `bun:"summary,type:text,notnull," json:"summary"` + SupersedesLearningID resolvespec_common.SqlInt64 `bun:"supersedes_learning_id,type:bigint,nullzero," json:"supersedes_learning_id"` + 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"` + RelDuplicateOfLearningID *ModelPublicLearnings `bun:"rel:has-one,join:duplicate_of_learning_id=id" json:"relduplicateoflearningid,omitempty"` // Has one ModelPublicLearnings + RelProjectID *ModelPublicProjects `bun:"rel:has-one,join:project_id=id" json:"relprojectid,omitempty"` // Has one ModelPublicProjects + RelRelatedSkillID *ModelPublicAgentSkills `bun:"rel:has-one,join:related_skill_id=id" json:"relrelatedskillid,omitempty"` // Has one ModelPublicAgentSkills + RelRelatedThoughtID *ModelPublicThoughts `bun:"rel:has-one,join:related_thought_id=id" json:"relrelatedthoughtid,omitempty"` // Has one ModelPublicThoughts + RelSupersedesLearningID *ModelPublicLearnings `bun:"rel:has-one,join:supersedes_learning_id=id" json:"relsupersedeslearningid,omitempty"` // Has one ModelPublicLearnings +} + +// TableName returns the table name for ModelPublicLearnings +func (m ModelPublicLearnings) TableName() string { + return "public.learnings" +} + +// TableNameOnly returns the table name without schema for ModelPublicLearnings +func (m ModelPublicLearnings) TableNameOnly() string { + return "learnings" +} + +// SchemaName returns the schema name for ModelPublicLearnings +func (m ModelPublicLearnings) SchemaName() string { + return "public" +} + +// GetID returns the primary key value +func (m ModelPublicLearnings) GetID() int64 { + return m.ID.Int64() +} + +// GetIDStr returns the primary key as a string +func (m ModelPublicLearnings) GetIDStr() string { + return fmt.Sprintf("%v", m.ID) +} + +// SetID sets the primary key value +func (m ModelPublicLearnings) SetID(newid int64) { + m.UpdateID(newid) +} + +// UpdateID updates the primary key value +func (m *ModelPublicLearnings) UpdateID(newid int64) { + m.ID.FromString(fmt.Sprintf("%d", newid)) +} + +// GetIDName returns the name of the primary key column +func (m ModelPublicLearnings) GetIDName() string { + return "id" +} + +// GetPrefix returns the table prefix +func (m ModelPublicLearnings) GetPrefix() string { + return "LEA" +} diff --git a/internal/generatedmodels/sql_public_persona_arc.go b/internal/generatedmodels/sql_public_persona_arc.go new file mode 100644 index 0000000..01f2eaf --- /dev/null +++ b/internal/generatedmodels/sql_public_persona_arc.go @@ -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" +} diff --git a/internal/generatedmodels/sql_public_plan_dependencies.go b/internal/generatedmodels/sql_public_plan_dependencies.go new file mode 100644 index 0000000..3b23540 --- /dev/null +++ b/internal/generatedmodels/sql_public_plan_dependencies.go @@ -0,0 +1,63 @@ +// Code generated by relspecgo. DO NOT EDIT. +package generatedmodels + +import ( + "fmt" + resolvespec_common "github.com/bitechdev/ResolveSpec/pkg/spectypes" + "github.com/uptrace/bun" +) + +type ModelPublicPlanDependencies struct { + bun.BaseModel `bun:"table:public.plan_dependencies,alias:plan_dependencies"` + 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"` + DependsOnPlanID int64 `bun:"depends_on_plan_id,type:bigint,notnull,unique:uidx_plan_dependencies_plan_id_depends_on_plan_id," json:"depends_on_plan_id"` + PlanID int64 `bun:"plan_id,type:bigint,notnull,unique:uidx_plan_dependencies_plan_id_depends_on_plan_id," json:"plan_id"` + RelDependsOnPlanID *ModelPublicPlans `bun:"rel:has-one,join:depends_on_plan_id=id" json:"reldependsonplanid,omitempty"` // Has one ModelPublicPlans + RelPlanID *ModelPublicPlans `bun:"rel:has-one,join:plan_id=id" json:"relplanid,omitempty"` // Has one ModelPublicPlans +} + +// TableName returns the table name for ModelPublicPlanDependencies +func (m ModelPublicPlanDependencies) TableName() string { + return "public.plan_dependencies" +} + +// TableNameOnly returns the table name without schema for ModelPublicPlanDependencies +func (m ModelPublicPlanDependencies) TableNameOnly() string { + return "plan_dependencies" +} + +// SchemaName returns the schema name for ModelPublicPlanDependencies +func (m ModelPublicPlanDependencies) SchemaName() string { + return "public" +} + +// GetID returns the primary key value +func (m ModelPublicPlanDependencies) GetID() int64 { + return m.ID.Int64() +} + +// GetIDStr returns the primary key as a string +func (m ModelPublicPlanDependencies) GetIDStr() string { + return fmt.Sprintf("%v", m.ID) +} + +// SetID sets the primary key value +func (m ModelPublicPlanDependencies) SetID(newid int64) { + m.UpdateID(newid) +} + +// UpdateID updates the primary key value +func (m *ModelPublicPlanDependencies) UpdateID(newid int64) { + m.ID.FromString(fmt.Sprintf("%d", newid)) +} + +// GetIDName returns the name of the primary key column +func (m ModelPublicPlanDependencies) GetIDName() string { + return "id" +} + +// GetPrefix returns the table prefix +func (m ModelPublicPlanDependencies) GetPrefix() string { + return "PDL" +} diff --git a/internal/generatedmodels/sql_public_plan_guardrails.go b/internal/generatedmodels/sql_public_plan_guardrails.go new file mode 100644 index 0000000..680d930 --- /dev/null +++ b/internal/generatedmodels/sql_public_plan_guardrails.go @@ -0,0 +1,63 @@ +// Code generated by relspecgo. DO NOT EDIT. +package generatedmodels + +import ( + "fmt" + resolvespec_common "github.com/bitechdev/ResolveSpec/pkg/spectypes" + "github.com/uptrace/bun" +) + +type ModelPublicPlanGuardrails struct { + bun.BaseModel `bun:"table:public.plan_guardrails,alias:plan_guardrails"` + 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"` + GuardrailID int64 `bun:"guardrail_id,type:bigint,notnull,unique:uidx_plan_guardrails_plan_id_guardrail_id," json:"guardrail_id"` + PlanID int64 `bun:"plan_id,type:bigint,notnull,unique:uidx_plan_guardrails_plan_id_guardrail_id," json:"plan_id"` + RelGuardrailID *ModelPublicAgentGuardrails `bun:"rel:has-one,join:guardrail_id=id" json:"relguardrailid,omitempty"` // Has one ModelPublicAgentGuardrails + RelPlanID *ModelPublicPlans `bun:"rel:has-one,join:plan_id=id" json:"relplanid,omitempty"` // Has one ModelPublicPlans +} + +// TableName returns the table name for ModelPublicPlanGuardrails +func (m ModelPublicPlanGuardrails) TableName() string { + return "public.plan_guardrails" +} + +// TableNameOnly returns the table name without schema for ModelPublicPlanGuardrails +func (m ModelPublicPlanGuardrails) TableNameOnly() string { + return "plan_guardrails" +} + +// SchemaName returns the schema name for ModelPublicPlanGuardrails +func (m ModelPublicPlanGuardrails) SchemaName() string { + return "public" +} + +// GetID returns the primary key value +func (m ModelPublicPlanGuardrails) GetID() int64 { + return m.ID.Int64() +} + +// GetIDStr returns the primary key as a string +func (m ModelPublicPlanGuardrails) GetIDStr() string { + return fmt.Sprintf("%v", m.ID) +} + +// SetID sets the primary key value +func (m ModelPublicPlanGuardrails) SetID(newid int64) { + m.UpdateID(newid) +} + +// UpdateID updates the primary key value +func (m *ModelPublicPlanGuardrails) UpdateID(newid int64) { + m.ID.FromString(fmt.Sprintf("%d", newid)) +} + +// GetIDName returns the name of the primary key column +func (m ModelPublicPlanGuardrails) GetIDName() string { + return "id" +} + +// GetPrefix returns the table prefix +func (m ModelPublicPlanGuardrails) GetPrefix() string { + return "PGL" +} diff --git a/internal/generatedmodels/sql_public_plan_related_plans.go b/internal/generatedmodels/sql_public_plan_related_plans.go new file mode 100644 index 0000000..101a686 --- /dev/null +++ b/internal/generatedmodels/sql_public_plan_related_plans.go @@ -0,0 +1,63 @@ +// Code generated by relspecgo. DO NOT EDIT. +package generatedmodels + +import ( + "fmt" + resolvespec_common "github.com/bitechdev/ResolveSpec/pkg/spectypes" + "github.com/uptrace/bun" +) + +type ModelPublicPlanRelatedPlans struct { + bun.BaseModel `bun:"table:public.plan_related_plans,alias:plan_related_plans"` + 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"` + PlanAID int64 `bun:"plan_a_id,type:bigint,notnull,unique:uidx_plan_related_plans_plan_a_id_plan_b_id," json:"plan_a_id"` + PlanBID int64 `bun:"plan_b_id,type:bigint,notnull,unique:uidx_plan_related_plans_plan_a_id_plan_b_id," json:"plan_b_id"` + RelPlanAID *ModelPublicPlans `bun:"rel:has-one,join:plan_a_id=id" json:"relplanaid,omitempty"` // Has one ModelPublicPlans + RelPlanBID *ModelPublicPlans `bun:"rel:has-one,join:plan_b_id=id" json:"relplanbid,omitempty"` // Has one ModelPublicPlans +} + +// TableName returns the table name for ModelPublicPlanRelatedPlans +func (m ModelPublicPlanRelatedPlans) TableName() string { + return "public.plan_related_plans" +} + +// TableNameOnly returns the table name without schema for ModelPublicPlanRelatedPlans +func (m ModelPublicPlanRelatedPlans) TableNameOnly() string { + return "plan_related_plans" +} + +// SchemaName returns the schema name for ModelPublicPlanRelatedPlans +func (m ModelPublicPlanRelatedPlans) SchemaName() string { + return "public" +} + +// GetID returns the primary key value +func (m ModelPublicPlanRelatedPlans) GetID() int64 { + return m.ID.Int64() +} + +// GetIDStr returns the primary key as a string +func (m ModelPublicPlanRelatedPlans) GetIDStr() string { + return fmt.Sprintf("%v", m.ID) +} + +// SetID sets the primary key value +func (m ModelPublicPlanRelatedPlans) SetID(newid int64) { + m.UpdateID(newid) +} + +// UpdateID updates the primary key value +func (m *ModelPublicPlanRelatedPlans) UpdateID(newid int64) { + m.ID.FromString(fmt.Sprintf("%d", newid)) +} + +// GetIDName returns the name of the primary key column +func (m ModelPublicPlanRelatedPlans) GetIDName() string { + return "id" +} + +// GetPrefix returns the table prefix +func (m ModelPublicPlanRelatedPlans) GetPrefix() string { + return "PRP" +} diff --git a/internal/generatedmodels/sql_public_plan_skills.go b/internal/generatedmodels/sql_public_plan_skills.go new file mode 100644 index 0000000..62fee56 --- /dev/null +++ b/internal/generatedmodels/sql_public_plan_skills.go @@ -0,0 +1,63 @@ +// Code generated by relspecgo. DO NOT EDIT. +package generatedmodels + +import ( + "fmt" + resolvespec_common "github.com/bitechdev/ResolveSpec/pkg/spectypes" + "github.com/uptrace/bun" +) + +type ModelPublicPlanSkills struct { + bun.BaseModel `bun:"table:public.plan_skills,alias:plan_skills"` + 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"` + PlanID int64 `bun:"plan_id,type:bigint,notnull,unique:uidx_plan_skills_plan_id_skill_id," json:"plan_id"` + SkillID int64 `bun:"skill_id,type:bigint,notnull,unique:uidx_plan_skills_plan_id_skill_id," json:"skill_id"` + RelPlanID *ModelPublicPlans `bun:"rel:has-one,join:plan_id=id" json:"relplanid,omitempty"` // Has one ModelPublicPlans + RelSkillID *ModelPublicAgentSkills `bun:"rel:has-one,join:skill_id=id" json:"relskillid,omitempty"` // Has one ModelPublicAgentSkills +} + +// TableName returns the table name for ModelPublicPlanSkills +func (m ModelPublicPlanSkills) TableName() string { + return "public.plan_skills" +} + +// TableNameOnly returns the table name without schema for ModelPublicPlanSkills +func (m ModelPublicPlanSkills) TableNameOnly() string { + return "plan_skills" +} + +// SchemaName returns the schema name for ModelPublicPlanSkills +func (m ModelPublicPlanSkills) SchemaName() string { + return "public" +} + +// GetID returns the primary key value +func (m ModelPublicPlanSkills) GetID() int64 { + return m.ID.Int64() +} + +// GetIDStr returns the primary key as a string +func (m ModelPublicPlanSkills) GetIDStr() string { + return fmt.Sprintf("%v", m.ID) +} + +// SetID sets the primary key value +func (m ModelPublicPlanSkills) SetID(newid int64) { + m.UpdateID(newid) +} + +// UpdateID updates the primary key value +func (m *ModelPublicPlanSkills) UpdateID(newid int64) { + m.ID.FromString(fmt.Sprintf("%d", newid)) +} + +// GetIDName returns the name of the primary key column +func (m ModelPublicPlanSkills) GetIDName() string { + return "id" +} + +// GetPrefix returns the table prefix +func (m ModelPublicPlanSkills) GetPrefix() string { + return "PSL" +} diff --git a/internal/generatedmodels/sql_public_plans.go b/internal/generatedmodels/sql_public_plans.go new file mode 100644 index 0000000..0fabb91 --- /dev/null +++ b/internal/generatedmodels/sql_public_plans.go @@ -0,0 +1,81 @@ +// Code generated by relspecgo. DO NOT EDIT. +package generatedmodels + +import ( + "fmt" + resolvespec_common "github.com/bitechdev/ResolveSpec/pkg/spectypes" + "github.com/uptrace/bun" +) + +type ModelPublicPlans struct { + bun.BaseModel `bun:"table:public.plans,alias:plans"` + ID resolvespec_common.SqlInt64 `bun:"id,type:bigserial,pk,autoincrement," json:"id"` + CompletedAt resolvespec_common.SqlTimeStamp `bun:"completed_at,type:timestamptz,nullzero," json:"completed_at"` + 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"` + DueDate resolvespec_common.SqlTimeStamp `bun:"due_date,type:timestamptz,nullzero," json:"due_date"` + GUID resolvespec_common.SqlUUID `bun:"guid,type:uuid,default:gen_random_uuid(),notnull," json:"guid"` + LastReviewedAt resolvespec_common.SqlTimeStamp `bun:"last_reviewed_at,type:timestamptz,nullzero," json:"last_reviewed_at"` + Owner resolvespec_common.SqlString `bun:"owner,type:text,nullzero," json:"owner"` + Priority resolvespec_common.SqlString `bun:"priority,type:text,default:'medium',notnull," json:"priority"` // low, medium, high, critical + ProjectID resolvespec_common.SqlInt64 `bun:"project_id,type:bigint,nullzero," json:"project_id"` + ReviewedBy resolvespec_common.SqlString `bun:"reviewed_by,type:text,nullzero," json:"reviewed_by"` + Status resolvespec_common.SqlString `bun:"status,type:text,default:'draft',notnull," json:"status"` // draft, active, blocked, completed, cancelled, superseded + SupersedesPlanID resolvespec_common.SqlInt64 `bun:"supersedes_plan_id,type:bigint,nullzero," json:"supersedes_plan_id"` + Tags resolvespec_common.SqlStringArray `bun:"tags,type:text,default:'{}',notnull," json:"tags"` + Title resolvespec_common.SqlString `bun:"title,type:text,notnull," json:"title"` + UpdatedAt resolvespec_common.SqlTimeStamp `bun:"updated_at,type:timestamptz,default:now(),notnull," json:"updated_at"` + RelProjectID *ModelPublicProjects `bun:"rel:has-one,join:project_id=id" json:"relprojectid,omitempty"` // Has one ModelPublicProjects + RelSupersedesPlanID *ModelPublicPlans `bun:"rel:has-one,join:supersedes_plan_id=id" json:"relsupersedesplanid,omitempty"` // Has one ModelPublicPlans + RelDependsOnPlanIDPublicPlanDependencies []*ModelPublicPlanDependencies `bun:"rel:has-many,join:id=depends_on_plan_id" json:"reldependsonplanidpublicplandependencies,omitempty"` // Has many ModelPublicPlanDependencies + RelPlanIDPublicPlanDependencies []*ModelPublicPlanDependencies `bun:"rel:has-many,join:id=plan_id" json:"relplanidpublicplandependencies,omitempty"` // Has many ModelPublicPlanDependencies + RelPlanAIDPublicPlanRelatedPlans []*ModelPublicPlanRelatedPlans `bun:"rel:has-many,join:id=plan_a_id" json:"relplanaidpublicplanrelatedplans,omitempty"` // Has many ModelPublicPlanRelatedPlans + RelPlanBIDPublicPlanRelatedPlans []*ModelPublicPlanRelatedPlans `bun:"rel:has-many,join:id=plan_b_id" json:"relplanbidpublicplanrelatedplans,omitempty"` // Has many ModelPublicPlanRelatedPlans + RelPlanIDPublicPlanSkills []*ModelPublicPlanSkills `bun:"rel:has-many,join:id=plan_id" json:"relplanidpublicplanskills,omitempty"` // Has many ModelPublicPlanSkills + RelPlanIDPublicPlanGuardrails []*ModelPublicPlanGuardrails `bun:"rel:has-many,join:id=plan_id" json:"relplanidpublicplanguardrails,omitempty"` // Has many ModelPublicPlanGuardrails +} + +// TableName returns the table name for ModelPublicPlans +func (m ModelPublicPlans) TableName() string { + return "public.plans" +} + +// TableNameOnly returns the table name without schema for ModelPublicPlans +func (m ModelPublicPlans) TableNameOnly() string { + return "plans" +} + +// SchemaName returns the schema name for ModelPublicPlans +func (m ModelPublicPlans) SchemaName() string { + return "public" +} + +// GetID returns the primary key value +func (m ModelPublicPlans) GetID() int64 { + return m.ID.Int64() +} + +// GetIDStr returns the primary key as a string +func (m ModelPublicPlans) GetIDStr() string { + return fmt.Sprintf("%v", m.ID) +} + +// SetID sets the primary key value +func (m ModelPublicPlans) SetID(newid int64) { + m.UpdateID(newid) +} + +// UpdateID updates the primary key value +func (m *ModelPublicPlans) UpdateID(newid int64) { + m.ID.FromString(fmt.Sprintf("%d", newid)) +} + +// GetIDName returns the name of the primary key column +func (m ModelPublicPlans) GetIDName() string { + return "id" +} + +// GetPrefix returns the table prefix +func (m ModelPublicPlans) GetPrefix() string { + return "PLA" +} diff --git a/internal/generatedmodels/sql_public_project_guardrails.go b/internal/generatedmodels/sql_public_project_guardrails.go new file mode 100644 index 0000000..9db3e31 --- /dev/null +++ b/internal/generatedmodels/sql_public_project_guardrails.go @@ -0,0 +1,63 @@ +// Code generated by relspecgo. DO NOT EDIT. +package generatedmodels + +import ( + "fmt" + resolvespec_common "github.com/bitechdev/ResolveSpec/pkg/spectypes" + "github.com/uptrace/bun" +) + +type ModelPublicProjectGuardrails struct { + bun.BaseModel `bun:"table:public.project_guardrails,alias:project_guardrails"` + 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"` + GuardrailID int64 `bun:"guardrail_id,type:bigint,notnull," json:"guardrail_id"` + ProjectID int64 `bun:"project_id,type:bigint,notnull," json:"project_id"` + RelGuardrailID *ModelPublicAgentGuardrails `bun:"rel:has-one,join:guardrail_id=id" json:"relguardrailid,omitempty"` // Has one ModelPublicAgentGuardrails + RelProjectID *ModelPublicProjects `bun:"rel:has-one,join:project_id=id" json:"relprojectid,omitempty"` // Has one ModelPublicProjects +} + +// TableName returns the table name for ModelPublicProjectGuardrails +func (m ModelPublicProjectGuardrails) TableName() string { + return "public.project_guardrails" +} + +// TableNameOnly returns the table name without schema for ModelPublicProjectGuardrails +func (m ModelPublicProjectGuardrails) TableNameOnly() string { + return "project_guardrails" +} + +// SchemaName returns the schema name for ModelPublicProjectGuardrails +func (m ModelPublicProjectGuardrails) SchemaName() string { + return "public" +} + +// GetID returns the primary key value +func (m ModelPublicProjectGuardrails) GetID() int64 { + return m.ID.Int64() +} + +// GetIDStr returns the primary key as a string +func (m ModelPublicProjectGuardrails) GetIDStr() string { + return fmt.Sprintf("%v", m.ID) +} + +// SetID sets the primary key value +func (m ModelPublicProjectGuardrails) SetID(newid int64) { + m.UpdateID(newid) +} + +// UpdateID updates the primary key value +func (m *ModelPublicProjectGuardrails) UpdateID(newid int64) { + m.ID.FromString(fmt.Sprintf("%d", newid)) +} + +// GetIDName returns the name of the primary key column +func (m ModelPublicProjectGuardrails) GetIDName() string { + return "id" +} + +// GetPrefix returns the table prefix +func (m ModelPublicProjectGuardrails) GetPrefix() string { + return "PGR" +} diff --git a/internal/generatedmodels/sql_public_project_skills.go b/internal/generatedmodels/sql_public_project_skills.go new file mode 100644 index 0000000..9eabbbf --- /dev/null +++ b/internal/generatedmodels/sql_public_project_skills.go @@ -0,0 +1,63 @@ +// Code generated by relspecgo. DO NOT EDIT. +package generatedmodels + +import ( + "fmt" + resolvespec_common "github.com/bitechdev/ResolveSpec/pkg/spectypes" + "github.com/uptrace/bun" +) + +type ModelPublicProjectSkills struct { + bun.BaseModel `bun:"table:public.project_skills,alias:project_skills"` + 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"` + ProjectID int64 `bun:"project_id,type:bigint,notnull," json:"project_id"` + SkillID int64 `bun:"skill_id,type:bigint,notnull," json:"skill_id"` + RelProjectID *ModelPublicProjects `bun:"rel:has-one,join:project_id=id" json:"relprojectid,omitempty"` // Has one ModelPublicProjects + RelSkillID *ModelPublicAgentSkills `bun:"rel:has-one,join:skill_id=id" json:"relskillid,omitempty"` // Has one ModelPublicAgentSkills +} + +// TableName returns the table name for ModelPublicProjectSkills +func (m ModelPublicProjectSkills) TableName() string { + return "public.project_skills" +} + +// TableNameOnly returns the table name without schema for ModelPublicProjectSkills +func (m ModelPublicProjectSkills) TableNameOnly() string { + return "project_skills" +} + +// SchemaName returns the schema name for ModelPublicProjectSkills +func (m ModelPublicProjectSkills) SchemaName() string { + return "public" +} + +// GetID returns the primary key value +func (m ModelPublicProjectSkills) GetID() int64 { + return m.ID.Int64() +} + +// GetIDStr returns the primary key as a string +func (m ModelPublicProjectSkills) GetIDStr() string { + return fmt.Sprintf("%v", m.ID) +} + +// SetID sets the primary key value +func (m ModelPublicProjectSkills) SetID(newid int64) { + m.UpdateID(newid) +} + +// UpdateID updates the primary key value +func (m *ModelPublicProjectSkills) UpdateID(newid int64) { + m.ID.FromString(fmt.Sprintf("%d", newid)) +} + +// GetIDName returns the name of the primary key column +func (m ModelPublicProjectSkills) GetIDName() string { + return "id" +} + +// GetPrefix returns the table prefix +func (m ModelPublicProjectSkills) GetPrefix() string { + return "PSR" +} diff --git a/internal/generatedmodels/sql_public_projects.go b/internal/generatedmodels/sql_public_projects.go new file mode 100644 index 0000000..0585663 --- /dev/null +++ b/internal/generatedmodels/sql_public_projects.go @@ -0,0 +1,71 @@ +// Code generated by relspecgo. DO NOT EDIT. +package generatedmodels + +import ( + "fmt" + resolvespec_common "github.com/bitechdev/ResolveSpec/pkg/spectypes" + "github.com/uptrace/bun" +) + +type ModelPublicProjects struct { + bun.BaseModel `bun:"table:public.projects,alias:projects"` + ID resolvespec_common.SqlInt64 `bun:"id,type:bigserial,pk,autoincrement," json:"id"` + CreatedAt resolvespec_common.SqlTimeStamp `bun:"created_at,type:timestamptz,default:now(),nullzero," json:"created_at"` + Description resolvespec_common.SqlString `bun:"description,type:text,nullzero," json:"description"` + GUID resolvespec_common.SqlUUID `bun:"guid,type:uuid,default:gen_random_uuid(),notnull," json:"guid"` + LastActiveAt resolvespec_common.SqlTimeStamp `bun:"last_active_at,type:timestamptz,default:now(),nullzero," json:"last_active_at"` + Name resolvespec_common.SqlString `bun:"name,type:text,notnull," json:"name"` + ThoughtCount resolvespec_common.SqlInt64 `bun:"thought_count,scanonly" json:"thought_count"` + RelProjectIDPublicThoughts []*ModelPublicThoughts `bun:"rel:has-many,join:id=project_id" json:"relprojectidpublicthoughts,omitempty"` // Has many ModelPublicThoughts + RelProjectIDPublicStoredFiles []*ModelPublicStoredFiles `bun:"rel:has-many,join:id=project_id" json:"relprojectidpublicstoredfiles,omitempty"` // Has many ModelPublicStoredFiles + RelProjectIDPublicChatHistories []*ModelPublicChatHistories `bun:"rel:has-many,join:id=project_id" json:"relprojectidpublicchathistories,omitempty"` // Has many ModelPublicChatHistories + RelProjectIDPublicLearnings []*ModelPublicLearnings `bun:"rel:has-many,join:id=project_id" json:"relprojectidpubliclearnings,omitempty"` // Has many ModelPublicLearnings + RelProjectIDPublicPlans []*ModelPublicPlans `bun:"rel:has-many,join:id=project_id" json:"relprojectidpublicplans,omitempty"` // Has many ModelPublicPlans + RelProjectIDPublicProjectSkills []*ModelPublicProjectSkills `bun:"rel:has-many,join:id=project_id" json:"relprojectidpublicprojectskills,omitempty"` // Has many ModelPublicProjectSkills + RelProjectIDPublicProjectGuardrails []*ModelPublicProjectGuardrails `bun:"rel:has-many,join:id=project_id" json:"relprojectidpublicprojectguardrails,omitempty"` // Has many ModelPublicProjectGuardrails +} + +// TableName returns the table name for ModelPublicProjects +func (m ModelPublicProjects) TableName() string { + return "public.projects" +} + +// TableNameOnly returns the table name without schema for ModelPublicProjects +func (m ModelPublicProjects) TableNameOnly() string { + return "projects" +} + +// SchemaName returns the schema name for ModelPublicProjects +func (m ModelPublicProjects) SchemaName() string { + return "public" +} + +// GetID returns the primary key value +func (m ModelPublicProjects) GetID() int64 { + return m.ID.Int64() +} + +// GetIDStr returns the primary key as a string +func (m ModelPublicProjects) GetIDStr() string { + return fmt.Sprintf("%v", m.ID) +} + +// SetID sets the primary key value +func (m ModelPublicProjects) SetID(newid int64) { + m.UpdateID(newid) +} + +// UpdateID updates the primary key value +func (m *ModelPublicProjects) UpdateID(newid int64) { + m.ID.FromString(fmt.Sprintf("%d", newid)) +} + +// GetIDName returns the name of the primary key column +func (m ModelPublicProjects) GetIDName() string { + return "id" +} + +// GetPrefix returns the table prefix +func (m ModelPublicProjects) GetPrefix() string { + return "PRO" +} diff --git a/internal/generatedmodels/sql_public_stored_files.go b/internal/generatedmodels/sql_public_stored_files.go new file mode 100644 index 0000000..e6a1422 --- /dev/null +++ b/internal/generatedmodels/sql_public_stored_files.go @@ -0,0 +1,72 @@ +// Code generated by relspecgo. DO NOT EDIT. +package generatedmodels + +import ( + "fmt" + resolvespec_common "github.com/bitechdev/ResolveSpec/pkg/spectypes" + "github.com/uptrace/bun" +) + +type ModelPublicStoredFiles struct { + bun.BaseModel `bun:"table:public.stored_files,alias:stored_files"` + ID resolvespec_common.SqlInt64 `bun:"id,type:bigserial,pk,autoincrement," json:"id"` + Content []byte `bun:"content,type:bytea,notnull," json:"content"` + CreatedAt resolvespec_common.SqlTimeStamp `bun:"created_at,type:timestamptz,default:now(),notnull," json:"created_at"` + Encoding resolvespec_common.SqlString `bun:"encoding,type:text,default:'base64',notnull," json:"encoding"` + GUID resolvespec_common.SqlUUID `bun:"guid,type:uuid,default:gen_random_uuid(),notnull," json:"guid"` + Kind resolvespec_common.SqlString `bun:"kind,type:text,default:'file',notnull," json:"kind"` + MediaType resolvespec_common.SqlString `bun:"media_type,type:text,notnull," json:"media_type"` + Name resolvespec_common.SqlString `bun:"name,type:text,notnull," json:"name"` + ProjectID resolvespec_common.SqlInt64 `bun:"project_id,type:bigint,nullzero," json:"project_id"` + Sha256 resolvespec_common.SqlString `bun:"sha256,type:text,notnull," json:"sha256"` + SizeBytes int64 `bun:"size_bytes,type:bigint,notnull," json:"size_bytes"` + ThoughtID resolvespec_common.SqlInt64 `bun:"thought_id,type:bigint,nullzero," json:"thought_id"` + UpdatedAt resolvespec_common.SqlTimeStamp `bun:"updated_at,type:timestamptz,default:now(),notnull," json:"updated_at"` + RelProjectID *ModelPublicProjects `bun:"rel:has-one,join:project_id=id" json:"relprojectid,omitempty"` // Has one ModelPublicProjects + RelThoughtID *ModelPublicThoughts `bun:"rel:has-one,join:thought_id=id" json:"relthoughtid,omitempty"` // Has one ModelPublicThoughts +} + +// TableName returns the table name for ModelPublicStoredFiles +func (m ModelPublicStoredFiles) TableName() string { + return "public.stored_files" +} + +// TableNameOnly returns the table name without schema for ModelPublicStoredFiles +func (m ModelPublicStoredFiles) TableNameOnly() string { + return "stored_files" +} + +// SchemaName returns the schema name for ModelPublicStoredFiles +func (m ModelPublicStoredFiles) SchemaName() string { + return "public" +} + +// GetID returns the primary key value +func (m ModelPublicStoredFiles) GetID() int64 { + return m.ID.Int64() +} + +// GetIDStr returns the primary key as a string +func (m ModelPublicStoredFiles) GetIDStr() string { + return fmt.Sprintf("%v", m.ID) +} + +// SetID sets the primary key value +func (m ModelPublicStoredFiles) SetID(newid int64) { + m.UpdateID(newid) +} + +// UpdateID updates the primary key value +func (m *ModelPublicStoredFiles) UpdateID(newid int64) { + m.ID.FromString(fmt.Sprintf("%d", newid)) +} + +// GetIDName returns the name of the primary key column +func (m ModelPublicStoredFiles) GetIDName() string { + return "id" +} + +// GetPrefix returns the table prefix +func (m ModelPublicStoredFiles) GetPrefix() string { + return "SFT" +} diff --git a/internal/generatedmodels/sql_public_thought_links.go b/internal/generatedmodels/sql_public_thought_links.go new file mode 100644 index 0000000..a945fc1 --- /dev/null +++ b/internal/generatedmodels/sql_public_thought_links.go @@ -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 ModelPublicThoughtLinks struct { + bun.BaseModel `bun:"table:public.thought_links,alias:thought_links"` + ID resolvespec_common.SqlInt64 `bun:"id,type:bigserial,pk,autoincrement," json:"id"` + CreatedAt resolvespec_common.SqlTimeStamp `bun:"created_at,type:timestamptz,default:now(),nullzero," json:"created_at"` + FromID int64 `bun:"from_id,type:bigint,notnull," json:"from_id"` + Relation resolvespec_common.SqlString `bun:"relation,type:text,notnull," json:"relation"` + ToID int64 `bun:"to_id,type:bigint,notnull," json:"to_id"` + RelFromID *ModelPublicThoughts `bun:"rel:has-one,join:from_id=id" json:"relfromid,omitempty"` // Has one ModelPublicThoughts + RelToID *ModelPublicThoughts `bun:"rel:has-one,join:to_id=id" json:"reltoid,omitempty"` // Has one ModelPublicThoughts +} + +// TableName returns the table name for ModelPublicThoughtLinks +func (m ModelPublicThoughtLinks) TableName() string { + return "public.thought_links" +} + +// TableNameOnly returns the table name without schema for ModelPublicThoughtLinks +func (m ModelPublicThoughtLinks) TableNameOnly() string { + return "thought_links" +} + +// SchemaName returns the schema name for ModelPublicThoughtLinks +func (m ModelPublicThoughtLinks) SchemaName() string { + return "public" +} + +// GetID returns the primary key value +func (m ModelPublicThoughtLinks) GetID() int64 { + return m.ID.Int64() +} + +// GetIDStr returns the primary key as a string +func (m ModelPublicThoughtLinks) GetIDStr() string { + return fmt.Sprintf("%v", m.ID) +} + +// SetID sets the primary key value +func (m ModelPublicThoughtLinks) SetID(newid int64) { + m.UpdateID(newid) +} + +// UpdateID updates the primary key value +func (m *ModelPublicThoughtLinks) UpdateID(newid int64) { + m.ID.FromString(fmt.Sprintf("%d", newid)) +} + +// GetIDName returns the name of the primary key column +func (m ModelPublicThoughtLinks) GetIDName() string { + return "id" +} + +// GetPrefix returns the table prefix +func (m ModelPublicThoughtLinks) GetPrefix() string { + return "TLH" +} diff --git a/internal/generatedmodels/sql_public_thoughts.go b/internal/generatedmodels/sql_public_thoughts.go new file mode 100644 index 0000000..3d81f7c --- /dev/null +++ b/internal/generatedmodels/sql_public_thoughts.go @@ -0,0 +1,71 @@ +// Code generated by relspecgo. DO NOT EDIT. +package generatedmodels + +import ( + "fmt" + resolvespec_common "github.com/bitechdev/ResolveSpec/pkg/spectypes" + "github.com/uptrace/bun" +) + +type ModelPublicThoughts struct { + bun.BaseModel `bun:"table:public.thoughts,alias:thoughts"` + ID resolvespec_common.SqlInt64 `bun:"id,type:bigserial,pk,autoincrement," json:"id"` + ArchivedAt resolvespec_common.SqlTimeStamp `bun:"archived_at,type:timestamptz,nullzero," json:"archived_at"` + Content resolvespec_common.SqlString `bun:"content,type:text,notnull," json:"content"` + CreatedAt resolvespec_common.SqlTimeStamp `bun:"created_at,type:timestamptz,default:now(),nullzero," json:"created_at"` + GUID resolvespec_common.SqlUUID `bun:"guid,type:uuid,default:gen_random_uuid(),notnull," json:"guid"` + Metadata resolvespec_common.SqlJSONB `bun:"metadata,type:jsonb,default:{}::jsonb,nullzero," json:"metadata"` + ProjectID resolvespec_common.SqlInt64 `bun:"project_id,type:bigint,nullzero," json:"project_id"` + UpdatedAt resolvespec_common.SqlTimeStamp `bun:"updated_at,type:timestamptz,default:now(),nullzero," json:"updated_at"` + RelProjectID *ModelPublicProjects `bun:"rel:has-one,join:project_id=id" json:"relprojectid,omitempty"` // Has one ModelPublicProjects + RelFromIDPublicThoughtLinks []*ModelPublicThoughtLinks `bun:"rel:has-many,join:id=from_id" json:"relfromidpublicthoughtlinks,omitempty"` // Has many ModelPublicThoughtLinks + RelToIDPublicThoughtLinks []*ModelPublicThoughtLinks `bun:"rel:has-many,join:id=to_id" json:"reltoidpublicthoughtlinks,omitempty"` // Has many ModelPublicThoughtLinks + RelThoughtIDPublicEmbeddings []*ModelPublicEmbeddings `bun:"rel:has-many,join:id=thought_id" json:"relthoughtidpublicembeddings,omitempty"` // Has many ModelPublicEmbeddings + RelThoughtIDPublicStoredFiles []*ModelPublicStoredFiles `bun:"rel:has-many,join:id=thought_id" json:"relthoughtidpublicstoredfiles,omitempty"` // Has many ModelPublicStoredFiles + RelRelatedThoughtIDPublicLearnings []*ModelPublicLearnings `bun:"rel:has-many,join:id=related_thought_id" json:"relrelatedthoughtidpubliclearnings,omitempty"` // Has many ModelPublicLearnings +} + +// TableName returns the table name for ModelPublicThoughts +func (m ModelPublicThoughts) TableName() string { + return "public.thoughts" +} + +// TableNameOnly returns the table name without schema for ModelPublicThoughts +func (m ModelPublicThoughts) TableNameOnly() string { + return "thoughts" +} + +// SchemaName returns the schema name for ModelPublicThoughts +func (m ModelPublicThoughts) SchemaName() string { + return "public" +} + +// GetID returns the primary key value +func (m ModelPublicThoughts) GetID() int64 { + return m.ID.Int64() +} + +// GetIDStr returns the primary key as a string +func (m ModelPublicThoughts) GetIDStr() string { + return fmt.Sprintf("%v", m.ID) +} + +// SetID sets the primary key value +func (m ModelPublicThoughts) SetID(newid int64) { + m.UpdateID(newid) +} + +// UpdateID updates the primary key value +func (m *ModelPublicThoughts) UpdateID(newid int64) { + m.ID.FromString(fmt.Sprintf("%d", newid)) +} + +// GetIDName returns the name of the primary key column +func (m ModelPublicThoughts) GetIDName() string { + return "id" +} + +// GetPrefix returns the table prefix +func (m ModelPublicThoughts) GetPrefix() string { + return "THO" +} diff --git a/internal/generatedmodels/sql_public_tool_annotations.go b/internal/generatedmodels/sql_public_tool_annotations.go new file mode 100644 index 0000000..0c386ce --- /dev/null +++ b/internal/generatedmodels/sql_public_tool_annotations.go @@ -0,0 +1,62 @@ +// Code generated by relspecgo. DO NOT EDIT. +package generatedmodels + +import ( + "fmt" + resolvespec_common "github.com/bitechdev/ResolveSpec/pkg/spectypes" + "github.com/uptrace/bun" +) + +type ModelPublicToolAnnotations struct { + bun.BaseModel `bun:"table:public.tool_annotations,alias:tool_annotations"` + 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"` + Notes resolvespec_common.SqlString `bun:"notes,type:text,default:'',notnull," json:"notes"` + ToolName resolvespec_common.SqlString `bun:"tool_name,type:text,notnull," json:"tool_name"` + UpdatedAt resolvespec_common.SqlTimeStamp `bun:"updated_at,type:timestamptz,default:now(),notnull," json:"updated_at"` +} + +// TableName returns the table name for ModelPublicToolAnnotations +func (m ModelPublicToolAnnotations) TableName() string { + return "public.tool_annotations" +} + +// TableNameOnly returns the table name without schema for ModelPublicToolAnnotations +func (m ModelPublicToolAnnotations) TableNameOnly() string { + return "tool_annotations" +} + +// SchemaName returns the schema name for ModelPublicToolAnnotations +func (m ModelPublicToolAnnotations) SchemaName() string { + return "public" +} + +// GetID returns the primary key value +func (m ModelPublicToolAnnotations) GetID() int64 { + return m.ID.Int64() +} + +// GetIDStr returns the primary key as a string +func (m ModelPublicToolAnnotations) GetIDStr() string { + return fmt.Sprintf("%v", m.ID) +} + +// SetID sets the primary key value +func (m ModelPublicToolAnnotations) SetID(newid int64) { + m.UpdateID(newid) +} + +// UpdateID updates the primary key value +func (m *ModelPublicToolAnnotations) UpdateID(newid int64) { + m.ID.FromString(fmt.Sprintf("%d", newid)) +} + +// GetIDName returns the name of the primary key column +func (m ModelPublicToolAnnotations) GetIDName() string { + return "id" +} + +// GetPrefix returns the table prefix +func (m ModelPublicToolAnnotations) GetPrefix() string { + return "TAO" +}