fix: some api bug

This commit is contained in:
wwweww
2026-03-31 22:12:06 +08:00
parent c5ff4f0216
commit e7970ac25f
219 changed files with 16195 additions and 2126 deletions
@@ -4,6 +4,7 @@ package shops
import (
"juwan-backend/app/shop/rpc/internal/models/predicate"
"juwan-backend/app/shop/rpc/internal/models/schema"
"time"
"entgo.io/ent/dialect/sql"
@@ -115,6 +116,11 @@ func DispatchMode(v string) predicate.Shops {
return predicate.Shops(sql.FieldEQ(FieldDispatchMode, v))
}
// Announcements applies equality check predicate on the "announcements" field. It's identical to AnnouncementsEQ.
func Announcements(v schema.TextArray) predicate.Shops {
return predicate.Shops(sql.FieldEQ(FieldAnnouncements, v))
}
// CreatedAt applies equality check predicate on the "created_at" field. It's identical to CreatedAtEQ.
func CreatedAt(v time.Time) predicate.Shops {
return predicate.Shops(sql.FieldEQ(FieldCreatedAt, v))
@@ -740,6 +746,46 @@ func DispatchModeContainsFold(v string) predicate.Shops {
return predicate.Shops(sql.FieldContainsFold(FieldDispatchMode, v))
}
// AnnouncementsEQ applies the EQ predicate on the "announcements" field.
func AnnouncementsEQ(v schema.TextArray) predicate.Shops {
return predicate.Shops(sql.FieldEQ(FieldAnnouncements, v))
}
// AnnouncementsNEQ applies the NEQ predicate on the "announcements" field.
func AnnouncementsNEQ(v schema.TextArray) predicate.Shops {
return predicate.Shops(sql.FieldNEQ(FieldAnnouncements, v))
}
// AnnouncementsIn applies the In predicate on the "announcements" field.
func AnnouncementsIn(vs ...schema.TextArray) predicate.Shops {
return predicate.Shops(sql.FieldIn(FieldAnnouncements, vs...))
}
// AnnouncementsNotIn applies the NotIn predicate on the "announcements" field.
func AnnouncementsNotIn(vs ...schema.TextArray) predicate.Shops {
return predicate.Shops(sql.FieldNotIn(FieldAnnouncements, vs...))
}
// AnnouncementsGT applies the GT predicate on the "announcements" field.
func AnnouncementsGT(v schema.TextArray) predicate.Shops {
return predicate.Shops(sql.FieldGT(FieldAnnouncements, v))
}
// AnnouncementsGTE applies the GTE predicate on the "announcements" field.
func AnnouncementsGTE(v schema.TextArray) predicate.Shops {
return predicate.Shops(sql.FieldGTE(FieldAnnouncements, v))
}
// AnnouncementsLT applies the LT predicate on the "announcements" field.
func AnnouncementsLT(v schema.TextArray) predicate.Shops {
return predicate.Shops(sql.FieldLT(FieldAnnouncements, v))
}
// AnnouncementsLTE applies the LTE predicate on the "announcements" field.
func AnnouncementsLTE(v schema.TextArray) predicate.Shops {
return predicate.Shops(sql.FieldLTE(FieldAnnouncements, v))
}
// AnnouncementsIsNil applies the IsNil predicate on the "announcements" field.
func AnnouncementsIsNil() predicate.Shops {
return predicate.Shops(sql.FieldIsNull(FieldAnnouncements))