27 lines
797 B
Go
27 lines
797 B
Go
package model
|
|
|
|
import (
|
|
"github.com/tech/sendico/pkg/db/storable"
|
|
"github.com/tech/sendico/pkg/mservice"
|
|
)
|
|
|
|
type ChainAssetKey struct {
|
|
Chain ChainNetwork `bson:"chain" json:"chain" yaml:"chain" mapstructure:"chain"`
|
|
TokenSymbol string `bson:"tokenSymbol" json:"tokenSymbol" yaml:"tokenSymbol" mapstructure:"tokenSymbol"`
|
|
}
|
|
|
|
type ChainAsset struct {
|
|
ChainAssetKey `bson:",inline" json:",inline"`
|
|
ContractAddress *string `bson:"contractAddress,omitempty" json:"contractAddress,omitempty"`
|
|
}
|
|
|
|
type ChainAssetDescription struct {
|
|
storable.Storable `bson:",inline" json:",inline"`
|
|
Describable `bson:",inline" json:",inline"`
|
|
Asset ChainAsset `bson:"asset" json:"asset"`
|
|
}
|
|
|
|
func Collection(*ChainAssetDescription) mservice.Type {
|
|
return mservice.ChainAssets
|
|
}
|