Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var AllModels = []interface{}{ &models.System{}, &Progress{}, &Schedule{}, &UserInfo{}, &Snapshot{}, }
AllModels collects available models.
Functions ¶
This section is empty.
Types ¶
type Progress ¶ added in v0.0.2
type Progress struct { TableName types.TableName `gorm:"column:table_name;type:varchar(129);not null;primary_key" json:"table_name"` Epoch int64 `gorm:"column:epoch;type:bigint;not null" json:"epoch"` From int64 `gorm:"column:from;type:bigint;not null" json:"from"` To int64 `gorm:"column:to;type:bigint;not null" json:"to"` Checkpoint int64 `gorm:"column:checkpoint;type:bigint;" json:"checkpoint"` models.Base }
type Schedule ¶ added in v0.0.2
type Schedule struct { Epoch int64 `gorm:"column:epoch;type:bigint;not null" json:"epoch"` StartTime int64 `gorm:"column:start_time;type:bigint;not null" json:"start_time"` EndTime int64 `gorm:"column:end_time;type:bigint;not null" json:"end_time"` WeightFee decimal.Decimal `gorm:"column:weight_fee;type:decimal(38,18);not null" json:"weight_fee"` WeightOI decimal.Decimal `gorm:"column:weight_oi;type:decimal(38,18);not null" json:"weight_oi"` WeightMCB decimal.Decimal `gorm:"column:weight_mcb;type:decimal(38,18);not null" json:"weight_mcb"` }
func (*Schedule) ForeignKeyConstraints ¶ added in v0.0.2
func (*Schedule) ForeignKeyConstraints() []models.ForeignKeyConstraint
ForeignKeyConstraints create foreign key constraints.
func (*Schedule) Indexes ¶ added in v0.0.2
func (*Schedule) Indexes() []models.CustomIndex
Indexes returns information to create index.
type Snapshot ¶ added in v0.0.33
type Snapshot struct { Trader string `gorm:"column:trader;primary_key;type:varchar(128);not null" json:"trader"` Epoch int64 `gorm:"column:epoch;primary_key;type:bigint;not null" json:"epoch"` Chain string `gorm:"column:chain;primary_key;type:varchar(128);not null;default:total" json:"chain"` Timestamp int64 `gorm:"column:timestamp;primary_key;type:bigint;not null" json:"timestamp"` InitFee decimal.Decimal `gorm:"column:init_fee;type:decimal(38,18);not null" json:"init_fee"` AccFee decimal.Decimal `gorm:"column:acc_fee;type:decimal(38,18);not null" json:"acc_fee"` InitTotalFee decimal.Decimal `gorm:"column:init_total_fee;type:decimal(38,18);not null;default:0" json:"init_total_fee"` AccTotalFee decimal.Decimal `gorm:"column:acc_total_fee;type:decimal(38,18);not null;default:0" json:"acc_total_fee"` AccPosValue decimal.Decimal `gorm:"column:acc_pos_value;type:decimal(38,18);not null" json:"acc_pos_value"` CurPosValue decimal.Decimal `gorm:"column:cur_pos_value;type:decimal(38,18);not null" json:"cur_pos_value"` AccStakeScore decimal.Decimal `gorm:"column:acc_stake_score;type:decimal(38,18);not null" json:"acc_stake_score"` CurStakeScore decimal.Decimal `gorm:"column:cur_stake_score;type:decimal(38,18);not null" json:"cur_stake_score"` EstimatedStakeScore decimal.Decimal `gorm:"column:estimated_stake_score;type:decimal(38,18);not null" json:"estimated_stake_score"` Score decimal.Decimal `gorm:"column:score;type:decimal(38,18);not null" json:"score"` models.Base }
Snapshot defines struct to contain information of a user info
func (*Snapshot) ForeignKeyConstraints ¶ added in v0.0.39
func (*Snapshot) ForeignKeyConstraints() []models.ForeignKeyConstraint
ForeignKeyConstraints create foreign key constraints.
func (*Snapshot) Indexes ¶ added in v0.0.39
func (*Snapshot) Indexes() []models.CustomIndex
Indexes returns information to create index.
type UserInfo ¶
type UserInfo struct { Trader string `gorm:"column:trader;primary_key;type:varchar(128);not null" json:"trader"` Epoch int64 `gorm:"column:epoch;primary_key;type:bigint;not null" json:"epoch"` Chain string `gorm:"column:chain;primary_key;type:varchar(128);not null;default:total" json:"chain"` Timestamp int64 `gorm:"column:timestamp;type:bigint;not null" json:"timestamp"` InitFee decimal.Decimal `gorm:"column:init_fee;type:decimal(38,18);not null" json:"init_fee"` AccFee decimal.Decimal `gorm:"column:acc_fee;type:decimal(38,18);not null" json:"acc_fee"` InitTotalFee decimal.Decimal `gorm:"column:init_total_fee;type:decimal(38,18);not null;default:0" json:"init_total_fee"` AccTotalFee decimal.Decimal `gorm:"column:acc_total_fee;type:decimal(38,18);not null;default:0" json:"acc_total_fee"` AccPosValue decimal.Decimal `gorm:"column:acc_pos_value;type:decimal(38,18);not null" json:"acc_pos_value"` CurPosValue decimal.Decimal `gorm:"column:cur_pos_value;type:decimal(38,18);not null" json:"cur_pos_value"` AccStakeScore decimal.Decimal `gorm:"column:acc_stake_score;type:decimal(38,18);not null" json:"acc_stake_score"` CurStakeScore decimal.Decimal `gorm:"column:cur_stake_score;type:decimal(38,18);not null" json:"cur_stake_score"` EstimatedStakeScore decimal.Decimal `gorm:"column:estimated_stake_score;type:decimal(38,18);not null" json:"estimated_stake_score"` Score decimal.Decimal `gorm:"column:score;type:decimal(38,18);not null" json:"score"` models.Base }
UserInfo defines struct to contain information of a user info
func (*UserInfo) ForeignKeyConstraints ¶
func (*UserInfo) ForeignKeyConstraints() []models.ForeignKeyConstraint
ForeignKeyConstraints create foreign key constraints.
func (*UserInfo) Indexes ¶
func (*UserInfo) Indexes() []models.CustomIndex
Indexes returns information to create index.
Click to show internal directories.
Click to hide internal directories.