c179e014ad
CI / build-and-test (push) Failing after 1m52s
* Introduce project_personas table with foreign keys to projects and agent_personas * Add project_skills table with foreign key to projects and agent_skills * Include override boolean field in agent_persona_skills and project_skills * Update schema and migration files to reflect new tables and fields * Enhance CORS handling to reflect request origin
64 lines
2.2 KiB
Go
64 lines
2.2 KiB
Go
// Code generated by relspecgo. DO NOT EDIT.
|
|
package generatedmodels
|
|
|
|
import (
|
|
"fmt"
|
|
resolvespec_common "github.com/bitechdev/ResolveSpec/pkg/spectypes"
|
|
"github.com/uptrace/bun"
|
|
)
|
|
|
|
type ModelPublicAgentPersonaSkills struct {
|
|
bun.BaseModel `bun:"table:public.agent_persona_skills,alias:agent_persona_skills"`
|
|
ID resolvespec_common.SqlInt64 `bun:"id,type:bigserial,pk,autoincrement," json:"id"`
|
|
Override bool `bun:"override,type:boolean,default:false,notnull," json:"override"`
|
|
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"
|
|
}
|
|
|
|
// GetID returns the primary key value
|
|
func (m ModelPublicAgentPersonaSkills) GetID() int64 {
|
|
return m.ID.Int64()
|
|
}
|
|
|
|
// GetIDStr returns the primary key as a string
|
|
func (m ModelPublicAgentPersonaSkills) GetIDStr() string {
|
|
return m.ID.String()
|
|
}
|
|
|
|
// SetID sets the primary key value
|
|
func (m ModelPublicAgentPersonaSkills) SetID(newid int64) {
|
|
m.UpdateID(newid)
|
|
}
|
|
|
|
// UpdateID updates the primary key value
|
|
func (m *ModelPublicAgentPersonaSkills) UpdateID(newid int64) {
|
|
m.ID.FromString(fmt.Sprintf("%d", newid))
|
|
}
|
|
|
|
// GetIDName returns the name of the primary key column
|
|
func (m ModelPublicAgentPersonaSkills) GetIDName() string {
|
|
return "id"
|
|
}
|
|
|
|
// GetPrefix returns the table prefix
|
|
func (m ModelPublicAgentPersonaSkills) GetPrefix() string {
|
|
return "APS"
|
|
}
|