🎉 init
This commit is contained in:
151
common/ent/scaauthusersocial/scaauthusersocial.go
Normal file
151
common/ent/scaauthusersocial/scaauthusersocial.go
Normal file
@@ -0,0 +1,151 @@
|
||||
// Code generated by ent, DO NOT EDIT.
|
||||
|
||||
package scaauthusersocial
|
||||
|
||||
import (
|
||||
"time"
|
||||
|
||||
"entgo.io/ent/dialect/sql"
|
||||
"entgo.io/ent/dialect/sql/sqlgraph"
|
||||
)
|
||||
|
||||
const (
|
||||
// Label holds the string label denoting the scaauthusersocial type in the database.
|
||||
Label = "sca_auth_user_social"
|
||||
// FieldID holds the string denoting the id field in the database.
|
||||
FieldID = "id"
|
||||
// FieldUserID holds the string denoting the user_id field in the database.
|
||||
FieldUserID = "user_id"
|
||||
// FieldOpenID holds the string denoting the open_id field in the database.
|
||||
FieldOpenID = "open_id"
|
||||
// FieldSource holds the string denoting the source field in the database.
|
||||
FieldSource = "source"
|
||||
// FieldStatus holds the string denoting the status field in the database.
|
||||
FieldStatus = "status"
|
||||
// FieldCreatedAt holds the string denoting the created_at field in the database.
|
||||
FieldCreatedAt = "created_at"
|
||||
// FieldUpdateAt holds the string denoting the update_at field in the database.
|
||||
FieldUpdateAt = "update_at"
|
||||
// FieldDeleted holds the string denoting the deleted field in the database.
|
||||
FieldDeleted = "deleted"
|
||||
// EdgeScaAuthUser holds the string denoting the sca_auth_user edge name in mutations.
|
||||
EdgeScaAuthUser = "sca_auth_user"
|
||||
// Table holds the table name of the scaauthusersocial in the database.
|
||||
Table = "sca_auth_user_socials"
|
||||
// ScaAuthUserTable is the table that holds the sca_auth_user relation/edge.
|
||||
ScaAuthUserTable = "sca_auth_user_socials"
|
||||
// ScaAuthUserInverseTable is the table name for the ScaAuthUser entity.
|
||||
// It exists in this package in order to avoid circular dependency with the "scaauthuser" package.
|
||||
ScaAuthUserInverseTable = "sca_auth_users"
|
||||
// ScaAuthUserColumn is the table column denoting the sca_auth_user relation/edge.
|
||||
ScaAuthUserColumn = "sca_auth_user_sca_auth_user_social"
|
||||
)
|
||||
|
||||
// Columns holds all SQL columns for scaauthusersocial fields.
|
||||
var Columns = []string{
|
||||
FieldID,
|
||||
FieldUserID,
|
||||
FieldOpenID,
|
||||
FieldSource,
|
||||
FieldStatus,
|
||||
FieldCreatedAt,
|
||||
FieldUpdateAt,
|
||||
FieldDeleted,
|
||||
}
|
||||
|
||||
// ForeignKeys holds the SQL foreign-keys that are owned by the "sca_auth_user_socials"
|
||||
// table and are not defined as standalone fields in the schema.
|
||||
var ForeignKeys = []string{
|
||||
"sca_auth_user_sca_auth_user_social",
|
||||
}
|
||||
|
||||
// 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
|
||||
}
|
||||
}
|
||||
for i := range ForeignKeys {
|
||||
if column == ForeignKeys[i] {
|
||||
return true
|
||||
}
|
||||
}
|
||||
return false
|
||||
}
|
||||
|
||||
var (
|
||||
// UserIDValidator is a validator for the "user_id" field. It is called by the builders before save.
|
||||
UserIDValidator func(string) error
|
||||
// OpenIDValidator is a validator for the "open_id" field. It is called by the builders before save.
|
||||
OpenIDValidator func(string) error
|
||||
// SourceValidator is a validator for the "source" field. It is called by the builders before save.
|
||||
SourceValidator func(string) error
|
||||
// DefaultStatus holds the default value on creation for the "status" field.
|
||||
DefaultStatus int
|
||||
// DefaultCreatedAt holds the default value on creation for the "created_at" field.
|
||||
DefaultCreatedAt func() time.Time
|
||||
// DefaultUpdateAt holds the default value on creation for the "update_at" field.
|
||||
DefaultUpdateAt func() time.Time
|
||||
// UpdateDefaultUpdateAt holds the default value on update for the "update_at" field.
|
||||
UpdateDefaultUpdateAt func() time.Time
|
||||
// DefaultDeleted holds the default value on creation for the "deleted" field.
|
||||
DefaultDeleted int
|
||||
)
|
||||
|
||||
// OrderOption defines the ordering options for the ScaAuthUserSocial queries.
|
||||
type OrderOption func(*sql.Selector)
|
||||
|
||||
// ByID orders the results by the id field.
|
||||
func ByID(opts ...sql.OrderTermOption) OrderOption {
|
||||
return sql.OrderByField(FieldID, opts...).ToFunc()
|
||||
}
|
||||
|
||||
// ByUserID orders the results by the user_id field.
|
||||
func ByUserID(opts ...sql.OrderTermOption) OrderOption {
|
||||
return sql.OrderByField(FieldUserID, opts...).ToFunc()
|
||||
}
|
||||
|
||||
// ByOpenID orders the results by the open_id field.
|
||||
func ByOpenID(opts ...sql.OrderTermOption) OrderOption {
|
||||
return sql.OrderByField(FieldOpenID, opts...).ToFunc()
|
||||
}
|
||||
|
||||
// BySource orders the results by the source field.
|
||||
func BySource(opts ...sql.OrderTermOption) OrderOption {
|
||||
return sql.OrderByField(FieldSource, opts...).ToFunc()
|
||||
}
|
||||
|
||||
// ByStatus orders the results by the status field.
|
||||
func ByStatus(opts ...sql.OrderTermOption) OrderOption {
|
||||
return sql.OrderByField(FieldStatus, opts...).ToFunc()
|
||||
}
|
||||
|
||||
// ByCreatedAt orders the results by the created_at field.
|
||||
func ByCreatedAt(opts ...sql.OrderTermOption) OrderOption {
|
||||
return sql.OrderByField(FieldCreatedAt, opts...).ToFunc()
|
||||
}
|
||||
|
||||
// ByUpdateAt orders the results by the update_at field.
|
||||
func ByUpdateAt(opts ...sql.OrderTermOption) OrderOption {
|
||||
return sql.OrderByField(FieldUpdateAt, opts...).ToFunc()
|
||||
}
|
||||
|
||||
// ByDeleted orders the results by the deleted field.
|
||||
func ByDeleted(opts ...sql.OrderTermOption) OrderOption {
|
||||
return sql.OrderByField(FieldDeleted, opts...).ToFunc()
|
||||
}
|
||||
|
||||
// ByScaAuthUserField orders the results by sca_auth_user field.
|
||||
func ByScaAuthUserField(field string, opts ...sql.OrderTermOption) OrderOption {
|
||||
return func(s *sql.Selector) {
|
||||
sqlgraph.OrderByNeighborTerms(s, newScaAuthUserStep(), sql.OrderByField(field, opts...))
|
||||
}
|
||||
}
|
||||
func newScaAuthUserStep() *sqlgraph.Step {
|
||||
return sqlgraph.NewStep(
|
||||
sqlgraph.From(Table, FieldID),
|
||||
sqlgraph.To(ScaAuthUserInverseTable, FieldID),
|
||||
sqlgraph.Edge(sqlgraph.M2O, true, ScaAuthUserTable, ScaAuthUserColumn),
|
||||
)
|
||||
}
|
Reference in New Issue
Block a user