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

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