mirror of
https://github.com/emo2007/block-accounting.git
synced 2024-11-13 22:06:27 +00:00
41 lines
592 B
Go
41 lines
592 B
Go
|
package models
|
||
|
|
||
|
import (
|
||
|
"time"
|
||
|
|
||
|
"github.com/google/uuid"
|
||
|
)
|
||
|
|
||
|
type Transaction struct {
|
||
|
Id uuid.UUID
|
||
|
|
||
|
Description string
|
||
|
OrganizationId uuid.UUID
|
||
|
CreatedBy *OrganizationUser
|
||
|
Amount float64
|
||
|
|
||
|
ToAddr []byte
|
||
|
|
||
|
MaxFeeAllowed float64
|
||
|
Deadline time.Time
|
||
|
|
||
|
Status int
|
||
|
|
||
|
CreatedAt time.Time
|
||
|
UpdatedAt time.Time
|
||
|
|
||
|
ConfirmedAt time.Time
|
||
|
CancelledAt time.Time
|
||
|
|
||
|
CommitedAt time.Time
|
||
|
}
|
||
|
|
||
|
type TransactionConfirmation struct {
|
||
|
TxId uuid.UUID
|
||
|
User *User
|
||
|
OrganizationId uuid.UUID
|
||
|
CreatedAt time.Time
|
||
|
UpdatedAt time.Time
|
||
|
Confirmed bool
|
||
|
}
|