feat(ui): add identity management for tenants and users
CI / build-and-test (push) Successful in 1m47s
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
This commit is contained in:
@@ -0,0 +1,63 @@
|
||||
// Code generated by relspecgo. DO NOT EDIT.
|
||||
package generatedmodels
|
||||
|
||||
import (
|
||||
sql_types "git.warky.dev/wdevs/relspecgo/pkg/sqltypes"
|
||||
"github.com/uptrace/bun"
|
||||
)
|
||||
|
||||
type ModelPublicTenantUsers struct {
|
||||
bun.BaseModel `bun:"table:public.tenant_users,alias:tenant_users"`
|
||||
ID sql_types.SqlString `bun:"id,type:text,pk," json:"id"`
|
||||
CreatedAt sql_types.SqlTimeStamp `bun:"created_at,type:timestamptz,default:now(),notnull," json:"created_at"`
|
||||
Email sql_types.SqlString `bun:"email,type:text,nullzero,unique:uidx_tenant_users_tenant_id_email," json:"email"`
|
||||
Name sql_types.SqlString `bun:"name,type:text,notnull," json:"name"`
|
||||
TenantID sql_types.SqlString `bun:"tenant_id,type:text,notnull,unique:uidx_tenant_users_tenant_id_email," json:"tenant_id"`
|
||||
RelTenantID *ModelPublicTenants `bun:"rel:has-one,join:tenant_id=id" json:"reltenantid,omitempty"` // Has one ModelPublicTenants
|
||||
RelUserIDPublicAPIKeyAssignments []*ModelPublicAPIKeyAssignments `bun:"rel:has-many,join:id=user_id" json:"reluseridpublicapikeyassignments,omitempty"` // Has many ModelPublicAPIKeyAssignments
|
||||
}
|
||||
|
||||
// TableName returns the table name for ModelPublicTenantUsers
|
||||
func (m ModelPublicTenantUsers) TableName() string {
|
||||
return "public.tenant_users"
|
||||
}
|
||||
|
||||
// TableNameOnly returns the table name without schema for ModelPublicTenantUsers
|
||||
func (m ModelPublicTenantUsers) TableNameOnly() string {
|
||||
return "tenant_users"
|
||||
}
|
||||
|
||||
// SchemaName returns the schema name for ModelPublicTenantUsers
|
||||
func (m ModelPublicTenantUsers) SchemaName() string {
|
||||
return "public"
|
||||
}
|
||||
|
||||
// GetID returns the primary key value
|
||||
func (m ModelPublicTenantUsers) GetID() string {
|
||||
return m.ID.String()
|
||||
}
|
||||
|
||||
// GetIDStr returns the primary key as a string
|
||||
func (m ModelPublicTenantUsers) GetIDStr() string {
|
||||
return m.ID.String()
|
||||
}
|
||||
|
||||
// SetID sets the primary key value
|
||||
func (m ModelPublicTenantUsers) SetID(newid string) {
|
||||
m.UpdateID(newid)
|
||||
}
|
||||
|
||||
// UpdateID updates the primary key value
|
||||
func (m *ModelPublicTenantUsers) UpdateID(newid string) {
|
||||
m.ID.FromString(newid)
|
||||
}
|
||||
|
||||
// GetIDName returns the name of the primary key column
|
||||
func (m ModelPublicTenantUsers) GetIDName() string {
|
||||
return "id"
|
||||
}
|
||||
|
||||
// GetPrefix returns the table prefix
|
||||
func (m ModelPublicTenantUsers) GetPrefix() string {
|
||||
return "TUE"
|
||||
}
|
||||
Reference in New Issue
Block a user