u
This commit is contained in:
1 parent
ac0843c041
commit
a917be08d1
65 files changed
+8043
No files matched your search
@@ -0,0 +1,136 @@
|
||||
// Code generated by ent, DO NOT EDIT.
|
||||
|
||||
package userinfo
|
||||
|
||||
import (
|
||||
"time"
|
||||
|
||||
"entgo.io/ent/dialect/sql"
|
||||
)
|
||||
|
||||
const (
|
||||
// Label holds the string label denoting the userinfo type in the database.
|
||||
Label = "user_info"
|
||||
// FieldID holds the string denoting the id field in the database.
|
||||
FieldID = "id"
|
||||
// FieldSeqNo holds the string denoting the seq_no field in the database.
|
||||
FieldSeqNo = "seq_no"
|
||||
// FieldEmail holds the string denoting the email field in the database.
|
||||
FieldEmail = "email"
|
||||
// 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"
|
||||
// FieldGender holds the string denoting the gender field in the database.
|
||||
FieldGender = "gender"
|
||||
// FieldAccount holds the string denoting the account field in the database.
|
||||
FieldAccount = "account"
|
||||
// FieldCreateTime holds the string denoting the create_time field in the database.
|
||||
FieldCreateTime = "create_time"
|
||||
// FieldUpdateTime holds the string denoting the update_time field in the database.
|
||||
FieldUpdateTime = "update_time"
|
||||
// FieldLastLoginTime holds the string denoting the last_login_time field in the database.
|
||||
FieldLastLoginTime = "last_login_time"
|
||||
// Table holds the table name of the userinfo in the database.
|
||||
Table = "user_info"
|
||||
)
|
||||
|
||||
// Columns holds all SQL columns for userinfo fields.
|
||||
var Columns = []string{
|
||||
FieldID,
|
||||
FieldSeqNo,
|
||||
FieldEmail,
|
||||
FieldUsername,
|
||||
FieldPassword,
|
||||
FieldGender,
|
||||
FieldAccount,
|
||||
FieldCreateTime,
|
||||
FieldUpdateTime,
|
||||
FieldLastLoginTime,
|
||||
}
|
||||
|
||||
// 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 (
|
||||
// DefaultSeqNo holds the default value on creation for the "seq_no" field.
|
||||
DefaultSeqNo int64
|
||||
// EmailValidator is a validator for the "email" field. It is called by the builders before save.
|
||||
EmailValidator func(string) error
|
||||
// UsernameValidator is a validator for the "username" field. It is called by the builders before save.
|
||||
UsernameValidator func(string) error
|
||||
// PasswordValidator is a validator for the "password" field. It is called by the builders before save.
|
||||
PasswordValidator func(string) error
|
||||
// DefaultGender holds the default value on creation for the "gender" field.
|
||||
DefaultGender int64
|
||||
// AccountValidator is a validator for the "account" field. It is called by the builders before save.
|
||||
AccountValidator func(string) error
|
||||
// DefaultCreateTime holds the default value on creation for the "create_time" field.
|
||||
DefaultCreateTime func() time.Time
|
||||
// DefaultUpdateTime holds the default value on creation for the "update_time" field.
|
||||
DefaultUpdateTime func() time.Time
|
||||
// UpdateDefaultUpdateTime holds the default value on update for the "update_time" field.
|
||||
UpdateDefaultUpdateTime func() time.Time
|
||||
// DefaultID holds the default value on creation for the "id" field.
|
||||
DefaultID func() int64
|
||||
)
|
||||
|
||||
// OrderOption defines the ordering options for the UserInfo 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()
|
||||
}
|
||||
|
||||
// BySeqNo orders the results by the seq_no field.
|
||||
func BySeqNo(opts ...sql.OrderTermOption) OrderOption {
|
||||
return sql.OrderByField(FieldSeqNo, opts...).ToFunc()
|
||||
}
|
||||
|
||||
// ByEmail orders the results by the email field.
|
||||
func ByEmail(opts ...sql.OrderTermOption) OrderOption {
|
||||
return sql.OrderByField(FieldEmail, opts...).ToFunc()
|
||||
}
|
||||
|
||||
// ByUsername orders the results by the username field.
|
||||
func ByUsername(opts ...sql.OrderTermOption) OrderOption {
|
||||
return sql.OrderByField(FieldUsername, 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()
|
||||
}
|
||||
|
||||
// ByAccount orders the results by the account field.
|
||||
func ByAccount(opts ...sql.OrderTermOption) OrderOption {
|
||||
return sql.OrderByField(FieldAccount, opts...).ToFunc()
|
||||
}
|
||||
|
||||
// ByCreateTime orders the results by the create_time field.
|
||||
func ByCreateTime(opts ...sql.OrderTermOption) OrderOption {
|
||||
return sql.OrderByField(FieldCreateTime, opts...).ToFunc()
|
||||
}
|
||||
|
||||
// ByUpdateTime orders the results by the update_time field.
|
||||
func ByUpdateTime(opts ...sql.OrderTermOption) OrderOption {
|
||||
return sql.OrderByField(FieldUpdateTime, opts...).ToFunc()
|
||||
}
|
||||
|
||||
// ByLastLoginTime orders the results by the last_login_time field.
|
||||
func ByLastLoginTime(opts ...sql.OrderTermOption) OrderOption {
|
||||
return sql.OrderByField(FieldLastLoginTime, opts...).ToFunc()
|
||||
}
|
||||
Reference in new issue
Block a user