mining

package
v0.0.13 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Sep 26, 2021 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var AllModels = []interface{}{
	&models.System{},

	&Block{},
	&Progress{},
	&Schedule{},
	&UserInfo{},
}

AllModels collects available models.

Functions

This section is empty.

Types

type Block added in v0.0.2

type Block struct {
	ID        string `gorm:"column:id;type:varchar(129);not null;primary_key" json:"id"`
	Number    int64  `gorm:"column:number;type:bigint;not null" json:"number"`
	Timestamp int64  `gorm:"column:timestamp;type:bigint;not null" json:"timestamp"`
	models.Base
}

func (*Block) ForeignKeyConstraints added in v0.0.2

func (*Block) ForeignKeyConstraints() []models.ForeignKeyConstraint

ForeignKeyConstraints create foreign key constraints.

func (*Block) Indexes added in v0.0.2

func (*Block) Indexes() []models.CustomIndex

Indexes returns information to create index.

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"`
	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 UserInfo

type UserInfo struct {
	ID        int64           `gorm:"column:id;primary_key;AUTO_INCREMENT;not null"`
	Trader    string          `gorm:"column:trader;type:varchar(128);not null" json:"trader"`
	Fee       decimal.Decimal `gorm:"column:fee;type:decimal(38,18);not null" json:"fee"`
	OI        decimal.Decimal `gorm:"column:oi;type:decimal(38,18);not null" json:"oi"`
	Stake     decimal.Decimal `gorm:"column:stake;type:decimal(38,18);not null" json:"stake"`
	Score     decimal.Decimal `gorm:"column:score;type:decimal(38,18);not null" json:"score"`
	Epoch     int64           `gorm:"column:epoch;type:bigint;not null" json:"epoch"`
	Timestamp int64           `gorm:"column:timestamp;type:bigint;not null" json:"timestamp"`

	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.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL