-
Notifications
You must be signed in to change notification settings - Fork 46
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Some opinions on the new models #1117
base: frrist/etl-pkg
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -5,11 +5,8 @@ import "github.com/filecoin-project/lily/pkg/transform/gorm/types" | |
type VmMessage struct { | ||
Source types.DbCID `gorm:"primaryKey"` | ||
Cid types.DbCID `gorm:"primaryKey"` | ||
To types.DbAddr | ||
From types.DbAddr | ||
Value types.DbToken | ||
Method uint64 | ||
Params []byte | ||
Receipt Receipt `gorm:"embedded"` | ||
Message Message `gorm:"embedded"` | ||
Receipt Receipt `gorm:"embedded"` | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. While it is true that VM messages are basically messages, many of the fields such as There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Looking at gorm Embedded Structs has me thinking that it's better to have common non-null types between
which can then be respectively added as an embedded struct for both |
||
Error string | ||
Index uint64 | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
typo:
types.DbCID
and nottypes.DbCid