♻️ Refactor keybinding service

This commit is contained in:
2025-12-20 16:43:04 +08:00
parent 401eb3ab39
commit 7b746155f7
60 changed files with 4526 additions and 1816 deletions

View File

@@ -73,9 +73,9 @@ func DeletedAt(v string) predicate.Theme {
return predicate.Theme(sql.FieldEQ(FieldDeletedAt, v))
}
// Key applies equality check predicate on the "key" field. It's identical to KeyEQ.
func Key(v string) predicate.Theme {
return predicate.Theme(sql.FieldEQ(FieldKey, v))
// Name applies equality check predicate on the "name" field. It's identical to NameEQ.
func Name(v string) predicate.Theme {
return predicate.Theme(sql.FieldEQ(FieldName, v))
}
// UUIDEQ applies the EQ predicate on the "uuid" field.
@@ -133,16 +133,6 @@ func UUIDHasSuffix(v string) predicate.Theme {
return predicate.Theme(sql.FieldHasSuffix(FieldUUID, v))
}
// UUIDIsNil applies the IsNil predicate on the "uuid" field.
func UUIDIsNil() predicate.Theme {
return predicate.Theme(sql.FieldIsNull(FieldUUID))
}
// UUIDNotNil applies the NotNil predicate on the "uuid" field.
func UUIDNotNil() predicate.Theme {
return predicate.Theme(sql.FieldNotNull(FieldUUID))
}
// UUIDEqualFold applies the EqualFold predicate on the "uuid" field.
func UUIDEqualFold(v string) predicate.Theme {
return predicate.Theme(sql.FieldEqualFold(FieldUUID, v))
@@ -358,69 +348,69 @@ func DeletedAtContainsFold(v string) predicate.Theme {
return predicate.Theme(sql.FieldContainsFold(FieldDeletedAt, v))
}
// KeyEQ applies the EQ predicate on the "key" field.
func KeyEQ(v string) predicate.Theme {
return predicate.Theme(sql.FieldEQ(FieldKey, v))
// NameEQ applies the EQ predicate on the "name" field.
func NameEQ(v string) predicate.Theme {
return predicate.Theme(sql.FieldEQ(FieldName, v))
}
// KeyNEQ applies the NEQ predicate on the "key" field.
func KeyNEQ(v string) predicate.Theme {
return predicate.Theme(sql.FieldNEQ(FieldKey, v))
// NameNEQ applies the NEQ predicate on the "name" field.
func NameNEQ(v string) predicate.Theme {
return predicate.Theme(sql.FieldNEQ(FieldName, v))
}
// KeyIn applies the In predicate on the "key" field.
func KeyIn(vs ...string) predicate.Theme {
return predicate.Theme(sql.FieldIn(FieldKey, vs...))
// NameIn applies the In predicate on the "name" field.
func NameIn(vs ...string) predicate.Theme {
return predicate.Theme(sql.FieldIn(FieldName, vs...))
}
// KeyNotIn applies the NotIn predicate on the "key" field.
func KeyNotIn(vs ...string) predicate.Theme {
return predicate.Theme(sql.FieldNotIn(FieldKey, vs...))
// NameNotIn applies the NotIn predicate on the "name" field.
func NameNotIn(vs ...string) predicate.Theme {
return predicate.Theme(sql.FieldNotIn(FieldName, vs...))
}
// KeyGT applies the GT predicate on the "key" field.
func KeyGT(v string) predicate.Theme {
return predicate.Theme(sql.FieldGT(FieldKey, v))
// NameGT applies the GT predicate on the "name" field.
func NameGT(v string) predicate.Theme {
return predicate.Theme(sql.FieldGT(FieldName, v))
}
// KeyGTE applies the GTE predicate on the "key" field.
func KeyGTE(v string) predicate.Theme {
return predicate.Theme(sql.FieldGTE(FieldKey, v))
// NameGTE applies the GTE predicate on the "name" field.
func NameGTE(v string) predicate.Theme {
return predicate.Theme(sql.FieldGTE(FieldName, v))
}
// KeyLT applies the LT predicate on the "key" field.
func KeyLT(v string) predicate.Theme {
return predicate.Theme(sql.FieldLT(FieldKey, v))
// NameLT applies the LT predicate on the "name" field.
func NameLT(v string) predicate.Theme {
return predicate.Theme(sql.FieldLT(FieldName, v))
}
// KeyLTE applies the LTE predicate on the "key" field.
func KeyLTE(v string) predicate.Theme {
return predicate.Theme(sql.FieldLTE(FieldKey, v))
// NameLTE applies the LTE predicate on the "name" field.
func NameLTE(v string) predicate.Theme {
return predicate.Theme(sql.FieldLTE(FieldName, v))
}
// KeyContains applies the Contains predicate on the "key" field.
func KeyContains(v string) predicate.Theme {
return predicate.Theme(sql.FieldContains(FieldKey, v))
// NameContains applies the Contains predicate on the "name" field.
func NameContains(v string) predicate.Theme {
return predicate.Theme(sql.FieldContains(FieldName, v))
}
// KeyHasPrefix applies the HasPrefix predicate on the "key" field.
func KeyHasPrefix(v string) predicate.Theme {
return predicate.Theme(sql.FieldHasPrefix(FieldKey, v))
// NameHasPrefix applies the HasPrefix predicate on the "name" field.
func NameHasPrefix(v string) predicate.Theme {
return predicate.Theme(sql.FieldHasPrefix(FieldName, v))
}
// KeyHasSuffix applies the HasSuffix predicate on the "key" field.
func KeyHasSuffix(v string) predicate.Theme {
return predicate.Theme(sql.FieldHasSuffix(FieldKey, v))
// NameHasSuffix applies the HasSuffix predicate on the "name" field.
func NameHasSuffix(v string) predicate.Theme {
return predicate.Theme(sql.FieldHasSuffix(FieldName, v))
}
// KeyEqualFold applies the EqualFold predicate on the "key" field.
func KeyEqualFold(v string) predicate.Theme {
return predicate.Theme(sql.FieldEqualFold(FieldKey, v))
// NameEqualFold applies the EqualFold predicate on the "name" field.
func NameEqualFold(v string) predicate.Theme {
return predicate.Theme(sql.FieldEqualFold(FieldName, v))
}
// KeyContainsFold applies the ContainsFold predicate on the "key" field.
func KeyContainsFold(v string) predicate.Theme {
return predicate.Theme(sql.FieldContainsFold(FieldKey, v))
// NameContainsFold applies the ContainsFold predicate on the "name" field.
func NameContainsFold(v string) predicate.Theme {
return predicate.Theme(sql.FieldContainsFold(FieldName, v))
}
// TypeEQ applies the EQ predicate on the "type" field.