model

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Feb 7, 2024 License: MIT Imports: 1 Imported by: 0

Documentation

Index

Constants

View Source
const TableNameChainM = "api_chain"
View Source
const TableNameMinerM = "api_miner"
View Source
const TableNameMinerSetM = "api_minerset"

Variables

This section is empty.

Functions

This section is empty.

Types

type ChainM

type ChainM struct {
	ID        int64  `gorm:"column:id;type:bigint(20) unsigned;primaryKey;autoIncrement:true;comment:主键 ID" json:"id"` // 主键 ID
	Namespace string ``                                                                                                // 命名空间
	/* 131-byte string literal not displayed */
	Name                   string    `gorm:"column:name;type:varchar(253);not null;uniqueIndex:uniq_namespace_name,priority:2;comment:区块链名" json:"name"` // 区块链名
	DisplayName            string    `gorm:"column:display_name;type:varchar(253);not null;comment:区块链展示名" json:"display_name"`                          // 区块链展示名
	MinerType              string    `gorm:"column:miner_type;type:varchar(16);not null;comment:区块链矿机机型" json:"miner_type"`                              // 区块链矿机机型
	Image                  string    `gorm:"column:image;type:varchar(253);not null;comment:区块链镜像 ID" json:"image"`                                      // 区块链镜像 ID
	MinMineIntervalSeconds int32     `gorm:"column:min_mine_interval_seconds;type:int(8);not null;comment:矿机挖矿间隔" json:"min_mine_interval_seconds"`      // 矿机挖矿间隔
	CreatedAt              time.Time `gorm:"column:created_at;type:datetime;not null;default:current_timestamp();comment:创建时间" json:"created_at"`        // 创建时间
	UpdatedAt              time.Time `gorm:"column:updated_at;type:datetime;not null;default:current_timestamp();comment:最后修改时间" json:"updated_at"`      // 最后修改时间
}

ChainM mapped from table <api_chain>

func (*ChainM) TableName

func (*ChainM) TableName() string

TableName ChainM's table name

type MinerM

type MinerM struct {
	ID        int64  `gorm:"column:id;type:bigint(20) unsigned;primaryKey;autoIncrement:true;comment:主键 ID" json:"id"` // 主键 ID
	Namespace string ``                                                                                                // 命名空间
	/* 131-byte string literal not displayed */
	Name        string `gorm:"column:name;type:varchar(253);not null;uniqueIndex:uniq_namespace_name,priority:2;comment:矿机名" json:"name"` // 矿机名
	DisplayName string `gorm:"column:display_name;type:varchar(253);not null;comment:矿机展示名" json:"display_name"`                          // 矿机展示名
	Phase       string `gorm:"column:phase;type:varchar(45);not null;comment:矿机状态" json:"phase"`                                          // 矿机状态
	MinerType   string `gorm:"column:miner_type;type:varchar(16);not null;comment:矿机机型" json:"miner_type"`                                // 矿机机型
	ChainName   string ``                                                                                                                 // 矿机所属的区块链名
	/* 137-byte string literal not displayed */
	CPU       int32     `gorm:"column:cpu;type:int(8);not null;comment:矿机 CPU 规格" json:"cpu"`                                          // 矿机 CPU 规格
	Memory    int32     `gorm:"column:memory;type:int(8);not null;comment:矿机内存规格" json:"memory"`                                       // 矿机内存规格
	CreatedAt time.Time `gorm:"column:created_at;type:datetime;not null;default:current_timestamp();comment:创建时间" json:"created_at"`   // 创建时间
	UpdatedAt time.Time `gorm:"column:updated_at;type:datetime;not null;default:current_timestamp();comment:最后修改时间" json:"updated_at"` // 最后修改时间
}

MinerM mapped from table <api_miner>

func (*MinerM) TableName

func (*MinerM) TableName() string

TableName MinerM's table name

type MinerSetM

type MinerSetM struct {
	ID        int64  `gorm:"column:id;type:bigint(20) unsigned;primaryKey;autoIncrement:true;comment:主键 ID" json:"id"` // 主键 ID
	Namespace string ``                                                                                                // 命名空间
	/* 131-byte string literal not displayed */
	Name                 string `gorm:"column:name;type:varchar(253);not null;uniqueIndex:uniq_namespace_name,priority:2;comment:矿机池名" json:"name"` // 矿机池名
	Replicas             int32  `gorm:"column:replicas;type:int(8);not null;comment:矿机副本数" json:"replicas"`                                         // 矿机副本数
	DisplayName          string `gorm:"column:display_name;type:varchar(253);not null;comment:矿机池展示名" json:"display_name"`                          // 矿机池展示名
	DeletePolicy         string `gorm:"column:delete_policy;type:varchar(32);not null;comment:矿机池缩容策略" json:"delete_policy"`                        // 矿机池缩容策略
	MinReadySeconds      int32  `gorm:"column:min_ready_seconds;type:int(8);not null;comment:矿机 Ready 最小等待时间" json:"min_ready_seconds"`             // 矿机 Ready 最小等待时间
	FullyLabeledReplicas int32  ``                                                                                                                  // 所有标签匹配的副本数
	/* 126-byte string literal not displayed */
	ReadyReplicas     int32     `gorm:"column:ready_replicas;type:int(8);not null;comment:Ready 副本数" json:"ready_replicas"`                     // Ready 副本数
	AvailableReplicas int32     `gorm:"column:available_replicas;type:int(8);not null;comment:可用副本数" json:"available_replicas"`                 // 可用副本数
	FailureReason     string    `gorm:"column:failure_reason;type:longtext;comment:失败原因" json:"failure_reason"`                                 // 失败原因
	FailureMessage    string    `gorm:"column:failure_message;type:longtext;comment:失败信息" json:"failure_message"`                               // 失败信息
	Conditions        string    `gorm:"column:conditions;type:longtext;comment:矿机池状态" json:"conditions"`                                        // 矿机池状态
	CreatedAt         time.Time `gorm:"column:created_at;type:timestamp;not null;default:current_timestamp();comment:创建时间" json:"created_at"`   // 创建时间
	UpdatedAt         time.Time `gorm:"column:updated_at;type:timestamp;not null;default:current_timestamp();comment:最后修改时间" json:"updated_at"` // 最后修改时间
}

MinerSetM mapped from table <api_minerset>

func (*MinerSetM) TableName

func (*MinerSetM) TableName() string

TableName MinerSetM's table name

Jump to

Keyboard shortcuts

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