model

package
v0.0.0-...-4fb02c9 Latest Latest
Warning

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

Go to latest
Published: Dec 1, 2024 License: GPL-3.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var File_domain_transaction_model_transaction_proto protoreflect.FileDescriptor

Functions

This section is empty.

Types

type Transaction

type Transaction struct {

	// Unique identifier of the transaction.
	// @gotags: gorm:"primaryKey;not null"
	Id []byte `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty" gorm:"primaryKey;not null"`
	// Identifier of the block that includes this transaction.
	// @gotags: gorm:"index;not null"
	BlockId string `protobuf:"bytes,2,opt,name=block_id,json=blockId,proto3" json:"block_id,omitempty" gorm:"index;not null"`
	// Address of the sender.
	// @gotags: gorm:"null"
	From []byte `protobuf:"bytes,3,opt,name=from,proto3" json:"from,omitempty" gorm:"null"`
	// Address of the recipient.
	// @gotags: gorm:"null"
	To []byte `protobuf:"bytes,4,opt,name=to,proto3" json:"to,omitempty" gorm:"null"`
	// Amount of currency transferred in the transaction.
	// @gotags: gorm:"not null"
	Amount int64 `protobuf:"varint,5,opt,name=amount,proto3" json:"amount,omitempty" gorm:"not null"`
	// Timestamp of when the transaction was created.
	// @gotags: gorm:"serializer:timestamppb;type:time;not null"`
	Timestamp *timestamppb.Timestamp `protobuf:"bytes,6,opt,name=timestamp,proto3" json:"timestamp,omitempty" gorm:"serializer:timestamppb;type:time;not null"`
	// contains filtered or unexported fields
}

Represents a transaction on the blockchain.

func NewTransactionFromTon

func NewTransactionFromTon(value *tlb.Transaction) *Transaction

NewTransactionFromTon is used to create a new transaction from ton

func (*Transaction) Descriptor deprecated

func (*Transaction) Descriptor() ([]byte, []int)

Deprecated: Use Transaction.ProtoReflect.Descriptor instead.

func (*Transaction) GetAmount

func (x *Transaction) GetAmount() int64

func (*Transaction) GetBlockId

func (x *Transaction) GetBlockId() string

func (*Transaction) GetFrom

func (x *Transaction) GetFrom() []byte

func (*Transaction) GetId

func (x *Transaction) GetId() []byte

func (*Transaction) GetTimestamp

func (x *Transaction) GetTimestamp() *timestamppb.Timestamp

func (*Transaction) GetTo

func (x *Transaction) GetTo() []byte

func (*Transaction) ProtoMessage

func (*Transaction) ProtoMessage()

func (*Transaction) ProtoReflect

func (x *Transaction) ProtoReflect() protoreflect.Message

func (*Transaction) Reset

func (x *Transaction) Reset()

func (*Transaction) String

func (x *Transaction) String() string

Jump to

Keyboard shortcuts

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