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.4 KiB
Go
66 lines
2.4 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 ModelPublicMaintenanceLogs struct {
|
|
bun.BaseModel `bun:"table:public.maintenance_logs,alias:maintenance_logs"`
|
|
ID resolvespec_common.SqlUUID `bun:"id,type:uuid,pk,default:gen_random_uuid()," json:"id"`
|
|
CompletedAt resolvespec_common.SqlTimeStamp `bun:"completed_at,type:timestamptz,default:now(),notnull," json:"completed_at"`
|
|
Cost resolvespec_common.SqlFloat64 `bun:"cost,type:decimal(10,2),nullzero," json:"cost"`
|
|
NextAction resolvespec_common.SqlString `bun:"next_action,type:text,nullzero," json:"next_action"`
|
|
Notes resolvespec_common.SqlString `bun:"notes,type:text,nullzero," json:"notes"`
|
|
PerformedBy resolvespec_common.SqlString `bun:"performed_by,type:text,nullzero," json:"performed_by"`
|
|
TaskID resolvespec_common.SqlUUID `bun:"task_id,type:uuid,notnull," json:"task_id"`
|
|
RelTaskID *ModelPublicMaintenanceTasks `bun:"rel:has-one,join:task_id=id" json:"reltaskid,omitempty"` // Has one ModelPublicMaintenanceTasks
|
|
}
|
|
|
|
// TableName returns the table name for ModelPublicMaintenanceLogs
|
|
func (m ModelPublicMaintenanceLogs) TableName() string {
|
|
return "public.maintenance_logs"
|
|
}
|
|
|
|
// TableNameOnly returns the table name without schema for ModelPublicMaintenanceLogs
|
|
func (m ModelPublicMaintenanceLogs) TableNameOnly() string {
|
|
return "maintenance_logs"
|
|
}
|
|
|
|
// SchemaName returns the schema name for ModelPublicMaintenanceLogs
|
|
func (m ModelPublicMaintenanceLogs) SchemaName() string {
|
|
return "public"
|
|
}
|
|
|
|
// GetID returns the primary key value
|
|
func (m ModelPublicMaintenanceLogs) GetID() int64 {
|
|
return m.ID.Int64()
|
|
}
|
|
|
|
// GetIDStr returns the primary key as a string
|
|
func (m ModelPublicMaintenanceLogs) GetIDStr() string {
|
|
return fmt.Sprintf("%v", m.ID)
|
|
}
|
|
|
|
// SetID sets the primary key value
|
|
func (m ModelPublicMaintenanceLogs) SetID(newid int64) {
|
|
m.UpdateID(newid)
|
|
}
|
|
|
|
// UpdateID updates the primary key value
|
|
func (m *ModelPublicMaintenanceLogs) UpdateID(newid int64) {
|
|
m.ID.FromString(fmt.Sprintf("%d", newid))
|
|
}
|
|
|
|
// GetIDName returns the name of the primary key column
|
|
func (m ModelPublicMaintenanceLogs) GetIDName() string {
|
|
return "id"
|
|
}
|
|
|
|
// GetPrefix returns the table prefix
|
|
func (m ModelPublicMaintenanceLogs) GetPrefix() string {
|
|
return "MLA"
|
|
}
|