// 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"` 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 fmt.Sprintf("%v", m.ID) } // 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" }