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()
|
||||
|
||||
Reference in New Issue
Block a user