userrole

package
v0.0.0-...-f8e2896 Latest Latest
Warning

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

Go to latest
Published: Jan 9, 2026 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// Label holds the string label denoting the userrole type in the database.
	Label = "user_role"
	// 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"
	// FieldRoleID holds the string denoting the role_id field in the database.
	FieldRoleID = "role_id"
	// FieldTenantID holds the string denoting the tenant_id field in the database.
	FieldTenantID = "tenant_id"
	// FieldGrantedAt holds the string denoting the granted_at field in the database.
	FieldGrantedAt = "granted_at"
	// FieldExpiresAt holds the string denoting the expires_at field in the database.
	FieldExpiresAt = "expires_at"
	// EdgeUser holds the string denoting the user edge name in mutations.
	EdgeUser = "user"
	// EdgeRole holds the string denoting the role edge name in mutations.
	EdgeRole = "role"
	// EdgeTenant holds the string denoting the tenant edge name in mutations.
	EdgeTenant = "tenant"
	// Table holds the table name of the userrole in the database.
	Table = "user_roles"
	// UserTable is the table that holds the user relation/edge.
	UserTable = "user_roles"
	// 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"
	// RoleTable is the table that holds the role relation/edge.
	RoleTable = "user_roles"
	// RoleInverseTable is the table name for the Role entity.
	// It exists in this package in order to avoid circular dependency with the "role" package.
	RoleInverseTable = "roles"
	// RoleColumn is the table column denoting the role relation/edge.
	RoleColumn = "role_id"
	// TenantTable is the table that holds the tenant relation/edge.
	TenantTable = "user_roles"
	// 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"
)

Variables

Columns holds all SQL columns for userrole fields.

View Source
var (
	// DefaultGrantedAt holds the default value on creation for the "granted_at" field.
	DefaultGrantedAt func() time.Time
)

Functions

func And

func And(predicates ...predicate.UserRole) predicate.UserRole

And groups predicates with the AND operator between them.

func ExpiresAt

func ExpiresAt(v time.Time) predicate.UserRole

ExpiresAt applies equality check predicate on the "expires_at" field. It's identical to ExpiresAtEQ.

func ExpiresAtEQ

func ExpiresAtEQ(v time.Time) predicate.UserRole

ExpiresAtEQ applies the EQ predicate on the "expires_at" field.

func ExpiresAtGT

func ExpiresAtGT(v time.Time) predicate.UserRole

ExpiresAtGT applies the GT predicate on the "expires_at" field.

func ExpiresAtGTE

func ExpiresAtGTE(v time.Time) predicate.UserRole

ExpiresAtGTE applies the GTE predicate on the "expires_at" field.

func ExpiresAtIn

func ExpiresAtIn(vs ...time.Time) predicate.UserRole

ExpiresAtIn applies the In predicate on the "expires_at" field.

func ExpiresAtIsNil

func ExpiresAtIsNil() predicate.UserRole

ExpiresAtIsNil applies the IsNil predicate on the "expires_at" field.

func ExpiresAtLT

func ExpiresAtLT(v time.Time) predicate.UserRole

ExpiresAtLT applies the LT predicate on the "expires_at" field.

func ExpiresAtLTE

func ExpiresAtLTE(v time.Time) predicate.UserRole

ExpiresAtLTE applies the LTE predicate on the "expires_at" field.

func ExpiresAtNEQ

func ExpiresAtNEQ(v time.Time) predicate.UserRole

ExpiresAtNEQ applies the NEQ predicate on the "expires_at" field.

func ExpiresAtNotIn

func ExpiresAtNotIn(vs ...time.Time) predicate.UserRole

ExpiresAtNotIn applies the NotIn predicate on the "expires_at" field.

func ExpiresAtNotNil

func ExpiresAtNotNil() predicate.UserRole

ExpiresAtNotNil applies the NotNil predicate on the "expires_at" field.

func GrantedAt

func GrantedAt(v time.Time) predicate.UserRole

GrantedAt applies equality check predicate on the "granted_at" field. It's identical to GrantedAtEQ.

func GrantedAtEQ

func GrantedAtEQ(v time.Time) predicate.UserRole

GrantedAtEQ applies the EQ predicate on the "granted_at" field.

func GrantedAtGT

func GrantedAtGT(v time.Time) predicate.UserRole

GrantedAtGT applies the GT predicate on the "granted_at" field.

func GrantedAtGTE

func GrantedAtGTE(v time.Time) predicate.UserRole

GrantedAtGTE applies the GTE predicate on the "granted_at" field.

func GrantedAtIn

func GrantedAtIn(vs ...time.Time) predicate.UserRole

GrantedAtIn applies the In predicate on the "granted_at" field.

func GrantedAtLT

func GrantedAtLT(v time.Time) predicate.UserRole

GrantedAtLT applies the LT predicate on the "granted_at" field.

func GrantedAtLTE

func GrantedAtLTE(v time.Time) predicate.UserRole

GrantedAtLTE applies the LTE predicate on the "granted_at" field.

func GrantedAtNEQ

func GrantedAtNEQ(v time.Time) predicate.UserRole

GrantedAtNEQ applies the NEQ predicate on the "granted_at" field.

func GrantedAtNotIn

func GrantedAtNotIn(vs ...time.Time) predicate.UserRole

GrantedAtNotIn applies the NotIn predicate on the "granted_at" field.

func HasRole

func HasRole() predicate.UserRole

HasRole applies the HasEdge predicate on the "role" edge.

func HasRoleWith

func HasRoleWith(preds ...predicate.Role) predicate.UserRole

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

func HasTenant

func HasTenant() predicate.UserRole

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

func HasTenantWith

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

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

func HasUser

func HasUser() predicate.UserRole

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

func HasUserWith

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

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

func ID

func ID(id int64) predicate.UserRole

ID filters vertices based on their ID field.

func IDEQ

func IDEQ(id int64) predicate.UserRole

IDEQ applies the EQ predicate on the ID field.

func IDGT

func IDGT(id int64) predicate.UserRole

IDGT applies the GT predicate on the ID field.

func IDGTE

func IDGTE(id int64) predicate.UserRole

IDGTE applies the GTE predicate on the ID field.

func IDIn

func IDIn(ids ...int64) predicate.UserRole

IDIn applies the In predicate on the ID field.

func IDLT

func IDLT(id int64) predicate.UserRole

IDLT applies the LT predicate on the ID field.

func IDLTE

func IDLTE(id int64) predicate.UserRole

IDLTE applies the LTE predicate on the ID field.

func IDNEQ

func IDNEQ(id int64) predicate.UserRole

IDNEQ applies the NEQ predicate on the ID field.

func IDNotIn

func IDNotIn(ids ...int64) predicate.UserRole

IDNotIn applies the NotIn predicate on the ID field.

func Not

Not applies the not operator on the given predicate.

func Or

func Or(predicates ...predicate.UserRole) predicate.UserRole

Or groups predicates with the OR operator between them.

func RoleID

func RoleID(v int64) predicate.UserRole

RoleID applies equality check predicate on the "role_id" field. It's identical to RoleIDEQ.

func RoleIDEQ

func RoleIDEQ(v int64) predicate.UserRole

RoleIDEQ applies the EQ predicate on the "role_id" field.

func RoleIDIn

func RoleIDIn(vs ...int64) predicate.UserRole

RoleIDIn applies the In predicate on the "role_id" field.

func RoleIDNEQ

func RoleIDNEQ(v int64) predicate.UserRole

RoleIDNEQ applies the NEQ predicate on the "role_id" field.

func RoleIDNotIn

func RoleIDNotIn(vs ...int64) predicate.UserRole

RoleIDNotIn applies the NotIn predicate on the "role_id" field.

func TenantID

func TenantID(v int64) predicate.UserRole

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

func TenantIDEQ

func TenantIDEQ(v int64) predicate.UserRole

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

func TenantIDIn

func TenantIDIn(vs ...int64) predicate.UserRole

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

func TenantIDIsNil

func TenantIDIsNil() predicate.UserRole

TenantIDIsNil applies the IsNil predicate on the "tenant_id" field.

func TenantIDNEQ

func TenantIDNEQ(v int64) predicate.UserRole

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

func TenantIDNotIn

func TenantIDNotIn(vs ...int64) predicate.UserRole

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

func TenantIDNotNil

func TenantIDNotNil() predicate.UserRole

TenantIDNotNil applies the NotNil predicate on the "tenant_id" field.

func UserID

func UserID(v int64) predicate.UserRole

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

func UserIDEQ

func UserIDEQ(v int64) predicate.UserRole

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

func UserIDIn

func UserIDIn(vs ...int64) predicate.UserRole

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

func UserIDNEQ

func UserIDNEQ(v int64) predicate.UserRole

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

func UserIDNotIn

func UserIDNotIn(vs ...int64) predicate.UserRole

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 UserRole queries.

func ByExpiresAt

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

ByExpiresAt orders the results by the expires_at field.

func ByGrantedAt

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

ByGrantedAt orders the results by the granted_at field.

func ByID

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

ByID orders the results by the id field.

func ByRoleField

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

ByRoleField orders the results by role field.

func ByRoleID

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

ByRoleID orders the results by the role_id 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.

Jump to

Keyboard shortcuts

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