Files
amcs/internal/generatedmodels/sql_public_activities.go
Hein db7b152852
Some checks failed
CI / build-and-test (push) Failing after -31m25s
refactor(store): replace project and skill models with generated models
* 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
2026-04-26 12:56:32 +02:00

71 lines
2.9 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 ModelPublicActivities struct {
bun.BaseModel `bun:"table:public.activities,alias:activities"`
ID resolvespec_common.SqlUUID `bun:"id,type:uuid,pk,default:gen_random_uuid()," json:"id"`
ActivityType resolvespec_common.SqlString `bun:"activity_type,type:text,nullzero," json:"activity_type"`
CreatedAt resolvespec_common.SqlTimeStamp `bun:"created_at,type:timestamptz,default:now(),notnull," json:"created_at"`
DayOfWeek resolvespec_common.SqlString `bun:"day_of_week,type:text,nullzero," json:"day_of_week"`
EndDate resolvespec_common.SqlDate `bun:"end_date,type:date,nullzero," json:"end_date"`
EndTime resolvespec_common.SqlTime `bun:"end_time,type:time,nullzero," json:"end_time"`
FamilyMemberID resolvespec_common.SqlUUID `bun:"family_member_id,type:uuid,nullzero," json:"family_member_id"`
Location resolvespec_common.SqlString `bun:"location,type:text,nullzero," json:"location"`
Notes resolvespec_common.SqlString `bun:"notes,type:text,nullzero," json:"notes"`
StartDate resolvespec_common.SqlDate `bun:"start_date,type:date,nullzero," json:"start_date"`
StartTime resolvespec_common.SqlTime `bun:"start_time,type:time,nullzero," json:"start_time"`
Title resolvespec_common.SqlString `bun:"title,type:text,notnull," json:"title"`
RelFamilyMemberID *ModelPublicFamilyMembers `bun:"rel:has-one,join:family_member_id=id" json:"relfamilymemberid,omitempty"` // Has one ModelPublicFamilyMembers
}
// TableName returns the table name for ModelPublicActivities
func (m ModelPublicActivities) TableName() string {
return "public.activities"
}
// TableNameOnly returns the table name without schema for ModelPublicActivities
func (m ModelPublicActivities) TableNameOnly() string {
return "activities"
}
// SchemaName returns the schema name for ModelPublicActivities
func (m ModelPublicActivities) SchemaName() string {
return "public"
}
// GetID returns the primary key value
func (m ModelPublicActivities) GetID() int64 {
return m.ID.Int64()
}
// GetIDStr returns the primary key as a string
func (m ModelPublicActivities) GetIDStr() string {
return fmt.Sprintf("%v", m.ID)
}
// SetID sets the primary key value
func (m ModelPublicActivities) SetID(newid int64) {
m.UpdateID(newid)
}
// UpdateID updates the primary key value
func (m *ModelPublicActivities) UpdateID(newid int64) {
m.ID.FromString(fmt.Sprintf("%d", newid))
}
// GetIDName returns the name of the primary key column
func (m ModelPublicActivities) GetIDName() string {
return "id"
}
// GetPrefix returns the table prefix
func (m ModelPublicActivities) GetPrefix() string {
return "ACT"
}