github.com/machinefi/w3bstream@v1.6.5-rc9.0.20240426031326-b8c7c4876e72/pkg/models/account_identity.go (about) 1 package models 2 3 import ( 4 "github.com/machinefi/w3bstream/pkg/depends/kit/sqlx/datatypes" 5 "github.com/machinefi/w3bstream/pkg/enums" 6 ) 7 8 // AccountIdentity account identity 9 // @def primary ID 10 // @def unique_index ui_account_identity AccountID Type 11 // @def unique_index ui_identity_id Type IdentityID 12 // @def index i_identity_id IdentityID 13 // @def index i_source Source 14 // 15 //go:generate toolkit gen model AccountIdentity --database DB 16 type AccountIdentity struct { 17 datatypes.PrimaryID 18 RelAccount 19 AccountIdentityInfo 20 datatypes.OperationTimesWithDeleted 21 } 22 23 type AccountIdentityInfo struct { 24 Type enums.AccountIdentityType `db:"f_type" json:"type"` 25 IdentityID string `db:"f_identity_id" json:"identityID"` 26 Source enums.AccountSource `db:"f_source" json:"source"` 27 Meta Meta `db:"f_meta,default=''" json:"meta"` 28 } 29 30 const ( 31 AccountIdentityMetaKey_EthAddress_Nonce string = "nonce" 32 )