github.com/NpoolPlatform/chain-middleware@v0.0.0-20240228100535-eb1bcf896eb9/pkg/db/ent/chainbase/chainbase.go (about)

     1  // Code generated by ent, DO NOT EDIT.
     2  
     3  package chainbase
     4  
     5  import (
     6  	"entgo.io/ent"
     7  	"github.com/google/uuid"
     8  )
     9  
    10  const (
    11  	// Label holds the string label denoting the chainbase type in the database.
    12  	Label = "chain_base"
    13  	// FieldID holds the string denoting the id field in the database.
    14  	FieldID = "id"
    15  	// FieldCreatedAt holds the string denoting the created_at field in the database.
    16  	FieldCreatedAt = "created_at"
    17  	// FieldUpdatedAt holds the string denoting the updated_at field in the database.
    18  	FieldUpdatedAt = "updated_at"
    19  	// FieldDeletedAt holds the string denoting the deleted_at field in the database.
    20  	FieldDeletedAt = "deleted_at"
    21  	// FieldEntID holds the string denoting the ent_id field in the database.
    22  	FieldEntID = "ent_id"
    23  	// FieldName holds the string denoting the name field in the database.
    24  	FieldName = "name"
    25  	// FieldLogo holds the string denoting the logo field in the database.
    26  	FieldLogo = "logo"
    27  	// FieldNativeUnit holds the string denoting the native_unit field in the database.
    28  	FieldNativeUnit = "native_unit"
    29  	// FieldAtomicUnit holds the string denoting the atomic_unit field in the database.
    30  	FieldAtomicUnit = "atomic_unit"
    31  	// FieldUnitExp holds the string denoting the unit_exp field in the database.
    32  	FieldUnitExp = "unit_exp"
    33  	// FieldEnv holds the string denoting the env field in the database.
    34  	FieldEnv = "env"
    35  	// FieldChainID holds the string denoting the chain_id field in the database.
    36  	FieldChainID = "chain_id"
    37  	// FieldNickname holds the string denoting the nickname field in the database.
    38  	FieldNickname = "nickname"
    39  	// FieldGasType holds the string denoting the gas_type field in the database.
    40  	FieldGasType = "gas_type"
    41  	// Table holds the table name of the chainbase in the database.
    42  	Table = "chain_bases"
    43  )
    44  
    45  // Columns holds all SQL columns for chainbase fields.
    46  var Columns = []string{
    47  	FieldID,
    48  	FieldCreatedAt,
    49  	FieldUpdatedAt,
    50  	FieldDeletedAt,
    51  	FieldEntID,
    52  	FieldName,
    53  	FieldLogo,
    54  	FieldNativeUnit,
    55  	FieldAtomicUnit,
    56  	FieldUnitExp,
    57  	FieldEnv,
    58  	FieldChainID,
    59  	FieldNickname,
    60  	FieldGasType,
    61  }
    62  
    63  // ValidColumn reports if the column name is valid (part of the table columns).
    64  func ValidColumn(column string) bool {
    65  	for i := range Columns {
    66  		if column == Columns[i] {
    67  			return true
    68  		}
    69  	}
    70  	return false
    71  }
    72  
    73  // Note that the variables below are initialized by the runtime
    74  // package on the initialization of the application. Therefore,
    75  // it should be imported in the main as follows:
    76  //
    77  //	import _ "github.com/NpoolPlatform/chain-middleware/pkg/db/ent/runtime"
    78  //
    79  var (
    80  	Hooks  [1]ent.Hook
    81  	Policy ent.Policy
    82  	// DefaultCreatedAt holds the default value on creation for the "created_at" field.
    83  	DefaultCreatedAt func() uint32
    84  	// DefaultUpdatedAt holds the default value on creation for the "updated_at" field.
    85  	DefaultUpdatedAt func() uint32
    86  	// UpdateDefaultUpdatedAt holds the default value on update for the "updated_at" field.
    87  	UpdateDefaultUpdatedAt func() uint32
    88  	// DefaultDeletedAt holds the default value on creation for the "deleted_at" field.
    89  	DefaultDeletedAt func() uint32
    90  	// DefaultEntID holds the default value on creation for the "ent_id" field.
    91  	DefaultEntID func() uuid.UUID
    92  	// DefaultName holds the default value on creation for the "name" field.
    93  	DefaultName string
    94  	// DefaultLogo holds the default value on creation for the "logo" field.
    95  	DefaultLogo string
    96  	// DefaultNativeUnit holds the default value on creation for the "native_unit" field.
    97  	DefaultNativeUnit string
    98  	// DefaultAtomicUnit holds the default value on creation for the "atomic_unit" field.
    99  	DefaultAtomicUnit string
   100  	// DefaultUnitExp holds the default value on creation for the "unit_exp" field.
   101  	DefaultUnitExp uint32
   102  	// DefaultEnv holds the default value on creation for the "env" field.
   103  	DefaultEnv string
   104  	// DefaultChainID holds the default value on creation for the "chain_id" field.
   105  	DefaultChainID string
   106  	// DefaultNickname holds the default value on creation for the "nickname" field.
   107  	DefaultNickname string
   108  	// DefaultGasType holds the default value on creation for the "gas_type" field.
   109  	DefaultGasType string
   110  )