Files
amcs/internal/generatedmodels/sql_public_character_arcs.go
Hein (Warky) e285a03639
Some checks failed
CI / build-and-test (push) Failing after -31m18s
Add schema for agent personas, parts, traits, and character arcs
- 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.
2026-05-05 09:43:14 +02:00

66 lines
2.5 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 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"
}