Documentation
¶
Index ¶
- Constants
- Variables
- func And(predicates ...predicate.Role) predicate.Role
- func Code(v string) predicate.Role
- func CodeContains(v string) predicate.Role
- func CodeContainsFold(v string) predicate.Role
- func CodeEQ(v string) predicate.Role
- func CodeEqualFold(v string) predicate.Role
- func CodeGT(v string) predicate.Role
- func CodeGTE(v string) predicate.Role
- func CodeHasPrefix(v string) predicate.Role
- func CodeHasSuffix(v string) predicate.Role
- func CodeIn(vs ...string) predicate.Role
- func CodeLT(v string) predicate.Role
- func CodeLTE(v string) predicate.Role
- func CodeNEQ(v string) predicate.Role
- func CodeNotIn(vs ...string) 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 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 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 HasMenus() predicate.Role
- func HasMenusWith(preds ...predicate.Menu) predicate.Role
- func HasUsers() predicate.Role
- func HasUsersWith(preds ...predicate.User) predicate.Role
- func ID(id uint64) predicate.Role
- func IDEQ(id uint64) predicate.Role
- func IDGT(id uint64) predicate.Role
- func IDGTE(id uint64) predicate.Role
- func IDIn(ids ...uint64) predicate.Role
- func IDLT(id uint64) predicate.Role
- func IDLTE(id uint64) predicate.Role
- func IDNEQ(id uint64) predicate.Role
- func IDNotIn(ids ...uint64) 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 RemarkLT(v string) predicate.Role
- func RemarkLTE(v string) predicate.Role
- func RemarkNEQ(v string) predicate.Role
- func RemarkNotIn(vs ...string) predicate.Role
- func Sort(v uint32) predicate.Role
- func SortEQ(v uint32) predicate.Role
- func SortGT(v uint32) predicate.Role
- func SortGTE(v uint32) predicate.Role
- func SortIn(vs ...uint32) predicate.Role
- func SortLT(v uint32) predicate.Role
- func SortLTE(v uint32) predicate.Role
- func SortNEQ(v uint32) predicate.Role
- func SortNotIn(vs ...uint32) predicate.Role
- func Status(v uint8) predicate.Role
- func StatusEQ(v uint8) predicate.Role
- func StatusGT(v uint8) predicate.Role
- func StatusGTE(v uint8) predicate.Role
- func StatusIn(vs ...uint8) predicate.Role
- func StatusIsNil() predicate.Role
- func StatusLT(v uint8) predicate.Role
- func StatusLTE(v uint8) predicate.Role
- func StatusNEQ(v uint8) predicate.Role
- func StatusNotIn(vs ...uint8) predicate.Role
- func StatusNotNil() 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 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 ValidColumn(column string) bool
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" // FieldStatus holds the string denoting the status field in the database. FieldStatus = "status" // FieldName holds the string denoting the name field in the database. FieldName = "name" // FieldCode holds the string denoting the code field in the database. FieldCode = "code" // FieldDefaultRouter holds the string denoting the default_router field in the database. FieldDefaultRouter = "default_router" // 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" // EdgeMenus holds the string denoting the menus edge name in mutations. EdgeMenus = "menus" // 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 = "sys_roles" // MenusTable is the table that holds the menus relation/edge. The primary key declared below. MenusTable = "role_menus" // MenusInverseTable is the table name for the Menu entity. // It exists in this package in order to avoid circular dependency with the "menu" package. MenusInverseTable = "sys_menus" // 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 = "sys_users" )
Variables ¶
var ( // MenusPrimaryKey and MenusColumn2 are the table columns denoting the // primary key for the menus relation (M2M). MenusPrimaryKey = []string{"role_id", "menu_id"} // UsersPrimaryKey and UsersColumn2 are the table columns denoting the // primary key for the users relation (M2M). UsersPrimaryKey = []string{"user_id", "role_id"} )
var ( // 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 // DefaultStatus holds the default value on creation for the "status" field. DefaultStatus uint8 // DefaultDefaultRouter holds the default value on creation for the "default_router" field. DefaultDefaultRouter string // 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 uint32 )
var Columns = []string{ FieldID, FieldCreatedAt, FieldUpdatedAt, FieldStatus, FieldName, FieldCode, FieldDefaultRouter, FieldRemark, FieldSort, }
Columns holds all SQL columns for role fields.
Functions ¶
func Code ¶ added in v0.2.4
Code applies equality check predicate on the "code" field. It's identical to CodeEQ.
func CodeContains ¶ added in v0.2.4
CodeContains applies the Contains predicate on the "code" field.
func CodeContainsFold ¶ added in v0.2.4
CodeContainsFold applies the ContainsFold predicate on the "code" field.
func CodeEqualFold ¶ added in v0.2.4
CodeEqualFold applies the EqualFold predicate on the "code" field.
func CodeHasPrefix ¶ added in v0.2.4
CodeHasPrefix applies the HasPrefix predicate on the "code" field.
func CodeHasSuffix ¶ added in v0.2.4
CodeHasSuffix applies the HasSuffix predicate on the "code" field.
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 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 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 HasMenusWith ¶
HasMenusWith applies the HasEdge predicate on the "menus" edge with a given conditions (other predicates).
func HasUsersWith ¶ added in v0.2.4
HasUsersWith applies the HasEdge predicate on the "users" edge with a given conditions (other predicates).
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 RemarkNotIn ¶
RemarkNotIn applies the NotIn predicate on the "remark" field.
func Sort ¶ added in v0.2.3
Sort applies equality check predicate on the "sort" field. It's identical to SortEQ.
func Status ¶
Status applies equality check predicate on the "status" field. It's identical to StatusEQ.
func StatusIsNil ¶
StatusIsNil applies the IsNil predicate on the "status" field.
func StatusNotIn ¶
StatusNotIn applies the NotIn predicate on the "status" field.
func StatusNotNil ¶
StatusNotNil applies the NotNil predicate on the "status" 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 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 ValidColumn ¶
ValidColumn reports if the column name is valid (part of the table columns).
Types ¶
This section is empty.