🎉 init
This commit is contained in:
265
common/ent/scaauthuser/scaauthuser.go
Normal file
265
common/ent/scaauthuser/scaauthuser.go
Normal file
@@ -0,0 +1,265 @@
|
||||
// Code generated by ent, DO NOT EDIT.
|
||||
|
||||
package scaauthuser
|
||||
|
||||
import (
|
||||
"time"
|
||||
|
||||
"entgo.io/ent/dialect/sql"
|
||||
"entgo.io/ent/dialect/sql/sqlgraph"
|
||||
)
|
||||
|
||||
const (
|
||||
// Label holds the string label denoting the scaauthuser type in the database.
|
||||
Label = "sca_auth_user"
|
||||
// FieldID holds the string denoting the id field in the database.
|
||||
FieldID = "id"
|
||||
// FieldUID holds the string denoting the uid field in the database.
|
||||
FieldUID = "uid"
|
||||
// FieldUsername holds the string denoting the username field in the database.
|
||||
FieldUsername = "username"
|
||||
// FieldNickname holds the string denoting the nickname field in the database.
|
||||
FieldNickname = "nickname"
|
||||
// FieldEmail holds the string denoting the email field in the database.
|
||||
FieldEmail = "email"
|
||||
// FieldPhone holds the string denoting the phone field in the database.
|
||||
FieldPhone = "phone"
|
||||
// FieldPassword holds the string denoting the password field in the database.
|
||||
FieldPassword = "password"
|
||||
// FieldGender holds the string denoting the gender field in the database.
|
||||
FieldGender = "gender"
|
||||
// FieldAvatar holds the string denoting the avatar field in the database.
|
||||
FieldAvatar = "avatar"
|
||||
// FieldStatus holds the string denoting the status field in the database.
|
||||
FieldStatus = "status"
|
||||
// FieldIntroduce holds the string denoting the introduce field in the database.
|
||||
FieldIntroduce = "introduce"
|
||||
// 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"
|
||||
// FieldBlog holds the string denoting the blog field in the database.
|
||||
FieldBlog = "blog"
|
||||
// FieldLocation holds the string denoting the location field in the database.
|
||||
FieldLocation = "location"
|
||||
// FieldCompany holds the string denoting the company field in the database.
|
||||
FieldCompany = "company"
|
||||
// EdgeScaAuthUserSocial holds the string denoting the sca_auth_user_social edge name in mutations.
|
||||
EdgeScaAuthUserSocial = "sca_auth_user_social"
|
||||
// EdgeScaAuthUserDevice holds the string denoting the sca_auth_user_device edge name in mutations.
|
||||
EdgeScaAuthUserDevice = "sca_auth_user_device"
|
||||
// Table holds the table name of the scaauthuser in the database.
|
||||
Table = "sca_auth_users"
|
||||
// ScaAuthUserSocialTable is the table that holds the sca_auth_user_social relation/edge.
|
||||
ScaAuthUserSocialTable = "sca_auth_user_socials"
|
||||
// ScaAuthUserSocialInverseTable is the table name for the ScaAuthUserSocial entity.
|
||||
// It exists in this package in order to avoid circular dependency with the "scaauthusersocial" package.
|
||||
ScaAuthUserSocialInverseTable = "sca_auth_user_socials"
|
||||
// ScaAuthUserSocialColumn is the table column denoting the sca_auth_user_social relation/edge.
|
||||
ScaAuthUserSocialColumn = "sca_auth_user_sca_auth_user_social"
|
||||
// ScaAuthUserDeviceTable is the table that holds the sca_auth_user_device relation/edge.
|
||||
ScaAuthUserDeviceTable = "sca_auth_user_devices"
|
||||
// ScaAuthUserDeviceInverseTable is the table name for the ScaAuthUserDevice entity.
|
||||
// It exists in this package in order to avoid circular dependency with the "scaauthuserdevice" package.
|
||||
ScaAuthUserDeviceInverseTable = "sca_auth_user_devices"
|
||||
// ScaAuthUserDeviceColumn is the table column denoting the sca_auth_user_device relation/edge.
|
||||
ScaAuthUserDeviceColumn = "sca_auth_user_sca_auth_user_device"
|
||||
)
|
||||
|
||||
// Columns holds all SQL columns for scaauthuser fields.
|
||||
var Columns = []string{
|
||||
FieldID,
|
||||
FieldUID,
|
||||
FieldUsername,
|
||||
FieldNickname,
|
||||
FieldEmail,
|
||||
FieldPhone,
|
||||
FieldPassword,
|
||||
FieldGender,
|
||||
FieldAvatar,
|
||||
FieldStatus,
|
||||
FieldIntroduce,
|
||||
FieldCreatedAt,
|
||||
FieldUpdateAt,
|
||||
FieldDeleted,
|
||||
FieldBlog,
|
||||
FieldLocation,
|
||||
FieldCompany,
|
||||
}
|
||||
|
||||
// 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 (
|
||||
// UIDValidator is a validator for the "uid" field. It is called by the builders before save.
|
||||
UIDValidator func(string) error
|
||||
// UsernameValidator is a validator for the "username" field. It is called by the builders before save.
|
||||
UsernameValidator func(string) error
|
||||
// NicknameValidator is a validator for the "nickname" field. It is called by the builders before save.
|
||||
NicknameValidator func(string) error
|
||||
// EmailValidator is a validator for the "email" field. It is called by the builders before save.
|
||||
EmailValidator func(string) error
|
||||
// PhoneValidator is a validator for the "phone" field. It is called by the builders before save.
|
||||
PhoneValidator func(string) error
|
||||
// PasswordValidator is a validator for the "password" field. It is called by the builders before save.
|
||||
PasswordValidator func(string) error
|
||||
// GenderValidator is a validator for the "gender" field. It is called by the builders before save.
|
||||
GenderValidator func(string) error
|
||||
// DefaultStatus holds the default value on creation for the "status" field.
|
||||
DefaultStatus int8
|
||||
// IntroduceValidator is a validator for the "introduce" field. It is called by the builders before save.
|
||||
IntroduceValidator func(string) error
|
||||
// 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 int8
|
||||
// BlogValidator is a validator for the "blog" field. It is called by the builders before save.
|
||||
BlogValidator func(string) error
|
||||
// LocationValidator is a validator for the "location" field. It is called by the builders before save.
|
||||
LocationValidator func(string) error
|
||||
// CompanyValidator is a validator for the "company" field. It is called by the builders before save.
|
||||
CompanyValidator func(string) error
|
||||
)
|
||||
|
||||
// OrderOption defines the ordering options for the ScaAuthUser 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()
|
||||
}
|
||||
|
||||
// ByUID orders the results by the uid field.
|
||||
func ByUID(opts ...sql.OrderTermOption) OrderOption {
|
||||
return sql.OrderByField(FieldUID, opts...).ToFunc()
|
||||
}
|
||||
|
||||
// ByUsername orders the results by the username field.
|
||||
func ByUsername(opts ...sql.OrderTermOption) OrderOption {
|
||||
return sql.OrderByField(FieldUsername, opts...).ToFunc()
|
||||
}
|
||||
|
||||
// ByNickname orders the results by the nickname field.
|
||||
func ByNickname(opts ...sql.OrderTermOption) OrderOption {
|
||||
return sql.OrderByField(FieldNickname, opts...).ToFunc()
|
||||
}
|
||||
|
||||
// ByEmail orders the results by the email field.
|
||||
func ByEmail(opts ...sql.OrderTermOption) OrderOption {
|
||||
return sql.OrderByField(FieldEmail, opts...).ToFunc()
|
||||
}
|
||||
|
||||
// ByPhone orders the results by the phone field.
|
||||
func ByPhone(opts ...sql.OrderTermOption) OrderOption {
|
||||
return sql.OrderByField(FieldPhone, opts...).ToFunc()
|
||||
}
|
||||
|
||||
// ByPassword orders the results by the password field.
|
||||
func ByPassword(opts ...sql.OrderTermOption) OrderOption {
|
||||
return sql.OrderByField(FieldPassword, opts...).ToFunc()
|
||||
}
|
||||
|
||||
// ByGender orders the results by the gender field.
|
||||
func ByGender(opts ...sql.OrderTermOption) OrderOption {
|
||||
return sql.OrderByField(FieldGender, opts...).ToFunc()
|
||||
}
|
||||
|
||||
// ByAvatar orders the results by the avatar field.
|
||||
func ByAvatar(opts ...sql.OrderTermOption) OrderOption {
|
||||
return sql.OrderByField(FieldAvatar, opts...).ToFunc()
|
||||
}
|
||||
|
||||
// ByStatus orders the results by the status field.
|
||||
func ByStatus(opts ...sql.OrderTermOption) OrderOption {
|
||||
return sql.OrderByField(FieldStatus, opts...).ToFunc()
|
||||
}
|
||||
|
||||
// ByIntroduce orders the results by the introduce field.
|
||||
func ByIntroduce(opts ...sql.OrderTermOption) OrderOption {
|
||||
return sql.OrderByField(FieldIntroduce, 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()
|
||||
}
|
||||
|
||||
// ByBlog orders the results by the blog field.
|
||||
func ByBlog(opts ...sql.OrderTermOption) OrderOption {
|
||||
return sql.OrderByField(FieldBlog, opts...).ToFunc()
|
||||
}
|
||||
|
||||
// ByLocation orders the results by the location field.
|
||||
func ByLocation(opts ...sql.OrderTermOption) OrderOption {
|
||||
return sql.OrderByField(FieldLocation, opts...).ToFunc()
|
||||
}
|
||||
|
||||
// ByCompany orders the results by the company field.
|
||||
func ByCompany(opts ...sql.OrderTermOption) OrderOption {
|
||||
return sql.OrderByField(FieldCompany, opts...).ToFunc()
|
||||
}
|
||||
|
||||
// ByScaAuthUserSocialCount orders the results by sca_auth_user_social count.
|
||||
func ByScaAuthUserSocialCount(opts ...sql.OrderTermOption) OrderOption {
|
||||
return func(s *sql.Selector) {
|
||||
sqlgraph.OrderByNeighborsCount(s, newScaAuthUserSocialStep(), opts...)
|
||||
}
|
||||
}
|
||||
|
||||
// ByScaAuthUserSocial orders the results by sca_auth_user_social terms.
|
||||
func ByScaAuthUserSocial(term sql.OrderTerm, terms ...sql.OrderTerm) OrderOption {
|
||||
return func(s *sql.Selector) {
|
||||
sqlgraph.OrderByNeighborTerms(s, newScaAuthUserSocialStep(), append([]sql.OrderTerm{term}, terms...)...)
|
||||
}
|
||||
}
|
||||
|
||||
// ByScaAuthUserDeviceCount orders the results by sca_auth_user_device count.
|
||||
func ByScaAuthUserDeviceCount(opts ...sql.OrderTermOption) OrderOption {
|
||||
return func(s *sql.Selector) {
|
||||
sqlgraph.OrderByNeighborsCount(s, newScaAuthUserDeviceStep(), opts...)
|
||||
}
|
||||
}
|
||||
|
||||
// ByScaAuthUserDevice orders the results by sca_auth_user_device terms.
|
||||
func ByScaAuthUserDevice(term sql.OrderTerm, terms ...sql.OrderTerm) OrderOption {
|
||||
return func(s *sql.Selector) {
|
||||
sqlgraph.OrderByNeighborTerms(s, newScaAuthUserDeviceStep(), append([]sql.OrderTerm{term}, terms...)...)
|
||||
}
|
||||
}
|
||||
func newScaAuthUserSocialStep() *sqlgraph.Step {
|
||||
return sqlgraph.NewStep(
|
||||
sqlgraph.From(Table, FieldID),
|
||||
sqlgraph.To(ScaAuthUserSocialInverseTable, FieldID),
|
||||
sqlgraph.Edge(sqlgraph.O2M, false, ScaAuthUserSocialTable, ScaAuthUserSocialColumn),
|
||||
)
|
||||
}
|
||||
func newScaAuthUserDeviceStep() *sqlgraph.Step {
|
||||
return sqlgraph.NewStep(
|
||||
sqlgraph.From(Table, FieldID),
|
||||
sqlgraph.To(ScaAuthUserDeviceInverseTable, FieldID),
|
||||
sqlgraph.Edge(sqlgraph.O2M, false, ScaAuthUserDeviceTable, ScaAuthUserDeviceColumn),
|
||||
)
|
||||
}
|
Reference in New Issue
Block a user