manager/ent/account/account.go

81 lines
2.8 KiB
Go
Raw Permalink Normal View History

2022-04-08 21:26:25 +02:00
// Code generated by entc, DO NOT EDIT.
package account
import (
"time"
)
const (
// Label holds the string label denoting the account type in the database.
Label = "account"
// FieldID holds the string denoting the id field in the database.
FieldID = "id"
// FieldCreated holds the string denoting the created field in the database.
FieldCreated = "created"
// FieldModified holds the string denoting the modified field in the database.
FieldModified = "modified"
// FieldUsername holds the string denoting the username field in the database.
FieldUsername = "username"
// FieldPassword holds the string denoting the password field in the database.
FieldPassword = "password"
// FieldSuper holds the string denoting the super field in the database.
FieldSuper = "super"
// FieldActive holds the string denoting the active field in the database.
FieldActive = "active"
// EdgeDomains holds the string denoting the domains edge name in mutations.
EdgeDomains = "domains"
// EdgeLogs holds the string denoting the logs edge name in mutations.
EdgeLogs = "logs"
// Table holds the table name of the account in the database.
Table = "accounts"
// DomainsTable is the table that holds the domains relation/edge. The primary key declared below.
DomainsTable = "account_domains"
// DomainsInverseTable is the table name for the Domain entity.
// It exists in this package in order to avoid circular dependency with the "domain" package.
DomainsInverseTable = "domains"
// LogsTable is the table that holds the logs relation/edge.
LogsTable = "logentries"
// LogsInverseTable is the table name for the Logentry entity.
// It exists in this package in order to avoid circular dependency with the "logentry" package.
LogsInverseTable = "logentries"
// LogsColumn is the table column denoting the logs relation/edge.
LogsColumn = "account_id"
)
// Columns holds all SQL columns for account fields.
var Columns = []string{
FieldID,
FieldCreated,
FieldModified,
FieldUsername,
FieldPassword,
FieldSuper,
FieldActive,
}
var (
// DomainsPrimaryKey and DomainsColumn2 are the table columns denoting the
// primary key for the domains relation (M2M).
DomainsPrimaryKey = []string{"account_id", "domain_id"}
)
// ValidColumn reports if the column name is valid (part of the table columns).
func ValidColumn(column string) bool {
for i := range Columns {
if column == Columns[i] {
return true
}
}
return false
}
var (
// DefaultCreated holds the default value on creation for the "created" field.
DefaultCreated func() time.Time
// DefaultModified holds the default value on creation for the "modified" field.
DefaultModified func() time.Time
// UpdateDefaultModified holds the default value on update for the "modified" field.
UpdateDefaultModified func() time.Time
)