github.com/NpoolPlatform/chain-middleware@v0.0.0-20240228100535-eb1bcf896eb9/pkg/db/ent/tran/tran.go (about) 1 // Code generated by ent, DO NOT EDIT. 2 3 package tran 4 5 import ( 6 "entgo.io/ent" 7 "github.com/google/uuid" 8 "github.com/shopspring/decimal" 9 ) 10 11 const ( 12 // Label holds the string label denoting the tran type in the database. 13 Label = "tran" 14 // FieldID holds the string denoting the id field in the database. 15 FieldID = "id" 16 // FieldCreatedAt holds the string denoting the created_at field in the database. 17 FieldCreatedAt = "created_at" 18 // FieldUpdatedAt holds the string denoting the updated_at field in the database. 19 FieldUpdatedAt = "updated_at" 20 // FieldDeletedAt holds the string denoting the deleted_at field in the database. 21 FieldDeletedAt = "deleted_at" 22 // FieldEntID holds the string denoting the ent_id field in the database. 23 FieldEntID = "ent_id" 24 // FieldCoinTypeID holds the string denoting the coin_type_id field in the database. 25 FieldCoinTypeID = "coin_type_id" 26 // FieldFromAccountID holds the string denoting the from_account_id field in the database. 27 FieldFromAccountID = "from_account_id" 28 // FieldToAccountID holds the string denoting the to_account_id field in the database. 29 FieldToAccountID = "to_account_id" 30 // FieldAmount holds the string denoting the amount field in the database. 31 FieldAmount = "amount" 32 // FieldFeeAmount holds the string denoting the fee_amount field in the database. 33 FieldFeeAmount = "fee_amount" 34 // FieldChainTxID holds the string denoting the chain_tx_id field in the database. 35 FieldChainTxID = "chain_tx_id" 36 // FieldState holds the string denoting the state field in the database. 37 FieldState = "state" 38 // FieldExtra holds the string denoting the extra field in the database. 39 FieldExtra = "extra" 40 // FieldType holds the string denoting the type field in the database. 41 FieldType = "type" 42 // Table holds the table name of the tran in the database. 43 Table = "trans" 44 ) 45 46 // Columns holds all SQL columns for tran fields. 47 var Columns = []string{ 48 FieldID, 49 FieldCreatedAt, 50 FieldUpdatedAt, 51 FieldDeletedAt, 52 FieldEntID, 53 FieldCoinTypeID, 54 FieldFromAccountID, 55 FieldToAccountID, 56 FieldAmount, 57 FieldFeeAmount, 58 FieldChainTxID, 59 FieldState, 60 FieldExtra, 61 FieldType, 62 } 63 64 // ValidColumn reports if the column name is valid (part of the table columns). 65 func ValidColumn(column string) bool { 66 for i := range Columns { 67 if column == Columns[i] { 68 return true 69 } 70 } 71 return false 72 } 73 74 // Note that the variables below are initialized by the runtime 75 // package on the initialization of the application. Therefore, 76 // it should be imported in the main as follows: 77 // 78 // import _ "github.com/NpoolPlatform/chain-middleware/pkg/db/ent/runtime" 79 // 80 var ( 81 Hooks [1]ent.Hook 82 Policy ent.Policy 83 // DefaultCreatedAt holds the default value on creation for the "created_at" field. 84 DefaultCreatedAt func() uint32 85 // DefaultUpdatedAt holds the default value on creation for the "updated_at" field. 86 DefaultUpdatedAt func() uint32 87 // UpdateDefaultUpdatedAt holds the default value on update for the "updated_at" field. 88 UpdateDefaultUpdatedAt func() uint32 89 // DefaultDeletedAt holds the default value on creation for the "deleted_at" field. 90 DefaultDeletedAt func() uint32 91 // DefaultEntID holds the default value on creation for the "ent_id" field. 92 DefaultEntID func() uuid.UUID 93 // DefaultCoinTypeID holds the default value on creation for the "coin_type_id" field. 94 DefaultCoinTypeID func() uuid.UUID 95 // DefaultFromAccountID holds the default value on creation for the "from_account_id" field. 96 DefaultFromAccountID func() uuid.UUID 97 // DefaultToAccountID holds the default value on creation for the "to_account_id" field. 98 DefaultToAccountID func() uuid.UUID 99 // DefaultAmount holds the default value on creation for the "amount" field. 100 DefaultAmount decimal.Decimal 101 // DefaultFeeAmount holds the default value on creation for the "fee_amount" field. 102 DefaultFeeAmount decimal.Decimal 103 // DefaultChainTxID holds the default value on creation for the "chain_tx_id" field. 104 DefaultChainTxID string 105 // DefaultState holds the default value on creation for the "state" field. 106 DefaultState string 107 // DefaultExtra holds the default value on creation for the "extra" field. 108 DefaultExtra string 109 // DefaultType holds the default value on creation for the "type" field. 110 DefaultType string 111 )