Documentation ¶
Index ¶
- Constants
- Variables
- func And(predicates ...predicate.Role) predicate.Role
- func CreateTime(v time.Time) predicate.Role
- func CreateTimeEQ(v time.Time) predicate.Role
- func CreateTimeGT(v time.Time) predicate.Role
- func CreateTimeGTE(v time.Time) predicate.Role
- func CreateTimeIn(vs ...time.Time) predicate.Role
- func CreateTimeLT(v time.Time) predicate.Role
- func CreateTimeLTE(v time.Time) predicate.Role
- func CreateTimeNEQ(v time.Time) predicate.Role
- func CreateTimeNotIn(vs ...time.Time) predicate.Role
- func Desc(v string) predicate.Role
- func DescContains(v string) predicate.Role
- func DescContainsFold(v string) predicate.Role
- func DescEQ(v string) predicate.Role
- func DescEqualFold(v string) predicate.Role
- func DescGT(v string) predicate.Role
- func DescGTE(v string) predicate.Role
- func DescHasPrefix(v string) predicate.Role
- func DescHasSuffix(v string) predicate.Role
- func DescIn(vs ...string) predicate.Role
- func DescIsNil() predicate.Role
- func DescLT(v string) predicate.Role
- func DescLTE(v string) predicate.Role
- func DescNEQ(v string) predicate.Role
- func DescNotIn(vs ...string) predicate.Role
- func DescNotNil() predicate.Role
- func HasEmployees() predicate.Role
- func HasEmployeesWith(preds ...predicate.Employee) predicate.Role
- func HasPermissions() predicate.Role
- func HasPermissionsWith(preds ...predicate.Permission) predicate.Role
- func ID(id int64) predicate.Role
- func IDEQ(id int64) predicate.Role
- func IDGT(id int64) predicate.Role
- func IDGTE(id int64) predicate.Role
- func IDIn(ids ...int64) predicate.Role
- func IDLT(id int64) predicate.Role
- func IDLTE(id int64) predicate.Role
- func IDNEQ(id int64) predicate.Role
- func IDNotIn(ids ...int64) 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 StatusEQ(v Status) predicate.Role
- func StatusIn(vs ...Status) predicate.Role
- func StatusIsNil() predicate.Role
- func StatusNEQ(v Status) predicate.Role
- func StatusNotIn(vs ...Status) predicate.Role
- func StatusNotNil() predicate.Role
- func StatusValidator(s Status) error
- func UpdateTime(v time.Time) predicate.Role
- func UpdateTimeEQ(v time.Time) predicate.Role
- func UpdateTimeGT(v time.Time) predicate.Role
- func UpdateTimeGTE(v time.Time) predicate.Role
- func UpdateTimeIn(vs ...time.Time) predicate.Role
- func UpdateTimeLT(v time.Time) predicate.Role
- func UpdateTimeLTE(v time.Time) predicate.Role
- func UpdateTimeNEQ(v time.Time) predicate.Role
- func UpdateTimeNotIn(vs ...time.Time) predicate.Role
- func ValidColumn(column string) bool
- type Status
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" // FieldCreateTime holds the string denoting the create_time field in the database. FieldCreateTime = "create_time" // FieldUpdateTime holds the string denoting the update_time field in the database. FieldUpdateTime = "update_time" // FieldName holds the string denoting the name field in the database. FieldName = "name" // FieldDesc holds the string denoting the desc field in the database. FieldDesc = "desc" // FieldStatus holds the string denoting the status field in the database. FieldStatus = "status" // EdgePermissions holds the string denoting the permissions edge name in mutations. EdgePermissions = "permissions" // EdgeEmployees holds the string denoting the employees edge name in mutations. EdgeEmployees = "employees" // Table holds the table name of the role in the database. Table = "roles" // PermissionsTable is the table the holds the permissions relation/edge. The primary key declared below. PermissionsTable = "role_permissions" // PermissionsInverseTable is the table name for the Permission entity. // It exists in this package in order to avoid circular dependency with the "permission" package. PermissionsInverseTable = "permissions" // EmployeesTable is the table the holds the employees relation/edge. The primary key declared below. EmployeesTable = "employee_roles" // EmployeesInverseTable is the table name for the Employee entity. // It exists in this package in order to avoid circular dependency with the "employee" package. EmployeesInverseTable = "employees" )
const DefaultStatus = StatusOn
StatusOn is the default value of the Status enum.
Variables ¶
var ( // PermissionsPrimaryKey and PermissionsColumn2 are the table columns denoting the // primary key for the permissions relation (M2M). PermissionsPrimaryKey = []string{"role_id", "permission_id"} // EmployeesPrimaryKey and EmployeesColumn2 are the table columns denoting the // primary key for the employees relation (M2M). EmployeesPrimaryKey = []string{"employee_id", "role_id"} )
var ( // DefaultCreateTime holds the default value on creation for the "create_time" field. DefaultCreateTime func() time.Time // DefaultUpdateTime holds the default value on creation for the "update_time" field. DefaultUpdateTime func() time.Time // UpdateDefaultUpdateTime holds the default value on update for the "update_time" field. UpdateDefaultUpdateTime func() time.Time // NameValidator is a validator for the "name" field. It is called by the builders before save. NameValidator func(string) error )
var Columns = []string{ FieldID, FieldCreateTime, FieldUpdateTime, FieldName, FieldDesc, FieldStatus, }
Columns holds all SQL columns for role fields.
Functions ¶
func CreateTime ¶
CreateTime applies equality check predicate on the "create_time" field. It's identical to CreateTimeEQ.
func CreateTimeEQ ¶
CreateTimeEQ applies the EQ predicate on the "create_time" field.
func CreateTimeGT ¶
CreateTimeGT applies the GT predicate on the "create_time" field.
func CreateTimeGTE ¶
CreateTimeGTE applies the GTE predicate on the "create_time" field.
func CreateTimeIn ¶
CreateTimeIn applies the In predicate on the "create_time" field.
func CreateTimeLT ¶
CreateTimeLT applies the LT predicate on the "create_time" field.
func CreateTimeLTE ¶
CreateTimeLTE applies the LTE predicate on the "create_time" field.
func CreateTimeNEQ ¶
CreateTimeNEQ applies the NEQ predicate on the "create_time" field.
func CreateTimeNotIn ¶
CreateTimeNotIn applies the NotIn predicate on the "create_time" field.
func DescContains ¶
DescContains applies the Contains predicate on the "desc" field.
func DescContainsFold ¶
DescContainsFold applies the ContainsFold predicate on the "desc" field.
func DescEqualFold ¶
DescEqualFold applies the EqualFold predicate on the "desc" field.
func DescHasPrefix ¶
DescHasPrefix applies the HasPrefix predicate on the "desc" field.
func DescHasSuffix ¶
DescHasSuffix applies the HasSuffix predicate on the "desc" field.
func DescNotNil ¶
DescNotNil applies the NotNil predicate on the "desc" field.
func HasEmployees ¶
HasEmployees applies the HasEdge predicate on the "employees" edge.
func HasEmployeesWith ¶
HasEmployeesWith applies the HasEdge predicate on the "employees" edge with a given conditions (other predicates).
func HasPermissions ¶
HasPermissions applies the HasEdge predicate on the "permissions" edge.
func HasPermissionsWith ¶
func HasPermissionsWith(preds ...predicate.Permission) predicate.Role
HasPermissionsWith applies the HasEdge predicate on the "permissions" 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 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 StatusValidator ¶
StatusValidator is a validator for the "status" field enum values. It is called by the builders before save.
func UpdateTime ¶
UpdateTime applies equality check predicate on the "update_time" field. It's identical to UpdateTimeEQ.
func UpdateTimeEQ ¶
UpdateTimeEQ applies the EQ predicate on the "update_time" field.
func UpdateTimeGT ¶
UpdateTimeGT applies the GT predicate on the "update_time" field.
func UpdateTimeGTE ¶
UpdateTimeGTE applies the GTE predicate on the "update_time" field.
func UpdateTimeIn ¶
UpdateTimeIn applies the In predicate on the "update_time" field.
func UpdateTimeLT ¶
UpdateTimeLT applies the LT predicate on the "update_time" field.
func UpdateTimeLTE ¶
UpdateTimeLTE applies the LTE predicate on the "update_time" field.
func UpdateTimeNEQ ¶
UpdateTimeNEQ applies the NEQ predicate on the "update_time" field.
func UpdateTimeNotIn ¶
UpdateTimeNotIn applies the NotIn predicate on the "update_time" field.
func ValidColumn ¶
ValidColumn reports if the column name is valid (part of the table columns).