fix: remove redundant code in processing logic
Some checks failed
CI / build-and-test (push) Failing after -31m35s
Some checks failed
CI / build-and-test (push) Failing after -31m35s
This commit is contained in:
63
internal/generatedmodels/sql_public_plan_related_plans.go
Normal file
63
internal/generatedmodels/sql_public_plan_related_plans.go
Normal file
@@ -0,0 +1,63 @@
|
||||
// Code generated by relspecgo. DO NOT EDIT.
|
||||
package generatedmodels
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
resolvespec_common "github.com/bitechdev/ResolveSpec/pkg/spectypes"
|
||||
"github.com/uptrace/bun"
|
||||
)
|
||||
|
||||
type ModelPublicPlanRelatedPlans struct {
|
||||
bun.BaseModel `bun:"table:public.plan_related_plans,alias:plan_related_plans"`
|
||||
ID resolvespec_common.SqlInt32 `bun:"id,type:serial,pk,autoincrement," json:"id"`
|
||||
CreatedAt resolvespec_common.SqlTimeStamp `bun:"created_at,type:timestamptz,default:now(),notnull," json:"created_at"`
|
||||
PlanAID resolvespec_common.SqlUUID `bun:"plan_a_id,type:uuid,notnull,unique:uidx_plan_related_plans_plan_a_id_plan_b_id," json:"plan_a_id"`
|
||||
PlanBID resolvespec_common.SqlUUID `bun:"plan_b_id,type:uuid,notnull,unique:uidx_plan_related_plans_plan_a_id_plan_b_id," json:"plan_b_id"`
|
||||
RelPlanAID *ModelPublicPlans `bun:"rel:has-one,join:plan_a_id=id" json:"relplanaid,omitempty"` // Has one ModelPublicPlans
|
||||
RelPlanBID *ModelPublicPlans `bun:"rel:has-one,join:plan_b_id=id" json:"relplanbid,omitempty"` // Has one ModelPublicPlans
|
||||
}
|
||||
|
||||
// TableName returns the table name for ModelPublicPlanRelatedPlans
|
||||
func (m ModelPublicPlanRelatedPlans) TableName() string {
|
||||
return "public.plan_related_plans"
|
||||
}
|
||||
|
||||
// TableNameOnly returns the table name without schema for ModelPublicPlanRelatedPlans
|
||||
func (m ModelPublicPlanRelatedPlans) TableNameOnly() string {
|
||||
return "plan_related_plans"
|
||||
}
|
||||
|
||||
// SchemaName returns the schema name for ModelPublicPlanRelatedPlans
|
||||
func (m ModelPublicPlanRelatedPlans) SchemaName() string {
|
||||
return "public"
|
||||
}
|
||||
|
||||
// GetID returns the primary key value
|
||||
func (m ModelPublicPlanRelatedPlans) GetID() int64 {
|
||||
return m.ID.Int64()
|
||||
}
|
||||
|
||||
// GetIDStr returns the primary key as a string
|
||||
func (m ModelPublicPlanRelatedPlans) GetIDStr() string {
|
||||
return fmt.Sprintf("%v", m.ID)
|
||||
}
|
||||
|
||||
// SetID sets the primary key value
|
||||
func (m ModelPublicPlanRelatedPlans) SetID(newid int64) {
|
||||
m.UpdateID(newid)
|
||||
}
|
||||
|
||||
// UpdateID updates the primary key value
|
||||
func (m *ModelPublicPlanRelatedPlans) UpdateID(newid int64) {
|
||||
m.ID.FromString(fmt.Sprintf("%d", newid))
|
||||
}
|
||||
|
||||
// GetIDName returns the name of the primary key column
|
||||
func (m ModelPublicPlanRelatedPlans) GetIDName() string {
|
||||
return "id"
|
||||
}
|
||||
|
||||
// GetPrefix returns the table prefix
|
||||
func (m ModelPublicPlanRelatedPlans) GetPrefix() string {
|
||||
return "PRP"
|
||||
}
|
||||
Reference in New Issue
Block a user