mirror of
https://github.com/paralus/paralus.git
synced 2026-02-14 17:49:51 +00:00
feat: changes to view audit logs by project and cluster role users --------- Signed-off-by: niravparikh05 <nir.parikh05@gmail.com>
40 lines
1.6 KiB
Go
40 lines
1.6 KiB
Go
package models
|
|
|
|
import (
|
|
"time"
|
|
|
|
"github.com/google/uuid"
|
|
"github.com/uptrace/bun"
|
|
)
|
|
|
|
type KratosIdentityCredentialTypes struct {
|
|
bun.BaseModel `bun:"table:identity_credential_types,alias:ict"`
|
|
|
|
ID uuid.UUID `bun:"id,type:uuid,pk"`
|
|
Name string `bun:"name,type:string"`
|
|
}
|
|
|
|
type KratosIdentityCredentials struct {
|
|
bun.BaseModel `bun:"table:identity_credentials,alias:ic"`
|
|
|
|
ID uuid.UUID `bun:"id,type:uuid,pk"`
|
|
IdentityID uuid.UUID `bun:"identity_id,type:uuid"`
|
|
IdentityCredentialTypeID uuid.UUID `bun:"identity_credential_type_id,type:uuid"`
|
|
IdentityCredentialType KratosIdentityCredentialTypes `bun:"rel:has-one,join:identity_credential_type_id=id"`
|
|
}
|
|
|
|
type KratosIdentities struct {
|
|
bun.BaseModel `bun:"table:identities,alias:identities"`
|
|
|
|
ID uuid.UUID `bun:"id,type:uuid,pk"`
|
|
SchemaId string `bun:"schema_id,notnull"`
|
|
Traits map[string]interface{} `bun:"traits,type:jsonb"`
|
|
CreatedAt time.Time `bun:"created_at,notnull,default:current_timestamp"`
|
|
UpdatedAt time.Time `bun:"updated_at,notnull,default:current_timestamp"`
|
|
State string `bun:"state,notnull"`
|
|
StateChangedAt time.Time `bun:"state_changed_at,notnull,default:current_timestamp"`
|
|
NId uuid.UUID `bun:"nid,type:uuid,pk"`
|
|
IdentityCredential KratosIdentityCredentials `bun:"rel:has-one,join:id=identity_id"`
|
|
MetadataPublic map[string]interface{} `bun:"metadata_public,type:jsonb"`
|
|
}
|