orm

package
v1.1.3 Latest Latest
Warning

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

Go to latest
Published: May 23, 2020 License: AGPL-3.0 Imports: 5 Imported by: 3

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Asset

type Asset struct {
	ID                    uint64           `gorm:"primary_key;foreignkey:ID" json:"-"`
	AssetID               string           `json:"asset_id"`
	IssuanceProgram       string           `json:"-"`
	VMVersion             uint64           `json:"-"`
	Definition            string           `json:"-"`
	IsOpenFederationIssue bool             `json:"_"`
	CreatedAt             common.Timestamp `json:"-"`
	UpdatedAt             common.Timestamp `json:"-"`
}

type Chain

type Chain struct {
	ID          uint64           `gorm:"primary_key" json:"-"`
	Name        string           `json:"name"`
	BlockHeight uint64           `json:"block_height"`
	BlockHash   string           `json:"block_hash"`
	CreatedAt   common.Timestamp `json:"-"`
	UpdatedAt   common.Timestamp `json:"-"`
}

type CrossTransaction

type CrossTransaction struct {
	ID                   uint64 `gorm:"primary_key"`
	ChainID              uint64
	SourceBlockHeight    uint64
	SourceBlockTimestamp uint64
	SourceBlockHash      string
	SourceTxIndex        uint64
	SourceMuxID          string
	SourceTxHash         string
	SourceRawTransaction string
	DestBlockHeight      sql.NullInt64  `sql:"default:null"`
	DestBlockTimestamp   sql.NullInt64  `sql:"default:null"`
	DestBlockHash        sql.NullString `sql:"default:null"`
	DestTxIndex          sql.NullInt64  `sql:"default:null"`
	DestTxHash           sql.NullString `sql:"default:null"`
	Status               uint8
	CreatedAt            common.Timestamp
	UpdatedAt            common.Timestamp

	Chain *Chain `gorm:"foreignkey:ChainID"`
	Reqs  []*CrossTransactionReq
}

func (*CrossTransaction) MarshalJSON

func (c *CrossTransaction) MarshalJSON() ([]byte, error)

type CrossTransactionReq

type CrossTransactionReq struct {
	ID                 uint64           `gorm:"primary_key" json:"-"`
	CrossTransactionID uint64           `json:"-"`
	SourcePos          uint64           `json:"-"`
	AssetID            uint64           `json:"-"`
	AssetAmount        uint64           `json:"amount"`
	Script             string           `json:"-"`
	FromAddress        string           `json:"from_address"`
	ToAddress          string           `json:"to_address"`
	CreatedAt          common.Timestamp `json:"-"`
	UpdatedAt          common.Timestamp `json:"-"`

	CrossTransaction *CrossTransaction `gorm:"foreignkey:CrossTransactionID" json:"-"`
	Asset            *Asset            `json:"asset"`
}

Jump to

Keyboard shortcuts

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