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

     1  // Code generated by ent, DO NOT EDIT.
     2  
     3  package appcoin
     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 appcoin type in the database.
    13  	Label = "app_coin"
    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  	// FieldName holds the string denoting the name field in the database.
    29  	FieldName = "name"
    30  	// FieldDisplayNames holds the string denoting the display_names field in the database.
    31  	FieldDisplayNames = "display_names"
    32  	// FieldLogo holds the string denoting the logo field in the database.
    33  	FieldLogo = "logo"
    34  	// FieldForPay holds the string denoting the for_pay field in the database.
    35  	FieldForPay = "for_pay"
    36  	// FieldWithdrawAutoReviewAmount holds the string denoting the withdraw_auto_review_amount field in the database.
    37  	FieldWithdrawAutoReviewAmount = "withdraw_auto_review_amount"
    38  	// FieldProductPage holds the string denoting the product_page field in the database.
    39  	FieldProductPage = "product_page"
    40  	// FieldDisabled holds the string denoting the disabled field in the database.
    41  	FieldDisabled = "disabled"
    42  	// FieldDailyRewardAmount holds the string denoting the daily_reward_amount field in the database.
    43  	FieldDailyRewardAmount = "daily_reward_amount"
    44  	// FieldDisplay holds the string denoting the display field in the database.
    45  	FieldDisplay = "display"
    46  	// FieldDisplayIndex holds the string denoting the display_index field in the database.
    47  	FieldDisplayIndex = "display_index"
    48  	// FieldMaxAmountPerWithdraw holds the string denoting the max_amount_per_withdraw field in the database.
    49  	FieldMaxAmountPerWithdraw = "max_amount_per_withdraw"
    50  	// Table holds the table name of the appcoin in the database.
    51  	Table = "app_coins"
    52  )
    53  
    54  // Columns holds all SQL columns for appcoin fields.
    55  var Columns = []string{
    56  	FieldID,
    57  	FieldCreatedAt,
    58  	FieldUpdatedAt,
    59  	FieldDeletedAt,
    60  	FieldEntID,
    61  	FieldAppID,
    62  	FieldCoinTypeID,
    63  	FieldName,
    64  	FieldDisplayNames,
    65  	FieldLogo,
    66  	FieldForPay,
    67  	FieldWithdrawAutoReviewAmount,
    68  	FieldProductPage,
    69  	FieldDisabled,
    70  	FieldDailyRewardAmount,
    71  	FieldDisplay,
    72  	FieldDisplayIndex,
    73  	FieldMaxAmountPerWithdraw,
    74  }
    75  
    76  // ValidColumn reports if the column name is valid (part of the table columns).
    77  func ValidColumn(column string) bool {
    78  	for i := range Columns {
    79  		if column == Columns[i] {
    80  			return true
    81  		}
    82  	}
    83  	return false
    84  }
    85  
    86  // Note that the variables below are initialized by the runtime
    87  // package on the initialization of the application. Therefore,
    88  // it should be imported in the main as follows:
    89  //
    90  //	import _ "github.com/NpoolPlatform/chain-middleware/pkg/db/ent/runtime"
    91  //
    92  var (
    93  	Hooks  [1]ent.Hook
    94  	Policy ent.Policy
    95  	// DefaultCreatedAt holds the default value on creation for the "created_at" field.
    96  	DefaultCreatedAt func() uint32
    97  	// DefaultUpdatedAt holds the default value on creation for the "updated_at" field.
    98  	DefaultUpdatedAt func() uint32
    99  	// UpdateDefaultUpdatedAt holds the default value on update for the "updated_at" field.
   100  	UpdateDefaultUpdatedAt func() uint32
   101  	// DefaultDeletedAt holds the default value on creation for the "deleted_at" field.
   102  	DefaultDeletedAt func() uint32
   103  	// DefaultEntID holds the default value on creation for the "ent_id" field.
   104  	DefaultEntID func() uuid.UUID
   105  	// DefaultAppID holds the default value on creation for the "app_id" field.
   106  	DefaultAppID func() uuid.UUID
   107  	// DefaultCoinTypeID holds the default value on creation for the "coin_type_id" field.
   108  	DefaultCoinTypeID func() uuid.UUID
   109  	// DefaultName holds the default value on creation for the "name" field.
   110  	DefaultName string
   111  	// DefaultDisplayNames holds the default value on creation for the "display_names" field.
   112  	DefaultDisplayNames []string
   113  	// DefaultLogo holds the default value on creation for the "logo" field.
   114  	DefaultLogo string
   115  	// DefaultForPay holds the default value on creation for the "for_pay" field.
   116  	DefaultForPay bool
   117  	// DefaultWithdrawAutoReviewAmount holds the default value on creation for the "withdraw_auto_review_amount" field.
   118  	DefaultWithdrawAutoReviewAmount decimal.Decimal
   119  	// DefaultProductPage holds the default value on creation for the "product_page" field.
   120  	DefaultProductPage string
   121  	// DefaultDisabled holds the default value on creation for the "disabled" field.
   122  	DefaultDisabled bool
   123  	// DefaultDailyRewardAmount holds the default value on creation for the "daily_reward_amount" field.
   124  	DefaultDailyRewardAmount decimal.Decimal
   125  	// DefaultDisplay holds the default value on creation for the "display" field.
   126  	DefaultDisplay bool
   127  	// DefaultDisplayIndex holds the default value on creation for the "display_index" field.
   128  	DefaultDisplayIndex uint32
   129  	// DefaultMaxAmountPerWithdraw holds the default value on creation for the "max_amount_per_withdraw" field.
   130  	DefaultMaxAmountPerWithdraw decimal.Decimal
   131  )