feat: 新增预警与附件模块,优化工位派工功能
1. 新增预警规则、预警消息、业务附件数据库表与CRUD逻辑 2. 为拧紧记录添加审核人、审核时间字段及审核留痕功能 3. 优化产线点位类型与编号描述,更新工位组合下发菜单名称为工艺路线派工 4. 新增上传文件获取原文件名与大小的工具方法 5. 在系统管理菜单新增预警中心与附件中心入口
This commit is contained in:
@@ -0,0 +1,425 @@
|
||||
// Code generated by ent, DO NOT EDIT.
|
||||
|
||||
package station
|
||||
|
||||
import (
|
||||
"bj_power_mes/predicate"
|
||||
"time"
|
||||
|
||||
"entgo.io/ent/dialect/sql"
|
||||
)
|
||||
|
||||
// ID filters vertices based on their ID field.
|
||||
func ID(id int) predicate.Station {
|
||||
return predicate.Station(sql.FieldEQ(FieldID, id))
|
||||
}
|
||||
|
||||
// IDEQ applies the EQ predicate on the ID field.
|
||||
func IDEQ(id int) predicate.Station {
|
||||
return predicate.Station(sql.FieldEQ(FieldID, id))
|
||||
}
|
||||
|
||||
// IDNEQ applies the NEQ predicate on the ID field.
|
||||
func IDNEQ(id int) predicate.Station {
|
||||
return predicate.Station(sql.FieldNEQ(FieldID, id))
|
||||
}
|
||||
|
||||
// IDIn applies the In predicate on the ID field.
|
||||
func IDIn(ids ...int) predicate.Station {
|
||||
return predicate.Station(sql.FieldIn(FieldID, ids...))
|
||||
}
|
||||
|
||||
// IDNotIn applies the NotIn predicate on the ID field.
|
||||
func IDNotIn(ids ...int) predicate.Station {
|
||||
return predicate.Station(sql.FieldNotIn(FieldID, ids...))
|
||||
}
|
||||
|
||||
// IDGT applies the GT predicate on the ID field.
|
||||
func IDGT(id int) predicate.Station {
|
||||
return predicate.Station(sql.FieldGT(FieldID, id))
|
||||
}
|
||||
|
||||
// IDGTE applies the GTE predicate on the ID field.
|
||||
func IDGTE(id int) predicate.Station {
|
||||
return predicate.Station(sql.FieldGTE(FieldID, id))
|
||||
}
|
||||
|
||||
// IDLT applies the LT predicate on the ID field.
|
||||
func IDLT(id int) predicate.Station {
|
||||
return predicate.Station(sql.FieldLT(FieldID, id))
|
||||
}
|
||||
|
||||
// IDLTE applies the LTE predicate on the ID field.
|
||||
func IDLTE(id int) predicate.Station {
|
||||
return predicate.Station(sql.FieldLTE(FieldID, id))
|
||||
}
|
||||
|
||||
// StationNo applies equality check predicate on the "stationNo" field. It's identical to StationNoEQ.
|
||||
func StationNo(v int) predicate.Station {
|
||||
return predicate.Station(sql.FieldEQ(FieldStationNo, v))
|
||||
}
|
||||
|
||||
// Name applies equality check predicate on the "name" field. It's identical to NameEQ.
|
||||
func Name(v string) predicate.Station {
|
||||
return predicate.Station(sql.FieldEQ(FieldName, v))
|
||||
}
|
||||
|
||||
// FlowId applies equality check predicate on the "flowId" field. It's identical to FlowIdEQ.
|
||||
func FlowId(v int) predicate.Station {
|
||||
return predicate.Station(sql.FieldEQ(FieldFlowId, v))
|
||||
}
|
||||
|
||||
// StationType applies equality check predicate on the "stationType" field. It's identical to StationTypeEQ.
|
||||
func StationType(v string) predicate.Station {
|
||||
return predicate.Station(sql.FieldEQ(FieldStationType, v))
|
||||
}
|
||||
|
||||
// Status applies equality check predicate on the "status" field. It's identical to StatusEQ.
|
||||
func Status(v string) predicate.Station {
|
||||
return predicate.Station(sql.FieldEQ(FieldStatus, v))
|
||||
}
|
||||
|
||||
// CreatedAt applies equality check predicate on the "createdAt" field. It's identical to CreatedAtEQ.
|
||||
func CreatedAt(v time.Time) predicate.Station {
|
||||
return predicate.Station(sql.FieldEQ(FieldCreatedAt, v))
|
||||
}
|
||||
|
||||
// StationNoEQ applies the EQ predicate on the "stationNo" field.
|
||||
func StationNoEQ(v int) predicate.Station {
|
||||
return predicate.Station(sql.FieldEQ(FieldStationNo, v))
|
||||
}
|
||||
|
||||
// StationNoNEQ applies the NEQ predicate on the "stationNo" field.
|
||||
func StationNoNEQ(v int) predicate.Station {
|
||||
return predicate.Station(sql.FieldNEQ(FieldStationNo, v))
|
||||
}
|
||||
|
||||
// StationNoIn applies the In predicate on the "stationNo" field.
|
||||
func StationNoIn(vs ...int) predicate.Station {
|
||||
return predicate.Station(sql.FieldIn(FieldStationNo, vs...))
|
||||
}
|
||||
|
||||
// StationNoNotIn applies the NotIn predicate on the "stationNo" field.
|
||||
func StationNoNotIn(vs ...int) predicate.Station {
|
||||
return predicate.Station(sql.FieldNotIn(FieldStationNo, vs...))
|
||||
}
|
||||
|
||||
// StationNoGT applies the GT predicate on the "stationNo" field.
|
||||
func StationNoGT(v int) predicate.Station {
|
||||
return predicate.Station(sql.FieldGT(FieldStationNo, v))
|
||||
}
|
||||
|
||||
// StationNoGTE applies the GTE predicate on the "stationNo" field.
|
||||
func StationNoGTE(v int) predicate.Station {
|
||||
return predicate.Station(sql.FieldGTE(FieldStationNo, v))
|
||||
}
|
||||
|
||||
// StationNoLT applies the LT predicate on the "stationNo" field.
|
||||
func StationNoLT(v int) predicate.Station {
|
||||
return predicate.Station(sql.FieldLT(FieldStationNo, v))
|
||||
}
|
||||
|
||||
// StationNoLTE applies the LTE predicate on the "stationNo" field.
|
||||
func StationNoLTE(v int) predicate.Station {
|
||||
return predicate.Station(sql.FieldLTE(FieldStationNo, v))
|
||||
}
|
||||
|
||||
// NameEQ applies the EQ predicate on the "name" field.
|
||||
func NameEQ(v string) predicate.Station {
|
||||
return predicate.Station(sql.FieldEQ(FieldName, v))
|
||||
}
|
||||
|
||||
// NameNEQ applies the NEQ predicate on the "name" field.
|
||||
func NameNEQ(v string) predicate.Station {
|
||||
return predicate.Station(sql.FieldNEQ(FieldName, v))
|
||||
}
|
||||
|
||||
// NameIn applies the In predicate on the "name" field.
|
||||
func NameIn(vs ...string) predicate.Station {
|
||||
return predicate.Station(sql.FieldIn(FieldName, vs...))
|
||||
}
|
||||
|
||||
// NameNotIn applies the NotIn predicate on the "name" field.
|
||||
func NameNotIn(vs ...string) predicate.Station {
|
||||
return predicate.Station(sql.FieldNotIn(FieldName, vs...))
|
||||
}
|
||||
|
||||
// NameGT applies the GT predicate on the "name" field.
|
||||
func NameGT(v string) predicate.Station {
|
||||
return predicate.Station(sql.FieldGT(FieldName, v))
|
||||
}
|
||||
|
||||
// NameGTE applies the GTE predicate on the "name" field.
|
||||
func NameGTE(v string) predicate.Station {
|
||||
return predicate.Station(sql.FieldGTE(FieldName, v))
|
||||
}
|
||||
|
||||
// NameLT applies the LT predicate on the "name" field.
|
||||
func NameLT(v string) predicate.Station {
|
||||
return predicate.Station(sql.FieldLT(FieldName, v))
|
||||
}
|
||||
|
||||
// NameLTE applies the LTE predicate on the "name" field.
|
||||
func NameLTE(v string) predicate.Station {
|
||||
return predicate.Station(sql.FieldLTE(FieldName, v))
|
||||
}
|
||||
|
||||
// NameContains applies the Contains predicate on the "name" field.
|
||||
func NameContains(v string) predicate.Station {
|
||||
return predicate.Station(sql.FieldContains(FieldName, v))
|
||||
}
|
||||
|
||||
// NameHasPrefix applies the HasPrefix predicate on the "name" field.
|
||||
func NameHasPrefix(v string) predicate.Station {
|
||||
return predicate.Station(sql.FieldHasPrefix(FieldName, v))
|
||||
}
|
||||
|
||||
// NameHasSuffix applies the HasSuffix predicate on the "name" field.
|
||||
func NameHasSuffix(v string) predicate.Station {
|
||||
return predicate.Station(sql.FieldHasSuffix(FieldName, v))
|
||||
}
|
||||
|
||||
// NameEqualFold applies the EqualFold predicate on the "name" field.
|
||||
func NameEqualFold(v string) predicate.Station {
|
||||
return predicate.Station(sql.FieldEqualFold(FieldName, v))
|
||||
}
|
||||
|
||||
// NameContainsFold applies the ContainsFold predicate on the "name" field.
|
||||
func NameContainsFold(v string) predicate.Station {
|
||||
return predicate.Station(sql.FieldContainsFold(FieldName, v))
|
||||
}
|
||||
|
||||
// FlowIdEQ applies the EQ predicate on the "flowId" field.
|
||||
func FlowIdEQ(v int) predicate.Station {
|
||||
return predicate.Station(sql.FieldEQ(FieldFlowId, v))
|
||||
}
|
||||
|
||||
// FlowIdNEQ applies the NEQ predicate on the "flowId" field.
|
||||
func FlowIdNEQ(v int) predicate.Station {
|
||||
return predicate.Station(sql.FieldNEQ(FieldFlowId, v))
|
||||
}
|
||||
|
||||
// FlowIdIn applies the In predicate on the "flowId" field.
|
||||
func FlowIdIn(vs ...int) predicate.Station {
|
||||
return predicate.Station(sql.FieldIn(FieldFlowId, vs...))
|
||||
}
|
||||
|
||||
// FlowIdNotIn applies the NotIn predicate on the "flowId" field.
|
||||
func FlowIdNotIn(vs ...int) predicate.Station {
|
||||
return predicate.Station(sql.FieldNotIn(FieldFlowId, vs...))
|
||||
}
|
||||
|
||||
// FlowIdGT applies the GT predicate on the "flowId" field.
|
||||
func FlowIdGT(v int) predicate.Station {
|
||||
return predicate.Station(sql.FieldGT(FieldFlowId, v))
|
||||
}
|
||||
|
||||
// FlowIdGTE applies the GTE predicate on the "flowId" field.
|
||||
func FlowIdGTE(v int) predicate.Station {
|
||||
return predicate.Station(sql.FieldGTE(FieldFlowId, v))
|
||||
}
|
||||
|
||||
// FlowIdLT applies the LT predicate on the "flowId" field.
|
||||
func FlowIdLT(v int) predicate.Station {
|
||||
return predicate.Station(sql.FieldLT(FieldFlowId, v))
|
||||
}
|
||||
|
||||
// FlowIdLTE applies the LTE predicate on the "flowId" field.
|
||||
func FlowIdLTE(v int) predicate.Station {
|
||||
return predicate.Station(sql.FieldLTE(FieldFlowId, v))
|
||||
}
|
||||
|
||||
// FlowIdIsNil applies the IsNil predicate on the "flowId" field.
|
||||
func FlowIdIsNil() predicate.Station {
|
||||
return predicate.Station(sql.FieldIsNull(FieldFlowId))
|
||||
}
|
||||
|
||||
// FlowIdNotNil applies the NotNil predicate on the "flowId" field.
|
||||
func FlowIdNotNil() predicate.Station {
|
||||
return predicate.Station(sql.FieldNotNull(FieldFlowId))
|
||||
}
|
||||
|
||||
// StationTypeEQ applies the EQ predicate on the "stationType" field.
|
||||
func StationTypeEQ(v string) predicate.Station {
|
||||
return predicate.Station(sql.FieldEQ(FieldStationType, v))
|
||||
}
|
||||
|
||||
// StationTypeNEQ applies the NEQ predicate on the "stationType" field.
|
||||
func StationTypeNEQ(v string) predicate.Station {
|
||||
return predicate.Station(sql.FieldNEQ(FieldStationType, v))
|
||||
}
|
||||
|
||||
// StationTypeIn applies the In predicate on the "stationType" field.
|
||||
func StationTypeIn(vs ...string) predicate.Station {
|
||||
return predicate.Station(sql.FieldIn(FieldStationType, vs...))
|
||||
}
|
||||
|
||||
// StationTypeNotIn applies the NotIn predicate on the "stationType" field.
|
||||
func StationTypeNotIn(vs ...string) predicate.Station {
|
||||
return predicate.Station(sql.FieldNotIn(FieldStationType, vs...))
|
||||
}
|
||||
|
||||
// StationTypeGT applies the GT predicate on the "stationType" field.
|
||||
func StationTypeGT(v string) predicate.Station {
|
||||
return predicate.Station(sql.FieldGT(FieldStationType, v))
|
||||
}
|
||||
|
||||
// StationTypeGTE applies the GTE predicate on the "stationType" field.
|
||||
func StationTypeGTE(v string) predicate.Station {
|
||||
return predicate.Station(sql.FieldGTE(FieldStationType, v))
|
||||
}
|
||||
|
||||
// StationTypeLT applies the LT predicate on the "stationType" field.
|
||||
func StationTypeLT(v string) predicate.Station {
|
||||
return predicate.Station(sql.FieldLT(FieldStationType, v))
|
||||
}
|
||||
|
||||
// StationTypeLTE applies the LTE predicate on the "stationType" field.
|
||||
func StationTypeLTE(v string) predicate.Station {
|
||||
return predicate.Station(sql.FieldLTE(FieldStationType, v))
|
||||
}
|
||||
|
||||
// StationTypeContains applies the Contains predicate on the "stationType" field.
|
||||
func StationTypeContains(v string) predicate.Station {
|
||||
return predicate.Station(sql.FieldContains(FieldStationType, v))
|
||||
}
|
||||
|
||||
// StationTypeHasPrefix applies the HasPrefix predicate on the "stationType" field.
|
||||
func StationTypeHasPrefix(v string) predicate.Station {
|
||||
return predicate.Station(sql.FieldHasPrefix(FieldStationType, v))
|
||||
}
|
||||
|
||||
// StationTypeHasSuffix applies the HasSuffix predicate on the "stationType" field.
|
||||
func StationTypeHasSuffix(v string) predicate.Station {
|
||||
return predicate.Station(sql.FieldHasSuffix(FieldStationType, v))
|
||||
}
|
||||
|
||||
// StationTypeEqualFold applies the EqualFold predicate on the "stationType" field.
|
||||
func StationTypeEqualFold(v string) predicate.Station {
|
||||
return predicate.Station(sql.FieldEqualFold(FieldStationType, v))
|
||||
}
|
||||
|
||||
// StationTypeContainsFold applies the ContainsFold predicate on the "stationType" field.
|
||||
func StationTypeContainsFold(v string) predicate.Station {
|
||||
return predicate.Station(sql.FieldContainsFold(FieldStationType, v))
|
||||
}
|
||||
|
||||
// StatusEQ applies the EQ predicate on the "status" field.
|
||||
func StatusEQ(v string) predicate.Station {
|
||||
return predicate.Station(sql.FieldEQ(FieldStatus, v))
|
||||
}
|
||||
|
||||
// StatusNEQ applies the NEQ predicate on the "status" field.
|
||||
func StatusNEQ(v string) predicate.Station {
|
||||
return predicate.Station(sql.FieldNEQ(FieldStatus, v))
|
||||
}
|
||||
|
||||
// StatusIn applies the In predicate on the "status" field.
|
||||
func StatusIn(vs ...string) predicate.Station {
|
||||
return predicate.Station(sql.FieldIn(FieldStatus, vs...))
|
||||
}
|
||||
|
||||
// StatusNotIn applies the NotIn predicate on the "status" field.
|
||||
func StatusNotIn(vs ...string) predicate.Station {
|
||||
return predicate.Station(sql.FieldNotIn(FieldStatus, vs...))
|
||||
}
|
||||
|
||||
// StatusGT applies the GT predicate on the "status" field.
|
||||
func StatusGT(v string) predicate.Station {
|
||||
return predicate.Station(sql.FieldGT(FieldStatus, v))
|
||||
}
|
||||
|
||||
// StatusGTE applies the GTE predicate on the "status" field.
|
||||
func StatusGTE(v string) predicate.Station {
|
||||
return predicate.Station(sql.FieldGTE(FieldStatus, v))
|
||||
}
|
||||
|
||||
// StatusLT applies the LT predicate on the "status" field.
|
||||
func StatusLT(v string) predicate.Station {
|
||||
return predicate.Station(sql.FieldLT(FieldStatus, v))
|
||||
}
|
||||
|
||||
// StatusLTE applies the LTE predicate on the "status" field.
|
||||
func StatusLTE(v string) predicate.Station {
|
||||
return predicate.Station(sql.FieldLTE(FieldStatus, v))
|
||||
}
|
||||
|
||||
// StatusContains applies the Contains predicate on the "status" field.
|
||||
func StatusContains(v string) predicate.Station {
|
||||
return predicate.Station(sql.FieldContains(FieldStatus, v))
|
||||
}
|
||||
|
||||
// StatusHasPrefix applies the HasPrefix predicate on the "status" field.
|
||||
func StatusHasPrefix(v string) predicate.Station {
|
||||
return predicate.Station(sql.FieldHasPrefix(FieldStatus, v))
|
||||
}
|
||||
|
||||
// StatusHasSuffix applies the HasSuffix predicate on the "status" field.
|
||||
func StatusHasSuffix(v string) predicate.Station {
|
||||
return predicate.Station(sql.FieldHasSuffix(FieldStatus, v))
|
||||
}
|
||||
|
||||
// StatusEqualFold applies the EqualFold predicate on the "status" field.
|
||||
func StatusEqualFold(v string) predicate.Station {
|
||||
return predicate.Station(sql.FieldEqualFold(FieldStatus, v))
|
||||
}
|
||||
|
||||
// StatusContainsFold applies the ContainsFold predicate on the "status" field.
|
||||
func StatusContainsFold(v string) predicate.Station {
|
||||
return predicate.Station(sql.FieldContainsFold(FieldStatus, v))
|
||||
}
|
||||
|
||||
// CreatedAtEQ applies the EQ predicate on the "createdAt" field.
|
||||
func CreatedAtEQ(v time.Time) predicate.Station {
|
||||
return predicate.Station(sql.FieldEQ(FieldCreatedAt, v))
|
||||
}
|
||||
|
||||
// CreatedAtNEQ applies the NEQ predicate on the "createdAt" field.
|
||||
func CreatedAtNEQ(v time.Time) predicate.Station {
|
||||
return predicate.Station(sql.FieldNEQ(FieldCreatedAt, v))
|
||||
}
|
||||
|
||||
// CreatedAtIn applies the In predicate on the "createdAt" field.
|
||||
func CreatedAtIn(vs ...time.Time) predicate.Station {
|
||||
return predicate.Station(sql.FieldIn(FieldCreatedAt, vs...))
|
||||
}
|
||||
|
||||
// CreatedAtNotIn applies the NotIn predicate on the "createdAt" field.
|
||||
func CreatedAtNotIn(vs ...time.Time) predicate.Station {
|
||||
return predicate.Station(sql.FieldNotIn(FieldCreatedAt, vs...))
|
||||
}
|
||||
|
||||
// CreatedAtGT applies the GT predicate on the "createdAt" field.
|
||||
func CreatedAtGT(v time.Time) predicate.Station {
|
||||
return predicate.Station(sql.FieldGT(FieldCreatedAt, v))
|
||||
}
|
||||
|
||||
// CreatedAtGTE applies the GTE predicate on the "createdAt" field.
|
||||
func CreatedAtGTE(v time.Time) predicate.Station {
|
||||
return predicate.Station(sql.FieldGTE(FieldCreatedAt, v))
|
||||
}
|
||||
|
||||
// CreatedAtLT applies the LT predicate on the "createdAt" field.
|
||||
func CreatedAtLT(v time.Time) predicate.Station {
|
||||
return predicate.Station(sql.FieldLT(FieldCreatedAt, v))
|
||||
}
|
||||
|
||||
// CreatedAtLTE applies the LTE predicate on the "createdAt" field.
|
||||
func CreatedAtLTE(v time.Time) predicate.Station {
|
||||
return predicate.Station(sql.FieldLTE(FieldCreatedAt, v))
|
||||
}
|
||||
|
||||
// And groups predicates with the AND operator between them.
|
||||
func And(predicates ...predicate.Station) predicate.Station {
|
||||
return predicate.Station(sql.AndPredicates(predicates...))
|
||||
}
|
||||
|
||||
// Or groups predicates with the OR operator between them.
|
||||
func Or(predicates ...predicate.Station) predicate.Station {
|
||||
return predicate.Station(sql.OrPredicates(predicates...))
|
||||
}
|
||||
|
||||
// Not applies the not operator on the given predicate.
|
||||
func Not(p predicate.Station) predicate.Station {
|
||||
return predicate.Station(sql.NotPredicates(p))
|
||||
}
|
||||
Reference in New Issue
Block a user