Init V4 community edition (#2265)

* Init V4 community edition

* Init V4 community edition
This commit is contained in:
AaronLiu
2025-04-20 17:31:25 +08:00
committed by GitHub
parent da4e44b77a
commit 21d158db07
597 changed files with 119415 additions and 41692 deletions

402
ent/user/user.go Normal file
View File

@@ -0,0 +1,402 @@
// Code generated by ent, DO NOT EDIT.
package user
import (
"fmt"
"time"
"entgo.io/ent"
"entgo.io/ent/dialect/sql"
"entgo.io/ent/dialect/sql/sqlgraph"
"github.com/cloudreve/Cloudreve/v4/inventory/types"
)
const (
// Label holds the string label denoting the user type in the database.
Label = "user"
// FieldID holds the string denoting the id field in the database.
FieldID = "id"
// FieldCreatedAt holds the string denoting the created_at field in the database.
FieldCreatedAt = "created_at"
// FieldUpdatedAt holds the string denoting the updated_at field in the database.
FieldUpdatedAt = "updated_at"
// FieldDeletedAt holds the string denoting the deleted_at field in the database.
FieldDeletedAt = "deleted_at"
// FieldEmail holds the string denoting the email field in the database.
FieldEmail = "email"
// FieldNick holds the string denoting the nick field in the database.
FieldNick = "nick"
// FieldPassword holds the string denoting the password field in the database.
FieldPassword = "password"
// FieldStatus holds the string denoting the status field in the database.
FieldStatus = "status"
// FieldStorage holds the string denoting the storage field in the database.
FieldStorage = "storage"
// FieldTwoFactorSecret holds the string denoting the two_factor_secret field in the database.
FieldTwoFactorSecret = "two_factor_secret"
// FieldAvatar holds the string denoting the avatar field in the database.
FieldAvatar = "avatar"
// FieldSettings holds the string denoting the settings field in the database.
FieldSettings = "settings"
// FieldGroupUsers holds the string denoting the group_users field in the database.
FieldGroupUsers = "group_users"
// EdgeGroup holds the string denoting the group edge name in mutations.
EdgeGroup = "group"
// EdgeFiles holds the string denoting the files edge name in mutations.
EdgeFiles = "files"
// EdgeDavAccounts holds the string denoting the dav_accounts edge name in mutations.
EdgeDavAccounts = "dav_accounts"
// EdgeShares holds the string denoting the shares edge name in mutations.
EdgeShares = "shares"
// EdgePasskey holds the string denoting the passkey edge name in mutations.
EdgePasskey = "passkey"
// EdgeTasks holds the string denoting the tasks edge name in mutations.
EdgeTasks = "tasks"
// EdgeEntities holds the string denoting the entities edge name in mutations.
EdgeEntities = "entities"
// Table holds the table name of the user in the database.
Table = "users"
// GroupTable is the table that holds the group relation/edge.
GroupTable = "users"
// GroupInverseTable is the table name for the Group entity.
// It exists in this package in order to avoid circular dependency with the "group" package.
GroupInverseTable = "groups"
// GroupColumn is the table column denoting the group relation/edge.
GroupColumn = "group_users"
// FilesTable is the table that holds the files relation/edge.
FilesTable = "files"
// FilesInverseTable is the table name for the File entity.
// It exists in this package in order to avoid circular dependency with the "file" package.
FilesInverseTable = "files"
// FilesColumn is the table column denoting the files relation/edge.
FilesColumn = "owner_id"
// DavAccountsTable is the table that holds the dav_accounts relation/edge.
DavAccountsTable = "dav_accounts"
// DavAccountsInverseTable is the table name for the DavAccount entity.
// It exists in this package in order to avoid circular dependency with the "davaccount" package.
DavAccountsInverseTable = "dav_accounts"
// DavAccountsColumn is the table column denoting the dav_accounts relation/edge.
DavAccountsColumn = "owner_id"
// SharesTable is the table that holds the shares relation/edge.
SharesTable = "shares"
// SharesInverseTable is the table name for the Share entity.
// It exists in this package in order to avoid circular dependency with the "share" package.
SharesInverseTable = "shares"
// SharesColumn is the table column denoting the shares relation/edge.
SharesColumn = "user_shares"
// PasskeyTable is the table that holds the passkey relation/edge.
PasskeyTable = "passkeys"
// PasskeyInverseTable is the table name for the Passkey entity.
// It exists in this package in order to avoid circular dependency with the "passkey" package.
PasskeyInverseTable = "passkeys"
// PasskeyColumn is the table column denoting the passkey relation/edge.
PasskeyColumn = "user_id"
// TasksTable is the table that holds the tasks relation/edge.
TasksTable = "tasks"
// TasksInverseTable is the table name for the Task entity.
// It exists in this package in order to avoid circular dependency with the "task" package.
TasksInverseTable = "tasks"
// TasksColumn is the table column denoting the tasks relation/edge.
TasksColumn = "user_tasks"
// EntitiesTable is the table that holds the entities relation/edge.
EntitiesTable = "entities"
// EntitiesInverseTable is the table name for the Entity entity.
// It exists in this package in order to avoid circular dependency with the "entity" package.
EntitiesInverseTable = "entities"
// EntitiesColumn is the table column denoting the entities relation/edge.
EntitiesColumn = "created_by"
)
// Columns holds all SQL columns for user fields.
var Columns = []string{
FieldID,
FieldCreatedAt,
FieldUpdatedAt,
FieldDeletedAt,
FieldEmail,
FieldNick,
FieldPassword,
FieldStatus,
FieldStorage,
FieldTwoFactorSecret,
FieldAvatar,
FieldSettings,
FieldGroupUsers,
}
// ForeignKeys holds the SQL foreign-keys that are owned by the "users"
// table and are not defined as standalone fields in the schema.
var ForeignKeys = []string{
"storage_policy_users",
}
// 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
}
// Note that the variables below are initialized by the runtime
// package on the initialization of the application. Therefore,
// it should be imported in the main as follows:
//
// import _ "github.com/cloudreve/Cloudreve/v4/ent/runtime"
var (
Hooks [1]ent.Hook
Interceptors [1]ent.Interceptor
// DefaultCreatedAt holds the default value on creation for the "created_at" field.
DefaultCreatedAt func() time.Time
// DefaultUpdatedAt holds the default value on creation for the "updated_at" field.
DefaultUpdatedAt func() time.Time
// UpdateDefaultUpdatedAt holds the default value on update for the "updated_at" field.
UpdateDefaultUpdatedAt func() time.Time
// EmailValidator is a validator for the "email" field. It is called by the builders before save.
EmailValidator func(string) error
// NickValidator is a validator for the "nick" field. It is called by the builders before save.
NickValidator func(string) error
// DefaultStorage holds the default value on creation for the "storage" field.
DefaultStorage int64
// DefaultSettings holds the default value on creation for the "settings" field.
DefaultSettings *types.UserSetting
)
// Status defines the type for the "status" enum field.
type Status string
// StatusActive is the default value of the Status enum.
const DefaultStatus = StatusActive
// Status values.
const (
StatusActive Status = "active"
StatusInactive Status = "inactive"
StatusManualBanned Status = "manual_banned"
StatusSysBanned Status = "sys_banned"
)
func (s Status) String() string {
return string(s)
}
// StatusValidator is a validator for the "status" field enum values. It is called by the builders before save.
func StatusValidator(s Status) error {
switch s {
case StatusActive, StatusInactive, StatusManualBanned, StatusSysBanned:
return nil
default:
return fmt.Errorf("user: invalid enum value for status field: %q", s)
}
}
// OrderOption defines the ordering options for the User 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()
}
// ByCreatedAt orders the results by the created_at field.
func ByCreatedAt(opts ...sql.OrderTermOption) OrderOption {
return sql.OrderByField(FieldCreatedAt, opts...).ToFunc()
}
// ByUpdatedAt orders the results by the updated_at field.
func ByUpdatedAt(opts ...sql.OrderTermOption) OrderOption {
return sql.OrderByField(FieldUpdatedAt, opts...).ToFunc()
}
// ByDeletedAt orders the results by the deleted_at field.
func ByDeletedAt(opts ...sql.OrderTermOption) OrderOption {
return sql.OrderByField(FieldDeletedAt, opts...).ToFunc()
}
// ByEmail orders the results by the email field.
func ByEmail(opts ...sql.OrderTermOption) OrderOption {
return sql.OrderByField(FieldEmail, opts...).ToFunc()
}
// ByNick orders the results by the nick field.
func ByNick(opts ...sql.OrderTermOption) OrderOption {
return sql.OrderByField(FieldNick, opts...).ToFunc()
}
// ByPassword orders the results by the password field.
func ByPassword(opts ...sql.OrderTermOption) OrderOption {
return sql.OrderByField(FieldPassword, opts...).ToFunc()
}
// ByStatus orders the results by the status field.
func ByStatus(opts ...sql.OrderTermOption) OrderOption {
return sql.OrderByField(FieldStatus, opts...).ToFunc()
}
// ByStorage orders the results by the storage field.
func ByStorage(opts ...sql.OrderTermOption) OrderOption {
return sql.OrderByField(FieldStorage, opts...).ToFunc()
}
// ByTwoFactorSecret orders the results by the two_factor_secret field.
func ByTwoFactorSecret(opts ...sql.OrderTermOption) OrderOption {
return sql.OrderByField(FieldTwoFactorSecret, opts...).ToFunc()
}
// ByAvatar orders the results by the avatar field.
func ByAvatar(opts ...sql.OrderTermOption) OrderOption {
return sql.OrderByField(FieldAvatar, opts...).ToFunc()
}
// ByGroupUsers orders the results by the group_users field.
func ByGroupUsers(opts ...sql.OrderTermOption) OrderOption {
return sql.OrderByField(FieldGroupUsers, opts...).ToFunc()
}
// ByGroupField orders the results by group field.
func ByGroupField(field string, opts ...sql.OrderTermOption) OrderOption {
return func(s *sql.Selector) {
sqlgraph.OrderByNeighborTerms(s, newGroupStep(), sql.OrderByField(field, opts...))
}
}
// ByFilesCount orders the results by files count.
func ByFilesCount(opts ...sql.OrderTermOption) OrderOption {
return func(s *sql.Selector) {
sqlgraph.OrderByNeighborsCount(s, newFilesStep(), opts...)
}
}
// ByFiles orders the results by files terms.
func ByFiles(term sql.OrderTerm, terms ...sql.OrderTerm) OrderOption {
return func(s *sql.Selector) {
sqlgraph.OrderByNeighborTerms(s, newFilesStep(), append([]sql.OrderTerm{term}, terms...)...)
}
}
// ByDavAccountsCount orders the results by dav_accounts count.
func ByDavAccountsCount(opts ...sql.OrderTermOption) OrderOption {
return func(s *sql.Selector) {
sqlgraph.OrderByNeighborsCount(s, newDavAccountsStep(), opts...)
}
}
// ByDavAccounts orders the results by dav_accounts terms.
func ByDavAccounts(term sql.OrderTerm, terms ...sql.OrderTerm) OrderOption {
return func(s *sql.Selector) {
sqlgraph.OrderByNeighborTerms(s, newDavAccountsStep(), append([]sql.OrderTerm{term}, terms...)...)
}
}
// BySharesCount orders the results by shares count.
func BySharesCount(opts ...sql.OrderTermOption) OrderOption {
return func(s *sql.Selector) {
sqlgraph.OrderByNeighborsCount(s, newSharesStep(), opts...)
}
}
// ByShares orders the results by shares terms.
func ByShares(term sql.OrderTerm, terms ...sql.OrderTerm) OrderOption {
return func(s *sql.Selector) {
sqlgraph.OrderByNeighborTerms(s, newSharesStep(), append([]sql.OrderTerm{term}, terms...)...)
}
}
// ByPasskeyCount orders the results by passkey count.
func ByPasskeyCount(opts ...sql.OrderTermOption) OrderOption {
return func(s *sql.Selector) {
sqlgraph.OrderByNeighborsCount(s, newPasskeyStep(), opts...)
}
}
// ByPasskey orders the results by passkey terms.
func ByPasskey(term sql.OrderTerm, terms ...sql.OrderTerm) OrderOption {
return func(s *sql.Selector) {
sqlgraph.OrderByNeighborTerms(s, newPasskeyStep(), append([]sql.OrderTerm{term}, terms...)...)
}
}
// ByTasksCount orders the results by tasks count.
func ByTasksCount(opts ...sql.OrderTermOption) OrderOption {
return func(s *sql.Selector) {
sqlgraph.OrderByNeighborsCount(s, newTasksStep(), opts...)
}
}
// ByTasks orders the results by tasks terms.
func ByTasks(term sql.OrderTerm, terms ...sql.OrderTerm) OrderOption {
return func(s *sql.Selector) {
sqlgraph.OrderByNeighborTerms(s, newTasksStep(), append([]sql.OrderTerm{term}, terms...)...)
}
}
// ByEntitiesCount orders the results by entities count.
func ByEntitiesCount(opts ...sql.OrderTermOption) OrderOption {
return func(s *sql.Selector) {
sqlgraph.OrderByNeighborsCount(s, newEntitiesStep(), opts...)
}
}
// ByEntities orders the results by entities terms.
func ByEntities(term sql.OrderTerm, terms ...sql.OrderTerm) OrderOption {
return func(s *sql.Selector) {
sqlgraph.OrderByNeighborTerms(s, newEntitiesStep(), append([]sql.OrderTerm{term}, terms...)...)
}
}
func newGroupStep() *sqlgraph.Step {
return sqlgraph.NewStep(
sqlgraph.From(Table, FieldID),
sqlgraph.To(GroupInverseTable, FieldID),
sqlgraph.Edge(sqlgraph.M2O, true, GroupTable, GroupColumn),
)
}
func newFilesStep() *sqlgraph.Step {
return sqlgraph.NewStep(
sqlgraph.From(Table, FieldID),
sqlgraph.To(FilesInverseTable, FieldID),
sqlgraph.Edge(sqlgraph.O2M, false, FilesTable, FilesColumn),
)
}
func newDavAccountsStep() *sqlgraph.Step {
return sqlgraph.NewStep(
sqlgraph.From(Table, FieldID),
sqlgraph.To(DavAccountsInverseTable, FieldID),
sqlgraph.Edge(sqlgraph.O2M, false, DavAccountsTable, DavAccountsColumn),
)
}
func newSharesStep() *sqlgraph.Step {
return sqlgraph.NewStep(
sqlgraph.From(Table, FieldID),
sqlgraph.To(SharesInverseTable, FieldID),
sqlgraph.Edge(sqlgraph.O2M, false, SharesTable, SharesColumn),
)
}
func newPasskeyStep() *sqlgraph.Step {
return sqlgraph.NewStep(
sqlgraph.From(Table, FieldID),
sqlgraph.To(PasskeyInverseTable, FieldID),
sqlgraph.Edge(sqlgraph.O2M, false, PasskeyTable, PasskeyColumn),
)
}
func newTasksStep() *sqlgraph.Step {
return sqlgraph.NewStep(
sqlgraph.From(Table, FieldID),
sqlgraph.To(TasksInverseTable, FieldID),
sqlgraph.Edge(sqlgraph.O2M, false, TasksTable, TasksColumn),
)
}
func newEntitiesStep() *sqlgraph.Step {
return sqlgraph.NewStep(
sqlgraph.From(Table, FieldID),
sqlgraph.To(EntitiesInverseTable, FieldID),
sqlgraph.Edge(sqlgraph.O2M, false, EntitiesTable, EntitiesColumn),
)
}

857
ent/user/where.go Normal file
View File

@@ -0,0 +1,857 @@
// Code generated by ent, DO NOT EDIT.
package user
import (
"time"
"entgo.io/ent/dialect/sql"
"entgo.io/ent/dialect/sql/sqlgraph"
"github.com/cloudreve/Cloudreve/v4/ent/predicate"
)
// ID filters vertices based on their ID field.
func ID(id int) predicate.User {
return predicate.User(sql.FieldEQ(FieldID, id))
}
// IDEQ applies the EQ predicate on the ID field.
func IDEQ(id int) predicate.User {
return predicate.User(sql.FieldEQ(FieldID, id))
}
// IDNEQ applies the NEQ predicate on the ID field.
func IDNEQ(id int) predicate.User {
return predicate.User(sql.FieldNEQ(FieldID, id))
}
// IDIn applies the In predicate on the ID field.
func IDIn(ids ...int) predicate.User {
return predicate.User(sql.FieldIn(FieldID, ids...))
}
// IDNotIn applies the NotIn predicate on the ID field.
func IDNotIn(ids ...int) predicate.User {
return predicate.User(sql.FieldNotIn(FieldID, ids...))
}
// IDGT applies the GT predicate on the ID field.
func IDGT(id int) predicate.User {
return predicate.User(sql.FieldGT(FieldID, id))
}
// IDGTE applies the GTE predicate on the ID field.
func IDGTE(id int) predicate.User {
return predicate.User(sql.FieldGTE(FieldID, id))
}
// IDLT applies the LT predicate on the ID field.
func IDLT(id int) predicate.User {
return predicate.User(sql.FieldLT(FieldID, id))
}
// IDLTE applies the LTE predicate on the ID field.
func IDLTE(id int) predicate.User {
return predicate.User(sql.FieldLTE(FieldID, id))
}
// CreatedAt applies equality check predicate on the "created_at" field. It's identical to CreatedAtEQ.
func CreatedAt(v time.Time) predicate.User {
return predicate.User(sql.FieldEQ(FieldCreatedAt, v))
}
// UpdatedAt applies equality check predicate on the "updated_at" field. It's identical to UpdatedAtEQ.
func UpdatedAt(v time.Time) predicate.User {
return predicate.User(sql.FieldEQ(FieldUpdatedAt, v))
}
// DeletedAt applies equality check predicate on the "deleted_at" field. It's identical to DeletedAtEQ.
func DeletedAt(v time.Time) predicate.User {
return predicate.User(sql.FieldEQ(FieldDeletedAt, v))
}
// Email applies equality check predicate on the "email" field. It's identical to EmailEQ.
func Email(v string) predicate.User {
return predicate.User(sql.FieldEQ(FieldEmail, v))
}
// Nick applies equality check predicate on the "nick" field. It's identical to NickEQ.
func Nick(v string) predicate.User {
return predicate.User(sql.FieldEQ(FieldNick, v))
}
// Password applies equality check predicate on the "password" field. It's identical to PasswordEQ.
func Password(v string) predicate.User {
return predicate.User(sql.FieldEQ(FieldPassword, v))
}
// Storage applies equality check predicate on the "storage" field. It's identical to StorageEQ.
func Storage(v int64) predicate.User {
return predicate.User(sql.FieldEQ(FieldStorage, v))
}
// TwoFactorSecret applies equality check predicate on the "two_factor_secret" field. It's identical to TwoFactorSecretEQ.
func TwoFactorSecret(v string) predicate.User {
return predicate.User(sql.FieldEQ(FieldTwoFactorSecret, v))
}
// Avatar applies equality check predicate on the "avatar" field. It's identical to AvatarEQ.
func Avatar(v string) predicate.User {
return predicate.User(sql.FieldEQ(FieldAvatar, v))
}
// GroupUsers applies equality check predicate on the "group_users" field. It's identical to GroupUsersEQ.
func GroupUsers(v int) predicate.User {
return predicate.User(sql.FieldEQ(FieldGroupUsers, v))
}
// CreatedAtEQ applies the EQ predicate on the "created_at" field.
func CreatedAtEQ(v time.Time) predicate.User {
return predicate.User(sql.FieldEQ(FieldCreatedAt, v))
}
// CreatedAtNEQ applies the NEQ predicate on the "created_at" field.
func CreatedAtNEQ(v time.Time) predicate.User {
return predicate.User(sql.FieldNEQ(FieldCreatedAt, v))
}
// CreatedAtIn applies the In predicate on the "created_at" field.
func CreatedAtIn(vs ...time.Time) predicate.User {
return predicate.User(sql.FieldIn(FieldCreatedAt, vs...))
}
// CreatedAtNotIn applies the NotIn predicate on the "created_at" field.
func CreatedAtNotIn(vs ...time.Time) predicate.User {
return predicate.User(sql.FieldNotIn(FieldCreatedAt, vs...))
}
// CreatedAtGT applies the GT predicate on the "created_at" field.
func CreatedAtGT(v time.Time) predicate.User {
return predicate.User(sql.FieldGT(FieldCreatedAt, v))
}
// CreatedAtGTE applies the GTE predicate on the "created_at" field.
func CreatedAtGTE(v time.Time) predicate.User {
return predicate.User(sql.FieldGTE(FieldCreatedAt, v))
}
// CreatedAtLT applies the LT predicate on the "created_at" field.
func CreatedAtLT(v time.Time) predicate.User {
return predicate.User(sql.FieldLT(FieldCreatedAt, v))
}
// CreatedAtLTE applies the LTE predicate on the "created_at" field.
func CreatedAtLTE(v time.Time) predicate.User {
return predicate.User(sql.FieldLTE(FieldCreatedAt, v))
}
// UpdatedAtEQ applies the EQ predicate on the "updated_at" field.
func UpdatedAtEQ(v time.Time) predicate.User {
return predicate.User(sql.FieldEQ(FieldUpdatedAt, v))
}
// UpdatedAtNEQ applies the NEQ predicate on the "updated_at" field.
func UpdatedAtNEQ(v time.Time) predicate.User {
return predicate.User(sql.FieldNEQ(FieldUpdatedAt, v))
}
// UpdatedAtIn applies the In predicate on the "updated_at" field.
func UpdatedAtIn(vs ...time.Time) predicate.User {
return predicate.User(sql.FieldIn(FieldUpdatedAt, vs...))
}
// UpdatedAtNotIn applies the NotIn predicate on the "updated_at" field.
func UpdatedAtNotIn(vs ...time.Time) predicate.User {
return predicate.User(sql.FieldNotIn(FieldUpdatedAt, vs...))
}
// UpdatedAtGT applies the GT predicate on the "updated_at" field.
func UpdatedAtGT(v time.Time) predicate.User {
return predicate.User(sql.FieldGT(FieldUpdatedAt, v))
}
// UpdatedAtGTE applies the GTE predicate on the "updated_at" field.
func UpdatedAtGTE(v time.Time) predicate.User {
return predicate.User(sql.FieldGTE(FieldUpdatedAt, v))
}
// UpdatedAtLT applies the LT predicate on the "updated_at" field.
func UpdatedAtLT(v time.Time) predicate.User {
return predicate.User(sql.FieldLT(FieldUpdatedAt, v))
}
// UpdatedAtLTE applies the LTE predicate on the "updated_at" field.
func UpdatedAtLTE(v time.Time) predicate.User {
return predicate.User(sql.FieldLTE(FieldUpdatedAt, v))
}
// DeletedAtEQ applies the EQ predicate on the "deleted_at" field.
func DeletedAtEQ(v time.Time) predicate.User {
return predicate.User(sql.FieldEQ(FieldDeletedAt, v))
}
// DeletedAtNEQ applies the NEQ predicate on the "deleted_at" field.
func DeletedAtNEQ(v time.Time) predicate.User {
return predicate.User(sql.FieldNEQ(FieldDeletedAt, v))
}
// DeletedAtIn applies the In predicate on the "deleted_at" field.
func DeletedAtIn(vs ...time.Time) predicate.User {
return predicate.User(sql.FieldIn(FieldDeletedAt, vs...))
}
// DeletedAtNotIn applies the NotIn predicate on the "deleted_at" field.
func DeletedAtNotIn(vs ...time.Time) predicate.User {
return predicate.User(sql.FieldNotIn(FieldDeletedAt, vs...))
}
// DeletedAtGT applies the GT predicate on the "deleted_at" field.
func DeletedAtGT(v time.Time) predicate.User {
return predicate.User(sql.FieldGT(FieldDeletedAt, v))
}
// DeletedAtGTE applies the GTE predicate on the "deleted_at" field.
func DeletedAtGTE(v time.Time) predicate.User {
return predicate.User(sql.FieldGTE(FieldDeletedAt, v))
}
// DeletedAtLT applies the LT predicate on the "deleted_at" field.
func DeletedAtLT(v time.Time) predicate.User {
return predicate.User(sql.FieldLT(FieldDeletedAt, v))
}
// DeletedAtLTE applies the LTE predicate on the "deleted_at" field.
func DeletedAtLTE(v time.Time) predicate.User {
return predicate.User(sql.FieldLTE(FieldDeletedAt, v))
}
// DeletedAtIsNil applies the IsNil predicate on the "deleted_at" field.
func DeletedAtIsNil() predicate.User {
return predicate.User(sql.FieldIsNull(FieldDeletedAt))
}
// DeletedAtNotNil applies the NotNil predicate on the "deleted_at" field.
func DeletedAtNotNil() predicate.User {
return predicate.User(sql.FieldNotNull(FieldDeletedAt))
}
// EmailEQ applies the EQ predicate on the "email" field.
func EmailEQ(v string) predicate.User {
return predicate.User(sql.FieldEQ(FieldEmail, v))
}
// EmailNEQ applies the NEQ predicate on the "email" field.
func EmailNEQ(v string) predicate.User {
return predicate.User(sql.FieldNEQ(FieldEmail, v))
}
// EmailIn applies the In predicate on the "email" field.
func EmailIn(vs ...string) predicate.User {
return predicate.User(sql.FieldIn(FieldEmail, vs...))
}
// EmailNotIn applies the NotIn predicate on the "email" field.
func EmailNotIn(vs ...string) predicate.User {
return predicate.User(sql.FieldNotIn(FieldEmail, vs...))
}
// EmailGT applies the GT predicate on the "email" field.
func EmailGT(v string) predicate.User {
return predicate.User(sql.FieldGT(FieldEmail, v))
}
// EmailGTE applies the GTE predicate on the "email" field.
func EmailGTE(v string) predicate.User {
return predicate.User(sql.FieldGTE(FieldEmail, v))
}
// EmailLT applies the LT predicate on the "email" field.
func EmailLT(v string) predicate.User {
return predicate.User(sql.FieldLT(FieldEmail, v))
}
// EmailLTE applies the LTE predicate on the "email" field.
func EmailLTE(v string) predicate.User {
return predicate.User(sql.FieldLTE(FieldEmail, v))
}
// EmailContains applies the Contains predicate on the "email" field.
func EmailContains(v string) predicate.User {
return predicate.User(sql.FieldContains(FieldEmail, v))
}
// EmailHasPrefix applies the HasPrefix predicate on the "email" field.
func EmailHasPrefix(v string) predicate.User {
return predicate.User(sql.FieldHasPrefix(FieldEmail, v))
}
// EmailHasSuffix applies the HasSuffix predicate on the "email" field.
func EmailHasSuffix(v string) predicate.User {
return predicate.User(sql.FieldHasSuffix(FieldEmail, v))
}
// EmailEqualFold applies the EqualFold predicate on the "email" field.
func EmailEqualFold(v string) predicate.User {
return predicate.User(sql.FieldEqualFold(FieldEmail, v))
}
// EmailContainsFold applies the ContainsFold predicate on the "email" field.
func EmailContainsFold(v string) predicate.User {
return predicate.User(sql.FieldContainsFold(FieldEmail, v))
}
// NickEQ applies the EQ predicate on the "nick" field.
func NickEQ(v string) predicate.User {
return predicate.User(sql.FieldEQ(FieldNick, v))
}
// NickNEQ applies the NEQ predicate on the "nick" field.
func NickNEQ(v string) predicate.User {
return predicate.User(sql.FieldNEQ(FieldNick, v))
}
// NickIn applies the In predicate on the "nick" field.
func NickIn(vs ...string) predicate.User {
return predicate.User(sql.FieldIn(FieldNick, vs...))
}
// NickNotIn applies the NotIn predicate on the "nick" field.
func NickNotIn(vs ...string) predicate.User {
return predicate.User(sql.FieldNotIn(FieldNick, vs...))
}
// NickGT applies the GT predicate on the "nick" field.
func NickGT(v string) predicate.User {
return predicate.User(sql.FieldGT(FieldNick, v))
}
// NickGTE applies the GTE predicate on the "nick" field.
func NickGTE(v string) predicate.User {
return predicate.User(sql.FieldGTE(FieldNick, v))
}
// NickLT applies the LT predicate on the "nick" field.
func NickLT(v string) predicate.User {
return predicate.User(sql.FieldLT(FieldNick, v))
}
// NickLTE applies the LTE predicate on the "nick" field.
func NickLTE(v string) predicate.User {
return predicate.User(sql.FieldLTE(FieldNick, v))
}
// NickContains applies the Contains predicate on the "nick" field.
func NickContains(v string) predicate.User {
return predicate.User(sql.FieldContains(FieldNick, v))
}
// NickHasPrefix applies the HasPrefix predicate on the "nick" field.
func NickHasPrefix(v string) predicate.User {
return predicate.User(sql.FieldHasPrefix(FieldNick, v))
}
// NickHasSuffix applies the HasSuffix predicate on the "nick" field.
func NickHasSuffix(v string) predicate.User {
return predicate.User(sql.FieldHasSuffix(FieldNick, v))
}
// NickEqualFold applies the EqualFold predicate on the "nick" field.
func NickEqualFold(v string) predicate.User {
return predicate.User(sql.FieldEqualFold(FieldNick, v))
}
// NickContainsFold applies the ContainsFold predicate on the "nick" field.
func NickContainsFold(v string) predicate.User {
return predicate.User(sql.FieldContainsFold(FieldNick, v))
}
// PasswordEQ applies the EQ predicate on the "password" field.
func PasswordEQ(v string) predicate.User {
return predicate.User(sql.FieldEQ(FieldPassword, v))
}
// PasswordNEQ applies the NEQ predicate on the "password" field.
func PasswordNEQ(v string) predicate.User {
return predicate.User(sql.FieldNEQ(FieldPassword, v))
}
// PasswordIn applies the In predicate on the "password" field.
func PasswordIn(vs ...string) predicate.User {
return predicate.User(sql.FieldIn(FieldPassword, vs...))
}
// PasswordNotIn applies the NotIn predicate on the "password" field.
func PasswordNotIn(vs ...string) predicate.User {
return predicate.User(sql.FieldNotIn(FieldPassword, vs...))
}
// PasswordGT applies the GT predicate on the "password" field.
func PasswordGT(v string) predicate.User {
return predicate.User(sql.FieldGT(FieldPassword, v))
}
// PasswordGTE applies the GTE predicate on the "password" field.
func PasswordGTE(v string) predicate.User {
return predicate.User(sql.FieldGTE(FieldPassword, v))
}
// PasswordLT applies the LT predicate on the "password" field.
func PasswordLT(v string) predicate.User {
return predicate.User(sql.FieldLT(FieldPassword, v))
}
// PasswordLTE applies the LTE predicate on the "password" field.
func PasswordLTE(v string) predicate.User {
return predicate.User(sql.FieldLTE(FieldPassword, v))
}
// PasswordContains applies the Contains predicate on the "password" field.
func PasswordContains(v string) predicate.User {
return predicate.User(sql.FieldContains(FieldPassword, v))
}
// PasswordHasPrefix applies the HasPrefix predicate on the "password" field.
func PasswordHasPrefix(v string) predicate.User {
return predicate.User(sql.FieldHasPrefix(FieldPassword, v))
}
// PasswordHasSuffix applies the HasSuffix predicate on the "password" field.
func PasswordHasSuffix(v string) predicate.User {
return predicate.User(sql.FieldHasSuffix(FieldPassword, v))
}
// PasswordIsNil applies the IsNil predicate on the "password" field.
func PasswordIsNil() predicate.User {
return predicate.User(sql.FieldIsNull(FieldPassword))
}
// PasswordNotNil applies the NotNil predicate on the "password" field.
func PasswordNotNil() predicate.User {
return predicate.User(sql.FieldNotNull(FieldPassword))
}
// PasswordEqualFold applies the EqualFold predicate on the "password" field.
func PasswordEqualFold(v string) predicate.User {
return predicate.User(sql.FieldEqualFold(FieldPassword, v))
}
// PasswordContainsFold applies the ContainsFold predicate on the "password" field.
func PasswordContainsFold(v string) predicate.User {
return predicate.User(sql.FieldContainsFold(FieldPassword, v))
}
// StatusEQ applies the EQ predicate on the "status" field.
func StatusEQ(v Status) predicate.User {
return predicate.User(sql.FieldEQ(FieldStatus, v))
}
// StatusNEQ applies the NEQ predicate on the "status" field.
func StatusNEQ(v Status) predicate.User {
return predicate.User(sql.FieldNEQ(FieldStatus, v))
}
// StatusIn applies the In predicate on the "status" field.
func StatusIn(vs ...Status) predicate.User {
return predicate.User(sql.FieldIn(FieldStatus, vs...))
}
// StatusNotIn applies the NotIn predicate on the "status" field.
func StatusNotIn(vs ...Status) predicate.User {
return predicate.User(sql.FieldNotIn(FieldStatus, vs...))
}
// StorageEQ applies the EQ predicate on the "storage" field.
func StorageEQ(v int64) predicate.User {
return predicate.User(sql.FieldEQ(FieldStorage, v))
}
// StorageNEQ applies the NEQ predicate on the "storage" field.
func StorageNEQ(v int64) predicate.User {
return predicate.User(sql.FieldNEQ(FieldStorage, v))
}
// StorageIn applies the In predicate on the "storage" field.
func StorageIn(vs ...int64) predicate.User {
return predicate.User(sql.FieldIn(FieldStorage, vs...))
}
// StorageNotIn applies the NotIn predicate on the "storage" field.
func StorageNotIn(vs ...int64) predicate.User {
return predicate.User(sql.FieldNotIn(FieldStorage, vs...))
}
// StorageGT applies the GT predicate on the "storage" field.
func StorageGT(v int64) predicate.User {
return predicate.User(sql.FieldGT(FieldStorage, v))
}
// StorageGTE applies the GTE predicate on the "storage" field.
func StorageGTE(v int64) predicate.User {
return predicate.User(sql.FieldGTE(FieldStorage, v))
}
// StorageLT applies the LT predicate on the "storage" field.
func StorageLT(v int64) predicate.User {
return predicate.User(sql.FieldLT(FieldStorage, v))
}
// StorageLTE applies the LTE predicate on the "storage" field.
func StorageLTE(v int64) predicate.User {
return predicate.User(sql.FieldLTE(FieldStorage, v))
}
// TwoFactorSecretEQ applies the EQ predicate on the "two_factor_secret" field.
func TwoFactorSecretEQ(v string) predicate.User {
return predicate.User(sql.FieldEQ(FieldTwoFactorSecret, v))
}
// TwoFactorSecretNEQ applies the NEQ predicate on the "two_factor_secret" field.
func TwoFactorSecretNEQ(v string) predicate.User {
return predicate.User(sql.FieldNEQ(FieldTwoFactorSecret, v))
}
// TwoFactorSecretIn applies the In predicate on the "two_factor_secret" field.
func TwoFactorSecretIn(vs ...string) predicate.User {
return predicate.User(sql.FieldIn(FieldTwoFactorSecret, vs...))
}
// TwoFactorSecretNotIn applies the NotIn predicate on the "two_factor_secret" field.
func TwoFactorSecretNotIn(vs ...string) predicate.User {
return predicate.User(sql.FieldNotIn(FieldTwoFactorSecret, vs...))
}
// TwoFactorSecretGT applies the GT predicate on the "two_factor_secret" field.
func TwoFactorSecretGT(v string) predicate.User {
return predicate.User(sql.FieldGT(FieldTwoFactorSecret, v))
}
// TwoFactorSecretGTE applies the GTE predicate on the "two_factor_secret" field.
func TwoFactorSecretGTE(v string) predicate.User {
return predicate.User(sql.FieldGTE(FieldTwoFactorSecret, v))
}
// TwoFactorSecretLT applies the LT predicate on the "two_factor_secret" field.
func TwoFactorSecretLT(v string) predicate.User {
return predicate.User(sql.FieldLT(FieldTwoFactorSecret, v))
}
// TwoFactorSecretLTE applies the LTE predicate on the "two_factor_secret" field.
func TwoFactorSecretLTE(v string) predicate.User {
return predicate.User(sql.FieldLTE(FieldTwoFactorSecret, v))
}
// TwoFactorSecretContains applies the Contains predicate on the "two_factor_secret" field.
func TwoFactorSecretContains(v string) predicate.User {
return predicate.User(sql.FieldContains(FieldTwoFactorSecret, v))
}
// TwoFactorSecretHasPrefix applies the HasPrefix predicate on the "two_factor_secret" field.
func TwoFactorSecretHasPrefix(v string) predicate.User {
return predicate.User(sql.FieldHasPrefix(FieldTwoFactorSecret, v))
}
// TwoFactorSecretHasSuffix applies the HasSuffix predicate on the "two_factor_secret" field.
func TwoFactorSecretHasSuffix(v string) predicate.User {
return predicate.User(sql.FieldHasSuffix(FieldTwoFactorSecret, v))
}
// TwoFactorSecretIsNil applies the IsNil predicate on the "two_factor_secret" field.
func TwoFactorSecretIsNil() predicate.User {
return predicate.User(sql.FieldIsNull(FieldTwoFactorSecret))
}
// TwoFactorSecretNotNil applies the NotNil predicate on the "two_factor_secret" field.
func TwoFactorSecretNotNil() predicate.User {
return predicate.User(sql.FieldNotNull(FieldTwoFactorSecret))
}
// TwoFactorSecretEqualFold applies the EqualFold predicate on the "two_factor_secret" field.
func TwoFactorSecretEqualFold(v string) predicate.User {
return predicate.User(sql.FieldEqualFold(FieldTwoFactorSecret, v))
}
// TwoFactorSecretContainsFold applies the ContainsFold predicate on the "two_factor_secret" field.
func TwoFactorSecretContainsFold(v string) predicate.User {
return predicate.User(sql.FieldContainsFold(FieldTwoFactorSecret, v))
}
// AvatarEQ applies the EQ predicate on the "avatar" field.
func AvatarEQ(v string) predicate.User {
return predicate.User(sql.FieldEQ(FieldAvatar, v))
}
// AvatarNEQ applies the NEQ predicate on the "avatar" field.
func AvatarNEQ(v string) predicate.User {
return predicate.User(sql.FieldNEQ(FieldAvatar, v))
}
// AvatarIn applies the In predicate on the "avatar" field.
func AvatarIn(vs ...string) predicate.User {
return predicate.User(sql.FieldIn(FieldAvatar, vs...))
}
// AvatarNotIn applies the NotIn predicate on the "avatar" field.
func AvatarNotIn(vs ...string) predicate.User {
return predicate.User(sql.FieldNotIn(FieldAvatar, vs...))
}
// AvatarGT applies the GT predicate on the "avatar" field.
func AvatarGT(v string) predicate.User {
return predicate.User(sql.FieldGT(FieldAvatar, v))
}
// AvatarGTE applies the GTE predicate on the "avatar" field.
func AvatarGTE(v string) predicate.User {
return predicate.User(sql.FieldGTE(FieldAvatar, v))
}
// AvatarLT applies the LT predicate on the "avatar" field.
func AvatarLT(v string) predicate.User {
return predicate.User(sql.FieldLT(FieldAvatar, v))
}
// AvatarLTE applies the LTE predicate on the "avatar" field.
func AvatarLTE(v string) predicate.User {
return predicate.User(sql.FieldLTE(FieldAvatar, v))
}
// AvatarContains applies the Contains predicate on the "avatar" field.
func AvatarContains(v string) predicate.User {
return predicate.User(sql.FieldContains(FieldAvatar, v))
}
// AvatarHasPrefix applies the HasPrefix predicate on the "avatar" field.
func AvatarHasPrefix(v string) predicate.User {
return predicate.User(sql.FieldHasPrefix(FieldAvatar, v))
}
// AvatarHasSuffix applies the HasSuffix predicate on the "avatar" field.
func AvatarHasSuffix(v string) predicate.User {
return predicate.User(sql.FieldHasSuffix(FieldAvatar, v))
}
// AvatarIsNil applies the IsNil predicate on the "avatar" field.
func AvatarIsNil() predicate.User {
return predicate.User(sql.FieldIsNull(FieldAvatar))
}
// AvatarNotNil applies the NotNil predicate on the "avatar" field.
func AvatarNotNil() predicate.User {
return predicate.User(sql.FieldNotNull(FieldAvatar))
}
// AvatarEqualFold applies the EqualFold predicate on the "avatar" field.
func AvatarEqualFold(v string) predicate.User {
return predicate.User(sql.FieldEqualFold(FieldAvatar, v))
}
// AvatarContainsFold applies the ContainsFold predicate on the "avatar" field.
func AvatarContainsFold(v string) predicate.User {
return predicate.User(sql.FieldContainsFold(FieldAvatar, v))
}
// SettingsIsNil applies the IsNil predicate on the "settings" field.
func SettingsIsNil() predicate.User {
return predicate.User(sql.FieldIsNull(FieldSettings))
}
// SettingsNotNil applies the NotNil predicate on the "settings" field.
func SettingsNotNil() predicate.User {
return predicate.User(sql.FieldNotNull(FieldSettings))
}
// GroupUsersEQ applies the EQ predicate on the "group_users" field.
func GroupUsersEQ(v int) predicate.User {
return predicate.User(sql.FieldEQ(FieldGroupUsers, v))
}
// GroupUsersNEQ applies the NEQ predicate on the "group_users" field.
func GroupUsersNEQ(v int) predicate.User {
return predicate.User(sql.FieldNEQ(FieldGroupUsers, v))
}
// GroupUsersIn applies the In predicate on the "group_users" field.
func GroupUsersIn(vs ...int) predicate.User {
return predicate.User(sql.FieldIn(FieldGroupUsers, vs...))
}
// GroupUsersNotIn applies the NotIn predicate on the "group_users" field.
func GroupUsersNotIn(vs ...int) predicate.User {
return predicate.User(sql.FieldNotIn(FieldGroupUsers, vs...))
}
// HasGroup applies the HasEdge predicate on the "group" edge.
func HasGroup() predicate.User {
return predicate.User(func(s *sql.Selector) {
step := sqlgraph.NewStep(
sqlgraph.From(Table, FieldID),
sqlgraph.Edge(sqlgraph.M2O, true, GroupTable, GroupColumn),
)
sqlgraph.HasNeighbors(s, step)
})
}
// HasGroupWith applies the HasEdge predicate on the "group" edge with a given conditions (other predicates).
func HasGroupWith(preds ...predicate.Group) predicate.User {
return predicate.User(func(s *sql.Selector) {
step := newGroupStep()
sqlgraph.HasNeighborsWith(s, step, func(s *sql.Selector) {
for _, p := range preds {
p(s)
}
})
})
}
// HasFiles applies the HasEdge predicate on the "files" edge.
func HasFiles() predicate.User {
return predicate.User(func(s *sql.Selector) {
step := sqlgraph.NewStep(
sqlgraph.From(Table, FieldID),
sqlgraph.Edge(sqlgraph.O2M, false, FilesTable, FilesColumn),
)
sqlgraph.HasNeighbors(s, step)
})
}
// HasFilesWith applies the HasEdge predicate on the "files" edge with a given conditions (other predicates).
func HasFilesWith(preds ...predicate.File) predicate.User {
return predicate.User(func(s *sql.Selector) {
step := newFilesStep()
sqlgraph.HasNeighborsWith(s, step, func(s *sql.Selector) {
for _, p := range preds {
p(s)
}
})
})
}
// HasDavAccounts applies the HasEdge predicate on the "dav_accounts" edge.
func HasDavAccounts() predicate.User {
return predicate.User(func(s *sql.Selector) {
step := sqlgraph.NewStep(
sqlgraph.From(Table, FieldID),
sqlgraph.Edge(sqlgraph.O2M, false, DavAccountsTable, DavAccountsColumn),
)
sqlgraph.HasNeighbors(s, step)
})
}
// HasDavAccountsWith applies the HasEdge predicate on the "dav_accounts" edge with a given conditions (other predicates).
func HasDavAccountsWith(preds ...predicate.DavAccount) predicate.User {
return predicate.User(func(s *sql.Selector) {
step := newDavAccountsStep()
sqlgraph.HasNeighborsWith(s, step, func(s *sql.Selector) {
for _, p := range preds {
p(s)
}
})
})
}
// HasShares applies the HasEdge predicate on the "shares" edge.
func HasShares() predicate.User {
return predicate.User(func(s *sql.Selector) {
step := sqlgraph.NewStep(
sqlgraph.From(Table, FieldID),
sqlgraph.Edge(sqlgraph.O2M, false, SharesTable, SharesColumn),
)
sqlgraph.HasNeighbors(s, step)
})
}
// HasSharesWith applies the HasEdge predicate on the "shares" edge with a given conditions (other predicates).
func HasSharesWith(preds ...predicate.Share) predicate.User {
return predicate.User(func(s *sql.Selector) {
step := newSharesStep()
sqlgraph.HasNeighborsWith(s, step, func(s *sql.Selector) {
for _, p := range preds {
p(s)
}
})
})
}
// HasPasskey applies the HasEdge predicate on the "passkey" edge.
func HasPasskey() predicate.User {
return predicate.User(func(s *sql.Selector) {
step := sqlgraph.NewStep(
sqlgraph.From(Table, FieldID),
sqlgraph.Edge(sqlgraph.O2M, false, PasskeyTable, PasskeyColumn),
)
sqlgraph.HasNeighbors(s, step)
})
}
// HasPasskeyWith applies the HasEdge predicate on the "passkey" edge with a given conditions (other predicates).
func HasPasskeyWith(preds ...predicate.Passkey) predicate.User {
return predicate.User(func(s *sql.Selector) {
step := newPasskeyStep()
sqlgraph.HasNeighborsWith(s, step, func(s *sql.Selector) {
for _, p := range preds {
p(s)
}
})
})
}
// HasTasks applies the HasEdge predicate on the "tasks" edge.
func HasTasks() predicate.User {
return predicate.User(func(s *sql.Selector) {
step := sqlgraph.NewStep(
sqlgraph.From(Table, FieldID),
sqlgraph.Edge(sqlgraph.O2M, false, TasksTable, TasksColumn),
)
sqlgraph.HasNeighbors(s, step)
})
}
// HasTasksWith applies the HasEdge predicate on the "tasks" edge with a given conditions (other predicates).
func HasTasksWith(preds ...predicate.Task) predicate.User {
return predicate.User(func(s *sql.Selector) {
step := newTasksStep()
sqlgraph.HasNeighborsWith(s, step, func(s *sql.Selector) {
for _, p := range preds {
p(s)
}
})
})
}
// HasEntities applies the HasEdge predicate on the "entities" edge.
func HasEntities() predicate.User {
return predicate.User(func(s *sql.Selector) {
step := sqlgraph.NewStep(
sqlgraph.From(Table, FieldID),
sqlgraph.Edge(sqlgraph.O2M, false, EntitiesTable, EntitiesColumn),
)
sqlgraph.HasNeighbors(s, step)
})
}
// HasEntitiesWith applies the HasEdge predicate on the "entities" edge with a given conditions (other predicates).
func HasEntitiesWith(preds ...predicate.Entity) predicate.User {
return predicate.User(func(s *sql.Selector) {
step := newEntitiesStep()
sqlgraph.HasNeighborsWith(s, step, func(s *sql.Selector) {
for _, p := range preds {
p(s)
}
})
})
}
// And groups predicates with the AND operator between them.
func And(predicates ...predicate.User) predicate.User {
return predicate.User(sql.AndPredicates(predicates...))
}
// Or groups predicates with the OR operator between them.
func Or(predicates ...predicate.User) predicate.User {
return predicate.User(sql.OrPredicates(predicates...))
}
// Not applies the not operator on the given predicate.
func Not(p predicate.User) predicate.User {
return predicate.User(sql.NotPredicates(p))
}