transferrecordmapper

package
v1.0.8 Latest Latest
Warning

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

Go to latest
Published: Jul 10, 2025 License: MIT Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewTransferRecordMapper

func NewTransferRecordMapper() *transferRecordMapper

NewTransferRecordMapper returns a new instance of transferRecordMapper which provides methods to map Transfer database rows to TransferRecord domain models.

Types

type TransferBaseRecordMapper

type TransferBaseRecordMapper interface {
	// ToTransferRecord maps a Transfer database row to a TransferRecord domain model.
	//
	// Parameters:
	//   - transfer: A pointer to a Transfer representing the database row.
	//
	// Returns:
	//   - A pointer to a TransferRecord containing the mapped data, including
	//     ID, TransferNo, TransferFrom, TransferTo, TransferAmount, TransferTime,
	//     CreatedAt, UpdatedAt, and DeletedAt.
	ToTransferRecord(transfer *db.Transfer) *record.TransferRecord
}

TransferBaseRecordMapper maps raw Transfer rows.

type TransferCommandRecordMapper

type TransferCommandRecordMapper interface {
	TransferBaseRecordMapper
}

TransferCommandRecordMapper maps raw Transfer rows for command operations.

func NewTransferCommandRecordMapper

func NewTransferCommandRecordMapper() TransferCommandRecordMapper

NewTransferCommandRecordMapper returns a new instance of transferCommandRecordMapper which provides methods to map Transfer database rows to TransferRecord domain models for command operations.

type TransferQueryRecordMapper

type TransferQueryRecordMapper interface {
	TransferBaseRecordMapper

	// ToTransferRecordAll maps a GetTransfersRow database row to a TransferRecord domain model.
	//
	// Parameters:
	//   - transfer: A pointer to a GetTransfersRow representing the database row.
	//
	// Returns:
	//   - A pointer to a TransferRecord containing the mapped data, including
	//     ID, TransferNo, TransferFrom, TransferTo, TransferAmount, TransferTime,
	//     CreatedAt, UpdatedAt, and DeletedAt.
	ToTransferRecordAll(transfer *db.GetTransfersRow) *record.TransferRecord
	// ToTransfersRecordAll maps a slice of GetTransfersRow database rows to a slice of TransferRecord domain models.
	//
	// Parameters:
	//   - transfers: A slice of pointers to GetTransfersRow structs representing the database rows.
	//
	// Returns:
	//   - A slice of pointers to TransferRecord structs containing the mapped data.
	ToTransfersRecordAll(transfers []*db.GetTransfersRow) []*record.TransferRecord
	// ToTransferRecordActive maps a GetActiveTransfersRow database row to a TransferRecord domain model.
	//
	// Parameters:
	//   - transfer: A pointer to a GetActiveTransfersRow representing the active transfer database row.
	//
	// Returns:
	//   - A pointer to a TransferRecord containing the mapped data, including
	//     ID, TransferNo, TransferFrom, TransferTo, TransferAmount, TransferTime,
	//     CreatedAt, UpdatedAt, and DeletedAt.
	ToTransferRecordActive(transfer *db.GetActiveTransfersRow) *record.TransferRecord
	// ToTransfersRecordActive maps a slice of GetActiveTransfersRow database rows to a slice of TransferRecord domain models.
	//
	// Parameters:
	//   - transfers: A slice of pointers to GetActiveTransfersRow structs representing the database rows.
	//
	// Returns:
	//   - A slice of pointers to TransferRecord structs containing the mapped data.
	ToTransfersRecordActive(transfers []*db.GetActiveTransfersRow) []*record.TransferRecord
	// ToTransferRecordTrashed maps a GetTrashedTransfersRow database row to a TransferRecord domain model.
	//
	// Parameters:
	//   - transfer: A pointer to a GetTrashedTransfersRow representing the active transfer database row.
	//
	// Returns:
	//   - A pointer to a TransferRecord containing the mapped data, including
	//     ID, TransferNo, TransferFrom, TransferTo, TransferAmount, TransferTime,
	//     CreatedAt, UpdatedAt, and DeletedAt.
	ToTransferRecordTrashed(transfer *db.GetTrashedTransfersRow) *record.TransferRecord
	// ToTransfersRecordTrashed maps a slice of GetTrashedTransfersRow database rows to a slice of TransferRecord domain models.
	//
	// Parameters:
	//   - transfers: A slice of pointers to GetTrashedTransfersRow structs representing the database rows.
	//
	// Returns:
	//   - A slice of pointers to TransferRecord structs containing the mapped data.
	ToTransfersRecordTrashed(transfers []*db.GetTrashedTransfersRow) []*record.TransferRecord
}

TransferQueryRecordMapper maps query result rows to Transfer domain models.

func NewTransferQueryRecordMapper

func NewTransferQueryRecordMapper() TransferQueryRecordMapper

NewTransferQueryRecordMapper returns a new instance of transferQueryRecordMapper which provides methods to map Transfer database rows to TransferRecord domain models.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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