Documentation ¶
Index ¶
- Constants
- Variables
- func And(predicates ...predicate.Role) predicate.Role
- func CreatedAt(v time.Time) predicate.Role
- func CreatedAtEQ(v time.Time) predicate.Role
- func CreatedAtGT(v time.Time) predicate.Role
- func CreatedAtGTE(v time.Time) predicate.Role
- func CreatedAtIn(vs ...time.Time) predicate.Role
- func CreatedAtIsNil() predicate.Role
- func CreatedAtLT(v time.Time) predicate.Role
- func CreatedAtLTE(v time.Time) predicate.Role
- func CreatedAtNEQ(v time.Time) predicate.Role
- func CreatedAtNotIn(vs ...time.Time) predicate.Role
- func CreatedAtNotNil() predicate.Role
- func DataScope(v int32) predicate.Role
- func DataScopeEQ(v int32) predicate.Role
- func DataScopeGT(v int32) predicate.Role
- func DataScopeGTE(v int32) predicate.Role
- func DataScopeIn(vs ...int32) predicate.Role
- func DataScopeLT(v int32) predicate.Role
- func DataScopeLTE(v int32) predicate.Role
- func DataScopeNEQ(v int32) predicate.Role
- func DataScopeNotIn(vs ...int32) predicate.Role
- func DefaultRouter(v string) predicate.Role
- func DefaultRouterContains(v string) predicate.Role
- func DefaultRouterContainsFold(v string) predicate.Role
- func DefaultRouterEQ(v string) predicate.Role
- func DefaultRouterEqualFold(v string) predicate.Role
- func DefaultRouterGT(v string) predicate.Role
- func DefaultRouterGTE(v string) predicate.Role
- func DefaultRouterHasPrefix(v string) predicate.Role
- func DefaultRouterHasSuffix(v string) predicate.Role
- func DefaultRouterIn(vs ...string) predicate.Role
- func DefaultRouterLT(v string) predicate.Role
- func DefaultRouterLTE(v string) predicate.Role
- func DefaultRouterNEQ(v string) predicate.Role
- func DefaultRouterNotIn(vs ...string) predicate.Role
- func DeletedAt(v time.Time) predicate.Role
- func DeletedAtEQ(v time.Time) predicate.Role
- func DeletedAtGT(v time.Time) predicate.Role
- func DeletedAtGTE(v time.Time) predicate.Role
- func DeletedAtIn(vs ...time.Time) predicate.Role
- func DeletedAtIsNil() predicate.Role
- func DeletedAtLT(v time.Time) predicate.Role
- func DeletedAtLTE(v time.Time) predicate.Role
- func DeletedAtNEQ(v time.Time) predicate.Role
- func DeletedAtNotIn(vs ...time.Time) predicate.Role
- func DeletedAtNotNil() predicate.Role
- func DeptCheckStrictly(v int32) predicate.Role
- func DeptCheckStrictlyEQ(v int32) predicate.Role
- func DeptCheckStrictlyGT(v int32) predicate.Role
- func DeptCheckStrictlyGTE(v int32) predicate.Role
- func DeptCheckStrictlyIn(vs ...int32) predicate.Role
- func DeptCheckStrictlyLT(v int32) predicate.Role
- func DeptCheckStrictlyLTE(v int32) predicate.Role
- func DeptCheckStrictlyNEQ(v int32) predicate.Role
- func DeptCheckStrictlyNotIn(vs ...int32) predicate.Role
- func HasUsers() predicate.Role
- func HasUsersWith(preds ...predicate.User) predicate.Role
- func ID(id uint32) predicate.Role
- func IDEQ(id uint32) predicate.Role
- func IDGT(id uint32) predicate.Role
- func IDGTE(id uint32) predicate.Role
- func IDIn(ids ...uint32) predicate.Role
- func IDLT(id uint32) predicate.Role
- func IDLTE(id uint32) predicate.Role
- func IDNEQ(id uint32) predicate.Role
- func IDNotIn(ids ...uint32) predicate.Role
- func MenuCheckStrictly(v int32) predicate.Role
- func MenuCheckStrictlyEQ(v int32) predicate.Role
- func MenuCheckStrictlyGT(v int32) predicate.Role
- func MenuCheckStrictlyGTE(v int32) predicate.Role
- func MenuCheckStrictlyIn(vs ...int32) predicate.Role
- func MenuCheckStrictlyLT(v int32) predicate.Role
- func MenuCheckStrictlyLTE(v int32) predicate.Role
- func MenuCheckStrictlyNEQ(v int32) predicate.Role
- func MenuCheckStrictlyNotIn(vs ...int32) predicate.Role
- func Name(v string) predicate.Role
- func NameContains(v string) predicate.Role
- func NameContainsFold(v string) predicate.Role
- func NameEQ(v string) predicate.Role
- func NameEqualFold(v string) predicate.Role
- func NameGT(v string) predicate.Role
- func NameGTE(v string) predicate.Role
- func NameHasPrefix(v string) predicate.Role
- func NameHasSuffix(v string) predicate.Role
- func NameIn(vs ...string) predicate.Role
- func NameLT(v string) predicate.Role
- func NameLTE(v string) predicate.Role
- func NameNEQ(v string) predicate.Role
- func NameNotIn(vs ...string) predicate.Role
- func Not(p predicate.Role) predicate.Role
- func Or(predicates ...predicate.Role) predicate.Role
- func Remark(v string) predicate.Role
- func RemarkContains(v string) predicate.Role
- func RemarkContainsFold(v string) predicate.Role
- func RemarkEQ(v string) predicate.Role
- func RemarkEqualFold(v string) predicate.Role
- func RemarkGT(v string) predicate.Role
- func RemarkGTE(v string) predicate.Role
- func RemarkHasPrefix(v string) predicate.Role
- func RemarkHasSuffix(v string) predicate.Role
- func RemarkIn(vs ...string) predicate.Role
- func RemarkIsNil() predicate.Role
- func RemarkLT(v string) predicate.Role
- func RemarkLTE(v string) predicate.Role
- func RemarkNEQ(v string) predicate.Role
- func RemarkNotIn(vs ...string) predicate.Role
- func RemarkNotNil() predicate.Role
- func Sort(v int32) predicate.Role
- func SortEQ(v int32) predicate.Role
- func SortGT(v int32) predicate.Role
- func SortGTE(v int32) predicate.Role
- func SortIn(vs ...int32) predicate.Role
- func SortLT(v int32) predicate.Role
- func SortLTE(v int32) predicate.Role
- func SortNEQ(v int32) predicate.Role
- func SortNotIn(vs ...int32) predicate.Role
- func State(v int32) predicate.Role
- func StateEQ(v int32) predicate.Role
- func StateGT(v int32) predicate.Role
- func StateGTE(v int32) predicate.Role
- func StateIn(vs ...int32) predicate.Role
- func StateLT(v int32) predicate.Role
- func StateLTE(v int32) predicate.Role
- func StateNEQ(v int32) predicate.Role
- func StateNotIn(vs ...int32) predicate.Role
- func UpdatedAt(v time.Time) predicate.Role
- func UpdatedAtEQ(v time.Time) predicate.Role
- func UpdatedAtGT(v time.Time) predicate.Role
- func UpdatedAtGTE(v time.Time) predicate.Role
- func UpdatedAtIn(vs ...time.Time) predicate.Role
- func UpdatedAtIsNil() predicate.Role
- func UpdatedAtLT(v time.Time) predicate.Role
- func UpdatedAtLTE(v time.Time) predicate.Role
- func UpdatedAtNEQ(v time.Time) predicate.Role
- func UpdatedAtNotIn(vs ...time.Time) predicate.Role
- func UpdatedAtNotNil() predicate.Role
- func ValidColumn(column string) bool
- type OrderOption
- func ByCreatedAt(opts ...sql.OrderTermOption) OrderOption
- func ByDataScope(opts ...sql.OrderTermOption) OrderOption
- func ByDefaultRouter(opts ...sql.OrderTermOption) OrderOption
- func ByDeletedAt(opts ...sql.OrderTermOption) OrderOption
- func ByDeptCheckStrictly(opts ...sql.OrderTermOption) OrderOption
- func ByID(opts ...sql.OrderTermOption) OrderOption
- func ByMenuCheckStrictly(opts ...sql.OrderTermOption) OrderOption
- func ByName(opts ...sql.OrderTermOption) OrderOption
- func ByRemark(opts ...sql.OrderTermOption) OrderOption
- func BySort(opts ...sql.OrderTermOption) OrderOption
- func ByState(opts ...sql.OrderTermOption) OrderOption
- func ByUpdatedAt(opts ...sql.OrderTermOption) OrderOption
- func ByUsers(term sql.OrderTerm, terms ...sql.OrderTerm) OrderOption
- func ByUsersCount(opts ...sql.OrderTermOption) OrderOption
Constants ¶
const ( // Label holds the string label denoting the role type in the database. Label = "role" // 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" // FieldRemark holds the string denoting the remark field in the database. FieldRemark = "remark" // FieldSort holds the string denoting the sort field in the database. FieldSort = "sort" // FieldState holds the string denoting the state field in the database. FieldState = "state" // FieldName holds the string denoting the name field in the database. FieldName = "name" // FieldDefaultRouter holds the string denoting the default_router field in the database. FieldDefaultRouter = "default_router" // FieldDataScope holds the string denoting the data_scope field in the database. FieldDataScope = "data_scope" // FieldMenuCheckStrictly holds the string denoting the menu_check_strictly field in the database. FieldMenuCheckStrictly = "menu_check_strictly" // FieldDeptCheckStrictly holds the string denoting the dept_check_strictly field in the database. FieldDeptCheckStrictly = "dept_check_strictly" // EdgeUsers holds the string denoting the users edge name in mutations. EdgeUsers = "users" // Table holds the table name of the role in the database. Table = "roles" // UsersTable is the table that holds the users relation/edge. The primary key declared below. UsersTable = "user_roles" // UsersInverseTable is the table name for the User entity. // It exists in this package in order to avoid circular dependency with the "user" package. UsersInverseTable = "users" )
Variables ¶
var ( // DefaultRemark holds the default value on creation for the "remark" field. DefaultRemark string // DefaultSort holds the default value on creation for the "sort" field. DefaultSort int32 // SortValidator is a validator for the "sort" field. It is called by the builders before save. SortValidator func(int32) error // DefaultState holds the default value on creation for the "state" field. DefaultState int32 // StateValidator is a validator for the "state" field. It is called by the builders before save. StateValidator func(int32) error // DefaultName holds the default value on creation for the "name" field. DefaultName string // NameValidator is a validator for the "name" field. It is called by the builders before save. NameValidator func(string) error // DefaultDefaultRouter holds the default value on creation for the "default_router" field. DefaultDefaultRouter string // DefaultRouterValidator is a validator for the "default_router" field. It is called by the builders before save. DefaultRouterValidator func(string) error // DefaultDataScope holds the default value on creation for the "data_scope" field. DefaultDataScope int32 // DefaultMenuCheckStrictly holds the default value on creation for the "menu_check_strictly" field. DefaultMenuCheckStrictly int32 // DefaultDeptCheckStrictly holds the default value on creation for the "dept_check_strictly" field. DefaultDeptCheckStrictly int32 // IDValidator is a validator for the "id" field. It is called by the builders before save. IDValidator func(uint32) error )
var Columns = []string{ FieldID, FieldCreatedAt, FieldUpdatedAt, FieldDeletedAt, FieldRemark, FieldSort, FieldState, FieldName, FieldDefaultRouter, FieldDataScope, FieldMenuCheckStrictly, FieldDeptCheckStrictly, }
Columns holds all SQL columns for role fields.
var ( // UsersPrimaryKey and UsersColumn2 are the table columns denoting the // primary key for the users relation (M2M). UsersPrimaryKey = []string{"user_id", "role_id"} )
Functions ¶
func CreatedAt ¶
CreatedAt applies equality check predicate on the "created_at" field. It's identical to CreatedAtEQ.
func CreatedAtEQ ¶
CreatedAtEQ applies the EQ predicate on the "created_at" field.
func CreatedAtGT ¶
CreatedAtGT applies the GT predicate on the "created_at" field.
func CreatedAtGTE ¶
CreatedAtGTE applies the GTE predicate on the "created_at" field.
func CreatedAtIn ¶
CreatedAtIn applies the In predicate on the "created_at" field.
func CreatedAtIsNil ¶
CreatedAtIsNil applies the IsNil predicate on the "created_at" field.
func CreatedAtLT ¶
CreatedAtLT applies the LT predicate on the "created_at" field.
func CreatedAtLTE ¶
CreatedAtLTE applies the LTE predicate on the "created_at" field.
func CreatedAtNEQ ¶
CreatedAtNEQ applies the NEQ predicate on the "created_at" field.
func CreatedAtNotIn ¶
CreatedAtNotIn applies the NotIn predicate on the "created_at" field.
func CreatedAtNotNil ¶
CreatedAtNotNil applies the NotNil predicate on the "created_at" field.
func DataScope ¶
DataScope applies equality check predicate on the "data_scope" field. It's identical to DataScopeEQ.
func DataScopeEQ ¶
DataScopeEQ applies the EQ predicate on the "data_scope" field.
func DataScopeGT ¶
DataScopeGT applies the GT predicate on the "data_scope" field.
func DataScopeGTE ¶
DataScopeGTE applies the GTE predicate on the "data_scope" field.
func DataScopeIn ¶
DataScopeIn applies the In predicate on the "data_scope" field.
func DataScopeLT ¶
DataScopeLT applies the LT predicate on the "data_scope" field.
func DataScopeLTE ¶
DataScopeLTE applies the LTE predicate on the "data_scope" field.
func DataScopeNEQ ¶
DataScopeNEQ applies the NEQ predicate on the "data_scope" field.
func DataScopeNotIn ¶
DataScopeNotIn applies the NotIn predicate on the "data_scope" field.
func DefaultRouter ¶
DefaultRouter applies equality check predicate on the "default_router" field. It's identical to DefaultRouterEQ.
func DefaultRouterContains ¶
DefaultRouterContains applies the Contains predicate on the "default_router" field.
func DefaultRouterContainsFold ¶
DefaultRouterContainsFold applies the ContainsFold predicate on the "default_router" field.
func DefaultRouterEQ ¶
DefaultRouterEQ applies the EQ predicate on the "default_router" field.
func DefaultRouterEqualFold ¶
DefaultRouterEqualFold applies the EqualFold predicate on the "default_router" field.
func DefaultRouterGT ¶
DefaultRouterGT applies the GT predicate on the "default_router" field.
func DefaultRouterGTE ¶
DefaultRouterGTE applies the GTE predicate on the "default_router" field.
func DefaultRouterHasPrefix ¶
DefaultRouterHasPrefix applies the HasPrefix predicate on the "default_router" field.
func DefaultRouterHasSuffix ¶
DefaultRouterHasSuffix applies the HasSuffix predicate on the "default_router" field.
func DefaultRouterIn ¶
DefaultRouterIn applies the In predicate on the "default_router" field.
func DefaultRouterLT ¶
DefaultRouterLT applies the LT predicate on the "default_router" field.
func DefaultRouterLTE ¶
DefaultRouterLTE applies the LTE predicate on the "default_router" field.
func DefaultRouterNEQ ¶
DefaultRouterNEQ applies the NEQ predicate on the "default_router" field.
func DefaultRouterNotIn ¶
DefaultRouterNotIn applies the NotIn predicate on the "default_router" field.
func DeletedAt ¶
DeletedAt applies equality check predicate on the "deleted_at" field. It's identical to DeletedAtEQ.
func DeletedAtEQ ¶
DeletedAtEQ applies the EQ predicate on the "deleted_at" field.
func DeletedAtGT ¶
DeletedAtGT applies the GT predicate on the "deleted_at" field.
func DeletedAtGTE ¶
DeletedAtGTE applies the GTE predicate on the "deleted_at" field.
func DeletedAtIn ¶
DeletedAtIn applies the In predicate on the "deleted_at" field.
func DeletedAtIsNil ¶
DeletedAtIsNil applies the IsNil predicate on the "deleted_at" field.
func DeletedAtLT ¶
DeletedAtLT applies the LT predicate on the "deleted_at" field.
func DeletedAtLTE ¶
DeletedAtLTE applies the LTE predicate on the "deleted_at" field.
func DeletedAtNEQ ¶
DeletedAtNEQ applies the NEQ predicate on the "deleted_at" field.
func DeletedAtNotIn ¶
DeletedAtNotIn applies the NotIn predicate on the "deleted_at" field.
func DeletedAtNotNil ¶
DeletedAtNotNil applies the NotNil predicate on the "deleted_at" field.
func DeptCheckStrictly ¶
DeptCheckStrictly applies equality check predicate on the "dept_check_strictly" field. It's identical to DeptCheckStrictlyEQ.
func DeptCheckStrictlyEQ ¶
DeptCheckStrictlyEQ applies the EQ predicate on the "dept_check_strictly" field.
func DeptCheckStrictlyGT ¶
DeptCheckStrictlyGT applies the GT predicate on the "dept_check_strictly" field.
func DeptCheckStrictlyGTE ¶
DeptCheckStrictlyGTE applies the GTE predicate on the "dept_check_strictly" field.
func DeptCheckStrictlyIn ¶
DeptCheckStrictlyIn applies the In predicate on the "dept_check_strictly" field.
func DeptCheckStrictlyLT ¶
DeptCheckStrictlyLT applies the LT predicate on the "dept_check_strictly" field.
func DeptCheckStrictlyLTE ¶
DeptCheckStrictlyLTE applies the LTE predicate on the "dept_check_strictly" field.
func DeptCheckStrictlyNEQ ¶
DeptCheckStrictlyNEQ applies the NEQ predicate on the "dept_check_strictly" field.
func DeptCheckStrictlyNotIn ¶
DeptCheckStrictlyNotIn applies the NotIn predicate on the "dept_check_strictly" field.
func HasUsersWith ¶
HasUsersWith applies the HasEdge predicate on the "users" edge with a given conditions (other predicates).
func MenuCheckStrictly ¶
MenuCheckStrictly applies equality check predicate on the "menu_check_strictly" field. It's identical to MenuCheckStrictlyEQ.
func MenuCheckStrictlyEQ ¶
MenuCheckStrictlyEQ applies the EQ predicate on the "menu_check_strictly" field.
func MenuCheckStrictlyGT ¶
MenuCheckStrictlyGT applies the GT predicate on the "menu_check_strictly" field.
func MenuCheckStrictlyGTE ¶
MenuCheckStrictlyGTE applies the GTE predicate on the "menu_check_strictly" field.
func MenuCheckStrictlyIn ¶
MenuCheckStrictlyIn applies the In predicate on the "menu_check_strictly" field.
func MenuCheckStrictlyLT ¶
MenuCheckStrictlyLT applies the LT predicate on the "menu_check_strictly" field.
func MenuCheckStrictlyLTE ¶
MenuCheckStrictlyLTE applies the LTE predicate on the "menu_check_strictly" field.
func MenuCheckStrictlyNEQ ¶
MenuCheckStrictlyNEQ applies the NEQ predicate on the "menu_check_strictly" field.
func MenuCheckStrictlyNotIn ¶
MenuCheckStrictlyNotIn applies the NotIn predicate on the "menu_check_strictly" field.
func NameContains ¶
NameContains applies the Contains predicate on the "name" field.
func NameContainsFold ¶
NameContainsFold applies the ContainsFold predicate on the "name" field.
func NameEqualFold ¶
NameEqualFold applies the EqualFold predicate on the "name" field.
func NameHasPrefix ¶
NameHasPrefix applies the HasPrefix predicate on the "name" field.
func NameHasSuffix ¶
NameHasSuffix applies the HasSuffix predicate on the "name" field.
func Remark ¶
Remark applies equality check predicate on the "remark" field. It's identical to RemarkEQ.
func RemarkContains ¶
RemarkContains applies the Contains predicate on the "remark" field.
func RemarkContainsFold ¶
RemarkContainsFold applies the ContainsFold predicate on the "remark" field.
func RemarkEqualFold ¶
RemarkEqualFold applies the EqualFold predicate on the "remark" field.
func RemarkHasPrefix ¶
RemarkHasPrefix applies the HasPrefix predicate on the "remark" field.
func RemarkHasSuffix ¶
RemarkHasSuffix applies the HasSuffix predicate on the "remark" field.
func RemarkIsNil ¶
RemarkIsNil applies the IsNil predicate on the "remark" field.
func RemarkNotIn ¶
RemarkNotIn applies the NotIn predicate on the "remark" field.
func RemarkNotNil ¶
RemarkNotNil applies the NotNil predicate on the "remark" field.
func State ¶
State applies equality check predicate on the "state" field. It's identical to StateEQ.
func StateNotIn ¶
StateNotIn applies the NotIn predicate on the "state" field.
func UpdatedAt ¶
UpdatedAt applies equality check predicate on the "updated_at" field. It's identical to UpdatedAtEQ.
func UpdatedAtEQ ¶
UpdatedAtEQ applies the EQ predicate on the "updated_at" field.
func UpdatedAtGT ¶
UpdatedAtGT applies the GT predicate on the "updated_at" field.
func UpdatedAtGTE ¶
UpdatedAtGTE applies the GTE predicate on the "updated_at" field.
func UpdatedAtIn ¶
UpdatedAtIn applies the In predicate on the "updated_at" field.
func UpdatedAtIsNil ¶
UpdatedAtIsNil applies the IsNil predicate on the "updated_at" field.
func UpdatedAtLT ¶
UpdatedAtLT applies the LT predicate on the "updated_at" field.
func UpdatedAtLTE ¶
UpdatedAtLTE applies the LTE predicate on the "updated_at" field.
func UpdatedAtNEQ ¶
UpdatedAtNEQ applies the NEQ predicate on the "updated_at" field.
func UpdatedAtNotIn ¶
UpdatedAtNotIn applies the NotIn predicate on the "updated_at" field.
func UpdatedAtNotNil ¶
UpdatedAtNotNil applies the NotNil predicate on the "updated_at" 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 Role queries.
func ByCreatedAt ¶
func ByCreatedAt(opts ...sql.OrderTermOption) OrderOption
ByCreatedAt orders the results by the created_at field.
func ByDataScope ¶
func ByDataScope(opts ...sql.OrderTermOption) OrderOption
ByDataScope orders the results by the data_scope field.
func ByDefaultRouter ¶
func ByDefaultRouter(opts ...sql.OrderTermOption) OrderOption
ByDefaultRouter orders the results by the default_router field.
func ByDeletedAt ¶
func ByDeletedAt(opts ...sql.OrderTermOption) OrderOption
ByDeletedAt orders the results by the deleted_at field.
func ByDeptCheckStrictly ¶
func ByDeptCheckStrictly(opts ...sql.OrderTermOption) OrderOption
ByDeptCheckStrictly orders the results by the dept_check_strictly field.
func ByID ¶
func ByID(opts ...sql.OrderTermOption) OrderOption
ByID orders the results by the id field.
func ByMenuCheckStrictly ¶
func ByMenuCheckStrictly(opts ...sql.OrderTermOption) OrderOption
ByMenuCheckStrictly orders the results by the menu_check_strictly field.
func ByName ¶
func ByName(opts ...sql.OrderTermOption) OrderOption
ByName orders the results by the name field.
func ByRemark ¶
func ByRemark(opts ...sql.OrderTermOption) OrderOption
ByRemark orders the results by the remark field.
func BySort ¶
func BySort(opts ...sql.OrderTermOption) OrderOption
BySort orders the results by the sort field.
func ByState ¶
func ByState(opts ...sql.OrderTermOption) OrderOption
ByState orders the results by the state field.
func ByUpdatedAt ¶
func ByUpdatedAt(opts ...sql.OrderTermOption) OrderOption
ByUpdatedAt orders the results by the updated_at field.
func ByUsers ¶
func ByUsers(term sql.OrderTerm, terms ...sql.OrderTerm) OrderOption
ByUsers orders the results by users terms.
func ByUsersCount ¶
func ByUsersCount(opts ...sql.OrderTermOption) OrderOption
ByUsersCount orders the results by users count.