docs: 统一修正全项目“SN管理”相关术语为“序列号”
本次 commit 统一修正了全项目范围内关于 SN 管理的术语表述,将原“SN管理”、“序列号件”、“批次件”等表述调整为“序列号”、“序列号=是”、“序列号=否”,同时同步更新了相关文档、代码注释、前端提示文本、数据库 schema 注释、API 文档等,确保全链路术语统一,消除理解歧义。
This commit is contained in:
@@ -17,6 +17,10 @@ const (
|
||||
FieldRuleId = "rule_id"
|
||||
// FieldType holds the string denoting the type field in the database.
|
||||
FieldType = "type"
|
||||
// FieldLevel holds the string denoting the level field in the database.
|
||||
FieldLevel = "level"
|
||||
// FieldTarget holds the string denoting the target field in the database.
|
||||
FieldTarget = "target"
|
||||
// FieldTitle holds the string denoting the title field in the database.
|
||||
FieldTitle = "title"
|
||||
// FieldContent holds the string denoting the content field in the database.
|
||||
@@ -31,6 +35,10 @@ const (
|
||||
FieldStatus = "status"
|
||||
// FieldReceiver holds the string denoting the receiver field in the database.
|
||||
FieldReceiver = "receiver"
|
||||
// FieldResolvedAt holds the string denoting the resolvedat field in the database.
|
||||
FieldResolvedAt = "resolved_at"
|
||||
// FieldResolvedBy holds the string denoting the resolvedby field in the database.
|
||||
FieldResolvedBy = "resolved_by"
|
||||
// FieldCreatedAt holds the string denoting the createdat field in the database.
|
||||
FieldCreatedAt = "created_at"
|
||||
// Table holds the table name of the alert in the database.
|
||||
@@ -42,6 +50,8 @@ var Columns = []string{
|
||||
FieldID,
|
||||
FieldRuleId,
|
||||
FieldType,
|
||||
FieldLevel,
|
||||
FieldTarget,
|
||||
FieldTitle,
|
||||
FieldContent,
|
||||
FieldRefType,
|
||||
@@ -49,6 +59,8 @@ var Columns = []string{
|
||||
FieldOrderNo,
|
||||
FieldStatus,
|
||||
FieldReceiver,
|
||||
FieldResolvedAt,
|
||||
FieldResolvedBy,
|
||||
FieldCreatedAt,
|
||||
}
|
||||
|
||||
@@ -67,6 +79,14 @@ var (
|
||||
DefaultRuleId int
|
||||
// TypeValidator is a validator for the "type" field. It is called by the builders before save.
|
||||
TypeValidator func(string) error
|
||||
// DefaultLevel holds the default value on creation for the "level" field.
|
||||
DefaultLevel string
|
||||
// LevelValidator is a validator for the "level" field. It is called by the builders before save.
|
||||
LevelValidator func(string) error
|
||||
// DefaultTarget holds the default value on creation for the "target" field.
|
||||
DefaultTarget string
|
||||
// TargetValidator is a validator for the "target" field. It is called by the builders before save.
|
||||
TargetValidator func(string) error
|
||||
// TitleValidator is a validator for the "title" field. It is called by the builders before save.
|
||||
TitleValidator func(string) error
|
||||
// DefaultContent holds the default value on creation for the "content" field.
|
||||
@@ -93,6 +113,10 @@ var (
|
||||
DefaultReceiver string
|
||||
// ReceiverValidator is a validator for the "receiver" field. It is called by the builders before save.
|
||||
ReceiverValidator func(string) error
|
||||
// DefaultResolvedBy holds the default value on creation for the "resolvedBy" field.
|
||||
DefaultResolvedBy string
|
||||
// ResolvedByValidator is a validator for the "resolvedBy" field. It is called by the builders before save.
|
||||
ResolvedByValidator func(string) error
|
||||
// DefaultCreatedAt holds the default value on creation for the "createdAt" field.
|
||||
DefaultCreatedAt func() time.Time
|
||||
// IDValidator is a validator for the "id" field. It is called by the builders before save.
|
||||
@@ -117,6 +141,16 @@ func ByType(opts ...sql.OrderTermOption) OrderOption {
|
||||
return sql.OrderByField(FieldType, opts...).ToFunc()
|
||||
}
|
||||
|
||||
// ByLevel orders the results by the level field.
|
||||
func ByLevel(opts ...sql.OrderTermOption) OrderOption {
|
||||
return sql.OrderByField(FieldLevel, opts...).ToFunc()
|
||||
}
|
||||
|
||||
// ByTarget orders the results by the target field.
|
||||
func ByTarget(opts ...sql.OrderTermOption) OrderOption {
|
||||
return sql.OrderByField(FieldTarget, opts...).ToFunc()
|
||||
}
|
||||
|
||||
// ByTitle orders the results by the title field.
|
||||
func ByTitle(opts ...sql.OrderTermOption) OrderOption {
|
||||
return sql.OrderByField(FieldTitle, opts...).ToFunc()
|
||||
@@ -152,6 +186,16 @@ func ByReceiver(opts ...sql.OrderTermOption) OrderOption {
|
||||
return sql.OrderByField(FieldReceiver, opts...).ToFunc()
|
||||
}
|
||||
|
||||
// ByResolvedAt orders the results by the resolvedAt field.
|
||||
func ByResolvedAt(opts ...sql.OrderTermOption) OrderOption {
|
||||
return sql.OrderByField(FieldResolvedAt, opts...).ToFunc()
|
||||
}
|
||||
|
||||
// ByResolvedBy orders the results by the resolvedBy field.
|
||||
func ByResolvedBy(opts ...sql.OrderTermOption) OrderOption {
|
||||
return sql.OrderByField(FieldResolvedBy, opts...).ToFunc()
|
||||
}
|
||||
|
||||
// ByCreatedAt orders the results by the createdAt field.
|
||||
func ByCreatedAt(opts ...sql.OrderTermOption) OrderOption {
|
||||
return sql.OrderByField(FieldCreatedAt, opts...).ToFunc()
|
||||
|
||||
@@ -64,6 +64,16 @@ func Type(v string) predicate.Alert {
|
||||
return predicate.Alert(sql.FieldEQ(FieldType, v))
|
||||
}
|
||||
|
||||
// Level applies equality check predicate on the "level" field. It's identical to LevelEQ.
|
||||
func Level(v string) predicate.Alert {
|
||||
return predicate.Alert(sql.FieldEQ(FieldLevel, v))
|
||||
}
|
||||
|
||||
// Target applies equality check predicate on the "target" field. It's identical to TargetEQ.
|
||||
func Target(v string) predicate.Alert {
|
||||
return predicate.Alert(sql.FieldEQ(FieldTarget, v))
|
||||
}
|
||||
|
||||
// Title applies equality check predicate on the "title" field. It's identical to TitleEQ.
|
||||
func Title(v string) predicate.Alert {
|
||||
return predicate.Alert(sql.FieldEQ(FieldTitle, v))
|
||||
@@ -99,6 +109,16 @@ func Receiver(v string) predicate.Alert {
|
||||
return predicate.Alert(sql.FieldEQ(FieldReceiver, v))
|
||||
}
|
||||
|
||||
// ResolvedAt applies equality check predicate on the "resolvedAt" field. It's identical to ResolvedAtEQ.
|
||||
func ResolvedAt(v time.Time) predicate.Alert {
|
||||
return predicate.Alert(sql.FieldEQ(FieldResolvedAt, v))
|
||||
}
|
||||
|
||||
// ResolvedBy applies equality check predicate on the "resolvedBy" field. It's identical to ResolvedByEQ.
|
||||
func ResolvedBy(v string) predicate.Alert {
|
||||
return predicate.Alert(sql.FieldEQ(FieldResolvedBy, v))
|
||||
}
|
||||
|
||||
// CreatedAt applies equality check predicate on the "createdAt" field. It's identical to CreatedAtEQ.
|
||||
func CreatedAt(v time.Time) predicate.Alert {
|
||||
return predicate.Alert(sql.FieldEQ(FieldCreatedAt, v))
|
||||
@@ -209,6 +229,136 @@ func TypeContainsFold(v string) predicate.Alert {
|
||||
return predicate.Alert(sql.FieldContainsFold(FieldType, v))
|
||||
}
|
||||
|
||||
// LevelEQ applies the EQ predicate on the "level" field.
|
||||
func LevelEQ(v string) predicate.Alert {
|
||||
return predicate.Alert(sql.FieldEQ(FieldLevel, v))
|
||||
}
|
||||
|
||||
// LevelNEQ applies the NEQ predicate on the "level" field.
|
||||
func LevelNEQ(v string) predicate.Alert {
|
||||
return predicate.Alert(sql.FieldNEQ(FieldLevel, v))
|
||||
}
|
||||
|
||||
// LevelIn applies the In predicate on the "level" field.
|
||||
func LevelIn(vs ...string) predicate.Alert {
|
||||
return predicate.Alert(sql.FieldIn(FieldLevel, vs...))
|
||||
}
|
||||
|
||||
// LevelNotIn applies the NotIn predicate on the "level" field.
|
||||
func LevelNotIn(vs ...string) predicate.Alert {
|
||||
return predicate.Alert(sql.FieldNotIn(FieldLevel, vs...))
|
||||
}
|
||||
|
||||
// LevelGT applies the GT predicate on the "level" field.
|
||||
func LevelGT(v string) predicate.Alert {
|
||||
return predicate.Alert(sql.FieldGT(FieldLevel, v))
|
||||
}
|
||||
|
||||
// LevelGTE applies the GTE predicate on the "level" field.
|
||||
func LevelGTE(v string) predicate.Alert {
|
||||
return predicate.Alert(sql.FieldGTE(FieldLevel, v))
|
||||
}
|
||||
|
||||
// LevelLT applies the LT predicate on the "level" field.
|
||||
func LevelLT(v string) predicate.Alert {
|
||||
return predicate.Alert(sql.FieldLT(FieldLevel, v))
|
||||
}
|
||||
|
||||
// LevelLTE applies the LTE predicate on the "level" field.
|
||||
func LevelLTE(v string) predicate.Alert {
|
||||
return predicate.Alert(sql.FieldLTE(FieldLevel, v))
|
||||
}
|
||||
|
||||
// LevelContains applies the Contains predicate on the "level" field.
|
||||
func LevelContains(v string) predicate.Alert {
|
||||
return predicate.Alert(sql.FieldContains(FieldLevel, v))
|
||||
}
|
||||
|
||||
// LevelHasPrefix applies the HasPrefix predicate on the "level" field.
|
||||
func LevelHasPrefix(v string) predicate.Alert {
|
||||
return predicate.Alert(sql.FieldHasPrefix(FieldLevel, v))
|
||||
}
|
||||
|
||||
// LevelHasSuffix applies the HasSuffix predicate on the "level" field.
|
||||
func LevelHasSuffix(v string) predicate.Alert {
|
||||
return predicate.Alert(sql.FieldHasSuffix(FieldLevel, v))
|
||||
}
|
||||
|
||||
// LevelEqualFold applies the EqualFold predicate on the "level" field.
|
||||
func LevelEqualFold(v string) predicate.Alert {
|
||||
return predicate.Alert(sql.FieldEqualFold(FieldLevel, v))
|
||||
}
|
||||
|
||||
// LevelContainsFold applies the ContainsFold predicate on the "level" field.
|
||||
func LevelContainsFold(v string) predicate.Alert {
|
||||
return predicate.Alert(sql.FieldContainsFold(FieldLevel, v))
|
||||
}
|
||||
|
||||
// TargetEQ applies the EQ predicate on the "target" field.
|
||||
func TargetEQ(v string) predicate.Alert {
|
||||
return predicate.Alert(sql.FieldEQ(FieldTarget, v))
|
||||
}
|
||||
|
||||
// TargetNEQ applies the NEQ predicate on the "target" field.
|
||||
func TargetNEQ(v string) predicate.Alert {
|
||||
return predicate.Alert(sql.FieldNEQ(FieldTarget, v))
|
||||
}
|
||||
|
||||
// TargetIn applies the In predicate on the "target" field.
|
||||
func TargetIn(vs ...string) predicate.Alert {
|
||||
return predicate.Alert(sql.FieldIn(FieldTarget, vs...))
|
||||
}
|
||||
|
||||
// TargetNotIn applies the NotIn predicate on the "target" field.
|
||||
func TargetNotIn(vs ...string) predicate.Alert {
|
||||
return predicate.Alert(sql.FieldNotIn(FieldTarget, vs...))
|
||||
}
|
||||
|
||||
// TargetGT applies the GT predicate on the "target" field.
|
||||
func TargetGT(v string) predicate.Alert {
|
||||
return predicate.Alert(sql.FieldGT(FieldTarget, v))
|
||||
}
|
||||
|
||||
// TargetGTE applies the GTE predicate on the "target" field.
|
||||
func TargetGTE(v string) predicate.Alert {
|
||||
return predicate.Alert(sql.FieldGTE(FieldTarget, v))
|
||||
}
|
||||
|
||||
// TargetLT applies the LT predicate on the "target" field.
|
||||
func TargetLT(v string) predicate.Alert {
|
||||
return predicate.Alert(sql.FieldLT(FieldTarget, v))
|
||||
}
|
||||
|
||||
// TargetLTE applies the LTE predicate on the "target" field.
|
||||
func TargetLTE(v string) predicate.Alert {
|
||||
return predicate.Alert(sql.FieldLTE(FieldTarget, v))
|
||||
}
|
||||
|
||||
// TargetContains applies the Contains predicate on the "target" field.
|
||||
func TargetContains(v string) predicate.Alert {
|
||||
return predicate.Alert(sql.FieldContains(FieldTarget, v))
|
||||
}
|
||||
|
||||
// TargetHasPrefix applies the HasPrefix predicate on the "target" field.
|
||||
func TargetHasPrefix(v string) predicate.Alert {
|
||||
return predicate.Alert(sql.FieldHasPrefix(FieldTarget, v))
|
||||
}
|
||||
|
||||
// TargetHasSuffix applies the HasSuffix predicate on the "target" field.
|
||||
func TargetHasSuffix(v string) predicate.Alert {
|
||||
return predicate.Alert(sql.FieldHasSuffix(FieldTarget, v))
|
||||
}
|
||||
|
||||
// TargetEqualFold applies the EqualFold predicate on the "target" field.
|
||||
func TargetEqualFold(v string) predicate.Alert {
|
||||
return predicate.Alert(sql.FieldEqualFold(FieldTarget, v))
|
||||
}
|
||||
|
||||
// TargetContainsFold applies the ContainsFold predicate on the "target" field.
|
||||
func TargetContainsFold(v string) predicate.Alert {
|
||||
return predicate.Alert(sql.FieldContainsFold(FieldTarget, v))
|
||||
}
|
||||
|
||||
// TitleEQ applies the EQ predicate on the "title" field.
|
||||
func TitleEQ(v string) predicate.Alert {
|
||||
return predicate.Alert(sql.FieldEQ(FieldTitle, v))
|
||||
@@ -664,6 +814,121 @@ func ReceiverContainsFold(v string) predicate.Alert {
|
||||
return predicate.Alert(sql.FieldContainsFold(FieldReceiver, v))
|
||||
}
|
||||
|
||||
// ResolvedAtEQ applies the EQ predicate on the "resolvedAt" field.
|
||||
func ResolvedAtEQ(v time.Time) predicate.Alert {
|
||||
return predicate.Alert(sql.FieldEQ(FieldResolvedAt, v))
|
||||
}
|
||||
|
||||
// ResolvedAtNEQ applies the NEQ predicate on the "resolvedAt" field.
|
||||
func ResolvedAtNEQ(v time.Time) predicate.Alert {
|
||||
return predicate.Alert(sql.FieldNEQ(FieldResolvedAt, v))
|
||||
}
|
||||
|
||||
// ResolvedAtIn applies the In predicate on the "resolvedAt" field.
|
||||
func ResolvedAtIn(vs ...time.Time) predicate.Alert {
|
||||
return predicate.Alert(sql.FieldIn(FieldResolvedAt, vs...))
|
||||
}
|
||||
|
||||
// ResolvedAtNotIn applies the NotIn predicate on the "resolvedAt" field.
|
||||
func ResolvedAtNotIn(vs ...time.Time) predicate.Alert {
|
||||
return predicate.Alert(sql.FieldNotIn(FieldResolvedAt, vs...))
|
||||
}
|
||||
|
||||
// ResolvedAtGT applies the GT predicate on the "resolvedAt" field.
|
||||
func ResolvedAtGT(v time.Time) predicate.Alert {
|
||||
return predicate.Alert(sql.FieldGT(FieldResolvedAt, v))
|
||||
}
|
||||
|
||||
// ResolvedAtGTE applies the GTE predicate on the "resolvedAt" field.
|
||||
func ResolvedAtGTE(v time.Time) predicate.Alert {
|
||||
return predicate.Alert(sql.FieldGTE(FieldResolvedAt, v))
|
||||
}
|
||||
|
||||
// ResolvedAtLT applies the LT predicate on the "resolvedAt" field.
|
||||
func ResolvedAtLT(v time.Time) predicate.Alert {
|
||||
return predicate.Alert(sql.FieldLT(FieldResolvedAt, v))
|
||||
}
|
||||
|
||||
// ResolvedAtLTE applies the LTE predicate on the "resolvedAt" field.
|
||||
func ResolvedAtLTE(v time.Time) predicate.Alert {
|
||||
return predicate.Alert(sql.FieldLTE(FieldResolvedAt, v))
|
||||
}
|
||||
|
||||
// ResolvedAtIsNil applies the IsNil predicate on the "resolvedAt" field.
|
||||
func ResolvedAtIsNil() predicate.Alert {
|
||||
return predicate.Alert(sql.FieldIsNull(FieldResolvedAt))
|
||||
}
|
||||
|
||||
// ResolvedAtNotNil applies the NotNil predicate on the "resolvedAt" field.
|
||||
func ResolvedAtNotNil() predicate.Alert {
|
||||
return predicate.Alert(sql.FieldNotNull(FieldResolvedAt))
|
||||
}
|
||||
|
||||
// ResolvedByEQ applies the EQ predicate on the "resolvedBy" field.
|
||||
func ResolvedByEQ(v string) predicate.Alert {
|
||||
return predicate.Alert(sql.FieldEQ(FieldResolvedBy, v))
|
||||
}
|
||||
|
||||
// ResolvedByNEQ applies the NEQ predicate on the "resolvedBy" field.
|
||||
func ResolvedByNEQ(v string) predicate.Alert {
|
||||
return predicate.Alert(sql.FieldNEQ(FieldResolvedBy, v))
|
||||
}
|
||||
|
||||
// ResolvedByIn applies the In predicate on the "resolvedBy" field.
|
||||
func ResolvedByIn(vs ...string) predicate.Alert {
|
||||
return predicate.Alert(sql.FieldIn(FieldResolvedBy, vs...))
|
||||
}
|
||||
|
||||
// ResolvedByNotIn applies the NotIn predicate on the "resolvedBy" field.
|
||||
func ResolvedByNotIn(vs ...string) predicate.Alert {
|
||||
return predicate.Alert(sql.FieldNotIn(FieldResolvedBy, vs...))
|
||||
}
|
||||
|
||||
// ResolvedByGT applies the GT predicate on the "resolvedBy" field.
|
||||
func ResolvedByGT(v string) predicate.Alert {
|
||||
return predicate.Alert(sql.FieldGT(FieldResolvedBy, v))
|
||||
}
|
||||
|
||||
// ResolvedByGTE applies the GTE predicate on the "resolvedBy" field.
|
||||
func ResolvedByGTE(v string) predicate.Alert {
|
||||
return predicate.Alert(sql.FieldGTE(FieldResolvedBy, v))
|
||||
}
|
||||
|
||||
// ResolvedByLT applies the LT predicate on the "resolvedBy" field.
|
||||
func ResolvedByLT(v string) predicate.Alert {
|
||||
return predicate.Alert(sql.FieldLT(FieldResolvedBy, v))
|
||||
}
|
||||
|
||||
// ResolvedByLTE applies the LTE predicate on the "resolvedBy" field.
|
||||
func ResolvedByLTE(v string) predicate.Alert {
|
||||
return predicate.Alert(sql.FieldLTE(FieldResolvedBy, v))
|
||||
}
|
||||
|
||||
// ResolvedByContains applies the Contains predicate on the "resolvedBy" field.
|
||||
func ResolvedByContains(v string) predicate.Alert {
|
||||
return predicate.Alert(sql.FieldContains(FieldResolvedBy, v))
|
||||
}
|
||||
|
||||
// ResolvedByHasPrefix applies the HasPrefix predicate on the "resolvedBy" field.
|
||||
func ResolvedByHasPrefix(v string) predicate.Alert {
|
||||
return predicate.Alert(sql.FieldHasPrefix(FieldResolvedBy, v))
|
||||
}
|
||||
|
||||
// ResolvedByHasSuffix applies the HasSuffix predicate on the "resolvedBy" field.
|
||||
func ResolvedByHasSuffix(v string) predicate.Alert {
|
||||
return predicate.Alert(sql.FieldHasSuffix(FieldResolvedBy, v))
|
||||
}
|
||||
|
||||
// ResolvedByEqualFold applies the EqualFold predicate on the "resolvedBy" field.
|
||||
func ResolvedByEqualFold(v string) predicate.Alert {
|
||||
return predicate.Alert(sql.FieldEqualFold(FieldResolvedBy, v))
|
||||
}
|
||||
|
||||
// ResolvedByContainsFold applies the ContainsFold predicate on the "resolvedBy" field.
|
||||
func ResolvedByContainsFold(v string) predicate.Alert {
|
||||
return predicate.Alert(sql.FieldContainsFold(FieldResolvedBy, v))
|
||||
}
|
||||
|
||||
// CreatedAtEQ applies the EQ predicate on the "createdAt" field.
|
||||
func CreatedAtEQ(v time.Time) predicate.Alert {
|
||||
return predicate.Alert(sql.FieldEQ(FieldCreatedAt, v))
|
||||
|
||||
Reference in New Issue
Block a user