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

     1  // Code generated by ent, DO NOT EDIT.
     2  
     3  package coinfiatcurrency
     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 coinfiatcurrency type in the database.
    13  	Label = "coin_fiat_currency"
    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  	// FieldFiatID holds the string denoting the fiat_id field in the database.
    27  	FieldFiatID = "fiat_id"
    28  	// FieldFeedType holds the string denoting the feed_type field in the database.
    29  	FieldFeedType = "feed_type"
    30  	// FieldMarketValueLow holds the string denoting the market_value_low field in the database.
    31  	FieldMarketValueLow = "market_value_low"
    32  	// FieldMarketValueHigh holds the string denoting the market_value_high field in the database.
    33  	FieldMarketValueHigh = "market_value_high"
    34  	// Table holds the table name of the coinfiatcurrency in the database.
    35  	Table = "coin_fiat_currencies"
    36  )
    37  
    38  // Columns holds all SQL columns for coinfiatcurrency fields.
    39  var Columns = []string{
    40  	FieldID,
    41  	FieldCreatedAt,
    42  	FieldUpdatedAt,
    43  	FieldDeletedAt,
    44  	FieldEntID,
    45  	FieldCoinTypeID,
    46  	FieldFiatID,
    47  	FieldFeedType,
    48  	FieldMarketValueLow,
    49  	FieldMarketValueHigh,
    50  }
    51  
    52  // ValidColumn reports if the column name is valid (part of the table columns).
    53  func ValidColumn(column string) bool {
    54  	for i := range Columns {
    55  		if column == Columns[i] {
    56  			return true
    57  		}
    58  	}
    59  	return false
    60  }
    61  
    62  // Note that the variables below are initialized by the runtime
    63  // package on the initialization of the application. Therefore,
    64  // it should be imported in the main as follows:
    65  //
    66  //	import _ "github.com/NpoolPlatform/chain-middleware/pkg/db/ent/runtime"
    67  //
    68  var (
    69  	Hooks  [1]ent.Hook
    70  	Policy ent.Policy
    71  	// DefaultCreatedAt holds the default value on creation for the "created_at" field.
    72  	DefaultCreatedAt func() uint32
    73  	// DefaultUpdatedAt holds the default value on creation for the "updated_at" field.
    74  	DefaultUpdatedAt func() uint32
    75  	// UpdateDefaultUpdatedAt holds the default value on update for the "updated_at" field.
    76  	UpdateDefaultUpdatedAt func() uint32
    77  	// DefaultDeletedAt holds the default value on creation for the "deleted_at" field.
    78  	DefaultDeletedAt func() uint32
    79  	// DefaultEntID holds the default value on creation for the "ent_id" field.
    80  	DefaultEntID func() uuid.UUID
    81  	// DefaultCoinTypeID holds the default value on creation for the "coin_type_id" field.
    82  	DefaultCoinTypeID func() uuid.UUID
    83  	// DefaultFiatID holds the default value on creation for the "fiat_id" field.
    84  	DefaultFiatID func() uuid.UUID
    85  	// DefaultFeedType holds the default value on creation for the "feed_type" field.
    86  	DefaultFeedType string
    87  	// DefaultMarketValueLow holds the default value on creation for the "market_value_low" field.
    88  	DefaultMarketValueLow decimal.Decimal
    89  	// DefaultMarketValueHigh holds the default value on creation for the "market_value_high" field.
    90  	DefaultMarketValueHigh decimal.Decimal
    91  )