feat(mes/wms/终端): 工位终端状态感知 + 全厂统一账号 + 单号短号规则 + 退料SN逐颗核对闭环(2026-11-26~28 现场整改)

【MES · 工位终端状态感知(11-28 第十三节拍板)】
- 新增 station_terminal_state / station_terminal_event 两表:当前状态镜像 + 状态变化流水
- 在线判定走既有 SSE 长连接存活:建连/断连/30s ping 心跳,90s 无心跳判离线,零 HTTP 轮询
- 登录/退出/暂停/恢复由终端事件驱动上报;新增「终端状态」管理页(produce.terminalstate,仅超级管理员):看在线/登录/操作人/接单/下班判定/心跳,抽屉看状态流水
- 库管代退料前置条件②「工人已下班」据此判定:未登录或终端离线任一即下班

【工位终端 · 全厂统一账号(11-28 拍板)】
- 删除本地账号表与 seed,登录直连 MES 用户表;本地 SQLite 只剩操作日志+登录态,断网不能换人
- SSE 客户端携带本机固定工位号,MES 据连接存活映射该工位在线状态

【单号短号规则(11-27 拍板)】
- 叫料单 MR / 叫料包 PK / 转产退库 TR / 配送单 DL:改「前缀+YYMMDD+3位当天序号」,每天从 001 归零、超 999 进 4 位
- MR 与 TR 同列不同前缀独立计数不撞号;进程内互斥分配 + DB 唯一索引兜底;历史时间戳号一律不动

【退料闭环(11-28)】
- 退库单新增 sn_list:工位提交的待退 SN 清单落库,收货逐颗扫码核对(不按批次分组、允许跨批次混合,所属批次系统按 SN 带出,库管不必填)
- 收货改大数量必须有实物依据:SN 件以精确扫描的最终清单为准(条数相等且不重复);批次件必须落到真实启用的四级库位,禁止凭空加库存
- 余量参考值口径定稿(N4):应剩余量 = 实际备料 − 已消耗 − 已退 − 已损耗
- 损耗台账取消「后审核批注」:删 status/comment/commenter/commented_at 字段,WMS 确认收货当场落账闭环,MES 台账只读

【日排产 · 两种 PENDING 区分(11-26 口径定稿)】
- daily_plan 新增 discarded 废弃标记:停用打标、新建不打标;额度只算 CONFIRMED + 未废弃 PENDING
- 工单管「要干几台」、日排产管「按天从哪个工位领多少料」,两张账不合并不互倒推;排产合计可小于工单数(缺口靠借料/补料审批摆出,不自动兜底)

【其他】
- SN 查询大小写脱敏(11-27):存储原样不强制大小写,匹配 LOWER(sn)=LOWER(?),扫 ABC-0001 与 abc-0001 命中同一件
- 拧紧枪人工跳过链路:设备未连接时人工跳过上报,「拧紧跳过(设备未连接)」前缀单独列示,不写 torque_record 绝不冒充设备结果
- 单据流转提示规则表全量 35 条(MES 18 + WMS 17):常驻提示条、单号可复制;单号字段逐条对后端响应实测,取不到不显示复制按钮
- PLC 快照缓存/对账、产线清线、绩效与拧紧枪配置页同步修正

【文档】
- 新增《临时结束.md》2026-11-26 日排产/叫料/完工口径大讨论定稿(含状态专项结论与被推翻旧说法留档);问题临时.md 全量更新
This commit is contained in:
SunYF
2026-11-28 13:44:51 +08:00
parent 79a9d7846d
commit 88875c1f13
163 changed files with 11754 additions and 3021 deletions
@@ -0,0 +1,116 @@
// Code generated by ent, DO NOT EDIT.
package stationterminalevent
import (
"entgo.io/ent/dialect/sql"
)
const (
// Label holds the string label denoting the stationterminalevent type in the database.
Label = "station_terminal_event"
// FieldID holds the string denoting the id field in the database.
FieldID = "id"
// FieldStationNo holds the string denoting the stationno field in the database.
FieldStationNo = "station_no"
// FieldEvent holds the string denoting the event field in the database.
FieldEvent = "event"
// FieldLoggedIn holds the string denoting the loggedin field in the database.
FieldLoggedIn = "logged_in"
// FieldPowered holds the string denoting the powered field in the database.
FieldPowered = "powered"
// FieldOperator holds the string denoting the operator field in the database.
FieldOperator = "operator"
// FieldDetail holds the string denoting the detail field in the database.
FieldDetail = "detail"
// FieldCreatedAt holds the string denoting the createdat field in the database.
FieldCreatedAt = "created_at"
// Table holds the table name of the stationterminalevent in the database.
Table = "station_terminal_event"
)
// Columns holds all SQL columns for stationterminalevent fields.
var Columns = []string{
FieldID,
FieldStationNo,
FieldEvent,
FieldLoggedIn,
FieldPowered,
FieldOperator,
FieldDetail,
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 (
// EventValidator is a validator for the "event" field. It is called by the builders before save.
EventValidator func(string) error
// DefaultLoggedIn holds the default value on creation for the "loggedIn" field.
DefaultLoggedIn bool
// DefaultPowered holds the default value on creation for the "powered" field.
DefaultPowered bool
// DefaultOperator holds the default value on creation for the "operator" field.
DefaultOperator string
// OperatorValidator is a validator for the "operator" field. It is called by the builders before save.
OperatorValidator func(string) error
// DefaultDetail holds the default value on creation for the "detail" field.
DefaultDetail string
// DetailValidator is a validator for the "detail" field. It is called by the builders before save.
DetailValidator func(string) error
// DefaultCreatedAt holds the default value on creation for the "createdAt" field.
DefaultCreatedAt int64
// 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 StationTerminalEvent 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()
}
// ByStationNo orders the results by the stationNo field.
func ByStationNo(opts ...sql.OrderTermOption) OrderOption {
return sql.OrderByField(FieldStationNo, opts...).ToFunc()
}
// ByEvent orders the results by the event field.
func ByEvent(opts ...sql.OrderTermOption) OrderOption {
return sql.OrderByField(FieldEvent, opts...).ToFunc()
}
// ByLoggedIn orders the results by the loggedIn field.
func ByLoggedIn(opts ...sql.OrderTermOption) OrderOption {
return sql.OrderByField(FieldLoggedIn, opts...).ToFunc()
}
// ByPowered orders the results by the powered field.
func ByPowered(opts ...sql.OrderTermOption) OrderOption {
return sql.OrderByField(FieldPowered, opts...).ToFunc()
}
// ByOperator orders the results by the operator field.
func ByOperator(opts ...sql.OrderTermOption) OrderOption {
return sql.OrderByField(FieldOperator, opts...).ToFunc()
}
// ByDetail orders the results by the detail field.
func ByDetail(opts ...sql.OrderTermOption) OrderOption {
return sql.OrderByField(FieldDetail, 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,399 @@
// Code generated by ent, DO NOT EDIT.
package stationterminalevent
import (
"bj_power_mes/ent/predicate"
"entgo.io/ent/dialect/sql"
)
// ID filters vertices based on their ID field.
func ID(id int) predicate.StationTerminalEvent {
return predicate.StationTerminalEvent(sql.FieldEQ(FieldID, id))
}
// IDEQ applies the EQ predicate on the ID field.
func IDEQ(id int) predicate.StationTerminalEvent {
return predicate.StationTerminalEvent(sql.FieldEQ(FieldID, id))
}
// IDNEQ applies the NEQ predicate on the ID field.
func IDNEQ(id int) predicate.StationTerminalEvent {
return predicate.StationTerminalEvent(sql.FieldNEQ(FieldID, id))
}
// IDIn applies the In predicate on the ID field.
func IDIn(ids ...int) predicate.StationTerminalEvent {
return predicate.StationTerminalEvent(sql.FieldIn(FieldID, ids...))
}
// IDNotIn applies the NotIn predicate on the ID field.
func IDNotIn(ids ...int) predicate.StationTerminalEvent {
return predicate.StationTerminalEvent(sql.FieldNotIn(FieldID, ids...))
}
// IDGT applies the GT predicate on the ID field.
func IDGT(id int) predicate.StationTerminalEvent {
return predicate.StationTerminalEvent(sql.FieldGT(FieldID, id))
}
// IDGTE applies the GTE predicate on the ID field.
func IDGTE(id int) predicate.StationTerminalEvent {
return predicate.StationTerminalEvent(sql.FieldGTE(FieldID, id))
}
// IDLT applies the LT predicate on the ID field.
func IDLT(id int) predicate.StationTerminalEvent {
return predicate.StationTerminalEvent(sql.FieldLT(FieldID, id))
}
// IDLTE applies the LTE predicate on the ID field.
func IDLTE(id int) predicate.StationTerminalEvent {
return predicate.StationTerminalEvent(sql.FieldLTE(FieldID, id))
}
// StationNo applies equality check predicate on the "stationNo" field. It's identical to StationNoEQ.
func StationNo(v int) predicate.StationTerminalEvent {
return predicate.StationTerminalEvent(sql.FieldEQ(FieldStationNo, v))
}
// Event applies equality check predicate on the "event" field. It's identical to EventEQ.
func Event(v string) predicate.StationTerminalEvent {
return predicate.StationTerminalEvent(sql.FieldEQ(FieldEvent, v))
}
// LoggedIn applies equality check predicate on the "loggedIn" field. It's identical to LoggedInEQ.
func LoggedIn(v bool) predicate.StationTerminalEvent {
return predicate.StationTerminalEvent(sql.FieldEQ(FieldLoggedIn, v))
}
// Powered applies equality check predicate on the "powered" field. It's identical to PoweredEQ.
func Powered(v bool) predicate.StationTerminalEvent {
return predicate.StationTerminalEvent(sql.FieldEQ(FieldPowered, v))
}
// Operator applies equality check predicate on the "operator" field. It's identical to OperatorEQ.
func Operator(v string) predicate.StationTerminalEvent {
return predicate.StationTerminalEvent(sql.FieldEQ(FieldOperator, v))
}
// Detail applies equality check predicate on the "detail" field. It's identical to DetailEQ.
func Detail(v string) predicate.StationTerminalEvent {
return predicate.StationTerminalEvent(sql.FieldEQ(FieldDetail, v))
}
// CreatedAt applies equality check predicate on the "createdAt" field. It's identical to CreatedAtEQ.
func CreatedAt(v int64) predicate.StationTerminalEvent {
return predicate.StationTerminalEvent(sql.FieldEQ(FieldCreatedAt, v))
}
// StationNoEQ applies the EQ predicate on the "stationNo" field.
func StationNoEQ(v int) predicate.StationTerminalEvent {
return predicate.StationTerminalEvent(sql.FieldEQ(FieldStationNo, v))
}
// StationNoNEQ applies the NEQ predicate on the "stationNo" field.
func StationNoNEQ(v int) predicate.StationTerminalEvent {
return predicate.StationTerminalEvent(sql.FieldNEQ(FieldStationNo, v))
}
// StationNoIn applies the In predicate on the "stationNo" field.
func StationNoIn(vs ...int) predicate.StationTerminalEvent {
return predicate.StationTerminalEvent(sql.FieldIn(FieldStationNo, vs...))
}
// StationNoNotIn applies the NotIn predicate on the "stationNo" field.
func StationNoNotIn(vs ...int) predicate.StationTerminalEvent {
return predicate.StationTerminalEvent(sql.FieldNotIn(FieldStationNo, vs...))
}
// StationNoGT applies the GT predicate on the "stationNo" field.
func StationNoGT(v int) predicate.StationTerminalEvent {
return predicate.StationTerminalEvent(sql.FieldGT(FieldStationNo, v))
}
// StationNoGTE applies the GTE predicate on the "stationNo" field.
func StationNoGTE(v int) predicate.StationTerminalEvent {
return predicate.StationTerminalEvent(sql.FieldGTE(FieldStationNo, v))
}
// StationNoLT applies the LT predicate on the "stationNo" field.
func StationNoLT(v int) predicate.StationTerminalEvent {
return predicate.StationTerminalEvent(sql.FieldLT(FieldStationNo, v))
}
// StationNoLTE applies the LTE predicate on the "stationNo" field.
func StationNoLTE(v int) predicate.StationTerminalEvent {
return predicate.StationTerminalEvent(sql.FieldLTE(FieldStationNo, v))
}
// EventEQ applies the EQ predicate on the "event" field.
func EventEQ(v string) predicate.StationTerminalEvent {
return predicate.StationTerminalEvent(sql.FieldEQ(FieldEvent, v))
}
// EventNEQ applies the NEQ predicate on the "event" field.
func EventNEQ(v string) predicate.StationTerminalEvent {
return predicate.StationTerminalEvent(sql.FieldNEQ(FieldEvent, v))
}
// EventIn applies the In predicate on the "event" field.
func EventIn(vs ...string) predicate.StationTerminalEvent {
return predicate.StationTerminalEvent(sql.FieldIn(FieldEvent, vs...))
}
// EventNotIn applies the NotIn predicate on the "event" field.
func EventNotIn(vs ...string) predicate.StationTerminalEvent {
return predicate.StationTerminalEvent(sql.FieldNotIn(FieldEvent, vs...))
}
// EventGT applies the GT predicate on the "event" field.
func EventGT(v string) predicate.StationTerminalEvent {
return predicate.StationTerminalEvent(sql.FieldGT(FieldEvent, v))
}
// EventGTE applies the GTE predicate on the "event" field.
func EventGTE(v string) predicate.StationTerminalEvent {
return predicate.StationTerminalEvent(sql.FieldGTE(FieldEvent, v))
}
// EventLT applies the LT predicate on the "event" field.
func EventLT(v string) predicate.StationTerminalEvent {
return predicate.StationTerminalEvent(sql.FieldLT(FieldEvent, v))
}
// EventLTE applies the LTE predicate on the "event" field.
func EventLTE(v string) predicate.StationTerminalEvent {
return predicate.StationTerminalEvent(sql.FieldLTE(FieldEvent, v))
}
// EventContains applies the Contains predicate on the "event" field.
func EventContains(v string) predicate.StationTerminalEvent {
return predicate.StationTerminalEvent(sql.FieldContains(FieldEvent, v))
}
// EventHasPrefix applies the HasPrefix predicate on the "event" field.
func EventHasPrefix(v string) predicate.StationTerminalEvent {
return predicate.StationTerminalEvent(sql.FieldHasPrefix(FieldEvent, v))
}
// EventHasSuffix applies the HasSuffix predicate on the "event" field.
func EventHasSuffix(v string) predicate.StationTerminalEvent {
return predicate.StationTerminalEvent(sql.FieldHasSuffix(FieldEvent, v))
}
// EventEqualFold applies the EqualFold predicate on the "event" field.
func EventEqualFold(v string) predicate.StationTerminalEvent {
return predicate.StationTerminalEvent(sql.FieldEqualFold(FieldEvent, v))
}
// EventContainsFold applies the ContainsFold predicate on the "event" field.
func EventContainsFold(v string) predicate.StationTerminalEvent {
return predicate.StationTerminalEvent(sql.FieldContainsFold(FieldEvent, v))
}
// LoggedInEQ applies the EQ predicate on the "loggedIn" field.
func LoggedInEQ(v bool) predicate.StationTerminalEvent {
return predicate.StationTerminalEvent(sql.FieldEQ(FieldLoggedIn, v))
}
// LoggedInNEQ applies the NEQ predicate on the "loggedIn" field.
func LoggedInNEQ(v bool) predicate.StationTerminalEvent {
return predicate.StationTerminalEvent(sql.FieldNEQ(FieldLoggedIn, v))
}
// PoweredEQ applies the EQ predicate on the "powered" field.
func PoweredEQ(v bool) predicate.StationTerminalEvent {
return predicate.StationTerminalEvent(sql.FieldEQ(FieldPowered, v))
}
// PoweredNEQ applies the NEQ predicate on the "powered" field.
func PoweredNEQ(v bool) predicate.StationTerminalEvent {
return predicate.StationTerminalEvent(sql.FieldNEQ(FieldPowered, v))
}
// OperatorEQ applies the EQ predicate on the "operator" field.
func OperatorEQ(v string) predicate.StationTerminalEvent {
return predicate.StationTerminalEvent(sql.FieldEQ(FieldOperator, v))
}
// OperatorNEQ applies the NEQ predicate on the "operator" field.
func OperatorNEQ(v string) predicate.StationTerminalEvent {
return predicate.StationTerminalEvent(sql.FieldNEQ(FieldOperator, v))
}
// OperatorIn applies the In predicate on the "operator" field.
func OperatorIn(vs ...string) predicate.StationTerminalEvent {
return predicate.StationTerminalEvent(sql.FieldIn(FieldOperator, vs...))
}
// OperatorNotIn applies the NotIn predicate on the "operator" field.
func OperatorNotIn(vs ...string) predicate.StationTerminalEvent {
return predicate.StationTerminalEvent(sql.FieldNotIn(FieldOperator, vs...))
}
// OperatorGT applies the GT predicate on the "operator" field.
func OperatorGT(v string) predicate.StationTerminalEvent {
return predicate.StationTerminalEvent(sql.FieldGT(FieldOperator, v))
}
// OperatorGTE applies the GTE predicate on the "operator" field.
func OperatorGTE(v string) predicate.StationTerminalEvent {
return predicate.StationTerminalEvent(sql.FieldGTE(FieldOperator, v))
}
// OperatorLT applies the LT predicate on the "operator" field.
func OperatorLT(v string) predicate.StationTerminalEvent {
return predicate.StationTerminalEvent(sql.FieldLT(FieldOperator, v))
}
// OperatorLTE applies the LTE predicate on the "operator" field.
func OperatorLTE(v string) predicate.StationTerminalEvent {
return predicate.StationTerminalEvent(sql.FieldLTE(FieldOperator, v))
}
// OperatorContains applies the Contains predicate on the "operator" field.
func OperatorContains(v string) predicate.StationTerminalEvent {
return predicate.StationTerminalEvent(sql.FieldContains(FieldOperator, v))
}
// OperatorHasPrefix applies the HasPrefix predicate on the "operator" field.
func OperatorHasPrefix(v string) predicate.StationTerminalEvent {
return predicate.StationTerminalEvent(sql.FieldHasPrefix(FieldOperator, v))
}
// OperatorHasSuffix applies the HasSuffix predicate on the "operator" field.
func OperatorHasSuffix(v string) predicate.StationTerminalEvent {
return predicate.StationTerminalEvent(sql.FieldHasSuffix(FieldOperator, v))
}
// OperatorEqualFold applies the EqualFold predicate on the "operator" field.
func OperatorEqualFold(v string) predicate.StationTerminalEvent {
return predicate.StationTerminalEvent(sql.FieldEqualFold(FieldOperator, v))
}
// OperatorContainsFold applies the ContainsFold predicate on the "operator" field.
func OperatorContainsFold(v string) predicate.StationTerminalEvent {
return predicate.StationTerminalEvent(sql.FieldContainsFold(FieldOperator, v))
}
// DetailEQ applies the EQ predicate on the "detail" field.
func DetailEQ(v string) predicate.StationTerminalEvent {
return predicate.StationTerminalEvent(sql.FieldEQ(FieldDetail, v))
}
// DetailNEQ applies the NEQ predicate on the "detail" field.
func DetailNEQ(v string) predicate.StationTerminalEvent {
return predicate.StationTerminalEvent(sql.FieldNEQ(FieldDetail, v))
}
// DetailIn applies the In predicate on the "detail" field.
func DetailIn(vs ...string) predicate.StationTerminalEvent {
return predicate.StationTerminalEvent(sql.FieldIn(FieldDetail, vs...))
}
// DetailNotIn applies the NotIn predicate on the "detail" field.
func DetailNotIn(vs ...string) predicate.StationTerminalEvent {
return predicate.StationTerminalEvent(sql.FieldNotIn(FieldDetail, vs...))
}
// DetailGT applies the GT predicate on the "detail" field.
func DetailGT(v string) predicate.StationTerminalEvent {
return predicate.StationTerminalEvent(sql.FieldGT(FieldDetail, v))
}
// DetailGTE applies the GTE predicate on the "detail" field.
func DetailGTE(v string) predicate.StationTerminalEvent {
return predicate.StationTerminalEvent(sql.FieldGTE(FieldDetail, v))
}
// DetailLT applies the LT predicate on the "detail" field.
func DetailLT(v string) predicate.StationTerminalEvent {
return predicate.StationTerminalEvent(sql.FieldLT(FieldDetail, v))
}
// DetailLTE applies the LTE predicate on the "detail" field.
func DetailLTE(v string) predicate.StationTerminalEvent {
return predicate.StationTerminalEvent(sql.FieldLTE(FieldDetail, v))
}
// DetailContains applies the Contains predicate on the "detail" field.
func DetailContains(v string) predicate.StationTerminalEvent {
return predicate.StationTerminalEvent(sql.FieldContains(FieldDetail, v))
}
// DetailHasPrefix applies the HasPrefix predicate on the "detail" field.
func DetailHasPrefix(v string) predicate.StationTerminalEvent {
return predicate.StationTerminalEvent(sql.FieldHasPrefix(FieldDetail, v))
}
// DetailHasSuffix applies the HasSuffix predicate on the "detail" field.
func DetailHasSuffix(v string) predicate.StationTerminalEvent {
return predicate.StationTerminalEvent(sql.FieldHasSuffix(FieldDetail, v))
}
// DetailEqualFold applies the EqualFold predicate on the "detail" field.
func DetailEqualFold(v string) predicate.StationTerminalEvent {
return predicate.StationTerminalEvent(sql.FieldEqualFold(FieldDetail, v))
}
// DetailContainsFold applies the ContainsFold predicate on the "detail" field.
func DetailContainsFold(v string) predicate.StationTerminalEvent {
return predicate.StationTerminalEvent(sql.FieldContainsFold(FieldDetail, v))
}
// CreatedAtEQ applies the EQ predicate on the "createdAt" field.
func CreatedAtEQ(v int64) predicate.StationTerminalEvent {
return predicate.StationTerminalEvent(sql.FieldEQ(FieldCreatedAt, v))
}
// CreatedAtNEQ applies the NEQ predicate on the "createdAt" field.
func CreatedAtNEQ(v int64) predicate.StationTerminalEvent {
return predicate.StationTerminalEvent(sql.FieldNEQ(FieldCreatedAt, v))
}
// CreatedAtIn applies the In predicate on the "createdAt" field.
func CreatedAtIn(vs ...int64) predicate.StationTerminalEvent {
return predicate.StationTerminalEvent(sql.FieldIn(FieldCreatedAt, vs...))
}
// CreatedAtNotIn applies the NotIn predicate on the "createdAt" field.
func CreatedAtNotIn(vs ...int64) predicate.StationTerminalEvent {
return predicate.StationTerminalEvent(sql.FieldNotIn(FieldCreatedAt, vs...))
}
// CreatedAtGT applies the GT predicate on the "createdAt" field.
func CreatedAtGT(v int64) predicate.StationTerminalEvent {
return predicate.StationTerminalEvent(sql.FieldGT(FieldCreatedAt, v))
}
// CreatedAtGTE applies the GTE predicate on the "createdAt" field.
func CreatedAtGTE(v int64) predicate.StationTerminalEvent {
return predicate.StationTerminalEvent(sql.FieldGTE(FieldCreatedAt, v))
}
// CreatedAtLT applies the LT predicate on the "createdAt" field.
func CreatedAtLT(v int64) predicate.StationTerminalEvent {
return predicate.StationTerminalEvent(sql.FieldLT(FieldCreatedAt, v))
}
// CreatedAtLTE applies the LTE predicate on the "createdAt" field.
func CreatedAtLTE(v int64) predicate.StationTerminalEvent {
return predicate.StationTerminalEvent(sql.FieldLTE(FieldCreatedAt, v))
}
// And groups predicates with the AND operator between them.
func And(predicates ...predicate.StationTerminalEvent) predicate.StationTerminalEvent {
return predicate.StationTerminalEvent(sql.AndPredicates(predicates...))
}
// Or groups predicates with the OR operator between them.
func Or(predicates ...predicate.StationTerminalEvent) predicate.StationTerminalEvent {
return predicate.StationTerminalEvent(sql.OrPredicates(predicates...))
}
// Not applies the not operator on the given predicate.
func Not(p predicate.StationTerminalEvent) predicate.StationTerminalEvent {
return predicate.StationTerminalEvent(sql.NotPredicates(p))
}