models

package
v0.2.7 Latest Latest
Warning

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

Go to latest
Published: Nov 27, 2023 License: Apache-2.0 Imports: 1 Imported by: 3

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Deposit

type Deposit struct {
	ID             int    `json:"id" gorm:"primary_key:true;column:id;auto_increment;not null"`
	Owner          string `json:"owner" gorm:"column:owner;index:idx_deposit_owner;not null"`
	TokenAddress   string `json:"tokenAddress" gorm:"column:token_address;index:idx_deposit_token_address;not null"`
	TokenNumber    int    `json:"tokenNumber" gorm:"column:token_number;not null"`
	BlockNumber    int64  `json:"blockNumber" gorm:"column:block_number;index:idx_deposit_block_number;not null"`
	SidechainToken string `json:"sidechainToken" gorm:"column:sidechain_token;not null"`
	Standard       int    `json:"standard" gorm:"column:standard;not null"`
}

func (Deposit) BeforeCreate

func (m Deposit) BeforeCreate(tx *gorm.DB) (err error)

func (Deposit) TableName

func (m Deposit) TableName() string

type ProcessedReceipt

type ProcessedReceipt struct {
	ID        int   `json:"id" gorm:"primary_key:true;column:id;auto_increment;not null"`
	TaskId    int   `json:"taskId" gorm:"column:task_id;uniqueIndex:idx_processedReceipt_taskId_receiptId;not null"`
	ReceiptId int64 `json:"receiptId" gorm:"column:receipt_id;uniqueIndex:idx_processedReceipt_taskId_receiptId;not null"`
}

func (ProcessedReceipt) BeforeCreate

func (m ProcessedReceipt) BeforeCreate(tx *gorm.DB) (err error)

func (ProcessedReceipt) TableName

func (m ProcessedReceipt) TableName() string

type Task

type Task struct {
	ID                int    `json:"id" gorm:"primary_key:true;column:id;auto_increment;not null"`
	ChainId           string `json:"chainId" gorm:"column:chain_id;index:idx_job_chain_id;not null"`
	FromChainId       string `json:"fromChainId" gorm:"column:from_chain_id;not null"`
	Type              string `json:"type" gorm:"column:task_type;not null"`
	Data              string `json:"data" gorm:"column:data;not null"`
	Retries           int    `json:"retries" gorm:"column:retries;not null"`
	Status            string `json:"status" gorm:"column:status;not null"`
	LastError         string `json:"lastError" gorm:"column:last_error"`
	TransactionHash   string `json:"transactionHash" gorm:"transaction_hash;index:idx_task_transaction_hash;not null"`
	FromTransaction   string `json:"fromTransaction" gorm:"from_transaction;index:idx_task_from_transaction;not null"`
	TransactionStatus int    `json:"transactionStatus" gorm:"transaction_status;index:idx_task_transaction_status;not null"`
	CreatedAt         int64  `json:"createdAt" gorm:"column:created_at;type:bigint;index:idx_task_created_at;not null"`
	TxCreatedAt       int64  `json:"txCreatedAt" gorm:"column:tx_created_at;type:bigint;index:idx_task_tx_created_at;not null;default:0"`
}

func (Task) BeforeCreate

func (m Task) BeforeCreate(tx *gorm.DB) (err error)

func (Task) TableName

func (m Task) TableName() string

type Withdrawal

type Withdrawal struct {
	ID                   int    `json:"id" gorm:"primary_key:true;column:id;auto_increment;not null"`
	WithdrawalId         int64  `json:"withdrawalId" gorm:"column:withdrawal_id;unique;not null"`
	ExternalAddress      string `json:"externalAddress" gorm:"column:external_address;index:idx_withdrawal_external_address;not null"`
	ExternalTokenAddress string `json:"externalTokenAddress" gorm:"column:external_token_address;index:idx_withdrawal_external_token_address;not null"`
	ExternalChainId      int64  `json:"externalChainId" gorm:"column:external_chain_id;not null"`
	RoninAddress         string `json:"roninAddress" gorm:"column:ronin_address;index:idx_withdrawal_ronin_address;not null"`
	RoninTokenAddress    string `json:"roninTokenAddress" gorm:"column:ronin_token_address;index:idx_withdrawal_ronin_token_address;not null"`
	TokenErc             uint8  `json:"tokenERC" gorm:"column:token_erc;not null"`
	TokenId              int64  `json:"tokenId" gorm:"column:token_id;not null"`
	TokenQuantity        string `json:"tokenQuantity" gorm:"column:token_quantity;not null"`
	Transaction          string `json:"transaction" gorm:"column:transaction;index:idx_withdrawal_transaction;not null"`
}

func (Withdrawal) BeforeCreate

func (m Withdrawal) BeforeCreate(tx *gorm.DB) (err error)

func (Withdrawal) TableName

func (m Withdrawal) TableName() string

Jump to

Keyboard shortcuts

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