feat: 新增预警与附件模块,优化工位派工功能
1. 新增预警规则、预警消息、业务附件数据库表与CRUD逻辑 2. 为拧紧记录添加审核人、审核时间字段及审核留痕功能 3. 优化产线点位类型与编号描述,更新工位组合下发菜单名称为工艺路线派工 4. 新增上传文件获取原文件名与大小的工具方法 5. 在系统管理菜单新增预警中心与附件中心入口
This commit is contained in:
@@ -0,0 +1,670 @@
|
||||
// Code generated by ent, DO NOT EDIT.
|
||||
|
||||
package workpiece
|
||||
|
||||
import (
|
||||
"bj_power_mes/predicate"
|
||||
"time"
|
||||
|
||||
"entgo.io/ent/dialect/sql"
|
||||
)
|
||||
|
||||
// ID filters vertices based on their ID field.
|
||||
func ID(id int) predicate.Workpiece {
|
||||
return predicate.Workpiece(sql.FieldEQ(FieldID, id))
|
||||
}
|
||||
|
||||
// IDEQ applies the EQ predicate on the ID field.
|
||||
func IDEQ(id int) predicate.Workpiece {
|
||||
return predicate.Workpiece(sql.FieldEQ(FieldID, id))
|
||||
}
|
||||
|
||||
// IDNEQ applies the NEQ predicate on the ID field.
|
||||
func IDNEQ(id int) predicate.Workpiece {
|
||||
return predicate.Workpiece(sql.FieldNEQ(FieldID, id))
|
||||
}
|
||||
|
||||
// IDIn applies the In predicate on the ID field.
|
||||
func IDIn(ids ...int) predicate.Workpiece {
|
||||
return predicate.Workpiece(sql.FieldIn(FieldID, ids...))
|
||||
}
|
||||
|
||||
// IDNotIn applies the NotIn predicate on the ID field.
|
||||
func IDNotIn(ids ...int) predicate.Workpiece {
|
||||
return predicate.Workpiece(sql.FieldNotIn(FieldID, ids...))
|
||||
}
|
||||
|
||||
// IDGT applies the GT predicate on the ID field.
|
||||
func IDGT(id int) predicate.Workpiece {
|
||||
return predicate.Workpiece(sql.FieldGT(FieldID, id))
|
||||
}
|
||||
|
||||
// IDGTE applies the GTE predicate on the ID field.
|
||||
func IDGTE(id int) predicate.Workpiece {
|
||||
return predicate.Workpiece(sql.FieldGTE(FieldID, id))
|
||||
}
|
||||
|
||||
// IDLT applies the LT predicate on the ID field.
|
||||
func IDLT(id int) predicate.Workpiece {
|
||||
return predicate.Workpiece(sql.FieldLT(FieldID, id))
|
||||
}
|
||||
|
||||
// IDLTE applies the LTE predicate on the ID field.
|
||||
func IDLTE(id int) predicate.Workpiece {
|
||||
return predicate.Workpiece(sql.FieldLTE(FieldID, id))
|
||||
}
|
||||
|
||||
// Sn applies equality check predicate on the "sn" field. It's identical to SnEQ.
|
||||
func Sn(v string) predicate.Workpiece {
|
||||
return predicate.Workpiece(sql.FieldEQ(FieldSn, v))
|
||||
}
|
||||
|
||||
// OrderNo applies equality check predicate on the "orderNo" field. It's identical to OrderNoEQ.
|
||||
func OrderNo(v string) predicate.Workpiece {
|
||||
return predicate.Workpiece(sql.FieldEQ(FieldOrderNo, v))
|
||||
}
|
||||
|
||||
// WorkOrderId applies equality check predicate on the "workOrderId" field. It's identical to WorkOrderIdEQ.
|
||||
func WorkOrderId(v int) predicate.Workpiece {
|
||||
return predicate.Workpiece(sql.FieldEQ(FieldWorkOrderId, v))
|
||||
}
|
||||
|
||||
// ProcessSeq applies equality check predicate on the "processSeq" field. It's identical to ProcessSeqEQ.
|
||||
func ProcessSeq(v string) predicate.Workpiece {
|
||||
return predicate.Workpiece(sql.FieldEQ(FieldProcessSeq, v))
|
||||
}
|
||||
|
||||
// CurrentProcess applies equality check predicate on the "currentProcess" field. It's identical to CurrentProcessEQ.
|
||||
func CurrentProcess(v int) predicate.Workpiece {
|
||||
return predicate.Workpiece(sql.FieldEQ(FieldCurrentProcess, v))
|
||||
}
|
||||
|
||||
// Status applies equality check predicate on the "status" field. It's identical to StatusEQ.
|
||||
func Status(v string) predicate.Workpiece {
|
||||
return predicate.Workpiece(sql.FieldEQ(FieldStatus, v))
|
||||
}
|
||||
|
||||
// OnlineAt applies equality check predicate on the "onlineAt" field. It's identical to OnlineAtEQ.
|
||||
func OnlineAt(v time.Time) predicate.Workpiece {
|
||||
return predicate.Workpiece(sql.FieldEQ(FieldOnlineAt, v))
|
||||
}
|
||||
|
||||
// DoneAt applies equality check predicate on the "doneAt" field. It's identical to DoneAtEQ.
|
||||
func DoneAt(v time.Time) predicate.Workpiece {
|
||||
return predicate.Workpiece(sql.FieldEQ(FieldDoneAt, v))
|
||||
}
|
||||
|
||||
// CreatedAt applies equality check predicate on the "createdAt" field. It's identical to CreatedAtEQ.
|
||||
func CreatedAt(v time.Time) predicate.Workpiece {
|
||||
return predicate.Workpiece(sql.FieldEQ(FieldCreatedAt, v))
|
||||
}
|
||||
|
||||
// UpdatedAt applies equality check predicate on the "updatedAt" field. It's identical to UpdatedAtEQ.
|
||||
func UpdatedAt(v time.Time) predicate.Workpiece {
|
||||
return predicate.Workpiece(sql.FieldEQ(FieldUpdatedAt, v))
|
||||
}
|
||||
|
||||
// SnEQ applies the EQ predicate on the "sn" field.
|
||||
func SnEQ(v string) predicate.Workpiece {
|
||||
return predicate.Workpiece(sql.FieldEQ(FieldSn, v))
|
||||
}
|
||||
|
||||
// SnNEQ applies the NEQ predicate on the "sn" field.
|
||||
func SnNEQ(v string) predicate.Workpiece {
|
||||
return predicate.Workpiece(sql.FieldNEQ(FieldSn, v))
|
||||
}
|
||||
|
||||
// SnIn applies the In predicate on the "sn" field.
|
||||
func SnIn(vs ...string) predicate.Workpiece {
|
||||
return predicate.Workpiece(sql.FieldIn(FieldSn, vs...))
|
||||
}
|
||||
|
||||
// SnNotIn applies the NotIn predicate on the "sn" field.
|
||||
func SnNotIn(vs ...string) predicate.Workpiece {
|
||||
return predicate.Workpiece(sql.FieldNotIn(FieldSn, vs...))
|
||||
}
|
||||
|
||||
// SnGT applies the GT predicate on the "sn" field.
|
||||
func SnGT(v string) predicate.Workpiece {
|
||||
return predicate.Workpiece(sql.FieldGT(FieldSn, v))
|
||||
}
|
||||
|
||||
// SnGTE applies the GTE predicate on the "sn" field.
|
||||
func SnGTE(v string) predicate.Workpiece {
|
||||
return predicate.Workpiece(sql.FieldGTE(FieldSn, v))
|
||||
}
|
||||
|
||||
// SnLT applies the LT predicate on the "sn" field.
|
||||
func SnLT(v string) predicate.Workpiece {
|
||||
return predicate.Workpiece(sql.FieldLT(FieldSn, v))
|
||||
}
|
||||
|
||||
// SnLTE applies the LTE predicate on the "sn" field.
|
||||
func SnLTE(v string) predicate.Workpiece {
|
||||
return predicate.Workpiece(sql.FieldLTE(FieldSn, v))
|
||||
}
|
||||
|
||||
// SnContains applies the Contains predicate on the "sn" field.
|
||||
func SnContains(v string) predicate.Workpiece {
|
||||
return predicate.Workpiece(sql.FieldContains(FieldSn, v))
|
||||
}
|
||||
|
||||
// SnHasPrefix applies the HasPrefix predicate on the "sn" field.
|
||||
func SnHasPrefix(v string) predicate.Workpiece {
|
||||
return predicate.Workpiece(sql.FieldHasPrefix(FieldSn, v))
|
||||
}
|
||||
|
||||
// SnHasSuffix applies the HasSuffix predicate on the "sn" field.
|
||||
func SnHasSuffix(v string) predicate.Workpiece {
|
||||
return predicate.Workpiece(sql.FieldHasSuffix(FieldSn, v))
|
||||
}
|
||||
|
||||
// SnEqualFold applies the EqualFold predicate on the "sn" field.
|
||||
func SnEqualFold(v string) predicate.Workpiece {
|
||||
return predicate.Workpiece(sql.FieldEqualFold(FieldSn, v))
|
||||
}
|
||||
|
||||
// SnContainsFold applies the ContainsFold predicate on the "sn" field.
|
||||
func SnContainsFold(v string) predicate.Workpiece {
|
||||
return predicate.Workpiece(sql.FieldContainsFold(FieldSn, v))
|
||||
}
|
||||
|
||||
// OrderNoEQ applies the EQ predicate on the "orderNo" field.
|
||||
func OrderNoEQ(v string) predicate.Workpiece {
|
||||
return predicate.Workpiece(sql.FieldEQ(FieldOrderNo, v))
|
||||
}
|
||||
|
||||
// OrderNoNEQ applies the NEQ predicate on the "orderNo" field.
|
||||
func OrderNoNEQ(v string) predicate.Workpiece {
|
||||
return predicate.Workpiece(sql.FieldNEQ(FieldOrderNo, v))
|
||||
}
|
||||
|
||||
// OrderNoIn applies the In predicate on the "orderNo" field.
|
||||
func OrderNoIn(vs ...string) predicate.Workpiece {
|
||||
return predicate.Workpiece(sql.FieldIn(FieldOrderNo, vs...))
|
||||
}
|
||||
|
||||
// OrderNoNotIn applies the NotIn predicate on the "orderNo" field.
|
||||
func OrderNoNotIn(vs ...string) predicate.Workpiece {
|
||||
return predicate.Workpiece(sql.FieldNotIn(FieldOrderNo, vs...))
|
||||
}
|
||||
|
||||
// OrderNoGT applies the GT predicate on the "orderNo" field.
|
||||
func OrderNoGT(v string) predicate.Workpiece {
|
||||
return predicate.Workpiece(sql.FieldGT(FieldOrderNo, v))
|
||||
}
|
||||
|
||||
// OrderNoGTE applies the GTE predicate on the "orderNo" field.
|
||||
func OrderNoGTE(v string) predicate.Workpiece {
|
||||
return predicate.Workpiece(sql.FieldGTE(FieldOrderNo, v))
|
||||
}
|
||||
|
||||
// OrderNoLT applies the LT predicate on the "orderNo" field.
|
||||
func OrderNoLT(v string) predicate.Workpiece {
|
||||
return predicate.Workpiece(sql.FieldLT(FieldOrderNo, v))
|
||||
}
|
||||
|
||||
// OrderNoLTE applies the LTE predicate on the "orderNo" field.
|
||||
func OrderNoLTE(v string) predicate.Workpiece {
|
||||
return predicate.Workpiece(sql.FieldLTE(FieldOrderNo, v))
|
||||
}
|
||||
|
||||
// OrderNoContains applies the Contains predicate on the "orderNo" field.
|
||||
func OrderNoContains(v string) predicate.Workpiece {
|
||||
return predicate.Workpiece(sql.FieldContains(FieldOrderNo, v))
|
||||
}
|
||||
|
||||
// OrderNoHasPrefix applies the HasPrefix predicate on the "orderNo" field.
|
||||
func OrderNoHasPrefix(v string) predicate.Workpiece {
|
||||
return predicate.Workpiece(sql.FieldHasPrefix(FieldOrderNo, v))
|
||||
}
|
||||
|
||||
// OrderNoHasSuffix applies the HasSuffix predicate on the "orderNo" field.
|
||||
func OrderNoHasSuffix(v string) predicate.Workpiece {
|
||||
return predicate.Workpiece(sql.FieldHasSuffix(FieldOrderNo, v))
|
||||
}
|
||||
|
||||
// OrderNoEqualFold applies the EqualFold predicate on the "orderNo" field.
|
||||
func OrderNoEqualFold(v string) predicate.Workpiece {
|
||||
return predicate.Workpiece(sql.FieldEqualFold(FieldOrderNo, v))
|
||||
}
|
||||
|
||||
// OrderNoContainsFold applies the ContainsFold predicate on the "orderNo" field.
|
||||
func OrderNoContainsFold(v string) predicate.Workpiece {
|
||||
return predicate.Workpiece(sql.FieldContainsFold(FieldOrderNo, v))
|
||||
}
|
||||
|
||||
// WorkOrderIdEQ applies the EQ predicate on the "workOrderId" field.
|
||||
func WorkOrderIdEQ(v int) predicate.Workpiece {
|
||||
return predicate.Workpiece(sql.FieldEQ(FieldWorkOrderId, v))
|
||||
}
|
||||
|
||||
// WorkOrderIdNEQ applies the NEQ predicate on the "workOrderId" field.
|
||||
func WorkOrderIdNEQ(v int) predicate.Workpiece {
|
||||
return predicate.Workpiece(sql.FieldNEQ(FieldWorkOrderId, v))
|
||||
}
|
||||
|
||||
// WorkOrderIdIn applies the In predicate on the "workOrderId" field.
|
||||
func WorkOrderIdIn(vs ...int) predicate.Workpiece {
|
||||
return predicate.Workpiece(sql.FieldIn(FieldWorkOrderId, vs...))
|
||||
}
|
||||
|
||||
// WorkOrderIdNotIn applies the NotIn predicate on the "workOrderId" field.
|
||||
func WorkOrderIdNotIn(vs ...int) predicate.Workpiece {
|
||||
return predicate.Workpiece(sql.FieldNotIn(FieldWorkOrderId, vs...))
|
||||
}
|
||||
|
||||
// WorkOrderIdGT applies the GT predicate on the "workOrderId" field.
|
||||
func WorkOrderIdGT(v int) predicate.Workpiece {
|
||||
return predicate.Workpiece(sql.FieldGT(FieldWorkOrderId, v))
|
||||
}
|
||||
|
||||
// WorkOrderIdGTE applies the GTE predicate on the "workOrderId" field.
|
||||
func WorkOrderIdGTE(v int) predicate.Workpiece {
|
||||
return predicate.Workpiece(sql.FieldGTE(FieldWorkOrderId, v))
|
||||
}
|
||||
|
||||
// WorkOrderIdLT applies the LT predicate on the "workOrderId" field.
|
||||
func WorkOrderIdLT(v int) predicate.Workpiece {
|
||||
return predicate.Workpiece(sql.FieldLT(FieldWorkOrderId, v))
|
||||
}
|
||||
|
||||
// WorkOrderIdLTE applies the LTE predicate on the "workOrderId" field.
|
||||
func WorkOrderIdLTE(v int) predicate.Workpiece {
|
||||
return predicate.Workpiece(sql.FieldLTE(FieldWorkOrderId, v))
|
||||
}
|
||||
|
||||
// WorkOrderIdIsNil applies the IsNil predicate on the "workOrderId" field.
|
||||
func WorkOrderIdIsNil() predicate.Workpiece {
|
||||
return predicate.Workpiece(sql.FieldIsNull(FieldWorkOrderId))
|
||||
}
|
||||
|
||||
// WorkOrderIdNotNil applies the NotNil predicate on the "workOrderId" field.
|
||||
func WorkOrderIdNotNil() predicate.Workpiece {
|
||||
return predicate.Workpiece(sql.FieldNotNull(FieldWorkOrderId))
|
||||
}
|
||||
|
||||
// ProcessSeqEQ applies the EQ predicate on the "processSeq" field.
|
||||
func ProcessSeqEQ(v string) predicate.Workpiece {
|
||||
return predicate.Workpiece(sql.FieldEQ(FieldProcessSeq, v))
|
||||
}
|
||||
|
||||
// ProcessSeqNEQ applies the NEQ predicate on the "processSeq" field.
|
||||
func ProcessSeqNEQ(v string) predicate.Workpiece {
|
||||
return predicate.Workpiece(sql.FieldNEQ(FieldProcessSeq, v))
|
||||
}
|
||||
|
||||
// ProcessSeqIn applies the In predicate on the "processSeq" field.
|
||||
func ProcessSeqIn(vs ...string) predicate.Workpiece {
|
||||
return predicate.Workpiece(sql.FieldIn(FieldProcessSeq, vs...))
|
||||
}
|
||||
|
||||
// ProcessSeqNotIn applies the NotIn predicate on the "processSeq" field.
|
||||
func ProcessSeqNotIn(vs ...string) predicate.Workpiece {
|
||||
return predicate.Workpiece(sql.FieldNotIn(FieldProcessSeq, vs...))
|
||||
}
|
||||
|
||||
// ProcessSeqGT applies the GT predicate on the "processSeq" field.
|
||||
func ProcessSeqGT(v string) predicate.Workpiece {
|
||||
return predicate.Workpiece(sql.FieldGT(FieldProcessSeq, v))
|
||||
}
|
||||
|
||||
// ProcessSeqGTE applies the GTE predicate on the "processSeq" field.
|
||||
func ProcessSeqGTE(v string) predicate.Workpiece {
|
||||
return predicate.Workpiece(sql.FieldGTE(FieldProcessSeq, v))
|
||||
}
|
||||
|
||||
// ProcessSeqLT applies the LT predicate on the "processSeq" field.
|
||||
func ProcessSeqLT(v string) predicate.Workpiece {
|
||||
return predicate.Workpiece(sql.FieldLT(FieldProcessSeq, v))
|
||||
}
|
||||
|
||||
// ProcessSeqLTE applies the LTE predicate on the "processSeq" field.
|
||||
func ProcessSeqLTE(v string) predicate.Workpiece {
|
||||
return predicate.Workpiece(sql.FieldLTE(FieldProcessSeq, v))
|
||||
}
|
||||
|
||||
// ProcessSeqContains applies the Contains predicate on the "processSeq" field.
|
||||
func ProcessSeqContains(v string) predicate.Workpiece {
|
||||
return predicate.Workpiece(sql.FieldContains(FieldProcessSeq, v))
|
||||
}
|
||||
|
||||
// ProcessSeqHasPrefix applies the HasPrefix predicate on the "processSeq" field.
|
||||
func ProcessSeqHasPrefix(v string) predicate.Workpiece {
|
||||
return predicate.Workpiece(sql.FieldHasPrefix(FieldProcessSeq, v))
|
||||
}
|
||||
|
||||
// ProcessSeqHasSuffix applies the HasSuffix predicate on the "processSeq" field.
|
||||
func ProcessSeqHasSuffix(v string) predicate.Workpiece {
|
||||
return predicate.Workpiece(sql.FieldHasSuffix(FieldProcessSeq, v))
|
||||
}
|
||||
|
||||
// ProcessSeqEqualFold applies the EqualFold predicate on the "processSeq" field.
|
||||
func ProcessSeqEqualFold(v string) predicate.Workpiece {
|
||||
return predicate.Workpiece(sql.FieldEqualFold(FieldProcessSeq, v))
|
||||
}
|
||||
|
||||
// ProcessSeqContainsFold applies the ContainsFold predicate on the "processSeq" field.
|
||||
func ProcessSeqContainsFold(v string) predicate.Workpiece {
|
||||
return predicate.Workpiece(sql.FieldContainsFold(FieldProcessSeq, v))
|
||||
}
|
||||
|
||||
// CurrentProcessEQ applies the EQ predicate on the "currentProcess" field.
|
||||
func CurrentProcessEQ(v int) predicate.Workpiece {
|
||||
return predicate.Workpiece(sql.FieldEQ(FieldCurrentProcess, v))
|
||||
}
|
||||
|
||||
// CurrentProcessNEQ applies the NEQ predicate on the "currentProcess" field.
|
||||
func CurrentProcessNEQ(v int) predicate.Workpiece {
|
||||
return predicate.Workpiece(sql.FieldNEQ(FieldCurrentProcess, v))
|
||||
}
|
||||
|
||||
// CurrentProcessIn applies the In predicate on the "currentProcess" field.
|
||||
func CurrentProcessIn(vs ...int) predicate.Workpiece {
|
||||
return predicate.Workpiece(sql.FieldIn(FieldCurrentProcess, vs...))
|
||||
}
|
||||
|
||||
// CurrentProcessNotIn applies the NotIn predicate on the "currentProcess" field.
|
||||
func CurrentProcessNotIn(vs ...int) predicate.Workpiece {
|
||||
return predicate.Workpiece(sql.FieldNotIn(FieldCurrentProcess, vs...))
|
||||
}
|
||||
|
||||
// CurrentProcessGT applies the GT predicate on the "currentProcess" field.
|
||||
func CurrentProcessGT(v int) predicate.Workpiece {
|
||||
return predicate.Workpiece(sql.FieldGT(FieldCurrentProcess, v))
|
||||
}
|
||||
|
||||
// CurrentProcessGTE applies the GTE predicate on the "currentProcess" field.
|
||||
func CurrentProcessGTE(v int) predicate.Workpiece {
|
||||
return predicate.Workpiece(sql.FieldGTE(FieldCurrentProcess, v))
|
||||
}
|
||||
|
||||
// CurrentProcessLT applies the LT predicate on the "currentProcess" field.
|
||||
func CurrentProcessLT(v int) predicate.Workpiece {
|
||||
return predicate.Workpiece(sql.FieldLT(FieldCurrentProcess, v))
|
||||
}
|
||||
|
||||
// CurrentProcessLTE applies the LTE predicate on the "currentProcess" field.
|
||||
func CurrentProcessLTE(v int) predicate.Workpiece {
|
||||
return predicate.Workpiece(sql.FieldLTE(FieldCurrentProcess, v))
|
||||
}
|
||||
|
||||
// CurrentProcessIsNil applies the IsNil predicate on the "currentProcess" field.
|
||||
func CurrentProcessIsNil() predicate.Workpiece {
|
||||
return predicate.Workpiece(sql.FieldIsNull(FieldCurrentProcess))
|
||||
}
|
||||
|
||||
// CurrentProcessNotNil applies the NotNil predicate on the "currentProcess" field.
|
||||
func CurrentProcessNotNil() predicate.Workpiece {
|
||||
return predicate.Workpiece(sql.FieldNotNull(FieldCurrentProcess))
|
||||
}
|
||||
|
||||
// StatusEQ applies the EQ predicate on the "status" field.
|
||||
func StatusEQ(v string) predicate.Workpiece {
|
||||
return predicate.Workpiece(sql.FieldEQ(FieldStatus, v))
|
||||
}
|
||||
|
||||
// StatusNEQ applies the NEQ predicate on the "status" field.
|
||||
func StatusNEQ(v string) predicate.Workpiece {
|
||||
return predicate.Workpiece(sql.FieldNEQ(FieldStatus, v))
|
||||
}
|
||||
|
||||
// StatusIn applies the In predicate on the "status" field.
|
||||
func StatusIn(vs ...string) predicate.Workpiece {
|
||||
return predicate.Workpiece(sql.FieldIn(FieldStatus, vs...))
|
||||
}
|
||||
|
||||
// StatusNotIn applies the NotIn predicate on the "status" field.
|
||||
func StatusNotIn(vs ...string) predicate.Workpiece {
|
||||
return predicate.Workpiece(sql.FieldNotIn(FieldStatus, vs...))
|
||||
}
|
||||
|
||||
// StatusGT applies the GT predicate on the "status" field.
|
||||
func StatusGT(v string) predicate.Workpiece {
|
||||
return predicate.Workpiece(sql.FieldGT(FieldStatus, v))
|
||||
}
|
||||
|
||||
// StatusGTE applies the GTE predicate on the "status" field.
|
||||
func StatusGTE(v string) predicate.Workpiece {
|
||||
return predicate.Workpiece(sql.FieldGTE(FieldStatus, v))
|
||||
}
|
||||
|
||||
// StatusLT applies the LT predicate on the "status" field.
|
||||
func StatusLT(v string) predicate.Workpiece {
|
||||
return predicate.Workpiece(sql.FieldLT(FieldStatus, v))
|
||||
}
|
||||
|
||||
// StatusLTE applies the LTE predicate on the "status" field.
|
||||
func StatusLTE(v string) predicate.Workpiece {
|
||||
return predicate.Workpiece(sql.FieldLTE(FieldStatus, v))
|
||||
}
|
||||
|
||||
// StatusContains applies the Contains predicate on the "status" field.
|
||||
func StatusContains(v string) predicate.Workpiece {
|
||||
return predicate.Workpiece(sql.FieldContains(FieldStatus, v))
|
||||
}
|
||||
|
||||
// StatusHasPrefix applies the HasPrefix predicate on the "status" field.
|
||||
func StatusHasPrefix(v string) predicate.Workpiece {
|
||||
return predicate.Workpiece(sql.FieldHasPrefix(FieldStatus, v))
|
||||
}
|
||||
|
||||
// StatusHasSuffix applies the HasSuffix predicate on the "status" field.
|
||||
func StatusHasSuffix(v string) predicate.Workpiece {
|
||||
return predicate.Workpiece(sql.FieldHasSuffix(FieldStatus, v))
|
||||
}
|
||||
|
||||
// StatusEqualFold applies the EqualFold predicate on the "status" field.
|
||||
func StatusEqualFold(v string) predicate.Workpiece {
|
||||
return predicate.Workpiece(sql.FieldEqualFold(FieldStatus, v))
|
||||
}
|
||||
|
||||
// StatusContainsFold applies the ContainsFold predicate on the "status" field.
|
||||
func StatusContainsFold(v string) predicate.Workpiece {
|
||||
return predicate.Workpiece(sql.FieldContainsFold(FieldStatus, v))
|
||||
}
|
||||
|
||||
// OnlineAtEQ applies the EQ predicate on the "onlineAt" field.
|
||||
func OnlineAtEQ(v time.Time) predicate.Workpiece {
|
||||
return predicate.Workpiece(sql.FieldEQ(FieldOnlineAt, v))
|
||||
}
|
||||
|
||||
// OnlineAtNEQ applies the NEQ predicate on the "onlineAt" field.
|
||||
func OnlineAtNEQ(v time.Time) predicate.Workpiece {
|
||||
return predicate.Workpiece(sql.FieldNEQ(FieldOnlineAt, v))
|
||||
}
|
||||
|
||||
// OnlineAtIn applies the In predicate on the "onlineAt" field.
|
||||
func OnlineAtIn(vs ...time.Time) predicate.Workpiece {
|
||||
return predicate.Workpiece(sql.FieldIn(FieldOnlineAt, vs...))
|
||||
}
|
||||
|
||||
// OnlineAtNotIn applies the NotIn predicate on the "onlineAt" field.
|
||||
func OnlineAtNotIn(vs ...time.Time) predicate.Workpiece {
|
||||
return predicate.Workpiece(sql.FieldNotIn(FieldOnlineAt, vs...))
|
||||
}
|
||||
|
||||
// OnlineAtGT applies the GT predicate on the "onlineAt" field.
|
||||
func OnlineAtGT(v time.Time) predicate.Workpiece {
|
||||
return predicate.Workpiece(sql.FieldGT(FieldOnlineAt, v))
|
||||
}
|
||||
|
||||
// OnlineAtGTE applies the GTE predicate on the "onlineAt" field.
|
||||
func OnlineAtGTE(v time.Time) predicate.Workpiece {
|
||||
return predicate.Workpiece(sql.FieldGTE(FieldOnlineAt, v))
|
||||
}
|
||||
|
||||
// OnlineAtLT applies the LT predicate on the "onlineAt" field.
|
||||
func OnlineAtLT(v time.Time) predicate.Workpiece {
|
||||
return predicate.Workpiece(sql.FieldLT(FieldOnlineAt, v))
|
||||
}
|
||||
|
||||
// OnlineAtLTE applies the LTE predicate on the "onlineAt" field.
|
||||
func OnlineAtLTE(v time.Time) predicate.Workpiece {
|
||||
return predicate.Workpiece(sql.FieldLTE(FieldOnlineAt, v))
|
||||
}
|
||||
|
||||
// OnlineAtIsNil applies the IsNil predicate on the "onlineAt" field.
|
||||
func OnlineAtIsNil() predicate.Workpiece {
|
||||
return predicate.Workpiece(sql.FieldIsNull(FieldOnlineAt))
|
||||
}
|
||||
|
||||
// OnlineAtNotNil applies the NotNil predicate on the "onlineAt" field.
|
||||
func OnlineAtNotNil() predicate.Workpiece {
|
||||
return predicate.Workpiece(sql.FieldNotNull(FieldOnlineAt))
|
||||
}
|
||||
|
||||
// DoneAtEQ applies the EQ predicate on the "doneAt" field.
|
||||
func DoneAtEQ(v time.Time) predicate.Workpiece {
|
||||
return predicate.Workpiece(sql.FieldEQ(FieldDoneAt, v))
|
||||
}
|
||||
|
||||
// DoneAtNEQ applies the NEQ predicate on the "doneAt" field.
|
||||
func DoneAtNEQ(v time.Time) predicate.Workpiece {
|
||||
return predicate.Workpiece(sql.FieldNEQ(FieldDoneAt, v))
|
||||
}
|
||||
|
||||
// DoneAtIn applies the In predicate on the "doneAt" field.
|
||||
func DoneAtIn(vs ...time.Time) predicate.Workpiece {
|
||||
return predicate.Workpiece(sql.FieldIn(FieldDoneAt, vs...))
|
||||
}
|
||||
|
||||
// DoneAtNotIn applies the NotIn predicate on the "doneAt" field.
|
||||
func DoneAtNotIn(vs ...time.Time) predicate.Workpiece {
|
||||
return predicate.Workpiece(sql.FieldNotIn(FieldDoneAt, vs...))
|
||||
}
|
||||
|
||||
// DoneAtGT applies the GT predicate on the "doneAt" field.
|
||||
func DoneAtGT(v time.Time) predicate.Workpiece {
|
||||
return predicate.Workpiece(sql.FieldGT(FieldDoneAt, v))
|
||||
}
|
||||
|
||||
// DoneAtGTE applies the GTE predicate on the "doneAt" field.
|
||||
func DoneAtGTE(v time.Time) predicate.Workpiece {
|
||||
return predicate.Workpiece(sql.FieldGTE(FieldDoneAt, v))
|
||||
}
|
||||
|
||||
// DoneAtLT applies the LT predicate on the "doneAt" field.
|
||||
func DoneAtLT(v time.Time) predicate.Workpiece {
|
||||
return predicate.Workpiece(sql.FieldLT(FieldDoneAt, v))
|
||||
}
|
||||
|
||||
// DoneAtLTE applies the LTE predicate on the "doneAt" field.
|
||||
func DoneAtLTE(v time.Time) predicate.Workpiece {
|
||||
return predicate.Workpiece(sql.FieldLTE(FieldDoneAt, v))
|
||||
}
|
||||
|
||||
// DoneAtIsNil applies the IsNil predicate on the "doneAt" field.
|
||||
func DoneAtIsNil() predicate.Workpiece {
|
||||
return predicate.Workpiece(sql.FieldIsNull(FieldDoneAt))
|
||||
}
|
||||
|
||||
// DoneAtNotNil applies the NotNil predicate on the "doneAt" field.
|
||||
func DoneAtNotNil() predicate.Workpiece {
|
||||
return predicate.Workpiece(sql.FieldNotNull(FieldDoneAt))
|
||||
}
|
||||
|
||||
// CreatedAtEQ applies the EQ predicate on the "createdAt" field.
|
||||
func CreatedAtEQ(v time.Time) predicate.Workpiece {
|
||||
return predicate.Workpiece(sql.FieldEQ(FieldCreatedAt, v))
|
||||
}
|
||||
|
||||
// CreatedAtNEQ applies the NEQ predicate on the "createdAt" field.
|
||||
func CreatedAtNEQ(v time.Time) predicate.Workpiece {
|
||||
return predicate.Workpiece(sql.FieldNEQ(FieldCreatedAt, v))
|
||||
}
|
||||
|
||||
// CreatedAtIn applies the In predicate on the "createdAt" field.
|
||||
func CreatedAtIn(vs ...time.Time) predicate.Workpiece {
|
||||
return predicate.Workpiece(sql.FieldIn(FieldCreatedAt, vs...))
|
||||
}
|
||||
|
||||
// CreatedAtNotIn applies the NotIn predicate on the "createdAt" field.
|
||||
func CreatedAtNotIn(vs ...time.Time) predicate.Workpiece {
|
||||
return predicate.Workpiece(sql.FieldNotIn(FieldCreatedAt, vs...))
|
||||
}
|
||||
|
||||
// CreatedAtGT applies the GT predicate on the "createdAt" field.
|
||||
func CreatedAtGT(v time.Time) predicate.Workpiece {
|
||||
return predicate.Workpiece(sql.FieldGT(FieldCreatedAt, v))
|
||||
}
|
||||
|
||||
// CreatedAtGTE applies the GTE predicate on the "createdAt" field.
|
||||
func CreatedAtGTE(v time.Time) predicate.Workpiece {
|
||||
return predicate.Workpiece(sql.FieldGTE(FieldCreatedAt, v))
|
||||
}
|
||||
|
||||
// CreatedAtLT applies the LT predicate on the "createdAt" field.
|
||||
func CreatedAtLT(v time.Time) predicate.Workpiece {
|
||||
return predicate.Workpiece(sql.FieldLT(FieldCreatedAt, v))
|
||||
}
|
||||
|
||||
// CreatedAtLTE applies the LTE predicate on the "createdAt" field.
|
||||
func CreatedAtLTE(v time.Time) predicate.Workpiece {
|
||||
return predicate.Workpiece(sql.FieldLTE(FieldCreatedAt, v))
|
||||
}
|
||||
|
||||
// UpdatedAtEQ applies the EQ predicate on the "updatedAt" field.
|
||||
func UpdatedAtEQ(v time.Time) predicate.Workpiece {
|
||||
return predicate.Workpiece(sql.FieldEQ(FieldUpdatedAt, v))
|
||||
}
|
||||
|
||||
// UpdatedAtNEQ applies the NEQ predicate on the "updatedAt" field.
|
||||
func UpdatedAtNEQ(v time.Time) predicate.Workpiece {
|
||||
return predicate.Workpiece(sql.FieldNEQ(FieldUpdatedAt, v))
|
||||
}
|
||||
|
||||
// UpdatedAtIn applies the In predicate on the "updatedAt" field.
|
||||
func UpdatedAtIn(vs ...time.Time) predicate.Workpiece {
|
||||
return predicate.Workpiece(sql.FieldIn(FieldUpdatedAt, vs...))
|
||||
}
|
||||
|
||||
// UpdatedAtNotIn applies the NotIn predicate on the "updatedAt" field.
|
||||
func UpdatedAtNotIn(vs ...time.Time) predicate.Workpiece {
|
||||
return predicate.Workpiece(sql.FieldNotIn(FieldUpdatedAt, vs...))
|
||||
}
|
||||
|
||||
// UpdatedAtGT applies the GT predicate on the "updatedAt" field.
|
||||
func UpdatedAtGT(v time.Time) predicate.Workpiece {
|
||||
return predicate.Workpiece(sql.FieldGT(FieldUpdatedAt, v))
|
||||
}
|
||||
|
||||
// UpdatedAtGTE applies the GTE predicate on the "updatedAt" field.
|
||||
func UpdatedAtGTE(v time.Time) predicate.Workpiece {
|
||||
return predicate.Workpiece(sql.FieldGTE(FieldUpdatedAt, v))
|
||||
}
|
||||
|
||||
// UpdatedAtLT applies the LT predicate on the "updatedAt" field.
|
||||
func UpdatedAtLT(v time.Time) predicate.Workpiece {
|
||||
return predicate.Workpiece(sql.FieldLT(FieldUpdatedAt, v))
|
||||
}
|
||||
|
||||
// UpdatedAtLTE applies the LTE predicate on the "updatedAt" field.
|
||||
func UpdatedAtLTE(v time.Time) predicate.Workpiece {
|
||||
return predicate.Workpiece(sql.FieldLTE(FieldUpdatedAt, v))
|
||||
}
|
||||
|
||||
// UpdatedAtIsNil applies the IsNil predicate on the "updatedAt" field.
|
||||
func UpdatedAtIsNil() predicate.Workpiece {
|
||||
return predicate.Workpiece(sql.FieldIsNull(FieldUpdatedAt))
|
||||
}
|
||||
|
||||
// UpdatedAtNotNil applies the NotNil predicate on the "updatedAt" field.
|
||||
func UpdatedAtNotNil() predicate.Workpiece {
|
||||
return predicate.Workpiece(sql.FieldNotNull(FieldUpdatedAt))
|
||||
}
|
||||
|
||||
// And groups predicates with the AND operator between them.
|
||||
func And(predicates ...predicate.Workpiece) predicate.Workpiece {
|
||||
return predicate.Workpiece(sql.AndPredicates(predicates...))
|
||||
}
|
||||
|
||||
// Or groups predicates with the OR operator between them.
|
||||
func Or(predicates ...predicate.Workpiece) predicate.Workpiece {
|
||||
return predicate.Workpiece(sql.OrPredicates(predicates...))
|
||||
}
|
||||
|
||||
// Not applies the not operator on the given predicate.
|
||||
func Not(p predicate.Workpiece) predicate.Workpiece {
|
||||
return predicate.Workpiece(sql.NotPredicates(p))
|
||||
}
|
||||
@@ -0,0 +1,146 @@
|
||||
// Code generated by ent, DO NOT EDIT.
|
||||
|
||||
package workpiece
|
||||
|
||||
import (
|
||||
"time"
|
||||
|
||||
"entgo.io/ent/dialect/sql"
|
||||
)
|
||||
|
||||
const (
|
||||
// Label holds the string label denoting the workpiece type in the database.
|
||||
Label = "workpiece"
|
||||
// FieldID holds the string denoting the id field in the database.
|
||||
FieldID = "id"
|
||||
// FieldSn holds the string denoting the sn field in the database.
|
||||
FieldSn = "sn"
|
||||
// FieldOrderNo holds the string denoting the orderno field in the database.
|
||||
FieldOrderNo = "order_no"
|
||||
// FieldWorkOrderId holds the string denoting the workorderid field in the database.
|
||||
FieldWorkOrderId = "work_order_id"
|
||||
// FieldProcessSeq holds the string denoting the processseq field in the database.
|
||||
FieldProcessSeq = "process_seq"
|
||||
// FieldCurrentProcess holds the string denoting the currentprocess field in the database.
|
||||
FieldCurrentProcess = "current_process"
|
||||
// FieldStatus holds the string denoting the status field in the database.
|
||||
FieldStatus = "status"
|
||||
// FieldOnlineAt holds the string denoting the onlineat field in the database.
|
||||
FieldOnlineAt = "online_at"
|
||||
// FieldDoneAt holds the string denoting the doneat field in the database.
|
||||
FieldDoneAt = "done_at"
|
||||
// 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 workpiece in the database.
|
||||
Table = "workpiece"
|
||||
)
|
||||
|
||||
// Columns holds all SQL columns for workpiece fields.
|
||||
var Columns = []string{
|
||||
FieldID,
|
||||
FieldSn,
|
||||
FieldOrderNo,
|
||||
FieldWorkOrderId,
|
||||
FieldProcessSeq,
|
||||
FieldCurrentProcess,
|
||||
FieldStatus,
|
||||
FieldOnlineAt,
|
||||
FieldDoneAt,
|
||||
FieldCreatedAt,
|
||||
FieldUpdatedAt,
|
||||
}
|
||||
|
||||
// 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 (
|
||||
// SnValidator is a validator for the "sn" field. It is called by the builders before save.
|
||||
SnValidator func(string) error
|
||||
// DefaultOrderNo holds the default value on creation for the "orderNo" field.
|
||||
DefaultOrderNo string
|
||||
// OrderNoValidator is a validator for the "orderNo" field. It is called by the builders before save.
|
||||
OrderNoValidator func(string) error
|
||||
// DefaultProcessSeq holds the default value on creation for the "processSeq" field.
|
||||
DefaultProcessSeq string
|
||||
// ProcessSeqValidator is a validator for the "processSeq" field. It is called by the builders before save.
|
||||
ProcessSeqValidator func(string) error
|
||||
// DefaultStatus holds the default value on creation for the "status" field.
|
||||
DefaultStatus string
|
||||
// StatusValidator is a validator for the "status" field. It is called by the builders before save.
|
||||
StatusValidator 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
|
||||
)
|
||||
|
||||
// OrderOption defines the ordering options for the Workpiece 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()
|
||||
}
|
||||
|
||||
// BySn orders the results by the sn field.
|
||||
func BySn(opts ...sql.OrderTermOption) OrderOption {
|
||||
return sql.OrderByField(FieldSn, opts...).ToFunc()
|
||||
}
|
||||
|
||||
// ByOrderNo orders the results by the orderNo field.
|
||||
func ByOrderNo(opts ...sql.OrderTermOption) OrderOption {
|
||||
return sql.OrderByField(FieldOrderNo, opts...).ToFunc()
|
||||
}
|
||||
|
||||
// ByWorkOrderId orders the results by the workOrderId field.
|
||||
func ByWorkOrderId(opts ...sql.OrderTermOption) OrderOption {
|
||||
return sql.OrderByField(FieldWorkOrderId, opts...).ToFunc()
|
||||
}
|
||||
|
||||
// ByProcessSeq orders the results by the processSeq field.
|
||||
func ByProcessSeq(opts ...sql.OrderTermOption) OrderOption {
|
||||
return sql.OrderByField(FieldProcessSeq, opts...).ToFunc()
|
||||
}
|
||||
|
||||
// ByCurrentProcess orders the results by the currentProcess field.
|
||||
func ByCurrentProcess(opts ...sql.OrderTermOption) OrderOption {
|
||||
return sql.OrderByField(FieldCurrentProcess, opts...).ToFunc()
|
||||
}
|
||||
|
||||
// ByStatus orders the results by the status field.
|
||||
func ByStatus(opts ...sql.OrderTermOption) OrderOption {
|
||||
return sql.OrderByField(FieldStatus, opts...).ToFunc()
|
||||
}
|
||||
|
||||
// ByOnlineAt orders the results by the onlineAt field.
|
||||
func ByOnlineAt(opts ...sql.OrderTermOption) OrderOption {
|
||||
return sql.OrderByField(FieldOnlineAt, opts...).ToFunc()
|
||||
}
|
||||
|
||||
// ByDoneAt orders the results by the doneAt field.
|
||||
func ByDoneAt(opts ...sql.OrderTermOption) OrderOption {
|
||||
return sql.OrderByField(FieldDoneAt, opts...).ToFunc()
|
||||
}
|
||||
|
||||
// ByCreatedAt orders the results by the createdAt field.
|
||||
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