usertenant

package
v0.0.0-...-ae88961 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Feb 9, 2026 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// Label holds the string label denoting the usertenant type in the database.
	Label = "user_tenant"
	// 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"
	// FieldTenantID holds the string denoting the tenant_id field in the database.
	FieldTenantID = "tenant_id"
	// FieldRole holds the string denoting the role field in the database.
	FieldRole = "role"
	// FieldIsDefault holds the string denoting the is_default field in the database.
	FieldIsDefault = "is_default"
	// 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"
	// EdgeUser holds the string denoting the user edge name in mutations.
	EdgeUser = "user"
	// EdgeTenant holds the string denoting the tenant edge name in mutations.
	EdgeTenant = "tenant"
	// UserFieldID holds the string denoting the ID field of the User.
	UserFieldID = "uid"
	// Table holds the table name of the usertenant in the database.
	Table = "user_tenants"
	// UserTable is the table that holds the user relation/edge.
	UserTable = "user_tenants"
	// UserInverseTable is the table name for the User entity.
	// It exists in this package in order to avoid circular dependency with the "user" package.
	UserInverseTable = "users"
	// UserColumn is the table column denoting the user relation/edge.
	UserColumn = "user_id"
	// TenantTable is the table that holds the tenant relation/edge.
	TenantTable = "user_tenants"
	// TenantInverseTable is the table name for the Tenant entity.
	// It exists in this package in order to avoid circular dependency with the "tenant" package.
	TenantInverseTable = "tenants"
	// TenantColumn is the table column denoting the tenant relation/edge.
	TenantColumn = "tenant_id"
)
View Source
const DefaultRole = RoleUser

RoleUser is the default value of the Role enum.

Variables

View Source
var (
	// UserIDValidator is a validator for the "user_id" field. It is called by the builders before save.
	UserIDValidator func(string) error
	// DefaultIsDefault holds the default value on creation for the "is_default" field.
	DefaultIsDefault bool
	// 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
)

Columns holds all SQL columns for usertenant fields.

Functions

func And

func And(predicates ...predicate.UserTenant) predicate.UserTenant

And groups predicates with the AND operator between them.

func Created

func Created(v time.Time) predicate.UserTenant

Created applies equality check predicate on the "created" field. It's identical to CreatedEQ.

func CreatedEQ

func CreatedEQ(v time.Time) predicate.UserTenant

CreatedEQ applies the EQ predicate on the "created" field.

func CreatedGT

func CreatedGT(v time.Time) predicate.UserTenant

CreatedGT applies the GT predicate on the "created" field.

func CreatedGTE

func CreatedGTE(v time.Time) predicate.UserTenant

CreatedGTE applies the GTE predicate on the "created" field.

func CreatedIn

func CreatedIn(vs ...time.Time) predicate.UserTenant

CreatedIn applies the In predicate on the "created" field.

func CreatedIsNil

func CreatedIsNil() predicate.UserTenant

CreatedIsNil applies the IsNil predicate on the "created" field.

func CreatedLT

func CreatedLT(v time.Time) predicate.UserTenant

CreatedLT applies the LT predicate on the "created" field.

func CreatedLTE

func CreatedLTE(v time.Time) predicate.UserTenant

CreatedLTE applies the LTE predicate on the "created" field.

func CreatedNEQ

func CreatedNEQ(v time.Time) predicate.UserTenant

CreatedNEQ applies the NEQ predicate on the "created" field.

func CreatedNotIn

func CreatedNotIn(vs ...time.Time) predicate.UserTenant

CreatedNotIn applies the NotIn predicate on the "created" field.

func CreatedNotNil

func CreatedNotNil() predicate.UserTenant

CreatedNotNil applies the NotNil predicate on the "created" field.

func HasTenant

func HasTenant() predicate.UserTenant

HasTenant applies the HasEdge predicate on the "tenant" edge.

func HasTenantWith

func HasTenantWith(preds ...predicate.Tenant) predicate.UserTenant

HasTenantWith applies the HasEdge predicate on the "tenant" edge with a given conditions (other predicates).

func HasUser

func HasUser() predicate.UserTenant

HasUser applies the HasEdge predicate on the "user" edge.

func HasUserWith

func HasUserWith(preds ...predicate.User) predicate.UserTenant

HasUserWith applies the HasEdge predicate on the "user" edge with a given conditions (other predicates).

func ID

func ID(id int) predicate.UserTenant

ID filters vertices based on their ID field.

func IDEQ

func IDEQ(id int) predicate.UserTenant

IDEQ applies the EQ predicate on the ID field.

func IDGT

func IDGT(id int) predicate.UserTenant

IDGT applies the GT predicate on the ID field.

func IDGTE

func IDGTE(id int) predicate.UserTenant

IDGTE applies the GTE predicate on the ID field.

func IDIn

func IDIn(ids ...int) predicate.UserTenant

IDIn applies the In predicate on the ID field.

func IDLT

func IDLT(id int) predicate.UserTenant

IDLT applies the LT predicate on the ID field.

func IDLTE

func IDLTE(id int) predicate.UserTenant

IDLTE applies the LTE predicate on the ID field.

func IDNEQ

func IDNEQ(id int) predicate.UserTenant

IDNEQ applies the NEQ predicate on the ID field.

func IDNotIn

func IDNotIn(ids ...int) predicate.UserTenant

IDNotIn applies the NotIn predicate on the ID field.

func IsDefault

func IsDefault(v bool) predicate.UserTenant

IsDefault applies equality check predicate on the "is_default" field. It's identical to IsDefaultEQ.

func IsDefaultEQ

func IsDefaultEQ(v bool) predicate.UserTenant

IsDefaultEQ applies the EQ predicate on the "is_default" field.

func IsDefaultNEQ

func IsDefaultNEQ(v bool) predicate.UserTenant

IsDefaultNEQ applies the NEQ predicate on the "is_default" field.

func Modified

func Modified(v time.Time) predicate.UserTenant

Modified applies equality check predicate on the "modified" field. It's identical to ModifiedEQ.

func ModifiedEQ

func ModifiedEQ(v time.Time) predicate.UserTenant

ModifiedEQ applies the EQ predicate on the "modified" field.

func ModifiedGT

func ModifiedGT(v time.Time) predicate.UserTenant

ModifiedGT applies the GT predicate on the "modified" field.

func ModifiedGTE

func ModifiedGTE(v time.Time) predicate.UserTenant

ModifiedGTE applies the GTE predicate on the "modified" field.

func ModifiedIn

func ModifiedIn(vs ...time.Time) predicate.UserTenant

ModifiedIn applies the In predicate on the "modified" field.

func ModifiedIsNil

func ModifiedIsNil() predicate.UserTenant

ModifiedIsNil applies the IsNil predicate on the "modified" field.

func ModifiedLT

func ModifiedLT(v time.Time) predicate.UserTenant

ModifiedLT applies the LT predicate on the "modified" field.

func ModifiedLTE

func ModifiedLTE(v time.Time) predicate.UserTenant

ModifiedLTE applies the LTE predicate on the "modified" field.

func ModifiedNEQ

func ModifiedNEQ(v time.Time) predicate.UserTenant

ModifiedNEQ applies the NEQ predicate on the "modified" field.

func ModifiedNotIn

func ModifiedNotIn(vs ...time.Time) predicate.UserTenant

ModifiedNotIn applies the NotIn predicate on the "modified" field.

func ModifiedNotNil

func ModifiedNotNil() predicate.UserTenant

ModifiedNotNil applies the NotNil predicate on the "modified" field.

func Not

Not applies the not operator on the given predicate.

func Or

func Or(predicates ...predicate.UserTenant) predicate.UserTenant

Or groups predicates with the OR operator between them.

func RoleEQ

func RoleEQ(v Role) predicate.UserTenant

RoleEQ applies the EQ predicate on the "role" field.

func RoleIn

func RoleIn(vs ...Role) predicate.UserTenant

RoleIn applies the In predicate on the "role" field.

func RoleNEQ

func RoleNEQ(v Role) predicate.UserTenant

RoleNEQ applies the NEQ predicate on the "role" field.

func RoleNotIn

func RoleNotIn(vs ...Role) predicate.UserTenant

RoleNotIn applies the NotIn predicate on the "role" field.

func RoleValidator

func RoleValidator(r Role) error

RoleValidator is a validator for the "role" field enum values. It is called by the builders before save.

func TenantID

func TenantID(v int) predicate.UserTenant

TenantID applies equality check predicate on the "tenant_id" field. It's identical to TenantIDEQ.

func TenantIDEQ

func TenantIDEQ(v int) predicate.UserTenant

TenantIDEQ applies the EQ predicate on the "tenant_id" field.

func TenantIDIn

func TenantIDIn(vs ...int) predicate.UserTenant

TenantIDIn applies the In predicate on the "tenant_id" field.

func TenantIDNEQ

func TenantIDNEQ(v int) predicate.UserTenant

TenantIDNEQ applies the NEQ predicate on the "tenant_id" field.

func TenantIDNotIn

func TenantIDNotIn(vs ...int) predicate.UserTenant

TenantIDNotIn applies the NotIn predicate on the "tenant_id" field.

func UserID

func UserID(v string) predicate.UserTenant

UserID applies equality check predicate on the "user_id" field. It's identical to UserIDEQ.

func UserIDContains

func UserIDContains(v string) predicate.UserTenant

UserIDContains applies the Contains predicate on the "user_id" field.

func UserIDContainsFold

func UserIDContainsFold(v string) predicate.UserTenant

UserIDContainsFold applies the ContainsFold predicate on the "user_id" field.

func UserIDEQ

func UserIDEQ(v string) predicate.UserTenant

UserIDEQ applies the EQ predicate on the "user_id" field.

func UserIDEqualFold

func UserIDEqualFold(v string) predicate.UserTenant

UserIDEqualFold applies the EqualFold predicate on the "user_id" field.

func UserIDGT

func UserIDGT(v string) predicate.UserTenant

UserIDGT applies the GT predicate on the "user_id" field.

func UserIDGTE

func UserIDGTE(v string) predicate.UserTenant

UserIDGTE applies the GTE predicate on the "user_id" field.

func UserIDHasPrefix

func UserIDHasPrefix(v string) predicate.UserTenant

UserIDHasPrefix applies the HasPrefix predicate on the "user_id" field.

func UserIDHasSuffix

func UserIDHasSuffix(v string) predicate.UserTenant

UserIDHasSuffix applies the HasSuffix predicate on the "user_id" field.

func UserIDIn

func UserIDIn(vs ...string) predicate.UserTenant

UserIDIn applies the In predicate on the "user_id" field.

func UserIDLT

func UserIDLT(v string) predicate.UserTenant

UserIDLT applies the LT predicate on the "user_id" field.

func UserIDLTE

func UserIDLTE(v string) predicate.UserTenant

UserIDLTE applies the LTE predicate on the "user_id" field.

func UserIDNEQ

func UserIDNEQ(v string) predicate.UserTenant

UserIDNEQ applies the NEQ predicate on the "user_id" field.

func UserIDNotIn

func UserIDNotIn(vs ...string) predicate.UserTenant

UserIDNotIn applies the NotIn predicate on the "user_id" field.

func ValidColumn

func ValidColumn(column string) bool

ValidColumn reports if the column name is valid (part of the table columns).

Types

type OrderOption

type OrderOption func(*sql.Selector)

OrderOption defines the ordering options for the UserTenant queries.

func ByCreated

func ByCreated(opts ...sql.OrderTermOption) OrderOption

ByCreated orders the results by the created field.

func ByID

func ByID(opts ...sql.OrderTermOption) OrderOption

ByID orders the results by the id field.

func ByIsDefault

func ByIsDefault(opts ...sql.OrderTermOption) OrderOption

ByIsDefault orders the results by the is_default field.

func ByModified

func ByModified(opts ...sql.OrderTermOption) OrderOption

ByModified orders the results by the modified field.

func ByRole

func ByRole(opts ...sql.OrderTermOption) OrderOption

ByRole orders the results by the role field.

func ByTenantField

func ByTenantField(field string, opts ...sql.OrderTermOption) OrderOption

ByTenantField orders the results by tenant field.

func ByTenantID

func ByTenantID(opts ...sql.OrderTermOption) OrderOption

ByTenantID orders the results by the tenant_id field.

func ByUserField

func ByUserField(field string, opts ...sql.OrderTermOption) OrderOption

ByUserField orders the results by user field.

func ByUserID

func ByUserID(opts ...sql.OrderTermOption) OrderOption

ByUserID orders the results by the user_id field.

type Role

type Role string

Role defines the type for the "role" enum field.

const (
	RoleAdmin    Role = "admin"
	RoleOperator Role = "operator"
	RoleUser     Role = "user"
)

Role values.

func (Role) String

func (r Role) String() string

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL