github.com/condensat/bank-core@v0.1.0/database/model/operationinfo.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 import ( 8 "time" 9 ) 10 11 type OperationInfoID ID 12 type TxID String 13 type Vout ID 14 15 type OperationInfo struct { 16 ID OperationInfoID `gorm:"primary_key;"` // [PK] OperationInfo 17 CryptoAddressID CryptoAddressID `gorm:"index;not null"` // [FK] Reference to CryptoAddress table 18 AssetID AssetID `gorm:"default:0;not null"` // [FK] Reference to Asset table, optional 19 Timestamp time.Time `gorm:"index;not null;type:timestamp"` // Creation timestamp 20 TxID TxID `gorm:"unique_index;not null;size:64"` // Transaction ID 21 Vout Vout `gorm:"default:0"` // Transaction output ID 22 Amount Float `gorm:"default:0.0;not null"` // Operation amount (GTE 0.0) 23 Data String `gorm:"type:json;not null"` // Specific operation json data 24 }