github.com/condensat/bank-core@v0.1.0/database/model/account.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 AccountID ID 8 type AccountName String 9 10 type Account struct { 11 ID AccountID `gorm:"primary_key"` // [PK] Account 12 UserID UserID `gorm:"index;not null"` // [FK] Reference to User table 13 CurrencyName CurrencyName `gorm:"index;not null;type:varchar(16)"` // [FK] Reference to Currency table 14 Name AccountName `gorm:"index;not null"` // [U] Unique Account name for User and Currency 15 }