feat: add content report governance

This commit is contained in:
2026-01-16 11:36:04 +08:00
parent 3af3c854c9
commit 609ca7b980
18 changed files with 2480 additions and 101 deletions

View File

@@ -23,6 +23,7 @@ var (
ContentAccessQuery *contentAccessQuery
ContentAssetQuery *contentAssetQuery
ContentPriceQuery *contentPriceQuery
ContentReportQuery *contentReportQuery
CouponQuery *couponQuery
MediaAssetQuery *mediaAssetQuery
NotificationQuery *notificationQuery
@@ -50,6 +51,7 @@ func SetDefault(db *gorm.DB, opts ...gen.DOOption) {
ContentAccessQuery = &Q.ContentAccess
ContentAssetQuery = &Q.ContentAsset
ContentPriceQuery = &Q.ContentPrice
ContentReportQuery = &Q.ContentReport
CouponQuery = &Q.Coupon
MediaAssetQuery = &Q.MediaAsset
NotificationQuery = &Q.Notification
@@ -78,6 +80,7 @@ func Use(db *gorm.DB, opts ...gen.DOOption) *Query {
ContentAccess: newContentAccess(db, opts...),
ContentAsset: newContentAsset(db, opts...),
ContentPrice: newContentPrice(db, opts...),
ContentReport: newContentReport(db, opts...),
Coupon: newCoupon(db, opts...),
MediaAsset: newMediaAsset(db, opts...),
Notification: newNotification(db, opts...),
@@ -107,6 +110,7 @@ type Query struct {
ContentAccess contentAccessQuery
ContentAsset contentAssetQuery
ContentPrice contentPriceQuery
ContentReport contentReportQuery
Coupon couponQuery
MediaAsset mediaAssetQuery
Notification notificationQuery
@@ -137,6 +141,7 @@ func (q *Query) clone(db *gorm.DB) *Query {
ContentAccess: q.ContentAccess.clone(db),
ContentAsset: q.ContentAsset.clone(db),
ContentPrice: q.ContentPrice.clone(db),
ContentReport: q.ContentReport.clone(db),
Coupon: q.Coupon.clone(db),
MediaAsset: q.MediaAsset.clone(db),
Notification: q.Notification.clone(db),
@@ -174,6 +179,7 @@ func (q *Query) ReplaceDB(db *gorm.DB) *Query {
ContentAccess: q.ContentAccess.replaceDB(db),
ContentAsset: q.ContentAsset.replaceDB(db),
ContentPrice: q.ContentPrice.replaceDB(db),
ContentReport: q.ContentReport.replaceDB(db),
Coupon: q.Coupon.replaceDB(db),
MediaAsset: q.MediaAsset.replaceDB(db),
Notification: q.Notification.replaceDB(db),
@@ -201,6 +207,7 @@ type queryCtx struct {
ContentAccess *contentAccessQueryDo
ContentAsset *contentAssetQueryDo
ContentPrice *contentPriceQueryDo
ContentReport *contentReportQueryDo
Coupon *couponQueryDo
MediaAsset *mediaAssetQueryDo
Notification *notificationQueryDo
@@ -228,6 +235,7 @@ func (q *Query) WithContext(ctx context.Context) *queryCtx {
ContentAccess: q.ContentAccess.WithContext(ctx),
ContentAsset: q.ContentAsset.WithContext(ctx),
ContentPrice: q.ContentPrice.WithContext(ctx),
ContentReport: q.ContentReport.WithContext(ctx),
Coupon: q.Coupon.WithContext(ctx),
MediaAsset: q.MediaAsset.WithContext(ctx),
Notification: q.Notification.WithContext(ctx),