bitbucket.org/Aishee/synsec@v0.0.0-20210414005726-236fc01a153d/pkg/database/ent/bouncer/bouncer.go (about)

     1  // Code generated by entc, DO NOT EDIT.
     2  
     3  package bouncer
     4  
     5  import (
     6  	"time"
     7  )
     8  
     9  const (
    10  	// Label holds the string label denoting the bouncer type in the database.
    11  	Label = "bouncer"
    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  	// FieldName holds the string denoting the name field in the database.
    19  	FieldName = "name"
    20  	// FieldAPIKey holds the string denoting the api_key field in the database.
    21  	FieldAPIKey = "api_key"
    22  	// FieldRevoked holds the string denoting the revoked field in the database.
    23  	FieldRevoked = "revoked"
    24  	// FieldIPAddress holds the string denoting the ip_address field in the database.
    25  	FieldIPAddress = "ip_address"
    26  	// FieldType holds the string denoting the type field in the database.
    27  	FieldType = "type"
    28  	// FieldVersion holds the string denoting the version field in the database.
    29  	FieldVersion = "version"
    30  	// FieldUntil holds the string denoting the until field in the database.
    31  	FieldUntil = "until"
    32  	// FieldLastPull holds the string denoting the last_pull field in the database.
    33  	FieldLastPull = "last_pull"
    34  	// Table holds the table name of the bouncer in the database.
    35  	Table = "bouncers"
    36  )
    37  
    38  // Columns holds all SQL columns for bouncer fields.
    39  var Columns = []string{
    40  	FieldID,
    41  	FieldCreatedAt,
    42  	FieldUpdatedAt,
    43  	FieldName,
    44  	FieldAPIKey,
    45  	FieldRevoked,
    46  	FieldIPAddress,
    47  	FieldType,
    48  	FieldVersion,
    49  	FieldUntil,
    50  	FieldLastPull,
    51  }
    52  
    53  // ValidColumn reports if the column name is valid (part of the table columns).
    54  func ValidColumn(column string) bool {
    55  	for i := range Columns {
    56  		if column == Columns[i] {
    57  			return true
    58  		}
    59  	}
    60  	return false
    61  }
    62  
    63  var (
    64  	// DefaultCreatedAt holds the default value on creation for the "created_at" field.
    65  	DefaultCreatedAt func() time.Time
    66  	// DefaultUpdatedAt holds the default value on creation for the "updated_at" field.
    67  	DefaultUpdatedAt func() time.Time
    68  	// DefaultIPAddress holds the default value on creation for the "ip_address" field.
    69  	DefaultIPAddress string
    70  	// DefaultUntil holds the default value on creation for the "until" field.
    71  	DefaultUntil func() time.Time
    72  	// DefaultLastPull holds the default value on creation for the "last_pull" field.
    73  	DefaultLastPull func() time.Time
    74  )