feat: 新增预警与附件模块,优化工位派工功能
1. 新增预警规则、预警消息、业务附件数据库表与CRUD逻辑 2. 为拧紧记录添加审核人、审核时间字段及审核留痕功能 3. 优化产线点位类型与编号描述,更新工位组合下发菜单名称为工艺路线派工 4. 新增上传文件获取原文件名与大小的工具方法 5. 在系统管理菜单新增预警中心与附件中心入口
This commit is contained in:
@@ -0,0 +1,118 @@
|
||||
// Code generated by ent, DO NOT EDIT.
|
||||
|
||||
package attachment
|
||||
|
||||
import (
|
||||
"time"
|
||||
|
||||
"entgo.io/ent/dialect/sql"
|
||||
)
|
||||
|
||||
const (
|
||||
// Label holds the string label denoting the attachment type in the database.
|
||||
Label = "attachment"
|
||||
// FieldID holds the string denoting the id field in the database.
|
||||
FieldID = "id"
|
||||
// FieldBizType holds the string denoting the biztype field in the database.
|
||||
FieldBizType = "biz_type"
|
||||
// FieldBizId holds the string denoting the bizid field in the database.
|
||||
FieldBizId = "biz_id"
|
||||
// FieldFileName holds the string denoting the filename field in the database.
|
||||
FieldFileName = "file_name"
|
||||
// FieldFilePath holds the string denoting the filepath field in the database.
|
||||
FieldFilePath = "file_path"
|
||||
// FieldFileSize holds the string denoting the filesize field in the database.
|
||||
FieldFileSize = "file_size"
|
||||
// FieldUploader holds the string denoting the uploader field in the database.
|
||||
FieldUploader = "uploader"
|
||||
// FieldCreatedAt holds the string denoting the createdat field in the database.
|
||||
FieldCreatedAt = "created_at"
|
||||
// Table holds the table name of the attachment in the database.
|
||||
Table = "attachment"
|
||||
)
|
||||
|
||||
// Columns holds all SQL columns for attachment fields.
|
||||
var Columns = []string{
|
||||
FieldID,
|
||||
FieldBizType,
|
||||
FieldBizId,
|
||||
FieldFileName,
|
||||
FieldFilePath,
|
||||
FieldFileSize,
|
||||
FieldUploader,
|
||||
FieldCreatedAt,
|
||||
}
|
||||
|
||||
// ValidColumn reports if the column name is valid (part of the table columns).
|
||||
func ValidColumn(column string) bool {
|
||||
for i := range Columns {
|
||||
if column == Columns[i] {
|
||||
return true
|
||||
}
|
||||
}
|
||||
return false
|
||||
}
|
||||
|
||||
var (
|
||||
// BizTypeValidator is a validator for the "bizType" field. It is called by the builders before save.
|
||||
BizTypeValidator func(string) error
|
||||
// BizIdValidator is a validator for the "bizId" field. It is called by the builders before save.
|
||||
BizIdValidator func(string) error
|
||||
// FileNameValidator is a validator for the "fileName" field. It is called by the builders before save.
|
||||
FileNameValidator func(string) error
|
||||
// FilePathValidator is a validator for the "filePath" field. It is called by the builders before save.
|
||||
FilePathValidator func(string) error
|
||||
// DefaultFileSize holds the default value on creation for the "fileSize" field.
|
||||
DefaultFileSize int
|
||||
// DefaultUploader holds the default value on creation for the "uploader" field.
|
||||
DefaultUploader string
|
||||
// UploaderValidator is a validator for the "uploader" field. It is called by the builders before save.
|
||||
UploaderValidator 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.
|
||||
IDValidator func(int) error
|
||||
)
|
||||
|
||||
// OrderOption defines the ordering options for the Attachment queries.
|
||||
type OrderOption func(*sql.Selector)
|
||||
|
||||
// ByID orders the results by the id field.
|
||||
func ByID(opts ...sql.OrderTermOption) OrderOption {
|
||||
return sql.OrderByField(FieldID, opts...).ToFunc()
|
||||
}
|
||||
|
||||
// ByBizType orders the results by the bizType field.
|
||||
func ByBizType(opts ...sql.OrderTermOption) OrderOption {
|
||||
return sql.OrderByField(FieldBizType, opts...).ToFunc()
|
||||
}
|
||||
|
||||
// ByBizId orders the results by the bizId field.
|
||||
func ByBizId(opts ...sql.OrderTermOption) OrderOption {
|
||||
return sql.OrderByField(FieldBizId, opts...).ToFunc()
|
||||
}
|
||||
|
||||
// ByFileName orders the results by the fileName field.
|
||||
func ByFileName(opts ...sql.OrderTermOption) OrderOption {
|
||||
return sql.OrderByField(FieldFileName, opts...).ToFunc()
|
||||
}
|
||||
|
||||
// ByFilePath orders the results by the filePath field.
|
||||
func ByFilePath(opts ...sql.OrderTermOption) OrderOption {
|
||||
return sql.OrderByField(FieldFilePath, opts...).ToFunc()
|
||||
}
|
||||
|
||||
// ByFileSize orders the results by the fileSize field.
|
||||
func ByFileSize(opts ...sql.OrderTermOption) OrderOption {
|
||||
return sql.OrderByField(FieldFileSize, opts...).ToFunc()
|
||||
}
|
||||
|
||||
// ByUploader orders the results by the uploader field.
|
||||
func ByUploader(opts ...sql.OrderTermOption) OrderOption {
|
||||
return sql.OrderByField(FieldUploader, opts...).ToFunc()
|
||||
}
|
||||
|
||||
// ByCreatedAt orders the results by the createdAt field.
|
||||
func ByCreatedAt(opts ...sql.OrderTermOption) OrderOption {
|
||||
return sql.OrderByField(FieldCreatedAt, opts...).ToFunc()
|
||||
}
|
||||
@@ -0,0 +1,510 @@
|
||||
// Code generated by ent, DO NOT EDIT.
|
||||
|
||||
package attachment
|
||||
|
||||
import (
|
||||
"bj_power_mes/ent/predicate"
|
||||
"time"
|
||||
|
||||
"entgo.io/ent/dialect/sql"
|
||||
)
|
||||
|
||||
// ID filters vertices based on their ID field.
|
||||
func ID(id int) predicate.Attachment {
|
||||
return predicate.Attachment(sql.FieldEQ(FieldID, id))
|
||||
}
|
||||
|
||||
// IDEQ applies the EQ predicate on the ID field.
|
||||
func IDEQ(id int) predicate.Attachment {
|
||||
return predicate.Attachment(sql.FieldEQ(FieldID, id))
|
||||
}
|
||||
|
||||
// IDNEQ applies the NEQ predicate on the ID field.
|
||||
func IDNEQ(id int) predicate.Attachment {
|
||||
return predicate.Attachment(sql.FieldNEQ(FieldID, id))
|
||||
}
|
||||
|
||||
// IDIn applies the In predicate on the ID field.
|
||||
func IDIn(ids ...int) predicate.Attachment {
|
||||
return predicate.Attachment(sql.FieldIn(FieldID, ids...))
|
||||
}
|
||||
|
||||
// IDNotIn applies the NotIn predicate on the ID field.
|
||||
func IDNotIn(ids ...int) predicate.Attachment {
|
||||
return predicate.Attachment(sql.FieldNotIn(FieldID, ids...))
|
||||
}
|
||||
|
||||
// IDGT applies the GT predicate on the ID field.
|
||||
func IDGT(id int) predicate.Attachment {
|
||||
return predicate.Attachment(sql.FieldGT(FieldID, id))
|
||||
}
|
||||
|
||||
// IDGTE applies the GTE predicate on the ID field.
|
||||
func IDGTE(id int) predicate.Attachment {
|
||||
return predicate.Attachment(sql.FieldGTE(FieldID, id))
|
||||
}
|
||||
|
||||
// IDLT applies the LT predicate on the ID field.
|
||||
func IDLT(id int) predicate.Attachment {
|
||||
return predicate.Attachment(sql.FieldLT(FieldID, id))
|
||||
}
|
||||
|
||||
// IDLTE applies the LTE predicate on the ID field.
|
||||
func IDLTE(id int) predicate.Attachment {
|
||||
return predicate.Attachment(sql.FieldLTE(FieldID, id))
|
||||
}
|
||||
|
||||
// BizType applies equality check predicate on the "bizType" field. It's identical to BizTypeEQ.
|
||||
func BizType(v string) predicate.Attachment {
|
||||
return predicate.Attachment(sql.FieldEQ(FieldBizType, v))
|
||||
}
|
||||
|
||||
// BizId applies equality check predicate on the "bizId" field. It's identical to BizIdEQ.
|
||||
func BizId(v string) predicate.Attachment {
|
||||
return predicate.Attachment(sql.FieldEQ(FieldBizId, v))
|
||||
}
|
||||
|
||||
// FileName applies equality check predicate on the "fileName" field. It's identical to FileNameEQ.
|
||||
func FileName(v string) predicate.Attachment {
|
||||
return predicate.Attachment(sql.FieldEQ(FieldFileName, v))
|
||||
}
|
||||
|
||||
// FilePath applies equality check predicate on the "filePath" field. It's identical to FilePathEQ.
|
||||
func FilePath(v string) predicate.Attachment {
|
||||
return predicate.Attachment(sql.FieldEQ(FieldFilePath, v))
|
||||
}
|
||||
|
||||
// FileSize applies equality check predicate on the "fileSize" field. It's identical to FileSizeEQ.
|
||||
func FileSize(v int) predicate.Attachment {
|
||||
return predicate.Attachment(sql.FieldEQ(FieldFileSize, v))
|
||||
}
|
||||
|
||||
// Uploader applies equality check predicate on the "uploader" field. It's identical to UploaderEQ.
|
||||
func Uploader(v string) predicate.Attachment {
|
||||
return predicate.Attachment(sql.FieldEQ(FieldUploader, v))
|
||||
}
|
||||
|
||||
// CreatedAt applies equality check predicate on the "createdAt" field. It's identical to CreatedAtEQ.
|
||||
func CreatedAt(v time.Time) predicate.Attachment {
|
||||
return predicate.Attachment(sql.FieldEQ(FieldCreatedAt, v))
|
||||
}
|
||||
|
||||
// BizTypeEQ applies the EQ predicate on the "bizType" field.
|
||||
func BizTypeEQ(v string) predicate.Attachment {
|
||||
return predicate.Attachment(sql.FieldEQ(FieldBizType, v))
|
||||
}
|
||||
|
||||
// BizTypeNEQ applies the NEQ predicate on the "bizType" field.
|
||||
func BizTypeNEQ(v string) predicate.Attachment {
|
||||
return predicate.Attachment(sql.FieldNEQ(FieldBizType, v))
|
||||
}
|
||||
|
||||
// BizTypeIn applies the In predicate on the "bizType" field.
|
||||
func BizTypeIn(vs ...string) predicate.Attachment {
|
||||
return predicate.Attachment(sql.FieldIn(FieldBizType, vs...))
|
||||
}
|
||||
|
||||
// BizTypeNotIn applies the NotIn predicate on the "bizType" field.
|
||||
func BizTypeNotIn(vs ...string) predicate.Attachment {
|
||||
return predicate.Attachment(sql.FieldNotIn(FieldBizType, vs...))
|
||||
}
|
||||
|
||||
// BizTypeGT applies the GT predicate on the "bizType" field.
|
||||
func BizTypeGT(v string) predicate.Attachment {
|
||||
return predicate.Attachment(sql.FieldGT(FieldBizType, v))
|
||||
}
|
||||
|
||||
// BizTypeGTE applies the GTE predicate on the "bizType" field.
|
||||
func BizTypeGTE(v string) predicate.Attachment {
|
||||
return predicate.Attachment(sql.FieldGTE(FieldBizType, v))
|
||||
}
|
||||
|
||||
// BizTypeLT applies the LT predicate on the "bizType" field.
|
||||
func BizTypeLT(v string) predicate.Attachment {
|
||||
return predicate.Attachment(sql.FieldLT(FieldBizType, v))
|
||||
}
|
||||
|
||||
// BizTypeLTE applies the LTE predicate on the "bizType" field.
|
||||
func BizTypeLTE(v string) predicate.Attachment {
|
||||
return predicate.Attachment(sql.FieldLTE(FieldBizType, v))
|
||||
}
|
||||
|
||||
// BizTypeContains applies the Contains predicate on the "bizType" field.
|
||||
func BizTypeContains(v string) predicate.Attachment {
|
||||
return predicate.Attachment(sql.FieldContains(FieldBizType, v))
|
||||
}
|
||||
|
||||
// BizTypeHasPrefix applies the HasPrefix predicate on the "bizType" field.
|
||||
func BizTypeHasPrefix(v string) predicate.Attachment {
|
||||
return predicate.Attachment(sql.FieldHasPrefix(FieldBizType, v))
|
||||
}
|
||||
|
||||
// BizTypeHasSuffix applies the HasSuffix predicate on the "bizType" field.
|
||||
func BizTypeHasSuffix(v string) predicate.Attachment {
|
||||
return predicate.Attachment(sql.FieldHasSuffix(FieldBizType, v))
|
||||
}
|
||||
|
||||
// BizTypeEqualFold applies the EqualFold predicate on the "bizType" field.
|
||||
func BizTypeEqualFold(v string) predicate.Attachment {
|
||||
return predicate.Attachment(sql.FieldEqualFold(FieldBizType, v))
|
||||
}
|
||||
|
||||
// BizTypeContainsFold applies the ContainsFold predicate on the "bizType" field.
|
||||
func BizTypeContainsFold(v string) predicate.Attachment {
|
||||
return predicate.Attachment(sql.FieldContainsFold(FieldBizType, v))
|
||||
}
|
||||
|
||||
// BizIdEQ applies the EQ predicate on the "bizId" field.
|
||||
func BizIdEQ(v string) predicate.Attachment {
|
||||
return predicate.Attachment(sql.FieldEQ(FieldBizId, v))
|
||||
}
|
||||
|
||||
// BizIdNEQ applies the NEQ predicate on the "bizId" field.
|
||||
func BizIdNEQ(v string) predicate.Attachment {
|
||||
return predicate.Attachment(sql.FieldNEQ(FieldBizId, v))
|
||||
}
|
||||
|
||||
// BizIdIn applies the In predicate on the "bizId" field.
|
||||
func BizIdIn(vs ...string) predicate.Attachment {
|
||||
return predicate.Attachment(sql.FieldIn(FieldBizId, vs...))
|
||||
}
|
||||
|
||||
// BizIdNotIn applies the NotIn predicate on the "bizId" field.
|
||||
func BizIdNotIn(vs ...string) predicate.Attachment {
|
||||
return predicate.Attachment(sql.FieldNotIn(FieldBizId, vs...))
|
||||
}
|
||||
|
||||
// BizIdGT applies the GT predicate on the "bizId" field.
|
||||
func BizIdGT(v string) predicate.Attachment {
|
||||
return predicate.Attachment(sql.FieldGT(FieldBizId, v))
|
||||
}
|
||||
|
||||
// BizIdGTE applies the GTE predicate on the "bizId" field.
|
||||
func BizIdGTE(v string) predicate.Attachment {
|
||||
return predicate.Attachment(sql.FieldGTE(FieldBizId, v))
|
||||
}
|
||||
|
||||
// BizIdLT applies the LT predicate on the "bizId" field.
|
||||
func BizIdLT(v string) predicate.Attachment {
|
||||
return predicate.Attachment(sql.FieldLT(FieldBizId, v))
|
||||
}
|
||||
|
||||
// BizIdLTE applies the LTE predicate on the "bizId" field.
|
||||
func BizIdLTE(v string) predicate.Attachment {
|
||||
return predicate.Attachment(sql.FieldLTE(FieldBizId, v))
|
||||
}
|
||||
|
||||
// BizIdContains applies the Contains predicate on the "bizId" field.
|
||||
func BizIdContains(v string) predicate.Attachment {
|
||||
return predicate.Attachment(sql.FieldContains(FieldBizId, v))
|
||||
}
|
||||
|
||||
// BizIdHasPrefix applies the HasPrefix predicate on the "bizId" field.
|
||||
func BizIdHasPrefix(v string) predicate.Attachment {
|
||||
return predicate.Attachment(sql.FieldHasPrefix(FieldBizId, v))
|
||||
}
|
||||
|
||||
// BizIdHasSuffix applies the HasSuffix predicate on the "bizId" field.
|
||||
func BizIdHasSuffix(v string) predicate.Attachment {
|
||||
return predicate.Attachment(sql.FieldHasSuffix(FieldBizId, v))
|
||||
}
|
||||
|
||||
// BizIdEqualFold applies the EqualFold predicate on the "bizId" field.
|
||||
func BizIdEqualFold(v string) predicate.Attachment {
|
||||
return predicate.Attachment(sql.FieldEqualFold(FieldBizId, v))
|
||||
}
|
||||
|
||||
// BizIdContainsFold applies the ContainsFold predicate on the "bizId" field.
|
||||
func BizIdContainsFold(v string) predicate.Attachment {
|
||||
return predicate.Attachment(sql.FieldContainsFold(FieldBizId, v))
|
||||
}
|
||||
|
||||
// FileNameEQ applies the EQ predicate on the "fileName" field.
|
||||
func FileNameEQ(v string) predicate.Attachment {
|
||||
return predicate.Attachment(sql.FieldEQ(FieldFileName, v))
|
||||
}
|
||||
|
||||
// FileNameNEQ applies the NEQ predicate on the "fileName" field.
|
||||
func FileNameNEQ(v string) predicate.Attachment {
|
||||
return predicate.Attachment(sql.FieldNEQ(FieldFileName, v))
|
||||
}
|
||||
|
||||
// FileNameIn applies the In predicate on the "fileName" field.
|
||||
func FileNameIn(vs ...string) predicate.Attachment {
|
||||
return predicate.Attachment(sql.FieldIn(FieldFileName, vs...))
|
||||
}
|
||||
|
||||
// FileNameNotIn applies the NotIn predicate on the "fileName" field.
|
||||
func FileNameNotIn(vs ...string) predicate.Attachment {
|
||||
return predicate.Attachment(sql.FieldNotIn(FieldFileName, vs...))
|
||||
}
|
||||
|
||||
// FileNameGT applies the GT predicate on the "fileName" field.
|
||||
func FileNameGT(v string) predicate.Attachment {
|
||||
return predicate.Attachment(sql.FieldGT(FieldFileName, v))
|
||||
}
|
||||
|
||||
// FileNameGTE applies the GTE predicate on the "fileName" field.
|
||||
func FileNameGTE(v string) predicate.Attachment {
|
||||
return predicate.Attachment(sql.FieldGTE(FieldFileName, v))
|
||||
}
|
||||
|
||||
// FileNameLT applies the LT predicate on the "fileName" field.
|
||||
func FileNameLT(v string) predicate.Attachment {
|
||||
return predicate.Attachment(sql.FieldLT(FieldFileName, v))
|
||||
}
|
||||
|
||||
// FileNameLTE applies the LTE predicate on the "fileName" field.
|
||||
func FileNameLTE(v string) predicate.Attachment {
|
||||
return predicate.Attachment(sql.FieldLTE(FieldFileName, v))
|
||||
}
|
||||
|
||||
// FileNameContains applies the Contains predicate on the "fileName" field.
|
||||
func FileNameContains(v string) predicate.Attachment {
|
||||
return predicate.Attachment(sql.FieldContains(FieldFileName, v))
|
||||
}
|
||||
|
||||
// FileNameHasPrefix applies the HasPrefix predicate on the "fileName" field.
|
||||
func FileNameHasPrefix(v string) predicate.Attachment {
|
||||
return predicate.Attachment(sql.FieldHasPrefix(FieldFileName, v))
|
||||
}
|
||||
|
||||
// FileNameHasSuffix applies the HasSuffix predicate on the "fileName" field.
|
||||
func FileNameHasSuffix(v string) predicate.Attachment {
|
||||
return predicate.Attachment(sql.FieldHasSuffix(FieldFileName, v))
|
||||
}
|
||||
|
||||
// FileNameEqualFold applies the EqualFold predicate on the "fileName" field.
|
||||
func FileNameEqualFold(v string) predicate.Attachment {
|
||||
return predicate.Attachment(sql.FieldEqualFold(FieldFileName, v))
|
||||
}
|
||||
|
||||
// FileNameContainsFold applies the ContainsFold predicate on the "fileName" field.
|
||||
func FileNameContainsFold(v string) predicate.Attachment {
|
||||
return predicate.Attachment(sql.FieldContainsFold(FieldFileName, v))
|
||||
}
|
||||
|
||||
// FilePathEQ applies the EQ predicate on the "filePath" field.
|
||||
func FilePathEQ(v string) predicate.Attachment {
|
||||
return predicate.Attachment(sql.FieldEQ(FieldFilePath, v))
|
||||
}
|
||||
|
||||
// FilePathNEQ applies the NEQ predicate on the "filePath" field.
|
||||
func FilePathNEQ(v string) predicate.Attachment {
|
||||
return predicate.Attachment(sql.FieldNEQ(FieldFilePath, v))
|
||||
}
|
||||
|
||||
// FilePathIn applies the In predicate on the "filePath" field.
|
||||
func FilePathIn(vs ...string) predicate.Attachment {
|
||||
return predicate.Attachment(sql.FieldIn(FieldFilePath, vs...))
|
||||
}
|
||||
|
||||
// FilePathNotIn applies the NotIn predicate on the "filePath" field.
|
||||
func FilePathNotIn(vs ...string) predicate.Attachment {
|
||||
return predicate.Attachment(sql.FieldNotIn(FieldFilePath, vs...))
|
||||
}
|
||||
|
||||
// FilePathGT applies the GT predicate on the "filePath" field.
|
||||
func FilePathGT(v string) predicate.Attachment {
|
||||
return predicate.Attachment(sql.FieldGT(FieldFilePath, v))
|
||||
}
|
||||
|
||||
// FilePathGTE applies the GTE predicate on the "filePath" field.
|
||||
func FilePathGTE(v string) predicate.Attachment {
|
||||
return predicate.Attachment(sql.FieldGTE(FieldFilePath, v))
|
||||
}
|
||||
|
||||
// FilePathLT applies the LT predicate on the "filePath" field.
|
||||
func FilePathLT(v string) predicate.Attachment {
|
||||
return predicate.Attachment(sql.FieldLT(FieldFilePath, v))
|
||||
}
|
||||
|
||||
// FilePathLTE applies the LTE predicate on the "filePath" field.
|
||||
func FilePathLTE(v string) predicate.Attachment {
|
||||
return predicate.Attachment(sql.FieldLTE(FieldFilePath, v))
|
||||
}
|
||||
|
||||
// FilePathContains applies the Contains predicate on the "filePath" field.
|
||||
func FilePathContains(v string) predicate.Attachment {
|
||||
return predicate.Attachment(sql.FieldContains(FieldFilePath, v))
|
||||
}
|
||||
|
||||
// FilePathHasPrefix applies the HasPrefix predicate on the "filePath" field.
|
||||
func FilePathHasPrefix(v string) predicate.Attachment {
|
||||
return predicate.Attachment(sql.FieldHasPrefix(FieldFilePath, v))
|
||||
}
|
||||
|
||||
// FilePathHasSuffix applies the HasSuffix predicate on the "filePath" field.
|
||||
func FilePathHasSuffix(v string) predicate.Attachment {
|
||||
return predicate.Attachment(sql.FieldHasSuffix(FieldFilePath, v))
|
||||
}
|
||||
|
||||
// FilePathEqualFold applies the EqualFold predicate on the "filePath" field.
|
||||
func FilePathEqualFold(v string) predicate.Attachment {
|
||||
return predicate.Attachment(sql.FieldEqualFold(FieldFilePath, v))
|
||||
}
|
||||
|
||||
// FilePathContainsFold applies the ContainsFold predicate on the "filePath" field.
|
||||
func FilePathContainsFold(v string) predicate.Attachment {
|
||||
return predicate.Attachment(sql.FieldContainsFold(FieldFilePath, v))
|
||||
}
|
||||
|
||||
// FileSizeEQ applies the EQ predicate on the "fileSize" field.
|
||||
func FileSizeEQ(v int) predicate.Attachment {
|
||||
return predicate.Attachment(sql.FieldEQ(FieldFileSize, v))
|
||||
}
|
||||
|
||||
// FileSizeNEQ applies the NEQ predicate on the "fileSize" field.
|
||||
func FileSizeNEQ(v int) predicate.Attachment {
|
||||
return predicate.Attachment(sql.FieldNEQ(FieldFileSize, v))
|
||||
}
|
||||
|
||||
// FileSizeIn applies the In predicate on the "fileSize" field.
|
||||
func FileSizeIn(vs ...int) predicate.Attachment {
|
||||
return predicate.Attachment(sql.FieldIn(FieldFileSize, vs...))
|
||||
}
|
||||
|
||||
// FileSizeNotIn applies the NotIn predicate on the "fileSize" field.
|
||||
func FileSizeNotIn(vs ...int) predicate.Attachment {
|
||||
return predicate.Attachment(sql.FieldNotIn(FieldFileSize, vs...))
|
||||
}
|
||||
|
||||
// FileSizeGT applies the GT predicate on the "fileSize" field.
|
||||
func FileSizeGT(v int) predicate.Attachment {
|
||||
return predicate.Attachment(sql.FieldGT(FieldFileSize, v))
|
||||
}
|
||||
|
||||
// FileSizeGTE applies the GTE predicate on the "fileSize" field.
|
||||
func FileSizeGTE(v int) predicate.Attachment {
|
||||
return predicate.Attachment(sql.FieldGTE(FieldFileSize, v))
|
||||
}
|
||||
|
||||
// FileSizeLT applies the LT predicate on the "fileSize" field.
|
||||
func FileSizeLT(v int) predicate.Attachment {
|
||||
return predicate.Attachment(sql.FieldLT(FieldFileSize, v))
|
||||
}
|
||||
|
||||
// FileSizeLTE applies the LTE predicate on the "fileSize" field.
|
||||
func FileSizeLTE(v int) predicate.Attachment {
|
||||
return predicate.Attachment(sql.FieldLTE(FieldFileSize, v))
|
||||
}
|
||||
|
||||
// UploaderEQ applies the EQ predicate on the "uploader" field.
|
||||
func UploaderEQ(v string) predicate.Attachment {
|
||||
return predicate.Attachment(sql.FieldEQ(FieldUploader, v))
|
||||
}
|
||||
|
||||
// UploaderNEQ applies the NEQ predicate on the "uploader" field.
|
||||
func UploaderNEQ(v string) predicate.Attachment {
|
||||
return predicate.Attachment(sql.FieldNEQ(FieldUploader, v))
|
||||
}
|
||||
|
||||
// UploaderIn applies the In predicate on the "uploader" field.
|
||||
func UploaderIn(vs ...string) predicate.Attachment {
|
||||
return predicate.Attachment(sql.FieldIn(FieldUploader, vs...))
|
||||
}
|
||||
|
||||
// UploaderNotIn applies the NotIn predicate on the "uploader" field.
|
||||
func UploaderNotIn(vs ...string) predicate.Attachment {
|
||||
return predicate.Attachment(sql.FieldNotIn(FieldUploader, vs...))
|
||||
}
|
||||
|
||||
// UploaderGT applies the GT predicate on the "uploader" field.
|
||||
func UploaderGT(v string) predicate.Attachment {
|
||||
return predicate.Attachment(sql.FieldGT(FieldUploader, v))
|
||||
}
|
||||
|
||||
// UploaderGTE applies the GTE predicate on the "uploader" field.
|
||||
func UploaderGTE(v string) predicate.Attachment {
|
||||
return predicate.Attachment(sql.FieldGTE(FieldUploader, v))
|
||||
}
|
||||
|
||||
// UploaderLT applies the LT predicate on the "uploader" field.
|
||||
func UploaderLT(v string) predicate.Attachment {
|
||||
return predicate.Attachment(sql.FieldLT(FieldUploader, v))
|
||||
}
|
||||
|
||||
// UploaderLTE applies the LTE predicate on the "uploader" field.
|
||||
func UploaderLTE(v string) predicate.Attachment {
|
||||
return predicate.Attachment(sql.FieldLTE(FieldUploader, v))
|
||||
}
|
||||
|
||||
// UploaderContains applies the Contains predicate on the "uploader" field.
|
||||
func UploaderContains(v string) predicate.Attachment {
|
||||
return predicate.Attachment(sql.FieldContains(FieldUploader, v))
|
||||
}
|
||||
|
||||
// UploaderHasPrefix applies the HasPrefix predicate on the "uploader" field.
|
||||
func UploaderHasPrefix(v string) predicate.Attachment {
|
||||
return predicate.Attachment(sql.FieldHasPrefix(FieldUploader, v))
|
||||
}
|
||||
|
||||
// UploaderHasSuffix applies the HasSuffix predicate on the "uploader" field.
|
||||
func UploaderHasSuffix(v string) predicate.Attachment {
|
||||
return predicate.Attachment(sql.FieldHasSuffix(FieldUploader, v))
|
||||
}
|
||||
|
||||
// UploaderEqualFold applies the EqualFold predicate on the "uploader" field.
|
||||
func UploaderEqualFold(v string) predicate.Attachment {
|
||||
return predicate.Attachment(sql.FieldEqualFold(FieldUploader, v))
|
||||
}
|
||||
|
||||
// UploaderContainsFold applies the ContainsFold predicate on the "uploader" field.
|
||||
func UploaderContainsFold(v string) predicate.Attachment {
|
||||
return predicate.Attachment(sql.FieldContainsFold(FieldUploader, v))
|
||||
}
|
||||
|
||||
// CreatedAtEQ applies the EQ predicate on the "createdAt" field.
|
||||
func CreatedAtEQ(v time.Time) predicate.Attachment {
|
||||
return predicate.Attachment(sql.FieldEQ(FieldCreatedAt, v))
|
||||
}
|
||||
|
||||
// CreatedAtNEQ applies the NEQ predicate on the "createdAt" field.
|
||||
func CreatedAtNEQ(v time.Time) predicate.Attachment {
|
||||
return predicate.Attachment(sql.FieldNEQ(FieldCreatedAt, v))
|
||||
}
|
||||
|
||||
// CreatedAtIn applies the In predicate on the "createdAt" field.
|
||||
func CreatedAtIn(vs ...time.Time) predicate.Attachment {
|
||||
return predicate.Attachment(sql.FieldIn(FieldCreatedAt, vs...))
|
||||
}
|
||||
|
||||
// CreatedAtNotIn applies the NotIn predicate on the "createdAt" field.
|
||||
func CreatedAtNotIn(vs ...time.Time) predicate.Attachment {
|
||||
return predicate.Attachment(sql.FieldNotIn(FieldCreatedAt, vs...))
|
||||
}
|
||||
|
||||
// CreatedAtGT applies the GT predicate on the "createdAt" field.
|
||||
func CreatedAtGT(v time.Time) predicate.Attachment {
|
||||
return predicate.Attachment(sql.FieldGT(FieldCreatedAt, v))
|
||||
}
|
||||
|
||||
// CreatedAtGTE applies the GTE predicate on the "createdAt" field.
|
||||
func CreatedAtGTE(v time.Time) predicate.Attachment {
|
||||
return predicate.Attachment(sql.FieldGTE(FieldCreatedAt, v))
|
||||
}
|
||||
|
||||
// CreatedAtLT applies the LT predicate on the "createdAt" field.
|
||||
func CreatedAtLT(v time.Time) predicate.Attachment {
|
||||
return predicate.Attachment(sql.FieldLT(FieldCreatedAt, v))
|
||||
}
|
||||
|
||||
// CreatedAtLTE applies the LTE predicate on the "createdAt" field.
|
||||
func CreatedAtLTE(v time.Time) predicate.Attachment {
|
||||
return predicate.Attachment(sql.FieldLTE(FieldCreatedAt, v))
|
||||
}
|
||||
|
||||
// And groups predicates with the AND operator between them.
|
||||
func And(predicates ...predicate.Attachment) predicate.Attachment {
|
||||
return predicate.Attachment(sql.AndPredicates(predicates...))
|
||||
}
|
||||
|
||||
// Or groups predicates with the OR operator between them.
|
||||
func Or(predicates ...predicate.Attachment) predicate.Attachment {
|
||||
return predicate.Attachment(sql.OrPredicates(predicates...))
|
||||
}
|
||||
|
||||
// Not applies the not operator on the given predicate.
|
||||
func Not(p predicate.Attachment) predicate.Attachment {
|
||||
return predicate.Attachment(sql.NotPredicates(p))
|
||||
}
|
||||
Reference in New Issue
Block a user