@go.Package { name = "github.com/onsonr/sonr/internal/db/orm" } module orm import "package://pkg.pkl-lang.org/pkl-go/pkl.golang@0.5.0#/go.pkl" class PrimaryKey extends go.Field { structTags { ["gorm"] = "primaryKey,autoIncrement" ["json"] = "%{name},omitempty" ["query"] = "%{name}" } } class Unique extends go.Field { structTags { ["gorm"] = "unique" ["json"] = "%{name},omitempty" } } class Default extends go.Field { defaultValue: String structTags { ["gorm"] = "default:%{defaultValue}" ["json"] = "%{name},omitempty" } } class NotNull extends go.Field { structTags { ["gorm"] = "not null" } } class ForeignKey extends go.Field { references: String structTags { ["gorm"] = "foreignKey:%{references}" } } class JsonField extends go.Field { structTags { ["json"] = "%{name},omitempty" ["param"] = "%{name}" } } class Account { @PrimaryKey id: UInt @JsonField name: String @JsonField address: String @JsonField publicKey: String @JsonField createdAt: String? } class Asset { @PrimaryKey id: UInt @JsonField name: String @JsonField symbol: String @JsonField decimals: Int @JsonField chainId: Int? @JsonField createdAt: String? } class Chain { @PrimaryKey id: UInt @JsonField name: String @JsonField networkId: String @JsonField createdAt: String? } class Credential { @PrimaryKey id: UInt @JsonField subject: String @JsonField controller: String @JsonField attestationType: String @JsonField origin: String @JsonField credentialId: String @JsonField publicKey: String @JsonField transport: String @JsonField signCount: UInt @JsonField userPresent: Boolean @JsonField userVerified: Boolean @JsonField backupEligible: Boolean @JsonField backupState: Boolean @JsonField cloneWarning: Boolean @JsonField createdAt: String? @JsonField updatedAt: String? } class Profile { @PrimaryKey id: String @JsonField subject: String @JsonField controller: String @JsonField originUri: String? @JsonField publicMetadata: String? @JsonField privateMetadata: String? @JsonField createdAt: String? @JsonField updatedAt: String? } class Property { @PrimaryKey id: UInt @JsonField profileId: String @JsonField key: String @JsonField accumulator: String @JsonField propertyKey: String } class Keyshare { @PrimaryKey id: UInt @JsonField metadata: String @JsonField payloads: String @JsonField protocol: String @JsonField publicKey: String @JsonField role: Int @JsonField version: Int @JsonField createdAt: String? } class PublicKey { @PrimaryKey id: UInt @JsonField role: Int @JsonField algorithm: Int @JsonField encoding: Int @JsonField jwk: String @JsonField createdAt: String? } class Permission { @PrimaryKey id: UInt @JsonField serviceId: String @JsonField grants: String @JsonField scopes: String @JsonField createdAt: String? @JsonField updatedAt: String? } // // OpenID Connect // class DiscoveryDocument { @JsonField issuer: String @JsonField authorization_endpoint: String @JsonField token_endpoint: String @JsonField userinfo_endpoint: String @JsonField jwks_uri: String @JsonField registration_endpoint: String @JsonField scopes_supported: List @JsonField response_types_supported: List @JsonField response_modes_supported: List @JsonField subject_types_supported: List @JsonField id_token_signing_alg_values_supported: List @JsonField claims_supported: List @JsonField grant_types_supported: List @JsonField acr_values_supported: List @JsonField token_endpoint_auth_methods_supported: List }