feat: 新增预警定时扫描器,移除附件归档字段并为角色表补充更新时间
This commit is contained in:
@@ -23,6 +23,8 @@ const (
|
||||
FieldPermissionCodes = "permission_codes"
|
||||
// FieldCreatedAt holds the string denoting the createdat field in the database.
|
||||
FieldCreatedAt = "created_at"
|
||||
// FieldUpdatedAt holds the string denoting the updatedat field in the database.
|
||||
FieldUpdatedAt = "updated_at"
|
||||
// Table holds the table name of the role in the database.
|
||||
Table = "role"
|
||||
)
|
||||
@@ -35,6 +37,7 @@ var Columns = []string{
|
||||
FieldRemark,
|
||||
FieldPermissionCodes,
|
||||
FieldCreatedAt,
|
||||
FieldUpdatedAt,
|
||||
}
|
||||
|
||||
// ValidColumn reports if the column name is valid (part of the table columns).
|
||||
@@ -58,6 +61,10 @@ var (
|
||||
RemarkValidator func(string) error
|
||||
// DefaultCreatedAt holds the default value on creation for the "createdAt" field.
|
||||
DefaultCreatedAt func() time.Time
|
||||
// DefaultUpdatedAt holds the default value on creation for the "updatedAt" field.
|
||||
DefaultUpdatedAt func() time.Time
|
||||
// UpdateDefaultUpdatedAt holds the default value on update for the "updatedAt" field.
|
||||
UpdateDefaultUpdatedAt func() time.Time
|
||||
// IDValidator is a validator for the "id" field. It is called by the builders before save.
|
||||
IDValidator func(int) error
|
||||
)
|
||||
@@ -89,3 +96,8 @@ func ByRemark(opts ...sql.OrderTermOption) OrderOption {
|
||||
func ByCreatedAt(opts ...sql.OrderTermOption) OrderOption {
|
||||
return sql.OrderByField(FieldCreatedAt, opts...).ToFunc()
|
||||
}
|
||||
|
||||
// ByUpdatedAt orders the results by the updatedAt field.
|
||||
func ByUpdatedAt(opts ...sql.OrderTermOption) OrderOption {
|
||||
return sql.OrderByField(FieldUpdatedAt, opts...).ToFunc()
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user