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

     1  // Code generated by ent, DO NOT EDIT.
     2  
     3  package coinbase
     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 coinbase type in the database.
    13  	Label = "coin_base"
    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  	// FieldName holds the string denoting the name field in the database.
    25  	FieldName = "name"
    26  	// FieldLogo holds the string denoting the logo field in the database.
    27  	FieldLogo = "logo"
    28  	// FieldPresale holds the string denoting the presale field in the database.
    29  	FieldPresale = "presale"
    30  	// FieldUnit holds the string denoting the unit field in the database.
    31  	FieldUnit = "unit"
    32  	// FieldEnv holds the string denoting the env field in the database.
    33  	FieldEnv = "env"
    34  	// FieldReservedAmount holds the string denoting the reserved_amount field in the database.
    35  	FieldReservedAmount = "reserved_amount"
    36  	// FieldForPay holds the string denoting the for_pay field in the database.
    37  	FieldForPay = "for_pay"
    38  	// FieldDisabled holds the string denoting the disabled field in the database.
    39  	FieldDisabled = "disabled"
    40  	// Table holds the table name of the coinbase in the database.
    41  	Table = "coin_bases"
    42  )
    43  
    44  // Columns holds all SQL columns for coinbase fields.
    45  var Columns = []string{
    46  	FieldID,
    47  	FieldCreatedAt,
    48  	FieldUpdatedAt,
    49  	FieldDeletedAt,
    50  	FieldEntID,
    51  	FieldName,
    52  	FieldLogo,
    53  	FieldPresale,
    54  	FieldUnit,
    55  	FieldEnv,
    56  	FieldReservedAmount,
    57  	FieldForPay,
    58  	FieldDisabled,
    59  }
    60  
    61  // ValidColumn reports if the column name is valid (part of the table columns).
    62  func ValidColumn(column string) bool {
    63  	for i := range Columns {
    64  		if column == Columns[i] {
    65  			return true
    66  		}
    67  	}
    68  	return false
    69  }
    70  
    71  // Note that the variables below are initialized by the runtime
    72  // package on the initialization of the application. Therefore,
    73  // it should be imported in the main as follows:
    74  //
    75  //	import _ "github.com/NpoolPlatform/chain-middleware/pkg/db/ent/runtime"
    76  //
    77  var (
    78  	Hooks  [1]ent.Hook
    79  	Policy ent.Policy
    80  	// DefaultCreatedAt holds the default value on creation for the "created_at" field.
    81  	DefaultCreatedAt func() uint32
    82  	// DefaultUpdatedAt holds the default value on creation for the "updated_at" field.
    83  	DefaultUpdatedAt func() uint32
    84  	// UpdateDefaultUpdatedAt holds the default value on update for the "updated_at" field.
    85  	UpdateDefaultUpdatedAt func() uint32
    86  	// DefaultDeletedAt holds the default value on creation for the "deleted_at" field.
    87  	DefaultDeletedAt func() uint32
    88  	// DefaultEntID holds the default value on creation for the "ent_id" field.
    89  	DefaultEntID func() uuid.UUID
    90  	// DefaultName holds the default value on creation for the "name" field.
    91  	DefaultName string
    92  	// DefaultLogo holds the default value on creation for the "logo" field.
    93  	DefaultLogo string
    94  	// DefaultPresale holds the default value on creation for the "presale" field.
    95  	DefaultPresale bool
    96  	// DefaultUnit holds the default value on creation for the "unit" field.
    97  	DefaultUnit string
    98  	// DefaultEnv holds the default value on creation for the "env" field.
    99  	DefaultEnv string
   100  	// DefaultReservedAmount holds the default value on creation for the "reserved_amount" field.
   101  	DefaultReservedAmount decimal.Decimal
   102  	// DefaultForPay holds the default value on creation for the "for_pay" field.
   103  	DefaultForPay bool
   104  	// DefaultDisabled holds the default value on creation for the "disabled" field.
   105  	DefaultDisabled bool
   106  )