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

     1  // Code generated by ent, DO NOT EDIT.
     2  
     3  package exchangerate
     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 exchangerate type in the database.
    13  	Label = "exchange_rate"
    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  	// FieldAppID holds the string denoting the app_id field in the database.
    25  	FieldAppID = "app_id"
    26  	// FieldCoinTypeID holds the string denoting the coin_type_id field in the database.
    27  	FieldCoinTypeID = "coin_type_id"
    28  	// FieldMarketValue holds the string denoting the market_value field in the database.
    29  	FieldMarketValue = "market_value"
    30  	// FieldSettleValue holds the string denoting the settle_value field in the database.
    31  	FieldSettleValue = "settle_value"
    32  	// FieldSettlePercent holds the string denoting the settle_percent field in the database.
    33  	FieldSettlePercent = "settle_percent"
    34  	// FieldSettleTips holds the string denoting the settle_tips field in the database.
    35  	FieldSettleTips = "settle_tips"
    36  	// FieldSetter holds the string denoting the setter field in the database.
    37  	FieldSetter = "setter"
    38  	// Table holds the table name of the exchangerate in the database.
    39  	Table = "exchange_rates"
    40  )
    41  
    42  // Columns holds all SQL columns for exchangerate fields.
    43  var Columns = []string{
    44  	FieldID,
    45  	FieldCreatedAt,
    46  	FieldUpdatedAt,
    47  	FieldDeletedAt,
    48  	FieldEntID,
    49  	FieldAppID,
    50  	FieldCoinTypeID,
    51  	FieldMarketValue,
    52  	FieldSettleValue,
    53  	FieldSettlePercent,
    54  	FieldSettleTips,
    55  	FieldSetter,
    56  }
    57  
    58  // ValidColumn reports if the column name is valid (part of the table columns).
    59  func ValidColumn(column string) bool {
    60  	for i := range Columns {
    61  		if column == Columns[i] {
    62  			return true
    63  		}
    64  	}
    65  	return false
    66  }
    67  
    68  // Note that the variables below are initialized by the runtime
    69  // package on the initialization of the application. Therefore,
    70  // it should be imported in the main as follows:
    71  //
    72  //	import _ "github.com/NpoolPlatform/chain-middleware/pkg/db/ent/runtime"
    73  //
    74  var (
    75  	Hooks  [1]ent.Hook
    76  	Policy ent.Policy
    77  	// DefaultCreatedAt holds the default value on creation for the "created_at" field.
    78  	DefaultCreatedAt func() uint32
    79  	// DefaultUpdatedAt holds the default value on creation for the "updated_at" field.
    80  	DefaultUpdatedAt func() uint32
    81  	// UpdateDefaultUpdatedAt holds the default value on update for the "updated_at" field.
    82  	UpdateDefaultUpdatedAt func() uint32
    83  	// DefaultDeletedAt holds the default value on creation for the "deleted_at" field.
    84  	DefaultDeletedAt func() uint32
    85  	// DefaultEntID holds the default value on creation for the "ent_id" field.
    86  	DefaultEntID func() uuid.UUID
    87  	// DefaultAppID holds the default value on creation for the "app_id" field.
    88  	DefaultAppID func() uuid.UUID
    89  	// DefaultCoinTypeID holds the default value on creation for the "coin_type_id" field.
    90  	DefaultCoinTypeID func() uuid.UUID
    91  	// DefaultMarketValue holds the default value on creation for the "market_value" field.
    92  	DefaultMarketValue decimal.Decimal
    93  	// DefaultSettleValue holds the default value on creation for the "settle_value" field.
    94  	DefaultSettleValue decimal.Decimal
    95  	// DefaultSettlePercent holds the default value on creation for the "settle_percent" field.
    96  	DefaultSettlePercent uint32
    97  	// DefaultSettleTips holds the default value on creation for the "settle_tips" field.
    98  	DefaultSettleTips []string
    99  	// DefaultSetter holds the default value on creation for the "setter" field.
   100  	DefaultSetter func() uuid.UUID
   101  )