From 23281c192ad9ce0d2d1c359fc857fb2600f0f02b Mon Sep 17 00:00:00 2001 From: Daniil Dulin Date: Tue, 23 Apr 2019 13:18:19 +0300 Subject: [PATCH] add id to stake model --- models/stake.go | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/models/stake.go b/models/stake.go index 18ff4b3..04c05bb 100644 --- a/models/stake.go +++ b/models/stake.go @@ -1,9 +1,10 @@ package models type Stake struct { - OwnerAddressID uint64 `json:"owner_address_id" sql:",pk"` - ValidatorID uint64 `json:"validator_id" sql:",pk"` - CoinID uint64 `json:"coin_id" sql:",pk"` + ID uint64 `json:"id" sql:",pk"` + OwnerAddressID uint64 `json:"owner_address_id"` + ValidatorID uint64 `json:"validator_id"` + CoinID uint64 `json:"coin_id"` Value string `json:"value" sql:"type:numeric(70)"` BipValue string `json:"bip_value" sql:"type:numeric(70)"` Coin *Coin `json:"coins"` //Relation has one to Coins