refactor(store): replace project and skill models with generated models
Some checks failed
CI / build-and-test (push) Failing after -31m25s
Some checks failed
CI / build-and-test (push) Failing after -31m25s
* Update project creation and retrieval to use generated models * Modify skill addition and listing to utilize generated models * Refactor thought handling to incorporate generated models * Adjust tool annotations to align with new model structure * Update API calls in the UI to use new ResolveSpec-based endpoints * Enhance stats retrieval logic to aggregate thought metadata
This commit is contained in:
63
internal/generatedmodels/sql_public_project_skills.go
Normal file
63
internal/generatedmodels/sql_public_project_skills.go
Normal file
@@ -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.SqlInt32 `bun:"id,type:serial,pk,autoincrement," json:"id"`
|
||||
CreatedAt resolvespec_common.SqlTimeStamp `bun:"created_at,type:timestamptz,default:now(),notnull," json:"created_at"`
|
||||
ProjectID resolvespec_common.SqlUUID `bun:"project_id,type:uuid,notnull," json:"project_id"`
|
||||
SkillID resolvespec_common.SqlUUID `bun:"skill_id,type:uuid,notnull," json:"skill_id"`
|
||||
RelProjectID *ModelPublicProjects `bun:"rel:has-one,join:project_id=guid" 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"
|
||||
}
|
||||
Reference in New Issue
Block a user