docs: 统一修正全项目“SN管理”相关术语为“序列号”
本次 commit 统一修正了全项目范围内关于 SN 管理的术语表述,将原“SN管理”、“序列号件”、“批次件”等表述调整为“序列号”、“序列号=是”、“序列号=否”,同时同步更新了相关文档、代码注释、前端提示文本、数据库 schema 注释、API 文档等,确保全链路术语统一,消除理解歧义。
This commit is contained in:
@@ -19,10 +19,10 @@ const (
|
||||
FieldType = "type"
|
||||
// FieldThreshold holds the string denoting the threshold field in the database.
|
||||
FieldThreshold = "threshold"
|
||||
// FieldReceiver holds the string denoting the receiver field in the database.
|
||||
FieldReceiver = "receiver"
|
||||
// FieldEnabled holds the string denoting the enabled field in the database.
|
||||
FieldEnabled = "enabled"
|
||||
// FieldNotifyChannels holds the string denoting the notifychannels field in the database.
|
||||
FieldNotifyChannels = "notify_channels"
|
||||
// FieldCreatedBy holds the string denoting the createdby field in the database.
|
||||
FieldCreatedBy = "created_by"
|
||||
// FieldCreatedAt holds the string denoting the createdat field in the database.
|
||||
@@ -37,8 +37,8 @@ var Columns = []string{
|
||||
FieldName,
|
||||
FieldType,
|
||||
FieldThreshold,
|
||||
FieldReceiver,
|
||||
FieldEnabled,
|
||||
FieldNotifyChannels,
|
||||
FieldCreatedBy,
|
||||
FieldCreatedAt,
|
||||
}
|
||||
@@ -60,12 +60,12 @@ var (
|
||||
TypeValidator func(string) error
|
||||
// DefaultThreshold holds the default value on creation for the "threshold" field.
|
||||
DefaultThreshold float64
|
||||
// DefaultReceiver holds the default value on creation for the "receiver" field.
|
||||
DefaultReceiver string
|
||||
// ReceiverValidator is a validator for the "receiver" field. It is called by the builders before save.
|
||||
ReceiverValidator func(string) error
|
||||
// DefaultEnabled holds the default value on creation for the "enabled" field.
|
||||
DefaultEnabled bool
|
||||
// DefaultNotifyChannels holds the default value on creation for the "notifyChannels" field.
|
||||
DefaultNotifyChannels string
|
||||
// NotifyChannelsValidator is a validator for the "notifyChannels" field. It is called by the builders before save.
|
||||
NotifyChannelsValidator func(string) error
|
||||
// DefaultCreatedBy holds the default value on creation for the "createdBy" field.
|
||||
DefaultCreatedBy string
|
||||
// CreatedByValidator is a validator for the "createdBy" field. It is called by the builders before save.
|
||||
@@ -99,16 +99,16 @@ func ByThreshold(opts ...sql.OrderTermOption) OrderOption {
|
||||
return sql.OrderByField(FieldThreshold, opts...).ToFunc()
|
||||
}
|
||||
|
||||
// ByReceiver orders the results by the receiver field.
|
||||
func ByReceiver(opts ...sql.OrderTermOption) OrderOption {
|
||||
return sql.OrderByField(FieldReceiver, opts...).ToFunc()
|
||||
}
|
||||
|
||||
// ByEnabled orders the results by the enabled field.
|
||||
func ByEnabled(opts ...sql.OrderTermOption) OrderOption {
|
||||
return sql.OrderByField(FieldEnabled, opts...).ToFunc()
|
||||
}
|
||||
|
||||
// ByNotifyChannels orders the results by the notifyChannels field.
|
||||
func ByNotifyChannels(opts ...sql.OrderTermOption) OrderOption {
|
||||
return sql.OrderByField(FieldNotifyChannels, opts...).ToFunc()
|
||||
}
|
||||
|
||||
// ByCreatedBy orders the results by the createdBy field.
|
||||
func ByCreatedBy(opts ...sql.OrderTermOption) OrderOption {
|
||||
return sql.OrderByField(FieldCreatedBy, opts...).ToFunc()
|
||||
|
||||
@@ -69,16 +69,16 @@ func Threshold(v float64) predicate.AlertRule {
|
||||
return predicate.AlertRule(sql.FieldEQ(FieldThreshold, v))
|
||||
}
|
||||
|
||||
// Receiver applies equality check predicate on the "receiver" field. It's identical to ReceiverEQ.
|
||||
func Receiver(v string) predicate.AlertRule {
|
||||
return predicate.AlertRule(sql.FieldEQ(FieldReceiver, v))
|
||||
}
|
||||
|
||||
// Enabled applies equality check predicate on the "enabled" field. It's identical to EnabledEQ.
|
||||
func Enabled(v bool) predicate.AlertRule {
|
||||
return predicate.AlertRule(sql.FieldEQ(FieldEnabled, v))
|
||||
}
|
||||
|
||||
// NotifyChannels applies equality check predicate on the "notifyChannels" field. It's identical to NotifyChannelsEQ.
|
||||
func NotifyChannels(v string) predicate.AlertRule {
|
||||
return predicate.AlertRule(sql.FieldEQ(FieldNotifyChannels, v))
|
||||
}
|
||||
|
||||
// CreatedBy applies equality check predicate on the "createdBy" field. It's identical to CreatedByEQ.
|
||||
func CreatedBy(v string) predicate.AlertRule {
|
||||
return predicate.AlertRule(sql.FieldEQ(FieldCreatedBy, v))
|
||||
@@ -259,71 +259,6 @@ func ThresholdLTE(v float64) predicate.AlertRule {
|
||||
return predicate.AlertRule(sql.FieldLTE(FieldThreshold, v))
|
||||
}
|
||||
|
||||
// ReceiverEQ applies the EQ predicate on the "receiver" field.
|
||||
func ReceiverEQ(v string) predicate.AlertRule {
|
||||
return predicate.AlertRule(sql.FieldEQ(FieldReceiver, v))
|
||||
}
|
||||
|
||||
// ReceiverNEQ applies the NEQ predicate on the "receiver" field.
|
||||
func ReceiverNEQ(v string) predicate.AlertRule {
|
||||
return predicate.AlertRule(sql.FieldNEQ(FieldReceiver, v))
|
||||
}
|
||||
|
||||
// ReceiverIn applies the In predicate on the "receiver" field.
|
||||
func ReceiverIn(vs ...string) predicate.AlertRule {
|
||||
return predicate.AlertRule(sql.FieldIn(FieldReceiver, vs...))
|
||||
}
|
||||
|
||||
// ReceiverNotIn applies the NotIn predicate on the "receiver" field.
|
||||
func ReceiverNotIn(vs ...string) predicate.AlertRule {
|
||||
return predicate.AlertRule(sql.FieldNotIn(FieldReceiver, vs...))
|
||||
}
|
||||
|
||||
// ReceiverGT applies the GT predicate on the "receiver" field.
|
||||
func ReceiverGT(v string) predicate.AlertRule {
|
||||
return predicate.AlertRule(sql.FieldGT(FieldReceiver, v))
|
||||
}
|
||||
|
||||
// ReceiverGTE applies the GTE predicate on the "receiver" field.
|
||||
func ReceiverGTE(v string) predicate.AlertRule {
|
||||
return predicate.AlertRule(sql.FieldGTE(FieldReceiver, v))
|
||||
}
|
||||
|
||||
// ReceiverLT applies the LT predicate on the "receiver" field.
|
||||
func ReceiverLT(v string) predicate.AlertRule {
|
||||
return predicate.AlertRule(sql.FieldLT(FieldReceiver, v))
|
||||
}
|
||||
|
||||
// ReceiverLTE applies the LTE predicate on the "receiver" field.
|
||||
func ReceiverLTE(v string) predicate.AlertRule {
|
||||
return predicate.AlertRule(sql.FieldLTE(FieldReceiver, v))
|
||||
}
|
||||
|
||||
// ReceiverContains applies the Contains predicate on the "receiver" field.
|
||||
func ReceiverContains(v string) predicate.AlertRule {
|
||||
return predicate.AlertRule(sql.FieldContains(FieldReceiver, v))
|
||||
}
|
||||
|
||||
// ReceiverHasPrefix applies the HasPrefix predicate on the "receiver" field.
|
||||
func ReceiverHasPrefix(v string) predicate.AlertRule {
|
||||
return predicate.AlertRule(sql.FieldHasPrefix(FieldReceiver, v))
|
||||
}
|
||||
|
||||
// ReceiverHasSuffix applies the HasSuffix predicate on the "receiver" field.
|
||||
func ReceiverHasSuffix(v string) predicate.AlertRule {
|
||||
return predicate.AlertRule(sql.FieldHasSuffix(FieldReceiver, v))
|
||||
}
|
||||
|
||||
// ReceiverEqualFold applies the EqualFold predicate on the "receiver" field.
|
||||
func ReceiverEqualFold(v string) predicate.AlertRule {
|
||||
return predicate.AlertRule(sql.FieldEqualFold(FieldReceiver, v))
|
||||
}
|
||||
|
||||
// ReceiverContainsFold applies the ContainsFold predicate on the "receiver" field.
|
||||
func ReceiverContainsFold(v string) predicate.AlertRule {
|
||||
return predicate.AlertRule(sql.FieldContainsFold(FieldReceiver, v))
|
||||
}
|
||||
|
||||
// EnabledEQ applies the EQ predicate on the "enabled" field.
|
||||
func EnabledEQ(v bool) predicate.AlertRule {
|
||||
return predicate.AlertRule(sql.FieldEQ(FieldEnabled, v))
|
||||
@@ -334,6 +269,71 @@ func EnabledNEQ(v bool) predicate.AlertRule {
|
||||
return predicate.AlertRule(sql.FieldNEQ(FieldEnabled, v))
|
||||
}
|
||||
|
||||
// NotifyChannelsEQ applies the EQ predicate on the "notifyChannels" field.
|
||||
func NotifyChannelsEQ(v string) predicate.AlertRule {
|
||||
return predicate.AlertRule(sql.FieldEQ(FieldNotifyChannels, v))
|
||||
}
|
||||
|
||||
// NotifyChannelsNEQ applies the NEQ predicate on the "notifyChannels" field.
|
||||
func NotifyChannelsNEQ(v string) predicate.AlertRule {
|
||||
return predicate.AlertRule(sql.FieldNEQ(FieldNotifyChannels, v))
|
||||
}
|
||||
|
||||
// NotifyChannelsIn applies the In predicate on the "notifyChannels" field.
|
||||
func NotifyChannelsIn(vs ...string) predicate.AlertRule {
|
||||
return predicate.AlertRule(sql.FieldIn(FieldNotifyChannels, vs...))
|
||||
}
|
||||
|
||||
// NotifyChannelsNotIn applies the NotIn predicate on the "notifyChannels" field.
|
||||
func NotifyChannelsNotIn(vs ...string) predicate.AlertRule {
|
||||
return predicate.AlertRule(sql.FieldNotIn(FieldNotifyChannels, vs...))
|
||||
}
|
||||
|
||||
// NotifyChannelsGT applies the GT predicate on the "notifyChannels" field.
|
||||
func NotifyChannelsGT(v string) predicate.AlertRule {
|
||||
return predicate.AlertRule(sql.FieldGT(FieldNotifyChannels, v))
|
||||
}
|
||||
|
||||
// NotifyChannelsGTE applies the GTE predicate on the "notifyChannels" field.
|
||||
func NotifyChannelsGTE(v string) predicate.AlertRule {
|
||||
return predicate.AlertRule(sql.FieldGTE(FieldNotifyChannels, v))
|
||||
}
|
||||
|
||||
// NotifyChannelsLT applies the LT predicate on the "notifyChannels" field.
|
||||
func NotifyChannelsLT(v string) predicate.AlertRule {
|
||||
return predicate.AlertRule(sql.FieldLT(FieldNotifyChannels, v))
|
||||
}
|
||||
|
||||
// NotifyChannelsLTE applies the LTE predicate on the "notifyChannels" field.
|
||||
func NotifyChannelsLTE(v string) predicate.AlertRule {
|
||||
return predicate.AlertRule(sql.FieldLTE(FieldNotifyChannels, v))
|
||||
}
|
||||
|
||||
// NotifyChannelsContains applies the Contains predicate on the "notifyChannels" field.
|
||||
func NotifyChannelsContains(v string) predicate.AlertRule {
|
||||
return predicate.AlertRule(sql.FieldContains(FieldNotifyChannels, v))
|
||||
}
|
||||
|
||||
// NotifyChannelsHasPrefix applies the HasPrefix predicate on the "notifyChannels" field.
|
||||
func NotifyChannelsHasPrefix(v string) predicate.AlertRule {
|
||||
return predicate.AlertRule(sql.FieldHasPrefix(FieldNotifyChannels, v))
|
||||
}
|
||||
|
||||
// NotifyChannelsHasSuffix applies the HasSuffix predicate on the "notifyChannels" field.
|
||||
func NotifyChannelsHasSuffix(v string) predicate.AlertRule {
|
||||
return predicate.AlertRule(sql.FieldHasSuffix(FieldNotifyChannels, v))
|
||||
}
|
||||
|
||||
// NotifyChannelsEqualFold applies the EqualFold predicate on the "notifyChannels" field.
|
||||
func NotifyChannelsEqualFold(v string) predicate.AlertRule {
|
||||
return predicate.AlertRule(sql.FieldEqualFold(FieldNotifyChannels, v))
|
||||
}
|
||||
|
||||
// NotifyChannelsContainsFold applies the ContainsFold predicate on the "notifyChannels" field.
|
||||
func NotifyChannelsContainsFold(v string) predicate.AlertRule {
|
||||
return predicate.AlertRule(sql.FieldContainsFold(FieldNotifyChannels, v))
|
||||
}
|
||||
|
||||
// CreatedByEQ applies the EQ predicate on the "createdBy" field.
|
||||
func CreatedByEQ(v string) predicate.AlertRule {
|
||||
return predicate.AlertRule(sql.FieldEQ(FieldCreatedBy, v))
|
||||
|
||||
Reference in New Issue
Block a user