github.com/ngocphuongnb/tetua@v0.0.7-alpha/packages/entrepository/ent/setting/setting.go (about)

     1  // Code generated by entc, DO NOT EDIT.
     2  
     3  package setting
     4  
     5  import (
     6  	"time"
     7  )
     8  
     9  const (
    10  	// Label holds the string label denoting the setting type in the database.
    11  	Label = "setting"
    12  	// FieldID holds the string denoting the id field in the database.
    13  	FieldID = "id"
    14  	// FieldCreatedAt holds the string denoting the created_at field in the database.
    15  	FieldCreatedAt = "created_at"
    16  	// FieldUpdatedAt holds the string denoting the updated_at field in the database.
    17  	FieldUpdatedAt = "updated_at"
    18  	// FieldDeletedAt holds the string denoting the deleted_at field in the database.
    19  	FieldDeletedAt = "deleted_at"
    20  	// FieldName holds the string denoting the name field in the database.
    21  	FieldName = "name"
    22  	// FieldValue holds the string denoting the value field in the database.
    23  	FieldValue = "value"
    24  	// FieldType holds the string denoting the type field in the database.
    25  	FieldType = "type"
    26  	// Table holds the table name of the setting in the database.
    27  	Table = "settings"
    28  )
    29  
    30  // Columns holds all SQL columns for setting fields.
    31  var Columns = []string{
    32  	FieldID,
    33  	FieldCreatedAt,
    34  	FieldUpdatedAt,
    35  	FieldDeletedAt,
    36  	FieldName,
    37  	FieldValue,
    38  	FieldType,
    39  }
    40  
    41  // ValidColumn reports if the column name is valid (part of the table columns).
    42  func ValidColumn(column string) bool {
    43  	for i := range Columns {
    44  		if column == Columns[i] {
    45  			return true
    46  		}
    47  	}
    48  	return false
    49  }
    50  
    51  var (
    52  	// DefaultCreatedAt holds the default value on creation for the "created_at" field.
    53  	DefaultCreatedAt func() time.Time
    54  	// DefaultUpdatedAt holds the default value on creation for the "updated_at" field.
    55  	DefaultUpdatedAt func() time.Time
    56  	// UpdateDefaultUpdatedAt holds the default value on update for the "updated_at" field.
    57  	UpdateDefaultUpdatedAt func() time.Time
    58  	// DefaultType holds the default value on creation for the "type" field.
    59  	DefaultType string
    60  )