Add dynamic admin panel for managing entities (#108)

This commit is contained in:
Mike Stefanello 2025-04-22 08:26:35 -04:00 committed by GitHub
parent 60009df0bf
commit 1a6874fd82
47 changed files with 2173 additions and 320 deletions

View file

@ -75,6 +75,11 @@ func Verified(v bool) predicate.User {
return predicate.User(sql.FieldEQ(FieldVerified, v))
}
// Admin applies equality check predicate on the "admin" field. It's identical to AdminEQ.
func Admin(v bool) predicate.User {
return predicate.User(sql.FieldEQ(FieldAdmin, v))
}
// CreatedAt applies equality check predicate on the "created_at" field. It's identical to CreatedAtEQ.
func CreatedAt(v time.Time) predicate.User {
return predicate.User(sql.FieldEQ(FieldCreatedAt, v))
@ -285,6 +290,16 @@ func VerifiedNEQ(v bool) predicate.User {
return predicate.User(sql.FieldNEQ(FieldVerified, v))
}
// AdminEQ applies the EQ predicate on the "admin" field.
func AdminEQ(v bool) predicate.User {
return predicate.User(sql.FieldEQ(FieldAdmin, v))
}
// AdminNEQ applies the NEQ predicate on the "admin" field.
func AdminNEQ(v bool) predicate.User {
return predicate.User(sql.FieldNEQ(FieldAdmin, v))
}
// CreatedAtEQ applies the EQ predicate on the "created_at" field.
func CreatedAtEQ(v time.Time) predicate.User {
return predicate.User(sql.FieldEQ(FieldCreatedAt, v))