github.com/condensat/bank-core@v0.1.0/database/model/currencyrate.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 CurrencyRateID ID 12 type CurrencyRateSource String 13 type CurrencyRateValue Float 14 15 type CurrencyRate struct { 16 ID CurrencyRateID `gorm:"primary_key"` 17 Timestamp time.Time `gorm:"index;not null;type:timestamp"` 18 Source CurrencyRateSource `gorm:"index;not null;type:varchar(16)"` 19 Base CurrencyName `gorm:"index;not null;type:varchar(16)"` 20 Name CurrencyName `gorm:"index;not null;type:varchar(16)"` 21 Rate CurrencyRateValue `gorm:"not null"` 22 }