Files
sub2api/backend/ent/channelmonitordailyrollup/where.go
erio ef6ec8a15a fix(channel-monitor): drop soft delete, refactor feature flag to declarative form
### 后端修复:日志表不该用软删除

channel_monitor_histories / channel_monitor_daily_rollups 都是日志/聚合表,
没有恢复需求。110 里加的 SoftDeleteMixin 会让 DELETE 自动变成 UPDATE deleted_at,
导致行和索引只增不减,徒增磁盘占用和查询成本。

改回分批物理删(参考 OpsCleanupService.deleteOldRowsByID 模板):

- ent schema 移除 SoftDeleteMixin,重新 go generate
- repo 新增 deleteChannelMonitorBatched 辅助 + 两条 prune SQL 常量
  (WITH batch AS SELECT id LIMIT 5000 → DELETE IN batch)
- DeleteHistoryBefore / DeleteRollupsBefore 改调分批 raw SQL
- 移除 ComputeAvailability / ComputeAvailabilityForMonitors / UpsertDailyRollupsFor /
  ListLatestPerModel / ListLatestForMonitorIDs / ListRecentHistoryForMonitors 等
  raw SQL 中的 deleted_at IS NULL 过滤
- UpsertDailyRollupsFor 的 ON CONFLICT 去掉 deleted_at = NULL 重置
- migration 111 DROP COLUMN deleted_at + 对应索引(110 已部署但 maintenance
  首跑在次日 02:00,此时尚无业务数据在依赖软删除)

### 前端重构:feature flag 声明式 + 复用

AppSidebar.vue 里 7 处 `...(flag ? [item] : [])` 样板代码删光,改为 NavItem 加
featureFlag?: () => boolean | undefined 字段,加一个 applyFeatureFlags 递归
过滤(含 children)。语义统一为 `!== false`(宽容策略,undefined 时默认显示,
避免 public settings 未加载完成时菜单闪烁消失 — 对应用户反馈"刷新后菜单消失
要去保存设置才回来")。

- 集中声明 4 个 flag getter:flagChannelMonitor / flagPayment /
  flagOpsMonitoring / flagAdminPayment
- 提取 buildSelfNavItems 复用用户端主菜单和管理员"我的账户"子菜单
- 未来新增开关:在统一位置加一个 flag getter + 给对应 NavItem 加字段
  (不用再动渲染逻辑)

bump 0.1.114.29
2026-04-23 17:31:15 +08:00

730 lines
32 KiB
Go

// Code generated by ent, DO NOT EDIT.
package channelmonitordailyrollup
import (
"time"
"entgo.io/ent/dialect/sql"
"entgo.io/ent/dialect/sql/sqlgraph"
"github.com/Wei-Shaw/sub2api/ent/predicate"
)
// ID filters vertices based on their ID field.
func ID(id int64) predicate.ChannelMonitorDailyRollup {
return predicate.ChannelMonitorDailyRollup(sql.FieldEQ(FieldID, id))
}
// IDEQ applies the EQ predicate on the ID field.
func IDEQ(id int64) predicate.ChannelMonitorDailyRollup {
return predicate.ChannelMonitorDailyRollup(sql.FieldEQ(FieldID, id))
}
// IDNEQ applies the NEQ predicate on the ID field.
func IDNEQ(id int64) predicate.ChannelMonitorDailyRollup {
return predicate.ChannelMonitorDailyRollup(sql.FieldNEQ(FieldID, id))
}
// IDIn applies the In predicate on the ID field.
func IDIn(ids ...int64) predicate.ChannelMonitorDailyRollup {
return predicate.ChannelMonitorDailyRollup(sql.FieldIn(FieldID, ids...))
}
// IDNotIn applies the NotIn predicate on the ID field.
func IDNotIn(ids ...int64) predicate.ChannelMonitorDailyRollup {
return predicate.ChannelMonitorDailyRollup(sql.FieldNotIn(FieldID, ids...))
}
// IDGT applies the GT predicate on the ID field.
func IDGT(id int64) predicate.ChannelMonitorDailyRollup {
return predicate.ChannelMonitorDailyRollup(sql.FieldGT(FieldID, id))
}
// IDGTE applies the GTE predicate on the ID field.
func IDGTE(id int64) predicate.ChannelMonitorDailyRollup {
return predicate.ChannelMonitorDailyRollup(sql.FieldGTE(FieldID, id))
}
// IDLT applies the LT predicate on the ID field.
func IDLT(id int64) predicate.ChannelMonitorDailyRollup {
return predicate.ChannelMonitorDailyRollup(sql.FieldLT(FieldID, id))
}
// IDLTE applies the LTE predicate on the ID field.
func IDLTE(id int64) predicate.ChannelMonitorDailyRollup {
return predicate.ChannelMonitorDailyRollup(sql.FieldLTE(FieldID, id))
}
// MonitorID applies equality check predicate on the "monitor_id" field. It's identical to MonitorIDEQ.
func MonitorID(v int64) predicate.ChannelMonitorDailyRollup {
return predicate.ChannelMonitorDailyRollup(sql.FieldEQ(FieldMonitorID, v))
}
// Model applies equality check predicate on the "model" field. It's identical to ModelEQ.
func Model(v string) predicate.ChannelMonitorDailyRollup {
return predicate.ChannelMonitorDailyRollup(sql.FieldEQ(FieldModel, v))
}
// BucketDate applies equality check predicate on the "bucket_date" field. It's identical to BucketDateEQ.
func BucketDate(v time.Time) predicate.ChannelMonitorDailyRollup {
return predicate.ChannelMonitorDailyRollup(sql.FieldEQ(FieldBucketDate, v))
}
// TotalChecks applies equality check predicate on the "total_checks" field. It's identical to TotalChecksEQ.
func TotalChecks(v int) predicate.ChannelMonitorDailyRollup {
return predicate.ChannelMonitorDailyRollup(sql.FieldEQ(FieldTotalChecks, v))
}
// OkCount applies equality check predicate on the "ok_count" field. It's identical to OkCountEQ.
func OkCount(v int) predicate.ChannelMonitorDailyRollup {
return predicate.ChannelMonitorDailyRollup(sql.FieldEQ(FieldOkCount, v))
}
// OperationalCount applies equality check predicate on the "operational_count" field. It's identical to OperationalCountEQ.
func OperationalCount(v int) predicate.ChannelMonitorDailyRollup {
return predicate.ChannelMonitorDailyRollup(sql.FieldEQ(FieldOperationalCount, v))
}
// DegradedCount applies equality check predicate on the "degraded_count" field. It's identical to DegradedCountEQ.
func DegradedCount(v int) predicate.ChannelMonitorDailyRollup {
return predicate.ChannelMonitorDailyRollup(sql.FieldEQ(FieldDegradedCount, v))
}
// FailedCount applies equality check predicate on the "failed_count" field. It's identical to FailedCountEQ.
func FailedCount(v int) predicate.ChannelMonitorDailyRollup {
return predicate.ChannelMonitorDailyRollup(sql.FieldEQ(FieldFailedCount, v))
}
// ErrorCount applies equality check predicate on the "error_count" field. It's identical to ErrorCountEQ.
func ErrorCount(v int) predicate.ChannelMonitorDailyRollup {
return predicate.ChannelMonitorDailyRollup(sql.FieldEQ(FieldErrorCount, v))
}
// SumLatencyMs applies equality check predicate on the "sum_latency_ms" field. It's identical to SumLatencyMsEQ.
func SumLatencyMs(v int64) predicate.ChannelMonitorDailyRollup {
return predicate.ChannelMonitorDailyRollup(sql.FieldEQ(FieldSumLatencyMs, v))
}
// CountLatency applies equality check predicate on the "count_latency" field. It's identical to CountLatencyEQ.
func CountLatency(v int) predicate.ChannelMonitorDailyRollup {
return predicate.ChannelMonitorDailyRollup(sql.FieldEQ(FieldCountLatency, v))
}
// SumPingLatencyMs applies equality check predicate on the "sum_ping_latency_ms" field. It's identical to SumPingLatencyMsEQ.
func SumPingLatencyMs(v int64) predicate.ChannelMonitorDailyRollup {
return predicate.ChannelMonitorDailyRollup(sql.FieldEQ(FieldSumPingLatencyMs, v))
}
// CountPingLatency applies equality check predicate on the "count_ping_latency" field. It's identical to CountPingLatencyEQ.
func CountPingLatency(v int) predicate.ChannelMonitorDailyRollup {
return predicate.ChannelMonitorDailyRollup(sql.FieldEQ(FieldCountPingLatency, v))
}
// ComputedAt applies equality check predicate on the "computed_at" field. It's identical to ComputedAtEQ.
func ComputedAt(v time.Time) predicate.ChannelMonitorDailyRollup {
return predicate.ChannelMonitorDailyRollup(sql.FieldEQ(FieldComputedAt, v))
}
// MonitorIDEQ applies the EQ predicate on the "monitor_id" field.
func MonitorIDEQ(v int64) predicate.ChannelMonitorDailyRollup {
return predicate.ChannelMonitorDailyRollup(sql.FieldEQ(FieldMonitorID, v))
}
// MonitorIDNEQ applies the NEQ predicate on the "monitor_id" field.
func MonitorIDNEQ(v int64) predicate.ChannelMonitorDailyRollup {
return predicate.ChannelMonitorDailyRollup(sql.FieldNEQ(FieldMonitorID, v))
}
// MonitorIDIn applies the In predicate on the "monitor_id" field.
func MonitorIDIn(vs ...int64) predicate.ChannelMonitorDailyRollup {
return predicate.ChannelMonitorDailyRollup(sql.FieldIn(FieldMonitorID, vs...))
}
// MonitorIDNotIn applies the NotIn predicate on the "monitor_id" field.
func MonitorIDNotIn(vs ...int64) predicate.ChannelMonitorDailyRollup {
return predicate.ChannelMonitorDailyRollup(sql.FieldNotIn(FieldMonitorID, vs...))
}
// ModelEQ applies the EQ predicate on the "model" field.
func ModelEQ(v string) predicate.ChannelMonitorDailyRollup {
return predicate.ChannelMonitorDailyRollup(sql.FieldEQ(FieldModel, v))
}
// ModelNEQ applies the NEQ predicate on the "model" field.
func ModelNEQ(v string) predicate.ChannelMonitorDailyRollup {
return predicate.ChannelMonitorDailyRollup(sql.FieldNEQ(FieldModel, v))
}
// ModelIn applies the In predicate on the "model" field.
func ModelIn(vs ...string) predicate.ChannelMonitorDailyRollup {
return predicate.ChannelMonitorDailyRollup(sql.FieldIn(FieldModel, vs...))
}
// ModelNotIn applies the NotIn predicate on the "model" field.
func ModelNotIn(vs ...string) predicate.ChannelMonitorDailyRollup {
return predicate.ChannelMonitorDailyRollup(sql.FieldNotIn(FieldModel, vs...))
}
// ModelGT applies the GT predicate on the "model" field.
func ModelGT(v string) predicate.ChannelMonitorDailyRollup {
return predicate.ChannelMonitorDailyRollup(sql.FieldGT(FieldModel, v))
}
// ModelGTE applies the GTE predicate on the "model" field.
func ModelGTE(v string) predicate.ChannelMonitorDailyRollup {
return predicate.ChannelMonitorDailyRollup(sql.FieldGTE(FieldModel, v))
}
// ModelLT applies the LT predicate on the "model" field.
func ModelLT(v string) predicate.ChannelMonitorDailyRollup {
return predicate.ChannelMonitorDailyRollup(sql.FieldLT(FieldModel, v))
}
// ModelLTE applies the LTE predicate on the "model" field.
func ModelLTE(v string) predicate.ChannelMonitorDailyRollup {
return predicate.ChannelMonitorDailyRollup(sql.FieldLTE(FieldModel, v))
}
// ModelContains applies the Contains predicate on the "model" field.
func ModelContains(v string) predicate.ChannelMonitorDailyRollup {
return predicate.ChannelMonitorDailyRollup(sql.FieldContains(FieldModel, v))
}
// ModelHasPrefix applies the HasPrefix predicate on the "model" field.
func ModelHasPrefix(v string) predicate.ChannelMonitorDailyRollup {
return predicate.ChannelMonitorDailyRollup(sql.FieldHasPrefix(FieldModel, v))
}
// ModelHasSuffix applies the HasSuffix predicate on the "model" field.
func ModelHasSuffix(v string) predicate.ChannelMonitorDailyRollup {
return predicate.ChannelMonitorDailyRollup(sql.FieldHasSuffix(FieldModel, v))
}
// ModelEqualFold applies the EqualFold predicate on the "model" field.
func ModelEqualFold(v string) predicate.ChannelMonitorDailyRollup {
return predicate.ChannelMonitorDailyRollup(sql.FieldEqualFold(FieldModel, v))
}
// ModelContainsFold applies the ContainsFold predicate on the "model" field.
func ModelContainsFold(v string) predicate.ChannelMonitorDailyRollup {
return predicate.ChannelMonitorDailyRollup(sql.FieldContainsFold(FieldModel, v))
}
// BucketDateEQ applies the EQ predicate on the "bucket_date" field.
func BucketDateEQ(v time.Time) predicate.ChannelMonitorDailyRollup {
return predicate.ChannelMonitorDailyRollup(sql.FieldEQ(FieldBucketDate, v))
}
// BucketDateNEQ applies the NEQ predicate on the "bucket_date" field.
func BucketDateNEQ(v time.Time) predicate.ChannelMonitorDailyRollup {
return predicate.ChannelMonitorDailyRollup(sql.FieldNEQ(FieldBucketDate, v))
}
// BucketDateIn applies the In predicate on the "bucket_date" field.
func BucketDateIn(vs ...time.Time) predicate.ChannelMonitorDailyRollup {
return predicate.ChannelMonitorDailyRollup(sql.FieldIn(FieldBucketDate, vs...))
}
// BucketDateNotIn applies the NotIn predicate on the "bucket_date" field.
func BucketDateNotIn(vs ...time.Time) predicate.ChannelMonitorDailyRollup {
return predicate.ChannelMonitorDailyRollup(sql.FieldNotIn(FieldBucketDate, vs...))
}
// BucketDateGT applies the GT predicate on the "bucket_date" field.
func BucketDateGT(v time.Time) predicate.ChannelMonitorDailyRollup {
return predicate.ChannelMonitorDailyRollup(sql.FieldGT(FieldBucketDate, v))
}
// BucketDateGTE applies the GTE predicate on the "bucket_date" field.
func BucketDateGTE(v time.Time) predicate.ChannelMonitorDailyRollup {
return predicate.ChannelMonitorDailyRollup(sql.FieldGTE(FieldBucketDate, v))
}
// BucketDateLT applies the LT predicate on the "bucket_date" field.
func BucketDateLT(v time.Time) predicate.ChannelMonitorDailyRollup {
return predicate.ChannelMonitorDailyRollup(sql.FieldLT(FieldBucketDate, v))
}
// BucketDateLTE applies the LTE predicate on the "bucket_date" field.
func BucketDateLTE(v time.Time) predicate.ChannelMonitorDailyRollup {
return predicate.ChannelMonitorDailyRollup(sql.FieldLTE(FieldBucketDate, v))
}
// TotalChecksEQ applies the EQ predicate on the "total_checks" field.
func TotalChecksEQ(v int) predicate.ChannelMonitorDailyRollup {
return predicate.ChannelMonitorDailyRollup(sql.FieldEQ(FieldTotalChecks, v))
}
// TotalChecksNEQ applies the NEQ predicate on the "total_checks" field.
func TotalChecksNEQ(v int) predicate.ChannelMonitorDailyRollup {
return predicate.ChannelMonitorDailyRollup(sql.FieldNEQ(FieldTotalChecks, v))
}
// TotalChecksIn applies the In predicate on the "total_checks" field.
func TotalChecksIn(vs ...int) predicate.ChannelMonitorDailyRollup {
return predicate.ChannelMonitorDailyRollup(sql.FieldIn(FieldTotalChecks, vs...))
}
// TotalChecksNotIn applies the NotIn predicate on the "total_checks" field.
func TotalChecksNotIn(vs ...int) predicate.ChannelMonitorDailyRollup {
return predicate.ChannelMonitorDailyRollup(sql.FieldNotIn(FieldTotalChecks, vs...))
}
// TotalChecksGT applies the GT predicate on the "total_checks" field.
func TotalChecksGT(v int) predicate.ChannelMonitorDailyRollup {
return predicate.ChannelMonitorDailyRollup(sql.FieldGT(FieldTotalChecks, v))
}
// TotalChecksGTE applies the GTE predicate on the "total_checks" field.
func TotalChecksGTE(v int) predicate.ChannelMonitorDailyRollup {
return predicate.ChannelMonitorDailyRollup(sql.FieldGTE(FieldTotalChecks, v))
}
// TotalChecksLT applies the LT predicate on the "total_checks" field.
func TotalChecksLT(v int) predicate.ChannelMonitorDailyRollup {
return predicate.ChannelMonitorDailyRollup(sql.FieldLT(FieldTotalChecks, v))
}
// TotalChecksLTE applies the LTE predicate on the "total_checks" field.
func TotalChecksLTE(v int) predicate.ChannelMonitorDailyRollup {
return predicate.ChannelMonitorDailyRollup(sql.FieldLTE(FieldTotalChecks, v))
}
// OkCountEQ applies the EQ predicate on the "ok_count" field.
func OkCountEQ(v int) predicate.ChannelMonitorDailyRollup {
return predicate.ChannelMonitorDailyRollup(sql.FieldEQ(FieldOkCount, v))
}
// OkCountNEQ applies the NEQ predicate on the "ok_count" field.
func OkCountNEQ(v int) predicate.ChannelMonitorDailyRollup {
return predicate.ChannelMonitorDailyRollup(sql.FieldNEQ(FieldOkCount, v))
}
// OkCountIn applies the In predicate on the "ok_count" field.
func OkCountIn(vs ...int) predicate.ChannelMonitorDailyRollup {
return predicate.ChannelMonitorDailyRollup(sql.FieldIn(FieldOkCount, vs...))
}
// OkCountNotIn applies the NotIn predicate on the "ok_count" field.
func OkCountNotIn(vs ...int) predicate.ChannelMonitorDailyRollup {
return predicate.ChannelMonitorDailyRollup(sql.FieldNotIn(FieldOkCount, vs...))
}
// OkCountGT applies the GT predicate on the "ok_count" field.
func OkCountGT(v int) predicate.ChannelMonitorDailyRollup {
return predicate.ChannelMonitorDailyRollup(sql.FieldGT(FieldOkCount, v))
}
// OkCountGTE applies the GTE predicate on the "ok_count" field.
func OkCountGTE(v int) predicate.ChannelMonitorDailyRollup {
return predicate.ChannelMonitorDailyRollup(sql.FieldGTE(FieldOkCount, v))
}
// OkCountLT applies the LT predicate on the "ok_count" field.
func OkCountLT(v int) predicate.ChannelMonitorDailyRollup {
return predicate.ChannelMonitorDailyRollup(sql.FieldLT(FieldOkCount, v))
}
// OkCountLTE applies the LTE predicate on the "ok_count" field.
func OkCountLTE(v int) predicate.ChannelMonitorDailyRollup {
return predicate.ChannelMonitorDailyRollup(sql.FieldLTE(FieldOkCount, v))
}
// OperationalCountEQ applies the EQ predicate on the "operational_count" field.
func OperationalCountEQ(v int) predicate.ChannelMonitorDailyRollup {
return predicate.ChannelMonitorDailyRollup(sql.FieldEQ(FieldOperationalCount, v))
}
// OperationalCountNEQ applies the NEQ predicate on the "operational_count" field.
func OperationalCountNEQ(v int) predicate.ChannelMonitorDailyRollup {
return predicate.ChannelMonitorDailyRollup(sql.FieldNEQ(FieldOperationalCount, v))
}
// OperationalCountIn applies the In predicate on the "operational_count" field.
func OperationalCountIn(vs ...int) predicate.ChannelMonitorDailyRollup {
return predicate.ChannelMonitorDailyRollup(sql.FieldIn(FieldOperationalCount, vs...))
}
// OperationalCountNotIn applies the NotIn predicate on the "operational_count" field.
func OperationalCountNotIn(vs ...int) predicate.ChannelMonitorDailyRollup {
return predicate.ChannelMonitorDailyRollup(sql.FieldNotIn(FieldOperationalCount, vs...))
}
// OperationalCountGT applies the GT predicate on the "operational_count" field.
func OperationalCountGT(v int) predicate.ChannelMonitorDailyRollup {
return predicate.ChannelMonitorDailyRollup(sql.FieldGT(FieldOperationalCount, v))
}
// OperationalCountGTE applies the GTE predicate on the "operational_count" field.
func OperationalCountGTE(v int) predicate.ChannelMonitorDailyRollup {
return predicate.ChannelMonitorDailyRollup(sql.FieldGTE(FieldOperationalCount, v))
}
// OperationalCountLT applies the LT predicate on the "operational_count" field.
func OperationalCountLT(v int) predicate.ChannelMonitorDailyRollup {
return predicate.ChannelMonitorDailyRollup(sql.FieldLT(FieldOperationalCount, v))
}
// OperationalCountLTE applies the LTE predicate on the "operational_count" field.
func OperationalCountLTE(v int) predicate.ChannelMonitorDailyRollup {
return predicate.ChannelMonitorDailyRollup(sql.FieldLTE(FieldOperationalCount, v))
}
// DegradedCountEQ applies the EQ predicate on the "degraded_count" field.
func DegradedCountEQ(v int) predicate.ChannelMonitorDailyRollup {
return predicate.ChannelMonitorDailyRollup(sql.FieldEQ(FieldDegradedCount, v))
}
// DegradedCountNEQ applies the NEQ predicate on the "degraded_count" field.
func DegradedCountNEQ(v int) predicate.ChannelMonitorDailyRollup {
return predicate.ChannelMonitorDailyRollup(sql.FieldNEQ(FieldDegradedCount, v))
}
// DegradedCountIn applies the In predicate on the "degraded_count" field.
func DegradedCountIn(vs ...int) predicate.ChannelMonitorDailyRollup {
return predicate.ChannelMonitorDailyRollup(sql.FieldIn(FieldDegradedCount, vs...))
}
// DegradedCountNotIn applies the NotIn predicate on the "degraded_count" field.
func DegradedCountNotIn(vs ...int) predicate.ChannelMonitorDailyRollup {
return predicate.ChannelMonitorDailyRollup(sql.FieldNotIn(FieldDegradedCount, vs...))
}
// DegradedCountGT applies the GT predicate on the "degraded_count" field.
func DegradedCountGT(v int) predicate.ChannelMonitorDailyRollup {
return predicate.ChannelMonitorDailyRollup(sql.FieldGT(FieldDegradedCount, v))
}
// DegradedCountGTE applies the GTE predicate on the "degraded_count" field.
func DegradedCountGTE(v int) predicate.ChannelMonitorDailyRollup {
return predicate.ChannelMonitorDailyRollup(sql.FieldGTE(FieldDegradedCount, v))
}
// DegradedCountLT applies the LT predicate on the "degraded_count" field.
func DegradedCountLT(v int) predicate.ChannelMonitorDailyRollup {
return predicate.ChannelMonitorDailyRollup(sql.FieldLT(FieldDegradedCount, v))
}
// DegradedCountLTE applies the LTE predicate on the "degraded_count" field.
func DegradedCountLTE(v int) predicate.ChannelMonitorDailyRollup {
return predicate.ChannelMonitorDailyRollup(sql.FieldLTE(FieldDegradedCount, v))
}
// FailedCountEQ applies the EQ predicate on the "failed_count" field.
func FailedCountEQ(v int) predicate.ChannelMonitorDailyRollup {
return predicate.ChannelMonitorDailyRollup(sql.FieldEQ(FieldFailedCount, v))
}
// FailedCountNEQ applies the NEQ predicate on the "failed_count" field.
func FailedCountNEQ(v int) predicate.ChannelMonitorDailyRollup {
return predicate.ChannelMonitorDailyRollup(sql.FieldNEQ(FieldFailedCount, v))
}
// FailedCountIn applies the In predicate on the "failed_count" field.
func FailedCountIn(vs ...int) predicate.ChannelMonitorDailyRollup {
return predicate.ChannelMonitorDailyRollup(sql.FieldIn(FieldFailedCount, vs...))
}
// FailedCountNotIn applies the NotIn predicate on the "failed_count" field.
func FailedCountNotIn(vs ...int) predicate.ChannelMonitorDailyRollup {
return predicate.ChannelMonitorDailyRollup(sql.FieldNotIn(FieldFailedCount, vs...))
}
// FailedCountGT applies the GT predicate on the "failed_count" field.
func FailedCountGT(v int) predicate.ChannelMonitorDailyRollup {
return predicate.ChannelMonitorDailyRollup(sql.FieldGT(FieldFailedCount, v))
}
// FailedCountGTE applies the GTE predicate on the "failed_count" field.
func FailedCountGTE(v int) predicate.ChannelMonitorDailyRollup {
return predicate.ChannelMonitorDailyRollup(sql.FieldGTE(FieldFailedCount, v))
}
// FailedCountLT applies the LT predicate on the "failed_count" field.
func FailedCountLT(v int) predicate.ChannelMonitorDailyRollup {
return predicate.ChannelMonitorDailyRollup(sql.FieldLT(FieldFailedCount, v))
}
// FailedCountLTE applies the LTE predicate on the "failed_count" field.
func FailedCountLTE(v int) predicate.ChannelMonitorDailyRollup {
return predicate.ChannelMonitorDailyRollup(sql.FieldLTE(FieldFailedCount, v))
}
// ErrorCountEQ applies the EQ predicate on the "error_count" field.
func ErrorCountEQ(v int) predicate.ChannelMonitorDailyRollup {
return predicate.ChannelMonitorDailyRollup(sql.FieldEQ(FieldErrorCount, v))
}
// ErrorCountNEQ applies the NEQ predicate on the "error_count" field.
func ErrorCountNEQ(v int) predicate.ChannelMonitorDailyRollup {
return predicate.ChannelMonitorDailyRollup(sql.FieldNEQ(FieldErrorCount, v))
}
// ErrorCountIn applies the In predicate on the "error_count" field.
func ErrorCountIn(vs ...int) predicate.ChannelMonitorDailyRollup {
return predicate.ChannelMonitorDailyRollup(sql.FieldIn(FieldErrorCount, vs...))
}
// ErrorCountNotIn applies the NotIn predicate on the "error_count" field.
func ErrorCountNotIn(vs ...int) predicate.ChannelMonitorDailyRollup {
return predicate.ChannelMonitorDailyRollup(sql.FieldNotIn(FieldErrorCount, vs...))
}
// ErrorCountGT applies the GT predicate on the "error_count" field.
func ErrorCountGT(v int) predicate.ChannelMonitorDailyRollup {
return predicate.ChannelMonitorDailyRollup(sql.FieldGT(FieldErrorCount, v))
}
// ErrorCountGTE applies the GTE predicate on the "error_count" field.
func ErrorCountGTE(v int) predicate.ChannelMonitorDailyRollup {
return predicate.ChannelMonitorDailyRollup(sql.FieldGTE(FieldErrorCount, v))
}
// ErrorCountLT applies the LT predicate on the "error_count" field.
func ErrorCountLT(v int) predicate.ChannelMonitorDailyRollup {
return predicate.ChannelMonitorDailyRollup(sql.FieldLT(FieldErrorCount, v))
}
// ErrorCountLTE applies the LTE predicate on the "error_count" field.
func ErrorCountLTE(v int) predicate.ChannelMonitorDailyRollup {
return predicate.ChannelMonitorDailyRollup(sql.FieldLTE(FieldErrorCount, v))
}
// SumLatencyMsEQ applies the EQ predicate on the "sum_latency_ms" field.
func SumLatencyMsEQ(v int64) predicate.ChannelMonitorDailyRollup {
return predicate.ChannelMonitorDailyRollup(sql.FieldEQ(FieldSumLatencyMs, v))
}
// SumLatencyMsNEQ applies the NEQ predicate on the "sum_latency_ms" field.
func SumLatencyMsNEQ(v int64) predicate.ChannelMonitorDailyRollup {
return predicate.ChannelMonitorDailyRollup(sql.FieldNEQ(FieldSumLatencyMs, v))
}
// SumLatencyMsIn applies the In predicate on the "sum_latency_ms" field.
func SumLatencyMsIn(vs ...int64) predicate.ChannelMonitorDailyRollup {
return predicate.ChannelMonitorDailyRollup(sql.FieldIn(FieldSumLatencyMs, vs...))
}
// SumLatencyMsNotIn applies the NotIn predicate on the "sum_latency_ms" field.
func SumLatencyMsNotIn(vs ...int64) predicate.ChannelMonitorDailyRollup {
return predicate.ChannelMonitorDailyRollup(sql.FieldNotIn(FieldSumLatencyMs, vs...))
}
// SumLatencyMsGT applies the GT predicate on the "sum_latency_ms" field.
func SumLatencyMsGT(v int64) predicate.ChannelMonitorDailyRollup {
return predicate.ChannelMonitorDailyRollup(sql.FieldGT(FieldSumLatencyMs, v))
}
// SumLatencyMsGTE applies the GTE predicate on the "sum_latency_ms" field.
func SumLatencyMsGTE(v int64) predicate.ChannelMonitorDailyRollup {
return predicate.ChannelMonitorDailyRollup(sql.FieldGTE(FieldSumLatencyMs, v))
}
// SumLatencyMsLT applies the LT predicate on the "sum_latency_ms" field.
func SumLatencyMsLT(v int64) predicate.ChannelMonitorDailyRollup {
return predicate.ChannelMonitorDailyRollup(sql.FieldLT(FieldSumLatencyMs, v))
}
// SumLatencyMsLTE applies the LTE predicate on the "sum_latency_ms" field.
func SumLatencyMsLTE(v int64) predicate.ChannelMonitorDailyRollup {
return predicate.ChannelMonitorDailyRollup(sql.FieldLTE(FieldSumLatencyMs, v))
}
// CountLatencyEQ applies the EQ predicate on the "count_latency" field.
func CountLatencyEQ(v int) predicate.ChannelMonitorDailyRollup {
return predicate.ChannelMonitorDailyRollup(sql.FieldEQ(FieldCountLatency, v))
}
// CountLatencyNEQ applies the NEQ predicate on the "count_latency" field.
func CountLatencyNEQ(v int) predicate.ChannelMonitorDailyRollup {
return predicate.ChannelMonitorDailyRollup(sql.FieldNEQ(FieldCountLatency, v))
}
// CountLatencyIn applies the In predicate on the "count_latency" field.
func CountLatencyIn(vs ...int) predicate.ChannelMonitorDailyRollup {
return predicate.ChannelMonitorDailyRollup(sql.FieldIn(FieldCountLatency, vs...))
}
// CountLatencyNotIn applies the NotIn predicate on the "count_latency" field.
func CountLatencyNotIn(vs ...int) predicate.ChannelMonitorDailyRollup {
return predicate.ChannelMonitorDailyRollup(sql.FieldNotIn(FieldCountLatency, vs...))
}
// CountLatencyGT applies the GT predicate on the "count_latency" field.
func CountLatencyGT(v int) predicate.ChannelMonitorDailyRollup {
return predicate.ChannelMonitorDailyRollup(sql.FieldGT(FieldCountLatency, v))
}
// CountLatencyGTE applies the GTE predicate on the "count_latency" field.
func CountLatencyGTE(v int) predicate.ChannelMonitorDailyRollup {
return predicate.ChannelMonitorDailyRollup(sql.FieldGTE(FieldCountLatency, v))
}
// CountLatencyLT applies the LT predicate on the "count_latency" field.
func CountLatencyLT(v int) predicate.ChannelMonitorDailyRollup {
return predicate.ChannelMonitorDailyRollup(sql.FieldLT(FieldCountLatency, v))
}
// CountLatencyLTE applies the LTE predicate on the "count_latency" field.
func CountLatencyLTE(v int) predicate.ChannelMonitorDailyRollup {
return predicate.ChannelMonitorDailyRollup(sql.FieldLTE(FieldCountLatency, v))
}
// SumPingLatencyMsEQ applies the EQ predicate on the "sum_ping_latency_ms" field.
func SumPingLatencyMsEQ(v int64) predicate.ChannelMonitorDailyRollup {
return predicate.ChannelMonitorDailyRollup(sql.FieldEQ(FieldSumPingLatencyMs, v))
}
// SumPingLatencyMsNEQ applies the NEQ predicate on the "sum_ping_latency_ms" field.
func SumPingLatencyMsNEQ(v int64) predicate.ChannelMonitorDailyRollup {
return predicate.ChannelMonitorDailyRollup(sql.FieldNEQ(FieldSumPingLatencyMs, v))
}
// SumPingLatencyMsIn applies the In predicate on the "sum_ping_latency_ms" field.
func SumPingLatencyMsIn(vs ...int64) predicate.ChannelMonitorDailyRollup {
return predicate.ChannelMonitorDailyRollup(sql.FieldIn(FieldSumPingLatencyMs, vs...))
}
// SumPingLatencyMsNotIn applies the NotIn predicate on the "sum_ping_latency_ms" field.
func SumPingLatencyMsNotIn(vs ...int64) predicate.ChannelMonitorDailyRollup {
return predicate.ChannelMonitorDailyRollup(sql.FieldNotIn(FieldSumPingLatencyMs, vs...))
}
// SumPingLatencyMsGT applies the GT predicate on the "sum_ping_latency_ms" field.
func SumPingLatencyMsGT(v int64) predicate.ChannelMonitorDailyRollup {
return predicate.ChannelMonitorDailyRollup(sql.FieldGT(FieldSumPingLatencyMs, v))
}
// SumPingLatencyMsGTE applies the GTE predicate on the "sum_ping_latency_ms" field.
func SumPingLatencyMsGTE(v int64) predicate.ChannelMonitorDailyRollup {
return predicate.ChannelMonitorDailyRollup(sql.FieldGTE(FieldSumPingLatencyMs, v))
}
// SumPingLatencyMsLT applies the LT predicate on the "sum_ping_latency_ms" field.
func SumPingLatencyMsLT(v int64) predicate.ChannelMonitorDailyRollup {
return predicate.ChannelMonitorDailyRollup(sql.FieldLT(FieldSumPingLatencyMs, v))
}
// SumPingLatencyMsLTE applies the LTE predicate on the "sum_ping_latency_ms" field.
func SumPingLatencyMsLTE(v int64) predicate.ChannelMonitorDailyRollup {
return predicate.ChannelMonitorDailyRollup(sql.FieldLTE(FieldSumPingLatencyMs, v))
}
// CountPingLatencyEQ applies the EQ predicate on the "count_ping_latency" field.
func CountPingLatencyEQ(v int) predicate.ChannelMonitorDailyRollup {
return predicate.ChannelMonitorDailyRollup(sql.FieldEQ(FieldCountPingLatency, v))
}
// CountPingLatencyNEQ applies the NEQ predicate on the "count_ping_latency" field.
func CountPingLatencyNEQ(v int) predicate.ChannelMonitorDailyRollup {
return predicate.ChannelMonitorDailyRollup(sql.FieldNEQ(FieldCountPingLatency, v))
}
// CountPingLatencyIn applies the In predicate on the "count_ping_latency" field.
func CountPingLatencyIn(vs ...int) predicate.ChannelMonitorDailyRollup {
return predicate.ChannelMonitorDailyRollup(sql.FieldIn(FieldCountPingLatency, vs...))
}
// CountPingLatencyNotIn applies the NotIn predicate on the "count_ping_latency" field.
func CountPingLatencyNotIn(vs ...int) predicate.ChannelMonitorDailyRollup {
return predicate.ChannelMonitorDailyRollup(sql.FieldNotIn(FieldCountPingLatency, vs...))
}
// CountPingLatencyGT applies the GT predicate on the "count_ping_latency" field.
func CountPingLatencyGT(v int) predicate.ChannelMonitorDailyRollup {
return predicate.ChannelMonitorDailyRollup(sql.FieldGT(FieldCountPingLatency, v))
}
// CountPingLatencyGTE applies the GTE predicate on the "count_ping_latency" field.
func CountPingLatencyGTE(v int) predicate.ChannelMonitorDailyRollup {
return predicate.ChannelMonitorDailyRollup(sql.FieldGTE(FieldCountPingLatency, v))
}
// CountPingLatencyLT applies the LT predicate on the "count_ping_latency" field.
func CountPingLatencyLT(v int) predicate.ChannelMonitorDailyRollup {
return predicate.ChannelMonitorDailyRollup(sql.FieldLT(FieldCountPingLatency, v))
}
// CountPingLatencyLTE applies the LTE predicate on the "count_ping_latency" field.
func CountPingLatencyLTE(v int) predicate.ChannelMonitorDailyRollup {
return predicate.ChannelMonitorDailyRollup(sql.FieldLTE(FieldCountPingLatency, v))
}
// ComputedAtEQ applies the EQ predicate on the "computed_at" field.
func ComputedAtEQ(v time.Time) predicate.ChannelMonitorDailyRollup {
return predicate.ChannelMonitorDailyRollup(sql.FieldEQ(FieldComputedAt, v))
}
// ComputedAtNEQ applies the NEQ predicate on the "computed_at" field.
func ComputedAtNEQ(v time.Time) predicate.ChannelMonitorDailyRollup {
return predicate.ChannelMonitorDailyRollup(sql.FieldNEQ(FieldComputedAt, v))
}
// ComputedAtIn applies the In predicate on the "computed_at" field.
func ComputedAtIn(vs ...time.Time) predicate.ChannelMonitorDailyRollup {
return predicate.ChannelMonitorDailyRollup(sql.FieldIn(FieldComputedAt, vs...))
}
// ComputedAtNotIn applies the NotIn predicate on the "computed_at" field.
func ComputedAtNotIn(vs ...time.Time) predicate.ChannelMonitorDailyRollup {
return predicate.ChannelMonitorDailyRollup(sql.FieldNotIn(FieldComputedAt, vs...))
}
// ComputedAtGT applies the GT predicate on the "computed_at" field.
func ComputedAtGT(v time.Time) predicate.ChannelMonitorDailyRollup {
return predicate.ChannelMonitorDailyRollup(sql.FieldGT(FieldComputedAt, v))
}
// ComputedAtGTE applies the GTE predicate on the "computed_at" field.
func ComputedAtGTE(v time.Time) predicate.ChannelMonitorDailyRollup {
return predicate.ChannelMonitorDailyRollup(sql.FieldGTE(FieldComputedAt, v))
}
// ComputedAtLT applies the LT predicate on the "computed_at" field.
func ComputedAtLT(v time.Time) predicate.ChannelMonitorDailyRollup {
return predicate.ChannelMonitorDailyRollup(sql.FieldLT(FieldComputedAt, v))
}
// ComputedAtLTE applies the LTE predicate on the "computed_at" field.
func ComputedAtLTE(v time.Time) predicate.ChannelMonitorDailyRollup {
return predicate.ChannelMonitorDailyRollup(sql.FieldLTE(FieldComputedAt, v))
}
// HasMonitor applies the HasEdge predicate on the "monitor" edge.
func HasMonitor() predicate.ChannelMonitorDailyRollup {
return predicate.ChannelMonitorDailyRollup(func(s *sql.Selector) {
step := sqlgraph.NewStep(
sqlgraph.From(Table, FieldID),
sqlgraph.Edge(sqlgraph.M2O, true, MonitorTable, MonitorColumn),
)
sqlgraph.HasNeighbors(s, step)
})
}
// HasMonitorWith applies the HasEdge predicate on the "monitor" edge with a given conditions (other predicates).
func HasMonitorWith(preds ...predicate.ChannelMonitor) predicate.ChannelMonitorDailyRollup {
return predicate.ChannelMonitorDailyRollup(func(s *sql.Selector) {
step := newMonitorStep()
sqlgraph.HasNeighborsWith(s, step, func(s *sql.Selector) {
for _, p := range preds {
p(s)
}
})
})
}
// And groups predicates with the AND operator between them.
func And(predicates ...predicate.ChannelMonitorDailyRollup) predicate.ChannelMonitorDailyRollup {
return predicate.ChannelMonitorDailyRollup(sql.AndPredicates(predicates...))
}
// Or groups predicates with the OR operator between them.
func Or(predicates ...predicate.ChannelMonitorDailyRollup) predicate.ChannelMonitorDailyRollup {
return predicate.ChannelMonitorDailyRollup(sql.OrPredicates(predicates...))
}
// Not applies the not operator on the given predicate.
func Not(p predicate.ChannelMonitorDailyRollup) predicate.ChannelMonitorDailyRollup {
return predicate.ChannelMonitorDailyRollup(sql.NotPredicates(p))
}