github.com/condensat/bank-core@v0.1.0/database/model/asset.go (about)

     1  // Copyright 2020 Condensat Tech. All rights reserved.
     2  // Use of this source code is governed by a MIT
     3  // license that can be found in the LICENSE file.
     4  
     5  package model
     6  
     7  type AssetID ID
     8  type AssetHash String
     9  
    10  type Asset struct {
    11  	ID           AssetID      `gorm:"primary_key;"`                                          // [PK] Asset
    12  	CurrencyName CurrencyName `gorm:"index;unique_index:idx_currency_hash;not null;size:16"` // [FK] Currency, non mutable`
    13  	Hash         AssetHash    `gorm:"index;unique_index:idx_currency_hash;not null;size:64"` //  Asset Hash
    14  }