OSDN Git Service

Merge pull request #201 from Bytom/v0.1
[bytom/vapor.git] / federation / database / orm / cross_transaction.go
diff --git a/federation/database/orm/cross_transaction.go b/federation/database/orm/cross_transaction.go
new file mode 100644 (file)
index 0000000..ddb0841
--- /dev/null
@@ -0,0 +1,27 @@
+package orm
+
+import (
+       "database/sql"
+
+       "github.com/vapor/federation/types"
+)
+
+type CrossTransaction struct {
+       ID                   uint64 `gorm:"primary_key"`
+       ChainID              uint64
+       SourceBlockHeight    uint64
+       SourceBlockHash      string
+       SourceTxIndex        uint64
+       SourceMuxID          string
+       SourceTxHash         string
+       SourceRawTransaction string
+       DestBlockHeight      sql.NullInt64
+       DestBlockHash        sql.NullString
+       DestTxIndex          sql.NullInt64
+       DestTxHash           sql.NullString
+       Status               uint8
+       CreatedAt            types.Timestamp
+       UpdatedAt            types.Timestamp
+
+       Chain *Chain `gorm:"foreignkey:ChainID"`
+}