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
66 lines
2.7 KiB
Go
66 lines
2.7 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 ModelPublicFamilyMembers struct {
|
|
bun.BaseModel `bun:"table:public.family_members,alias:family_members"`
|
|
ID resolvespec_common.SqlUUID `bun:"id,type:uuid,pk,default:gen_random_uuid()," json:"id"`
|
|
BirthDate resolvespec_common.SqlDate `bun:"birth_date,type:date,nullzero," json:"birth_date"`
|
|
CreatedAt resolvespec_common.SqlTimeStamp `bun:"created_at,type:timestamptz,default:now(),notnull," json:"created_at"`
|
|
Name resolvespec_common.SqlString `bun:"name,type:text,notnull," json:"name"`
|
|
Notes resolvespec_common.SqlString `bun:"notes,type:text,nullzero," json:"notes"`
|
|
Relationship resolvespec_common.SqlString `bun:"relationship,type:text,nullzero," json:"relationship"`
|
|
RelFamilyMemberIDPublicActivities []*ModelPublicActivities `bun:"rel:has-many,join:id=family_member_id" json:"relfamilymemberidpublicactivities,omitempty"` // Has many ModelPublicActivities
|
|
RelFamilyMemberIDPublicImportantDates []*ModelPublicImportantDates `bun:"rel:has-many,join:id=family_member_id" json:"relfamilymemberidpublicimportantdates,omitempty"` // Has many ModelPublicImportantDates
|
|
}
|
|
|
|
// TableName returns the table name for ModelPublicFamilyMembers
|
|
func (m ModelPublicFamilyMembers) TableName() string {
|
|
return "public.family_members"
|
|
}
|
|
|
|
// TableNameOnly returns the table name without schema for ModelPublicFamilyMembers
|
|
func (m ModelPublicFamilyMembers) TableNameOnly() string {
|
|
return "family_members"
|
|
}
|
|
|
|
// SchemaName returns the schema name for ModelPublicFamilyMembers
|
|
func (m ModelPublicFamilyMembers) SchemaName() string {
|
|
return "public"
|
|
}
|
|
|
|
// GetID returns the primary key value
|
|
func (m ModelPublicFamilyMembers) GetID() int64 {
|
|
return m.ID.Int64()
|
|
}
|
|
|
|
// GetIDStr returns the primary key as a string
|
|
func (m ModelPublicFamilyMembers) GetIDStr() string {
|
|
return fmt.Sprintf("%v", m.ID)
|
|
}
|
|
|
|
// SetID sets the primary key value
|
|
func (m ModelPublicFamilyMembers) SetID(newid int64) {
|
|
m.UpdateID(newid)
|
|
}
|
|
|
|
// UpdateID updates the primary key value
|
|
func (m *ModelPublicFamilyMembers) UpdateID(newid int64) {
|
|
m.ID.FromString(fmt.Sprintf("%d", newid))
|
|
}
|
|
|
|
// GetIDName returns the name of the primary key column
|
|
func (m ModelPublicFamilyMembers) GetIDName() string {
|
|
return "id"
|
|
}
|
|
|
|
// GetPrefix returns the table prefix
|
|
func (m ModelPublicFamilyMembers) GetPrefix() string {
|
|
return "FMA"
|
|
}
|