mirror of
https://github.com/sonr-io/sonr.git
synced 2026-08-03 01:41:44 +00:00
* fix: update commitizen version * feat: add WASM build tags to db actions * feat: Update all actions to follow `AddAsset` for error handling * feat: remove database dependency in dwn and motr commands * feat: add basic info form to registration view * feat: implement basic browser navigation component * refactor: move database related files to middleware * fix: remove unused test command * fix: update source directory for buf-publish workflow
277 lines
3.5 KiB
Plaintext
277 lines
3.5 KiB
Plaintext
@go.Package { name = "github.com/onsonr/sonr/internal/dwn/models" }
|
|
|
|
module models
|
|
|
|
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
|
|
data: String
|
|
|
|
@JsonField
|
|
role: Int
|
|
|
|
@JsonField
|
|
createdAt: String?
|
|
}
|
|
|
|
class Permission {
|
|
@PrimaryKey
|
|
id: UInt
|
|
|
|
@JsonField
|
|
serviceId: String
|
|
|
|
@JsonField
|
|
grants: String
|
|
|
|
@JsonField
|
|
scopes: String
|
|
|
|
@JsonField
|
|
createdAt: String?
|
|
|
|
@JsonField
|
|
updatedAt: String?
|
|
}
|
|
|
|
|
|
|
|
|
|
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<String>
|
|
|
|
@JsonField
|
|
response_types_supported: List<String>
|
|
|
|
@JsonField
|
|
response_modes_supported: List<String>
|
|
|
|
@JsonField
|
|
subject_types_supported: List<String>
|
|
|
|
@JsonField
|
|
id_token_signing_alg_values_supported: List<String>
|
|
|
|
@JsonField
|
|
claims_supported: List<String>
|
|
|
|
@JsonField
|
|
grant_types_supported: List<String>
|
|
|
|
@JsonField
|
|
acr_values_supported: List<String>
|
|
|
|
@JsonField
|
|
token_endpoint_auth_methods_supported: List<String>
|
|
}
|