Documentation
¶
Index ¶
- Constants
- Variables
- func And(predicates ...predicate.UserTenant) predicate.UserTenant
- func Created(v time.Time) predicate.UserTenant
- func CreatedEQ(v time.Time) predicate.UserTenant
- func CreatedGT(v time.Time) predicate.UserTenant
- func CreatedGTE(v time.Time) predicate.UserTenant
- func CreatedIn(vs ...time.Time) predicate.UserTenant
- func CreatedIsNil() predicate.UserTenant
- func CreatedLT(v time.Time) predicate.UserTenant
- func CreatedLTE(v time.Time) predicate.UserTenant
- func CreatedNEQ(v time.Time) predicate.UserTenant
- func CreatedNotIn(vs ...time.Time) predicate.UserTenant
- func CreatedNotNil() predicate.UserTenant
- func HasTenant() predicate.UserTenant
- func HasTenantWith(preds ...predicate.Tenant) predicate.UserTenant
- func HasUser() predicate.UserTenant
- func HasUserWith(preds ...predicate.User) predicate.UserTenant
- func ID(id int) predicate.UserTenant
- func IDEQ(id int) predicate.UserTenant
- func IDGT(id int) predicate.UserTenant
- func IDGTE(id int) predicate.UserTenant
- func IDIn(ids ...int) predicate.UserTenant
- func IDLT(id int) predicate.UserTenant
- func IDLTE(id int) predicate.UserTenant
- func IDNEQ(id int) predicate.UserTenant
- func IDNotIn(ids ...int) predicate.UserTenant
- func IsDefault(v bool) predicate.UserTenant
- func IsDefaultEQ(v bool) predicate.UserTenant
- func IsDefaultNEQ(v bool) predicate.UserTenant
- func Modified(v time.Time) predicate.UserTenant
- func ModifiedEQ(v time.Time) predicate.UserTenant
- func ModifiedGT(v time.Time) predicate.UserTenant
- func ModifiedGTE(v time.Time) predicate.UserTenant
- func ModifiedIn(vs ...time.Time) predicate.UserTenant
- func ModifiedIsNil() predicate.UserTenant
- func ModifiedLT(v time.Time) predicate.UserTenant
- func ModifiedLTE(v time.Time) predicate.UserTenant
- func ModifiedNEQ(v time.Time) predicate.UserTenant
- func ModifiedNotIn(vs ...time.Time) predicate.UserTenant
- func ModifiedNotNil() predicate.UserTenant
- func Not(p predicate.UserTenant) predicate.UserTenant
- func Or(predicates ...predicate.UserTenant) predicate.UserTenant
- func RoleEQ(v Role) predicate.UserTenant
- func RoleIn(vs ...Role) predicate.UserTenant
- func RoleNEQ(v Role) predicate.UserTenant
- func RoleNotIn(vs ...Role) predicate.UserTenant
- func RoleValidator(r Role) error
- func TenantID(v int) predicate.UserTenant
- func TenantIDEQ(v int) predicate.UserTenant
- func TenantIDIn(vs ...int) predicate.UserTenant
- func TenantIDNEQ(v int) predicate.UserTenant
- func TenantIDNotIn(vs ...int) predicate.UserTenant
- func UserID(v string) predicate.UserTenant
- func UserIDContains(v string) predicate.UserTenant
- func UserIDContainsFold(v string) predicate.UserTenant
- func UserIDEQ(v string) predicate.UserTenant
- func UserIDEqualFold(v string) predicate.UserTenant
- func UserIDGT(v string) predicate.UserTenant
- func UserIDGTE(v string) predicate.UserTenant
- func UserIDHasPrefix(v string) predicate.UserTenant
- func UserIDHasSuffix(v string) predicate.UserTenant
- func UserIDIn(vs ...string) predicate.UserTenant
- func UserIDLT(v string) predicate.UserTenant
- func UserIDLTE(v string) predicate.UserTenant
- func UserIDNEQ(v string) predicate.UserTenant
- func UserIDNotIn(vs ...string) predicate.UserTenant
- func ValidColumn(column string) bool
- type OrderOption
- func ByCreated(opts ...sql.OrderTermOption) OrderOption
- func ByID(opts ...sql.OrderTermOption) OrderOption
- func ByIsDefault(opts ...sql.OrderTermOption) OrderOption
- func ByModified(opts ...sql.OrderTermOption) OrderOption
- func ByRole(opts ...sql.OrderTermOption) OrderOption
- func ByTenantField(field string, opts ...sql.OrderTermOption) OrderOption
- func ByTenantID(opts ...sql.OrderTermOption) OrderOption
- func ByUserField(field string, opts ...sql.OrderTermOption) OrderOption
- func ByUserID(opts ...sql.OrderTermOption) OrderOption
- type Role
Constants ¶
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" )
const DefaultRole = RoleUser
RoleUser is the default value of the Role enum.
Variables ¶
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 )
var Columns = []string{ FieldID, FieldUserID, FieldTenantID, FieldRole, FieldIsDefault, FieldCreated, FieldModified, }
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 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 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 ¶
func Not(p predicate.UserTenant) predicate.UserTenant
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 ¶
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 ¶
ValidColumn reports if the column name is valid (part of the table columns).
Types ¶
type OrderOption ¶
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.