Commit c415be52 authored by szh's avatar szh

update models

parent a97db132
package models package models
type RaspConfig struct { type RaspConfig struct {
Model //Model
Height int64 `json:"height"` Height int64 `json:"height"`
Config string `json:"config"` Config string `json:"config";gorm:"PRIMARY_KEY"`
} }
// GetHeight get lastheight in chain33 // GetHeight get lastheight in chain33
......
...@@ -5,8 +5,8 @@ import ( ...@@ -5,8 +5,8 @@ import (
) )
type RaspMinerStat struct { type RaspMinerStat struct {
Model //Model
Addr string `json:"addr"` Addr string `json:"addr";gorm:"PRIMARY_KEY"`
MinedAmount int64 `json:"mined_amount"` MinedAmount int64 `json:"mined_amount"`
MinedTicketCount int64 `json:"mined_ticket_count"` MinedTicketCount int64 `json:"mined_ticket_count"`
MiningTicketCount int64 `json:"mining_ticket_count"` MiningTicketCount int64 `json:"mining_ticket_count"`
......
...@@ -5,8 +5,8 @@ import ( ...@@ -5,8 +5,8 @@ import (
) )
type RaspMinerTxs struct { type RaspMinerTxs struct {
Model //Model
Miner string `json:"miner"` Miner string `json:"miner";gorm:"INDEX"`
ReturnAddr string `json:"return_addr"` ReturnAddr string `json:"return_addr"`
Amount int64 `json:"amount"` Amount int64 `json:"amount"`
Height int64 `json:"height"` Height int64 `json:"height"`
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment