feat(db): add generated models for public schema entities
CI / build-and-test (push) Has been cancelled
CI / build-and-test (push) Has been cancelled
* Create ModelPublicPersonaArc for persona_arc table * Create ModelPublicPlanDependencies for plan_dependencies table * Create ModelPublicPlanGuardrails for plan_guardrails table * Create ModelPublicPlanRelatedPlans for plan_related_plans table * Create ModelPublicPlanSkills for plan_skills table * Create ModelPublicPlans for plans table * Create ModelPublicProjectGuardrails for project_guardrails table * Create ModelPublicProjectSkills for project_skills table * Create ModelPublicProjects for projects table * Create ModelPublicStoredFiles for stored_files table * Create ModelPublicThoughtLinks for thought_links table * Create ModelPublicThoughts for thoughts table * Create ModelPublicToolAnnotations for tool_annotations table
This commit is contained in:
@@ -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"
|
||||
}
|
||||
Reference in New Issue
Block a user