196b543bee
CI / build-and-test (push) Successful in 1m47s
* Implement tenant and user creation in IdentityPage * Add API calls for managing tenants and users * Introduce tenant-scoped API requests * Update sidebar to include identity navigation * Create BooleanStatusBadge component for key status
68 lines
2.7 KiB
Go
68 lines
2.7 KiB
Go
// Code generated by relspecgo. DO NOT EDIT.
|
|
package generatedmodels
|
|
|
|
import (
|
|
"fmt"
|
|
sql_types "git.warky.dev/wdevs/relspecgo/pkg/sqltypes"
|
|
"github.com/uptrace/bun"
|
|
)
|
|
|
|
type ModelPublicCharacterArcs struct {
|
|
bun.BaseModel `bun:"table:public.character_arcs,alias:character_arcs"`
|
|
ID sql_types.SqlInt64 `bun:"id,type:bigserial,pk,autoincrement," json:"id"`
|
|
CreatedAt sql_types.SqlTimeStamp `bun:"created_at,type:timestamptz,default:now(),notnull," json:"created_at"`
|
|
Description sql_types.SqlString `bun:"description,type:text,default:'',notnull," json:"description"`
|
|
Name sql_types.SqlString `bun:"name,type:text,notnull," json:"name"`
|
|
Summary sql_types.SqlString `bun:"summary,type:text,default:'',notnull," json:"summary"`
|
|
TenantID sql_types.SqlString `bun:"tenant_id,type:text,nullzero," json:"tenant_id"`
|
|
UpdatedAt sql_types.SqlTimeStamp `bun:"updated_at,type:timestamptz,default:now(),notnull," json:"updated_at"`
|
|
RelTenantID *ModelPublicTenants `bun:"rel:has-one,join:tenant_id=id" json:"reltenantid,omitempty"` // Has one ModelPublicTenants
|
|
RelArcIDPublicArcStages []*ModelPublicArcStages `bun:"rel:has-many,join:id=arc_id" json:"relarcidpublicarcstages,omitempty"` // Has many ModelPublicArcStages
|
|
RelArcIDPublicPersonaArcs []*ModelPublicPersonaArc `bun:"rel:has-many,join:id=arc_id" json:"relarcidpublicpersonaarcs,omitempty"` // Has many ModelPublicPersonaArc
|
|
}
|
|
|
|
// TableName returns the table name for ModelPublicCharacterArcs
|
|
func (m ModelPublicCharacterArcs) TableName() string {
|
|
return "public.character_arcs"
|
|
}
|
|
|
|
// TableNameOnly returns the table name without schema for ModelPublicCharacterArcs
|
|
func (m ModelPublicCharacterArcs) TableNameOnly() string {
|
|
return "character_arcs"
|
|
}
|
|
|
|
// SchemaName returns the schema name for ModelPublicCharacterArcs
|
|
func (m ModelPublicCharacterArcs) SchemaName() string {
|
|
return "public"
|
|
}
|
|
|
|
// GetID returns the primary key value
|
|
func (m ModelPublicCharacterArcs) GetID() int64 {
|
|
return m.ID.Int64()
|
|
}
|
|
|
|
// GetIDStr returns the primary key as a string
|
|
func (m ModelPublicCharacterArcs) GetIDStr() string {
|
|
return m.ID.String()
|
|
}
|
|
|
|
// SetID sets the primary key value
|
|
func (m ModelPublicCharacterArcs) SetID(newid int64) {
|
|
m.UpdateID(newid)
|
|
}
|
|
|
|
// UpdateID updates the primary key value
|
|
func (m *ModelPublicCharacterArcs) UpdateID(newid int64) {
|
|
m.ID.FromString(fmt.Sprintf("%d", newid))
|
|
}
|
|
|
|
// GetIDName returns the name of the primary key column
|
|
func (m ModelPublicCharacterArcs) GetIDName() string {
|
|
return "id"
|
|
}
|
|
|
|
// GetPrefix returns the table prefix
|
|
func (m ModelPublicCharacterArcs) GetPrefix() string {
|
|
return "CAH"
|
|
}
|